From 03eb6d338a57bdcb7920a6c294c8f3cafd2f8e39 Mon Sep 17 00:00:00 2001 From: Yaroslav Grishajev Date: Fri, 15 Mar 2024 12:21:16 +0100 Subject: [PATCH] Fix code formatting on pre-commit --- .eslintrc.json | 17 + .github/workflows/build.yml | 3 + .github/workflows/npm.yml | 4 + .husky/pre-commit | 1 + examples/create_deployment.ts | 630 +++-- examples/create_wallet.ts | 11 +- examples/details_of_single_provider.ts | 22 +- examples/estimate_gas.ts | 75 +- examples/get_deployments.ts | 28 +- examples/get_lease_status.ts | 36 +- examples/list_all_providers.ts | 26 +- examples/signed_message.ts | 18 +- examples/signed_msg_send.ts | 94 +- examples/take_down_deployment.ts | 91 +- package-lock.json | 2339 ++++++++++++++--- package.json | 49 +- src/certificates/generate509.ts | 61 +- src/certificates/index.ts | 49 +- src/index.ts | 4 +- src/keplr/index.ts | 27 +- src/network/index.ts | 132 +- src/pbclient/index.ts | 12 +- src/protobuf/akash/audit/v1beta1/audit.ts | 282 +- src/protobuf/akash/audit/v1beta1/genesis.ts | 56 +- src/protobuf/akash/audit/v1beta1/query.ts | 317 +-- src/protobuf/akash/audit/v1beta2/audit.ts | 282 +- src/protobuf/akash/audit/v1beta2/genesis.ts | 56 +- src/protobuf/akash/audit/v1beta2/query.ts | 317 +-- src/protobuf/akash/audit/v1beta3/audit.ts | 282 +- src/protobuf/akash/audit/v1beta3/genesis.ts | 56 +- src/protobuf/akash/audit/v1beta3/query.ts | 317 +-- src/protobuf/akash/base/v1beta1/attribute.ts | 109 +- src/protobuf/akash/base/v1beta1/endpoint.ts | 44 +- src/protobuf/akash/base/v1beta1/resource.ts | 179 +- .../akash/base/v1beta1/resourcevalue.ts | 58 +- src/protobuf/akash/base/v1beta2/attribute.ts | 109 +- src/protobuf/akash/base/v1beta2/endpoint.ts | 49 +- src/protobuf/akash/base/v1beta2/resource.ts | 125 +- .../akash/base/v1beta2/resourceunits.ts | 80 +- .../akash/base/v1beta2/resourcevalue.ts | 58 +- src/protobuf/akash/base/v1beta3/attribute.ts | 109 +- src/protobuf/akash/base/v1beta3/cpu.ts | 57 +- src/protobuf/akash/base/v1beta3/endpoint.ts | 49 +- src/protobuf/akash/base/v1beta3/gpu.ts | 57 +- src/protobuf/akash/base/v1beta3/memory.ts | 64 +- src/protobuf/akash/base/v1beta3/resources.ts | 88 +- .../akash/base/v1beta3/resourceunits.ts | 88 +- .../akash/base/v1beta3/resourcevalue.ts | 58 +- src/protobuf/akash/base/v1beta3/storage.ts | 64 +- src/protobuf/akash/cert/v1beta1/cert.ts | 252 +- src/protobuf/akash/cert/v1beta1/genesis.ts | 88 +- src/protobuf/akash/cert/v1beta1/query.ts | 211 +- src/protobuf/akash/cert/v1beta2/cert.ts | 254 +- src/protobuf/akash/cert/v1beta2/genesis.ts | 88 +- src/protobuf/akash/cert/v1beta2/query.ts | 206 +- src/protobuf/akash/cert/v1beta3/cert.ts | 254 +- src/protobuf/akash/cert/v1beta3/genesis.ts | 88 +- src/protobuf/akash/cert/v1beta3/query.ts | 206 +- .../akash/deployment/v1beta1/authz.ts | 67 +- .../akash/deployment/v1beta1/deployment.ts | 507 +--- .../akash/deployment/v1beta1/genesis.ts | 103 +- .../akash/deployment/v1beta1/group.ts | 300 +-- .../akash/deployment/v1beta1/params.ts | 57 +- .../akash/deployment/v1beta1/query.ts | 320 +-- .../akash/deployment/v1beta2/authz.ts | 67 +- .../akash/deployment/v1beta2/deployment.ts | 144 +- .../akash/deployment/v1beta2/deploymentmsg.ts | 277 +- .../akash/deployment/v1beta2/genesis.ts | 103 +- .../akash/deployment/v1beta2/group.ts | 79 +- .../akash/deployment/v1beta2/groupid.ts | 49 +- .../akash/deployment/v1beta2/groupmsg.ts | 147 +- .../akash/deployment/v1beta2/groupspec.ts | 77 +- .../akash/deployment/v1beta2/params.ts | 57 +- .../akash/deployment/v1beta2/query.ts | 320 +-- .../akash/deployment/v1beta2/resource.ts | 68 +- .../akash/deployment/v1beta2/service.ts | 119 +- .../akash/deployment/v1beta3/authz.ts | 67 +- .../akash/deployment/v1beta3/deployment.ts | 144 +- .../akash/deployment/v1beta3/deploymentmsg.ts | 277 +- .../akash/deployment/v1beta3/genesis.ts | 103 +- .../akash/deployment/v1beta3/group.ts | 79 +- .../akash/deployment/v1beta3/groupid.ts | 49 +- .../akash/deployment/v1beta3/groupmsg.ts | 147 +- .../akash/deployment/v1beta3/groupspec.ts | 77 +- .../akash/deployment/v1beta3/params.ts | 48 +- .../akash/deployment/v1beta3/query.ts | 320 +-- .../akash/deployment/v1beta3/resource.ts | 68 +- .../akash/deployment/v1beta3/resourceunit.ts | 67 +- .../akash/deployment/v1beta3/service.ts | 119 +- src/protobuf/akash/escrow/v1beta1/genesis.ts | 65 +- src/protobuf/akash/escrow/v1beta1/query.ts | 221 +- src/protobuf/akash/escrow/v1beta1/types.ts | 169 +- src/protobuf/akash/escrow/v1beta2/genesis.ts | 69 +- src/protobuf/akash/escrow/v1beta2/query.ts | 225 +- src/protobuf/akash/escrow/v1beta2/types.ts | 195 +- src/protobuf/akash/escrow/v1beta3/genesis.ts | 69 +- src/protobuf/akash/escrow/v1beta3/query.ts | 225 +- src/protobuf/akash/escrow/v1beta3/types.ts | 195 +- src/protobuf/akash/gov/v1beta3/genesis.ts | 60 +- src/protobuf/akash/gov/v1beta3/params.ts | 66 +- src/protobuf/akash/icaauth/query.ts | 120 +- src/protobuf/akash/icaauth/tx.ts | 144 +- .../akash/inflation/v1beta2/genesis.ts | 51 +- .../akash/inflation/v1beta2/params.ts | 55 +- .../akash/inflation/v1beta3/genesis.ts | 51 +- .../akash/inflation/v1beta3/params.ts | 55 +- src/protobuf/akash/market/v1beta1/bid.ts | 196 +- src/protobuf/akash/market/v1beta1/genesis.ts | 69 +- src/protobuf/akash/market/v1beta1/lease.ts | 241 +- src/protobuf/akash/market/v1beta1/order.ts | 115 +- src/protobuf/akash/market/v1beta1/params.ts | 60 +- src/protobuf/akash/market/v1beta1/query.ts | 514 +--- src/protobuf/akash/market/v1beta1/service.ts | 65 +- src/protobuf/akash/market/v1beta2/bid.ts | 196 +- src/protobuf/akash/market/v1beta2/genesis.ts | 69 +- src/protobuf/akash/market/v1beta2/lease.ts | 253 +- src/protobuf/akash/market/v1beta2/order.ts | 115 +- src/protobuf/akash/market/v1beta2/params.ts | 60 +- src/protobuf/akash/market/v1beta2/query.ts | 511 +--- src/protobuf/akash/market/v1beta2/service.ts | 72 +- src/protobuf/akash/market/v1beta3/bid.ts | 196 +- src/protobuf/akash/market/v1beta3/genesis.ts | 75 +- src/protobuf/akash/market/v1beta3/lease.ts | 253 +- src/protobuf/akash/market/v1beta3/order.ts | 115 +- src/protobuf/akash/market/v1beta3/params.ts | 60 +- src/protobuf/akash/market/v1beta3/query.ts | 511 +--- src/protobuf/akash/market/v1beta3/service.ts | 72 +- src/protobuf/akash/market/v1beta4/bid.ts | 255 +- src/protobuf/akash/market/v1beta4/genesis.ts | 75 +- src/protobuf/akash/market/v1beta4/lease.ts | 253 +- src/protobuf/akash/market/v1beta4/order.ts | 115 +- src/protobuf/akash/market/v1beta4/params.ts | 60 +- src/protobuf/akash/market/v1beta4/query.ts | 511 +--- src/protobuf/akash/market/v1beta4/service.ts | 72 +- .../akash/provider/v1beta1/genesis.ts | 52 +- .../akash/provider/v1beta1/provider.ts | 285 +- src/protobuf/akash/provider/v1beta1/query.ts | 191 +- .../akash/provider/v1beta2/genesis.ts | 52 +- .../akash/provider/v1beta2/provider.ts | 285 +- src/protobuf/akash/provider/v1beta2/query.ts | 191 +- .../akash/provider/v1beta3/genesis.ts | 52 +- .../akash/provider/v1beta3/provider.ts | 285 +- src/protobuf/akash/provider/v1beta3/query.ts | 191 +- src/protobuf/akash/staking/v1beta3/genesis.ts | 51 +- src/protobuf/akash/staking/v1beta3/params.ts | 44 +- src/protobuf/akash/take/v1beta3/genesis.ts | 51 +- src/protobuf/akash/take/v1beta3/params.ts | 74 +- src/protobuf/akash/take/v1beta3/query.ts | 6 +- .../cosmos/base/query/v1beta1/pagination.ts | 108 +- src/protobuf/cosmos/base/v1beta1/coin.ts | 65 +- src/protobuf/google/api/http.ts | 117 +- src/protobuf/google/protobuf/any.ts | 51 +- src/protobuf/google/protobuf/descriptor.ts | 1525 +++-------- src/protobuf/typeRegistry.ts | 25 +- src/rpc/index.ts | 2 +- src/sdl/index.ts | 8 +- src/sdl/sizes.ts | 50 +- src/sdl/types.ts | 381 ++- src/stargate/index.ts | 18 +- src/util.ts | 2 +- src/wallet/index.ts | 2 +- src/wallet/storage.ts | 2 +- src/webpack/crypto.ts | 2 +- src/webpack/perf_hooks.ts | 2 +- tests/fixtures/gpu_basic.manifest.json | 14 +- tests/fixtures/gpu_basic_ram.manifest.json | 14 +- tests/fixtures/wordpress.manifest.json | 29 +- tests/test_deployments.ts | 26 +- tests/test_sdl_basic.ts | 185 +- tests/test_sdl_basic_beta3.ts | 112 +- tests/test_sdl_empty_profile.ts | 152 +- tests/test_sdl_env.ts | 85 +- tests/test_sdl_gpu.ts | 18 +- tests/test_sdl_gpu_attributes.ts | 23 +- tests/test_sdl_gpu_vendor_only.ts | 12 +- tests/test_sdl_httpopts.ts | 80 +- tests/test_sdl_ip_lease.ts | 7 +- .../test_sdl_persistent_storage_attributes.ts | 7 +- tests/test_sdl_sweeper.ts | 149 +- tests/test_sdl_v3_resources.ts | 8 +- tests/test_sdl_wordpress.ts | 22 +- tests/util.ts | 15 +- tsconfig.json | 9 +- webpack.config.js | 18 +- 184 files changed, 8903 insertions(+), 16658 deletions(-) create mode 100644 .eslintrc.json create mode 100644 .husky/pre-commit diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..f8ff80f --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,17 @@ +{ + "ignorePatterns": ["node_modules/", "build/", "umd/"], + "env": { + "node": true, + "es2021": true + }, + "extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"], + "parser": "@typescript-eslint/parser", + "parserOptions": { + "ecmaVersion": "latest", + "sourceType": "module" + }, + "plugins": ["@typescript-eslint"], + "rules": { + "@typescript-eslint/no-unused-vars": ["error", { "ignoreRestSiblings": true }] + } +} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index abff3da..88eb8c1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,6 +9,9 @@ on: pull_request: branches: [ main ] +env: + HUSKY: 0 + jobs: build: runs-on: ubuntu-latest diff --git a/.github/workflows/npm.yml b/.github/workflows/npm.yml index 99bff71..1436b20 100644 --- a/.github/workflows/npm.yml +++ b/.github/workflows/npm.yml @@ -1,8 +1,12 @@ name: Release from Master on Push + on: push: branches: - main +env: + HUSKY: 0 + jobs: tag: runs-on: ubuntu-latest diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100644 index 0000000..b30298c --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1 @@ +node_modules/.bin/lint-staged diff --git a/examples/create_deployment.ts b/examples/create_deployment.ts index dc88201..4f17a90 100644 --- a/examples/create_deployment.ts +++ b/examples/create_deployment.ts @@ -9,10 +9,10 @@ import * as cert from "../build/certificates"; import { getRpc } from "../build/rpc"; import { SDL } from "../build/sdl"; import { getAkashTypeRegistry } from "../build/stargate"; -import { QueryBidsRequest, QueryLeasesRequest, QueryClientImpl as QueryMarketClient } from "../build/protobuf/akash/market/v1beta4/query"; -import { QueryProviderRequest, QueryClientImpl as QueryProviderClient } from "../build/protobuf/akash/provider/v1beta3/query"; -import { MsgCreateDeployment } from '../build/protobuf/akash/deployment/v1beta3/deploymentmsg'; -import { MsgCreateLease } from '../build/protobuf/akash/market/v1beta4/lease'; +import { QueryBidsRequest, QueryClientImpl as QueryMarketClient } from "../build/protobuf/akash/market/v1beta4/query"; +import { QueryClientImpl as QueryProviderClient, QueryProviderRequest } from "../build/protobuf/akash/provider/v1beta3/query"; +import { MsgCreateDeployment } from "../build/protobuf/akash/deployment/v1beta3/deploymentmsg"; +import { MsgCreateLease } from "../build/protobuf/akash/market/v1beta4/lease"; import { BidID } from "../build/protobuf/akash/market/v1beta4/bid"; // update this with your wallet mnemonic @@ -22,399 +22,377 @@ const rawSDL = fs.readFileSync("./fixtures/example.sdl.yaml", "utf8"); const certificatePath = "./fixtures/cert.json"; type Deployment = { - id: { - owner: string, - dseq: number - } -} + id: { + owner: string; + dseq: number; + }; +}; type Lease = { - id: { - owner: string, - dseq: number, - provider: string, - gseq: number, - oseq: number - } + id: { + owner: string; + dseq: number; + provider: string; + gseq: number; + oseq: number; + }; }; type Certificate = { - csr: string, - privateKey: string, - publicKey: string + csr: string; + privateKey: string; + publicKey: string; }; // you can set this to a specific deployment sequence number to skip the deployment creation const dseq = 0; async function loadPrerequisites() { - const wallet = await walletFromMnemonic(mnemonic); - const registry = getAkashTypeRegistry(); - - const client = await SigningStargateClient.connectWithSigner(rpcEndpoint, wallet, { - registry: new Registry(registry) - }); - - const certificate = await loadOrCreateCertificate(wallet, client); - const sdl = SDL.fromString(rawSDL, "beta3"); - - return { - wallet, - client, - certificate, - sdl - }; + const wallet = await walletFromMnemonic(mnemonic); + const registry = getAkashTypeRegistry(); + + const client = await SigningStargateClient.connectWithSigner(rpcEndpoint, wallet, { + registry: new Registry(registry) + }); + + const certificate = await loadOrCreateCertificate(wallet, client); + const sdl = SDL.fromString(rawSDL, "beta3"); + + return { + wallet, + client, + certificate, + sdl + }; } // saves the certificate into the fixtures folder -function saveCertificate(certificate: { privateKey: string, publicKey: string, csr: string }) { - const json = JSON.stringify(certificate); - fs.writeFileSync(certificatePath, json); +function saveCertificate(certificate: { privateKey: string; publicKey: string; csr: string }) { + const json = JSON.stringify(certificate); + fs.writeFileSync(certificatePath, json); } -function loadCertificate(path: string): { csr: string, privateKey: string, publicKey: string } { - const json = fs.readFileSync(path, "utf8"); +function loadCertificate(path: string): { csr: string; privateKey: string; publicKey: string } { + const json = fs.readFileSync(path, "utf8"); - try { - return JSON.parse(json); - } catch (e) { - throw new Error(`Could not parse certificate: ${e} `); - } + try { + return JSON.parse(json); + } catch (e) { + throw new Error(`Could not parse certificate: ${e} `); + } } async function loadOrCreateCertificate(wallet: DirectSecp256k1HdWallet, client: SigningStargateClient) { - const accounts = await wallet.getAccounts(); - // check to see if we can load the certificate from the fixtures folder + const accounts = await wallet.getAccounts(); + // check to see if we can load the certificate from the fixtures folder - if (fs.existsSync(certificatePath)) { - return loadCertificate(certificatePath); - } + if (fs.existsSync(certificatePath)) { + return loadCertificate(certificatePath); + } - // if not, create a new one - const certificate = await cert.createCertificate(accounts[0].address); - const result = await cert.broadcastCertificate(certificate, accounts[0].address, client); + // if not, create a new one + const certificate = await cert.createCertificate(accounts[0].address); + const result = await cert.broadcastCertificate(certificate, accounts[0].address, client); - if (result.code !== undefined && result.code === 0) { - // save the certificate to the fixtures folder - saveCertificate(certificate); - return certificate; - } + if (result.code !== undefined && result.code === 0) { + // save the certificate to the fixtures folder + saveCertificate(certificate); + return certificate; + } - throw new Error(`Could not create certificate: ${result.rawLog} `); + throw new Error(`Could not create certificate: ${result.rawLog} `); } -async function walletFromMnemonic(mnemonic) { - return DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: "akash" }); +async function walletFromMnemonic(mnemonic: string) { + return DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: "akash" }); } async function createDeployment(sdl: SDL, wallet: DirectSecp256k1HdWallet, client: SigningStargateClient) { - const blockheight = await client.getHeight(); - const groups = sdl.groups(); - const accounts = await wallet.getAccounts(); - - if (dseq != 0) { - console.log("Skipping deployment creation...") - return { - id: { - owner: accounts[0].address, - dseq: dseq, - }, - groups: groups, - deposit: { - denom: "uakt", - amount: "5000000", - }, - version: await sdl.manifestVersion(), - depositor: accounts[0].address, - } - } - - const deployment = { - id: { - owner: accounts[0].address, - dseq: blockheight, - }, - groups: groups, - deposit: { - denom: "uakt", - amount: "5000000", - }, - version: await sdl.manifestVersion(), - depositor: accounts[0].address, - }; - - const fee = { - amount: [ - { - denom: "uakt", - amount: "20000", - }, - ], - gas: "800000", - }; + const blockheight = await client.getHeight(); + const groups = sdl.groups(); + const accounts = await wallet.getAccounts(); - const msg = { - typeUrl: '/akash.deployment.v1beta3.MsgCreateDeployment', - value: MsgCreateDeployment.fromPartial(deployment), + if (dseq != 0) { + console.log("Skipping deployment creation..."); + return { + id: { + owner: accounts[0].address, + dseq: dseq + }, + groups: groups, + deposit: { + denom: "uakt", + amount: "5000000" + }, + version: await sdl.manifestVersion(), + depositor: accounts[0].address }; + } - const tx = await client.signAndBroadcast(accounts[0].address, [msg], fee, "create deployment"); - - if (tx.code !== undefined && tx.code === 0) { - return deployment; - } - - throw new Error(`Could not create deployment: ${tx.rawLog} `); + const deployment = { + id: { + owner: accounts[0].address, + dseq: blockheight + }, + groups: groups, + deposit: { + denom: "uakt", + amount: "5000000" + }, + version: await sdl.manifestVersion(), + depositor: accounts[0].address + }; + + const fee = { + amount: [ + { + denom: "uakt", + amount: "20000" + } + ], + gas: "800000" + }; + + const msg = { + typeUrl: "/akash.deployment.v1beta3.MsgCreateDeployment", + value: MsgCreateDeployment.fromPartial(deployment) + }; + + const tx = await client.signAndBroadcast(accounts[0].address, [msg], fee, "create deployment"); + + if (tx.code !== undefined && tx.code === 0) { + return deployment; + } + + throw new Error(`Could not create deployment: ${tx.rawLog} `); } async function fetchBid(dseq: number, owner: string) { - const rpc = await getRpc(rpcEndpoint); - const client = new QueryMarketClient(rpc); - const request = QueryBidsRequest.fromPartial({ - filters: { - owner: owner, - dseq: dseq, - }, - }); - - const startTime = Date.now(); - const timeout = 1000 * 60 * 5; - - while (Date.now() - startTime < timeout) { - console.log("Fetching bids..."); - await new Promise(resolve => setTimeout(resolve, 5000)); - const bids = await client.Bids(request); - - if (bids.bids.length > 0 && bids.bids[0].bid !== undefined) { - console.log("Bid fetched!") - return bids.bids[0].bid; - } - - // wait 1 second before trying again + const rpc = await getRpc(rpcEndpoint); + const client = new QueryMarketClient(rpc); + const request = QueryBidsRequest.fromPartial({ + filters: { + owner: owner, + dseq: dseq } + }); - throw new Error(`Could not fetch bid for deployment ${dseq}.Timeout reached.`); -} + const startTime = Date.now(); + const timeout = 1000 * 60 * 5; -async function createLease(deployment: Deployment, wallet: DirectSecp256k1HdWallet, client: SigningStargateClient): Promise { - const { id: { dseq, owner } } = deployment; - const bid = await fetchBid(dseq, owner); - const accounts = await wallet.getAccounts(); + while (Date.now() - startTime < timeout) { + console.log("Fetching bids..."); + await new Promise(resolve => setTimeout(resolve, 5000)); + const bids = await client.Bids(request); - if (bid.bidId === undefined) { - throw new Error("Bid ID is undefined"); + if (bids.bids.length > 0 && bids.bids[0].bid !== undefined) { + console.log("Bid fetched!"); + return bids.bids[0].bid; } - const lease = { - bidId: bid.bidId - }; + // wait 1 second before trying again + } - const fee = { - amount: [ - { - denom: "uakt", - amount: "50000", - }, - ], - gas: "2000000", - }; - - const msg = { - typeUrl: `/${MsgCreateLease.$type}`, - value: MsgCreateLease.fromPartial(lease), - }; - - const tx = await client.signAndBroadcast(accounts[0].address, [msg], fee, "create lease"); - - if (tx.code !== undefined && tx.code === 0) { - return { - id: BidID.toJSON(bid.bidId) as { - owner: string; - dseq: number; - provider: string; - gseq: number; - oseq: number; - } - }; - } - - throw new Error(`Could not create lease: ${tx.rawLog} `); + throw new Error(`Could not fetch bid for deployment ${dseq}.Timeout reached.`); } -async function fetchLease(deployment: Deployment, wallet: DirectSecp256k1HdWallet): Promise { - const rpc = await getRpc(rpcEndpoint); - const client = new QueryMarketClient(rpc); - const tx = await client.Leases(QueryLeasesRequest.fromPartial({ - filters: { - owner: deployment.id.owner, - dseq: deployment.id.dseq, - }, - })); - - const lease = tx.leases[0]?.lease; - - if (lease === undefined) { - throw new Error(`Could not find lease for deployment ${deployment.id.dseq}`); - } - +async function createLease(deployment: Deployment, wallet: DirectSecp256k1HdWallet, client: SigningStargateClient): Promise { + const { + id: { dseq, owner } + } = deployment; + const bid = await fetchBid(dseq, owner); + const accounts = await wallet.getAccounts(); + + if (bid.bidId === undefined) { + throw new Error("Bid ID is undefined"); + } + + const lease = { + bidId: bid.bidId + }; + + const fee = { + amount: [ + { + denom: "uakt", + amount: "50000" + } + ], + gas: "2000000" + }; + + const msg = { + typeUrl: `/${MsgCreateLease.$type}`, + value: MsgCreateLease.fromPartial(lease) + }; + + const tx = await client.signAndBroadcast(accounts[0].address, [msg], fee, "create lease"); + + if (tx.code !== undefined && tx.code === 0) { return { - id: { - owner: lease.leaseId?.owner || "", - dseq: lease.leaseId?.dseq.toNumber() || 0, - provider: lease.leaseId?.provider || "", - gseq: lease.leaseId?.gseq || 0, - oseq: lease.leaseId?.oseq || 0, - } + id: BidID.toJSON(bid.bidId) as { + owner: string; + dseq: number; + provider: string; + gseq: number; + oseq: number; + } }; + } + + throw new Error(`Could not create lease: ${tx.rawLog} `); } async function queryLeaseStatus(lease: Lease, providerUri: string, certificate: Certificate) { - const id = lease.id; - - if (id === undefined) { - throw new Error("Lease ID is undefined"); - } + const id = lease.id; + + if (id === undefined) { + throw new Error("Lease ID is undefined"); + } + + const leasePath = `/lease/${id.dseq}/${id.gseq}/${id.oseq}/status`; + + const agent = new https.Agent({ + cert: certificate.csr, + key: certificate.privateKey, + rejectUnauthorized: false + }); + + const uri = new URL(providerUri); + + return new Promise<{ services: Record }>((resolve, reject) => { + const req = https.request( + { + hostname: uri.hostname, + port: uri.port, + path: leasePath, + method: "GET", + headers: { + "Content-Type": "application/json", + Accept: "application/json" + }, + agent: agent + }, + res => { + if (res.statusCode !== 200) { + return reject(`Could not query lease status: ${res.statusCode}`); + } - const leasePath = `/lease/${id.dseq}/${id.gseq}/${id.oseq}/status`; + let data = ""; - const agent = new https.Agent({ - cert: certificate.csr, - key: certificate.privateKey, - rejectUnauthorized: false, - }); - - const uri = new URL(providerUri); - - return new Promise((resolve, reject) => { - const req = https.request({ - hostname: uri.hostname, - port: uri.port, - path: leasePath, - method: "GET", - headers: { - "Content-Type": "application/json", - "Accept": "application/json", - }, - agent: agent, - }, (res) => { - if (res.statusCode !== 200) { - return reject(`Could not query lease status: ${res.statusCode}`); - } - - let data = ""; - - res.on("data", chunk => data += chunk); - res.on("end", () => resolve(JSON.parse(data))); - }); + res.on("data", chunk => (data += chunk)); + res.on("end", () => resolve(JSON.parse(data))); + } + ); - req.on("error", reject); - req.end(); - }); + req.on("error", reject); + req.end(); + }); } -async function sendManifest(sdl: SDL, lease: Lease, wallet: DirectSecp256k1HdWallet, certificate: { csr: string, privateKey: string, publicKey: string }) { - if (lease.id === undefined) { - throw new Error("Lease ID is undefined"); - } +async function sendManifest(sdl: SDL, lease: Lease, wallet: DirectSecp256k1HdWallet, certificate: { csr: string; privateKey: string; publicKey: string }) { + if (lease.id === undefined) { + throw new Error("Lease ID is undefined"); + } + + const { dseq, provider } = lease.id; + const rpc = await getRpc(rpcEndpoint); + const client = new QueryProviderClient(rpc); + const request = QueryProviderRequest.fromPartial({ + owner: provider + }); + + const tx = await client.Provider(request); + + if (tx.provider === undefined) { + throw new Error(`Could not find provider ${provider}`); + } + + const providerInfo = tx.provider; + const manifest = sdl.manifestSortedJSON(); + const path = `/deployment/${dseq}/manifest`; + + const uri = new URL(providerInfo.hostUri); + const agent = new https.Agent({ + cert: certificate.csr, + key: certificate.privateKey, + rejectUnauthorized: false + }); + + await new Promise((resolve, reject) => { + const req = https.request( + { + hostname: uri.hostname, + port: uri.port, + path: path, + method: "PUT", + headers: { + "Content-Type": "application/json", + Accept: "application/json", + "Content-Length": manifest.length + }, + agent: agent + }, + res => { + res.on("error", reject); - const { dseq, provider } = lease.id; - const rpc = await getRpc(rpcEndpoint); - const client = new QueryProviderClient(rpc); - const request = QueryProviderRequest.fromPartial({ - owner: provider, - }); + res.on("data", chunk => { + console.log("Response:", chunk.toString()); + }); - const tx = await client.Provider(request); + if (res.statusCode !== 200) { + return reject(`Could not send manifest: ${res.statusCode}`); + } - if (tx.provider === undefined) { - throw new Error(`Could not find provider ${provider}`); - } + resolve("ok"); + } + ); - const providerInfo = tx.provider; - const manifest = sdl.manifestSortedJSON(); - const path = `/deployment/${dseq}/manifest`; + req.on("error", reject); + req.write(manifest); + req.end(); + }); - const uri = new URL(providerInfo.hostUri); - const agent = new https.Agent({ - cert: certificate.csr, - key: certificate.privateKey, - rejectUnauthorized: false, - }); + const startTime = Date.now(); + const timeout = 1000 * 60 * 10; - await new Promise((resolve, reject) => { - const req = https.request({ - hostname: uri.hostname, - port: uri.port, - path: path, - method: "PUT", - headers: { - "Content-Type": "application/json", - "Accept": "application/json", - "Content-Length": manifest.length, - }, - agent: agent, - }, (res) => { - res.on("error", reject); - - res.on("data", chunk => { - console.log("Response:", chunk.toString()); - }); - - if (res.statusCode !== 200) { - return reject(`Could not send manifest: ${res.statusCode}`); - } - - resolve("ok"); - }); + while (Date.now() - startTime < timeout) { + console.log("Waiting for deployment to start..."); + const status = await queryLeaseStatus(lease, providerInfo.hostUri, certificate).catch(err => { + if (err.includes("Could not query lease status: 404")) { + return undefined; + } - req.on("error", reject); - req.write(manifest); - req.end(); + throw err; }); - const startTime = Date.now(); - const timeout = 1000 * 60 * 10; - - while (Date.now() - startTime < timeout) { - console.log("Waiting for deployment to start..."); - const status = await queryLeaseStatus(lease, providerInfo.hostUri, certificate) - .catch(err => { - if (err.includes("Could not query lease status: 404")) { - return undefined; - } - - throw err; - }) as any; - - if (status) { - for (const [name, service] of Object.entries(status.services)) { - if ((service as any).uris) { - console.log(`Service ${name} is available at:`, (service as any).uris[0]); - return; - } - } + if (status) { + for (const [name, service] of Object.entries(status.services)) { + if (service.uris) { + console.log(`Service ${name} is available at:`, service.uris[0]); + return; } - - // wait 1 second before trying again - await new Promise(resolve => setTimeout(resolve, 3000)); + } } - throw new Error(`Could not start deployment. Timeout reached.`); + // wait 1 second before trying again + await new Promise(resolve => setTimeout(resolve, 3000)); + } + + throw new Error(`Could not start deployment. Timeout reached.`); } async function deploy() { - const { wallet, client, certificate, sdl } = await loadPrerequisites(); - - console.log("Creating deployment...") - const deployment = await createDeployment(sdl, wallet, client); + const { wallet, client, certificate, sdl } = await loadPrerequisites(); - console.log("Creating lease..."); - const lease = await createLease(deployment, wallet, client); + console.log("Creating deployment..."); + const deployment = await createDeployment(sdl, wallet, client); - console.log("Sending manifest..."); - const status: any = await sendManifest(sdl, lease, wallet, certificate); + console.log("Creating lease..."); + const lease = await createLease(deployment, wallet, client); - return status; + console.log("Sending manifest..."); + return await sendManifest(sdl, lease, wallet, certificate); } -deploy().catch(console.error); \ No newline at end of file +deploy().catch(console.error); diff --git a/examples/create_wallet.ts b/examples/create_wallet.ts index 62c6308..ccb05c1 100644 --- a/examples/create_wallet.ts +++ b/examples/create_wallet.ts @@ -1,13 +1,8 @@ import { Secp256k1HdWallet } from "@cosmjs/launchpad"; async function main() { - const wallet = await Secp256k1HdWallet - .generate(undefined, { prefix: "akash" }); - - const [account] = await wallet.getAccounts(); - - // pull the address and pubKey from the first account - const { address, pubkey } = account; + const wallet = await Secp256k1HdWallet.generate(undefined, { prefix: "akash" }); + await wallet.getAccounts(); } -main(); \ No newline at end of file +main(); diff --git a/examples/details_of_single_provider.ts b/examples/details_of_single_provider.ts index e901fd2..d7f2579 100644 --- a/examples/details_of_single_provider.ts +++ b/examples/details_of_single_provider.ts @@ -1,16 +1,16 @@ import { QueryClientImpl, QueryProviderRequest, QueryProviderResponse } from "@akashnetwork/akashjs/build/protobuf/akash/provider/v1beta3/query"; -import { getRpc } from "@akashnetwork/akashjs/build/rpc" +import { getRpc } from "@akashnetwork/akashjs/build/rpc"; async function main() { - const client = new QueryClientImpl(await getRpc("http://your.rpc.node")); - - const getProviderInfoRequest = QueryProviderRequest.fromPartial({ - owner: "akashSomeProviderAddress" - }) - const providerResponse = await client.Provider(getProviderInfoRequest); - const data = QueryProviderResponse.toJSON(providerResponse); - - console.log(data) + const client = new QueryClientImpl(await getRpc("http://your.rpc.node")); + + const getProviderInfoRequest = QueryProviderRequest.fromPartial({ + owner: "akashSomeProviderAddress" + }); + const providerResponse = await client.Provider(getProviderInfoRequest); + const data = QueryProviderResponse.toJSON(providerResponse); + + console.log(data); } -main(); \ No newline at end of file +main(); diff --git a/examples/estimate_gas.ts b/examples/estimate_gas.ts index 3fc13da..27edb78 100644 --- a/examples/estimate_gas.ts +++ b/examples/estimate_gas.ts @@ -5,50 +5,39 @@ import { SigningStargateClient } from "@cosmjs/stargate"; import { getAkashTypeRegistry, getTypeUrl } from "@akashnetwork/akashjs/build/stargate/index"; import { MsgCloseDeployment } from "@akashnetwork/akashjs/build/protobuf/akash/deployment/v1beta3/deploymentmsg"; - async function main() { - const mnemonic = "your wallet mnemonic"; - const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: "akash" }); - - // get first account - const [account] = await wallet.getAccounts(); - - // Use the encode method for the message to wrap the data - const message = MsgCloseDeployment.fromPartial({ - id: { - dseq: "555555", - owner: account.address, - } - }); - - // Set the appropriate typeUrl and attach the encoded message as the value - const msgAny = { - typeUrl: getTypeUrl(MsgCloseDeployment), - value: message - }; - - // You can use your own RPC node, or get a list of public nodes from akashjs - const rpcEndpoint = "http://my.rpc.node"; - - const myRegistry = new Registry( - getAkashTypeRegistry() - ); - - const client = await SigningStargateClient.connectWithSigner( - rpcEndpoint, - wallet, - { - registry: myRegistry - } - ); - - const gas = await client.simulate( - account.address, - [msgAny], - "take down deployment" - ); - - console.log(gas); + const mnemonic = "your wallet mnemonic"; + const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: "akash" }); + + // get first account + const [account] = await wallet.getAccounts(); + + // Use the encode method for the message to wrap the data + const message = MsgCloseDeployment.fromPartial({ + id: { + dseq: "555555", + owner: account.address + } + }); + + // Set the appropriate typeUrl and attach the encoded message as the value + const msgAny = { + typeUrl: getTypeUrl(MsgCloseDeployment), + value: message + }; + + // You can use your own RPC node, or get a list of public nodes from akashjs + const rpcEndpoint = "http://my.rpc.node"; + + const myRegistry = new Registry(getAkashTypeRegistry()); + + const client = await SigningStargateClient.connectWithSigner(rpcEndpoint, wallet, { + registry: myRegistry + }); + + const gas = await client.simulate(account.address, [msgAny], "take down deployment"); + + console.log(gas); } main(); diff --git a/examples/get_deployments.ts b/examples/get_deployments.ts index e2704bc..623a9b9 100644 --- a/examples/get_deployments.ts +++ b/examples/get_deployments.ts @@ -1,22 +1,18 @@ -import { - QueryDeploymentsResponse, - QueryDeploymentsRequest, - QueryClientImpl -} from "@akashnetwork/akashjs/build/protobuf/akash/deployment/v1beta3/query"; -import { getRpc } from "@akashnetwork/akashjs/build/rpc" +import { QueryDeploymentsResponse, QueryDeploymentsRequest, QueryClientImpl } from "@akashnetwork/akashjs/build/protobuf/akash/deployment/v1beta3/query"; +import { getRpc } from "@akashnetwork/akashjs/build/rpc"; async function main() { - const request = QueryDeploymentsRequest.fromJSON({ - filters: { - owner: "akashSomeOwnerAddress", - } - }); + const request = QueryDeploymentsRequest.fromJSON({ + filters: { + owner: "akashSomeOwnerAddress" + } + }); - const client = new QueryClientImpl(await getRpc("http://your.rpc.node")); - const response = await client.Deployments(request); - const data = QueryDeploymentsResponse.toJSON(response); + const client = new QueryClientImpl(await getRpc("http://your.rpc.node")); + const response = await client.Deployments(request); + const data = QueryDeploymentsResponse.toJSON(response); - console.log(data) + console.log(data); } -main(); \ No newline at end of file +main(); diff --git a/examples/get_lease_status.ts b/examples/get_lease_status.ts index 1b724a7..c713c06 100644 --- a/examples/get_lease_status.ts +++ b/examples/get_lease_status.ts @@ -1,23 +1,23 @@ -import { QueryClientImpl, QueryLeaseRequest, QueryLeaseResponse} from "@akashnetwork/akashjs/build/protobuf/akash/market/v1beta3/query"; -import { getRpc } from "@akashnetwork/akashjs/build/rpc" +import { QueryClientImpl, QueryLeaseRequest, QueryLeaseResponse } from "@akashnetwork/akashjs/build/protobuf/akash/market/v1beta3/query"; +import { getRpc } from "@akashnetwork/akashjs/build/rpc"; async function main() { - const client = new QueryClientImpl(await getRpc("http://your.rpc.node")); - - const getLeaseStatusRequest = QueryLeaseRequest.fromPartial({ - id: { - owner: "akashSomeOwnerAddress", - provider: "akashSomeProviderAddress", - dseq: 1111, // deployment dseq - gseq: 1, // most of the time the value is 1 - oseq: 1 // most of the time the value is 1 - } - }) + const client = new QueryClientImpl(await getRpc("http://your.rpc.node")); - const leaseStatusResponse = await client.Lease(getLeaseStatusRequest); - const data = QueryLeaseResponse.toJSON(leaseStatusResponse); - - console.log(data) + const getLeaseStatusRequest = QueryLeaseRequest.fromPartial({ + id: { + owner: "akashSomeOwnerAddress", + provider: "akashSomeProviderAddress", + dseq: 1111, // deployment dseq + gseq: 1, // most of the time the value is 1 + oseq: 1 // most of the time the value is 1 + } + }); + + const leaseStatusResponse = await client.Lease(getLeaseStatusRequest); + const data = QueryLeaseResponse.toJSON(leaseStatusResponse); + + console.log(data); } -main(); \ No newline at end of file +main(); diff --git a/examples/list_all_providers.ts b/examples/list_all_providers.ts index 03bdda0..f318192 100644 --- a/examples/list_all_providers.ts +++ b/examples/list_all_providers.ts @@ -1,19 +1,19 @@ import { QueryClientImpl, QueryProvidersRequest, QueryProvidersResponse } from "@akashnetwork/akashjs/build/protobuf/akash/provider/v1beta3/query"; -import { getRpc } from "@akashnetwork/akashjs/build/rpc" +import { getRpc } from "@akashnetwork/akashjs/build/rpc"; async function main() { - const client = new QueryClientImpl(await getRpc("http://your.rpc.node")); + const client = new QueryClientImpl(await getRpc("http://your.rpc.node")); - const providersRequest = QueryProvidersRequest.fromPartial({ - pagination: { - limit: 100, //change to a value of your choice default: 100 - countTotal: true // set to true to receive total count in response - } - }) - const providersResponse = await client.Providers(providersRequest); - const data = QueryProvidersResponse.toJSON(providersResponse); - - console.log(data) + const providersRequest = QueryProvidersRequest.fromPartial({ + pagination: { + limit: 100, //change to a value of your choice default: 100 + countTotal: true // set to true to receive total count in response + } + }); + const providersResponse = await client.Providers(providersRequest); + const data = QueryProvidersResponse.toJSON(providersResponse); + + console.log(data); } -main(); \ No newline at end of file +main(); diff --git a/examples/signed_message.ts b/examples/signed_message.ts index f449bad..6332194 100644 --- a/examples/signed_message.ts +++ b/examples/signed_message.ts @@ -1,22 +1,18 @@ import { Secp256k1HdWallet, StdSignDoc } from "@cosmjs/launchpad"; function getMessage(): StdSignDoc { - return { value: "test message" } as any; + return { value: "test message" } as unknown as StdSignDoc; } async function main() { - const wallet = await Secp256k1HdWallet - .generate(undefined, { prefix: "akash" }); + const wallet = await Secp256k1HdWallet.generate(undefined, { prefix: "akash" }); - const [account] = await wallet.getAccounts(); - const msg = getMessage() // your custom message + const [account] = await wallet.getAccounts(); + const msg = getMessage(); - const signedMessage = await wallet.signAmino( - account.address, - msg - ) + const signedMessage = await wallet.signAmino(account.address, msg); - console.log(signedMessage); + console.log(signedMessage); } -main(); \ No newline at end of file +main(); diff --git a/examples/signed_msg_send.ts b/examples/signed_msg_send.ts index b2edaac..6e592e2 100644 --- a/examples/signed_msg_send.ts +++ b/examples/signed_msg_send.ts @@ -2,59 +2,47 @@ import { coins, DirectSecp256k1HdWallet, Registry } from "@cosmjs/proto-signing" import { defaultRegistryTypes, SigningStargateClient } from "@cosmjs/stargate"; async function main() { - - const mnemonic = "your wallet mnemonic"; - const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: "akash" }); - - // get first account - const [account] = await wallet.getAccounts(); - - // Setup a send message - const message = { - fromAddress: account.address, - toAddress: "akash123...", - amount: coins(10, "akt"), - }; - - // Set the appropriate typeUrl and attach the encoded message as the value - const msgAny = { - typeUrl: '/cosmos.bank.v1beta1.MsgSend', - value: message - }; - - // You can use your own RPC node, or get a list of public nodes from akashjs - const rpcEndpoint = "http://your.rpc.node"; - - const myRegistry = new Registry( - defaultRegistryTypes - ); - - const client = await SigningStargateClient.connectWithSigner( - rpcEndpoint, - wallet, - { - registry: myRegistry - } - ); - - const fee = { - amount: [ - { - denom: "uakt", - amount: "5000", - }, - ], - gas: "800000", - }; - - const msg = await client.sign( - account.address, - [msgAny], - fee, - "send funds with akashjs" - ); - - console.log(msg); + const mnemonic = "your wallet mnemonic"; + const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: "akash" }); + + // get first account + const [account] = await wallet.getAccounts(); + + // Setup a send message + const message = { + fromAddress: account.address, + toAddress: "akash123...", + amount: coins(10, "akt") + }; + + // Set the appropriate typeUrl and attach the encoded message as the value + const msgAny = { + typeUrl: "/cosmos.bank.v1beta1.MsgSend", + value: message + }; + + // You can use your own RPC node, or get a list of public nodes from akashjs + const rpcEndpoint = "http://your.rpc.node"; + + const myRegistry = new Registry(defaultRegistryTypes); + + const client = await SigningStargateClient.connectWithSigner(rpcEndpoint, wallet, { + registry: myRegistry + }); + + const fee = { + amount: [ + { + denom: "uakt", + amount: "5000" + } + ], + gas: "800000" + }; + + const msg = await client.sign(account.address, [msgAny], fee, "send funds with akashjs"); + + console.log(msg); } main(); diff --git a/examples/take_down_deployment.ts b/examples/take_down_deployment.ts index 062d99f..2bd34aa 100644 --- a/examples/take_down_deployment.ts +++ b/examples/take_down_deployment.ts @@ -6,57 +6,46 @@ import { getAkashTypeRegistry, getTypeUrl } from "@akashnetwork/akashjs/build/st import { MsgCloseDeployment } from "@akashnetwork/akashjs/build/protobuf/akash/deployment/v1beta3/deploymentmsg"; async function main() { - const mnemonic = "your wallet mnemonic"; - const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: "akash" }); - - // get first account - const [account] = await wallet.getAccounts(); - - // Use the encode method for the message to wrap the data - const message = MsgCloseDeployment.fromPartial({ - id: { - dseq: "555555", - owner: account.address, - } - }); - - // Set the appropriate typeUrl and attach the encoded message as the value - const msgAny = { - typeUrl: getTypeUrl(MsgCloseDeployment), - value: message - }; - - // You can use your own RPC node, or get a list of public nodes from akashjs - const rpcEndpoint = "http://my.rpc.node"; - - const myRegistry = new Registry( - getAkashTypeRegistry() - ); - - const client = await SigningStargateClient.connectWithSigner( - rpcEndpoint, - wallet, - { - registry: myRegistry - } - ); - - const fee = { - amount: [ - { - denom: "uakt", - amount: "20000", - }, - ], - gas: "800000", - }; - - const signedMessage = await client.signAndBroadcast( - account.address, - [msgAny], - fee, - "take down deployment" - ); + const mnemonic = "your wallet mnemonic"; + const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, { prefix: "akash" }); + + // get first account + const [account] = await wallet.getAccounts(); + + // Use the encode method for the message to wrap the data + const message = MsgCloseDeployment.fromPartial({ + id: { + dseq: "555555", + owner: account.address + } + }); + + // Set the appropriate typeUrl and attach the encoded message as the value + const msgAny = { + typeUrl: getTypeUrl(MsgCloseDeployment), + value: message + }; + + // You can use your own RPC node, or get a list of public nodes from akashjs + const rpcEndpoint = "http://my.rpc.node"; + + const myRegistry = new Registry(getAkashTypeRegistry()); + + const client = await SigningStargateClient.connectWithSigner(rpcEndpoint, wallet, { + registry: myRegistry + }); + + const fee = { + amount: [ + { + denom: "uakt", + amount: "20000" + } + ], + gas: "800000" + }; + + await client.signAndBroadcast(account.address, [msgAny], fee, "take down deployment"); } main(); diff --git a/package-lock.json b/package-lock.json index 1ea2e04..4b418cb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -34,7 +34,11 @@ "@types/node-fetch": "2", "@types/sinon": "^10.0.11", "@types/tap": "^15.0.5", + "@typescript-eslint/eslint-plugin": "^7.2.0", + "husky": "^9.0.11", + "lint-staged": "^15.2.2", "node-polyfill-webpack-plugin": "^1.1.4", + "prettier": "^3.2.5", "rimraf": "^5.0.1", "sinon": "^13.0.1", "tap": "^15.1.6", @@ -49,6 +53,16 @@ "node": ">18.0.0" } }, + "node_modules/@aashutoshrathi/word-wrap": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", + "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", + "dev": true, + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/@ampproject/remapping": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", @@ -1209,6 +1223,190 @@ "node": ">=10.0.0" } }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", + "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==", + "dev": true, + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "dev": true, + "peer": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "peer": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@eslint/eslintrc/node_modules/globals": { + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "dev": true, + "peer": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@eslint/eslintrc/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "peer": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@eslint/eslintrc/node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "peer": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@eslint/eslintrc/node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "peer": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@eslint/js": { + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", + "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", + "dev": true, + "peer": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.11.14", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", + "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", + "dev": true, + "peer": true, + "dependencies": { + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "peer": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@humanwhocodes/config-array/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "peer": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "peer": true, + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz", + "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==", + "dev": true, + "peer": true + }, "node_modules/@isaacs/cliui": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", @@ -1386,6 +1584,41 @@ } ] }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/@pkgjs/parseargs": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", @@ -1548,9 +1781,9 @@ "dev": true }, "node_modules/@types/json-schema": { - "version": "7.0.11", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", - "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", "dev": true }, "node_modules/@types/json-stable-stringify": { @@ -1585,6 +1818,12 @@ "integrity": "sha512-xFdpkAkikBgqBdG9vIlsqffDV8GpvnPEzs0IUtr1v3BEB97ijsFQ4RXVbUZwjFThhB4MDSTUfvmxUD5PGx0wXA==", "dev": true }, + "node_modules/@types/semver": { + "version": "7.5.8", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", + "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==", + "dev": true + }, "node_modules/@types/sinon": { "version": "10.0.12", "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.12.tgz", @@ -1609,6 +1848,204 @@ "@types/node": "*" } }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.2.0.tgz", + "integrity": "sha512-mdekAHOqS9UjlmyF/LSs6AIEvfceV749GFxoBAjwAv0nkevfKHWQFDMcBZWUiIC5ft6ePWivXoS36aKQ0Cy3sw==", + "dev": true, + "dependencies": { + "@eslint-community/regexpp": "^4.5.1", + "@typescript-eslint/scope-manager": "7.2.0", + "@typescript-eslint/type-utils": "7.2.0", + "@typescript-eslint/utils": "7.2.0", + "@typescript-eslint/visitor-keys": "7.2.0", + "debug": "^4.3.4", + "graphemer": "^1.4.0", + "ignore": "^5.2.4", + "natural-compare": "^1.4.0", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^7.0.0", + "eslint": "^8.56.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.2.0.tgz", + "integrity": "sha512-5FKsVcHTk6TafQKQbuIVkXq58Fnbkd2wDL4LB7AURN7RUOu1utVP+G8+6u3ZhEroW3DF6hyo3ZEXxgKgp4KeCg==", + "dev": true, + "peer": true, + "dependencies": { + "@typescript-eslint/scope-manager": "7.2.0", + "@typescript-eslint/types": "7.2.0", + "@typescript-eslint/typescript-estree": "7.2.0", + "@typescript-eslint/visitor-keys": "7.2.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.56.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.2.0.tgz", + "integrity": "sha512-Qh976RbQM/fYtjx9hs4XkayYujB/aPwglw2choHmf3zBjB4qOywWSdt9+KLRdHubGcoSwBnXUH2sR3hkyaERRg==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "7.2.0", + "@typescript-eslint/visitor-keys": "7.2.0" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.2.0.tgz", + "integrity": "sha512-xHi51adBHo9O9330J8GQYQwrKBqbIPJGZZVQTHHmy200hvkLZFWJIFtAG/7IYTWUyun6DE6w5InDReePJYJlJA==", + "dev": true, + "dependencies": { + "@typescript-eslint/typescript-estree": "7.2.0", + "@typescript-eslint/utils": "7.2.0", + "debug": "^4.3.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.56.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/types": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.2.0.tgz", + "integrity": "sha512-XFtUHPI/abFhm4cbCDc5Ykc8npOKBSJePY3a3s+lwumt7XWJuzP5cZcfZ610MIPHjQjNsOLlYK8ASPaNG8UiyA==", + "dev": true, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.2.0.tgz", + "integrity": "sha512-cyxS5WQQCoBwSakpMrvMXuMDEbhOo9bNHHrNcEWis6XHx6KF518tkF1wBvKIn/tpq5ZpUYK7Bdklu8qY0MsFIA==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "7.2.0", + "@typescript-eslint/visitor-keys": "7.2.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "minimatch": "9.0.3", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.2.0.tgz", + "integrity": "sha512-YfHpnMAGb1Eekpm3XRK8hcMwGLGsnT6L+7b2XyRv6ouDuJU1tZir1GS2i0+VXRatMwSI1/UfcyPe53ADkU+IuA==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@types/json-schema": "^7.0.12", + "@types/semver": "^7.5.0", + "@typescript-eslint/scope-manager": "7.2.0", + "@typescript-eslint/types": "7.2.0", + "@typescript-eslint/typescript-estree": "7.2.0", + "semver": "^7.5.4" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.56.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.2.0.tgz", + "integrity": "sha512-c6EIQRHhcpl6+tO8EMR+kjkkV+ugUNXOmeASA1rlzkd8EPIriavpWoiEz1HR/VLhbVIdhqnV6E7JZm00cBDx2A==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "7.2.0", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", + "dev": true, + "peer": true + }, "node_modules/@webassemblyjs/ast": { "version": "1.11.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz", @@ -1804,9 +2241,9 @@ "dev": true }, "node_modules/acorn": { - "version": "8.8.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", - "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", + "version": "8.11.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", + "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -1824,6 +2261,16 @@ "acorn": "^8" } }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "peer": true, + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, "node_modules/acorn-walk": { "version": "8.2.0", "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", @@ -1871,7 +2318,34 @@ "ajv": "^6.9.1" } }, - "node_modules/ansi-regex": { + "node_modules/ansi-escapes": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-6.2.0.tgz", + "integrity": "sha512-kzRaCqXnpzWs+3z5ABPQiVke+iq0KXkHo8xiWV4RPTi5Yli0l97BEQuhXV1s7+aSU/fu1kUuxgS4MsQ0fRuygw==", + "dev": true, + "dependencies": { + "type-fest": "^3.0.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-escapes/node_modules/type-fest": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.13.1.tgz", + "integrity": "sha512-tLq3bSNx+xSpwvAJnzrK0Ep5CLNWjvFTOp71URMaAEWBfRb9nnJiBoUe0tF8bI4ZFO3omgBR6NvnbzVUT3Ly4g==", + "dev": true, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", @@ -1938,6 +2412,15 @@ "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/asn1": { "version": "0.2.6", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", @@ -2398,6 +2881,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "peer": true, + "engines": { + "node": ">=6" + } + }, "node_modules/camelcase": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", @@ -2502,6 +2995,60 @@ "node": ">=6" } }, + "node_modules/cli-cursor": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-4.0.0.tgz", + "integrity": "sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg==", + "dev": true, + "dependencies": { + "restore-cursor": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-truncate": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-4.0.0.tgz", + "integrity": "sha512-nPdaFdQ0h/GEigbPClz11D0v/ZJEwxmeVZGeMo3Z5StPtUTkA9o1lD6QwoirYiSDzbcwn2XcjwmCp68W1IS4TA==", + "dev": true, + "dependencies": { + "slice-ansi": "^5.0.0", + "string-width": "^7.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-truncate/node_modules/emoji-regex": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.3.0.tgz", + "integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==", + "dev": true + }, + "node_modules/cli-truncate/node_modules/string-width": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.1.0.tgz", + "integrity": "sha512-SEIJCWiX7Kg4c129n48aDRwLbFb2LJmXXFrWBG4NGaRtMQ3myKPKbwrD1BKqQn74oCoNMBVrfDEr5M9YxCsrkw==", + "dev": true, + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/cliui": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", @@ -2602,9 +3149,9 @@ } }, "node_modules/colorette": { - "version": "2.0.19", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.19.tgz", - "integrity": "sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==", + "version": "2.0.20", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", + "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", "dev": true }, "node_modules/combined-stream": { @@ -2936,6 +3483,13 @@ "node": ">=4.0.0" } }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true, + "peer": true + }, "node_modules/default-require-extensions": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-3.0.0.tgz", @@ -3015,6 +3569,31 @@ "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", "dev": true }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "peer": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/domain-browser": { "version": "4.22.0", "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-4.22.0.tgz", @@ -3197,6 +3776,62 @@ "node": ">=8" } }, + "node_modules/eslint": { + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", + "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", + "dev": true, + "peer": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.57.0", + "@humanwhocodes/config-array": "^0.11.14", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/eslint-scope": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", @@ -3210,155 +3845,498 @@ "node": ">=8.0.0" } }, - "node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" + "node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "peer": true, "engines": { - "node": ">=4" + "node": ">=8" } }, - "node_modules/esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "node_modules/eslint/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "peer": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/eslint/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "peer": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/eslint-scope": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", "dev": true, + "peer": true, "dependencies": { + "esrecurse": "^4.3.0", "estraverse": "^5.2.0" }, "engines": { - "node": ">=4.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/esrecurse/node_modules/estraverse": { + "node_modules/eslint/node_modules/estraverse": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, + "peer": true, "engines": { "node": ">=4.0" } }, - "node_modules/estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "node_modules/eslint/node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, + "peer": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, "engines": { - "node": ">=4.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/events": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", - "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "node_modules/eslint/node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "peer": true, + "dependencies": { + "is-glob": "^4.0.3" + }, "engines": { - "node": ">=0.8.x" + "node": ">=10.13.0" } }, - "node_modules/events-to-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/events-to-array/-/events-to-array-1.1.2.tgz", - "integrity": "sha512-inRWzRY7nG+aXZxBzEqYKB3HPgwflZRopAjDCHv0whhRx+MTUr1ei0ICZUypdyE0HRm4L2d5VEcIqLD6yl+BFA==", - "dev": true - }, - "node_modules/evp_bytestokey": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", - "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "node_modules/eslint/node_modules/globals": { + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", "dev": true, + "peer": true, "dependencies": { - "md5.js": "^1.3.4", - "safe-buffer": "^5.1.1" - } - }, - "node_modules/expand-template": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", - "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", + "type-fest": "^0.20.2" + }, "engines": { - "node": ">=6" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "dev": true - }, - "node_modules/extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", - "dev": true, - "engines": [ - "node >=0.6.0" - ] - }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true - }, - "node_modules/fastest-levenshtein": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.12.tgz", - "integrity": "sha512-On2N+BpYJ15xIC974QNVuYGMOlEVt4s0EOI3wwMqOmK1fdDY+FN/zltPV8vosq4ad4c/gJ1KHScUn/6AWIgiow==", - "dev": true - }, - "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "node_modules/eslint/node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, + "peer": true, "dependencies": { - "to-regex-range": "^5.0.1" + "p-locate": "^5.0.0" }, "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/filter-obj": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/filter-obj/-/filter-obj-2.0.2.tgz", - "integrity": "sha512-lO3ttPjHZRfjMcxWKb1j1eDhTFsu4meeR3lnMcnBFhk6RuLhvEiuALu2TlfL310ph4lCYYwgF/ElIjdP739tdg==", + "node_modules/eslint/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, + "peer": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, "engines": { - "node": ">=8" + "node": "*" } }, - "node_modules/find-cache-dir": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", - "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", + "node_modules/eslint/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, + "peer": true, "dependencies": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" + "yocto-queue": "^0.1.0" }, "engines": { - "node": ">=8" + "node": ">=10" }, "funding": { - "url": "https://github.com/avajs/find-cache-dir?sponsor=1" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dependencies": { + "node_modules/eslint/node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "peer": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "peer": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/eslint/node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "peer": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/espree": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "dev": true, + "peer": true, + "dependencies": { + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/esquery": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", + "dev": true, + "peer": true, + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esquery/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "peer": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esrecurse/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/eventemitter3": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", + "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==", + "dev": true + }, + "node_modules/events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "engines": { + "node": ">=0.8.x" + } + }, + "node_modules/events-to-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/events-to-array/-/events-to-array-1.1.2.tgz", + "integrity": "sha512-inRWzRY7nG+aXZxBzEqYKB3HPgwflZRopAjDCHv0whhRx+MTUr1ei0ICZUypdyE0HRm4L2d5VEcIqLD6yl+BFA==", + "dev": true + }, + "node_modules/evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "dev": true, + "dependencies": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, + "node_modules/execa": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz", + "integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^8.0.1", + "human-signals": "^5.0.0", + "is-stream": "^3.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^5.1.0", + "onetime": "^6.0.0", + "signal-exit": "^4.1.0", + "strip-final-newline": "^3.0.0" + }, + "engines": { + "node": ">=16.17" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/execa/node_modules/is-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/expand-template": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", + "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", + "engines": { + "node": ">=6" + } + }, + "node_modules/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, + "node_modules/extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", + "dev": true, + "engines": [ + "node >=0.6.0" + ] + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + }, + "node_modules/fast-glob": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true, + "peer": true + }, + "node_modules/fastest-levenshtein": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.12.tgz", + "integrity": "sha512-On2N+BpYJ15xIC974QNVuYGMOlEVt4s0EOI3wwMqOmK1fdDY+FN/zltPV8vosq4ad4c/gJ1KHScUn/6AWIgiow==", + "dev": true + }, + "node_modules/fastq": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", + "dev": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "peer": true, + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/filter-obj": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/filter-obj/-/filter-obj-2.0.2.tgz", + "integrity": "sha512-lO3ttPjHZRfjMcxWKb1j1eDhTFsu4meeR3lnMcnBFhk6RuLhvEiuALu2TlfL310ph4lCYYwgF/ElIjdP739tdg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-cache-dir": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", + "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", + "dev": true, + "dependencies": { + "commondir": "^1.0.1", + "make-dir": "^3.0.2", + "pkg-dir": "^4.1.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/avajs/find-cache-dir?sponsor=1" + } + }, + "node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dependencies": { "locate-path": "^5.0.0", "path-exists": "^4.0.0" }, @@ -3372,6 +4350,89 @@ "integrity": "sha512-ENZS237/Hr8bjczn5eKuBohLgaD0JyUd0arxretR1f9RO46vZHA1b2y0VorgGV3WaOT3c+78P8h7v4JGJ1i/rg==", "dev": true }, + "node_modules/flat-cache": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", + "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", + "dev": true, + "peer": true, + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.3", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flat-cache/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "peer": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/flat-cache/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "peer": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/flat-cache/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "peer": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/flat-cache/node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "peer": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/flatted": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", + "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", + "dev": true, + "peer": true + }, "node_modules/follow-redirects": { "version": "1.15.1", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.1.tgz", @@ -3545,6 +4606,18 @@ "node": "6.* || 8.* || >= 10.*" } }, + "node_modules/get-east-asian-width": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.2.0.tgz", + "integrity": "sha512-2nk+7SIVb14QrgXFHcm84tD4bKQz0RxPuMT8Ag5KPOq7J5fEmAg0UbXdTOSHqNuHSU28k55qnceesxXRZGzKWA==", + "dev": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/get-intrinsic": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.2.tgz", @@ -3567,6 +4640,18 @@ "node": ">=8.0.0" } }, + "node_modules/get-stream": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", + "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", + "dev": true, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/get-symbol-description": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", @@ -3660,12 +4745,38 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/graceful-fs": { "version": "4.2.10", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", "dev": true }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true + }, "node_modules/har-schema": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", @@ -3829,6 +4940,30 @@ "integrity": "sha512-J+FkSdyD+0mA0N+81tMotaRMfSL9SGi+xpD3T6YApKsc3bGSXJlfXri3VyFOeYkfLRQisDk1W+jIFFKBeUBbBg==", "dev": true }, + "node_modules/human-signals": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz", + "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==", + "dev": true, + "engines": { + "node": ">=16.17.0" + } + }, + "node_modules/husky": { + "version": "9.0.11", + "resolved": "https://registry.npmjs.org/husky/-/husky-9.0.11.tgz", + "integrity": "sha512-AB6lFlbwwyIqMdHYhwPe+kjOC3Oc5P3nThEoW/AaO2BX3vJDjWPFxYLxokUZOo6RNX20He3AaT8sESs9NJcmEw==", + "dev": true, + "bin": { + "husky": "bin.mjs" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/typicode" + } + }, "node_modules/ieee754": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", @@ -3848,6 +4983,42 @@ } ] }, + "node_modules/ignore": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", + "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "peer": true, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/import-fresh/node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "peer": true, + "engines": { + "node": ">=4" + } + }, "node_modules/import-local": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", @@ -4119,6 +5290,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "peer": true, + "engines": { + "node": ">=8" + } + }, "node_modules/is-plain-object": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", @@ -4529,6 +5710,13 @@ "node": ">=4" } }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true, + "peer": true + }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", @@ -4558,6 +5746,13 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true, + "peer": true + }, "node_modules/json-stringify-safe": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", @@ -4615,6 +5810,16 @@ "prebuild-install": "^7.0.1" } }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "peer": true, + "dependencies": { + "json-buffer": "3.0.1" + } + }, "node_modules/kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -4644,6 +5849,20 @@ "ripemd160": "^2.0.2" } }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "peer": true, + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/libsodium": { "version": "0.7.10", "resolved": "https://registry.npmjs.org/libsodium/-/libsodium-0.7.10.tgz", @@ -4657,51 +5876,186 @@ "libsodium": "^0.7.0" } }, - "node_modules/libtap": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/libtap/-/libtap-1.4.0.tgz", - "integrity": "sha512-STLFynswQ2A6W14JkabgGetBNk6INL1REgJ9UeNKw5llXroC2cGLgKTqavv0sl8OLVztLLipVKMcQ7yeUcqpmg==", + "node_modules/libtap": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/libtap/-/libtap-1.4.0.tgz", + "integrity": "sha512-STLFynswQ2A6W14JkabgGetBNk6INL1REgJ9UeNKw5llXroC2cGLgKTqavv0sl8OLVztLLipVKMcQ7yeUcqpmg==", + "dev": true, + "dependencies": { + "async-hook-domain": "^2.0.4", + "bind-obj-methods": "^3.0.0", + "diff": "^4.0.2", + "function-loop": "^2.0.1", + "minipass": "^3.1.5", + "own-or": "^1.0.0", + "own-or-env": "^1.0.2", + "signal-exit": "^3.0.4", + "stack-utils": "^2.0.4", + "tap-parser": "^11.0.0", + "tap-yaml": "^1.0.0", + "tcompare": "^5.0.6", + "trivial-deferred": "^1.0.1" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/libtap/node_modules/minipass": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.4.tgz", + "integrity": "sha512-I9WPbWHCGu8W+6k1ZiGpPu0GkoKBeorkfKNuAFBNS1HNFJvke82sxvI5bzcCNpWPorkOO5QQ+zomzzwRxejXiw==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/libtap/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, + "node_modules/lilconfig": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.0.0.tgz", + "integrity": "sha512-K2U4W2Ff5ibV7j7ydLr+zLAkIg5JJ4lPn1Ltsdt+Tz/IjQ8buJ55pZAxoP34lqIiwtF9iAvtLv3JGv7CAyAg+g==", + "dev": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/lint-staged": { + "version": "15.2.2", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-15.2.2.tgz", + "integrity": "sha512-TiTt93OPh1OZOsb5B7k96A/ATl2AjIZo+vnzFZ6oHK5FuTk63ByDtxGQpHm+kFETjEWqgkF95M8FRXKR/LEBcw==", + "dev": true, + "dependencies": { + "chalk": "5.3.0", + "commander": "11.1.0", + "debug": "4.3.4", + "execa": "8.0.1", + "lilconfig": "3.0.0", + "listr2": "8.0.1", + "micromatch": "4.0.5", + "pidtree": "0.6.0", + "string-argv": "0.3.2", + "yaml": "2.3.4" + }, + "bin": { + "lint-staged": "bin/lint-staged.js" + }, + "engines": { + "node": ">=18.12.0" + }, + "funding": { + "url": "https://opencollective.com/lint-staged" + } + }, + "node_modules/lint-staged/node_modules/chalk": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", + "dev": true, + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/lint-staged/node_modules/commander": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-11.1.0.tgz", + "integrity": "sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==", + "dev": true, + "engines": { + "node": ">=16" + } + }, + "node_modules/lint-staged/node_modules/yaml": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.4.tgz", + "integrity": "sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA==", + "dev": true, + "engines": { + "node": ">= 14" + } + }, + "node_modules/listr2": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/listr2/-/listr2-8.0.1.tgz", + "integrity": "sha512-ovJXBXkKGfq+CwmKTjluEqFi3p4h8xvkxGQQAQan22YCgef4KZ1mKGjzfGh6PL6AW5Csw0QiQPNuQyH+6Xk3hA==", + "dev": true, + "dependencies": { + "cli-truncate": "^4.0.0", + "colorette": "^2.0.20", + "eventemitter3": "^5.0.1", + "log-update": "^6.0.0", + "rfdc": "^1.3.0", + "wrap-ansi": "^9.0.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/listr2/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/listr2/node_modules/emoji-regex": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.3.0.tgz", + "integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==", + "dev": true + }, + "node_modules/listr2/node_modules/string-width": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.1.0.tgz", + "integrity": "sha512-SEIJCWiX7Kg4c129n48aDRwLbFb2LJmXXFrWBG4NGaRtMQ3myKPKbwrD1BKqQn74oCoNMBVrfDEr5M9YxCsrkw==", "dev": true, "dependencies": { - "async-hook-domain": "^2.0.4", - "bind-obj-methods": "^3.0.0", - "diff": "^4.0.2", - "function-loop": "^2.0.1", - "minipass": "^3.1.5", - "own-or": "^1.0.0", - "own-or-env": "^1.0.2", - "signal-exit": "^3.0.4", - "stack-utils": "^2.0.4", - "tap-parser": "^11.0.0", - "tap-yaml": "^1.0.0", - "tcompare": "^5.0.6", - "trivial-deferred": "^1.0.1" + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" }, "engines": { - "node": ">=10" + "node": ">=18" }, "funding": { - "url": "https://github.com/sponsors/isaacs" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/libtap/node_modules/minipass": { - "version": "3.3.4", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.4.tgz", - "integrity": "sha512-I9WPbWHCGu8W+6k1ZiGpPu0GkoKBeorkfKNuAFBNS1HNFJvke82sxvI5bzcCNpWPorkOO5QQ+zomzzwRxejXiw==", + "node_modules/listr2/node_modules/wrap-ansi": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.0.tgz", + "integrity": "sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==", "dev": true, "dependencies": { - "yallist": "^4.0.0" + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" }, "engines": { - "node": ">=8" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/libtap/node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true - }, "node_modules/loader-runner": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", @@ -4740,6 +6094,13 @@ "integrity": "sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==", "dev": true }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true, + "peer": true + }, "node_modules/log-driver": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/log-driver/-/log-driver-1.2.7.tgz", @@ -4749,6 +6110,108 @@ "node": ">=0.8.6" } }, + "node_modules/log-update": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/log-update/-/log-update-6.0.0.tgz", + "integrity": "sha512-niTvB4gqvtof056rRIrTZvjNYE4rCUzO6X/X+kYjd7WFxXeJ0NwEFnRxX6ehkvv3jTwrXnNdtAak5XYZuIyPFw==", + "dev": true, + "dependencies": { + "ansi-escapes": "^6.2.0", + "cli-cursor": "^4.0.0", + "slice-ansi": "^7.0.0", + "strip-ansi": "^7.1.0", + "wrap-ansi": "^9.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-update/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/log-update/node_modules/emoji-regex": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.3.0.tgz", + "integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==", + "dev": true + }, + "node_modules/log-update/node_modules/is-fullwidth-code-point": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-5.0.0.tgz", + "integrity": "sha512-OVa3u9kkBbw7b8Xw5F9P+D/T9X+Z4+JruYVNapTjPYZYUznQ5YfWeFkOj606XYYW8yugTfC8Pj0hYqvi4ryAhA==", + "dev": true, + "dependencies": { + "get-east-asian-width": "^1.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-update/node_modules/slice-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-7.1.0.tgz", + "integrity": "sha512-bSiSngZ/jWeX93BqeIAbImyTbEihizcwNjFoRUIY/T1wWQsfsm2Vw1agPKylXvQTU7iASGdHhyqRlqQzfz+Htg==", + "dev": true, + "dependencies": { + "ansi-styles": "^6.2.1", + "is-fullwidth-code-point": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" + } + }, + "node_modules/log-update/node_modules/string-width": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.1.0.tgz", + "integrity": "sha512-SEIJCWiX7Kg4c129n48aDRwLbFb2LJmXXFrWBG4NGaRtMQ3myKPKbwrD1BKqQn74oCoNMBVrfDEr5M9YxCsrkw==", + "dev": true, + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-update/node_modules/wrap-ansi": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.0.tgz", + "integrity": "sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/long": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", @@ -4808,6 +6271,15 @@ "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", "dev": true }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, "node_modules/micromatch": { "version": "4.0.5", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", @@ -4861,6 +6333,18 @@ "node": ">= 0.6" } }, + "node_modules/mimic-fn": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/mimic-response": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", @@ -4939,6 +6423,12 @@ "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==" }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true + }, "node_modules/neo-async": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", @@ -5058,6 +6548,33 @@ "node": ">=0.10.0" } }, + "node_modules/npm-run-path": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.3.0.tgz", + "integrity": "sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==", + "dev": true, + "dependencies": { + "path-key": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/npm-run-path/node_modules/path-key": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/nyc": { "version": "15.1.0", "resolved": "https://registry.npmjs.org/nyc/-/nyc-15.1.0.tgz", @@ -5252,6 +6769,21 @@ "wrappy": "1" } }, + "node_modules/onetime": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", + "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", + "dev": true, + "dependencies": { + "mimic-fn": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/opener": { "version": "1.5.2", "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.2.tgz", @@ -5261,6 +6793,24 @@ "opener": "bin/opener-bin.js" } }, + "node_modules/optionator": { + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", + "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", + "dev": true, + "peer": true, + "dependencies": { + "@aashutoshrathi/word-wrap": "^1.2.3", + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/os-browserify": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", @@ -5347,6 +6897,19 @@ "resolved": "https://registry.npmjs.org/pako/-/pako-2.0.4.tgz", "integrity": "sha512-v8tweI900AUkZN6heMU/4Uy4cXRc2AYNRggVmTR+dEncawDJgCdLMximOVA2p4qO57WMynangsfGRb5WD6L1Bg==" }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "peer": true, + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/parse-asn1": { "version": "5.1.6", "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.6.tgz", @@ -5423,6 +6986,15 @@ "isarray": "0.0.1" } }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/pbkdf2": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", @@ -5462,6 +7034,18 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/pidtree": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.6.0.tgz", + "integrity": "sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g==", + "dev": true, + "bin": { + "pidtree": "bin/pidtree.js" + }, + "engines": { + "node": ">=0.10" + } + }, "node_modules/pkg-dir": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", @@ -5527,16 +7111,26 @@ "node": ">=10" } }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "peer": true, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/prettier": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", - "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", + "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", "dev": true, "bin": { - "prettier": "bin-prettier.js" + "prettier": "bin/prettier.cjs" }, "engines": { - "node": ">=10.13.0" + "node": ">=14" }, "funding": { "url": "https://github.com/prettier/prettier?sponsor=1" @@ -5675,6 +7269,26 @@ "node": ">=0.4.x" } }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, "node_modules/randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", @@ -5901,9 +7515,71 @@ "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true, "engines": { - "node": ">=8" + "node": ">=8" + } + }, + "node_modules/restore-cursor": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-4.0.0.tgz", + "integrity": "sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg==", + "dev": true, + "dependencies": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/restore-cursor/node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/restore-cursor/node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/restore-cursor/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" } }, + "node_modules/rfdc": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.1.tgz", + "integrity": "sha512-r5a3l5HzYlIC68TpmYKlxWjmOP6wiPJ1vWv2HeLhNsRZMrCkxeqxiHlQ21oXmQ4F3SiryXBHhAD7JZqvOJjFmg==", + "dev": true + }, "node_modules/rimraf": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.1.tgz", @@ -5931,6 +7607,29 @@ "inherits": "^2.0.1" } }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, "node_modules/rxjs": { "version": "6.6.7", "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", @@ -5991,9 +7690,9 @@ } }, "node_modules/semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", "dependencies": { "lru-cache": "^6.0.0" }, @@ -6182,6 +7881,55 @@ "node": ">=0.3.1" } }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/slice-ansi": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz", + "integrity": "sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^6.0.0", + "is-fullwidth-code-point": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" + } + }, + "node_modules/slice-ansi/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/slice-ansi/node_modules/is-fullwidth-code-point": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz", + "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -6365,6 +8113,15 @@ "safe-buffer": "~5.2.0" } }, + "node_modules/string-argv": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.2.tgz", + "integrity": "sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==", + "dev": true, + "engines": { + "node": ">=0.6.19" + } + }, "node_modules/string-width": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", @@ -6498,6 +8255,18 @@ "node": ">=8" } }, + "node_modules/strip-final-newline": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", + "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/strip-json-comments": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", @@ -7036,8 +8805,6 @@ }, "node_modules/tap/node_modules/@babel/plugin-syntax-object-rest-spread": { "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", - "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", "dev": true, "inBundle": true, "license": "MIT", @@ -7146,8 +8913,6 @@ }, "node_modules/tap/node_modules/@isaacs/import-jsx": { "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@isaacs/import-jsx/-/import-jsx-4.0.1.tgz", - "integrity": "sha512-l34FEsEqpdYdGcQjRCxWy+7rHY6euUbOBz9FI+Mq6oQeVhNegHcXFSJxVxrJvOpO31NbnDjS74quKXDlPDearA==", "dev": true, "inBundle": true, "license": "MIT", @@ -7168,8 +8933,6 @@ }, "node_modules/tap/node_modules/@isaacs/import-jsx/node_modules/caller-callsite": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/caller-callsite/-/caller-callsite-4.1.0.tgz", - "integrity": "sha512-99nnnGlJexTc41xwQTr+mWl15OI5PPczUJzM4YRE7QjkefMKCXGa5gfQjCOuVrD+1TjI/fevIDHg2nz3iYN5Ig==", "dev": true, "inBundle": true, "license": "MIT", @@ -7194,8 +8957,6 @@ }, "node_modules/tap/node_modules/@isaacs/import-jsx/node_modules/callsites": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true, "inBundle": true, "license": "MIT", @@ -7222,24 +8983,18 @@ }, "node_modules/tap/node_modules/@types/scheduler": { "version": "0.16.2", - "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz", - "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==", "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/tap/node_modules/@types/yoga-layout": { "version": "1.9.2", - "resolved": "https://registry.npmjs.org/@types/yoga-layout/-/yoga-layout-1.9.2.tgz", - "integrity": "sha512-S9q47ByT2pPvD65IvrWp7qppVMpk9WGMbVq9wbWZOHg6tnXSD4vyhao6nOSBwwfDdV2p3Kx9evA9vI+XWTfDvw==", "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/tap/node_modules/ansi-escapes": { "version": "4.3.2", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", - "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", "dev": true, "inBundle": true, "license": "MIT", @@ -7267,8 +9022,6 @@ }, "node_modules/tap/node_modules/ansi-regex": { "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, "inBundle": true, "license": "MIT", @@ -7278,8 +9031,6 @@ }, "node_modules/tap/node_modules/ansi-styles": { "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "inBundle": true, "license": "MIT", @@ -7292,16 +9043,12 @@ }, "node_modules/tap/node_modules/ansicolors": { "version": "0.3.2", - "resolved": "https://registry.npmjs.org/ansicolors/-/ansicolors-0.3.2.tgz", - "integrity": "sha512-QXu7BPrP29VllRxH8GwB7x5iX5qWKAAMLqKQGWTeLWVlNHNOpVMJ91dsxQAIWXpjuW5wqvxu3Jd/nRjrJ+0pqg==", "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/tap/node_modules/astral-regex": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", - "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", "dev": true, "inBundle": true, "license": "MIT", @@ -7311,8 +9058,6 @@ }, "node_modules/tap/node_modules/auto-bind": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/auto-bind/-/auto-bind-4.0.0.tgz", - "integrity": "sha512-Hdw8qdNiqdJ8LqT0iK0sVzkFbzg6fhnQqqfWhBDxcHZvU75+B+ayzTy8x+k5Ix0Y92XOhOUlx74ps+bA6BeYMQ==", "dev": true, "inBundle": true, "license": "MIT", @@ -7325,16 +9070,12 @@ }, "node_modules/tap/node_modules/balanced-match": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/tap/node_modules/brace-expansion": { "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "inBundle": true, "license": "MIT", @@ -7378,8 +9119,6 @@ }, "node_modules/tap/node_modules/cardinal": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/cardinal/-/cardinal-2.1.1.tgz", - "integrity": "sha512-JSr5eOgoEymtYHBjNWyjrMqet9Am2miJhlfKNdqLp6zoeAh0KN5dRAcxlecj5mAJrmQomgiOBj35xHLrFjqBpw==", "dev": true, "inBundle": true, "license": "MIT", @@ -7393,8 +9132,6 @@ }, "node_modules/tap/node_modules/chalk": { "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, "inBundle": true, "license": "MIT", @@ -7409,16 +9146,12 @@ }, "node_modules/tap/node_modules/ci-info": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", - "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/tap/node_modules/cli-boxes": { "version": "2.2.1", - "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.1.tgz", - "integrity": "sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==", "dev": true, "inBundle": true, "license": "MIT", @@ -7431,8 +9164,6 @@ }, "node_modules/tap/node_modules/cli-cursor": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", - "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", "dev": true, "inBundle": true, "license": "MIT", @@ -7445,8 +9176,6 @@ }, "node_modules/tap/node_modules/cli-truncate": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-2.1.0.tgz", - "integrity": "sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==", "dev": true, "inBundle": true, "license": "MIT", @@ -7524,8 +9253,6 @@ }, "node_modules/tap/node_modules/code-excerpt": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/code-excerpt/-/code-excerpt-3.0.0.tgz", - "integrity": "sha512-VHNTVhd7KsLGOqfX3SyeO8RyYPMp1GJOg194VITk04WMYCv4plV68YWe6TJZxd9MhobjtpMRnVky01gqZsalaw==", "dev": true, "inBundle": true, "license": "MIT", @@ -7538,8 +9265,6 @@ }, "node_modules/tap/node_modules/color-convert": { "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "dev": true, "inBundle": true, "license": "MIT", @@ -7549,32 +9274,24 @@ }, "node_modules/tap/node_modules/color-name": { "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/tap/node_modules/commondir": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/tap/node_modules/concat-map": { "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/tap/node_modules/convert-source-map": { "version": "1.8.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", - "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", "dev": true, "inBundle": true, "license": "MIT", @@ -7584,8 +9301,6 @@ }, "node_modules/tap/node_modules/convert-to-spaces": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/convert-to-spaces/-/convert-to-spaces-1.0.2.tgz", - "integrity": "sha512-cj09EBuObp9gZNQCzc7hByQyrs6jVGE+o9kSJmeUoj+GiPiJvi5LYqEH/Hmme4+MTLHM+Ejtq+FChpjjEnsPdQ==", "dev": true, "inBundle": true, "license": "MIT", @@ -7624,16 +9339,12 @@ }, "node_modules/tap/node_modules/emoji-regex": { "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/tap/node_modules/escalade": { "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", "dev": true, "inBundle": true, "license": "MIT", @@ -7643,8 +9354,6 @@ }, "node_modules/tap/node_modules/escape-string-regexp": { "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", "dev": true, "inBundle": true, "license": "MIT", @@ -7654,8 +9363,6 @@ }, "node_modules/tap/node_modules/esprima": { "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true, "inBundle": true, "license": "BSD-2-Clause", @@ -7669,16 +9376,12 @@ }, "node_modules/tap/node_modules/events-to-array": { "version": "1.1.2", - "resolved": "https://registry.npmjs.org/events-to-array/-/events-to-array-1.1.2.tgz", - "integrity": "sha512-inRWzRY7nG+aXZxBzEqYKB3HPgwflZRopAjDCHv0whhRx+MTUr1ei0ICZUypdyE0HRm4L2d5VEcIqLD6yl+BFA==", "dev": true, "inBundle": true, "license": "ISC" }, "node_modules/tap/node_modules/find-cache-dir": { "version": "3.3.2", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", - "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", "dev": true, "inBundle": true, "license": "MIT", @@ -7696,8 +9399,6 @@ }, "node_modules/tap/node_modules/find-up": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, "inBundle": true, "license": "MIT", @@ -7724,16 +9425,12 @@ }, "node_modules/tap/node_modules/fs.realpath": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", "dev": true, "inBundle": true, "license": "ISC" }, "node_modules/tap/node_modules/gensync": { "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", "dev": true, "inBundle": true, "license": "MIT", @@ -7763,8 +9460,6 @@ }, "node_modules/tap/node_modules/globals": { "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", "dev": true, "inBundle": true, "license": "MIT", @@ -7774,8 +9469,6 @@ }, "node_modules/tap/node_modules/has-flag": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", "dev": true, "inBundle": true, "license": "MIT", @@ -7785,8 +9478,6 @@ }, "node_modules/tap/node_modules/indent-string": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", - "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", "dev": true, "inBundle": true, "license": "MIT", @@ -7796,8 +9487,6 @@ }, "node_modules/tap/node_modules/inflight": { "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", "dev": true, "inBundle": true, "license": "ISC", @@ -7808,16 +9497,12 @@ }, "node_modules/tap/node_modules/inherits": { "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true, "inBundle": true, "license": "ISC" }, "node_modules/tap/node_modules/ink": { "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ink/-/ink-3.2.0.tgz", - "integrity": "sha512-firNp1q3xxTzoItj/eOOSZQnYSlyrWks5llCTVX37nJ59K3eXbQ8PtzCguqo8YI19EELo5QxaKnJd4VxzhU8tg==", "dev": true, "inBundle": true, "license": "MIT", @@ -7861,8 +9546,6 @@ }, "node_modules/tap/node_modules/ink/node_modules/ansi-styles": { "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "inBundle": true, "license": "MIT", @@ -7894,8 +9577,6 @@ }, "node_modules/tap/node_modules/ink/node_modules/color-convert": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "inBundle": true, "license": "MIT", @@ -7908,16 +9589,12 @@ }, "node_modules/tap/node_modules/ink/node_modules/color-name": { "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/tap/node_modules/ink/node_modules/has-flag": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, "inBundle": true, "license": "MIT", @@ -7927,8 +9604,6 @@ }, "node_modules/tap/node_modules/ink/node_modules/supports-color": { "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "inBundle": true, "license": "MIT", @@ -7941,8 +9616,6 @@ }, "node_modules/tap/node_modules/is-ci": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", - "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", "dev": true, "inBundle": true, "license": "MIT", @@ -7955,8 +9628,6 @@ }, "node_modules/tap/node_modules/is-fullwidth-code-point": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, "inBundle": true, "license": "MIT", @@ -7978,16 +9649,12 @@ }, "node_modules/tap/node_modules/js-tokens": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/tap/node_modules/jsesc": { "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", "dev": true, "inBundle": true, "license": "MIT", @@ -8015,8 +9682,6 @@ }, "node_modules/tap/node_modules/locate-path": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, "inBundle": true, "license": "MIT", @@ -8029,16 +9694,12 @@ }, "node_modules/tap/node_modules/lodash": { "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/tap/node_modules/loose-envify": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", "dev": true, "inBundle": true, "license": "MIT", @@ -8051,8 +9712,6 @@ }, "node_modules/tap/node_modules/make-dir": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", "dev": true, "inBundle": true, "license": "MIT", @@ -8068,8 +9727,6 @@ }, "node_modules/tap/node_modules/mimic-fn": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", "dev": true, "inBundle": true, "license": "MIT", @@ -8109,8 +9766,6 @@ }, "node_modules/tap/node_modules/ms": { "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true, "inBundle": true, "license": "MIT" @@ -8123,8 +9778,6 @@ }, "node_modules/tap/node_modules/object-assign": { "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", "dev": true, "inBundle": true, "license": "MIT", @@ -8134,8 +9787,6 @@ }, "node_modules/tap/node_modules/once": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dev": true, "inBundle": true, "license": "ISC", @@ -8145,8 +9796,6 @@ }, "node_modules/tap/node_modules/onetime": { "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", "dev": true, "inBundle": true, "license": "MIT", @@ -8162,8 +9811,6 @@ }, "node_modules/tap/node_modules/p-limit": { "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, "inBundle": true, "license": "MIT", @@ -8179,8 +9826,6 @@ }, "node_modules/tap/node_modules/p-locate": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, "inBundle": true, "license": "MIT", @@ -8193,8 +9838,6 @@ }, "node_modules/tap/node_modules/p-try": { "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true, "inBundle": true, "license": "MIT", @@ -8204,8 +9847,6 @@ }, "node_modules/tap/node_modules/patch-console": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/patch-console/-/patch-console-1.0.0.tgz", - "integrity": "sha512-nxl9nrnLQmh64iTzMfyylSlRozL7kAXIaxw1fVcLYdyhNkJCRUzirRZTikXGJsg+hc4fqpneTK6iU2H1Q8THSA==", "dev": true, "inBundle": true, "license": "MIT", @@ -8215,8 +9856,6 @@ }, "node_modules/tap/node_modules/path-exists": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true, "inBundle": true, "license": "MIT", @@ -8226,8 +9865,6 @@ }, "node_modules/tap/node_modules/path-is-absolute": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", "dev": true, "inBundle": true, "license": "MIT", @@ -8237,16 +9874,12 @@ }, "node_modules/tap/node_modules/picocolors": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", "dev": true, "inBundle": true, "license": "ISC" }, "node_modules/tap/node_modules/pkg-dir": { "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", "dev": true, "inBundle": true, "license": "MIT", @@ -8259,8 +9892,6 @@ }, "node_modules/tap/node_modules/punycode": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true, "inBundle": true, "license": "MIT", @@ -8270,8 +9901,6 @@ }, "node_modules/tap/node_modules/react": { "version": "17.0.2", - "resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz", - "integrity": "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==", "dev": true, "inBundle": true, "license": "MIT", @@ -8295,8 +9924,6 @@ }, "node_modules/tap/node_modules/react-reconciler": { "version": "0.26.2", - "resolved": "https://registry.npmjs.org/react-reconciler/-/react-reconciler-0.26.2.tgz", - "integrity": "sha512-nK6kgY28HwrMNwDnMui3dvm3rCFjZrcGiuwLc5COUipBK5hWHLOxMJhSnSomirqWwjPBJKV1QcbkI0VJr7Gl1Q==", "dev": true, "inBundle": true, "license": "MIT", @@ -8314,8 +9941,6 @@ }, "node_modules/tap/node_modules/redeyed": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/redeyed/-/redeyed-2.1.1.tgz", - "integrity": "sha512-FNpGGo1DycYAdnrKFxCMmKYgo/mILAqtRYbkdQD8Ep/Hk2PQ5+aEAEx+IU713RTDmuBaH0c8P5ZozurNu5ObRQ==", "dev": true, "inBundle": true, "license": "MIT", @@ -8325,8 +9950,6 @@ }, "node_modules/tap/node_modules/resolve-from": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", - "integrity": "sha512-GnlH6vxLymXJNMBo7XP1fJIzBFbdYt49CuTwmB/6N53t+kMPRMFKz783LlQ4tv28XoQfMWinAJX6WCGf2IlaIw==", "dev": true, "inBundle": true, "license": "MIT", @@ -8336,8 +9959,6 @@ }, "node_modules/tap/node_modules/restore-cursor": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", - "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", "dev": true, "inBundle": true, "license": "MIT", @@ -8351,8 +9972,6 @@ }, "node_modules/tap/node_modules/rimraf": { "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "dev": true, "inBundle": true, "license": "ISC", @@ -8368,16 +9987,12 @@ }, "node_modules/tap/node_modules/safe-buffer": { "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/tap/node_modules/scheduler": { "version": "0.20.2", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.20.2.tgz", - "integrity": "sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==", "dev": true, "inBundle": true, "license": "MIT", @@ -8388,8 +10003,6 @@ }, "node_modules/tap/node_modules/semver": { "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true, "inBundle": true, "license": "ISC", @@ -8399,8 +10012,6 @@ }, "node_modules/tap/node_modules/shell-quote": { "version": "1.7.3", - "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.3.tgz", - "integrity": "sha512-Vpfqwm4EnqGdlsBFNmHhxhElJYrdfcxPThu+ryKS5J8L/fhAwLazFZtq+S+TWZ9ANj2piSQLGj6NQg+lKPmxrw==", "dev": true, "inBundle": true, "license": "MIT" @@ -8413,8 +10024,6 @@ }, "node_modules/tap/node_modules/slice-ansi": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-3.0.0.tgz", - "integrity": "sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==", "dev": true, "inBundle": true, "license": "MIT", @@ -8444,8 +10053,6 @@ }, "node_modules/tap/node_modules/slice-ansi/node_modules/color-convert": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "inBundle": true, "license": "MIT", @@ -8458,8 +10065,6 @@ }, "node_modules/tap/node_modules/slice-ansi/node_modules/color-name": { "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true, "inBundle": true, "license": "MIT" @@ -8475,8 +10080,6 @@ }, "node_modules/tap/node_modules/stack-utils": { "version": "2.0.5", - "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.5.tgz", - "integrity": "sha512-xrQcmYhOsn/1kX+Vraq+7j4oE2j/6BFscZ0etmYg81xuM8Gq0022Pxb8+IqgOFUIaxHs0KaSb7T1+OegiNrNFA==", "dev": true, "inBundle": true, "license": "MIT", @@ -8498,8 +10101,6 @@ }, "node_modules/tap/node_modules/string-width": { "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, "inBundle": true, "license": "MIT", @@ -8514,8 +10115,6 @@ }, "node_modules/tap/node_modules/strip-ansi": { "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "inBundle": true, "license": "MIT", @@ -8528,8 +10127,6 @@ }, "node_modules/tap/node_modules/supports-color": { "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, "inBundle": true, "license": "MIT", @@ -8542,8 +10139,6 @@ }, "node_modules/tap/node_modules/tap-parser": { "version": "11.0.1", - "resolved": "https://registry.npmjs.org/tap-parser/-/tap-parser-11.0.1.tgz", - "integrity": "sha512-5ow0oyFOnXVSALYdidMX94u0GEjIlgc/BPFYLx0yRh9hb8+cFGNJqJzDJlUqbLOwx8+NBrIbxCWkIQi7555c0w==", "dev": true, "inBundle": true, "license": "MIT", @@ -8561,8 +10156,6 @@ }, "node_modules/tap/node_modules/tap-yaml": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/tap-yaml/-/tap-yaml-1.0.0.tgz", - "integrity": "sha512-Rxbx4EnrWkYk0/ztcm5u3/VznbyFJpyXO12dDBHKWiDVxy7O2Qw6MRrwO5H6Ww0U5YhRY/4C/VzWmFPhBQc4qQ==", "dev": true, "inBundle": true, "license": "ISC", @@ -8572,8 +10165,6 @@ }, "node_modules/tap/node_modules/to-fast-properties": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", "dev": true, "inBundle": true, "license": "MIT", @@ -8601,8 +10192,6 @@ }, "node_modules/tap/node_modules/treport/node_modules/ansi-styles": { "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "inBundle": true, "license": "MIT", @@ -8631,8 +10220,6 @@ }, "node_modules/tap/node_modules/treport/node_modules/color-convert": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "inBundle": true, "license": "MIT", @@ -8645,16 +10232,12 @@ }, "node_modules/tap/node_modules/treport/node_modules/color-name": { "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/tap/node_modules/treport/node_modules/has-flag": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, "inBundle": true, "license": "MIT", @@ -8664,8 +10247,6 @@ }, "node_modules/tap/node_modules/treport/node_modules/supports-color": { "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "inBundle": true, "license": "MIT", @@ -8678,8 +10259,6 @@ }, "node_modules/tap/node_modules/type-fest": { "version": "0.12.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.12.0.tgz", - "integrity": "sha512-53RyidyjvkGpnWPMF9bQgFtWp+Sl8O2Rp13VavmJgfAP9WWG6q6TkrKU8iyJdnwnfgHI6k2hTlgqH4aSdjoTbg==", "dev": true, "inBundle": true, "license": "(MIT OR CC0-1.0)", @@ -8692,8 +10271,6 @@ }, "node_modules/tap/node_modules/unicode-length": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/unicode-length/-/unicode-length-2.0.2.tgz", - "integrity": "sha512-Ph/j1VbS3/r77nhoY2WU0GWGjVYOHL3xpKp0y/Eq2e5r0mT/6b649vm7KFO6RdAdrZkYLdxphYVgvODxPB+Ebg==", "dev": true, "inBundle": true, "license": "MIT", @@ -8704,8 +10281,6 @@ }, "node_modules/tap/node_modules/unicode-length/node_modules/ansi-regex": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", "dev": true, "inBundle": true, "license": "MIT", @@ -8727,8 +10302,6 @@ }, "node_modules/tap/node_modules/widest-line": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", - "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", "dev": true, "inBundle": true, "license": "MIT", @@ -8741,8 +10314,6 @@ }, "node_modules/tap/node_modules/wrap-ansi": { "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", "dev": true, "inBundle": true, "license": "MIT", @@ -8772,8 +10343,6 @@ }, "node_modules/tap/node_modules/wrap-ansi/node_modules/color-convert": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "inBundle": true, "license": "MIT", @@ -8786,16 +10355,12 @@ }, "node_modules/tap/node_modules/wrap-ansi/node_modules/color-name": { "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/tap/node_modules/wrappy": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "dev": true, "inBundle": true, "license": "ISC" @@ -8823,16 +10388,12 @@ }, "node_modules/tap/node_modules/yallist": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true, "inBundle": true, "license": "ISC" }, "node_modules/tap/node_modules/yaml": { "version": "1.10.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", - "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", "dev": true, "inBundle": true, "license": "ISC", @@ -8842,8 +10403,6 @@ }, "node_modules/tap/node_modules/yoga-layout-prebuilt": { "version": "1.10.0", - "resolved": "https://registry.npmjs.org/yoga-layout-prebuilt/-/yoga-layout-prebuilt-1.10.0.tgz", - "integrity": "sha512-YnOmtSbv4MTf7RGJMK0FvZ+KD8OEe/J5BNnR0GHhD8J/XcG/Qvxgszm0Un6FTHWW4uHlTgP0IztiXQnGyIR45g==", "dev": true, "inBundle": true, "license": "MIT", @@ -9009,6 +10568,13 @@ "node": "*" } }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true, + "peer": true + }, "node_modules/timers-browserify": { "version": "2.0.12", "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.12.tgz", @@ -9066,6 +10632,18 @@ "integrity": "sha512-dagAKX7vaesNNAwOc9Np9C2mJ+7YopF4lk+jE2JML9ta4kZ91Y6UruJNH65bLRYoUROD8EY+Pmi44qQWwXR7sw==", "dev": true }, + "node_modules/ts-api-utils": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz", + "integrity": "sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==", + "dev": true, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "typescript": ">=4.2.0" + } + }, "node_modules/ts-loader": { "version": "9.3.1", "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.3.1.tgz", @@ -9138,6 +10716,21 @@ "prettier": "^2.5.1" } }, + "node_modules/ts-poet/node_modules/prettier": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "dev": true, + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, "node_modules/ts-proto": { "version": "1.117.0", "resolved": "https://registry.npmjs.org/ts-proto/-/ts-proto-1.117.0.tgz", @@ -9193,6 +10786,19 @@ "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", "dev": true }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "peer": true, + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/type-detect": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", @@ -9843,6 +11449,19 @@ "engines": { "node": ">=6" } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "peer": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } } } } diff --git a/package.json b/package.json index d49aecf..8d08fd8 100644 --- a/package.json +++ b/package.json @@ -5,24 +5,40 @@ "repository": { "url": "https://github.com/ovrclk/akashjs" }, + "license": "Apache-2.0", + "author": "", "main": "build/index.js", - "types": "build/", - "engines": { - "node": ">18.0.0" + "browser": { + "fs": false, + "os": false, + "path": false }, + "types": "build/", + "files": [ + "umd/", + "build/**/*.d.ts", + "build/**/*.js" + ], "scripts": { "build": "rimraf build && npm run build:tsc && npm run build:build", + "build:build": "webpack", "build:production": "NODE_ENV=production npm run build:tsc && npm run build:build", "build:tsc": "rimraf build && tsc", "dev:watch": "tsc -- --watch", - "build:build": "webpack", + "format": "prettier --write './**/*.{js,ts,json}' --config ./.prettierrc", + "lint": "eslint . --ext .js,.ts,.json", + "lint:fix": "npm run lint -- --fix", + "prepare": "husky", + "prepublishOnly": "npm run build:production", "test": "npm run test:unit", "test:unit": "tap --ts tests/test_*.ts", - "test:unit-snapshot": "tap --ts --snapshot tests/test_*.ts", - "prepublishOnly": "npm run build:production" + "test:unit-snapshot": "tap --ts --snapshot tests/test_*.ts" + }, + "lint-staged": { + "*.{js,ts}": [ + "npm run format" + ] }, - "author": "", - "license": "Apache-2.0", "dependencies": { "@cosmjs/launchpad": "^0.27.0", "@cosmjs/proto-signing": "^0.28.11", @@ -49,7 +65,11 @@ "@types/node-fetch": "2", "@types/sinon": "^10.0.11", "@types/tap": "^15.0.5", + "@typescript-eslint/eslint-plugin": "^7.2.0", + "husky": "^9.0.11", + "lint-staged": "^15.2.2", "node-polyfill-webpack-plugin": "^1.1.4", + "prettier": "^3.2.5", "rimraf": "^5.0.1", "sinon": "^13.0.1", "tap": "^15.1.6", @@ -60,14 +80,7 @@ "webpack": "^5.41.1", "webpack-cli": "^4.7.2" }, - "browser": { - "fs": false, - "os": false, - "path": false - }, - "files": [ - "umd/", - "build/**/*.d.ts", - "build/**/*.js" - ] + "engines": { + "node": ">18.0.0" + } } diff --git a/src/certificates/generate509.ts b/src/certificates/generate509.ts index 7e6e26d..0e2eac3 100644 --- a/src/certificates/generate509.ts +++ b/src/certificates/generate509.ts @@ -1,3 +1,7 @@ +import { arrayBufferToString, toBase64 } from "pvutils"; + +import asn1js from "asn1js"; + global.crypto = require("node:crypto"); const { @@ -7,19 +11,16 @@ const { Certificate, BasicConstraints, Extension, - ExtKeyUsage, + ExtKeyUsage + // eslint-disable-next-line @typescript-eslint/no-var-requires } = require("pkijs/build"); - -const { arrayBufferToString, toBase64 } = require("pvutils"); -const asn1js = require("asn1js"); - const HASH_ALG = "SHA-256"; const SIGN_ALG = "ECDSA"; export interface pems { - csr?: string; - publicKey?: string; - privateKey?: string; + csr: string; + publicKey: string; + privateKey: string; } export async function create(address: string) { @@ -31,7 +32,7 @@ export async function create(address: string) { const keyPair = await crypto.generateKey(algo.algorithm, true, algo.usages); const cert = await createCSR(keyPair, HASH_ALG, { - commonName: address, + commonName: address }); setValidityPeriod(cert, new Date(), 365); // Good from today for 365 days @@ -41,21 +42,15 @@ export async function create(address: string) { const pkcs8 = await crypto.exportKey("pkcs8", keyPair.privateKey); const pems = { - csr: `-----BEGIN CERTIFICATE-----\n${formatPEM( - toBase64(arrayBufferToString(certBER)) - )}\n-----END CERTIFICATE-----`, - privateKey: `-----BEGIN PRIVATE KEY-----\n${formatPEM( - toBase64(arrayBufferToString(pkcs8)) - )}\n-----END PRIVATE KEY-----`, - publicKey: `-----BEGIN EC PUBLIC KEY-----\n${formatPEM( - toBase64(arrayBufferToString(spki)) - )}\n-----END EC PUBLIC KEY-----`, + csr: `-----BEGIN CERTIFICATE-----\n${formatPEM(toBase64(arrayBufferToString(certBER)))}\n-----END CERTIFICATE-----`, + privateKey: `-----BEGIN PRIVATE KEY-----\n${formatPEM(toBase64(arrayBufferToString(pkcs8)))}\n-----END PRIVATE KEY-----`, + publicKey: `-----BEGIN EC PUBLIC KEY-----\n${formatPEM(toBase64(arrayBufferToString(spki)))}\n-----END EC PUBLIC KEY-----` }; return pems; } -async function createCSR(keyPair: any, hashAlg: any, { commonName }: any) { +async function createCSR(keyPair: { privateKey: string; publicKey: string }, hashAlg: string, { commonName }: { commonName: string }) { const cert = new Certificate(); cert.version = 2; @@ -65,8 +60,8 @@ async function createCSR(keyPair: any, hashAlg: any, { commonName }: any) { new AttributeTypeAndValue({ type: "2.5.4.3", // Common name value: new asn1js.PrintableString({ - value: commonName, - }), + value: commonName + }) }) ); @@ -74,8 +69,8 @@ async function createCSR(keyPair: any, hashAlg: any, { commonName }: any) { new AttributeTypeAndValue({ type: "2.5.4.3", // Common name value: new asn1js.PrintableString({ - value: commonName, - }), + value: commonName + }) }) ); @@ -96,7 +91,7 @@ async function createCSR(keyPair: any, hashAlg: any, { commonName }: any) { extnID: "2.5.29.15", critical: true, extnValue: keyUsage.toBER(false), - parsedValue: keyUsage, // Parsed value for well-known extensions + parsedValue: keyUsage // Parsed value for well-known extensions }) ); //endregion @@ -104,22 +99,22 @@ async function createCSR(keyPair: any, hashAlg: any, { commonName }: any) { //region Extended Key Usage const extKeyUsage = new ExtKeyUsage({ keyPurposes: [ - "1.3.6.1.5.5.7.3.2", // id-kp-clientAuth - ], + "1.3.6.1.5.5.7.3.2" // id-kp-clientAuth + ] }); cert.extensions.push( new Extension({ extnID: "2.5.29.37", extnValue: extKeyUsage.toSchema().toBER(false), - parsedValue: extKeyUsage, // Parsed value for well-known extensions + parsedValue: extKeyUsage // Parsed value for well-known extensions }) ); //endregion //region "BasicConstraints" extension const basicConstr = new BasicConstraints({ - cA: false, + cA: false }); cert.extensions.push( @@ -127,7 +122,7 @@ async function createCSR(keyPair: any, hashAlg: any, { commonName }: any) { extnID: "2.5.29.19", critical: true, extnValue: basicConstr.toSchema().toBER(false), - parsedValue: basicConstr, // Parsed value for well-known extensions + parsedValue: basicConstr // Parsed value for well-known extensions }) ); //endregion @@ -138,17 +133,17 @@ async function createCSR(keyPair: any, hashAlg: any, { commonName }: any) { } // add line break every 64th character -function formatPEM(pemString: any) { +function formatPEM(pemString: string) { return pemString.replace(/(.{64})/g, "$1\n"); } -function setValidityPeriod(cert: any, startDate: any, durationInDays: any) { +function setValidityPeriod(cert: { notBefore: { value: Date }; notAfter: { value: Date } }, startDate: Date, durationInDays: number) { // Normalize to midnight - var start = new Date(startDate); + const start = new Date(startDate); start.setHours(0); start.setMinutes(0); start.setSeconds(0); - var end = new Date(start.getTime() + durationInDays * 24 * 60 * 60 * 1000); + const end = new Date(start.getTime() + durationInDays * 24 * 60 * 60 * 1000); cert.notBefore.value = start; cert.notAfter.value = end; diff --git a/src/certificates/index.ts b/src/certificates/index.ts index 6194a06..5751139 100644 --- a/src/certificates/index.ts +++ b/src/certificates/index.ts @@ -3,31 +3,24 @@ import { SigningStargateClient } from "@cosmjs/stargate"; import { messages as stargateMessages } from "../stargate"; import { createStarGateMessage } from "../pbclient"; -import { - QueryCertificatesRequest, - QueryCertificatesResponse, -} from "../protobuf/akash/cert/v1beta3/query" +import { QueryCertificatesRequest, QueryCertificatesResponse } from "../protobuf/akash/cert/v1beta3/query"; import { CertificateFilter } from "../protobuf/akash/cert/v1beta1/cert"; const JsonRPC = require("simple-jsonrpc-js"); -const { toBase64 } = require("pvutils"); -const jrpc = JsonRPC.connect_xhr( - "https://bridge.testnet.akash.network/akashnetwork" -); + +import { toBase64 } from "pvutils"; + +const jrpc = JsonRPC.connect_xhr("https://bridge.testnet.akash.network/akashnetwork"); export type { pems }; -export async function broadcastCertificate( - { csr, publicKey }: pems, - owner: string, - client: SigningStargateClient -) { +export async function broadcastCertificate({ csr, publicKey }: pems, owner: string, client: SigningStargateClient) { const encodedCsr = base64ToUInt(toBase64(csr)); const encdodedPublicKey = base64ToUInt(toBase64(publicKey)); const message = createStarGateMessage(stargateMessages.MsgCreateCertificate, { owner: owner, cert: encodedCsr, - pubkey: encdodedPublicKey, + pubkey: encdodedPublicKey }); return await client.signAndBroadcast(owner, [message.message], message.fee); @@ -38,16 +31,12 @@ export async function createCertificate(bech32Address: string) { return certificate; } -export async function revokeCertificate( - owner: string, - serial: string, - client: SigningStargateClient -) { +export async function revokeCertificate(owner: string, serial: string, client: SigningStargateClient) { const message = createStarGateMessage(stargateMessages.MsgRevokeCertificate, { id: { owner: owner, - serial, - }, + serial + } }); return await client.signAndBroadcast(owner, [message.message], message.fee); @@ -56,7 +45,7 @@ export async function revokeCertificate( export async function queryCertificates(filter: CertificateFilter) { const txBodyBytes = QueryCertificatesRequest.encode( QueryCertificatesRequest.fromJSON({ - filter, + filter }) ).finish(); @@ -67,7 +56,7 @@ export async function queryCertificates(filter: CertificateFilter) { height: "0", path: "/akash.cert.v1beta1.Query/Certificates", prove: false, - data: bufferToHex(txBodyBytes), + data: bufferToHex(txBodyBytes) }) ).response.value ) @@ -76,10 +65,10 @@ export async function queryCertificates(filter: CertificateFilter) { function base64ToUInt(base64: string) { if (typeof window !== "undefined") { - var binary_string = window.atob(base64); - var len = binary_string.length; - var bytes = new Uint8Array(len); - for (var i = 0; i < len; i++) { + const binary_string = window.atob(base64); + const len = binary_string.length; + const bytes = new Uint8Array(len); + for (let i = 0; i < len; i++) { bytes[i] = binary_string.charCodeAt(i); } return bytes; @@ -88,8 +77,6 @@ function base64ToUInt(base64: string) { return Buffer.from(base64, "base64"); } -function bufferToHex(buffer: any) { - return [...new Uint8Array(buffer)] - .map((b) => b.toString(16).padStart(2, "0")) - .join(""); +function bufferToHex(buffer: Uint8Array) { + return [...new Uint8Array(buffer)].map(b => b.toString(16).padStart(2, "0")).join(""); } diff --git a/src/index.ts b/src/index.ts index 90b2e26..978a0f6 100644 --- a/src/index.ts +++ b/src/index.ts @@ -3,7 +3,7 @@ export * as stargate from "./stargate"; export * as keplr from "./keplr"; export * as wallet from "./wallet"; export * as network from "./network"; -export * as rpc from './rpc'; +export * as rpc from "./rpc"; export * as protoclient from "./pbclient"; -export * as sdl from "./sdl"; \ No newline at end of file +export * as sdl from "./sdl"; diff --git a/src/keplr/index.ts b/src/keplr/index.ts index 69d1004..f598e2d 100644 --- a/src/keplr/index.ts +++ b/src/keplr/index.ts @@ -9,9 +9,9 @@ export function getChains() { mainnet: { id: "akashnet-2", name: "Akash Mainnet", - messagePath: "v1beta2", + messagePath: "v1beta2" }, - testnet: { id: "testnet-1", name: "Akash Testnet", messagePath: "v1beta2" }, + testnet: { id: "testnet-1", name: "Akash Testnet", messagePath: "v1beta2" } }; } @@ -28,37 +28,32 @@ export async function get(chain: any, signer: any, endPoint: string) { Certificate.fromPartial({ owner, cert, - pubkey, + pubkey } as any) ).finish(); - var encoded = Buffer.from(buf); + const encoded = Buffer.from(buf); return encoded.toString("base64"); }, fromAmino: ({ owner, cert, pubkey }: any) => { return Certificate.fromPartial({ owner, cert, - pubkey, + pubkey } as any); - }, - }, + } + } } as any); - const myRegistry = new Registry([ - ...defaultRegistryTypes, - ...getAkashTypeRegistry(), - ]); + const myRegistry = new Registry([...defaultRegistryTypes, ...getAkashTypeRegistry()]); return await SigningStargateClient.connectWithSigner(endPoint, signer, { bip44: { - coinType: "118", + coinType: "118" }, registry: myRegistry, - aminoTypes: customAminoTypes, + aminoTypes: customAminoTypes } as any); } function bufferToHex(buffer: any) { - return [...new Uint8Array(buffer)] - .map((b) => b.toString(16).padStart(2, "0")) - .join(""); + return [...new Uint8Array(buffer)].map(b => b.toString(16).padStart(2, "0")).join(""); } diff --git a/src/network/index.ts b/src/network/index.ts index ee0db79..0011b14 100644 --- a/src/network/index.ts +++ b/src/network/index.ts @@ -1,93 +1,83 @@ -import fetch from 'node-fetch'; -import { performance } from 'perf_hooks'; -import { awaitAll, filter, map, prop, sortBy } from '../util'; +import fetch from "node-fetch"; +import { performance } from "perf_hooks"; +import { awaitAll, filter, map, prop, sortBy } from "../util"; -type NETWORK_TYPE = - "mainnet" | - "testnet" | - "edgenet"; +type NETWORK_TYPE = "mainnet" | "testnet" | "edgenet"; -type ENDPOINT_TYPE = - "rpc" | - "rest"; +type ENDPOINT_TYPE = "rpc" | "rest"; interface INetworkMetadata { - "chain_name": string; - "status": string; - "network_type": string; - "pretty_name": string; - "chain_id": string; - "bech32_prefix": string; - "daemon_name": string; - "node_home": string; - "genesis": { - "genesis_url": string + chain_name: string; + status: string; + network_type: string; + pretty_name: string; + chain_id: string; + bech32_prefix: string; + daemon_name: string; + node_home: string; + genesis: { + genesis_url: string; + }; + codebase: { + git_repo: string; + recommended_version: string; + compatible_versions: [string]; + binaries: { + [target: string]: string; }; - "codebase": { - "git_repo": string, - "recommended_version": string, - "compatible_versions": [string], - "binaries": { - [target: string]: string - } - }, - "peers": { - "seeds": [ - { - "id": string, - "address": string - }, - ], - "persistent_peers": [ - { - "id": string, - "address": string - }, - ] - }, - "apis": { - [type: string]: [{ "address": string }], - } + }; + peers: { + seeds: [ + { + id: string; + address: string; + } + ]; + persistent_peers: [ + { + id: string; + address: string; + } + ]; + }; + apis: { + [type: string]: [{ address: string }]; + }; } // TODO: this should probably be cached to avoid pulling for every request export async function getMetadata(network: NETWORK_TYPE): Promise { - return fetch(`https://raw.githubusercontent.com/ovrclk/net/master/${network}/meta.json`) - .then(res => res.json()); + return fetch(`https://raw.githubusercontent.com/ovrclk/net/master/${network}/meta.json`).then(res => res.json()); } export function getEndpoints(network: NETWORK_TYPE, type: ENDPOINT_TYPE) { - return getMetadata(network) - .then(meta => meta.apis[type]); + return getMetadata(network).then(meta => meta.apis[type]); } export function getEndpointsSorted(network: NETWORK_TYPE, type: ENDPOINT_TYPE) { - return getEndpoints(network, type) - .then(map(getEndpointHealthStatus(800))) - .then(awaitAll) - .then(filter(isNodeResponsive)) - .then(sortBy(prop("responseTime"))); + return getEndpoints(network, type) + .then(map(getEndpointHealthStatus(800))) + .then(awaitAll) + .then(filter(isNodeResponsive)) + .then(sortBy(prop("responseTime"))); } function isNodeResponsive(endpoint: { responseTime: number | null }) { - return endpoint.responseTime !== null; + return endpoint.responseTime !== null; } function getEndpointHealthStatus(timeout: number) { - return ({ address }: { "address": string }) => { - const startTime = performance.now(); + return ({ address }: { address: string }) => { + const startTime = performance.now(); - return fetch(`${address}/node_info`, { timeout }) - .then( - () => ({ - address, - responseTime: Math.floor(performance.now() - startTime) - })) - .catch( - () => ({ - address, - responseTime: null - }) - ); - } -} \ No newline at end of file + return fetch(`${address}/node_info`, { timeout }) + .then(() => ({ + address, + responseTime: Math.floor(performance.now() - startTime) + })) + .catch(() => ({ + address, + responseTime: null + })); + }; +} diff --git a/src/pbclient/index.ts b/src/pbclient/index.ts index 705afb0..fe762d2 100644 --- a/src/pbclient/index.ts +++ b/src/pbclient/index.ts @@ -5,16 +5,16 @@ const fee = { amount: [ { denom: "uakt", - amount: "2500", - }, + amount: "2500" + } ], - gas: "100000", + gas: "100000" }; export function createAminoMessage(message: messages, messageBody: any) { return { typeUrl: message, - value: messageBody, + value: messageBody }; } @@ -22,8 +22,8 @@ export function createStarGateMessage(message: messages, messageBody: any) { return { message: { typeUrl: message, - value: messageBody, + value: messageBody }, - fee: fee, + fee: fee }; } diff --git a/src/protobuf/akash/audit/v1beta1/audit.ts b/src/protobuf/akash/audit/v1beta1/audit.ts index ea99afc..e040b94 100644 --- a/src/protobuf/akash/audit/v1beta1/audit.ts +++ b/src/protobuf/akash/audit/v1beta1/audit.ts @@ -66,17 +66,14 @@ function createBaseProvider(): Provider { $type: "akash.audit.v1beta1.Provider", owner: "", auditor: "", - attributes: [], + attributes: [] }; } export const Provider = { $type: "akash.audit.v1beta1.Provider" as const, - encode( - message: Provider, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Provider, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -118,9 +115,7 @@ export const Provider = { $type: Provider.$type, owner: isSet(object.owner) ? String(object.owner) : "", auditor: isSet(object.auditor) ? String(object.auditor) : "", - attributes: Array.isArray(object?.attributes) - ? object.attributes.map((e: any) => Attribute.fromJSON(e)) - : [], + attributes: Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromJSON(e)) : [] }; }, @@ -129,9 +124,7 @@ export const Provider = { message.owner !== undefined && (obj.owner = message.owner); message.auditor !== undefined && (obj.auditor = message.auditor); if (message.attributes) { - obj.attributes = message.attributes.map((e) => - e ? Attribute.toJSON(e) : undefined - ); + obj.attributes = message.attributes.map(e => (e ? Attribute.toJSON(e) : undefined)); } else { obj.attributes = []; } @@ -142,10 +135,9 @@ export const Provider = { const message = createBaseProvider(); message.owner = object.owner ?? ""; message.auditor = object.auditor ?? ""; - message.attributes = - object.attributes?.map((e) => Attribute.fromPartial(e)) || []; + message.attributes = object.attributes?.map(e => Attribute.fromPartial(e)) || []; return message; - }, + } }; messageTypeRegistry.set(Provider.$type, Provider); @@ -155,17 +147,14 @@ function createBaseAuditedAttributes(): AuditedAttributes { $type: "akash.audit.v1beta1.AuditedAttributes", owner: "", auditor: "", - attributes: [], + attributes: [] }; } export const AuditedAttributes = { $type: "akash.audit.v1beta1.AuditedAttributes" as const, - encode( - message: AuditedAttributes, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: AuditedAttributes, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -207,9 +196,7 @@ export const AuditedAttributes = { $type: AuditedAttributes.$type, owner: isSet(object.owner) ? String(object.owner) : "", auditor: isSet(object.auditor) ? String(object.auditor) : "", - attributes: Array.isArray(object?.attributes) - ? object.attributes.map((e: any) => Attribute.fromJSON(e)) - : [], + attributes: Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromJSON(e)) : [] }; }, @@ -218,25 +205,20 @@ export const AuditedAttributes = { message.owner !== undefined && (obj.owner = message.owner); message.auditor !== undefined && (obj.auditor = message.auditor); if (message.attributes) { - obj.attributes = message.attributes.map((e) => - e ? Attribute.toJSON(e) : undefined - ); + obj.attributes = message.attributes.map(e => (e ? Attribute.toJSON(e) : undefined)); } else { obj.attributes = []; } return obj; }, - fromPartial, I>>( - object: I - ): AuditedAttributes { + fromPartial, I>>(object: I): AuditedAttributes { const message = createBaseAuditedAttributes(); message.owner = object.owner ?? ""; message.auditor = object.auditor ?? ""; - message.attributes = - object.attributes?.map((e) => Attribute.fromPartial(e)) || []; + message.attributes = object.attributes?.map(e => Attribute.fromPartial(e)) || []; return message; - }, + } }; messageTypeRegistry.set(AuditedAttributes.$type, AuditedAttributes); @@ -248,10 +230,7 @@ function createBaseAttributesResponse(): AttributesResponse { export const AttributesResponse = { $type: "akash.audit.v1beta1.AttributesResponse" as const, - encode( - message: AttributesResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: AttributesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.attributes) { AuditedAttributes.encode(v!, writer.uint32(10).fork()).ldelim(); } @@ -266,9 +245,7 @@ export const AttributesResponse = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.attributes.push( - AuditedAttributes.decode(reader, reader.uint32()) - ); + message.attributes.push(AuditedAttributes.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -281,32 +258,25 @@ export const AttributesResponse = { fromJSON(object: any): AttributesResponse { return { $type: AttributesResponse.$type, - attributes: Array.isArray(object?.attributes) - ? object.attributes.map((e: any) => AuditedAttributes.fromJSON(e)) - : [], + attributes: Array.isArray(object?.attributes) ? object.attributes.map((e: any) => AuditedAttributes.fromJSON(e)) : [] }; }, toJSON(message: AttributesResponse): unknown { const obj: any = {}; if (message.attributes) { - obj.attributes = message.attributes.map((e) => - e ? AuditedAttributes.toJSON(e) : undefined - ); + obj.attributes = message.attributes.map(e => (e ? AuditedAttributes.toJSON(e) : undefined)); } else { obj.attributes = []; } return obj; }, - fromPartial, I>>( - object: I - ): AttributesResponse { + fromPartial, I>>(object: I): AttributesResponse { const message = createBaseAttributesResponse(); - message.attributes = - object.attributes?.map((e) => AuditedAttributes.fromPartial(e)) || []; + message.attributes = object.attributes?.map(e => AuditedAttributes.fromPartial(e)) || []; return message; - }, + } }; messageTypeRegistry.set(AttributesResponse.$type, AttributesResponse); @@ -315,17 +285,14 @@ function createBaseAttributesFilters(): AttributesFilters { return { $type: "akash.audit.v1beta1.AttributesFilters", auditors: [], - owners: [], + owners: [] }; } export const AttributesFilters = { $type: "akash.audit.v1beta1.AttributesFilters" as const, - encode( - message: AttributesFilters, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: AttributesFilters, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.auditors) { writer.uint32(10).string(v!); } @@ -359,38 +326,32 @@ export const AttributesFilters = { fromJSON(object: any): AttributesFilters { return { $type: AttributesFilters.$type, - auditors: Array.isArray(object?.auditors) - ? object.auditors.map((e: any) => String(e)) - : [], - owners: Array.isArray(object?.owners) - ? object.owners.map((e: any) => String(e)) - : [], + auditors: Array.isArray(object?.auditors) ? object.auditors.map((e: any) => String(e)) : [], + owners: Array.isArray(object?.owners) ? object.owners.map((e: any) => String(e)) : [] }; }, toJSON(message: AttributesFilters): unknown { const obj: any = {}; if (message.auditors) { - obj.auditors = message.auditors.map((e) => e); + obj.auditors = message.auditors.map(e => e); } else { obj.auditors = []; } if (message.owners) { - obj.owners = message.owners.map((e) => e); + obj.owners = message.owners.map(e => e); } else { obj.owners = []; } return obj; }, - fromPartial, I>>( - object: I - ): AttributesFilters { + fromPartial, I>>(object: I): AttributesFilters { const message = createBaseAttributesFilters(); - message.auditors = object.auditors?.map((e) => e) || []; - message.owners = object.owners?.map((e) => e) || []; + message.auditors = object.auditors?.map(e => e) || []; + message.owners = object.owners?.map(e => e) || []; return message; - }, + } }; messageTypeRegistry.set(AttributesFilters.$type, AttributesFilters); @@ -400,17 +361,14 @@ function createBaseMsgSignProviderAttributes(): MsgSignProviderAttributes { $type: "akash.audit.v1beta1.MsgSignProviderAttributes", owner: "", auditor: "", - attributes: [], + attributes: [] }; } export const MsgSignProviderAttributes = { $type: "akash.audit.v1beta1.MsgSignProviderAttributes" as const, - encode( - message: MsgSignProviderAttributes, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MsgSignProviderAttributes, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -423,10 +381,7 @@ export const MsgSignProviderAttributes = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgSignProviderAttributes { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgSignProviderAttributes { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgSignProviderAttributes(); @@ -455,9 +410,7 @@ export const MsgSignProviderAttributes = { $type: MsgSignProviderAttributes.$type, owner: isSet(object.owner) ? String(object.owner) : "", auditor: isSet(object.auditor) ? String(object.auditor) : "", - attributes: Array.isArray(object?.attributes) - ? object.attributes.map((e: any) => Attribute.fromJSON(e)) - : [], + attributes: Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromJSON(e)) : [] }; }, @@ -466,31 +419,23 @@ export const MsgSignProviderAttributes = { message.owner !== undefined && (obj.owner = message.owner); message.auditor !== undefined && (obj.auditor = message.auditor); if (message.attributes) { - obj.attributes = message.attributes.map((e) => - e ? Attribute.toJSON(e) : undefined - ); + obj.attributes = message.attributes.map(e => (e ? Attribute.toJSON(e) : undefined)); } else { obj.attributes = []; } return obj; }, - fromPartial, I>>( - object: I - ): MsgSignProviderAttributes { + fromPartial, I>>(object: I): MsgSignProviderAttributes { const message = createBaseMsgSignProviderAttributes(); message.owner = object.owner ?? ""; message.auditor = object.auditor ?? ""; - message.attributes = - object.attributes?.map((e) => Attribute.fromPartial(e)) || []; + message.attributes = object.attributes?.map(e => Attribute.fromPartial(e)) || []; return message; - }, + } }; -messageTypeRegistry.set( - MsgSignProviderAttributes.$type, - MsgSignProviderAttributes -); +messageTypeRegistry.set(MsgSignProviderAttributes.$type, MsgSignProviderAttributes); function createBaseMsgSignProviderAttributesResponse(): MsgSignProviderAttributesResponse { return { $type: "akash.audit.v1beta1.MsgSignProviderAttributesResponse" }; @@ -499,17 +444,11 @@ function createBaseMsgSignProviderAttributesResponse(): MsgSignProviderAttribute export const MsgSignProviderAttributesResponse = { $type: "akash.audit.v1beta1.MsgSignProviderAttributesResponse" as const, - encode( - _: MsgSignProviderAttributesResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: MsgSignProviderAttributesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgSignProviderAttributesResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgSignProviderAttributesResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgSignProviderAttributesResponse(); @@ -526,7 +465,7 @@ export const MsgSignProviderAttributesResponse = { fromJSON(_: any): MsgSignProviderAttributesResponse { return { - $type: MsgSignProviderAttributesResponse.$type, + $type: MsgSignProviderAttributesResponse.$type }; }, @@ -535,35 +474,27 @@ export const MsgSignProviderAttributesResponse = { return obj; }, - fromPartial< - I extends Exact, I> - >(_: I): MsgSignProviderAttributesResponse { + fromPartial, I>>(_: I): MsgSignProviderAttributesResponse { const message = createBaseMsgSignProviderAttributesResponse(); return message; - }, + } }; -messageTypeRegistry.set( - MsgSignProviderAttributesResponse.$type, - MsgSignProviderAttributesResponse -); +messageTypeRegistry.set(MsgSignProviderAttributesResponse.$type, MsgSignProviderAttributesResponse); function createBaseMsgDeleteProviderAttributes(): MsgDeleteProviderAttributes { return { $type: "akash.audit.v1beta1.MsgDeleteProviderAttributes", owner: "", auditor: "", - keys: [], + keys: [] }; } export const MsgDeleteProviderAttributes = { $type: "akash.audit.v1beta1.MsgDeleteProviderAttributes" as const, - encode( - message: MsgDeleteProviderAttributes, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MsgDeleteProviderAttributes, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -576,10 +507,7 @@ export const MsgDeleteProviderAttributes = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgDeleteProviderAttributes { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgDeleteProviderAttributes { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgDeleteProviderAttributes(); @@ -608,9 +536,7 @@ export const MsgDeleteProviderAttributes = { $type: MsgDeleteProviderAttributes.$type, owner: isSet(object.owner) ? String(object.owner) : "", auditor: isSet(object.auditor) ? String(object.auditor) : "", - keys: Array.isArray(object?.keys) - ? object.keys.map((e: any) => String(e)) - : [], + keys: Array.isArray(object?.keys) ? object.keys.map((e: any) => String(e)) : [] }; }, @@ -619,28 +545,23 @@ export const MsgDeleteProviderAttributes = { message.owner !== undefined && (obj.owner = message.owner); message.auditor !== undefined && (obj.auditor = message.auditor); if (message.keys) { - obj.keys = message.keys.map((e) => e); + obj.keys = message.keys.map(e => e); } else { obj.keys = []; } return obj; }, - fromPartial, I>>( - object: I - ): MsgDeleteProviderAttributes { + fromPartial, I>>(object: I): MsgDeleteProviderAttributes { const message = createBaseMsgDeleteProviderAttributes(); message.owner = object.owner ?? ""; message.auditor = object.auditor ?? ""; - message.keys = object.keys?.map((e) => e) || []; + message.keys = object.keys?.map(e => e) || []; return message; - }, + } }; -messageTypeRegistry.set( - MsgDeleteProviderAttributes.$type, - MsgDeleteProviderAttributes -); +messageTypeRegistry.set(MsgDeleteProviderAttributes.$type, MsgDeleteProviderAttributes); function createBaseMsgDeleteProviderAttributesResponse(): MsgDeleteProviderAttributesResponse { return { $type: "akash.audit.v1beta1.MsgDeleteProviderAttributesResponse" }; @@ -649,17 +570,11 @@ function createBaseMsgDeleteProviderAttributesResponse(): MsgDeleteProviderAttri export const MsgDeleteProviderAttributesResponse = { $type: "akash.audit.v1beta1.MsgDeleteProviderAttributesResponse" as const, - encode( - _: MsgDeleteProviderAttributesResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: MsgDeleteProviderAttributesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgDeleteProviderAttributesResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgDeleteProviderAttributesResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgDeleteProviderAttributesResponse(); @@ -676,7 +591,7 @@ export const MsgDeleteProviderAttributesResponse = { fromJSON(_: any): MsgDeleteProviderAttributesResponse { return { - $type: MsgDeleteProviderAttributesResponse.$type, + $type: MsgDeleteProviderAttributesResponse.$type }; }, @@ -685,29 +600,20 @@ export const MsgDeleteProviderAttributesResponse = { return obj; }, - fromPartial< - I extends Exact, I> - >(_: I): MsgDeleteProviderAttributesResponse { + fromPartial, I>>(_: I): MsgDeleteProviderAttributesResponse { const message = createBaseMsgDeleteProviderAttributesResponse(); return message; - }, + } }; -messageTypeRegistry.set( - MsgDeleteProviderAttributesResponse.$type, - MsgDeleteProviderAttributesResponse -); +messageTypeRegistry.set(MsgDeleteProviderAttributesResponse.$type, MsgDeleteProviderAttributesResponse); /** Msg defines the provider Msg service */ export interface Msg { /** SignProviderAttributes defines a method that signs provider attributes */ - SignProviderAttributes( - request: MsgSignProviderAttributes - ): Promise; + SignProviderAttributes(request: MsgSignProviderAttributes): Promise; /** DeleteProviderAttributes defines a method that deletes provider attributes */ - DeleteProviderAttributes( - request: MsgDeleteProviderAttributes - ): Promise; + DeleteProviderAttributes(request: MsgDeleteProviderAttributes): Promise; } export class MsgClientImpl implements Msg { @@ -717,71 +623,41 @@ export class MsgClientImpl implements Msg { this.SignProviderAttributes = this.SignProviderAttributes.bind(this); this.DeleteProviderAttributes = this.DeleteProviderAttributes.bind(this); } - SignProviderAttributes( - request: MsgSignProviderAttributes - ): Promise { + SignProviderAttributes(request: MsgSignProviderAttributes): Promise { const data = MsgSignProviderAttributes.encode(request).finish(); - const promise = this.rpc.request( - "akash.audit.v1beta1.Msg", - "SignProviderAttributes", - data - ); - return promise.then((data) => - MsgSignProviderAttributesResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.audit.v1beta1.Msg", "SignProviderAttributes", data); + return promise.then(data => MsgSignProviderAttributesResponse.decode(new _m0.Reader(data))); } - DeleteProviderAttributes( - request: MsgDeleteProviderAttributes - ): Promise { + DeleteProviderAttributes(request: MsgDeleteProviderAttributes): Promise { const data = MsgDeleteProviderAttributes.encode(request).finish(); - const promise = this.rpc.request( - "akash.audit.v1beta1.Msg", - "DeleteProviderAttributes", - data - ); - return promise.then((data) => - MsgDeleteProviderAttributesResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.audit.v1beta1.Msg", "DeleteProviderAttributes", data); + return promise.then(data => MsgDeleteProviderAttributesResponse.decode(new _m0.Reader(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/audit/v1beta1/genesis.ts b/src/protobuf/akash/audit/v1beta1/genesis.ts index bb4da38..1d23f0d 100644 --- a/src/protobuf/akash/audit/v1beta1/genesis.ts +++ b/src/protobuf/akash/audit/v1beta1/genesis.ts @@ -19,10 +19,7 @@ function createBaseGenesisState(): GenesisState { export const GenesisState = { $type: "akash.audit.v1beta1.GenesisState" as const, - encode( - message: GenesisState, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: GenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.attributes) { AuditedAttributes.encode(v!, writer.uint32(10).fork()).ldelim(); } @@ -37,9 +34,7 @@ export const GenesisState = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.attributes.push( - AuditedAttributes.decode(reader, reader.uint32()) - ); + message.attributes.push(AuditedAttributes.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -52,64 +47,47 @@ export const GenesisState = { fromJSON(object: any): GenesisState { return { $type: GenesisState.$type, - attributes: Array.isArray(object?.attributes) - ? object.attributes.map((e: any) => AuditedAttributes.fromJSON(e)) - : [], + attributes: Array.isArray(object?.attributes) ? object.attributes.map((e: any) => AuditedAttributes.fromJSON(e)) : [] }; }, toJSON(message: GenesisState): unknown { const obj: any = {}; if (message.attributes) { - obj.attributes = message.attributes.map((e) => - e ? AuditedAttributes.toJSON(e) : undefined - ); + obj.attributes = message.attributes.map(e => (e ? AuditedAttributes.toJSON(e) : undefined)); } else { obj.attributes = []; } return obj; }, - fromPartial, I>>( - object: I - ): GenesisState { + fromPartial, I>>(object: I): GenesisState { const message = createBaseGenesisState(); - message.attributes = - object.attributes?.map((e) => AuditedAttributes.fromPartial(e)) || []; + message.attributes = object.attributes?.map(e => AuditedAttributes.fromPartial(e)) || []; return message; - }, + } }; messageTypeRegistry.set(GenesisState.$type, GenesisState); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/audit/v1beta1/query.ts b/src/protobuf/akash/audit/v1beta1/query.ts index b5966f0..ed75a42 100644 --- a/src/protobuf/akash/audit/v1beta1/query.ts +++ b/src/protobuf/akash/audit/v1beta1/query.ts @@ -2,10 +2,7 @@ import { messageTypeRegistry } from "../../../typeRegistry"; import Long from "long"; import _m0 from "protobufjs/minimal"; -import { - PageResponse, - PageRequest, -} from "../../../cosmos/base/query/v1beta1/pagination"; +import { PageResponse, PageRequest } from "../../../cosmos/base/query/v1beta1/pagination"; import { Provider } from "../../../akash/audit/v1beta1/audit"; export const protobufPackage = "akash.audit.v1beta1"; @@ -55,33 +52,24 @@ function createBaseQueryProvidersResponse(): QueryProvidersResponse { return { $type: "akash.audit.v1beta1.QueryProvidersResponse", providers: [], - pagination: undefined, + pagination: undefined }; } export const QueryProvidersResponse = { $type: "akash.audit.v1beta1.QueryProvidersResponse" as const, - encode( - message: QueryProvidersResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryProvidersResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.providers) { Provider.encode(v!, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); + PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryProvidersResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryProvidersResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryProvidersResponse(); @@ -105,43 +93,28 @@ export const QueryProvidersResponse = { fromJSON(object: any): QueryProvidersResponse { return { $type: QueryProvidersResponse.$type, - providers: Array.isArray(object?.providers) - ? object.providers.map((e: any) => Provider.fromJSON(e)) - : [], - pagination: isSet(object.pagination) - ? PageResponse.fromJSON(object.pagination) - : undefined, + providers: Array.isArray(object?.providers) ? object.providers.map((e: any) => Provider.fromJSON(e)) : [], + pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined }; }, toJSON(message: QueryProvidersResponse): unknown { const obj: any = {}; if (message.providers) { - obj.providers = message.providers.map((e) => - e ? Provider.toJSON(e) : undefined - ); + obj.providers = message.providers.map(e => (e ? Provider.toJSON(e) : undefined)); } else { obj.providers = []; } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryProvidersResponse { + fromPartial, I>>(object: I): QueryProvidersResponse { const message = createBaseQueryProvidersResponse(); - message.providers = - object.providers?.map((e) => Provider.fromPartial(e)) || []; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageResponse.fromPartial(object.pagination) - : undefined; + message.providers = object.providers?.map(e => Provider.fromPartial(e)) || []; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryProvidersResponse.$type, QueryProvidersResponse); @@ -150,17 +123,14 @@ function createBaseQueryProviderRequest(): QueryProviderRequest { return { $type: "akash.audit.v1beta1.QueryProviderRequest", auditor: "", - owner: "", + owner: "" }; } export const QueryProviderRequest = { $type: "akash.audit.v1beta1.QueryProviderRequest" as const, - encode( - message: QueryProviderRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryProviderRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.auditor !== "") { writer.uint32(10).string(message.auditor); } @@ -170,10 +140,7 @@ export const QueryProviderRequest = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryProviderRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryProviderRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryProviderRequest(); @@ -198,7 +165,7 @@ export const QueryProviderRequest = { return { $type: QueryProviderRequest.$type, auditor: isSet(object.auditor) ? String(object.auditor) : "", - owner: isSet(object.owner) ? String(object.owner) : "", + owner: isSet(object.owner) ? String(object.owner) : "" }; }, @@ -209,14 +176,12 @@ export const QueryProviderRequest = { return obj; }, - fromPartial, I>>( - object: I - ): QueryProviderRequest { + fromPartial, I>>(object: I): QueryProviderRequest { const message = createBaseQueryProviderRequest(); message.auditor = object.auditor ?? ""; message.owner = object.owner ?? ""; return message; - }, + } }; messageTypeRegistry.set(QueryProviderRequest.$type, QueryProviderRequest); @@ -224,27 +189,21 @@ messageTypeRegistry.set(QueryProviderRequest.$type, QueryProviderRequest); function createBaseQueryAllProvidersAttributesRequest(): QueryAllProvidersAttributesRequest { return { $type: "akash.audit.v1beta1.QueryAllProvidersAttributesRequest", - pagination: undefined, + pagination: undefined }; } export const QueryAllProvidersAttributesRequest = { $type: "akash.audit.v1beta1.QueryAllProvidersAttributesRequest" as const, - encode( - message: QueryAllProvidersAttributesRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryAllProvidersAttributesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.pagination !== undefined) { PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryAllProvidersAttributesRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryAllProvidersAttributesRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryAllProvidersAttributesRequest(); @@ -265,53 +224,37 @@ export const QueryAllProvidersAttributesRequest = { fromJSON(object: any): QueryAllProvidersAttributesRequest { return { $type: QueryAllProvidersAttributesRequest.$type, - pagination: isSet(object.pagination) - ? PageRequest.fromJSON(object.pagination) - : undefined, + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined }; }, toJSON(message: QueryAllProvidersAttributesRequest): unknown { const obj: any = {}; - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); return obj; }, - fromPartial< - I extends Exact, I> - >(object: I): QueryAllProvidersAttributesRequest { + fromPartial, I>>(object: I): QueryAllProvidersAttributesRequest { const message = createBaseQueryAllProvidersAttributesRequest(); - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; return message; - }, + } }; -messageTypeRegistry.set( - QueryAllProvidersAttributesRequest.$type, - QueryAllProvidersAttributesRequest -); +messageTypeRegistry.set(QueryAllProvidersAttributesRequest.$type, QueryAllProvidersAttributesRequest); function createBaseQueryProviderAttributesRequest(): QueryProviderAttributesRequest { return { $type: "akash.audit.v1beta1.QueryProviderAttributesRequest", owner: "", - pagination: undefined, + pagination: undefined }; } export const QueryProviderAttributesRequest = { $type: "akash.audit.v1beta1.QueryProviderAttributesRequest" as const, - encode( - message: QueryProviderAttributesRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryProviderAttributesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -321,10 +264,7 @@ export const QueryProviderAttributesRequest = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryProviderAttributesRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryProviderAttributesRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryProviderAttributesRequest(); @@ -349,55 +289,39 @@ export const QueryProviderAttributesRequest = { return { $type: QueryProviderAttributesRequest.$type, owner: isSet(object.owner) ? String(object.owner) : "", - pagination: isSet(object.pagination) - ? PageRequest.fromJSON(object.pagination) - : undefined, + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined }; }, toJSON(message: QueryProviderAttributesRequest): unknown { const obj: any = {}; message.owner !== undefined && (obj.owner = message.owner); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryProviderAttributesRequest { + fromPartial, I>>(object: I): QueryProviderAttributesRequest { const message = createBaseQueryProviderAttributesRequest(); message.owner = object.owner ?? ""; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; return message; - }, + } }; -messageTypeRegistry.set( - QueryProviderAttributesRequest.$type, - QueryProviderAttributesRequest -); +messageTypeRegistry.set(QueryProviderAttributesRequest.$type, QueryProviderAttributesRequest); function createBaseQueryProviderAuditorRequest(): QueryProviderAuditorRequest { return { $type: "akash.audit.v1beta1.QueryProviderAuditorRequest", auditor: "", - owner: "", + owner: "" }; } export const QueryProviderAuditorRequest = { $type: "akash.audit.v1beta1.QueryProviderAuditorRequest" as const, - encode( - message: QueryProviderAuditorRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryProviderAuditorRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.auditor !== "") { writer.uint32(10).string(message.auditor); } @@ -407,10 +331,7 @@ export const QueryProviderAuditorRequest = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryProviderAuditorRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryProviderAuditorRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryProviderAuditorRequest(); @@ -435,7 +356,7 @@ export const QueryProviderAuditorRequest = { return { $type: QueryProviderAuditorRequest.$type, auditor: isSet(object.auditor) ? String(object.auditor) : "", - owner: isSet(object.owner) ? String(object.owner) : "", + owner: isSet(object.owner) ? String(object.owner) : "" }; }, @@ -446,36 +367,28 @@ export const QueryProviderAuditorRequest = { return obj; }, - fromPartial, I>>( - object: I - ): QueryProviderAuditorRequest { + fromPartial, I>>(object: I): QueryProviderAuditorRequest { const message = createBaseQueryProviderAuditorRequest(); message.auditor = object.auditor ?? ""; message.owner = object.owner ?? ""; return message; - }, + } }; -messageTypeRegistry.set( - QueryProviderAuditorRequest.$type, - QueryProviderAuditorRequest -); +messageTypeRegistry.set(QueryProviderAuditorRequest.$type, QueryProviderAuditorRequest); function createBaseQueryAuditorAttributesRequest(): QueryAuditorAttributesRequest { return { $type: "akash.audit.v1beta1.QueryAuditorAttributesRequest", auditor: "", - pagination: undefined, + pagination: undefined }; } export const QueryAuditorAttributesRequest = { $type: "akash.audit.v1beta1.QueryAuditorAttributesRequest" as const, - encode( - message: QueryAuditorAttributesRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryAuditorAttributesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.auditor !== "") { writer.uint32(10).string(message.auditor); } @@ -485,10 +398,7 @@ export const QueryAuditorAttributesRequest = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryAuditorAttributesRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryAuditorAttributesRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryAuditorAttributesRequest(); @@ -513,39 +423,26 @@ export const QueryAuditorAttributesRequest = { return { $type: QueryAuditorAttributesRequest.$type, auditor: isSet(object.auditor) ? String(object.auditor) : "", - pagination: isSet(object.pagination) - ? PageRequest.fromJSON(object.pagination) - : undefined, + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined }; }, toJSON(message: QueryAuditorAttributesRequest): unknown { const obj: any = {}; message.auditor !== undefined && (obj.auditor = message.auditor); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryAuditorAttributesRequest { + fromPartial, I>>(object: I): QueryAuditorAttributesRequest { const message = createBaseQueryAuditorAttributesRequest(); message.auditor = object.auditor ?? ""; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; return message; - }, + } }; -messageTypeRegistry.set( - QueryAuditorAttributesRequest.$type, - QueryAuditorAttributesRequest -); +messageTypeRegistry.set(QueryAuditorAttributesRequest.$type, QueryAuditorAttributesRequest); /** Query defines the gRPC querier service */ export interface Query { @@ -554,33 +451,25 @@ export interface Query { * buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE * buf:lint:ignore RPC_RESPONSE_STANDARD_NAME */ - AllProvidersAttributes( - request: QueryAllProvidersAttributesRequest - ): Promise; + AllProvidersAttributes(request: QueryAllProvidersAttributesRequest): Promise; /** * ProviderAttributes queries all provider signed attributes * buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE * buf:lint:ignore RPC_RESPONSE_STANDARD_NAME */ - ProviderAttributes( - request: QueryProviderAttributesRequest - ): Promise; + ProviderAttributes(request: QueryProviderAttributesRequest): Promise; /** * ProviderAuditorAttributes queries provider signed attributes by specific auditor * buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE * buf:lint:ignore RPC_RESPONSE_STANDARD_NAME */ - ProviderAuditorAttributes( - request: QueryProviderAuditorRequest - ): Promise; + ProviderAuditorAttributes(request: QueryProviderAuditorRequest): Promise; /** * AuditorAttributes queries all providers signed by this auditor * buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE * buf:lint:ignore RPC_RESPONSE_STANDARD_NAME */ - AuditorAttributes( - request: QueryAuditorAttributesRequest - ): Promise; + AuditorAttributes(request: QueryAuditorAttributesRequest): Promise; } export class QueryClientImpl implements Query { @@ -592,99 +481,53 @@ export class QueryClientImpl implements Query { this.ProviderAuditorAttributes = this.ProviderAuditorAttributes.bind(this); this.AuditorAttributes = this.AuditorAttributes.bind(this); } - AllProvidersAttributes( - request: QueryAllProvidersAttributesRequest - ): Promise { + AllProvidersAttributes(request: QueryAllProvidersAttributesRequest): Promise { const data = QueryAllProvidersAttributesRequest.encode(request).finish(); - const promise = this.rpc.request( - "akash.audit.v1beta1.Query", - "AllProvidersAttributes", - data - ); - return promise.then((data) => - QueryProvidersResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.audit.v1beta1.Query", "AllProvidersAttributes", data); + return promise.then(data => QueryProvidersResponse.decode(new _m0.Reader(data))); } - ProviderAttributes( - request: QueryProviderAttributesRequest - ): Promise { + ProviderAttributes(request: QueryProviderAttributesRequest): Promise { const data = QueryProviderAttributesRequest.encode(request).finish(); - const promise = this.rpc.request( - "akash.audit.v1beta1.Query", - "ProviderAttributes", - data - ); - return promise.then((data) => - QueryProvidersResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.audit.v1beta1.Query", "ProviderAttributes", data); + return promise.then(data => QueryProvidersResponse.decode(new _m0.Reader(data))); } - ProviderAuditorAttributes( - request: QueryProviderAuditorRequest - ): Promise { + ProviderAuditorAttributes(request: QueryProviderAuditorRequest): Promise { const data = QueryProviderAuditorRequest.encode(request).finish(); - const promise = this.rpc.request( - "akash.audit.v1beta1.Query", - "ProviderAuditorAttributes", - data - ); - return promise.then((data) => - QueryProvidersResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.audit.v1beta1.Query", "ProviderAuditorAttributes", data); + return promise.then(data => QueryProvidersResponse.decode(new _m0.Reader(data))); } - AuditorAttributes( - request: QueryAuditorAttributesRequest - ): Promise { + AuditorAttributes(request: QueryAuditorAttributesRequest): Promise { const data = QueryAuditorAttributesRequest.encode(request).finish(); - const promise = this.rpc.request( - "akash.audit.v1beta1.Query", - "AuditorAttributes", - data - ); - return promise.then((data) => - QueryProvidersResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.audit.v1beta1.Query", "AuditorAttributes", data); + return promise.then(data => QueryProvidersResponse.decode(new _m0.Reader(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/audit/v1beta2/audit.ts b/src/protobuf/akash/audit/v1beta2/audit.ts index 318c6d1..7a750e9 100644 --- a/src/protobuf/akash/audit/v1beta2/audit.ts +++ b/src/protobuf/akash/audit/v1beta2/audit.ts @@ -66,17 +66,14 @@ function createBaseProvider(): Provider { $type: "akash.audit.v1beta2.Provider", owner: "", auditor: "", - attributes: [], + attributes: [] }; } export const Provider = { $type: "akash.audit.v1beta2.Provider" as const, - encode( - message: Provider, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Provider, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -118,9 +115,7 @@ export const Provider = { $type: Provider.$type, owner: isSet(object.owner) ? String(object.owner) : "", auditor: isSet(object.auditor) ? String(object.auditor) : "", - attributes: Array.isArray(object?.attributes) - ? object.attributes.map((e: any) => Attribute.fromJSON(e)) - : [], + attributes: Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromJSON(e)) : [] }; }, @@ -129,9 +124,7 @@ export const Provider = { message.owner !== undefined && (obj.owner = message.owner); message.auditor !== undefined && (obj.auditor = message.auditor); if (message.attributes) { - obj.attributes = message.attributes.map((e) => - e ? Attribute.toJSON(e) : undefined - ); + obj.attributes = message.attributes.map(e => (e ? Attribute.toJSON(e) : undefined)); } else { obj.attributes = []; } @@ -142,10 +135,9 @@ export const Provider = { const message = createBaseProvider(); message.owner = object.owner ?? ""; message.auditor = object.auditor ?? ""; - message.attributes = - object.attributes?.map((e) => Attribute.fromPartial(e)) || []; + message.attributes = object.attributes?.map(e => Attribute.fromPartial(e)) || []; return message; - }, + } }; messageTypeRegistry.set(Provider.$type, Provider); @@ -155,17 +147,14 @@ function createBaseAuditedAttributes(): AuditedAttributes { $type: "akash.audit.v1beta2.AuditedAttributes", owner: "", auditor: "", - attributes: [], + attributes: [] }; } export const AuditedAttributes = { $type: "akash.audit.v1beta2.AuditedAttributes" as const, - encode( - message: AuditedAttributes, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: AuditedAttributes, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -207,9 +196,7 @@ export const AuditedAttributes = { $type: AuditedAttributes.$type, owner: isSet(object.owner) ? String(object.owner) : "", auditor: isSet(object.auditor) ? String(object.auditor) : "", - attributes: Array.isArray(object?.attributes) - ? object.attributes.map((e: any) => Attribute.fromJSON(e)) - : [], + attributes: Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromJSON(e)) : [] }; }, @@ -218,25 +205,20 @@ export const AuditedAttributes = { message.owner !== undefined && (obj.owner = message.owner); message.auditor !== undefined && (obj.auditor = message.auditor); if (message.attributes) { - obj.attributes = message.attributes.map((e) => - e ? Attribute.toJSON(e) : undefined - ); + obj.attributes = message.attributes.map(e => (e ? Attribute.toJSON(e) : undefined)); } else { obj.attributes = []; } return obj; }, - fromPartial, I>>( - object: I - ): AuditedAttributes { + fromPartial, I>>(object: I): AuditedAttributes { const message = createBaseAuditedAttributes(); message.owner = object.owner ?? ""; message.auditor = object.auditor ?? ""; - message.attributes = - object.attributes?.map((e) => Attribute.fromPartial(e)) || []; + message.attributes = object.attributes?.map(e => Attribute.fromPartial(e)) || []; return message; - }, + } }; messageTypeRegistry.set(AuditedAttributes.$type, AuditedAttributes); @@ -248,10 +230,7 @@ function createBaseAttributesResponse(): AttributesResponse { export const AttributesResponse = { $type: "akash.audit.v1beta2.AttributesResponse" as const, - encode( - message: AttributesResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: AttributesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.attributes) { AuditedAttributes.encode(v!, writer.uint32(10).fork()).ldelim(); } @@ -266,9 +245,7 @@ export const AttributesResponse = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.attributes.push( - AuditedAttributes.decode(reader, reader.uint32()) - ); + message.attributes.push(AuditedAttributes.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -281,32 +258,25 @@ export const AttributesResponse = { fromJSON(object: any): AttributesResponse { return { $type: AttributesResponse.$type, - attributes: Array.isArray(object?.attributes) - ? object.attributes.map((e: any) => AuditedAttributes.fromJSON(e)) - : [], + attributes: Array.isArray(object?.attributes) ? object.attributes.map((e: any) => AuditedAttributes.fromJSON(e)) : [] }; }, toJSON(message: AttributesResponse): unknown { const obj: any = {}; if (message.attributes) { - obj.attributes = message.attributes.map((e) => - e ? AuditedAttributes.toJSON(e) : undefined - ); + obj.attributes = message.attributes.map(e => (e ? AuditedAttributes.toJSON(e) : undefined)); } else { obj.attributes = []; } return obj; }, - fromPartial, I>>( - object: I - ): AttributesResponse { + fromPartial, I>>(object: I): AttributesResponse { const message = createBaseAttributesResponse(); - message.attributes = - object.attributes?.map((e) => AuditedAttributes.fromPartial(e)) || []; + message.attributes = object.attributes?.map(e => AuditedAttributes.fromPartial(e)) || []; return message; - }, + } }; messageTypeRegistry.set(AttributesResponse.$type, AttributesResponse); @@ -315,17 +285,14 @@ function createBaseAttributesFilters(): AttributesFilters { return { $type: "akash.audit.v1beta2.AttributesFilters", auditors: [], - owners: [], + owners: [] }; } export const AttributesFilters = { $type: "akash.audit.v1beta2.AttributesFilters" as const, - encode( - message: AttributesFilters, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: AttributesFilters, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.auditors) { writer.uint32(10).string(v!); } @@ -359,38 +326,32 @@ export const AttributesFilters = { fromJSON(object: any): AttributesFilters { return { $type: AttributesFilters.$type, - auditors: Array.isArray(object?.auditors) - ? object.auditors.map((e: any) => String(e)) - : [], - owners: Array.isArray(object?.owners) - ? object.owners.map((e: any) => String(e)) - : [], + auditors: Array.isArray(object?.auditors) ? object.auditors.map((e: any) => String(e)) : [], + owners: Array.isArray(object?.owners) ? object.owners.map((e: any) => String(e)) : [] }; }, toJSON(message: AttributesFilters): unknown { const obj: any = {}; if (message.auditors) { - obj.auditors = message.auditors.map((e) => e); + obj.auditors = message.auditors.map(e => e); } else { obj.auditors = []; } if (message.owners) { - obj.owners = message.owners.map((e) => e); + obj.owners = message.owners.map(e => e); } else { obj.owners = []; } return obj; }, - fromPartial, I>>( - object: I - ): AttributesFilters { + fromPartial, I>>(object: I): AttributesFilters { const message = createBaseAttributesFilters(); - message.auditors = object.auditors?.map((e) => e) || []; - message.owners = object.owners?.map((e) => e) || []; + message.auditors = object.auditors?.map(e => e) || []; + message.owners = object.owners?.map(e => e) || []; return message; - }, + } }; messageTypeRegistry.set(AttributesFilters.$type, AttributesFilters); @@ -400,17 +361,14 @@ function createBaseMsgSignProviderAttributes(): MsgSignProviderAttributes { $type: "akash.audit.v1beta2.MsgSignProviderAttributes", owner: "", auditor: "", - attributes: [], + attributes: [] }; } export const MsgSignProviderAttributes = { $type: "akash.audit.v1beta2.MsgSignProviderAttributes" as const, - encode( - message: MsgSignProviderAttributes, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MsgSignProviderAttributes, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -423,10 +381,7 @@ export const MsgSignProviderAttributes = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgSignProviderAttributes { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgSignProviderAttributes { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgSignProviderAttributes(); @@ -455,9 +410,7 @@ export const MsgSignProviderAttributes = { $type: MsgSignProviderAttributes.$type, owner: isSet(object.owner) ? String(object.owner) : "", auditor: isSet(object.auditor) ? String(object.auditor) : "", - attributes: Array.isArray(object?.attributes) - ? object.attributes.map((e: any) => Attribute.fromJSON(e)) - : [], + attributes: Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromJSON(e)) : [] }; }, @@ -466,31 +419,23 @@ export const MsgSignProviderAttributes = { message.owner !== undefined && (obj.owner = message.owner); message.auditor !== undefined && (obj.auditor = message.auditor); if (message.attributes) { - obj.attributes = message.attributes.map((e) => - e ? Attribute.toJSON(e) : undefined - ); + obj.attributes = message.attributes.map(e => (e ? Attribute.toJSON(e) : undefined)); } else { obj.attributes = []; } return obj; }, - fromPartial, I>>( - object: I - ): MsgSignProviderAttributes { + fromPartial, I>>(object: I): MsgSignProviderAttributes { const message = createBaseMsgSignProviderAttributes(); message.owner = object.owner ?? ""; message.auditor = object.auditor ?? ""; - message.attributes = - object.attributes?.map((e) => Attribute.fromPartial(e)) || []; + message.attributes = object.attributes?.map(e => Attribute.fromPartial(e)) || []; return message; - }, + } }; -messageTypeRegistry.set( - MsgSignProviderAttributes.$type, - MsgSignProviderAttributes -); +messageTypeRegistry.set(MsgSignProviderAttributes.$type, MsgSignProviderAttributes); function createBaseMsgSignProviderAttributesResponse(): MsgSignProviderAttributesResponse { return { $type: "akash.audit.v1beta2.MsgSignProviderAttributesResponse" }; @@ -499,17 +444,11 @@ function createBaseMsgSignProviderAttributesResponse(): MsgSignProviderAttribute export const MsgSignProviderAttributesResponse = { $type: "akash.audit.v1beta2.MsgSignProviderAttributesResponse" as const, - encode( - _: MsgSignProviderAttributesResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: MsgSignProviderAttributesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgSignProviderAttributesResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgSignProviderAttributesResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgSignProviderAttributesResponse(); @@ -526,7 +465,7 @@ export const MsgSignProviderAttributesResponse = { fromJSON(_: any): MsgSignProviderAttributesResponse { return { - $type: MsgSignProviderAttributesResponse.$type, + $type: MsgSignProviderAttributesResponse.$type }; }, @@ -535,35 +474,27 @@ export const MsgSignProviderAttributesResponse = { return obj; }, - fromPartial< - I extends Exact, I> - >(_: I): MsgSignProviderAttributesResponse { + fromPartial, I>>(_: I): MsgSignProviderAttributesResponse { const message = createBaseMsgSignProviderAttributesResponse(); return message; - }, + } }; -messageTypeRegistry.set( - MsgSignProviderAttributesResponse.$type, - MsgSignProviderAttributesResponse -); +messageTypeRegistry.set(MsgSignProviderAttributesResponse.$type, MsgSignProviderAttributesResponse); function createBaseMsgDeleteProviderAttributes(): MsgDeleteProviderAttributes { return { $type: "akash.audit.v1beta2.MsgDeleteProviderAttributes", owner: "", auditor: "", - keys: [], + keys: [] }; } export const MsgDeleteProviderAttributes = { $type: "akash.audit.v1beta2.MsgDeleteProviderAttributes" as const, - encode( - message: MsgDeleteProviderAttributes, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MsgDeleteProviderAttributes, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -576,10 +507,7 @@ export const MsgDeleteProviderAttributes = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgDeleteProviderAttributes { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgDeleteProviderAttributes { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgDeleteProviderAttributes(); @@ -608,9 +536,7 @@ export const MsgDeleteProviderAttributes = { $type: MsgDeleteProviderAttributes.$type, owner: isSet(object.owner) ? String(object.owner) : "", auditor: isSet(object.auditor) ? String(object.auditor) : "", - keys: Array.isArray(object?.keys) - ? object.keys.map((e: any) => String(e)) - : [], + keys: Array.isArray(object?.keys) ? object.keys.map((e: any) => String(e)) : [] }; }, @@ -619,28 +545,23 @@ export const MsgDeleteProviderAttributes = { message.owner !== undefined && (obj.owner = message.owner); message.auditor !== undefined && (obj.auditor = message.auditor); if (message.keys) { - obj.keys = message.keys.map((e) => e); + obj.keys = message.keys.map(e => e); } else { obj.keys = []; } return obj; }, - fromPartial, I>>( - object: I - ): MsgDeleteProviderAttributes { + fromPartial, I>>(object: I): MsgDeleteProviderAttributes { const message = createBaseMsgDeleteProviderAttributes(); message.owner = object.owner ?? ""; message.auditor = object.auditor ?? ""; - message.keys = object.keys?.map((e) => e) || []; + message.keys = object.keys?.map(e => e) || []; return message; - }, + } }; -messageTypeRegistry.set( - MsgDeleteProviderAttributes.$type, - MsgDeleteProviderAttributes -); +messageTypeRegistry.set(MsgDeleteProviderAttributes.$type, MsgDeleteProviderAttributes); function createBaseMsgDeleteProviderAttributesResponse(): MsgDeleteProviderAttributesResponse { return { $type: "akash.audit.v1beta2.MsgDeleteProviderAttributesResponse" }; @@ -649,17 +570,11 @@ function createBaseMsgDeleteProviderAttributesResponse(): MsgDeleteProviderAttri export const MsgDeleteProviderAttributesResponse = { $type: "akash.audit.v1beta2.MsgDeleteProviderAttributesResponse" as const, - encode( - _: MsgDeleteProviderAttributesResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: MsgDeleteProviderAttributesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgDeleteProviderAttributesResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgDeleteProviderAttributesResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgDeleteProviderAttributesResponse(); @@ -676,7 +591,7 @@ export const MsgDeleteProviderAttributesResponse = { fromJSON(_: any): MsgDeleteProviderAttributesResponse { return { - $type: MsgDeleteProviderAttributesResponse.$type, + $type: MsgDeleteProviderAttributesResponse.$type }; }, @@ -685,29 +600,20 @@ export const MsgDeleteProviderAttributesResponse = { return obj; }, - fromPartial< - I extends Exact, I> - >(_: I): MsgDeleteProviderAttributesResponse { + fromPartial, I>>(_: I): MsgDeleteProviderAttributesResponse { const message = createBaseMsgDeleteProviderAttributesResponse(); return message; - }, + } }; -messageTypeRegistry.set( - MsgDeleteProviderAttributesResponse.$type, - MsgDeleteProviderAttributesResponse -); +messageTypeRegistry.set(MsgDeleteProviderAttributesResponse.$type, MsgDeleteProviderAttributesResponse); /** Msg defines the provider Msg service */ export interface Msg { /** SignProviderAttributes defines a method that signs provider attributes */ - SignProviderAttributes( - request: MsgSignProviderAttributes - ): Promise; + SignProviderAttributes(request: MsgSignProviderAttributes): Promise; /** DeleteProviderAttributes defines a method that deletes provider attributes */ - DeleteProviderAttributes( - request: MsgDeleteProviderAttributes - ): Promise; + DeleteProviderAttributes(request: MsgDeleteProviderAttributes): Promise; } export class MsgClientImpl implements Msg { @@ -717,71 +623,41 @@ export class MsgClientImpl implements Msg { this.SignProviderAttributes = this.SignProviderAttributes.bind(this); this.DeleteProviderAttributes = this.DeleteProviderAttributes.bind(this); } - SignProviderAttributes( - request: MsgSignProviderAttributes - ): Promise { + SignProviderAttributes(request: MsgSignProviderAttributes): Promise { const data = MsgSignProviderAttributes.encode(request).finish(); - const promise = this.rpc.request( - "akash.audit.v1beta2.Msg", - "SignProviderAttributes", - data - ); - return promise.then((data) => - MsgSignProviderAttributesResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.audit.v1beta2.Msg", "SignProviderAttributes", data); + return promise.then(data => MsgSignProviderAttributesResponse.decode(new _m0.Reader(data))); } - DeleteProviderAttributes( - request: MsgDeleteProviderAttributes - ): Promise { + DeleteProviderAttributes(request: MsgDeleteProviderAttributes): Promise { const data = MsgDeleteProviderAttributes.encode(request).finish(); - const promise = this.rpc.request( - "akash.audit.v1beta2.Msg", - "DeleteProviderAttributes", - data - ); - return promise.then((data) => - MsgDeleteProviderAttributesResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.audit.v1beta2.Msg", "DeleteProviderAttributes", data); + return promise.then(data => MsgDeleteProviderAttributesResponse.decode(new _m0.Reader(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/audit/v1beta2/genesis.ts b/src/protobuf/akash/audit/v1beta2/genesis.ts index 3840f0e..1aced68 100644 --- a/src/protobuf/akash/audit/v1beta2/genesis.ts +++ b/src/protobuf/akash/audit/v1beta2/genesis.ts @@ -19,10 +19,7 @@ function createBaseGenesisState(): GenesisState { export const GenesisState = { $type: "akash.audit.v1beta2.GenesisState" as const, - encode( - message: GenesisState, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: GenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.attributes) { AuditedAttributes.encode(v!, writer.uint32(10).fork()).ldelim(); } @@ -37,9 +34,7 @@ export const GenesisState = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.attributes.push( - AuditedAttributes.decode(reader, reader.uint32()) - ); + message.attributes.push(AuditedAttributes.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -52,64 +47,47 @@ export const GenesisState = { fromJSON(object: any): GenesisState { return { $type: GenesisState.$type, - attributes: Array.isArray(object?.attributes) - ? object.attributes.map((e: any) => AuditedAttributes.fromJSON(e)) - : [], + attributes: Array.isArray(object?.attributes) ? object.attributes.map((e: any) => AuditedAttributes.fromJSON(e)) : [] }; }, toJSON(message: GenesisState): unknown { const obj: any = {}; if (message.attributes) { - obj.attributes = message.attributes.map((e) => - e ? AuditedAttributes.toJSON(e) : undefined - ); + obj.attributes = message.attributes.map(e => (e ? AuditedAttributes.toJSON(e) : undefined)); } else { obj.attributes = []; } return obj; }, - fromPartial, I>>( - object: I - ): GenesisState { + fromPartial, I>>(object: I): GenesisState { const message = createBaseGenesisState(); - message.attributes = - object.attributes?.map((e) => AuditedAttributes.fromPartial(e)) || []; + message.attributes = object.attributes?.map(e => AuditedAttributes.fromPartial(e)) || []; return message; - }, + } }; messageTypeRegistry.set(GenesisState.$type, GenesisState); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/audit/v1beta2/query.ts b/src/protobuf/akash/audit/v1beta2/query.ts index 98995b5..54d080f 100644 --- a/src/protobuf/akash/audit/v1beta2/query.ts +++ b/src/protobuf/akash/audit/v1beta2/query.ts @@ -2,10 +2,7 @@ import { messageTypeRegistry } from "../../../typeRegistry"; import Long from "long"; import { Provider } from "./audit"; -import { - PageResponse, - PageRequest, -} from "../../../cosmos/base/query/v1beta1/pagination"; +import { PageResponse, PageRequest } from "../../../cosmos/base/query/v1beta1/pagination"; import * as _m0 from "protobufjs/minimal"; export const protobufPackage = "akash.audit.v1beta2"; @@ -55,33 +52,24 @@ function createBaseQueryProvidersResponse(): QueryProvidersResponse { return { $type: "akash.audit.v1beta2.QueryProvidersResponse", providers: [], - pagination: undefined, + pagination: undefined }; } export const QueryProvidersResponse = { $type: "akash.audit.v1beta2.QueryProvidersResponse" as const, - encode( - message: QueryProvidersResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryProvidersResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.providers) { Provider.encode(v!, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); + PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryProvidersResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryProvidersResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryProvidersResponse(); @@ -105,43 +93,28 @@ export const QueryProvidersResponse = { fromJSON(object: any): QueryProvidersResponse { return { $type: QueryProvidersResponse.$type, - providers: Array.isArray(object?.providers) - ? object.providers.map((e: any) => Provider.fromJSON(e)) - : [], - pagination: isSet(object.pagination) - ? PageResponse.fromJSON(object.pagination) - : undefined, + providers: Array.isArray(object?.providers) ? object.providers.map((e: any) => Provider.fromJSON(e)) : [], + pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined }; }, toJSON(message: QueryProvidersResponse): unknown { const obj: any = {}; if (message.providers) { - obj.providers = message.providers.map((e) => - e ? Provider.toJSON(e) : undefined - ); + obj.providers = message.providers.map(e => (e ? Provider.toJSON(e) : undefined)); } else { obj.providers = []; } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryProvidersResponse { + fromPartial, I>>(object: I): QueryProvidersResponse { const message = createBaseQueryProvidersResponse(); - message.providers = - object.providers?.map((e) => Provider.fromPartial(e)) || []; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageResponse.fromPartial(object.pagination) - : undefined; + message.providers = object.providers?.map(e => Provider.fromPartial(e)) || []; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryProvidersResponse.$type, QueryProvidersResponse); @@ -150,17 +123,14 @@ function createBaseQueryProviderRequest(): QueryProviderRequest { return { $type: "akash.audit.v1beta2.QueryProviderRequest", auditor: "", - owner: "", + owner: "" }; } export const QueryProviderRequest = { $type: "akash.audit.v1beta2.QueryProviderRequest" as const, - encode( - message: QueryProviderRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryProviderRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.auditor !== "") { writer.uint32(10).string(message.auditor); } @@ -170,10 +140,7 @@ export const QueryProviderRequest = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryProviderRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryProviderRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryProviderRequest(); @@ -198,7 +165,7 @@ export const QueryProviderRequest = { return { $type: QueryProviderRequest.$type, auditor: isSet(object.auditor) ? String(object.auditor) : "", - owner: isSet(object.owner) ? String(object.owner) : "", + owner: isSet(object.owner) ? String(object.owner) : "" }; }, @@ -209,14 +176,12 @@ export const QueryProviderRequest = { return obj; }, - fromPartial, I>>( - object: I - ): QueryProviderRequest { + fromPartial, I>>(object: I): QueryProviderRequest { const message = createBaseQueryProviderRequest(); message.auditor = object.auditor ?? ""; message.owner = object.owner ?? ""; return message; - }, + } }; messageTypeRegistry.set(QueryProviderRequest.$type, QueryProviderRequest); @@ -224,27 +189,21 @@ messageTypeRegistry.set(QueryProviderRequest.$type, QueryProviderRequest); function createBaseQueryAllProvidersAttributesRequest(): QueryAllProvidersAttributesRequest { return { $type: "akash.audit.v1beta2.QueryAllProvidersAttributesRequest", - pagination: undefined, + pagination: undefined }; } export const QueryAllProvidersAttributesRequest = { $type: "akash.audit.v1beta2.QueryAllProvidersAttributesRequest" as const, - encode( - message: QueryAllProvidersAttributesRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryAllProvidersAttributesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.pagination !== undefined) { PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryAllProvidersAttributesRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryAllProvidersAttributesRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryAllProvidersAttributesRequest(); @@ -265,53 +224,37 @@ export const QueryAllProvidersAttributesRequest = { fromJSON(object: any): QueryAllProvidersAttributesRequest { return { $type: QueryAllProvidersAttributesRequest.$type, - pagination: isSet(object.pagination) - ? PageRequest.fromJSON(object.pagination) - : undefined, + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined }; }, toJSON(message: QueryAllProvidersAttributesRequest): unknown { const obj: any = {}; - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); return obj; }, - fromPartial< - I extends Exact, I> - >(object: I): QueryAllProvidersAttributesRequest { + fromPartial, I>>(object: I): QueryAllProvidersAttributesRequest { const message = createBaseQueryAllProvidersAttributesRequest(); - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; return message; - }, + } }; -messageTypeRegistry.set( - QueryAllProvidersAttributesRequest.$type, - QueryAllProvidersAttributesRequest -); +messageTypeRegistry.set(QueryAllProvidersAttributesRequest.$type, QueryAllProvidersAttributesRequest); function createBaseQueryProviderAttributesRequest(): QueryProviderAttributesRequest { return { $type: "akash.audit.v1beta2.QueryProviderAttributesRequest", owner: "", - pagination: undefined, + pagination: undefined }; } export const QueryProviderAttributesRequest = { $type: "akash.audit.v1beta2.QueryProviderAttributesRequest" as const, - encode( - message: QueryProviderAttributesRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryProviderAttributesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -321,10 +264,7 @@ export const QueryProviderAttributesRequest = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryProviderAttributesRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryProviderAttributesRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryProviderAttributesRequest(); @@ -349,55 +289,39 @@ export const QueryProviderAttributesRequest = { return { $type: QueryProviderAttributesRequest.$type, owner: isSet(object.owner) ? String(object.owner) : "", - pagination: isSet(object.pagination) - ? PageRequest.fromJSON(object.pagination) - : undefined, + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined }; }, toJSON(message: QueryProviderAttributesRequest): unknown { const obj: any = {}; message.owner !== undefined && (obj.owner = message.owner); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryProviderAttributesRequest { + fromPartial, I>>(object: I): QueryProviderAttributesRequest { const message = createBaseQueryProviderAttributesRequest(); message.owner = object.owner ?? ""; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; return message; - }, + } }; -messageTypeRegistry.set( - QueryProviderAttributesRequest.$type, - QueryProviderAttributesRequest -); +messageTypeRegistry.set(QueryProviderAttributesRequest.$type, QueryProviderAttributesRequest); function createBaseQueryProviderAuditorRequest(): QueryProviderAuditorRequest { return { $type: "akash.audit.v1beta2.QueryProviderAuditorRequest", auditor: "", - owner: "", + owner: "" }; } export const QueryProviderAuditorRequest = { $type: "akash.audit.v1beta2.QueryProviderAuditorRequest" as const, - encode( - message: QueryProviderAuditorRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryProviderAuditorRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.auditor !== "") { writer.uint32(10).string(message.auditor); } @@ -407,10 +331,7 @@ export const QueryProviderAuditorRequest = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryProviderAuditorRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryProviderAuditorRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryProviderAuditorRequest(); @@ -435,7 +356,7 @@ export const QueryProviderAuditorRequest = { return { $type: QueryProviderAuditorRequest.$type, auditor: isSet(object.auditor) ? String(object.auditor) : "", - owner: isSet(object.owner) ? String(object.owner) : "", + owner: isSet(object.owner) ? String(object.owner) : "" }; }, @@ -446,36 +367,28 @@ export const QueryProviderAuditorRequest = { return obj; }, - fromPartial, I>>( - object: I - ): QueryProviderAuditorRequest { + fromPartial, I>>(object: I): QueryProviderAuditorRequest { const message = createBaseQueryProviderAuditorRequest(); message.auditor = object.auditor ?? ""; message.owner = object.owner ?? ""; return message; - }, + } }; -messageTypeRegistry.set( - QueryProviderAuditorRequest.$type, - QueryProviderAuditorRequest -); +messageTypeRegistry.set(QueryProviderAuditorRequest.$type, QueryProviderAuditorRequest); function createBaseQueryAuditorAttributesRequest(): QueryAuditorAttributesRequest { return { $type: "akash.audit.v1beta2.QueryAuditorAttributesRequest", auditor: "", - pagination: undefined, + pagination: undefined }; } export const QueryAuditorAttributesRequest = { $type: "akash.audit.v1beta2.QueryAuditorAttributesRequest" as const, - encode( - message: QueryAuditorAttributesRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryAuditorAttributesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.auditor !== "") { writer.uint32(10).string(message.auditor); } @@ -485,10 +398,7 @@ export const QueryAuditorAttributesRequest = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryAuditorAttributesRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryAuditorAttributesRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryAuditorAttributesRequest(); @@ -513,39 +423,26 @@ export const QueryAuditorAttributesRequest = { return { $type: QueryAuditorAttributesRequest.$type, auditor: isSet(object.auditor) ? String(object.auditor) : "", - pagination: isSet(object.pagination) - ? PageRequest.fromJSON(object.pagination) - : undefined, + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined }; }, toJSON(message: QueryAuditorAttributesRequest): unknown { const obj: any = {}; message.auditor !== undefined && (obj.auditor = message.auditor); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryAuditorAttributesRequest { + fromPartial, I>>(object: I): QueryAuditorAttributesRequest { const message = createBaseQueryAuditorAttributesRequest(); message.auditor = object.auditor ?? ""; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; return message; - }, + } }; -messageTypeRegistry.set( - QueryAuditorAttributesRequest.$type, - QueryAuditorAttributesRequest -); +messageTypeRegistry.set(QueryAuditorAttributesRequest.$type, QueryAuditorAttributesRequest); /** Query defines the gRPC querier service */ export interface Query { @@ -554,33 +451,25 @@ export interface Query { * buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE * buf:lint:ignore RPC_RESPONSE_STANDARD_NAME */ - AllProvidersAttributes( - request: QueryAllProvidersAttributesRequest - ): Promise; + AllProvidersAttributes(request: QueryAllProvidersAttributesRequest): Promise; /** * ProviderAttributes queries all provider signed attributes * buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE * buf:lint:ignore RPC_RESPONSE_STANDARD_NAME */ - ProviderAttributes( - request: QueryProviderAttributesRequest - ): Promise; + ProviderAttributes(request: QueryProviderAttributesRequest): Promise; /** * ProviderAuditorAttributes queries provider signed attributes by specific auditor * buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE * buf:lint:ignore RPC_RESPONSE_STANDARD_NAME */ - ProviderAuditorAttributes( - request: QueryProviderAuditorRequest - ): Promise; + ProviderAuditorAttributes(request: QueryProviderAuditorRequest): Promise; /** * AuditorAttributes queries all providers signed by this auditor * buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE * buf:lint:ignore RPC_RESPONSE_STANDARD_NAME */ - AuditorAttributes( - request: QueryAuditorAttributesRequest - ): Promise; + AuditorAttributes(request: QueryAuditorAttributesRequest): Promise; } export class QueryClientImpl implements Query { @@ -592,99 +481,53 @@ export class QueryClientImpl implements Query { this.ProviderAuditorAttributes = this.ProviderAuditorAttributes.bind(this); this.AuditorAttributes = this.AuditorAttributes.bind(this); } - AllProvidersAttributes( - request: QueryAllProvidersAttributesRequest - ): Promise { + AllProvidersAttributes(request: QueryAllProvidersAttributesRequest): Promise { const data = QueryAllProvidersAttributesRequest.encode(request).finish(); - const promise = this.rpc.request( - "akash.audit.v1beta2.Query", - "AllProvidersAttributes", - data - ); - return promise.then((data) => - QueryProvidersResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.audit.v1beta2.Query", "AllProvidersAttributes", data); + return promise.then(data => QueryProvidersResponse.decode(new _m0.Reader(data))); } - ProviderAttributes( - request: QueryProviderAttributesRequest - ): Promise { + ProviderAttributes(request: QueryProviderAttributesRequest): Promise { const data = QueryProviderAttributesRequest.encode(request).finish(); - const promise = this.rpc.request( - "akash.audit.v1beta2.Query", - "ProviderAttributes", - data - ); - return promise.then((data) => - QueryProvidersResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.audit.v1beta2.Query", "ProviderAttributes", data); + return promise.then(data => QueryProvidersResponse.decode(new _m0.Reader(data))); } - ProviderAuditorAttributes( - request: QueryProviderAuditorRequest - ): Promise { + ProviderAuditorAttributes(request: QueryProviderAuditorRequest): Promise { const data = QueryProviderAuditorRequest.encode(request).finish(); - const promise = this.rpc.request( - "akash.audit.v1beta2.Query", - "ProviderAuditorAttributes", - data - ); - return promise.then((data) => - QueryProvidersResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.audit.v1beta2.Query", "ProviderAuditorAttributes", data); + return promise.then(data => QueryProvidersResponse.decode(new _m0.Reader(data))); } - AuditorAttributes( - request: QueryAuditorAttributesRequest - ): Promise { + AuditorAttributes(request: QueryAuditorAttributesRequest): Promise { const data = QueryAuditorAttributesRequest.encode(request).finish(); - const promise = this.rpc.request( - "akash.audit.v1beta2.Query", - "AuditorAttributes", - data - ); - return promise.then((data) => - QueryProvidersResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.audit.v1beta2.Query", "AuditorAttributes", data); + return promise.then(data => QueryProvidersResponse.decode(new _m0.Reader(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/audit/v1beta3/audit.ts b/src/protobuf/akash/audit/v1beta3/audit.ts index 0b73f8d..cc56653 100644 --- a/src/protobuf/akash/audit/v1beta3/audit.ts +++ b/src/protobuf/akash/audit/v1beta3/audit.ts @@ -66,17 +66,14 @@ function createBaseProvider(): Provider { $type: "akash.audit.v1beta3.Provider", owner: "", auditor: "", - attributes: [], + attributes: [] }; } export const Provider = { $type: "akash.audit.v1beta3.Provider" as const, - encode( - message: Provider, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Provider, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -118,9 +115,7 @@ export const Provider = { $type: Provider.$type, owner: isSet(object.owner) ? String(object.owner) : "", auditor: isSet(object.auditor) ? String(object.auditor) : "", - attributes: Array.isArray(object?.attributes) - ? object.attributes.map((e: any) => Attribute.fromJSON(e)) - : [], + attributes: Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromJSON(e)) : [] }; }, @@ -129,9 +124,7 @@ export const Provider = { message.owner !== undefined && (obj.owner = message.owner); message.auditor !== undefined && (obj.auditor = message.auditor); if (message.attributes) { - obj.attributes = message.attributes.map((e) => - e ? Attribute.toJSON(e) : undefined - ); + obj.attributes = message.attributes.map(e => (e ? Attribute.toJSON(e) : undefined)); } else { obj.attributes = []; } @@ -142,10 +135,9 @@ export const Provider = { const message = createBaseProvider(); message.owner = object.owner ?? ""; message.auditor = object.auditor ?? ""; - message.attributes = - object.attributes?.map((e) => Attribute.fromPartial(e)) || []; + message.attributes = object.attributes?.map(e => Attribute.fromPartial(e)) || []; return message; - }, + } }; messageTypeRegistry.set(Provider.$type, Provider); @@ -155,17 +147,14 @@ function createBaseAuditedAttributes(): AuditedAttributes { $type: "akash.audit.v1beta3.AuditedAttributes", owner: "", auditor: "", - attributes: [], + attributes: [] }; } export const AuditedAttributes = { $type: "akash.audit.v1beta3.AuditedAttributes" as const, - encode( - message: AuditedAttributes, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: AuditedAttributes, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -207,9 +196,7 @@ export const AuditedAttributes = { $type: AuditedAttributes.$type, owner: isSet(object.owner) ? String(object.owner) : "", auditor: isSet(object.auditor) ? String(object.auditor) : "", - attributes: Array.isArray(object?.attributes) - ? object.attributes.map((e: any) => Attribute.fromJSON(e)) - : [], + attributes: Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromJSON(e)) : [] }; }, @@ -218,25 +205,20 @@ export const AuditedAttributes = { message.owner !== undefined && (obj.owner = message.owner); message.auditor !== undefined && (obj.auditor = message.auditor); if (message.attributes) { - obj.attributes = message.attributes.map((e) => - e ? Attribute.toJSON(e) : undefined - ); + obj.attributes = message.attributes.map(e => (e ? Attribute.toJSON(e) : undefined)); } else { obj.attributes = []; } return obj; }, - fromPartial, I>>( - object: I - ): AuditedAttributes { + fromPartial, I>>(object: I): AuditedAttributes { const message = createBaseAuditedAttributes(); message.owner = object.owner ?? ""; message.auditor = object.auditor ?? ""; - message.attributes = - object.attributes?.map((e) => Attribute.fromPartial(e)) || []; + message.attributes = object.attributes?.map(e => Attribute.fromPartial(e)) || []; return message; - }, + } }; messageTypeRegistry.set(AuditedAttributes.$type, AuditedAttributes); @@ -248,10 +230,7 @@ function createBaseAttributesResponse(): AttributesResponse { export const AttributesResponse = { $type: "akash.audit.v1beta3.AttributesResponse" as const, - encode( - message: AttributesResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: AttributesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.attributes) { AuditedAttributes.encode(v!, writer.uint32(10).fork()).ldelim(); } @@ -266,9 +245,7 @@ export const AttributesResponse = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.attributes.push( - AuditedAttributes.decode(reader, reader.uint32()) - ); + message.attributes.push(AuditedAttributes.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -281,32 +258,25 @@ export const AttributesResponse = { fromJSON(object: any): AttributesResponse { return { $type: AttributesResponse.$type, - attributes: Array.isArray(object?.attributes) - ? object.attributes.map((e: any) => AuditedAttributes.fromJSON(e)) - : [], + attributes: Array.isArray(object?.attributes) ? object.attributes.map((e: any) => AuditedAttributes.fromJSON(e)) : [] }; }, toJSON(message: AttributesResponse): unknown { const obj: any = {}; if (message.attributes) { - obj.attributes = message.attributes.map((e) => - e ? AuditedAttributes.toJSON(e) : undefined - ); + obj.attributes = message.attributes.map(e => (e ? AuditedAttributes.toJSON(e) : undefined)); } else { obj.attributes = []; } return obj; }, - fromPartial, I>>( - object: I - ): AttributesResponse { + fromPartial, I>>(object: I): AttributesResponse { const message = createBaseAttributesResponse(); - message.attributes = - object.attributes?.map((e) => AuditedAttributes.fromPartial(e)) || []; + message.attributes = object.attributes?.map(e => AuditedAttributes.fromPartial(e)) || []; return message; - }, + } }; messageTypeRegistry.set(AttributesResponse.$type, AttributesResponse); @@ -315,17 +285,14 @@ function createBaseAttributesFilters(): AttributesFilters { return { $type: "akash.audit.v1beta3.AttributesFilters", auditors: [], - owners: [], + owners: [] }; } export const AttributesFilters = { $type: "akash.audit.v1beta3.AttributesFilters" as const, - encode( - message: AttributesFilters, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: AttributesFilters, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.auditors) { writer.uint32(10).string(v!); } @@ -359,38 +326,32 @@ export const AttributesFilters = { fromJSON(object: any): AttributesFilters { return { $type: AttributesFilters.$type, - auditors: Array.isArray(object?.auditors) - ? object.auditors.map((e: any) => String(e)) - : [], - owners: Array.isArray(object?.owners) - ? object.owners.map((e: any) => String(e)) - : [], + auditors: Array.isArray(object?.auditors) ? object.auditors.map((e: any) => String(e)) : [], + owners: Array.isArray(object?.owners) ? object.owners.map((e: any) => String(e)) : [] }; }, toJSON(message: AttributesFilters): unknown { const obj: any = {}; if (message.auditors) { - obj.auditors = message.auditors.map((e) => e); + obj.auditors = message.auditors.map(e => e); } else { obj.auditors = []; } if (message.owners) { - obj.owners = message.owners.map((e) => e); + obj.owners = message.owners.map(e => e); } else { obj.owners = []; } return obj; }, - fromPartial, I>>( - object: I - ): AttributesFilters { + fromPartial, I>>(object: I): AttributesFilters { const message = createBaseAttributesFilters(); - message.auditors = object.auditors?.map((e) => e) || []; - message.owners = object.owners?.map((e) => e) || []; + message.auditors = object.auditors?.map(e => e) || []; + message.owners = object.owners?.map(e => e) || []; return message; - }, + } }; messageTypeRegistry.set(AttributesFilters.$type, AttributesFilters); @@ -400,17 +361,14 @@ function createBaseMsgSignProviderAttributes(): MsgSignProviderAttributes { $type: "akash.audit.v1beta3.MsgSignProviderAttributes", owner: "", auditor: "", - attributes: [], + attributes: [] }; } export const MsgSignProviderAttributes = { $type: "akash.audit.v1beta3.MsgSignProviderAttributes" as const, - encode( - message: MsgSignProviderAttributes, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MsgSignProviderAttributes, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -423,10 +381,7 @@ export const MsgSignProviderAttributes = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgSignProviderAttributes { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgSignProviderAttributes { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgSignProviderAttributes(); @@ -455,9 +410,7 @@ export const MsgSignProviderAttributes = { $type: MsgSignProviderAttributes.$type, owner: isSet(object.owner) ? String(object.owner) : "", auditor: isSet(object.auditor) ? String(object.auditor) : "", - attributes: Array.isArray(object?.attributes) - ? object.attributes.map((e: any) => Attribute.fromJSON(e)) - : [], + attributes: Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromJSON(e)) : [] }; }, @@ -466,31 +419,23 @@ export const MsgSignProviderAttributes = { message.owner !== undefined && (obj.owner = message.owner); message.auditor !== undefined && (obj.auditor = message.auditor); if (message.attributes) { - obj.attributes = message.attributes.map((e) => - e ? Attribute.toJSON(e) : undefined - ); + obj.attributes = message.attributes.map(e => (e ? Attribute.toJSON(e) : undefined)); } else { obj.attributes = []; } return obj; }, - fromPartial, I>>( - object: I - ): MsgSignProviderAttributes { + fromPartial, I>>(object: I): MsgSignProviderAttributes { const message = createBaseMsgSignProviderAttributes(); message.owner = object.owner ?? ""; message.auditor = object.auditor ?? ""; - message.attributes = - object.attributes?.map((e) => Attribute.fromPartial(e)) || []; + message.attributes = object.attributes?.map(e => Attribute.fromPartial(e)) || []; return message; - }, + } }; -messageTypeRegistry.set( - MsgSignProviderAttributes.$type, - MsgSignProviderAttributes -); +messageTypeRegistry.set(MsgSignProviderAttributes.$type, MsgSignProviderAttributes); function createBaseMsgSignProviderAttributesResponse(): MsgSignProviderAttributesResponse { return { $type: "akash.audit.v1beta3.MsgSignProviderAttributesResponse" }; @@ -499,17 +444,11 @@ function createBaseMsgSignProviderAttributesResponse(): MsgSignProviderAttribute export const MsgSignProviderAttributesResponse = { $type: "akash.audit.v1beta3.MsgSignProviderAttributesResponse" as const, - encode( - _: MsgSignProviderAttributesResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: MsgSignProviderAttributesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgSignProviderAttributesResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgSignProviderAttributesResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgSignProviderAttributesResponse(); @@ -526,7 +465,7 @@ export const MsgSignProviderAttributesResponse = { fromJSON(_: any): MsgSignProviderAttributesResponse { return { - $type: MsgSignProviderAttributesResponse.$type, + $type: MsgSignProviderAttributesResponse.$type }; }, @@ -535,35 +474,27 @@ export const MsgSignProviderAttributesResponse = { return obj; }, - fromPartial< - I extends Exact, I> - >(_: I): MsgSignProviderAttributesResponse { + fromPartial, I>>(_: I): MsgSignProviderAttributesResponse { const message = createBaseMsgSignProviderAttributesResponse(); return message; - }, + } }; -messageTypeRegistry.set( - MsgSignProviderAttributesResponse.$type, - MsgSignProviderAttributesResponse -); +messageTypeRegistry.set(MsgSignProviderAttributesResponse.$type, MsgSignProviderAttributesResponse); function createBaseMsgDeleteProviderAttributes(): MsgDeleteProviderAttributes { return { $type: "akash.audit.v1beta3.MsgDeleteProviderAttributes", owner: "", auditor: "", - keys: [], + keys: [] }; } export const MsgDeleteProviderAttributes = { $type: "akash.audit.v1beta3.MsgDeleteProviderAttributes" as const, - encode( - message: MsgDeleteProviderAttributes, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MsgDeleteProviderAttributes, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -576,10 +507,7 @@ export const MsgDeleteProviderAttributes = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgDeleteProviderAttributes { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgDeleteProviderAttributes { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgDeleteProviderAttributes(); @@ -608,9 +536,7 @@ export const MsgDeleteProviderAttributes = { $type: MsgDeleteProviderAttributes.$type, owner: isSet(object.owner) ? String(object.owner) : "", auditor: isSet(object.auditor) ? String(object.auditor) : "", - keys: Array.isArray(object?.keys) - ? object.keys.map((e: any) => String(e)) - : [], + keys: Array.isArray(object?.keys) ? object.keys.map((e: any) => String(e)) : [] }; }, @@ -619,28 +545,23 @@ export const MsgDeleteProviderAttributes = { message.owner !== undefined && (obj.owner = message.owner); message.auditor !== undefined && (obj.auditor = message.auditor); if (message.keys) { - obj.keys = message.keys.map((e) => e); + obj.keys = message.keys.map(e => e); } else { obj.keys = []; } return obj; }, - fromPartial, I>>( - object: I - ): MsgDeleteProviderAttributes { + fromPartial, I>>(object: I): MsgDeleteProviderAttributes { const message = createBaseMsgDeleteProviderAttributes(); message.owner = object.owner ?? ""; message.auditor = object.auditor ?? ""; - message.keys = object.keys?.map((e) => e) || []; + message.keys = object.keys?.map(e => e) || []; return message; - }, + } }; -messageTypeRegistry.set( - MsgDeleteProviderAttributes.$type, - MsgDeleteProviderAttributes -); +messageTypeRegistry.set(MsgDeleteProviderAttributes.$type, MsgDeleteProviderAttributes); function createBaseMsgDeleteProviderAttributesResponse(): MsgDeleteProviderAttributesResponse { return { $type: "akash.audit.v1beta3.MsgDeleteProviderAttributesResponse" }; @@ -649,17 +570,11 @@ function createBaseMsgDeleteProviderAttributesResponse(): MsgDeleteProviderAttri export const MsgDeleteProviderAttributesResponse = { $type: "akash.audit.v1beta3.MsgDeleteProviderAttributesResponse" as const, - encode( - _: MsgDeleteProviderAttributesResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: MsgDeleteProviderAttributesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgDeleteProviderAttributesResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgDeleteProviderAttributesResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgDeleteProviderAttributesResponse(); @@ -676,7 +591,7 @@ export const MsgDeleteProviderAttributesResponse = { fromJSON(_: any): MsgDeleteProviderAttributesResponse { return { - $type: MsgDeleteProviderAttributesResponse.$type, + $type: MsgDeleteProviderAttributesResponse.$type }; }, @@ -685,29 +600,20 @@ export const MsgDeleteProviderAttributesResponse = { return obj; }, - fromPartial< - I extends Exact, I> - >(_: I): MsgDeleteProviderAttributesResponse { + fromPartial, I>>(_: I): MsgDeleteProviderAttributesResponse { const message = createBaseMsgDeleteProviderAttributesResponse(); return message; - }, + } }; -messageTypeRegistry.set( - MsgDeleteProviderAttributesResponse.$type, - MsgDeleteProviderAttributesResponse -); +messageTypeRegistry.set(MsgDeleteProviderAttributesResponse.$type, MsgDeleteProviderAttributesResponse); /** Msg defines the provider Msg service */ export interface Msg { /** SignProviderAttributes defines a method that signs provider attributes */ - SignProviderAttributes( - request: MsgSignProviderAttributes - ): Promise; + SignProviderAttributes(request: MsgSignProviderAttributes): Promise; /** DeleteProviderAttributes defines a method that deletes provider attributes */ - DeleteProviderAttributes( - request: MsgDeleteProviderAttributes - ): Promise; + DeleteProviderAttributes(request: MsgDeleteProviderAttributes): Promise; } export class MsgClientImpl implements Msg { @@ -717,71 +623,41 @@ export class MsgClientImpl implements Msg { this.SignProviderAttributes = this.SignProviderAttributes.bind(this); this.DeleteProviderAttributes = this.DeleteProviderAttributes.bind(this); } - SignProviderAttributes( - request: MsgSignProviderAttributes - ): Promise { + SignProviderAttributes(request: MsgSignProviderAttributes): Promise { const data = MsgSignProviderAttributes.encode(request).finish(); - const promise = this.rpc.request( - "akash.audit.v1beta3.Msg", - "SignProviderAttributes", - data - ); - return promise.then((data) => - MsgSignProviderAttributesResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.audit.v1beta3.Msg", "SignProviderAttributes", data); + return promise.then(data => MsgSignProviderAttributesResponse.decode(new _m0.Reader(data))); } - DeleteProviderAttributes( - request: MsgDeleteProviderAttributes - ): Promise { + DeleteProviderAttributes(request: MsgDeleteProviderAttributes): Promise { const data = MsgDeleteProviderAttributes.encode(request).finish(); - const promise = this.rpc.request( - "akash.audit.v1beta3.Msg", - "DeleteProviderAttributes", - data - ); - return promise.then((data) => - MsgDeleteProviderAttributesResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.audit.v1beta3.Msg", "DeleteProviderAttributes", data); + return promise.then(data => MsgDeleteProviderAttributesResponse.decode(new _m0.Reader(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/audit/v1beta3/genesis.ts b/src/protobuf/akash/audit/v1beta3/genesis.ts index a61bac9..eddd326 100644 --- a/src/protobuf/akash/audit/v1beta3/genesis.ts +++ b/src/protobuf/akash/audit/v1beta3/genesis.ts @@ -19,10 +19,7 @@ function createBaseGenesisState(): GenesisState { export const GenesisState = { $type: "akash.audit.v1beta3.GenesisState" as const, - encode( - message: GenesisState, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: GenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.attributes) { AuditedAttributes.encode(v!, writer.uint32(10).fork()).ldelim(); } @@ -37,9 +34,7 @@ export const GenesisState = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.attributes.push( - AuditedAttributes.decode(reader, reader.uint32()) - ); + message.attributes.push(AuditedAttributes.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -52,64 +47,47 @@ export const GenesisState = { fromJSON(object: any): GenesisState { return { $type: GenesisState.$type, - attributes: Array.isArray(object?.attributes) - ? object.attributes.map((e: any) => AuditedAttributes.fromJSON(e)) - : [], + attributes: Array.isArray(object?.attributes) ? object.attributes.map((e: any) => AuditedAttributes.fromJSON(e)) : [] }; }, toJSON(message: GenesisState): unknown { const obj: any = {}; if (message.attributes) { - obj.attributes = message.attributes.map((e) => - e ? AuditedAttributes.toJSON(e) : undefined - ); + obj.attributes = message.attributes.map(e => (e ? AuditedAttributes.toJSON(e) : undefined)); } else { obj.attributes = []; } return obj; }, - fromPartial, I>>( - object: I - ): GenesisState { + fromPartial, I>>(object: I): GenesisState { const message = createBaseGenesisState(); - message.attributes = - object.attributes?.map((e) => AuditedAttributes.fromPartial(e)) || []; + message.attributes = object.attributes?.map(e => AuditedAttributes.fromPartial(e)) || []; return message; - }, + } }; messageTypeRegistry.set(GenesisState.$type, GenesisState); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/audit/v1beta3/query.ts b/src/protobuf/akash/audit/v1beta3/query.ts index ce6c162..59be257 100644 --- a/src/protobuf/akash/audit/v1beta3/query.ts +++ b/src/protobuf/akash/audit/v1beta3/query.ts @@ -2,10 +2,7 @@ import { messageTypeRegistry } from "../../../typeRegistry"; import Long from "long"; import { Provider } from "./audit"; -import { - PageResponse, - PageRequest, -} from "../../../cosmos/base/query/v1beta1/pagination"; +import { PageResponse, PageRequest } from "../../../cosmos/base/query/v1beta1/pagination"; import * as _m0 from "protobufjs/minimal"; export const protobufPackage = "akash.audit.v1beta3"; @@ -55,33 +52,24 @@ function createBaseQueryProvidersResponse(): QueryProvidersResponse { return { $type: "akash.audit.v1beta3.QueryProvidersResponse", providers: [], - pagination: undefined, + pagination: undefined }; } export const QueryProvidersResponse = { $type: "akash.audit.v1beta3.QueryProvidersResponse" as const, - encode( - message: QueryProvidersResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryProvidersResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.providers) { Provider.encode(v!, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); + PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryProvidersResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryProvidersResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryProvidersResponse(); @@ -105,43 +93,28 @@ export const QueryProvidersResponse = { fromJSON(object: any): QueryProvidersResponse { return { $type: QueryProvidersResponse.$type, - providers: Array.isArray(object?.providers) - ? object.providers.map((e: any) => Provider.fromJSON(e)) - : [], - pagination: isSet(object.pagination) - ? PageResponse.fromJSON(object.pagination) - : undefined, + providers: Array.isArray(object?.providers) ? object.providers.map((e: any) => Provider.fromJSON(e)) : [], + pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined }; }, toJSON(message: QueryProvidersResponse): unknown { const obj: any = {}; if (message.providers) { - obj.providers = message.providers.map((e) => - e ? Provider.toJSON(e) : undefined - ); + obj.providers = message.providers.map(e => (e ? Provider.toJSON(e) : undefined)); } else { obj.providers = []; } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryProvidersResponse { + fromPartial, I>>(object: I): QueryProvidersResponse { const message = createBaseQueryProvidersResponse(); - message.providers = - object.providers?.map((e) => Provider.fromPartial(e)) || []; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageResponse.fromPartial(object.pagination) - : undefined; + message.providers = object.providers?.map(e => Provider.fromPartial(e)) || []; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryProvidersResponse.$type, QueryProvidersResponse); @@ -150,17 +123,14 @@ function createBaseQueryProviderRequest(): QueryProviderRequest { return { $type: "akash.audit.v1beta3.QueryProviderRequest", auditor: "", - owner: "", + owner: "" }; } export const QueryProviderRequest = { $type: "akash.audit.v1beta3.QueryProviderRequest" as const, - encode( - message: QueryProviderRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryProviderRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.auditor !== "") { writer.uint32(10).string(message.auditor); } @@ -170,10 +140,7 @@ export const QueryProviderRequest = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryProviderRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryProviderRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryProviderRequest(); @@ -198,7 +165,7 @@ export const QueryProviderRequest = { return { $type: QueryProviderRequest.$type, auditor: isSet(object.auditor) ? String(object.auditor) : "", - owner: isSet(object.owner) ? String(object.owner) : "", + owner: isSet(object.owner) ? String(object.owner) : "" }; }, @@ -209,14 +176,12 @@ export const QueryProviderRequest = { return obj; }, - fromPartial, I>>( - object: I - ): QueryProviderRequest { + fromPartial, I>>(object: I): QueryProviderRequest { const message = createBaseQueryProviderRequest(); message.auditor = object.auditor ?? ""; message.owner = object.owner ?? ""; return message; - }, + } }; messageTypeRegistry.set(QueryProviderRequest.$type, QueryProviderRequest); @@ -224,27 +189,21 @@ messageTypeRegistry.set(QueryProviderRequest.$type, QueryProviderRequest); function createBaseQueryAllProvidersAttributesRequest(): QueryAllProvidersAttributesRequest { return { $type: "akash.audit.v1beta3.QueryAllProvidersAttributesRequest", - pagination: undefined, + pagination: undefined }; } export const QueryAllProvidersAttributesRequest = { $type: "akash.audit.v1beta3.QueryAllProvidersAttributesRequest" as const, - encode( - message: QueryAllProvidersAttributesRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryAllProvidersAttributesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.pagination !== undefined) { PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryAllProvidersAttributesRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryAllProvidersAttributesRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryAllProvidersAttributesRequest(); @@ -265,53 +224,37 @@ export const QueryAllProvidersAttributesRequest = { fromJSON(object: any): QueryAllProvidersAttributesRequest { return { $type: QueryAllProvidersAttributesRequest.$type, - pagination: isSet(object.pagination) - ? PageRequest.fromJSON(object.pagination) - : undefined, + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined }; }, toJSON(message: QueryAllProvidersAttributesRequest): unknown { const obj: any = {}; - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); return obj; }, - fromPartial< - I extends Exact, I> - >(object: I): QueryAllProvidersAttributesRequest { + fromPartial, I>>(object: I): QueryAllProvidersAttributesRequest { const message = createBaseQueryAllProvidersAttributesRequest(); - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; return message; - }, + } }; -messageTypeRegistry.set( - QueryAllProvidersAttributesRequest.$type, - QueryAllProvidersAttributesRequest -); +messageTypeRegistry.set(QueryAllProvidersAttributesRequest.$type, QueryAllProvidersAttributesRequest); function createBaseQueryProviderAttributesRequest(): QueryProviderAttributesRequest { return { $type: "akash.audit.v1beta3.QueryProviderAttributesRequest", owner: "", - pagination: undefined, + pagination: undefined }; } export const QueryProviderAttributesRequest = { $type: "akash.audit.v1beta3.QueryProviderAttributesRequest" as const, - encode( - message: QueryProviderAttributesRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryProviderAttributesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -321,10 +264,7 @@ export const QueryProviderAttributesRequest = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryProviderAttributesRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryProviderAttributesRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryProviderAttributesRequest(); @@ -349,55 +289,39 @@ export const QueryProviderAttributesRequest = { return { $type: QueryProviderAttributesRequest.$type, owner: isSet(object.owner) ? String(object.owner) : "", - pagination: isSet(object.pagination) - ? PageRequest.fromJSON(object.pagination) - : undefined, + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined }; }, toJSON(message: QueryProviderAttributesRequest): unknown { const obj: any = {}; message.owner !== undefined && (obj.owner = message.owner); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryProviderAttributesRequest { + fromPartial, I>>(object: I): QueryProviderAttributesRequest { const message = createBaseQueryProviderAttributesRequest(); message.owner = object.owner ?? ""; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; return message; - }, + } }; -messageTypeRegistry.set( - QueryProviderAttributesRequest.$type, - QueryProviderAttributesRequest -); +messageTypeRegistry.set(QueryProviderAttributesRequest.$type, QueryProviderAttributesRequest); function createBaseQueryProviderAuditorRequest(): QueryProviderAuditorRequest { return { $type: "akash.audit.v1beta3.QueryProviderAuditorRequest", auditor: "", - owner: "", + owner: "" }; } export const QueryProviderAuditorRequest = { $type: "akash.audit.v1beta3.QueryProviderAuditorRequest" as const, - encode( - message: QueryProviderAuditorRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryProviderAuditorRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.auditor !== "") { writer.uint32(10).string(message.auditor); } @@ -407,10 +331,7 @@ export const QueryProviderAuditorRequest = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryProviderAuditorRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryProviderAuditorRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryProviderAuditorRequest(); @@ -435,7 +356,7 @@ export const QueryProviderAuditorRequest = { return { $type: QueryProviderAuditorRequest.$type, auditor: isSet(object.auditor) ? String(object.auditor) : "", - owner: isSet(object.owner) ? String(object.owner) : "", + owner: isSet(object.owner) ? String(object.owner) : "" }; }, @@ -446,36 +367,28 @@ export const QueryProviderAuditorRequest = { return obj; }, - fromPartial, I>>( - object: I - ): QueryProviderAuditorRequest { + fromPartial, I>>(object: I): QueryProviderAuditorRequest { const message = createBaseQueryProviderAuditorRequest(); message.auditor = object.auditor ?? ""; message.owner = object.owner ?? ""; return message; - }, + } }; -messageTypeRegistry.set( - QueryProviderAuditorRequest.$type, - QueryProviderAuditorRequest -); +messageTypeRegistry.set(QueryProviderAuditorRequest.$type, QueryProviderAuditorRequest); function createBaseQueryAuditorAttributesRequest(): QueryAuditorAttributesRequest { return { $type: "akash.audit.v1beta3.QueryAuditorAttributesRequest", auditor: "", - pagination: undefined, + pagination: undefined }; } export const QueryAuditorAttributesRequest = { $type: "akash.audit.v1beta3.QueryAuditorAttributesRequest" as const, - encode( - message: QueryAuditorAttributesRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryAuditorAttributesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.auditor !== "") { writer.uint32(10).string(message.auditor); } @@ -485,10 +398,7 @@ export const QueryAuditorAttributesRequest = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryAuditorAttributesRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryAuditorAttributesRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryAuditorAttributesRequest(); @@ -513,39 +423,26 @@ export const QueryAuditorAttributesRequest = { return { $type: QueryAuditorAttributesRequest.$type, auditor: isSet(object.auditor) ? String(object.auditor) : "", - pagination: isSet(object.pagination) - ? PageRequest.fromJSON(object.pagination) - : undefined, + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined }; }, toJSON(message: QueryAuditorAttributesRequest): unknown { const obj: any = {}; message.auditor !== undefined && (obj.auditor = message.auditor); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryAuditorAttributesRequest { + fromPartial, I>>(object: I): QueryAuditorAttributesRequest { const message = createBaseQueryAuditorAttributesRequest(); message.auditor = object.auditor ?? ""; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; return message; - }, + } }; -messageTypeRegistry.set( - QueryAuditorAttributesRequest.$type, - QueryAuditorAttributesRequest -); +messageTypeRegistry.set(QueryAuditorAttributesRequest.$type, QueryAuditorAttributesRequest); /** Query defines the gRPC querier service */ export interface Query { @@ -554,33 +451,25 @@ export interface Query { * buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE * buf:lint:ignore RPC_RESPONSE_STANDARD_NAME */ - AllProvidersAttributes( - request: QueryAllProvidersAttributesRequest - ): Promise; + AllProvidersAttributes(request: QueryAllProvidersAttributesRequest): Promise; /** * ProviderAttributes queries all provider signed attributes * buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE * buf:lint:ignore RPC_RESPONSE_STANDARD_NAME */ - ProviderAttributes( - request: QueryProviderAttributesRequest - ): Promise; + ProviderAttributes(request: QueryProviderAttributesRequest): Promise; /** * ProviderAuditorAttributes queries provider signed attributes by specific auditor * buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE * buf:lint:ignore RPC_RESPONSE_STANDARD_NAME */ - ProviderAuditorAttributes( - request: QueryProviderAuditorRequest - ): Promise; + ProviderAuditorAttributes(request: QueryProviderAuditorRequest): Promise; /** * AuditorAttributes queries all providers signed by this auditor * buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE * buf:lint:ignore RPC_RESPONSE_STANDARD_NAME */ - AuditorAttributes( - request: QueryAuditorAttributesRequest - ): Promise; + AuditorAttributes(request: QueryAuditorAttributesRequest): Promise; } export class QueryClientImpl implements Query { @@ -592,99 +481,53 @@ export class QueryClientImpl implements Query { this.ProviderAuditorAttributes = this.ProviderAuditorAttributes.bind(this); this.AuditorAttributes = this.AuditorAttributes.bind(this); } - AllProvidersAttributes( - request: QueryAllProvidersAttributesRequest - ): Promise { + AllProvidersAttributes(request: QueryAllProvidersAttributesRequest): Promise { const data = QueryAllProvidersAttributesRequest.encode(request).finish(); - const promise = this.rpc.request( - "akash.audit.v1beta3.Query", - "AllProvidersAttributes", - data - ); - return promise.then((data) => - QueryProvidersResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.audit.v1beta3.Query", "AllProvidersAttributes", data); + return promise.then(data => QueryProvidersResponse.decode(new _m0.Reader(data))); } - ProviderAttributes( - request: QueryProviderAttributesRequest - ): Promise { + ProviderAttributes(request: QueryProviderAttributesRequest): Promise { const data = QueryProviderAttributesRequest.encode(request).finish(); - const promise = this.rpc.request( - "akash.audit.v1beta3.Query", - "ProviderAttributes", - data - ); - return promise.then((data) => - QueryProvidersResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.audit.v1beta3.Query", "ProviderAttributes", data); + return promise.then(data => QueryProvidersResponse.decode(new _m0.Reader(data))); } - ProviderAuditorAttributes( - request: QueryProviderAuditorRequest - ): Promise { + ProviderAuditorAttributes(request: QueryProviderAuditorRequest): Promise { const data = QueryProviderAuditorRequest.encode(request).finish(); - const promise = this.rpc.request( - "akash.audit.v1beta3.Query", - "ProviderAuditorAttributes", - data - ); - return promise.then((data) => - QueryProvidersResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.audit.v1beta3.Query", "ProviderAuditorAttributes", data); + return promise.then(data => QueryProvidersResponse.decode(new _m0.Reader(data))); } - AuditorAttributes( - request: QueryAuditorAttributesRequest - ): Promise { + AuditorAttributes(request: QueryAuditorAttributesRequest): Promise { const data = QueryAuditorAttributesRequest.encode(request).finish(); - const promise = this.rpc.request( - "akash.audit.v1beta3.Query", - "AuditorAttributes", - data - ); - return promise.then((data) => - QueryProvidersResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.audit.v1beta3.Query", "AuditorAttributes", data); + return promise.then(data => QueryProvidersResponse.decode(new _m0.Reader(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/base/v1beta1/attribute.ts b/src/protobuf/akash/base/v1beta1/attribute.ts index f24e415..f317cb6 100644 --- a/src/protobuf/akash/base/v1beta1/attribute.ts +++ b/src/protobuf/akash/base/v1beta1/attribute.ts @@ -42,10 +42,7 @@ function createBaseAttribute(): Attribute { export const Attribute = { $type: "akash.base.v1beta1.Attribute" as const, - encode( - message: Attribute, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Attribute, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.key !== "") { writer.uint32(10).string(message.key); } @@ -80,7 +77,7 @@ export const Attribute = { return { $type: Attribute.$type, key: isSet(object.key) ? String(object.key) : "", - value: isSet(object.value) ? String(object.value) : "", + value: isSet(object.value) ? String(object.value) : "" }; }, @@ -91,14 +88,12 @@ export const Attribute = { return obj; }, - fromPartial, I>>( - object: I - ): Attribute { + fromPartial, I>>(object: I): Attribute { const message = createBaseAttribute(); message.key = object.key ?? ""; message.value = object.value ?? ""; return message; - }, + } }; messageTypeRegistry.set(Attribute.$type, Attribute); @@ -110,10 +105,7 @@ function createBaseSignedBy(): SignedBy { export const SignedBy = { $type: "akash.base.v1beta1.SignedBy" as const, - encode( - message: SignedBy, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: SignedBy, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.allOf) { writer.uint32(10).string(v!); } @@ -147,24 +139,20 @@ export const SignedBy = { fromJSON(object: any): SignedBy { return { $type: SignedBy.$type, - allOf: Array.isArray(object?.allOf) - ? object.allOf.map((e: any) => String(e)) - : [], - anyOf: Array.isArray(object?.anyOf) - ? object.anyOf.map((e: any) => String(e)) - : [], + allOf: Array.isArray(object?.allOf) ? object.allOf.map((e: any) => String(e)) : [], + anyOf: Array.isArray(object?.anyOf) ? object.anyOf.map((e: any) => String(e)) : [] }; }, toJSON(message: SignedBy): unknown { const obj: any = {}; if (message.allOf) { - obj.allOf = message.allOf.map((e) => e); + obj.allOf = message.allOf.map(e => e); } else { obj.allOf = []; } if (message.anyOf) { - obj.anyOf = message.anyOf.map((e) => e); + obj.anyOf = message.anyOf.map(e => e); } else { obj.anyOf = []; } @@ -173,10 +161,10 @@ export const SignedBy = { fromPartial, I>>(object: I): SignedBy { const message = createBaseSignedBy(); - message.allOf = object.allOf?.map((e) => e) || []; - message.anyOf = object.anyOf?.map((e) => e) || []; + message.allOf = object.allOf?.map(e => e) || []; + message.anyOf = object.anyOf?.map(e => e) || []; return message; - }, + } }; messageTypeRegistry.set(SignedBy.$type, SignedBy); @@ -185,17 +173,14 @@ function createBasePlacementRequirements(): PlacementRequirements { return { $type: "akash.base.v1beta1.PlacementRequirements", signedBy: undefined, - attributes: [], + attributes: [] }; } export const PlacementRequirements = { $type: "akash.base.v1beta1.PlacementRequirements" as const, - encode( - message: PlacementRequirements, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: PlacementRequirements, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.signedBy !== undefined) { SignedBy.encode(message.signedBy, writer.uint32(10).fork()).ldelim(); } @@ -205,10 +190,7 @@ export const PlacementRequirements = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): PlacementRequirements { + decode(input: _m0.Reader | Uint8Array, length?: number): PlacementRequirements { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBasePlacementRequirements(); @@ -232,75 +214,50 @@ export const PlacementRequirements = { fromJSON(object: any): PlacementRequirements { return { $type: PlacementRequirements.$type, - signedBy: isSet(object.signedBy) - ? SignedBy.fromJSON(object.signedBy) - : undefined, - attributes: Array.isArray(object?.attributes) - ? object.attributes.map((e: any) => Attribute.fromJSON(e)) - : [], + signedBy: isSet(object.signedBy) ? SignedBy.fromJSON(object.signedBy) : undefined, + attributes: Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromJSON(e)) : [] }; }, toJSON(message: PlacementRequirements): unknown { const obj: any = {}; - message.signedBy !== undefined && - (obj.signedBy = message.signedBy - ? SignedBy.toJSON(message.signedBy) - : undefined); + message.signedBy !== undefined && (obj.signedBy = message.signedBy ? SignedBy.toJSON(message.signedBy) : undefined); if (message.attributes) { - obj.attributes = message.attributes.map((e) => - e ? Attribute.toJSON(e) : undefined - ); + obj.attributes = message.attributes.map(e => (e ? Attribute.toJSON(e) : undefined)); } else { obj.attributes = []; } return obj; }, - fromPartial, I>>( - object: I - ): PlacementRequirements { + fromPartial, I>>(object: I): PlacementRequirements { const message = createBasePlacementRequirements(); - message.signedBy = - object.signedBy !== undefined && object.signedBy !== null - ? SignedBy.fromPartial(object.signedBy) - : undefined; - message.attributes = - object.attributes?.map((e) => Attribute.fromPartial(e)) || []; + message.signedBy = object.signedBy !== undefined && object.signedBy !== null ? SignedBy.fromPartial(object.signedBy) : undefined; + message.attributes = object.attributes?.map(e => Attribute.fromPartial(e)) || []; return message; - }, + } }; messageTypeRegistry.set(PlacementRequirements.$type, PlacementRequirements); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/base/v1beta1/endpoint.ts b/src/protobuf/akash/base/v1beta1/endpoint.ts index 2633c2f..cde6f71 100644 --- a/src/protobuf/akash/base/v1beta1/endpoint.ts +++ b/src/protobuf/akash/base/v1beta1/endpoint.ts @@ -17,7 +17,7 @@ export enum Endpoint_Kind { SHARED_HTTP = 0, /** RANDOM_PORT - Describes an endpoint that becomes a Kubernetes NodePort */ RANDOM_PORT = 1, - UNRECOGNIZED = -1, + UNRECOGNIZED = -1 } export function endpoint_KindFromJSON(object: any): Endpoint_Kind { @@ -54,10 +54,7 @@ function createBaseEndpoint(): Endpoint { export const Endpoint = { $type: "akash.base.v1beta1.Endpoint" as const, - encode( - message: Endpoint, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Endpoint, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.kind !== 0) { writer.uint32(8).int32(message.kind); } @@ -85,14 +82,13 @@ export const Endpoint = { fromJSON(object: any): Endpoint { return { $type: Endpoint.$type, - kind: isSet(object.kind) ? endpoint_KindFromJSON(object.kind) : 0, + kind: isSet(object.kind) ? endpoint_KindFromJSON(object.kind) : 0 }; }, toJSON(message: Endpoint): unknown { const obj: any = {}; - message.kind !== undefined && - (obj.kind = endpoint_KindToJSON(message.kind)); + message.kind !== undefined && (obj.kind = endpoint_KindToJSON(message.kind)); return obj; }, @@ -100,39 +96,29 @@ export const Endpoint = { const message = createBaseEndpoint(); message.kind = object.kind ?? 0; return message; - }, + } }; messageTypeRegistry.set(Endpoint.$type, Endpoint); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/base/v1beta1/resource.ts b/src/protobuf/akash/base/v1beta1/resource.ts index 90ffce7..52cd8ad 100644 --- a/src/protobuf/akash/base/v1beta1/resource.ts +++ b/src/protobuf/akash/base/v1beta1/resource.ts @@ -82,25 +82,16 @@ export const CPU = { fromJSON(object: any): CPU { return { $type: CPU.$type, - units: isSet(object.units) - ? ResourceValue.fromJSON(object.units) - : undefined, - attributes: Array.isArray(object?.attributes) - ? object.attributes.map((e: any) => Attribute.fromJSON(e)) - : [], + units: isSet(object.units) ? ResourceValue.fromJSON(object.units) : undefined, + attributes: Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromJSON(e)) : [] }; }, toJSON(message: CPU): unknown { const obj: any = {}; - message.units !== undefined && - (obj.units = message.units - ? ResourceValue.toJSON(message.units) - : undefined); + message.units !== undefined && (obj.units = message.units ? ResourceValue.toJSON(message.units) : undefined); if (message.attributes) { - obj.attributes = message.attributes.map((e) => - e ? Attribute.toJSON(e) : undefined - ); + obj.attributes = message.attributes.map(e => (e ? Attribute.toJSON(e) : undefined)); } else { obj.attributes = []; } @@ -109,14 +100,10 @@ export const CPU = { fromPartial, I>>(object: I): CPU { const message = createBaseCPU(); - message.units = - object.units !== undefined && object.units !== null - ? ResourceValue.fromPartial(object.units) - : undefined; - message.attributes = - object.attributes?.map((e) => Attribute.fromPartial(e)) || []; + message.units = object.units !== undefined && object.units !== null ? ResourceValue.fromPartial(object.units) : undefined; + message.attributes = object.attributes?.map(e => Attribute.fromPartial(e)) || []; return message; - }, + } }; messageTypeRegistry.set(CPU.$type, CPU); @@ -125,17 +112,14 @@ function createBaseMemory(): Memory { return { $type: "akash.base.v1beta1.Memory", quantity: undefined, - attributes: [], + attributes: [] }; } export const Memory = { $type: "akash.base.v1beta1.Memory" as const, - encode( - message: Memory, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Memory, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.quantity !== undefined) { ResourceValue.encode(message.quantity, writer.uint32(10).fork()).ldelim(); } @@ -169,25 +153,16 @@ export const Memory = { fromJSON(object: any): Memory { return { $type: Memory.$type, - quantity: isSet(object.quantity) - ? ResourceValue.fromJSON(object.quantity) - : undefined, - attributes: Array.isArray(object?.attributes) - ? object.attributes.map((e: any) => Attribute.fromJSON(e)) - : [], + quantity: isSet(object.quantity) ? ResourceValue.fromJSON(object.quantity) : undefined, + attributes: Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromJSON(e)) : [] }; }, toJSON(message: Memory): unknown { const obj: any = {}; - message.quantity !== undefined && - (obj.quantity = message.quantity - ? ResourceValue.toJSON(message.quantity) - : undefined); + message.quantity !== undefined && (obj.quantity = message.quantity ? ResourceValue.toJSON(message.quantity) : undefined); if (message.attributes) { - obj.attributes = message.attributes.map((e) => - e ? Attribute.toJSON(e) : undefined - ); + obj.attributes = message.attributes.map(e => (e ? Attribute.toJSON(e) : undefined)); } else { obj.attributes = []; } @@ -196,14 +171,10 @@ export const Memory = { fromPartial, I>>(object: I): Memory { const message = createBaseMemory(); - message.quantity = - object.quantity !== undefined && object.quantity !== null - ? ResourceValue.fromPartial(object.quantity) - : undefined; - message.attributes = - object.attributes?.map((e) => Attribute.fromPartial(e)) || []; + message.quantity = object.quantity !== undefined && object.quantity !== null ? ResourceValue.fromPartial(object.quantity) : undefined; + message.attributes = object.attributes?.map(e => Attribute.fromPartial(e)) || []; return message; - }, + } }; messageTypeRegistry.set(Memory.$type, Memory); @@ -212,17 +183,14 @@ function createBaseStorage(): Storage { return { $type: "akash.base.v1beta1.Storage", quantity: undefined, - attributes: [], + attributes: [] }; } export const Storage = { $type: "akash.base.v1beta1.Storage" as const, - encode( - message: Storage, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Storage, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.quantity !== undefined) { ResourceValue.encode(message.quantity, writer.uint32(10).fork()).ldelim(); } @@ -256,25 +224,16 @@ export const Storage = { fromJSON(object: any): Storage { return { $type: Storage.$type, - quantity: isSet(object.quantity) - ? ResourceValue.fromJSON(object.quantity) - : undefined, - attributes: Array.isArray(object?.attributes) - ? object.attributes.map((e: any) => Attribute.fromJSON(e)) - : [], + quantity: isSet(object.quantity) ? ResourceValue.fromJSON(object.quantity) : undefined, + attributes: Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromJSON(e)) : [] }; }, toJSON(message: Storage): unknown { const obj: any = {}; - message.quantity !== undefined && - (obj.quantity = message.quantity - ? ResourceValue.toJSON(message.quantity) - : undefined); + message.quantity !== undefined && (obj.quantity = message.quantity ? ResourceValue.toJSON(message.quantity) : undefined); if (message.attributes) { - obj.attributes = message.attributes.map((e) => - e ? Attribute.toJSON(e) : undefined - ); + obj.attributes = message.attributes.map(e => (e ? Attribute.toJSON(e) : undefined)); } else { obj.attributes = []; } @@ -283,14 +242,10 @@ export const Storage = { fromPartial, I>>(object: I): Storage { const message = createBaseStorage(); - message.quantity = - object.quantity !== undefined && object.quantity !== null - ? ResourceValue.fromPartial(object.quantity) - : undefined; - message.attributes = - object.attributes?.map((e) => Attribute.fromPartial(e)) || []; + message.quantity = object.quantity !== undefined && object.quantity !== null ? ResourceValue.fromPartial(object.quantity) : undefined; + message.attributes = object.attributes?.map(e => Attribute.fromPartial(e)) || []; return message; - }, + } }; messageTypeRegistry.set(Storage.$type, Storage); @@ -301,17 +256,14 @@ function createBaseResourceUnits(): ResourceUnits { cpu: undefined, memory: undefined, storage: undefined, - endpoints: [], + endpoints: [] }; } export const ResourceUnits = { $type: "akash.base.v1beta1.ResourceUnits" as const, - encode( - message: ResourceUnits, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: ResourceUnits, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.cpu !== undefined) { CPU.encode(message.cpu, writer.uint32(10).fork()).ldelim(); } @@ -359,87 +311,54 @@ export const ResourceUnits = { $type: ResourceUnits.$type, cpu: isSet(object.cpu) ? CPU.fromJSON(object.cpu) : undefined, memory: isSet(object.memory) ? Memory.fromJSON(object.memory) : undefined, - storage: isSet(object.storage) - ? Storage.fromJSON(object.storage) - : undefined, - endpoints: Array.isArray(object?.endpoints) - ? object.endpoints.map((e: any) => Endpoint.fromJSON(e)) - : [], + storage: isSet(object.storage) ? Storage.fromJSON(object.storage) : undefined, + endpoints: Array.isArray(object?.endpoints) ? object.endpoints.map((e: any) => Endpoint.fromJSON(e)) : [] }; }, toJSON(message: ResourceUnits): unknown { const obj: any = {}; - message.cpu !== undefined && - (obj.cpu = message.cpu ? CPU.toJSON(message.cpu) : undefined); - message.memory !== undefined && - (obj.memory = message.memory ? Memory.toJSON(message.memory) : undefined); - message.storage !== undefined && - (obj.storage = message.storage - ? Storage.toJSON(message.storage) - : undefined); + message.cpu !== undefined && (obj.cpu = message.cpu ? CPU.toJSON(message.cpu) : undefined); + message.memory !== undefined && (obj.memory = message.memory ? Memory.toJSON(message.memory) : undefined); + message.storage !== undefined && (obj.storage = message.storage ? Storage.toJSON(message.storage) : undefined); if (message.endpoints) { - obj.endpoints = message.endpoints.map((e) => - e ? Endpoint.toJSON(e) : undefined - ); + obj.endpoints = message.endpoints.map(e => (e ? Endpoint.toJSON(e) : undefined)); } else { obj.endpoints = []; } return obj; }, - fromPartial, I>>( - object: I - ): ResourceUnits { + fromPartial, I>>(object: I): ResourceUnits { const message = createBaseResourceUnits(); - message.cpu = - object.cpu !== undefined && object.cpu !== null - ? CPU.fromPartial(object.cpu) - : undefined; - message.memory = - object.memory !== undefined && object.memory !== null - ? Memory.fromPartial(object.memory) - : undefined; - message.storage = - object.storage !== undefined && object.storage !== null - ? Storage.fromPartial(object.storage) - : undefined; - message.endpoints = - object.endpoints?.map((e) => Endpoint.fromPartial(e)) || []; + message.cpu = object.cpu !== undefined && object.cpu !== null ? CPU.fromPartial(object.cpu) : undefined; + message.memory = object.memory !== undefined && object.memory !== null ? Memory.fromPartial(object.memory) : undefined; + message.storage = object.storage !== undefined && object.storage !== null ? Storage.fromPartial(object.storage) : undefined; + message.endpoints = object.endpoints?.map(e => Endpoint.fromPartial(e)) || []; return message; - }, + } }; messageTypeRegistry.set(ResourceUnits.$type, ResourceUnits); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/base/v1beta1/resourcevalue.ts b/src/protobuf/akash/base/v1beta1/resourcevalue.ts index 6275c48..14b6355 100644 --- a/src/protobuf/akash/base/v1beta1/resourcevalue.ts +++ b/src/protobuf/akash/base/v1beta1/resourcevalue.ts @@ -18,10 +18,7 @@ function createBaseResourceValue(): ResourceValue { export const ResourceValue = { $type: "akash.base.v1beta1.ResourceValue" as const, - encode( - message: ResourceValue, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: ResourceValue, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.val.length !== 0) { writer.uint32(10).bytes(message.val); } @@ -49,26 +46,21 @@ export const ResourceValue = { fromJSON(object: any): ResourceValue { return { $type: ResourceValue.$type, - val: isSet(object.val) ? bytesFromBase64(object.val) : new Uint8Array(), + val: isSet(object.val) ? bytesFromBase64(object.val) : new Uint8Array() }; }, toJSON(message: ResourceValue): unknown { const obj: any = {}; - message.val !== undefined && - (obj.val = base64FromBytes( - message.val !== undefined ? message.val : new Uint8Array() - )); + message.val !== undefined && (obj.val = base64FromBytes(message.val !== undefined ? message.val : new Uint8Array())); return obj; }, - fromPartial, I>>( - object: I - ): ResourceValue { + fromPartial, I>>(object: I): ResourceValue { const message = createBaseResourceValue(); message.val = object.val ?? new Uint8Array(); return message; - }, + } }; messageTypeRegistry.set(ResourceValue.$type, ResourceValue); @@ -84,9 +76,7 @@ var globalThis: any = (() => { throw "Unable to locate global object"; })(); -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); +const atob: (b64: string) => string = globalThis.atob || (b64 => globalThis.Buffer.from(b64, "base64").toString("binary")); function bytesFromBase64(b64: string): Uint8Array { const bin = atob(b64); const arr = new Uint8Array(bin.length); @@ -96,45 +86,33 @@ function bytesFromBase64(b64: string): Uint8Array { return arr; } -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); +const btoa: (bin: string) => string = globalThis.btoa || (bin => globalThis.Buffer.from(bin, "binary").toString("base64")); function base64FromBytes(arr: Uint8Array): string { const bin: string[] = []; - arr.forEach((byte) => { + arr.forEach(byte => { bin.push(String.fromCharCode(byte)); }); return btoa(bin.join("")); } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/base/v1beta2/attribute.ts b/src/protobuf/akash/base/v1beta2/attribute.ts index 5a01bd2..5df0168 100644 --- a/src/protobuf/akash/base/v1beta2/attribute.ts +++ b/src/protobuf/akash/base/v1beta2/attribute.ts @@ -42,10 +42,7 @@ function createBaseAttribute(): Attribute { export const Attribute = { $type: "akash.base.v1beta2.Attribute" as const, - encode( - message: Attribute, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Attribute, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.key !== "") { writer.uint32(10).string(message.key); } @@ -80,7 +77,7 @@ export const Attribute = { return { $type: Attribute.$type, key: isSet(object.key) ? String(object.key) : "", - value: isSet(object.value) ? String(object.value) : "", + value: isSet(object.value) ? String(object.value) : "" }; }, @@ -91,14 +88,12 @@ export const Attribute = { return obj; }, - fromPartial, I>>( - object: I - ): Attribute { + fromPartial, I>>(object: I): Attribute { const message = createBaseAttribute(); message.key = object.key ?? ""; message.value = object.value ?? ""; return message; - }, + } }; messageTypeRegistry.set(Attribute.$type, Attribute); @@ -110,10 +105,7 @@ function createBaseSignedBy(): SignedBy { export const SignedBy = { $type: "akash.base.v1beta2.SignedBy" as const, - encode( - message: SignedBy, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: SignedBy, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.allOf) { writer.uint32(10).string(v!); } @@ -147,24 +139,20 @@ export const SignedBy = { fromJSON(object: any): SignedBy { return { $type: SignedBy.$type, - allOf: Array.isArray(object?.allOf) - ? object.allOf.map((e: any) => String(e)) - : [], - anyOf: Array.isArray(object?.anyOf) - ? object.anyOf.map((e: any) => String(e)) - : [], + allOf: Array.isArray(object?.allOf) ? object.allOf.map((e: any) => String(e)) : [], + anyOf: Array.isArray(object?.anyOf) ? object.anyOf.map((e: any) => String(e)) : [] }; }, toJSON(message: SignedBy): unknown { const obj: any = {}; if (message.allOf) { - obj.allOf = message.allOf.map((e) => e); + obj.allOf = message.allOf.map(e => e); } else { obj.allOf = []; } if (message.anyOf) { - obj.anyOf = message.anyOf.map((e) => e); + obj.anyOf = message.anyOf.map(e => e); } else { obj.anyOf = []; } @@ -173,10 +161,10 @@ export const SignedBy = { fromPartial, I>>(object: I): SignedBy { const message = createBaseSignedBy(); - message.allOf = object.allOf?.map((e) => e) || []; - message.anyOf = object.anyOf?.map((e) => e) || []; + message.allOf = object.allOf?.map(e => e) || []; + message.anyOf = object.anyOf?.map(e => e) || []; return message; - }, + } }; messageTypeRegistry.set(SignedBy.$type, SignedBy); @@ -185,17 +173,14 @@ function createBasePlacementRequirements(): PlacementRequirements { return { $type: "akash.base.v1beta2.PlacementRequirements", signedBy: undefined, - attributes: [], + attributes: [] }; } export const PlacementRequirements = { $type: "akash.base.v1beta2.PlacementRequirements" as const, - encode( - message: PlacementRequirements, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: PlacementRequirements, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.signedBy !== undefined) { SignedBy.encode(message.signedBy, writer.uint32(10).fork()).ldelim(); } @@ -205,10 +190,7 @@ export const PlacementRequirements = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): PlacementRequirements { + decode(input: _m0.Reader | Uint8Array, length?: number): PlacementRequirements { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBasePlacementRequirements(); @@ -232,75 +214,50 @@ export const PlacementRequirements = { fromJSON(object: any): PlacementRequirements { return { $type: PlacementRequirements.$type, - signedBy: isSet(object.signedBy) - ? SignedBy.fromJSON(object.signedBy) - : undefined, - attributes: Array.isArray(object?.attributes) - ? object.attributes.map((e: any) => Attribute.fromJSON(e)) - : [], + signedBy: isSet(object.signedBy) ? SignedBy.fromJSON(object.signedBy) : undefined, + attributes: Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromJSON(e)) : [] }; }, toJSON(message: PlacementRequirements): unknown { const obj: any = {}; - message.signedBy !== undefined && - (obj.signedBy = message.signedBy - ? SignedBy.toJSON(message.signedBy) - : undefined); + message.signedBy !== undefined && (obj.signedBy = message.signedBy ? SignedBy.toJSON(message.signedBy) : undefined); if (message.attributes) { - obj.attributes = message.attributes.map((e) => - e ? Attribute.toJSON(e) : undefined - ); + obj.attributes = message.attributes.map(e => (e ? Attribute.toJSON(e) : undefined)); } else { obj.attributes = []; } return obj; }, - fromPartial, I>>( - object: I - ): PlacementRequirements { + fromPartial, I>>(object: I): PlacementRequirements { const message = createBasePlacementRequirements(); - message.signedBy = - object.signedBy !== undefined && object.signedBy !== null - ? SignedBy.fromPartial(object.signedBy) - : undefined; - message.attributes = - object.attributes?.map((e) => Attribute.fromPartial(e)) || []; + message.signedBy = object.signedBy !== undefined && object.signedBy !== null ? SignedBy.fromPartial(object.signedBy) : undefined; + message.attributes = object.attributes?.map(e => Attribute.fromPartial(e)) || []; return message; - }, + } }; messageTypeRegistry.set(PlacementRequirements.$type, PlacementRequirements); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/base/v1beta2/endpoint.ts b/src/protobuf/akash/base/v1beta2/endpoint.ts index 002d53b..eef949f 100644 --- a/src/protobuf/akash/base/v1beta2/endpoint.ts +++ b/src/protobuf/akash/base/v1beta2/endpoint.ts @@ -20,7 +20,7 @@ export enum Endpoint_Kind { RANDOM_PORT = 1, /** LEASED_IP - Describes an endpoint that becomes a leased IP */ LEASED_IP = 2, - UNRECOGNIZED = -1, + UNRECOGNIZED = -1 } export function endpoint_KindFromJSON(object: any): Endpoint_Kind { @@ -62,10 +62,7 @@ function createBaseEndpoint(): Endpoint { export const Endpoint = { $type: "akash.base.v1beta2.Endpoint" as const, - encode( - message: Endpoint, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Endpoint, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.kind !== 0) { writer.uint32(8).int32(message.kind); } @@ -100,18 +97,14 @@ export const Endpoint = { return { $type: Endpoint.$type, kind: isSet(object.kind) ? endpoint_KindFromJSON(object.kind) : 0, - sequenceNumber: isSet(object.sequenceNumber) - ? Number(object.sequenceNumber) - : 0, + sequenceNumber: isSet(object.sequenceNumber) ? Number(object.sequenceNumber) : 0 }; }, toJSON(message: Endpoint): unknown { const obj: any = {}; - message.kind !== undefined && - (obj.kind = endpoint_KindToJSON(message.kind)); - message.sequenceNumber !== undefined && - (obj.sequenceNumber = Math.round(message.sequenceNumber)); + message.kind !== undefined && (obj.kind = endpoint_KindToJSON(message.kind)); + message.sequenceNumber !== undefined && (obj.sequenceNumber = Math.round(message.sequenceNumber)); return obj; }, @@ -120,39 +113,29 @@ export const Endpoint = { message.kind = object.kind ?? 0; message.sequenceNumber = object.sequenceNumber ?? 0; return message; - }, + } }; messageTypeRegistry.set(Endpoint.$type, Endpoint); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/base/v1beta2/resource.ts b/src/protobuf/akash/base/v1beta2/resource.ts index b591535..7bc58b7 100644 --- a/src/protobuf/akash/base/v1beta2/resource.ts +++ b/src/protobuf/akash/base/v1beta2/resource.ts @@ -70,25 +70,16 @@ export const CPU = { fromJSON(object: any): CPU { return { $type: CPU.$type, - units: isSet(object.units) - ? ResourceValue.fromJSON(object.units) - : undefined, - attributes: Array.isArray(object?.attributes) - ? object.attributes.map((e: any) => Attribute.fromJSON(e)) - : [], + units: isSet(object.units) ? ResourceValue.fromJSON(object.units) : undefined, + attributes: Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromJSON(e)) : [] }; }, toJSON(message: CPU): unknown { const obj: any = {}; - message.units !== undefined && - (obj.units = message.units - ? ResourceValue.toJSON(message.units) - : undefined); + message.units !== undefined && (obj.units = message.units ? ResourceValue.toJSON(message.units) : undefined); if (message.attributes) { - obj.attributes = message.attributes.map((e) => - e ? Attribute.toJSON(e) : undefined - ); + obj.attributes = message.attributes.map(e => (e ? Attribute.toJSON(e) : undefined)); } else { obj.attributes = []; } @@ -97,14 +88,10 @@ export const CPU = { fromPartial, I>>(object: I): CPU { const message = createBaseCPU(); - message.units = - object.units !== undefined && object.units !== null - ? ResourceValue.fromPartial(object.units) - : undefined; - message.attributes = - object.attributes?.map((e) => Attribute.fromPartial(e)) || []; + message.units = object.units !== undefined && object.units !== null ? ResourceValue.fromPartial(object.units) : undefined; + message.attributes = object.attributes?.map(e => Attribute.fromPartial(e)) || []; return message; - }, + } }; messageTypeRegistry.set(CPU.$type, CPU); @@ -113,17 +100,14 @@ function createBaseMemory(): Memory { return { $type: "akash.base.v1beta2.Memory", quantity: undefined, - attributes: [], + attributes: [] }; } export const Memory = { $type: "akash.base.v1beta2.Memory" as const, - encode( - message: Memory, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Memory, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.quantity !== undefined) { ResourceValue.encode(message.quantity, writer.uint32(10).fork()).ldelim(); } @@ -157,25 +141,16 @@ export const Memory = { fromJSON(object: any): Memory { return { $type: Memory.$type, - quantity: isSet(object.quantity) - ? ResourceValue.fromJSON(object.quantity) - : undefined, - attributes: Array.isArray(object?.attributes) - ? object.attributes.map((e: any) => Attribute.fromJSON(e)) - : [], + quantity: isSet(object.quantity) ? ResourceValue.fromJSON(object.quantity) : undefined, + attributes: Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromJSON(e)) : [] }; }, toJSON(message: Memory): unknown { const obj: any = {}; - message.quantity !== undefined && - (obj.quantity = message.quantity - ? ResourceValue.toJSON(message.quantity) - : undefined); + message.quantity !== undefined && (obj.quantity = message.quantity ? ResourceValue.toJSON(message.quantity) : undefined); if (message.attributes) { - obj.attributes = message.attributes.map((e) => - e ? Attribute.toJSON(e) : undefined - ); + obj.attributes = message.attributes.map(e => (e ? Attribute.toJSON(e) : undefined)); } else { obj.attributes = []; } @@ -184,14 +159,10 @@ export const Memory = { fromPartial, I>>(object: I): Memory { const message = createBaseMemory(); - message.quantity = - object.quantity !== undefined && object.quantity !== null - ? ResourceValue.fromPartial(object.quantity) - : undefined; - message.attributes = - object.attributes?.map((e) => Attribute.fromPartial(e)) || []; + message.quantity = object.quantity !== undefined && object.quantity !== null ? ResourceValue.fromPartial(object.quantity) : undefined; + message.attributes = object.attributes?.map(e => Attribute.fromPartial(e)) || []; return message; - }, + } }; messageTypeRegistry.set(Memory.$type, Memory); @@ -201,17 +172,14 @@ function createBaseStorage(): Storage { $type: "akash.base.v1beta2.Storage", name: "", quantity: undefined, - attributes: [], + attributes: [] }; } export const Storage = { $type: "akash.base.v1beta2.Storage" as const, - encode( - message: Storage, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Storage, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.name !== "") { writer.uint32(10).string(message.name); } @@ -252,26 +220,17 @@ export const Storage = { return { $type: Storage.$type, name: isSet(object.name) ? String(object.name) : "", - quantity: isSet(object.quantity) - ? ResourceValue.fromJSON(object.quantity) - : undefined, - attributes: Array.isArray(object?.attributes) - ? object.attributes.map((e: any) => Attribute.fromJSON(e)) - : [], + quantity: isSet(object.quantity) ? ResourceValue.fromJSON(object.quantity) : undefined, + attributes: Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromJSON(e)) : [] }; }, toJSON(message: Storage): unknown { const obj: any = {}; message.name !== undefined && (obj.name = message.name); - message.quantity !== undefined && - (obj.quantity = message.quantity - ? ResourceValue.toJSON(message.quantity) - : undefined); + message.quantity !== undefined && (obj.quantity = message.quantity ? ResourceValue.toJSON(message.quantity) : undefined); if (message.attributes) { - obj.attributes = message.attributes.map((e) => - e ? Attribute.toJSON(e) : undefined - ); + obj.attributes = message.attributes.map(e => (e ? Attribute.toJSON(e) : undefined)); } else { obj.attributes = []; } @@ -281,46 +240,32 @@ export const Storage = { fromPartial, I>>(object: I): Storage { const message = createBaseStorage(); message.name = object.name ?? ""; - message.quantity = - object.quantity !== undefined && object.quantity !== null - ? ResourceValue.fromPartial(object.quantity) - : undefined; - message.attributes = - object.attributes?.map((e) => Attribute.fromPartial(e)) || []; + message.quantity = object.quantity !== undefined && object.quantity !== null ? ResourceValue.fromPartial(object.quantity) : undefined; + message.attributes = object.attributes?.map(e => Attribute.fromPartial(e)) || []; return message; - }, + } }; messageTypeRegistry.set(Storage.$type, Storage); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/base/v1beta2/resourceunits.ts b/src/protobuf/akash/base/v1beta2/resourceunits.ts index 539f82d..036b64b 100644 --- a/src/protobuf/akash/base/v1beta2/resourceunits.ts +++ b/src/protobuf/akash/base/v1beta2/resourceunits.ts @@ -25,17 +25,14 @@ function createBaseResourceUnits(): ResourceUnits { cpu: undefined, memory: undefined, storage: [], - endpoints: [], + endpoints: [] }; } export const ResourceUnits = { $type: "akash.base.v1beta2.ResourceUnits" as const, - encode( - message: ResourceUnits, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: ResourceUnits, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.cpu !== undefined) { CPU.encode(message.cpu, writer.uint32(10).fork()).ldelim(); } @@ -83,87 +80,58 @@ export const ResourceUnits = { $type: ResourceUnits.$type, cpu: isSet(object.cpu) ? CPU.fromJSON(object.cpu) : undefined, memory: isSet(object.memory) ? Memory.fromJSON(object.memory) : undefined, - storage: Array.isArray(object?.storage) - ? object.storage.map((e: any) => Storage.fromJSON(e)) - : [], - endpoints: Array.isArray(object?.endpoints) - ? object.endpoints.map((e: any) => Endpoint.fromJSON(e)) - : [], + storage: Array.isArray(object?.storage) ? object.storage.map((e: any) => Storage.fromJSON(e)) : [], + endpoints: Array.isArray(object?.endpoints) ? object.endpoints.map((e: any) => Endpoint.fromJSON(e)) : [] }; }, toJSON(message: ResourceUnits): unknown { const obj: any = {}; - message.cpu !== undefined && - (obj.cpu = message.cpu ? CPU.toJSON(message.cpu) : undefined); - message.memory !== undefined && - (obj.memory = message.memory ? Memory.toJSON(message.memory) : undefined); + message.cpu !== undefined && (obj.cpu = message.cpu ? CPU.toJSON(message.cpu) : undefined); + message.memory !== undefined && (obj.memory = message.memory ? Memory.toJSON(message.memory) : undefined); if (message.storage) { - obj.storage = message.storage.map((e) => - e ? Storage.toJSON(e) : undefined - ); + obj.storage = message.storage.map(e => (e ? Storage.toJSON(e) : undefined)); } else { obj.storage = []; } if (message.endpoints) { - obj.endpoints = message.endpoints.map((e) => - e ? Endpoint.toJSON(e) : undefined - ); + obj.endpoints = message.endpoints.map(e => (e ? Endpoint.toJSON(e) : undefined)); } else { obj.endpoints = []; } return obj; }, - fromPartial, I>>( - object: I - ): ResourceUnits { + fromPartial, I>>(object: I): ResourceUnits { const message = createBaseResourceUnits(); - message.cpu = - object.cpu !== undefined && object.cpu !== null - ? CPU.fromPartial(object.cpu) - : undefined; - message.memory = - object.memory !== undefined && object.memory !== null - ? Memory.fromPartial(object.memory) - : undefined; - message.storage = object.storage?.map((e) => Storage.fromPartial(e)) || []; - message.endpoints = - object.endpoints?.map((e) => Endpoint.fromPartial(e)) || []; + message.cpu = object.cpu !== undefined && object.cpu !== null ? CPU.fromPartial(object.cpu) : undefined; + message.memory = object.memory !== undefined && object.memory !== null ? Memory.fromPartial(object.memory) : undefined; + message.storage = object.storage?.map(e => Storage.fromPartial(e)) || []; + message.endpoints = object.endpoints?.map(e => Endpoint.fromPartial(e)) || []; return message; - }, + } }; messageTypeRegistry.set(ResourceUnits.$type, ResourceUnits); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/base/v1beta2/resourcevalue.ts b/src/protobuf/akash/base/v1beta2/resourcevalue.ts index 1cf2a85..5a31e7d 100644 --- a/src/protobuf/akash/base/v1beta2/resourcevalue.ts +++ b/src/protobuf/akash/base/v1beta2/resourcevalue.ts @@ -18,10 +18,7 @@ function createBaseResourceValue(): ResourceValue { export const ResourceValue = { $type: "akash.base.v1beta2.ResourceValue" as const, - encode( - message: ResourceValue, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: ResourceValue, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.val.length !== 0) { writer.uint32(10).bytes(message.val); } @@ -49,26 +46,21 @@ export const ResourceValue = { fromJSON(object: any): ResourceValue { return { $type: ResourceValue.$type, - val: isSet(object.val) ? bytesFromBase64(object.val) : new Uint8Array(), + val: isSet(object.val) ? bytesFromBase64(object.val) : new Uint8Array() }; }, toJSON(message: ResourceValue): unknown { const obj: any = {}; - message.val !== undefined && - (obj.val = base64FromBytes( - message.val !== undefined ? message.val : new Uint8Array() - )); + message.val !== undefined && (obj.val = base64FromBytes(message.val !== undefined ? message.val : new Uint8Array())); return obj; }, - fromPartial, I>>( - object: I - ): ResourceValue { + fromPartial, I>>(object: I): ResourceValue { const message = createBaseResourceValue(); message.val = object.val ?? new Uint8Array(); return message; - }, + } }; messageTypeRegistry.set(ResourceValue.$type, ResourceValue); @@ -84,9 +76,7 @@ var globalThis: any = (() => { throw "Unable to locate global object"; })(); -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); +const atob: (b64: string) => string = globalThis.atob || (b64 => globalThis.Buffer.from(b64, "base64").toString("binary")); function bytesFromBase64(b64: string): Uint8Array { const bin = atob(b64); const arr = new Uint8Array(bin.length); @@ -96,45 +86,33 @@ function bytesFromBase64(b64: string): Uint8Array { return arr; } -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); +const btoa: (bin: string) => string = globalThis.btoa || (bin => globalThis.Buffer.from(bin, "binary").toString("base64")); function base64FromBytes(arr: Uint8Array): string { const bin: string[] = []; - arr.forEach((byte) => { + arr.forEach(byte => { bin.push(String.fromCharCode(byte)); }); return btoa(bin.join("")); } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/base/v1beta3/attribute.ts b/src/protobuf/akash/base/v1beta3/attribute.ts index cab0bfd..32f8baa 100644 --- a/src/protobuf/akash/base/v1beta3/attribute.ts +++ b/src/protobuf/akash/base/v1beta3/attribute.ts @@ -42,10 +42,7 @@ function createBaseAttribute(): Attribute { export const Attribute = { $type: "akash.base.v1beta3.Attribute" as const, - encode( - message: Attribute, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Attribute, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.key !== "") { writer.uint32(10).string(message.key); } @@ -80,7 +77,7 @@ export const Attribute = { return { $type: Attribute.$type, key: isSet(object.key) ? String(object.key) : "", - value: isSet(object.value) ? String(object.value) : "", + value: isSet(object.value) ? String(object.value) : "" }; }, @@ -91,14 +88,12 @@ export const Attribute = { return obj; }, - fromPartial, I>>( - object: I - ): Attribute { + fromPartial, I>>(object: I): Attribute { const message = createBaseAttribute(); message.key = object.key ?? ""; message.value = object.value ?? ""; return message; - }, + } }; messageTypeRegistry.set(Attribute.$type, Attribute); @@ -110,10 +105,7 @@ function createBaseSignedBy(): SignedBy { export const SignedBy = { $type: "akash.base.v1beta3.SignedBy" as const, - encode( - message: SignedBy, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: SignedBy, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.allOf) { writer.uint32(10).string(v!); } @@ -147,24 +139,20 @@ export const SignedBy = { fromJSON(object: any): SignedBy { return { $type: SignedBy.$type, - allOf: Array.isArray(object?.allOf) - ? object.allOf.map((e: any) => String(e)) - : [], - anyOf: Array.isArray(object?.anyOf) - ? object.anyOf.map((e: any) => String(e)) - : [], + allOf: Array.isArray(object?.allOf) ? object.allOf.map((e: any) => String(e)) : [], + anyOf: Array.isArray(object?.anyOf) ? object.anyOf.map((e: any) => String(e)) : [] }; }, toJSON(message: SignedBy): unknown { const obj: any = {}; if (message.allOf) { - obj.allOf = message.allOf.map((e) => e); + obj.allOf = message.allOf.map(e => e); } else { obj.allOf = []; } if (message.anyOf) { - obj.anyOf = message.anyOf.map((e) => e); + obj.anyOf = message.anyOf.map(e => e); } else { obj.anyOf = []; } @@ -173,10 +161,10 @@ export const SignedBy = { fromPartial, I>>(object: I): SignedBy { const message = createBaseSignedBy(); - message.allOf = object.allOf?.map((e) => e) || []; - message.anyOf = object.anyOf?.map((e) => e) || []; + message.allOf = object.allOf?.map(e => e) || []; + message.anyOf = object.anyOf?.map(e => e) || []; return message; - }, + } }; messageTypeRegistry.set(SignedBy.$type, SignedBy); @@ -185,17 +173,14 @@ function createBasePlacementRequirements(): PlacementRequirements { return { $type: "akash.base.v1beta3.PlacementRequirements", signedBy: undefined, - attributes: [], + attributes: [] }; } export const PlacementRequirements = { $type: "akash.base.v1beta3.PlacementRequirements" as const, - encode( - message: PlacementRequirements, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: PlacementRequirements, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.signedBy !== undefined) { SignedBy.encode(message.signedBy, writer.uint32(10).fork()).ldelim(); } @@ -205,10 +190,7 @@ export const PlacementRequirements = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): PlacementRequirements { + decode(input: _m0.Reader | Uint8Array, length?: number): PlacementRequirements { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBasePlacementRequirements(); @@ -232,75 +214,50 @@ export const PlacementRequirements = { fromJSON(object: any): PlacementRequirements { return { $type: PlacementRequirements.$type, - signedBy: isSet(object.signedBy) - ? SignedBy.fromJSON(object.signedBy) - : undefined, - attributes: Array.isArray(object?.attributes) - ? object.attributes.map((e: any) => Attribute.fromJSON(e)) - : [], + signedBy: isSet(object.signedBy) ? SignedBy.fromJSON(object.signedBy) : undefined, + attributes: Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromJSON(e)) : [] }; }, toJSON(message: PlacementRequirements): unknown { const obj: any = {}; - message.signedBy !== undefined && - (obj.signedBy = message.signedBy - ? SignedBy.toJSON(message.signedBy) - : undefined); + message.signedBy !== undefined && (obj.signedBy = message.signedBy ? SignedBy.toJSON(message.signedBy) : undefined); if (message.attributes) { - obj.attributes = message.attributes.map((e) => - e ? Attribute.toJSON(e) : undefined - ); + obj.attributes = message.attributes.map(e => (e ? Attribute.toJSON(e) : undefined)); } else { obj.attributes = []; } return obj; }, - fromPartial, I>>( - object: I - ): PlacementRequirements { + fromPartial, I>>(object: I): PlacementRequirements { const message = createBasePlacementRequirements(); - message.signedBy = - object.signedBy !== undefined && object.signedBy !== null - ? SignedBy.fromPartial(object.signedBy) - : undefined; - message.attributes = - object.attributes?.map((e) => Attribute.fromPartial(e)) || []; + message.signedBy = object.signedBy !== undefined && object.signedBy !== null ? SignedBy.fromPartial(object.signedBy) : undefined; + message.attributes = object.attributes?.map(e => Attribute.fromPartial(e)) || []; return message; - }, + } }; messageTypeRegistry.set(PlacementRequirements.$type, PlacementRequirements); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/base/v1beta3/cpu.ts b/src/protobuf/akash/base/v1beta3/cpu.ts index 85d3d98..fbb1513 100644 --- a/src/protobuf/akash/base/v1beta3/cpu.ts +++ b/src/protobuf/akash/base/v1beta3/cpu.ts @@ -55,25 +55,16 @@ export const CPU = { fromJSON(object: any): CPU { return { $type: CPU.$type, - units: isSet(object.units) - ? ResourceValue.fromJSON(object.units) - : undefined, - attributes: Array.isArray(object?.attributes) - ? object.attributes.map((e: any) => Attribute.fromJSON(e)) - : [], + units: isSet(object.units) ? ResourceValue.fromJSON(object.units) : undefined, + attributes: Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromJSON(e)) : [] }; }, toJSON(message: CPU): unknown { const obj: any = {}; - message.units !== undefined && - (obj.units = message.units - ? ResourceValue.toJSON(message.units) - : undefined); + message.units !== undefined && (obj.units = message.units ? ResourceValue.toJSON(message.units) : undefined); if (message.attributes) { - obj.attributes = message.attributes.map((e) => - e ? Attribute.toJSON(e) : undefined - ); + obj.attributes = message.attributes.map(e => (e ? Attribute.toJSON(e) : undefined)); } else { obj.attributes = []; } @@ -82,46 +73,32 @@ export const CPU = { fromPartial, I>>(object: I): CPU { const message = createBaseCPU(); - message.units = - object.units !== undefined && object.units !== null - ? ResourceValue.fromPartial(object.units) - : undefined; - message.attributes = - object.attributes?.map((e) => Attribute.fromPartial(e)) || []; + message.units = object.units !== undefined && object.units !== null ? ResourceValue.fromPartial(object.units) : undefined; + message.attributes = object.attributes?.map(e => Attribute.fromPartial(e)) || []; return message; - }, + } }; messageTypeRegistry.set(CPU.$type, CPU); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/base/v1beta3/endpoint.ts b/src/protobuf/akash/base/v1beta3/endpoint.ts index b230fa8..f18c7f3 100644 --- a/src/protobuf/akash/base/v1beta3/endpoint.ts +++ b/src/protobuf/akash/base/v1beta3/endpoint.ts @@ -20,7 +20,7 @@ export enum Endpoint_Kind { RANDOM_PORT = 1, /** LEASED_IP - Describes an endpoint that becomes a leased IP */ LEASED_IP = 2, - UNRECOGNIZED = -1, + UNRECOGNIZED = -1 } export function endpoint_KindFromJSON(object: any): Endpoint_Kind { @@ -62,10 +62,7 @@ function createBaseEndpoint(): Endpoint { export const Endpoint = { $type: "akash.base.v1beta3.Endpoint" as const, - encode( - message: Endpoint, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Endpoint, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.kind !== 0) { writer.uint32(8).int32(message.kind); } @@ -100,18 +97,14 @@ export const Endpoint = { return { $type: Endpoint.$type, kind: isSet(object.kind) ? endpoint_KindFromJSON(object.kind) : 0, - sequenceNumber: isSet(object.sequenceNumber) - ? Number(object.sequenceNumber) - : 0, + sequenceNumber: isSet(object.sequenceNumber) ? Number(object.sequenceNumber) : 0 }; }, toJSON(message: Endpoint): unknown { const obj: any = {}; - message.kind !== undefined && - (obj.kind = endpoint_KindToJSON(message.kind)); - message.sequenceNumber !== undefined && - (obj.sequenceNumber = Math.round(message.sequenceNumber)); + message.kind !== undefined && (obj.kind = endpoint_KindToJSON(message.kind)); + message.sequenceNumber !== undefined && (obj.sequenceNumber = Math.round(message.sequenceNumber)); return obj; }, @@ -120,39 +113,29 @@ export const Endpoint = { message.kind = object.kind ?? 0; message.sequenceNumber = object.sequenceNumber ?? 0; return message; - }, + } }; messageTypeRegistry.set(Endpoint.$type, Endpoint); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/base/v1beta3/gpu.ts b/src/protobuf/akash/base/v1beta3/gpu.ts index 0514830..8831bb9 100644 --- a/src/protobuf/akash/base/v1beta3/gpu.ts +++ b/src/protobuf/akash/base/v1beta3/gpu.ts @@ -55,25 +55,16 @@ export const GPU = { fromJSON(object: any): GPU { return { $type: GPU.$type, - units: isSet(object.units) - ? ResourceValue.fromJSON(object.units) - : undefined, - attributes: Array.isArray(object?.attributes) - ? object.attributes.map((e: any) => Attribute.fromJSON(e)) - : [], + units: isSet(object.units) ? ResourceValue.fromJSON(object.units) : undefined, + attributes: Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromJSON(e)) : [] }; }, toJSON(message: GPU): unknown { const obj: any = {}; - message.units !== undefined && - (obj.units = message.units - ? ResourceValue.toJSON(message.units) - : undefined); + message.units !== undefined && (obj.units = message.units ? ResourceValue.toJSON(message.units) : undefined); if (message.attributes) { - obj.attributes = message.attributes.map((e) => - e ? Attribute.toJSON(e) : undefined - ); + obj.attributes = message.attributes.map(e => (e ? Attribute.toJSON(e) : undefined)); } else { obj.attributes = []; } @@ -82,46 +73,32 @@ export const GPU = { fromPartial, I>>(object: I): GPU { const message = createBaseGPU(); - message.units = - object.units !== undefined && object.units !== null - ? ResourceValue.fromPartial(object.units) - : undefined; - message.attributes = - object.attributes?.map((e) => Attribute.fromPartial(e)) || []; + message.units = object.units !== undefined && object.units !== null ? ResourceValue.fromPartial(object.units) : undefined; + message.attributes = object.attributes?.map(e => Attribute.fromPartial(e)) || []; return message; - }, + } }; messageTypeRegistry.set(GPU.$type, GPU); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/base/v1beta3/memory.ts b/src/protobuf/akash/base/v1beta3/memory.ts index bfe1abe..9cd321d 100644 --- a/src/protobuf/akash/base/v1beta3/memory.ts +++ b/src/protobuf/akash/base/v1beta3/memory.ts @@ -18,17 +18,14 @@ function createBaseMemory(): Memory { return { $type: "akash.base.v1beta3.Memory", quantity: undefined, - attributes: [], + attributes: [] }; } export const Memory = { $type: "akash.base.v1beta3.Memory" as const, - encode( - message: Memory, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Memory, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.quantity !== undefined) { ResourceValue.encode(message.quantity, writer.uint32(10).fork()).ldelim(); } @@ -62,25 +59,16 @@ export const Memory = { fromJSON(object: any): Memory { return { $type: Memory.$type, - quantity: isSet(object.quantity) - ? ResourceValue.fromJSON(object.quantity) - : undefined, - attributes: Array.isArray(object?.attributes) - ? object.attributes.map((e: any) => Attribute.fromJSON(e)) - : [], + quantity: isSet(object.quantity) ? ResourceValue.fromJSON(object.quantity) : undefined, + attributes: Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromJSON(e)) : [] }; }, toJSON(message: Memory): unknown { const obj: any = {}; - message.quantity !== undefined && - (obj.quantity = message.quantity - ? ResourceValue.toJSON(message.quantity) - : undefined); + message.quantity !== undefined && (obj.quantity = message.quantity ? ResourceValue.toJSON(message.quantity) : undefined); if (message.attributes) { - obj.attributes = message.attributes.map((e) => - e ? Attribute.toJSON(e) : undefined - ); + obj.attributes = message.attributes.map(e => (e ? Attribute.toJSON(e) : undefined)); } else { obj.attributes = []; } @@ -89,46 +77,32 @@ export const Memory = { fromPartial, I>>(object: I): Memory { const message = createBaseMemory(); - message.quantity = - object.quantity !== undefined && object.quantity !== null - ? ResourceValue.fromPartial(object.quantity) - : undefined; - message.attributes = - object.attributes?.map((e) => Attribute.fromPartial(e)) || []; + message.quantity = object.quantity !== undefined && object.quantity !== null ? ResourceValue.fromPartial(object.quantity) : undefined; + message.attributes = object.attributes?.map(e => Attribute.fromPartial(e)) || []; return message; - }, + } }; messageTypeRegistry.set(Memory.$type, Memory); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/base/v1beta3/resources.ts b/src/protobuf/akash/base/v1beta3/resources.ts index 840d837..d7facb3 100644 --- a/src/protobuf/akash/base/v1beta3/resources.ts +++ b/src/protobuf/akash/base/v1beta3/resources.ts @@ -32,17 +32,14 @@ function createBaseResources(): Resources { memory: undefined, storage: [], gpu: undefined, - endpoints: [], + endpoints: [] }; } export const Resources = { $type: "akash.base.v1beta3.Resources" as const, - encode( - message: Resources, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Resources, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== 0) { writer.uint32(8).uint32(message.id); } @@ -103,96 +100,63 @@ export const Resources = { id: isSet(object.id) ? Number(object.id) : 0, cpu: isSet(object.cpu) ? CPU.fromJSON(object.cpu) : undefined, memory: isSet(object.memory) ? Memory.fromJSON(object.memory) : undefined, - storage: Array.isArray(object?.storage) - ? object.storage.map((e: any) => Storage.fromJSON(e)) - : [], + storage: Array.isArray(object?.storage) ? object.storage.map((e: any) => Storage.fromJSON(e)) : [], gpu: isSet(object.gpu) ? GPU.fromJSON(object.gpu) : undefined, - endpoints: Array.isArray(object?.endpoints) - ? object.endpoints.map((e: any) => Endpoint.fromJSON(e)) - : [], + endpoints: Array.isArray(object?.endpoints) ? object.endpoints.map((e: any) => Endpoint.fromJSON(e)) : [] }; }, toJSON(message: Resources): unknown { const obj: any = {}; message.id !== undefined && (obj.id = Math.round(message.id)); - message.cpu !== undefined && - (obj.cpu = message.cpu ? CPU.toJSON(message.cpu) : undefined); - message.memory !== undefined && - (obj.memory = message.memory ? Memory.toJSON(message.memory) : undefined); + message.cpu !== undefined && (obj.cpu = message.cpu ? CPU.toJSON(message.cpu) : undefined); + message.memory !== undefined && (obj.memory = message.memory ? Memory.toJSON(message.memory) : undefined); if (message.storage) { - obj.storage = message.storage.map((e) => - e ? Storage.toJSON(e) : undefined - ); + obj.storage = message.storage.map(e => (e ? Storage.toJSON(e) : undefined)); } else { obj.storage = []; } - message.gpu !== undefined && - (obj.gpu = message.gpu ? GPU.toJSON(message.gpu) : undefined); + message.gpu !== undefined && (obj.gpu = message.gpu ? GPU.toJSON(message.gpu) : undefined); if (message.endpoints) { - obj.endpoints = message.endpoints.map((e) => - e ? Endpoint.toJSON(e) : undefined - ); + obj.endpoints = message.endpoints.map(e => (e ? Endpoint.toJSON(e) : undefined)); } else { obj.endpoints = []; } return obj; }, - fromPartial, I>>( - object: I - ): Resources { + fromPartial, I>>(object: I): Resources { const message = createBaseResources(); message.id = object.id ?? 0; - message.cpu = - object.cpu !== undefined && object.cpu !== null - ? CPU.fromPartial(object.cpu) - : undefined; - message.memory = - object.memory !== undefined && object.memory !== null - ? Memory.fromPartial(object.memory) - : undefined; - message.storage = object.storage?.map((e) => Storage.fromPartial(e)) || []; - message.gpu = - object.gpu !== undefined && object.gpu !== null - ? GPU.fromPartial(object.gpu) - : undefined; - message.endpoints = - object.endpoints?.map((e) => Endpoint.fromPartial(e)) || []; + message.cpu = object.cpu !== undefined && object.cpu !== null ? CPU.fromPartial(object.cpu) : undefined; + message.memory = object.memory !== undefined && object.memory !== null ? Memory.fromPartial(object.memory) : undefined; + message.storage = object.storage?.map(e => Storage.fromPartial(e)) || []; + message.gpu = object.gpu !== undefined && object.gpu !== null ? GPU.fromPartial(object.gpu) : undefined; + message.endpoints = object.endpoints?.map(e => Endpoint.fromPartial(e)) || []; return message; - }, + } }; messageTypeRegistry.set(Resources.$type, Resources); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/base/v1beta3/resourceunits.ts b/src/protobuf/akash/base/v1beta3/resourceunits.ts index 56510cd..7d843b5 100644 --- a/src/protobuf/akash/base/v1beta3/resourceunits.ts +++ b/src/protobuf/akash/base/v1beta3/resourceunits.ts @@ -30,17 +30,14 @@ function createBaseResourceUnits(): ResourceUnits { memory: undefined, storage: [], gpu: undefined, - endpoints: [], + endpoints: [] }; } export const ResourceUnits = { $type: "akash.base.v1beta3.ResourceUnits" as const, - encode( - message: ResourceUnits, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: ResourceUnits, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.cpu !== undefined) { CPU.encode(message.cpu, writer.uint32(10).fork()).ldelim(); } @@ -94,94 +91,61 @@ export const ResourceUnits = { $type: ResourceUnits.$type, cpu: isSet(object.cpu) ? CPU.fromJSON(object.cpu) : undefined, memory: isSet(object.memory) ? Memory.fromJSON(object.memory) : undefined, - storage: Array.isArray(object?.storage) - ? object.storage.map((e: any) => Storage.fromJSON(e)) - : [], + storage: Array.isArray(object?.storage) ? object.storage.map((e: any) => Storage.fromJSON(e)) : [], gpu: isSet(object.gpu) ? GPU.fromJSON(object.gpu) : undefined, - endpoints: Array.isArray(object?.endpoints) - ? object.endpoints.map((e: any) => Endpoint.fromJSON(e)) - : [], + endpoints: Array.isArray(object?.endpoints) ? object.endpoints.map((e: any) => Endpoint.fromJSON(e)) : [] }; }, toJSON(message: ResourceUnits): unknown { const obj: any = {}; - message.cpu !== undefined && - (obj.cpu = message.cpu ? CPU.toJSON(message.cpu) : undefined); - message.memory !== undefined && - (obj.memory = message.memory ? Memory.toJSON(message.memory) : undefined); + message.cpu !== undefined && (obj.cpu = message.cpu ? CPU.toJSON(message.cpu) : undefined); + message.memory !== undefined && (obj.memory = message.memory ? Memory.toJSON(message.memory) : undefined); if (message.storage) { - obj.storage = message.storage.map((e) => - e ? Storage.toJSON(e) : undefined - ); + obj.storage = message.storage.map(e => (e ? Storage.toJSON(e) : undefined)); } else { obj.storage = []; } - message.gpu !== undefined && - (obj.gpu = message.gpu ? GPU.toJSON(message.gpu) : undefined); + message.gpu !== undefined && (obj.gpu = message.gpu ? GPU.toJSON(message.gpu) : undefined); if (message.endpoints) { - obj.endpoints = message.endpoints.map((e) => - e ? Endpoint.toJSON(e) : undefined - ); + obj.endpoints = message.endpoints.map(e => (e ? Endpoint.toJSON(e) : undefined)); } else { obj.endpoints = []; } return obj; }, - fromPartial, I>>( - object: I - ): ResourceUnits { + fromPartial, I>>(object: I): ResourceUnits { const message = createBaseResourceUnits(); - message.cpu = - object.cpu !== undefined && object.cpu !== null - ? CPU.fromPartial(object.cpu) - : undefined; - message.memory = - object.memory !== undefined && object.memory !== null - ? Memory.fromPartial(object.memory) - : undefined; - message.storage = object.storage?.map((e) => Storage.fromPartial(e)) || []; - message.gpu = - object.gpu !== undefined && object.gpu !== null - ? GPU.fromPartial(object.gpu) - : undefined; - message.endpoints = - object.endpoints?.map((e) => Endpoint.fromPartial(e)) || []; + message.cpu = object.cpu !== undefined && object.cpu !== null ? CPU.fromPartial(object.cpu) : undefined; + message.memory = object.memory !== undefined && object.memory !== null ? Memory.fromPartial(object.memory) : undefined; + message.storage = object.storage?.map(e => Storage.fromPartial(e)) || []; + message.gpu = object.gpu !== undefined && object.gpu !== null ? GPU.fromPartial(object.gpu) : undefined; + message.endpoints = object.endpoints?.map(e => Endpoint.fromPartial(e)) || []; return message; - }, + } }; messageTypeRegistry.set(ResourceUnits.$type, ResourceUnits); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/base/v1beta3/resourcevalue.ts b/src/protobuf/akash/base/v1beta3/resourcevalue.ts index ee46efb..96084d7 100644 --- a/src/protobuf/akash/base/v1beta3/resourcevalue.ts +++ b/src/protobuf/akash/base/v1beta3/resourcevalue.ts @@ -18,10 +18,7 @@ function createBaseResourceValue(): ResourceValue { export const ResourceValue = { $type: "akash.base.v1beta3.ResourceValue" as const, - encode( - message: ResourceValue, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: ResourceValue, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.val.length !== 0) { writer.uint32(10).bytes(message.val); } @@ -49,26 +46,21 @@ export const ResourceValue = { fromJSON(object: any): ResourceValue { return { $type: ResourceValue.$type, - val: isSet(object.val) ? bytesFromBase64(object.val) : new Uint8Array(), + val: isSet(object.val) ? bytesFromBase64(object.val) : new Uint8Array() }; }, toJSON(message: ResourceValue): unknown { const obj: any = {}; - message.val !== undefined && - (obj.val = base64FromBytes( - message.val !== undefined ? message.val : new Uint8Array() - )); + message.val !== undefined && (obj.val = base64FromBytes(message.val !== undefined ? message.val : new Uint8Array())); return obj; }, - fromPartial, I>>( - object: I - ): ResourceValue { + fromPartial, I>>(object: I): ResourceValue { const message = createBaseResourceValue(); message.val = object.val ?? new Uint8Array(); return message; - }, + } }; messageTypeRegistry.set(ResourceValue.$type, ResourceValue); @@ -84,9 +76,7 @@ var globalThis: any = (() => { throw "Unable to locate global object"; })(); -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); +const atob: (b64: string) => string = globalThis.atob || (b64 => globalThis.Buffer.from(b64, "base64").toString("binary")); function bytesFromBase64(b64: string): Uint8Array { const bin = atob(b64); const arr = new Uint8Array(bin.length); @@ -96,45 +86,33 @@ function bytesFromBase64(b64: string): Uint8Array { return arr; } -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); +const btoa: (bin: string) => string = globalThis.btoa || (bin => globalThis.Buffer.from(bin, "binary").toString("base64")); function base64FromBytes(arr: Uint8Array): string { const bin: string[] = []; - arr.forEach((byte) => { + arr.forEach(byte => { bin.push(String.fromCharCode(byte)); }); return btoa(bin.join("")); } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/base/v1beta3/storage.ts b/src/protobuf/akash/base/v1beta3/storage.ts index 2860630..3c5273f 100644 --- a/src/protobuf/akash/base/v1beta3/storage.ts +++ b/src/protobuf/akash/base/v1beta3/storage.ts @@ -20,17 +20,14 @@ function createBaseStorage(): Storage { $type: "akash.base.v1beta3.Storage", name: "", quantity: undefined, - attributes: [], + attributes: [] }; } export const Storage = { $type: "akash.base.v1beta3.Storage" as const, - encode( - message: Storage, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Storage, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.name !== "") { writer.uint32(10).string(message.name); } @@ -71,26 +68,17 @@ export const Storage = { return { $type: Storage.$type, name: isSet(object.name) ? String(object.name) : "", - quantity: isSet(object.quantity) - ? ResourceValue.fromJSON(object.quantity) - : undefined, - attributes: Array.isArray(object?.attributes) - ? object.attributes.map((e: any) => Attribute.fromJSON(e)) - : [], + quantity: isSet(object.quantity) ? ResourceValue.fromJSON(object.quantity) : undefined, + attributes: Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromJSON(e)) : [] }; }, toJSON(message: Storage): unknown { const obj: any = {}; message.name !== undefined && (obj.name = message.name); - message.quantity !== undefined && - (obj.quantity = message.quantity - ? ResourceValue.toJSON(message.quantity) - : undefined); + message.quantity !== undefined && (obj.quantity = message.quantity ? ResourceValue.toJSON(message.quantity) : undefined); if (message.attributes) { - obj.attributes = message.attributes.map((e) => - e ? Attribute.toJSON(e) : undefined - ); + obj.attributes = message.attributes.map(e => (e ? Attribute.toJSON(e) : undefined)); } else { obj.attributes = []; } @@ -100,46 +88,32 @@ export const Storage = { fromPartial, I>>(object: I): Storage { const message = createBaseStorage(); message.name = object.name ?? ""; - message.quantity = - object.quantity !== undefined && object.quantity !== null - ? ResourceValue.fromPartial(object.quantity) - : undefined; - message.attributes = - object.attributes?.map((e) => Attribute.fromPartial(e)) || []; + message.quantity = object.quantity !== undefined && object.quantity !== null ? ResourceValue.fromPartial(object.quantity) : undefined; + message.attributes = object.attributes?.map(e => Attribute.fromPartial(e)) || []; return message; - }, + } }; messageTypeRegistry.set(Storage.$type, Storage); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/cert/v1beta1/cert.ts b/src/protobuf/akash/cert/v1beta1/cert.ts index 4bf7bab..cb0a9bd 100644 --- a/src/protobuf/akash/cert/v1beta1/cert.ts +++ b/src/protobuf/akash/cert/v1beta1/cert.ts @@ -28,7 +28,7 @@ export enum Certificate_State { valid = 1, /** revoked - CertificateRevoked denotes state for deployment closed */ revoked = 2, - UNRECOGNIZED = -1, + UNRECOGNIZED = -1 } export function certificate_StateFromJSON(object: any): Certificate_State { @@ -101,10 +101,7 @@ function createBaseCertificateID(): CertificateID { export const CertificateID = { $type: "akash.cert.v1beta1.CertificateID" as const, - encode( - message: CertificateID, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: CertificateID, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -139,7 +136,7 @@ export const CertificateID = { return { $type: CertificateID.$type, owner: isSet(object.owner) ? String(object.owner) : "", - serial: isSet(object.serial) ? String(object.serial) : "", + serial: isSet(object.serial) ? String(object.serial) : "" }; }, @@ -150,14 +147,12 @@ export const CertificateID = { return obj; }, - fromPartial, I>>( - object: I - ): CertificateID { + fromPartial, I>>(object: I): CertificateID { const message = createBaseCertificateID(); message.owner = object.owner ?? ""; message.serial = object.serial ?? ""; return message; - }, + } }; messageTypeRegistry.set(CertificateID.$type, CertificateID); @@ -167,17 +162,14 @@ function createBaseCertificate(): Certificate { $type: "akash.cert.v1beta1.Certificate", state: 0, cert: new Uint8Array(), - pubkey: new Uint8Array(), + pubkey: new Uint8Array() }; } export const Certificate = { $type: "akash.cert.v1beta1.Certificate" as const, - encode( - message: Certificate, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Certificate, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.state !== 0) { writer.uint32(16).int32(message.state); } @@ -218,39 +210,26 @@ export const Certificate = { return { $type: Certificate.$type, state: isSet(object.state) ? certificate_StateFromJSON(object.state) : 0, - cert: isSet(object.cert) - ? bytesFromBase64(object.cert) - : new Uint8Array(), - pubkey: isSet(object.pubkey) - ? bytesFromBase64(object.pubkey) - : new Uint8Array(), + cert: isSet(object.cert) ? bytesFromBase64(object.cert) : new Uint8Array(), + pubkey: isSet(object.pubkey) ? bytesFromBase64(object.pubkey) : new Uint8Array() }; }, toJSON(message: Certificate): unknown { const obj: any = {}; - message.state !== undefined && - (obj.state = certificate_StateToJSON(message.state)); - message.cert !== undefined && - (obj.cert = base64FromBytes( - message.cert !== undefined ? message.cert : new Uint8Array() - )); - message.pubkey !== undefined && - (obj.pubkey = base64FromBytes( - message.pubkey !== undefined ? message.pubkey : new Uint8Array() - )); + message.state !== undefined && (obj.state = certificate_StateToJSON(message.state)); + message.cert !== undefined && (obj.cert = base64FromBytes(message.cert !== undefined ? message.cert : new Uint8Array())); + message.pubkey !== undefined && (obj.pubkey = base64FromBytes(message.pubkey !== undefined ? message.pubkey : new Uint8Array())); return obj; }, - fromPartial, I>>( - object: I - ): Certificate { + fromPartial, I>>(object: I): Certificate { const message = createBaseCertificate(); message.state = object.state ?? 0; message.cert = object.cert ?? new Uint8Array(); message.pubkey = object.pubkey ?? new Uint8Array(); return message; - }, + } }; messageTypeRegistry.set(Certificate.$type, Certificate); @@ -260,17 +239,14 @@ function createBaseCertificateFilter(): CertificateFilter { $type: "akash.cert.v1beta1.CertificateFilter", owner: "", serial: "", - state: "", + state: "" }; } export const CertificateFilter = { $type: "akash.cert.v1beta1.CertificateFilter" as const, - encode( - message: CertificateFilter, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: CertificateFilter, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -312,7 +288,7 @@ export const CertificateFilter = { $type: CertificateFilter.$type, owner: isSet(object.owner) ? String(object.owner) : "", serial: isSet(object.serial) ? String(object.serial) : "", - state: isSet(object.state) ? String(object.state) : "", + state: isSet(object.state) ? String(object.state) : "" }; }, @@ -324,15 +300,13 @@ export const CertificateFilter = { return obj; }, - fromPartial, I>>( - object: I - ): CertificateFilter { + fromPartial, I>>(object: I): CertificateFilter { const message = createBaseCertificateFilter(); message.owner = object.owner ?? ""; message.serial = object.serial ?? ""; message.state = object.state ?? ""; return message; - }, + } }; messageTypeRegistry.set(CertificateFilter.$type, CertificateFilter); @@ -342,17 +316,14 @@ function createBaseMsgCreateCertificate(): MsgCreateCertificate { $type: "akash.cert.v1beta1.MsgCreateCertificate", owner: "", cert: new Uint8Array(), - pubkey: new Uint8Array(), + pubkey: new Uint8Array() }; } export const MsgCreateCertificate = { $type: "akash.cert.v1beta1.MsgCreateCertificate" as const, - encode( - message: MsgCreateCertificate, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MsgCreateCertificate, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -365,10 +336,7 @@ export const MsgCreateCertificate = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgCreateCertificate { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreateCertificate { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCreateCertificate(); @@ -396,38 +364,26 @@ export const MsgCreateCertificate = { return { $type: MsgCreateCertificate.$type, owner: isSet(object.owner) ? String(object.owner) : "", - cert: isSet(object.cert) - ? bytesFromBase64(object.cert) - : new Uint8Array(), - pubkey: isSet(object.pubkey) - ? bytesFromBase64(object.pubkey) - : new Uint8Array(), + cert: isSet(object.cert) ? bytesFromBase64(object.cert) : new Uint8Array(), + pubkey: isSet(object.pubkey) ? bytesFromBase64(object.pubkey) : new Uint8Array() }; }, toJSON(message: MsgCreateCertificate): unknown { const obj: any = {}; message.owner !== undefined && (obj.owner = message.owner); - message.cert !== undefined && - (obj.cert = base64FromBytes( - message.cert !== undefined ? message.cert : new Uint8Array() - )); - message.pubkey !== undefined && - (obj.pubkey = base64FromBytes( - message.pubkey !== undefined ? message.pubkey : new Uint8Array() - )); + message.cert !== undefined && (obj.cert = base64FromBytes(message.cert !== undefined ? message.cert : new Uint8Array())); + message.pubkey !== undefined && (obj.pubkey = base64FromBytes(message.pubkey !== undefined ? message.pubkey : new Uint8Array())); return obj; }, - fromPartial, I>>( - object: I - ): MsgCreateCertificate { + fromPartial, I>>(object: I): MsgCreateCertificate { const message = createBaseMsgCreateCertificate(); message.owner = object.owner ?? ""; message.cert = object.cert ?? new Uint8Array(); message.pubkey = object.pubkey ?? new Uint8Array(); return message; - }, + } }; messageTypeRegistry.set(MsgCreateCertificate.$type, MsgCreateCertificate); @@ -439,17 +395,11 @@ function createBaseMsgCreateCertificateResponse(): MsgCreateCertificateResponse export const MsgCreateCertificateResponse = { $type: "akash.cert.v1beta1.MsgCreateCertificateResponse" as const, - encode( - _: MsgCreateCertificateResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: MsgCreateCertificateResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgCreateCertificateResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreateCertificateResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCreateCertificateResponse(); @@ -466,7 +416,7 @@ export const MsgCreateCertificateResponse = { fromJSON(_: any): MsgCreateCertificateResponse { return { - $type: MsgCreateCertificateResponse.$type, + $type: MsgCreateCertificateResponse.$type }; }, @@ -475,18 +425,13 @@ export const MsgCreateCertificateResponse = { return obj; }, - fromPartial, I>>( - _: I - ): MsgCreateCertificateResponse { + fromPartial, I>>(_: I): MsgCreateCertificateResponse { const message = createBaseMsgCreateCertificateResponse(); return message; - }, + } }; -messageTypeRegistry.set( - MsgCreateCertificateResponse.$type, - MsgCreateCertificateResponse -); +messageTypeRegistry.set(MsgCreateCertificateResponse.$type, MsgCreateCertificateResponse); function createBaseMsgRevokeCertificate(): MsgRevokeCertificate { return { $type: "akash.cert.v1beta1.MsgRevokeCertificate", id: undefined }; @@ -495,20 +440,14 @@ function createBaseMsgRevokeCertificate(): MsgRevokeCertificate { export const MsgRevokeCertificate = { $type: "akash.cert.v1beta1.MsgRevokeCertificate" as const, - encode( - message: MsgRevokeCertificate, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MsgRevokeCertificate, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { CertificateID.encode(message.id, writer.uint32(10).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgRevokeCertificate { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgRevokeCertificate { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgRevokeCertificate(); @@ -529,27 +468,21 @@ export const MsgRevokeCertificate = { fromJSON(object: any): MsgRevokeCertificate { return { $type: MsgRevokeCertificate.$type, - id: isSet(object.id) ? CertificateID.fromJSON(object.id) : undefined, + id: isSet(object.id) ? CertificateID.fromJSON(object.id) : undefined }; }, toJSON(message: MsgRevokeCertificate): unknown { const obj: any = {}; - message.id !== undefined && - (obj.id = message.id ? CertificateID.toJSON(message.id) : undefined); + message.id !== undefined && (obj.id = message.id ? CertificateID.toJSON(message.id) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): MsgRevokeCertificate { + fromPartial, I>>(object: I): MsgRevokeCertificate { const message = createBaseMsgRevokeCertificate(); - message.id = - object.id !== undefined && object.id !== null - ? CertificateID.fromPartial(object.id) - : undefined; + message.id = object.id !== undefined && object.id !== null ? CertificateID.fromPartial(object.id) : undefined; return message; - }, + } }; messageTypeRegistry.set(MsgRevokeCertificate.$type, MsgRevokeCertificate); @@ -561,17 +494,11 @@ function createBaseMsgRevokeCertificateResponse(): MsgRevokeCertificateResponse export const MsgRevokeCertificateResponse = { $type: "akash.cert.v1beta1.MsgRevokeCertificateResponse" as const, - encode( - _: MsgRevokeCertificateResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: MsgRevokeCertificateResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgRevokeCertificateResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgRevokeCertificateResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgRevokeCertificateResponse(); @@ -588,7 +515,7 @@ export const MsgRevokeCertificateResponse = { fromJSON(_: any): MsgRevokeCertificateResponse { return { - $type: MsgRevokeCertificateResponse.$type, + $type: MsgRevokeCertificateResponse.$type }; }, @@ -597,29 +524,20 @@ export const MsgRevokeCertificateResponse = { return obj; }, - fromPartial, I>>( - _: I - ): MsgRevokeCertificateResponse { + fromPartial, I>>(_: I): MsgRevokeCertificateResponse { const message = createBaseMsgRevokeCertificateResponse(); return message; - }, + } }; -messageTypeRegistry.set( - MsgRevokeCertificateResponse.$type, - MsgRevokeCertificateResponse -); +messageTypeRegistry.set(MsgRevokeCertificateResponse.$type, MsgRevokeCertificateResponse); /** Msg defines the provider Msg service */ export interface Msg { /** CreateCertificate defines a method to create new certificate given proper inputs. */ - CreateCertificate( - request: MsgCreateCertificate - ): Promise; + CreateCertificate(request: MsgCreateCertificate): Promise; /** RevokeCertificate defines a method to revoke the certificate */ - RevokeCertificate( - request: MsgRevokeCertificate - ): Promise; + RevokeCertificate(request: MsgRevokeCertificate): Promise; } export class MsgClientImpl implements Msg { @@ -629,41 +547,21 @@ export class MsgClientImpl implements Msg { this.CreateCertificate = this.CreateCertificate.bind(this); this.RevokeCertificate = this.RevokeCertificate.bind(this); } - CreateCertificate( - request: MsgCreateCertificate - ): Promise { + CreateCertificate(request: MsgCreateCertificate): Promise { const data = MsgCreateCertificate.encode(request).finish(); - const promise = this.rpc.request( - "akash.cert.v1beta1.Msg", - "CreateCertificate", - data - ); - return promise.then((data) => - MsgCreateCertificateResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.cert.v1beta1.Msg", "CreateCertificate", data); + return promise.then(data => MsgCreateCertificateResponse.decode(new _m0.Reader(data))); } - RevokeCertificate( - request: MsgRevokeCertificate - ): Promise { + RevokeCertificate(request: MsgRevokeCertificate): Promise { const data = MsgRevokeCertificate.encode(request).finish(); - const promise = this.rpc.request( - "akash.cert.v1beta1.Msg", - "RevokeCertificate", - data - ); - return promise.then((data) => - MsgRevokeCertificateResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.cert.v1beta1.Msg", "RevokeCertificate", data); + return promise.then(data => MsgRevokeCertificateResponse.decode(new _m0.Reader(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } declare var self: any | undefined; @@ -677,9 +575,7 @@ var globalThis: any = (() => { throw "Unable to locate global object"; })(); -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); +const atob: (b64: string) => string = globalThis.atob || (b64 => globalThis.Buffer.from(b64, "base64").toString("binary")); function bytesFromBase64(b64: string): Uint8Array { const bin = atob(b64); const arr = new Uint8Array(bin.length); @@ -689,9 +585,7 @@ function bytesFromBase64(b64: string): Uint8Array { return arr; } -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); +const btoa: (bin: string) => string = globalThis.btoa || (bin => globalThis.Buffer.from(bin, "binary").toString("base64")); function base64FromBytes(arr: Uint8Array): string { const bin: string[] = []; for (const byte of arr) { @@ -700,34 +594,24 @@ function base64FromBytes(arr: Uint8Array): string { return btoa(bin.join("")); } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/cert/v1beta1/genesis.ts b/src/protobuf/akash/cert/v1beta1/genesis.ts index 2a96510..96322cf 100644 --- a/src/protobuf/akash/cert/v1beta1/genesis.ts +++ b/src/protobuf/akash/cert/v1beta1/genesis.ts @@ -23,25 +23,19 @@ function createBaseGenesisCertificate(): GenesisCertificate { return { $type: "akash.cert.v1beta1.GenesisCertificate", owner: "", - certificate: undefined, + certificate: undefined }; } export const GenesisCertificate = { $type: "akash.cert.v1beta1.GenesisCertificate" as const, - encode( - message: GenesisCertificate, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: GenesisCertificate, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } if (message.certificate !== undefined) { - Certificate.encode( - message.certificate, - writer.uint32(18).fork() - ).ldelim(); + Certificate.encode(message.certificate, writer.uint32(18).fork()).ldelim(); } return writer; }, @@ -71,33 +65,23 @@ export const GenesisCertificate = { return { $type: GenesisCertificate.$type, owner: isSet(object.owner) ? String(object.owner) : "", - certificate: isSet(object.certificate) - ? Certificate.fromJSON(object.certificate) - : undefined, + certificate: isSet(object.certificate) ? Certificate.fromJSON(object.certificate) : undefined }; }, toJSON(message: GenesisCertificate): unknown { const obj: any = {}; message.owner !== undefined && (obj.owner = message.owner); - message.certificate !== undefined && - (obj.certificate = message.certificate - ? Certificate.toJSON(message.certificate) - : undefined); + message.certificate !== undefined && (obj.certificate = message.certificate ? Certificate.toJSON(message.certificate) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): GenesisCertificate { + fromPartial, I>>(object: I): GenesisCertificate { const message = createBaseGenesisCertificate(); message.owner = object.owner ?? ""; - message.certificate = - object.certificate !== undefined && object.certificate !== null - ? Certificate.fromPartial(object.certificate) - : undefined; + message.certificate = object.certificate !== undefined && object.certificate !== null ? Certificate.fromPartial(object.certificate) : undefined; return message; - }, + } }; messageTypeRegistry.set(GenesisCertificate.$type, GenesisCertificate); @@ -109,10 +93,7 @@ function createBaseGenesisState(): GenesisState { export const GenesisState = { $type: "akash.cert.v1beta1.GenesisState" as const, - encode( - message: GenesisState, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: GenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.certificates) { GenesisCertificate.encode(v!, writer.uint32(10).fork()).ldelim(); } @@ -127,9 +108,7 @@ export const GenesisState = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.certificates.push( - GenesisCertificate.decode(reader, reader.uint32()) - ); + message.certificates.push(GenesisCertificate.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -142,64 +121,47 @@ export const GenesisState = { fromJSON(object: any): GenesisState { return { $type: GenesisState.$type, - certificates: Array.isArray(object?.certificates) - ? object.certificates.map((e: any) => GenesisCertificate.fromJSON(e)) - : [], + certificates: Array.isArray(object?.certificates) ? object.certificates.map((e: any) => GenesisCertificate.fromJSON(e)) : [] }; }, toJSON(message: GenesisState): unknown { const obj: any = {}; if (message.certificates) { - obj.certificates = message.certificates.map((e) => - e ? GenesisCertificate.toJSON(e) : undefined - ); + obj.certificates = message.certificates.map(e => (e ? GenesisCertificate.toJSON(e) : undefined)); } else { obj.certificates = []; } return obj; }, - fromPartial, I>>( - object: I - ): GenesisState { + fromPartial, I>>(object: I): GenesisState { const message = createBaseGenesisState(); - message.certificates = - object.certificates?.map((e) => GenesisCertificate.fromPartial(e)) || []; + message.certificates = object.certificates?.map(e => GenesisCertificate.fromPartial(e)) || []; return message; - }, + } }; messageTypeRegistry.set(GenesisState.$type, GenesisState); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/cert/v1beta1/query.ts b/src/protobuf/akash/cert/v1beta1/query.ts index f83e6e5..26a4fe3 100644 --- a/src/protobuf/akash/cert/v1beta1/query.ts +++ b/src/protobuf/akash/cert/v1beta1/query.ts @@ -2,14 +2,8 @@ import { messageTypeRegistry } from "../../../typeRegistry"; import Long from "long"; import _m0 from "protobufjs/minimal"; -import { - Certificate, - CertificateFilter, -} from "../../../akash/cert/v1beta1/cert"; -import { - PageRequest, - PageResponse, -} from "../../../cosmos/base/query/v1beta1/pagination"; +import { Certificate, CertificateFilter } from "../../../akash/cert/v1beta1/cert"; +import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; export const protobufPackage = "akash.cert.v1beta1"; @@ -37,22 +31,16 @@ function createBaseCertificateResponse(): CertificateResponse { return { $type: "akash.cert.v1beta1.CertificateResponse", certificate: undefined, - serial: "", + serial: "" }; } export const CertificateResponse = { $type: "akash.cert.v1beta1.CertificateResponse" as const, - encode( - message: CertificateResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: CertificateResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.certificate !== undefined) { - Certificate.encode( - message.certificate, - writer.uint32(10).fork() - ).ldelim(); + Certificate.encode(message.certificate, writer.uint32(10).fork()).ldelim(); } if (message.serial !== "") { writer.uint32(18).string(message.serial); @@ -84,34 +72,24 @@ export const CertificateResponse = { fromJSON(object: any): CertificateResponse { return { $type: CertificateResponse.$type, - certificate: isSet(object.certificate) - ? Certificate.fromJSON(object.certificate) - : undefined, - serial: isSet(object.serial) ? String(object.serial) : "", + certificate: isSet(object.certificate) ? Certificate.fromJSON(object.certificate) : undefined, + serial: isSet(object.serial) ? String(object.serial) : "" }; }, toJSON(message: CertificateResponse): unknown { const obj: any = {}; - message.certificate !== undefined && - (obj.certificate = message.certificate - ? Certificate.toJSON(message.certificate) - : undefined); + message.certificate !== undefined && (obj.certificate = message.certificate ? Certificate.toJSON(message.certificate) : undefined); message.serial !== undefined && (obj.serial = message.serial); return obj; }, - fromPartial, I>>( - object: I - ): CertificateResponse { + fromPartial, I>>(object: I): CertificateResponse { const message = createBaseCertificateResponse(); - message.certificate = - object.certificate !== undefined && object.certificate !== null - ? Certificate.fromPartial(object.certificate) - : undefined; + message.certificate = object.certificate !== undefined && object.certificate !== null ? Certificate.fromPartial(object.certificate) : undefined; message.serial = object.serial ?? ""; return message; - }, + } }; messageTypeRegistry.set(CertificateResponse.$type, CertificateResponse); @@ -120,22 +98,16 @@ function createBaseQueryCertificatesRequest(): QueryCertificatesRequest { return { $type: "akash.cert.v1beta1.QueryCertificatesRequest", filter: undefined, - pagination: undefined, + pagination: undefined }; } export const QueryCertificatesRequest = { $type: "akash.cert.v1beta1.QueryCertificatesRequest" as const, - encode( - message: QueryCertificatesRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryCertificatesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.filter !== undefined) { - CertificateFilter.encode( - message.filter, - writer.uint32(10).fork() - ).ldelim(); + CertificateFilter.encode(message.filter, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); @@ -143,10 +115,7 @@ export const QueryCertificatesRequest = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryCertificatesRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryCertificatesRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryCertificatesRequest(); @@ -170,80 +139,50 @@ export const QueryCertificatesRequest = { fromJSON(object: any): QueryCertificatesRequest { return { $type: QueryCertificatesRequest.$type, - filter: isSet(object.filter) - ? CertificateFilter.fromJSON(object.filter) - : undefined, - pagination: isSet(object.pagination) - ? PageRequest.fromJSON(object.pagination) - : undefined, + filter: isSet(object.filter) ? CertificateFilter.fromJSON(object.filter) : undefined, + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined }; }, toJSON(message: QueryCertificatesRequest): unknown { const obj: any = {}; - message.filter !== undefined && - (obj.filter = message.filter - ? CertificateFilter.toJSON(message.filter) - : undefined); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); + message.filter !== undefined && (obj.filter = message.filter ? CertificateFilter.toJSON(message.filter) : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryCertificatesRequest { + fromPartial, I>>(object: I): QueryCertificatesRequest { const message = createBaseQueryCertificatesRequest(); - message.filter = - object.filter !== undefined && object.filter !== null - ? CertificateFilter.fromPartial(object.filter) - : undefined; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; + message.filter = object.filter !== undefined && object.filter !== null ? CertificateFilter.fromPartial(object.filter) : undefined; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; return message; - }, + } }; -messageTypeRegistry.set( - QueryCertificatesRequest.$type, - QueryCertificatesRequest -); +messageTypeRegistry.set(QueryCertificatesRequest.$type, QueryCertificatesRequest); function createBaseQueryCertificatesResponse(): QueryCertificatesResponse { return { $type: "akash.cert.v1beta1.QueryCertificatesResponse", certificates: [], - pagination: undefined, + pagination: undefined }; } export const QueryCertificatesResponse = { $type: "akash.cert.v1beta1.QueryCertificatesResponse" as const, - encode( - message: QueryCertificatesResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryCertificatesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.certificates) { CertificateResponse.encode(v!, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); + PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryCertificatesResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryCertificatesResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryCertificatesResponse(); @@ -251,9 +190,7 @@ export const QueryCertificatesResponse = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.certificates.push( - CertificateResponse.decode(reader, reader.uint32()) - ); + message.certificates.push(CertificateResponse.decode(reader, reader.uint32())); break; case 2: message.pagination = PageResponse.decode(reader, reader.uint32()); @@ -269,56 +206,36 @@ export const QueryCertificatesResponse = { fromJSON(object: any): QueryCertificatesResponse { return { $type: QueryCertificatesResponse.$type, - certificates: Array.isArray(object?.certificates) - ? object.certificates.map((e: any) => CertificateResponse.fromJSON(e)) - : [], - pagination: isSet(object.pagination) - ? PageResponse.fromJSON(object.pagination) - : undefined, + certificates: Array.isArray(object?.certificates) ? object.certificates.map((e: any) => CertificateResponse.fromJSON(e)) : [], + pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined }; }, toJSON(message: QueryCertificatesResponse): unknown { const obj: any = {}; if (message.certificates) { - obj.certificates = message.certificates.map((e) => - e ? CertificateResponse.toJSON(e) : undefined - ); + obj.certificates = message.certificates.map(e => (e ? CertificateResponse.toJSON(e) : undefined)); } else { obj.certificates = []; } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryCertificatesResponse { + fromPartial, I>>(object: I): QueryCertificatesResponse { const message = createBaseQueryCertificatesResponse(); - message.certificates = - object.certificates?.map((e) => CertificateResponse.fromPartial(e)) || []; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageResponse.fromPartial(object.pagination) - : undefined; + message.certificates = object.certificates?.map(e => CertificateResponse.fromPartial(e)) || []; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; return message; - }, + } }; -messageTypeRegistry.set( - QueryCertificatesResponse.$type, - QueryCertificatesResponse -); +messageTypeRegistry.set(QueryCertificatesResponse.$type, QueryCertificatesResponse); /** Query defines the gRPC querier service */ export interface Query { /** Certificates queries certificates */ - Certificates( - request: QueryCertificatesRequest - ): Promise; + Certificates(request: QueryCertificatesRequest): Promise; } export class QueryClientImpl implements Query { @@ -327,57 +244,35 @@ export class QueryClientImpl implements Query { this.rpc = rpc; this.Certificates = this.Certificates.bind(this); } - Certificates( - request: QueryCertificatesRequest - ): Promise { + Certificates(request: QueryCertificatesRequest): Promise { const data = QueryCertificatesRequest.encode(request).finish(); - const promise = this.rpc.request( - "akash.cert.v1beta1.Query", - "Certificates", - data - ); - return promise.then((data) => - QueryCertificatesResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.cert.v1beta1.Query", "Certificates", data); + return promise.then(data => QueryCertificatesResponse.decode(new _m0.Reader(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/cert/v1beta2/cert.ts b/src/protobuf/akash/cert/v1beta2/cert.ts index e7f78e5..6b606e8 100644 --- a/src/protobuf/akash/cert/v1beta2/cert.ts +++ b/src/protobuf/akash/cert/v1beta2/cert.ts @@ -28,7 +28,7 @@ export enum Certificate_State { valid = 1, /** revoked - CertificateRevoked denotes state for deployment closed */ revoked = 2, - UNRECOGNIZED = -1, + UNRECOGNIZED = -1 } export function certificate_StateFromJSON(object: any): Certificate_State { @@ -102,10 +102,7 @@ function createBaseCertificateID(): CertificateID { export const CertificateID = { $type: "akash.cert.v1beta2.CertificateID" as const, - encode( - message: CertificateID, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: CertificateID, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -140,7 +137,7 @@ export const CertificateID = { return { $type: CertificateID.$type, owner: isSet(object.owner) ? String(object.owner) : "", - serial: isSet(object.serial) ? String(object.serial) : "", + serial: isSet(object.serial) ? String(object.serial) : "" }; }, @@ -151,14 +148,12 @@ export const CertificateID = { return obj; }, - fromPartial, I>>( - object: I - ): CertificateID { + fromPartial, I>>(object: I): CertificateID { const message = createBaseCertificateID(); message.owner = object.owner ?? ""; message.serial = object.serial ?? ""; return message; - }, + } }; messageTypeRegistry.set(CertificateID.$type, CertificateID); @@ -168,17 +163,14 @@ function createBaseCertificate(): Certificate { $type: "akash.cert.v1beta2.Certificate", state: 0, cert: new Uint8Array(), - pubkey: new Uint8Array(), + pubkey: new Uint8Array() }; } export const Certificate = { $type: "akash.cert.v1beta2.Certificate" as const, - encode( - message: Certificate, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Certificate, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.state !== 0) { writer.uint32(16).int32(message.state); } @@ -219,39 +211,26 @@ export const Certificate = { return { $type: Certificate.$type, state: isSet(object.state) ? certificate_StateFromJSON(object.state) : 0, - cert: isSet(object.cert) - ? bytesFromBase64(object.cert) - : new Uint8Array(), - pubkey: isSet(object.pubkey) - ? bytesFromBase64(object.pubkey) - : new Uint8Array(), + cert: isSet(object.cert) ? bytesFromBase64(object.cert) : new Uint8Array(), + pubkey: isSet(object.pubkey) ? bytesFromBase64(object.pubkey) : new Uint8Array() }; }, toJSON(message: Certificate): unknown { const obj: any = {}; - message.state !== undefined && - (obj.state = certificate_StateToJSON(message.state)); - message.cert !== undefined && - (obj.cert = base64FromBytes( - message.cert !== undefined ? message.cert : new Uint8Array() - )); - message.pubkey !== undefined && - (obj.pubkey = base64FromBytes( - message.pubkey !== undefined ? message.pubkey : new Uint8Array() - )); + message.state !== undefined && (obj.state = certificate_StateToJSON(message.state)); + message.cert !== undefined && (obj.cert = base64FromBytes(message.cert !== undefined ? message.cert : new Uint8Array())); + message.pubkey !== undefined && (obj.pubkey = base64FromBytes(message.pubkey !== undefined ? message.pubkey : new Uint8Array())); return obj; }, - fromPartial, I>>( - object: I - ): Certificate { + fromPartial, I>>(object: I): Certificate { const message = createBaseCertificate(); message.state = object.state ?? 0; message.cert = object.cert ?? new Uint8Array(); message.pubkey = object.pubkey ?? new Uint8Array(); return message; - }, + } }; messageTypeRegistry.set(Certificate.$type, Certificate); @@ -261,17 +240,14 @@ function createBaseCertificateFilter(): CertificateFilter { $type: "akash.cert.v1beta2.CertificateFilter", owner: "", serial: "", - state: "", + state: "" }; } export const CertificateFilter = { $type: "akash.cert.v1beta2.CertificateFilter" as const, - encode( - message: CertificateFilter, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: CertificateFilter, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -313,7 +289,7 @@ export const CertificateFilter = { $type: CertificateFilter.$type, owner: isSet(object.owner) ? String(object.owner) : "", serial: isSet(object.serial) ? String(object.serial) : "", - state: isSet(object.state) ? String(object.state) : "", + state: isSet(object.state) ? String(object.state) : "" }; }, @@ -325,15 +301,13 @@ export const CertificateFilter = { return obj; }, - fromPartial, I>>( - object: I - ): CertificateFilter { + fromPartial, I>>(object: I): CertificateFilter { const message = createBaseCertificateFilter(); message.owner = object.owner ?? ""; message.serial = object.serial ?? ""; message.state = object.state ?? ""; return message; - }, + } }; messageTypeRegistry.set(CertificateFilter.$type, CertificateFilter); @@ -343,17 +317,14 @@ function createBaseMsgCreateCertificate(): MsgCreateCertificate { $type: "akash.cert.v1beta2.MsgCreateCertificate", owner: "", cert: new Uint8Array(), - pubkey: new Uint8Array(), + pubkey: new Uint8Array() }; } export const MsgCreateCertificate = { $type: "akash.cert.v1beta2.MsgCreateCertificate" as const, - encode( - message: MsgCreateCertificate, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MsgCreateCertificate, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -366,10 +337,7 @@ export const MsgCreateCertificate = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgCreateCertificate { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreateCertificate { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCreateCertificate(); @@ -397,38 +365,26 @@ export const MsgCreateCertificate = { return { $type: MsgCreateCertificate.$type, owner: isSet(object.owner) ? String(object.owner) : "", - cert: isSet(object.cert) - ? bytesFromBase64(object.cert) - : new Uint8Array(), - pubkey: isSet(object.pubkey) - ? bytesFromBase64(object.pubkey) - : new Uint8Array(), + cert: isSet(object.cert) ? bytesFromBase64(object.cert) : new Uint8Array(), + pubkey: isSet(object.pubkey) ? bytesFromBase64(object.pubkey) : new Uint8Array() }; }, toJSON(message: MsgCreateCertificate): unknown { const obj: any = {}; message.owner !== undefined && (obj.owner = message.owner); - message.cert !== undefined && - (obj.cert = base64FromBytes( - message.cert !== undefined ? message.cert : new Uint8Array() - )); - message.pubkey !== undefined && - (obj.pubkey = base64FromBytes( - message.pubkey !== undefined ? message.pubkey : new Uint8Array() - )); + message.cert !== undefined && (obj.cert = base64FromBytes(message.cert !== undefined ? message.cert : new Uint8Array())); + message.pubkey !== undefined && (obj.pubkey = base64FromBytes(message.pubkey !== undefined ? message.pubkey : new Uint8Array())); return obj; }, - fromPartial, I>>( - object: I - ): MsgCreateCertificate { + fromPartial, I>>(object: I): MsgCreateCertificate { const message = createBaseMsgCreateCertificate(); message.owner = object.owner ?? ""; message.cert = object.cert ?? new Uint8Array(); message.pubkey = object.pubkey ?? new Uint8Array(); return message; - }, + } }; messageTypeRegistry.set(MsgCreateCertificate.$type, MsgCreateCertificate); @@ -440,17 +396,11 @@ function createBaseMsgCreateCertificateResponse(): MsgCreateCertificateResponse export const MsgCreateCertificateResponse = { $type: "akash.cert.v1beta2.MsgCreateCertificateResponse" as const, - encode( - _: MsgCreateCertificateResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: MsgCreateCertificateResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgCreateCertificateResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreateCertificateResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCreateCertificateResponse(); @@ -467,7 +417,7 @@ export const MsgCreateCertificateResponse = { fromJSON(_: any): MsgCreateCertificateResponse { return { - $type: MsgCreateCertificateResponse.$type, + $type: MsgCreateCertificateResponse.$type }; }, @@ -476,18 +426,13 @@ export const MsgCreateCertificateResponse = { return obj; }, - fromPartial, I>>( - _: I - ): MsgCreateCertificateResponse { + fromPartial, I>>(_: I): MsgCreateCertificateResponse { const message = createBaseMsgCreateCertificateResponse(); return message; - }, + } }; -messageTypeRegistry.set( - MsgCreateCertificateResponse.$type, - MsgCreateCertificateResponse -); +messageTypeRegistry.set(MsgCreateCertificateResponse.$type, MsgCreateCertificateResponse); function createBaseMsgRevokeCertificate(): MsgRevokeCertificate { return { $type: "akash.cert.v1beta2.MsgRevokeCertificate", id: undefined }; @@ -496,20 +441,14 @@ function createBaseMsgRevokeCertificate(): MsgRevokeCertificate { export const MsgRevokeCertificate = { $type: "akash.cert.v1beta2.MsgRevokeCertificate" as const, - encode( - message: MsgRevokeCertificate, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MsgRevokeCertificate, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { CertificateID.encode(message.id, writer.uint32(10).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgRevokeCertificate { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgRevokeCertificate { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgRevokeCertificate(); @@ -530,27 +469,21 @@ export const MsgRevokeCertificate = { fromJSON(object: any): MsgRevokeCertificate { return { $type: MsgRevokeCertificate.$type, - id: isSet(object.id) ? CertificateID.fromJSON(object.id) : undefined, + id: isSet(object.id) ? CertificateID.fromJSON(object.id) : undefined }; }, toJSON(message: MsgRevokeCertificate): unknown { const obj: any = {}; - message.id !== undefined && - (obj.id = message.id ? CertificateID.toJSON(message.id) : undefined); + message.id !== undefined && (obj.id = message.id ? CertificateID.toJSON(message.id) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): MsgRevokeCertificate { + fromPartial, I>>(object: I): MsgRevokeCertificate { const message = createBaseMsgRevokeCertificate(); - message.id = - object.id !== undefined && object.id !== null - ? CertificateID.fromPartial(object.id) - : undefined; + message.id = object.id !== undefined && object.id !== null ? CertificateID.fromPartial(object.id) : undefined; return message; - }, + } }; messageTypeRegistry.set(MsgRevokeCertificate.$type, MsgRevokeCertificate); @@ -562,17 +495,11 @@ function createBaseMsgRevokeCertificateResponse(): MsgRevokeCertificateResponse export const MsgRevokeCertificateResponse = { $type: "akash.cert.v1beta2.MsgRevokeCertificateResponse" as const, - encode( - _: MsgRevokeCertificateResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: MsgRevokeCertificateResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgRevokeCertificateResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgRevokeCertificateResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgRevokeCertificateResponse(); @@ -589,7 +516,7 @@ export const MsgRevokeCertificateResponse = { fromJSON(_: any): MsgRevokeCertificateResponse { return { - $type: MsgRevokeCertificateResponse.$type, + $type: MsgRevokeCertificateResponse.$type }; }, @@ -598,29 +525,20 @@ export const MsgRevokeCertificateResponse = { return obj; }, - fromPartial, I>>( - _: I - ): MsgRevokeCertificateResponse { + fromPartial, I>>(_: I): MsgRevokeCertificateResponse { const message = createBaseMsgRevokeCertificateResponse(); return message; - }, + } }; -messageTypeRegistry.set( - MsgRevokeCertificateResponse.$type, - MsgRevokeCertificateResponse -); +messageTypeRegistry.set(MsgRevokeCertificateResponse.$type, MsgRevokeCertificateResponse); /** Msg defines the provider Msg service */ export interface Msg { /** CreateCertificate defines a method to create new certificate given proper inputs. */ - CreateCertificate( - request: MsgCreateCertificate - ): Promise; + CreateCertificate(request: MsgCreateCertificate): Promise; /** RevokeCertificate defines a method to revoke the certificate */ - RevokeCertificate( - request: MsgRevokeCertificate - ): Promise; + RevokeCertificate(request: MsgRevokeCertificate): Promise; } export class MsgClientImpl implements Msg { @@ -630,41 +548,21 @@ export class MsgClientImpl implements Msg { this.CreateCertificate = this.CreateCertificate.bind(this); this.RevokeCertificate = this.RevokeCertificate.bind(this); } - CreateCertificate( - request: MsgCreateCertificate - ): Promise { + CreateCertificate(request: MsgCreateCertificate): Promise { const data = MsgCreateCertificate.encode(request).finish(); - const promise = this.rpc.request( - "akash.cert.v1beta2.Msg", - "CreateCertificate", - data - ); - return promise.then((data) => - MsgCreateCertificateResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.cert.v1beta2.Msg", "CreateCertificate", data); + return promise.then(data => MsgCreateCertificateResponse.decode(new _m0.Reader(data))); } - RevokeCertificate( - request: MsgRevokeCertificate - ): Promise { + RevokeCertificate(request: MsgRevokeCertificate): Promise { const data = MsgRevokeCertificate.encode(request).finish(); - const promise = this.rpc.request( - "akash.cert.v1beta2.Msg", - "RevokeCertificate", - data - ); - return promise.then((data) => - MsgRevokeCertificateResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.cert.v1beta2.Msg", "RevokeCertificate", data); + return promise.then(data => MsgRevokeCertificateResponse.decode(new _m0.Reader(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } declare var self: any | undefined; @@ -678,9 +576,7 @@ var globalThis: any = (() => { throw "Unable to locate global object"; })(); -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); +const atob: (b64: string) => string = globalThis.atob || (b64 => globalThis.Buffer.from(b64, "base64").toString("binary")); function bytesFromBase64(b64: string): Uint8Array { const bin = atob(b64); const arr = new Uint8Array(bin.length); @@ -690,45 +586,33 @@ function bytesFromBase64(b64: string): Uint8Array { return arr; } -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); +const btoa: (bin: string) => string = globalThis.btoa || (bin => globalThis.Buffer.from(bin, "binary").toString("base64")); function base64FromBytes(arr: Uint8Array): string { const bin: string[] = []; - arr.forEach((byte) => { + arr.forEach(byte => { bin.push(String.fromCharCode(byte)); }); return btoa(bin.join("")); } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/cert/v1beta2/genesis.ts b/src/protobuf/akash/cert/v1beta2/genesis.ts index 58bbe7d..4f8c444 100644 --- a/src/protobuf/akash/cert/v1beta2/genesis.ts +++ b/src/protobuf/akash/cert/v1beta2/genesis.ts @@ -23,25 +23,19 @@ function createBaseGenesisCertificate(): GenesisCertificate { return { $type: "akash.cert.v1beta2.GenesisCertificate", owner: "", - certificate: undefined, + certificate: undefined }; } export const GenesisCertificate = { $type: "akash.cert.v1beta2.GenesisCertificate" as const, - encode( - message: GenesisCertificate, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: GenesisCertificate, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } if (message.certificate !== undefined) { - Certificate.encode( - message.certificate, - writer.uint32(18).fork() - ).ldelim(); + Certificate.encode(message.certificate, writer.uint32(18).fork()).ldelim(); } return writer; }, @@ -71,33 +65,23 @@ export const GenesisCertificate = { return { $type: GenesisCertificate.$type, owner: isSet(object.owner) ? String(object.owner) : "", - certificate: isSet(object.certificate) - ? Certificate.fromJSON(object.certificate) - : undefined, + certificate: isSet(object.certificate) ? Certificate.fromJSON(object.certificate) : undefined }; }, toJSON(message: GenesisCertificate): unknown { const obj: any = {}; message.owner !== undefined && (obj.owner = message.owner); - message.certificate !== undefined && - (obj.certificate = message.certificate - ? Certificate.toJSON(message.certificate) - : undefined); + message.certificate !== undefined && (obj.certificate = message.certificate ? Certificate.toJSON(message.certificate) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): GenesisCertificate { + fromPartial, I>>(object: I): GenesisCertificate { const message = createBaseGenesisCertificate(); message.owner = object.owner ?? ""; - message.certificate = - object.certificate !== undefined && object.certificate !== null - ? Certificate.fromPartial(object.certificate) - : undefined; + message.certificate = object.certificate !== undefined && object.certificate !== null ? Certificate.fromPartial(object.certificate) : undefined; return message; - }, + } }; messageTypeRegistry.set(GenesisCertificate.$type, GenesisCertificate); @@ -109,10 +93,7 @@ function createBaseGenesisState(): GenesisState { export const GenesisState = { $type: "akash.cert.v1beta2.GenesisState" as const, - encode( - message: GenesisState, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: GenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.certificates) { GenesisCertificate.encode(v!, writer.uint32(10).fork()).ldelim(); } @@ -127,9 +108,7 @@ export const GenesisState = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.certificates.push( - GenesisCertificate.decode(reader, reader.uint32()) - ); + message.certificates.push(GenesisCertificate.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -142,64 +121,47 @@ export const GenesisState = { fromJSON(object: any): GenesisState { return { $type: GenesisState.$type, - certificates: Array.isArray(object?.certificates) - ? object.certificates.map((e: any) => GenesisCertificate.fromJSON(e)) - : [], + certificates: Array.isArray(object?.certificates) ? object.certificates.map((e: any) => GenesisCertificate.fromJSON(e)) : [] }; }, toJSON(message: GenesisState): unknown { const obj: any = {}; if (message.certificates) { - obj.certificates = message.certificates.map((e) => - e ? GenesisCertificate.toJSON(e) : undefined - ); + obj.certificates = message.certificates.map(e => (e ? GenesisCertificate.toJSON(e) : undefined)); } else { obj.certificates = []; } return obj; }, - fromPartial, I>>( - object: I - ): GenesisState { + fromPartial, I>>(object: I): GenesisState { const message = createBaseGenesisState(); - message.certificates = - object.certificates?.map((e) => GenesisCertificate.fromPartial(e)) || []; + message.certificates = object.certificates?.map(e => GenesisCertificate.fromPartial(e)) || []; return message; - }, + } }; messageTypeRegistry.set(GenesisState.$type, GenesisState); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/cert/v1beta2/query.ts b/src/protobuf/akash/cert/v1beta2/query.ts index 92eb724..6f69946 100644 --- a/src/protobuf/akash/cert/v1beta2/query.ts +++ b/src/protobuf/akash/cert/v1beta2/query.ts @@ -2,10 +2,7 @@ import { messageTypeRegistry } from "../../../typeRegistry"; import Long from "long"; import { Certificate, CertificateFilter } from "./cert"; -import { - PageRequest, - PageResponse, -} from "../../../cosmos/base/query/v1beta1/pagination"; +import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; import * as _m0 from "protobufjs/minimal"; export const protobufPackage = "akash.cert.v1beta2"; @@ -35,22 +32,16 @@ function createBaseCertificateResponse(): CertificateResponse { return { $type: "akash.cert.v1beta2.CertificateResponse", certificate: undefined, - serial: "", + serial: "" }; } export const CertificateResponse = { $type: "akash.cert.v1beta2.CertificateResponse" as const, - encode( - message: CertificateResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: CertificateResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.certificate !== undefined) { - Certificate.encode( - message.certificate, - writer.uint32(10).fork() - ).ldelim(); + Certificate.encode(message.certificate, writer.uint32(10).fork()).ldelim(); } if (message.serial !== "") { writer.uint32(18).string(message.serial); @@ -82,34 +73,24 @@ export const CertificateResponse = { fromJSON(object: any): CertificateResponse { return { $type: CertificateResponse.$type, - certificate: isSet(object.certificate) - ? Certificate.fromJSON(object.certificate) - : undefined, - serial: isSet(object.serial) ? String(object.serial) : "", + certificate: isSet(object.certificate) ? Certificate.fromJSON(object.certificate) : undefined, + serial: isSet(object.serial) ? String(object.serial) : "" }; }, toJSON(message: CertificateResponse): unknown { const obj: any = {}; - message.certificate !== undefined && - (obj.certificate = message.certificate - ? Certificate.toJSON(message.certificate) - : undefined); + message.certificate !== undefined && (obj.certificate = message.certificate ? Certificate.toJSON(message.certificate) : undefined); message.serial !== undefined && (obj.serial = message.serial); return obj; }, - fromPartial, I>>( - object: I - ): CertificateResponse { + fromPartial, I>>(object: I): CertificateResponse { const message = createBaseCertificateResponse(); - message.certificate = - object.certificate !== undefined && object.certificate !== null - ? Certificate.fromPartial(object.certificate) - : undefined; + message.certificate = object.certificate !== undefined && object.certificate !== null ? Certificate.fromPartial(object.certificate) : undefined; message.serial = object.serial ?? ""; return message; - }, + } }; messageTypeRegistry.set(CertificateResponse.$type, CertificateResponse); @@ -118,22 +99,16 @@ function createBaseQueryCertificatesRequest(): QueryCertificatesRequest { return { $type: "akash.cert.v1beta2.QueryCertificatesRequest", filter: undefined, - pagination: undefined, + pagination: undefined }; } export const QueryCertificatesRequest = { $type: "akash.cert.v1beta2.QueryCertificatesRequest" as const, - encode( - message: QueryCertificatesRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryCertificatesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.filter !== undefined) { - CertificateFilter.encode( - message.filter, - writer.uint32(10).fork() - ).ldelim(); + CertificateFilter.encode(message.filter, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); @@ -141,10 +116,7 @@ export const QueryCertificatesRequest = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryCertificatesRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryCertificatesRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryCertificatesRequest(); @@ -168,80 +140,50 @@ export const QueryCertificatesRequest = { fromJSON(object: any): QueryCertificatesRequest { return { $type: QueryCertificatesRequest.$type, - filter: isSet(object.filter) - ? CertificateFilter.fromJSON(object.filter) - : undefined, - pagination: isSet(object.pagination) - ? PageRequest.fromJSON(object.pagination) - : undefined, + filter: isSet(object.filter) ? CertificateFilter.fromJSON(object.filter) : undefined, + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined }; }, toJSON(message: QueryCertificatesRequest): unknown { const obj: any = {}; - message.filter !== undefined && - (obj.filter = message.filter - ? CertificateFilter.toJSON(message.filter) - : undefined); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); + message.filter !== undefined && (obj.filter = message.filter ? CertificateFilter.toJSON(message.filter) : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryCertificatesRequest { + fromPartial, I>>(object: I): QueryCertificatesRequest { const message = createBaseQueryCertificatesRequest(); - message.filter = - object.filter !== undefined && object.filter !== null - ? CertificateFilter.fromPartial(object.filter) - : undefined; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; + message.filter = object.filter !== undefined && object.filter !== null ? CertificateFilter.fromPartial(object.filter) : undefined; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; return message; - }, + } }; -messageTypeRegistry.set( - QueryCertificatesRequest.$type, - QueryCertificatesRequest -); +messageTypeRegistry.set(QueryCertificatesRequest.$type, QueryCertificatesRequest); function createBaseQueryCertificatesResponse(): QueryCertificatesResponse { return { $type: "akash.cert.v1beta2.QueryCertificatesResponse", certificates: [], - pagination: undefined, + pagination: undefined }; } export const QueryCertificatesResponse = { $type: "akash.cert.v1beta2.QueryCertificatesResponse" as const, - encode( - message: QueryCertificatesResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryCertificatesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.certificates) { CertificateResponse.encode(v!, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); + PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryCertificatesResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryCertificatesResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryCertificatesResponse(); @@ -249,9 +191,7 @@ export const QueryCertificatesResponse = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.certificates.push( - CertificateResponse.decode(reader, reader.uint32()) - ); + message.certificates.push(CertificateResponse.decode(reader, reader.uint32())); break; case 2: message.pagination = PageResponse.decode(reader, reader.uint32()); @@ -267,56 +207,36 @@ export const QueryCertificatesResponse = { fromJSON(object: any): QueryCertificatesResponse { return { $type: QueryCertificatesResponse.$type, - certificates: Array.isArray(object?.certificates) - ? object.certificates.map((e: any) => CertificateResponse.fromJSON(e)) - : [], - pagination: isSet(object.pagination) - ? PageResponse.fromJSON(object.pagination) - : undefined, + certificates: Array.isArray(object?.certificates) ? object.certificates.map((e: any) => CertificateResponse.fromJSON(e)) : [], + pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined }; }, toJSON(message: QueryCertificatesResponse): unknown { const obj: any = {}; if (message.certificates) { - obj.certificates = message.certificates.map((e) => - e ? CertificateResponse.toJSON(e) : undefined - ); + obj.certificates = message.certificates.map(e => (e ? CertificateResponse.toJSON(e) : undefined)); } else { obj.certificates = []; } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryCertificatesResponse { + fromPartial, I>>(object: I): QueryCertificatesResponse { const message = createBaseQueryCertificatesResponse(); - message.certificates = - object.certificates?.map((e) => CertificateResponse.fromPartial(e)) || []; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageResponse.fromPartial(object.pagination) - : undefined; + message.certificates = object.certificates?.map(e => CertificateResponse.fromPartial(e)) || []; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; return message; - }, + } }; -messageTypeRegistry.set( - QueryCertificatesResponse.$type, - QueryCertificatesResponse -); +messageTypeRegistry.set(QueryCertificatesResponse.$type, QueryCertificatesResponse); /** Query defines the gRPC querier service */ export interface Query { /** Certificates queries certificates */ - Certificates( - request: QueryCertificatesRequest - ): Promise; + Certificates(request: QueryCertificatesRequest): Promise; } export class QueryClientImpl implements Query { @@ -325,57 +245,35 @@ export class QueryClientImpl implements Query { this.rpc = rpc; this.Certificates = this.Certificates.bind(this); } - Certificates( - request: QueryCertificatesRequest - ): Promise { + Certificates(request: QueryCertificatesRequest): Promise { const data = QueryCertificatesRequest.encode(request).finish(); - const promise = this.rpc.request( - "akash.cert.v1beta2.Query", - "Certificates", - data - ); - return promise.then((data) => - QueryCertificatesResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.cert.v1beta2.Query", "Certificates", data); + return promise.then(data => QueryCertificatesResponse.decode(new _m0.Reader(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/cert/v1beta3/cert.ts b/src/protobuf/akash/cert/v1beta3/cert.ts index 13087ab..2c46ebb 100644 --- a/src/protobuf/akash/cert/v1beta3/cert.ts +++ b/src/protobuf/akash/cert/v1beta3/cert.ts @@ -28,7 +28,7 @@ export enum Certificate_State { valid = 1, /** revoked - CertificateRevoked denotes state for deployment closed */ revoked = 2, - UNRECOGNIZED = -1, + UNRECOGNIZED = -1 } export function certificate_StateFromJSON(object: any): Certificate_State { @@ -102,10 +102,7 @@ function createBaseCertificateID(): CertificateID { export const CertificateID = { $type: "akash.cert.v1beta3.CertificateID" as const, - encode( - message: CertificateID, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: CertificateID, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -140,7 +137,7 @@ export const CertificateID = { return { $type: CertificateID.$type, owner: isSet(object.owner) ? String(object.owner) : "", - serial: isSet(object.serial) ? String(object.serial) : "", + serial: isSet(object.serial) ? String(object.serial) : "" }; }, @@ -151,14 +148,12 @@ export const CertificateID = { return obj; }, - fromPartial, I>>( - object: I - ): CertificateID { + fromPartial, I>>(object: I): CertificateID { const message = createBaseCertificateID(); message.owner = object.owner ?? ""; message.serial = object.serial ?? ""; return message; - }, + } }; messageTypeRegistry.set(CertificateID.$type, CertificateID); @@ -168,17 +163,14 @@ function createBaseCertificate(): Certificate { $type: "akash.cert.v1beta3.Certificate", state: 0, cert: new Uint8Array(), - pubkey: new Uint8Array(), + pubkey: new Uint8Array() }; } export const Certificate = { $type: "akash.cert.v1beta3.Certificate" as const, - encode( - message: Certificate, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Certificate, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.state !== 0) { writer.uint32(16).int32(message.state); } @@ -219,39 +211,26 @@ export const Certificate = { return { $type: Certificate.$type, state: isSet(object.state) ? certificate_StateFromJSON(object.state) : 0, - cert: isSet(object.cert) - ? bytesFromBase64(object.cert) - : new Uint8Array(), - pubkey: isSet(object.pubkey) - ? bytesFromBase64(object.pubkey) - : new Uint8Array(), + cert: isSet(object.cert) ? bytesFromBase64(object.cert) : new Uint8Array(), + pubkey: isSet(object.pubkey) ? bytesFromBase64(object.pubkey) : new Uint8Array() }; }, toJSON(message: Certificate): unknown { const obj: any = {}; - message.state !== undefined && - (obj.state = certificate_StateToJSON(message.state)); - message.cert !== undefined && - (obj.cert = base64FromBytes( - message.cert !== undefined ? message.cert : new Uint8Array() - )); - message.pubkey !== undefined && - (obj.pubkey = base64FromBytes( - message.pubkey !== undefined ? message.pubkey : new Uint8Array() - )); + message.state !== undefined && (obj.state = certificate_StateToJSON(message.state)); + message.cert !== undefined && (obj.cert = base64FromBytes(message.cert !== undefined ? message.cert : new Uint8Array())); + message.pubkey !== undefined && (obj.pubkey = base64FromBytes(message.pubkey !== undefined ? message.pubkey : new Uint8Array())); return obj; }, - fromPartial, I>>( - object: I - ): Certificate { + fromPartial, I>>(object: I): Certificate { const message = createBaseCertificate(); message.state = object.state ?? 0; message.cert = object.cert ?? new Uint8Array(); message.pubkey = object.pubkey ?? new Uint8Array(); return message; - }, + } }; messageTypeRegistry.set(Certificate.$type, Certificate); @@ -261,17 +240,14 @@ function createBaseCertificateFilter(): CertificateFilter { $type: "akash.cert.v1beta3.CertificateFilter", owner: "", serial: "", - state: "", + state: "" }; } export const CertificateFilter = { $type: "akash.cert.v1beta3.CertificateFilter" as const, - encode( - message: CertificateFilter, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: CertificateFilter, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -313,7 +289,7 @@ export const CertificateFilter = { $type: CertificateFilter.$type, owner: isSet(object.owner) ? String(object.owner) : "", serial: isSet(object.serial) ? String(object.serial) : "", - state: isSet(object.state) ? String(object.state) : "", + state: isSet(object.state) ? String(object.state) : "" }; }, @@ -325,15 +301,13 @@ export const CertificateFilter = { return obj; }, - fromPartial, I>>( - object: I - ): CertificateFilter { + fromPartial, I>>(object: I): CertificateFilter { const message = createBaseCertificateFilter(); message.owner = object.owner ?? ""; message.serial = object.serial ?? ""; message.state = object.state ?? ""; return message; - }, + } }; messageTypeRegistry.set(CertificateFilter.$type, CertificateFilter); @@ -343,17 +317,14 @@ function createBaseMsgCreateCertificate(): MsgCreateCertificate { $type: "akash.cert.v1beta3.MsgCreateCertificate", owner: "", cert: new Uint8Array(), - pubkey: new Uint8Array(), + pubkey: new Uint8Array() }; } export const MsgCreateCertificate = { $type: "akash.cert.v1beta3.MsgCreateCertificate" as const, - encode( - message: MsgCreateCertificate, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MsgCreateCertificate, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -366,10 +337,7 @@ export const MsgCreateCertificate = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgCreateCertificate { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreateCertificate { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCreateCertificate(); @@ -397,38 +365,26 @@ export const MsgCreateCertificate = { return { $type: MsgCreateCertificate.$type, owner: isSet(object.owner) ? String(object.owner) : "", - cert: isSet(object.cert) - ? bytesFromBase64(object.cert) - : new Uint8Array(), - pubkey: isSet(object.pubkey) - ? bytesFromBase64(object.pubkey) - : new Uint8Array(), + cert: isSet(object.cert) ? bytesFromBase64(object.cert) : new Uint8Array(), + pubkey: isSet(object.pubkey) ? bytesFromBase64(object.pubkey) : new Uint8Array() }; }, toJSON(message: MsgCreateCertificate): unknown { const obj: any = {}; message.owner !== undefined && (obj.owner = message.owner); - message.cert !== undefined && - (obj.cert = base64FromBytes( - message.cert !== undefined ? message.cert : new Uint8Array() - )); - message.pubkey !== undefined && - (obj.pubkey = base64FromBytes( - message.pubkey !== undefined ? message.pubkey : new Uint8Array() - )); + message.cert !== undefined && (obj.cert = base64FromBytes(message.cert !== undefined ? message.cert : new Uint8Array())); + message.pubkey !== undefined && (obj.pubkey = base64FromBytes(message.pubkey !== undefined ? message.pubkey : new Uint8Array())); return obj; }, - fromPartial, I>>( - object: I - ): MsgCreateCertificate { + fromPartial, I>>(object: I): MsgCreateCertificate { const message = createBaseMsgCreateCertificate(); message.owner = object.owner ?? ""; message.cert = object.cert ?? new Uint8Array(); message.pubkey = object.pubkey ?? new Uint8Array(); return message; - }, + } }; messageTypeRegistry.set(MsgCreateCertificate.$type, MsgCreateCertificate); @@ -440,17 +396,11 @@ function createBaseMsgCreateCertificateResponse(): MsgCreateCertificateResponse export const MsgCreateCertificateResponse = { $type: "akash.cert.v1beta3.MsgCreateCertificateResponse" as const, - encode( - _: MsgCreateCertificateResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: MsgCreateCertificateResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgCreateCertificateResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreateCertificateResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCreateCertificateResponse(); @@ -467,7 +417,7 @@ export const MsgCreateCertificateResponse = { fromJSON(_: any): MsgCreateCertificateResponse { return { - $type: MsgCreateCertificateResponse.$type, + $type: MsgCreateCertificateResponse.$type }; }, @@ -476,18 +426,13 @@ export const MsgCreateCertificateResponse = { return obj; }, - fromPartial, I>>( - _: I - ): MsgCreateCertificateResponse { + fromPartial, I>>(_: I): MsgCreateCertificateResponse { const message = createBaseMsgCreateCertificateResponse(); return message; - }, + } }; -messageTypeRegistry.set( - MsgCreateCertificateResponse.$type, - MsgCreateCertificateResponse -); +messageTypeRegistry.set(MsgCreateCertificateResponse.$type, MsgCreateCertificateResponse); function createBaseMsgRevokeCertificate(): MsgRevokeCertificate { return { $type: "akash.cert.v1beta3.MsgRevokeCertificate", id: undefined }; @@ -496,20 +441,14 @@ function createBaseMsgRevokeCertificate(): MsgRevokeCertificate { export const MsgRevokeCertificate = { $type: "akash.cert.v1beta3.MsgRevokeCertificate" as const, - encode( - message: MsgRevokeCertificate, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MsgRevokeCertificate, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { CertificateID.encode(message.id, writer.uint32(10).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgRevokeCertificate { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgRevokeCertificate { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgRevokeCertificate(); @@ -530,27 +469,21 @@ export const MsgRevokeCertificate = { fromJSON(object: any): MsgRevokeCertificate { return { $type: MsgRevokeCertificate.$type, - id: isSet(object.id) ? CertificateID.fromJSON(object.id) : undefined, + id: isSet(object.id) ? CertificateID.fromJSON(object.id) : undefined }; }, toJSON(message: MsgRevokeCertificate): unknown { const obj: any = {}; - message.id !== undefined && - (obj.id = message.id ? CertificateID.toJSON(message.id) : undefined); + message.id !== undefined && (obj.id = message.id ? CertificateID.toJSON(message.id) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): MsgRevokeCertificate { + fromPartial, I>>(object: I): MsgRevokeCertificate { const message = createBaseMsgRevokeCertificate(); - message.id = - object.id !== undefined && object.id !== null - ? CertificateID.fromPartial(object.id) - : undefined; + message.id = object.id !== undefined && object.id !== null ? CertificateID.fromPartial(object.id) : undefined; return message; - }, + } }; messageTypeRegistry.set(MsgRevokeCertificate.$type, MsgRevokeCertificate); @@ -562,17 +495,11 @@ function createBaseMsgRevokeCertificateResponse(): MsgRevokeCertificateResponse export const MsgRevokeCertificateResponse = { $type: "akash.cert.v1beta3.MsgRevokeCertificateResponse" as const, - encode( - _: MsgRevokeCertificateResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: MsgRevokeCertificateResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgRevokeCertificateResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgRevokeCertificateResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgRevokeCertificateResponse(); @@ -589,7 +516,7 @@ export const MsgRevokeCertificateResponse = { fromJSON(_: any): MsgRevokeCertificateResponse { return { - $type: MsgRevokeCertificateResponse.$type, + $type: MsgRevokeCertificateResponse.$type }; }, @@ -598,29 +525,20 @@ export const MsgRevokeCertificateResponse = { return obj; }, - fromPartial, I>>( - _: I - ): MsgRevokeCertificateResponse { + fromPartial, I>>(_: I): MsgRevokeCertificateResponse { const message = createBaseMsgRevokeCertificateResponse(); return message; - }, + } }; -messageTypeRegistry.set( - MsgRevokeCertificateResponse.$type, - MsgRevokeCertificateResponse -); +messageTypeRegistry.set(MsgRevokeCertificateResponse.$type, MsgRevokeCertificateResponse); /** Msg defines the provider Msg service */ export interface Msg { /** CreateCertificate defines a method to create new certificate given proper inputs. */ - CreateCertificate( - request: MsgCreateCertificate - ): Promise; + CreateCertificate(request: MsgCreateCertificate): Promise; /** RevokeCertificate defines a method to revoke the certificate */ - RevokeCertificate( - request: MsgRevokeCertificate - ): Promise; + RevokeCertificate(request: MsgRevokeCertificate): Promise; } export class MsgClientImpl implements Msg { @@ -630,41 +548,21 @@ export class MsgClientImpl implements Msg { this.CreateCertificate = this.CreateCertificate.bind(this); this.RevokeCertificate = this.RevokeCertificate.bind(this); } - CreateCertificate( - request: MsgCreateCertificate - ): Promise { + CreateCertificate(request: MsgCreateCertificate): Promise { const data = MsgCreateCertificate.encode(request).finish(); - const promise = this.rpc.request( - "akash.cert.v1beta3.Msg", - "CreateCertificate", - data - ); - return promise.then((data) => - MsgCreateCertificateResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.cert.v1beta3.Msg", "CreateCertificate", data); + return promise.then(data => MsgCreateCertificateResponse.decode(new _m0.Reader(data))); } - RevokeCertificate( - request: MsgRevokeCertificate - ): Promise { + RevokeCertificate(request: MsgRevokeCertificate): Promise { const data = MsgRevokeCertificate.encode(request).finish(); - const promise = this.rpc.request( - "akash.cert.v1beta3.Msg", - "RevokeCertificate", - data - ); - return promise.then((data) => - MsgRevokeCertificateResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.cert.v1beta3.Msg", "RevokeCertificate", data); + return promise.then(data => MsgRevokeCertificateResponse.decode(new _m0.Reader(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } declare var self: any | undefined; @@ -678,9 +576,7 @@ var globalThis: any = (() => { throw "Unable to locate global object"; })(); -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); +const atob: (b64: string) => string = globalThis.atob || (b64 => globalThis.Buffer.from(b64, "base64").toString("binary")); function bytesFromBase64(b64: string): Uint8Array { const bin = atob(b64); const arr = new Uint8Array(bin.length); @@ -690,45 +586,33 @@ function bytesFromBase64(b64: string): Uint8Array { return arr; } -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); +const btoa: (bin: string) => string = globalThis.btoa || (bin => globalThis.Buffer.from(bin, "binary").toString("base64")); function base64FromBytes(arr: Uint8Array): string { const bin: string[] = []; - arr.forEach((byte) => { + arr.forEach(byte => { bin.push(String.fromCharCode(byte)); }); return btoa(bin.join("")); } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/cert/v1beta3/genesis.ts b/src/protobuf/akash/cert/v1beta3/genesis.ts index 868c20f..9c8ae7c 100644 --- a/src/protobuf/akash/cert/v1beta3/genesis.ts +++ b/src/protobuf/akash/cert/v1beta3/genesis.ts @@ -23,25 +23,19 @@ function createBaseGenesisCertificate(): GenesisCertificate { return { $type: "akash.cert.v1beta3.GenesisCertificate", owner: "", - certificate: undefined, + certificate: undefined }; } export const GenesisCertificate = { $type: "akash.cert.v1beta3.GenesisCertificate" as const, - encode( - message: GenesisCertificate, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: GenesisCertificate, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } if (message.certificate !== undefined) { - Certificate.encode( - message.certificate, - writer.uint32(18).fork() - ).ldelim(); + Certificate.encode(message.certificate, writer.uint32(18).fork()).ldelim(); } return writer; }, @@ -71,33 +65,23 @@ export const GenesisCertificate = { return { $type: GenesisCertificate.$type, owner: isSet(object.owner) ? String(object.owner) : "", - certificate: isSet(object.certificate) - ? Certificate.fromJSON(object.certificate) - : undefined, + certificate: isSet(object.certificate) ? Certificate.fromJSON(object.certificate) : undefined }; }, toJSON(message: GenesisCertificate): unknown { const obj: any = {}; message.owner !== undefined && (obj.owner = message.owner); - message.certificate !== undefined && - (obj.certificate = message.certificate - ? Certificate.toJSON(message.certificate) - : undefined); + message.certificate !== undefined && (obj.certificate = message.certificate ? Certificate.toJSON(message.certificate) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): GenesisCertificate { + fromPartial, I>>(object: I): GenesisCertificate { const message = createBaseGenesisCertificate(); message.owner = object.owner ?? ""; - message.certificate = - object.certificate !== undefined && object.certificate !== null - ? Certificate.fromPartial(object.certificate) - : undefined; + message.certificate = object.certificate !== undefined && object.certificate !== null ? Certificate.fromPartial(object.certificate) : undefined; return message; - }, + } }; messageTypeRegistry.set(GenesisCertificate.$type, GenesisCertificate); @@ -109,10 +93,7 @@ function createBaseGenesisState(): GenesisState { export const GenesisState = { $type: "akash.cert.v1beta3.GenesisState" as const, - encode( - message: GenesisState, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: GenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.certificates) { GenesisCertificate.encode(v!, writer.uint32(10).fork()).ldelim(); } @@ -127,9 +108,7 @@ export const GenesisState = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.certificates.push( - GenesisCertificate.decode(reader, reader.uint32()) - ); + message.certificates.push(GenesisCertificate.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -142,64 +121,47 @@ export const GenesisState = { fromJSON(object: any): GenesisState { return { $type: GenesisState.$type, - certificates: Array.isArray(object?.certificates) - ? object.certificates.map((e: any) => GenesisCertificate.fromJSON(e)) - : [], + certificates: Array.isArray(object?.certificates) ? object.certificates.map((e: any) => GenesisCertificate.fromJSON(e)) : [] }; }, toJSON(message: GenesisState): unknown { const obj: any = {}; if (message.certificates) { - obj.certificates = message.certificates.map((e) => - e ? GenesisCertificate.toJSON(e) : undefined - ); + obj.certificates = message.certificates.map(e => (e ? GenesisCertificate.toJSON(e) : undefined)); } else { obj.certificates = []; } return obj; }, - fromPartial, I>>( - object: I - ): GenesisState { + fromPartial, I>>(object: I): GenesisState { const message = createBaseGenesisState(); - message.certificates = - object.certificates?.map((e) => GenesisCertificate.fromPartial(e)) || []; + message.certificates = object.certificates?.map(e => GenesisCertificate.fromPartial(e)) || []; return message; - }, + } }; messageTypeRegistry.set(GenesisState.$type, GenesisState); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/cert/v1beta3/query.ts b/src/protobuf/akash/cert/v1beta3/query.ts index 29a5724..388932b 100644 --- a/src/protobuf/akash/cert/v1beta3/query.ts +++ b/src/protobuf/akash/cert/v1beta3/query.ts @@ -2,10 +2,7 @@ import { messageTypeRegistry } from "../../../typeRegistry"; import Long from "long"; import { Certificate, CertificateFilter } from "./cert"; -import { - PageRequest, - PageResponse, -} from "../../../cosmos/base/query/v1beta1/pagination"; +import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; import * as _m0 from "protobufjs/minimal"; export const protobufPackage = "akash.cert.v1beta3"; @@ -35,22 +32,16 @@ function createBaseCertificateResponse(): CertificateResponse { return { $type: "akash.cert.v1beta3.CertificateResponse", certificate: undefined, - serial: "", + serial: "" }; } export const CertificateResponse = { $type: "akash.cert.v1beta3.CertificateResponse" as const, - encode( - message: CertificateResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: CertificateResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.certificate !== undefined) { - Certificate.encode( - message.certificate, - writer.uint32(10).fork() - ).ldelim(); + Certificate.encode(message.certificate, writer.uint32(10).fork()).ldelim(); } if (message.serial !== "") { writer.uint32(18).string(message.serial); @@ -82,34 +73,24 @@ export const CertificateResponse = { fromJSON(object: any): CertificateResponse { return { $type: CertificateResponse.$type, - certificate: isSet(object.certificate) - ? Certificate.fromJSON(object.certificate) - : undefined, - serial: isSet(object.serial) ? String(object.serial) : "", + certificate: isSet(object.certificate) ? Certificate.fromJSON(object.certificate) : undefined, + serial: isSet(object.serial) ? String(object.serial) : "" }; }, toJSON(message: CertificateResponse): unknown { const obj: any = {}; - message.certificate !== undefined && - (obj.certificate = message.certificate - ? Certificate.toJSON(message.certificate) - : undefined); + message.certificate !== undefined && (obj.certificate = message.certificate ? Certificate.toJSON(message.certificate) : undefined); message.serial !== undefined && (obj.serial = message.serial); return obj; }, - fromPartial, I>>( - object: I - ): CertificateResponse { + fromPartial, I>>(object: I): CertificateResponse { const message = createBaseCertificateResponse(); - message.certificate = - object.certificate !== undefined && object.certificate !== null - ? Certificate.fromPartial(object.certificate) - : undefined; + message.certificate = object.certificate !== undefined && object.certificate !== null ? Certificate.fromPartial(object.certificate) : undefined; message.serial = object.serial ?? ""; return message; - }, + } }; messageTypeRegistry.set(CertificateResponse.$type, CertificateResponse); @@ -118,22 +99,16 @@ function createBaseQueryCertificatesRequest(): QueryCertificatesRequest { return { $type: "akash.cert.v1beta3.QueryCertificatesRequest", filter: undefined, - pagination: undefined, + pagination: undefined }; } export const QueryCertificatesRequest = { $type: "akash.cert.v1beta3.QueryCertificatesRequest" as const, - encode( - message: QueryCertificatesRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryCertificatesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.filter !== undefined) { - CertificateFilter.encode( - message.filter, - writer.uint32(10).fork() - ).ldelim(); + CertificateFilter.encode(message.filter, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); @@ -141,10 +116,7 @@ export const QueryCertificatesRequest = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryCertificatesRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryCertificatesRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryCertificatesRequest(); @@ -168,80 +140,50 @@ export const QueryCertificatesRequest = { fromJSON(object: any): QueryCertificatesRequest { return { $type: QueryCertificatesRequest.$type, - filter: isSet(object.filter) - ? CertificateFilter.fromJSON(object.filter) - : undefined, - pagination: isSet(object.pagination) - ? PageRequest.fromJSON(object.pagination) - : undefined, + filter: isSet(object.filter) ? CertificateFilter.fromJSON(object.filter) : undefined, + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined }; }, toJSON(message: QueryCertificatesRequest): unknown { const obj: any = {}; - message.filter !== undefined && - (obj.filter = message.filter - ? CertificateFilter.toJSON(message.filter) - : undefined); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); + message.filter !== undefined && (obj.filter = message.filter ? CertificateFilter.toJSON(message.filter) : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryCertificatesRequest { + fromPartial, I>>(object: I): QueryCertificatesRequest { const message = createBaseQueryCertificatesRequest(); - message.filter = - object.filter !== undefined && object.filter !== null - ? CertificateFilter.fromPartial(object.filter) - : undefined; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; + message.filter = object.filter !== undefined && object.filter !== null ? CertificateFilter.fromPartial(object.filter) : undefined; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; return message; - }, + } }; -messageTypeRegistry.set( - QueryCertificatesRequest.$type, - QueryCertificatesRequest -); +messageTypeRegistry.set(QueryCertificatesRequest.$type, QueryCertificatesRequest); function createBaseQueryCertificatesResponse(): QueryCertificatesResponse { return { $type: "akash.cert.v1beta3.QueryCertificatesResponse", certificates: [], - pagination: undefined, + pagination: undefined }; } export const QueryCertificatesResponse = { $type: "akash.cert.v1beta3.QueryCertificatesResponse" as const, - encode( - message: QueryCertificatesResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryCertificatesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.certificates) { CertificateResponse.encode(v!, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); + PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryCertificatesResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryCertificatesResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryCertificatesResponse(); @@ -249,9 +191,7 @@ export const QueryCertificatesResponse = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.certificates.push( - CertificateResponse.decode(reader, reader.uint32()) - ); + message.certificates.push(CertificateResponse.decode(reader, reader.uint32())); break; case 2: message.pagination = PageResponse.decode(reader, reader.uint32()); @@ -267,56 +207,36 @@ export const QueryCertificatesResponse = { fromJSON(object: any): QueryCertificatesResponse { return { $type: QueryCertificatesResponse.$type, - certificates: Array.isArray(object?.certificates) - ? object.certificates.map((e: any) => CertificateResponse.fromJSON(e)) - : [], - pagination: isSet(object.pagination) - ? PageResponse.fromJSON(object.pagination) - : undefined, + certificates: Array.isArray(object?.certificates) ? object.certificates.map((e: any) => CertificateResponse.fromJSON(e)) : [], + pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined }; }, toJSON(message: QueryCertificatesResponse): unknown { const obj: any = {}; if (message.certificates) { - obj.certificates = message.certificates.map((e) => - e ? CertificateResponse.toJSON(e) : undefined - ); + obj.certificates = message.certificates.map(e => (e ? CertificateResponse.toJSON(e) : undefined)); } else { obj.certificates = []; } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryCertificatesResponse { + fromPartial, I>>(object: I): QueryCertificatesResponse { const message = createBaseQueryCertificatesResponse(); - message.certificates = - object.certificates?.map((e) => CertificateResponse.fromPartial(e)) || []; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageResponse.fromPartial(object.pagination) - : undefined; + message.certificates = object.certificates?.map(e => CertificateResponse.fromPartial(e)) || []; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; return message; - }, + } }; -messageTypeRegistry.set( - QueryCertificatesResponse.$type, - QueryCertificatesResponse -); +messageTypeRegistry.set(QueryCertificatesResponse.$type, QueryCertificatesResponse); /** Query defines the gRPC querier service */ export interface Query { /** Certificates queries certificates */ - Certificates( - request: QueryCertificatesRequest - ): Promise; + Certificates(request: QueryCertificatesRequest): Promise; } export class QueryClientImpl implements Query { @@ -325,57 +245,35 @@ export class QueryClientImpl implements Query { this.rpc = rpc; this.Certificates = this.Certificates.bind(this); } - Certificates( - request: QueryCertificatesRequest - ): Promise { + Certificates(request: QueryCertificatesRequest): Promise { const data = QueryCertificatesRequest.encode(request).finish(); - const promise = this.rpc.request( - "akash.cert.v1beta3.Query", - "Certificates", - data - ); - return promise.then((data) => - QueryCertificatesResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.cert.v1beta3.Query", "Certificates", data); + return promise.then(data => QueryCertificatesResponse.decode(new _m0.Reader(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/deployment/v1beta1/authz.ts b/src/protobuf/akash/deployment/v1beta1/authz.ts index f92dcc5..cac7dc0 100644 --- a/src/protobuf/akash/deployment/v1beta1/authz.ts +++ b/src/protobuf/akash/deployment/v1beta1/authz.ts @@ -22,27 +22,21 @@ export interface DepositDeploymentAuthorization { function createBaseDepositDeploymentAuthorization(): DepositDeploymentAuthorization { return { $type: "akash.deployment.v1beta1.DepositDeploymentAuthorization", - spendLimit: undefined, + spendLimit: undefined }; } export const DepositDeploymentAuthorization = { $type: "akash.deployment.v1beta1.DepositDeploymentAuthorization" as const, - encode( - message: DepositDeploymentAuthorization, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: DepositDeploymentAuthorization, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.spendLimit !== undefined) { Coin.encode(message.spendLimit, writer.uint32(10).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): DepositDeploymentAuthorization { + decode(input: _m0.Reader | Uint8Array, length?: number): DepositDeploymentAuthorization { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseDepositDeploymentAuthorization(); @@ -63,66 +57,43 @@ export const DepositDeploymentAuthorization = { fromJSON(object: any): DepositDeploymentAuthorization { return { $type: DepositDeploymentAuthorization.$type, - spendLimit: isSet(object.spendLimit) - ? Coin.fromJSON(object.spendLimit) - : undefined, + spendLimit: isSet(object.spendLimit) ? Coin.fromJSON(object.spendLimit) : undefined }; }, toJSON(message: DepositDeploymentAuthorization): unknown { const obj: any = {}; - message.spendLimit !== undefined && - (obj.spendLimit = message.spendLimit - ? Coin.toJSON(message.spendLimit) - : undefined); + message.spendLimit !== undefined && (obj.spendLimit = message.spendLimit ? Coin.toJSON(message.spendLimit) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): DepositDeploymentAuthorization { + fromPartial, I>>(object: I): DepositDeploymentAuthorization { const message = createBaseDepositDeploymentAuthorization(); - message.spendLimit = - object.spendLimit !== undefined && object.spendLimit !== null - ? Coin.fromPartial(object.spendLimit) - : undefined; + message.spendLimit = object.spendLimit !== undefined && object.spendLimit !== null ? Coin.fromPartial(object.spendLimit) : undefined; return message; - }, + } }; -messageTypeRegistry.set( - DepositDeploymentAuthorization.$type, - DepositDeploymentAuthorization -); +messageTypeRegistry.set(DepositDeploymentAuthorization.$type, DepositDeploymentAuthorization); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/deployment/v1beta1/deployment.ts b/src/protobuf/akash/deployment/v1beta1/deployment.ts index dd8786f..fc2ed64 100644 --- a/src/protobuf/akash/deployment/v1beta1/deployment.ts +++ b/src/protobuf/akash/deployment/v1beta1/deployment.ts @@ -1,15 +1,7 @@ /* eslint-disable */ import { messageTypeRegistry } from "../../../typeRegistry"; import Long from "long"; -import { - GroupSpec, - MsgCloseGroupResponse, - MsgPauseGroupResponse, - MsgStartGroupResponse, - MsgCloseGroup, - MsgPauseGroup, - MsgStartGroup, -} from "./group"; +import { GroupSpec, MsgCloseGroupResponse, MsgPauseGroupResponse, MsgStartGroupResponse, MsgCloseGroup, MsgPauseGroup, MsgStartGroup } from "./group"; import { Coin } from "../../../cosmos/base/v1beta1/coin"; import * as _m0 from "protobufjs/minimal"; @@ -89,7 +81,7 @@ export enum Deployment_State { active = 1, /** closed - DeploymentClosed denotes state for deployment closed */ closed = 2, - UNRECOGNIZED = -1, + UNRECOGNIZED = -1 } export function deployment_StateFromJSON(object: any): Deployment_State { @@ -138,17 +130,14 @@ function createBaseMsgCreateDeployment(): MsgCreateDeployment { id: undefined, groups: [], version: new Uint8Array(), - deposit: undefined, + deposit: undefined }; } export const MsgCreateDeployment = { $type: "akash.deployment.v1beta1.MsgCreateDeployment" as const, - encode( - message: MsgCreateDeployment, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MsgCreateDeployment, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { DeploymentID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -195,56 +184,33 @@ export const MsgCreateDeployment = { return { $type: MsgCreateDeployment.$type, id: isSet(object.id) ? DeploymentID.fromJSON(object.id) : undefined, - groups: Array.isArray(object?.groups) - ? object.groups.map((e: any) => GroupSpec.fromJSON(e)) - : [], - version: isSet(object.version) - ? bytesFromBase64(object.version) - : new Uint8Array(), - deposit: isSet(object.deposit) - ? Coin.fromJSON(object.deposit) - : undefined, + groups: Array.isArray(object?.groups) ? object.groups.map((e: any) => GroupSpec.fromJSON(e)) : [], + version: isSet(object.version) ? bytesFromBase64(object.version) : new Uint8Array(), + deposit: isSet(object.deposit) ? Coin.fromJSON(object.deposit) : undefined }; }, toJSON(message: MsgCreateDeployment): unknown { const obj: any = {}; - message.id !== undefined && - (obj.id = message.id ? DeploymentID.toJSON(message.id) : undefined); + message.id !== undefined && (obj.id = message.id ? DeploymentID.toJSON(message.id) : undefined); if (message.groups) { - obj.groups = message.groups.map((e) => - e ? GroupSpec.toJSON(e) : undefined - ); + obj.groups = message.groups.map(e => (e ? GroupSpec.toJSON(e) : undefined)); } else { obj.groups = []; } - message.version !== undefined && - (obj.version = base64FromBytes( - message.version !== undefined ? message.version : new Uint8Array() - )); - message.deposit !== undefined && - (obj.deposit = message.deposit - ? Coin.toJSON(message.deposit) - : undefined); + message.version !== undefined && (obj.version = base64FromBytes(message.version !== undefined ? message.version : new Uint8Array())); + message.deposit !== undefined && (obj.deposit = message.deposit ? Coin.toJSON(message.deposit) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): MsgCreateDeployment { + fromPartial, I>>(object: I): MsgCreateDeployment { const message = createBaseMsgCreateDeployment(); - message.id = - object.id !== undefined && object.id !== null - ? DeploymentID.fromPartial(object.id) - : undefined; - message.groups = object.groups?.map((e) => GroupSpec.fromPartial(e)) || []; + message.id = object.id !== undefined && object.id !== null ? DeploymentID.fromPartial(object.id) : undefined; + message.groups = object.groups?.map(e => GroupSpec.fromPartial(e)) || []; message.version = object.version ?? new Uint8Array(); - message.deposit = - object.deposit !== undefined && object.deposit !== null - ? Coin.fromPartial(object.deposit) - : undefined; + message.deposit = object.deposit !== undefined && object.deposit !== null ? Coin.fromPartial(object.deposit) : undefined; return message; - }, + } }; messageTypeRegistry.set(MsgCreateDeployment.$type, MsgCreateDeployment); @@ -256,17 +222,11 @@ function createBaseMsgCreateDeploymentResponse(): MsgCreateDeploymentResponse { export const MsgCreateDeploymentResponse = { $type: "akash.deployment.v1beta1.MsgCreateDeploymentResponse" as const, - encode( - _: MsgCreateDeploymentResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: MsgCreateDeploymentResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgCreateDeploymentResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreateDeploymentResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCreateDeploymentResponse(); @@ -283,7 +243,7 @@ export const MsgCreateDeploymentResponse = { fromJSON(_: any): MsgCreateDeploymentResponse { return { - $type: MsgCreateDeploymentResponse.$type, + $type: MsgCreateDeploymentResponse.$type }; }, @@ -292,34 +252,26 @@ export const MsgCreateDeploymentResponse = { return obj; }, - fromPartial, I>>( - _: I - ): MsgCreateDeploymentResponse { + fromPartial, I>>(_: I): MsgCreateDeploymentResponse { const message = createBaseMsgCreateDeploymentResponse(); return message; - }, + } }; -messageTypeRegistry.set( - MsgCreateDeploymentResponse.$type, - MsgCreateDeploymentResponse -); +messageTypeRegistry.set(MsgCreateDeploymentResponse.$type, MsgCreateDeploymentResponse); function createBaseMsgDepositDeployment(): MsgDepositDeployment { return { $type: "akash.deployment.v1beta1.MsgDepositDeployment", id: undefined, - amount: undefined, + amount: undefined }; } export const MsgDepositDeployment = { $type: "akash.deployment.v1beta1.MsgDepositDeployment" as const, - encode( - message: MsgDepositDeployment, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MsgDepositDeployment, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { DeploymentID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -329,10 +281,7 @@ export const MsgDepositDeployment = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgDepositDeployment { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgDepositDeployment { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgDepositDeployment(); @@ -357,33 +306,23 @@ export const MsgDepositDeployment = { return { $type: MsgDepositDeployment.$type, id: isSet(object.id) ? DeploymentID.fromJSON(object.id) : undefined, - amount: isSet(object.amount) ? Coin.fromJSON(object.amount) : undefined, + amount: isSet(object.amount) ? Coin.fromJSON(object.amount) : undefined }; }, toJSON(message: MsgDepositDeployment): unknown { const obj: any = {}; - message.id !== undefined && - (obj.id = message.id ? DeploymentID.toJSON(message.id) : undefined); - message.amount !== undefined && - (obj.amount = message.amount ? Coin.toJSON(message.amount) : undefined); + message.id !== undefined && (obj.id = message.id ? DeploymentID.toJSON(message.id) : undefined); + message.amount !== undefined && (obj.amount = message.amount ? Coin.toJSON(message.amount) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): MsgDepositDeployment { + fromPartial, I>>(object: I): MsgDepositDeployment { const message = createBaseMsgDepositDeployment(); - message.id = - object.id !== undefined && object.id !== null - ? DeploymentID.fromPartial(object.id) - : undefined; - message.amount = - object.amount !== undefined && object.amount !== null - ? Coin.fromPartial(object.amount) - : undefined; + message.id = object.id !== undefined && object.id !== null ? DeploymentID.fromPartial(object.id) : undefined; + message.amount = object.amount !== undefined && object.amount !== null ? Coin.fromPartial(object.amount) : undefined; return message; - }, + } }; messageTypeRegistry.set(MsgDepositDeployment.$type, MsgDepositDeployment); @@ -395,17 +334,11 @@ function createBaseMsgDepositDeploymentResponse(): MsgDepositDeploymentResponse export const MsgDepositDeploymentResponse = { $type: "akash.deployment.v1beta1.MsgDepositDeploymentResponse" as const, - encode( - _: MsgDepositDeploymentResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: MsgDepositDeploymentResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgDepositDeploymentResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgDepositDeploymentResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgDepositDeploymentResponse(); @@ -422,7 +355,7 @@ export const MsgDepositDeploymentResponse = { fromJSON(_: any): MsgDepositDeploymentResponse { return { - $type: MsgDepositDeploymentResponse.$type, + $type: MsgDepositDeploymentResponse.$type }; }, @@ -431,35 +364,27 @@ export const MsgDepositDeploymentResponse = { return obj; }, - fromPartial, I>>( - _: I - ): MsgDepositDeploymentResponse { + fromPartial, I>>(_: I): MsgDepositDeploymentResponse { const message = createBaseMsgDepositDeploymentResponse(); return message; - }, + } }; -messageTypeRegistry.set( - MsgDepositDeploymentResponse.$type, - MsgDepositDeploymentResponse -); +messageTypeRegistry.set(MsgDepositDeploymentResponse.$type, MsgDepositDeploymentResponse); function createBaseMsgUpdateDeployment(): MsgUpdateDeployment { return { $type: "akash.deployment.v1beta1.MsgUpdateDeployment", id: undefined, groups: [], - version: new Uint8Array(), + version: new Uint8Array() }; } export const MsgUpdateDeployment = { $type: "akash.deployment.v1beta1.MsgUpdateDeployment" as const, - encode( - message: MsgUpdateDeployment, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MsgUpdateDeployment, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { DeploymentID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -500,45 +425,30 @@ export const MsgUpdateDeployment = { return { $type: MsgUpdateDeployment.$type, id: isSet(object.id) ? DeploymentID.fromJSON(object.id) : undefined, - groups: Array.isArray(object?.groups) - ? object.groups.map((e: any) => GroupSpec.fromJSON(e)) - : [], - version: isSet(object.version) - ? bytesFromBase64(object.version) - : new Uint8Array(), + groups: Array.isArray(object?.groups) ? object.groups.map((e: any) => GroupSpec.fromJSON(e)) : [], + version: isSet(object.version) ? bytesFromBase64(object.version) : new Uint8Array() }; }, toJSON(message: MsgUpdateDeployment): unknown { const obj: any = {}; - message.id !== undefined && - (obj.id = message.id ? DeploymentID.toJSON(message.id) : undefined); + message.id !== undefined && (obj.id = message.id ? DeploymentID.toJSON(message.id) : undefined); if (message.groups) { - obj.groups = message.groups.map((e) => - e ? GroupSpec.toJSON(e) : undefined - ); + obj.groups = message.groups.map(e => (e ? GroupSpec.toJSON(e) : undefined)); } else { obj.groups = []; } - message.version !== undefined && - (obj.version = base64FromBytes( - message.version !== undefined ? message.version : new Uint8Array() - )); + message.version !== undefined && (obj.version = base64FromBytes(message.version !== undefined ? message.version : new Uint8Array())); return obj; }, - fromPartial, I>>( - object: I - ): MsgUpdateDeployment { + fromPartial, I>>(object: I): MsgUpdateDeployment { const message = createBaseMsgUpdateDeployment(); - message.id = - object.id !== undefined && object.id !== null - ? DeploymentID.fromPartial(object.id) - : undefined; - message.groups = object.groups?.map((e) => GroupSpec.fromPartial(e)) || []; + message.id = object.id !== undefined && object.id !== null ? DeploymentID.fromPartial(object.id) : undefined; + message.groups = object.groups?.map(e => GroupSpec.fromPartial(e)) || []; message.version = object.version ?? new Uint8Array(); return message; - }, + } }; messageTypeRegistry.set(MsgUpdateDeployment.$type, MsgUpdateDeployment); @@ -550,17 +460,11 @@ function createBaseMsgUpdateDeploymentResponse(): MsgUpdateDeploymentResponse { export const MsgUpdateDeploymentResponse = { $type: "akash.deployment.v1beta1.MsgUpdateDeploymentResponse" as const, - encode( - _: MsgUpdateDeploymentResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: MsgUpdateDeploymentResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgUpdateDeploymentResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgUpdateDeploymentResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgUpdateDeploymentResponse(); @@ -577,7 +481,7 @@ export const MsgUpdateDeploymentResponse = { fromJSON(_: any): MsgUpdateDeploymentResponse { return { - $type: MsgUpdateDeploymentResponse.$type, + $type: MsgUpdateDeploymentResponse.$type }; }, @@ -586,33 +490,25 @@ export const MsgUpdateDeploymentResponse = { return obj; }, - fromPartial, I>>( - _: I - ): MsgUpdateDeploymentResponse { + fromPartial, I>>(_: I): MsgUpdateDeploymentResponse { const message = createBaseMsgUpdateDeploymentResponse(); return message; - }, + } }; -messageTypeRegistry.set( - MsgUpdateDeploymentResponse.$type, - MsgUpdateDeploymentResponse -); +messageTypeRegistry.set(MsgUpdateDeploymentResponse.$type, MsgUpdateDeploymentResponse); function createBaseMsgCloseDeployment(): MsgCloseDeployment { return { $type: "akash.deployment.v1beta1.MsgCloseDeployment", - id: undefined, + id: undefined }; } export const MsgCloseDeployment = { $type: "akash.deployment.v1beta1.MsgCloseDeployment" as const, - encode( - message: MsgCloseDeployment, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MsgCloseDeployment, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { DeploymentID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -640,27 +536,21 @@ export const MsgCloseDeployment = { fromJSON(object: any): MsgCloseDeployment { return { $type: MsgCloseDeployment.$type, - id: isSet(object.id) ? DeploymentID.fromJSON(object.id) : undefined, + id: isSet(object.id) ? DeploymentID.fromJSON(object.id) : undefined }; }, toJSON(message: MsgCloseDeployment): unknown { const obj: any = {}; - message.id !== undefined && - (obj.id = message.id ? DeploymentID.toJSON(message.id) : undefined); + message.id !== undefined && (obj.id = message.id ? DeploymentID.toJSON(message.id) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): MsgCloseDeployment { + fromPartial, I>>(object: I): MsgCloseDeployment { const message = createBaseMsgCloseDeployment(); - message.id = - object.id !== undefined && object.id !== null - ? DeploymentID.fromPartial(object.id) - : undefined; + message.id = object.id !== undefined && object.id !== null ? DeploymentID.fromPartial(object.id) : undefined; return message; - }, + } }; messageTypeRegistry.set(MsgCloseDeployment.$type, MsgCloseDeployment); @@ -672,17 +562,11 @@ function createBaseMsgCloseDeploymentResponse(): MsgCloseDeploymentResponse { export const MsgCloseDeploymentResponse = { $type: "akash.deployment.v1beta1.MsgCloseDeploymentResponse" as const, - encode( - _: MsgCloseDeploymentResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: MsgCloseDeploymentResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgCloseDeploymentResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgCloseDeploymentResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCloseDeploymentResponse(); @@ -699,7 +583,7 @@ export const MsgCloseDeploymentResponse = { fromJSON(_: any): MsgCloseDeploymentResponse { return { - $type: MsgCloseDeploymentResponse.$type, + $type: MsgCloseDeploymentResponse.$type }; }, @@ -708,34 +592,26 @@ export const MsgCloseDeploymentResponse = { return obj; }, - fromPartial, I>>( - _: I - ): MsgCloseDeploymentResponse { + fromPartial, I>>(_: I): MsgCloseDeploymentResponse { const message = createBaseMsgCloseDeploymentResponse(); return message; - }, + } }; -messageTypeRegistry.set( - MsgCloseDeploymentResponse.$type, - MsgCloseDeploymentResponse -); +messageTypeRegistry.set(MsgCloseDeploymentResponse.$type, MsgCloseDeploymentResponse); function createBaseDeploymentID(): DeploymentID { return { $type: "akash.deployment.v1beta1.DeploymentID", owner: "", - dseq: Long.UZERO, + dseq: Long.UZERO }; } export const DeploymentID = { $type: "akash.deployment.v1beta1.DeploymentID" as const, - encode( - message: DeploymentID, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: DeploymentID, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -770,29 +646,23 @@ export const DeploymentID = { return { $type: DeploymentID.$type, owner: isSet(object.owner) ? String(object.owner) : "", - dseq: isSet(object.dseq) ? Long.fromValue(object.dseq) : Long.UZERO, + dseq: isSet(object.dseq) ? Long.fromValue(object.dseq) : Long.UZERO }; }, toJSON(message: DeploymentID): unknown { const obj: any = {}; message.owner !== undefined && (obj.owner = message.owner); - message.dseq !== undefined && - (obj.dseq = (message.dseq || Long.UZERO).toString()); + message.dseq !== undefined && (obj.dseq = (message.dseq || Long.UZERO).toString()); return obj; }, - fromPartial, I>>( - object: I - ): DeploymentID { + fromPartial, I>>(object: I): DeploymentID { const message = createBaseDeploymentID(); message.owner = object.owner ?? ""; - message.dseq = - object.dseq !== undefined && object.dseq !== null - ? Long.fromValue(object.dseq) - : Long.UZERO; + message.dseq = object.dseq !== undefined && object.dseq !== null ? Long.fromValue(object.dseq) : Long.UZERO; return message; - }, + } }; messageTypeRegistry.set(DeploymentID.$type, DeploymentID); @@ -803,22 +673,16 @@ function createBaseDeployment(): Deployment { deploymentId: undefined, state: 0, version: new Uint8Array(), - createdAt: Long.ZERO, + createdAt: Long.ZERO }; } export const Deployment = { $type: "akash.deployment.v1beta1.Deployment" as const, - encode( - message: Deployment, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Deployment, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.deploymentId !== undefined) { - DeploymentID.encode( - message.deploymentId, - writer.uint32(10).fork() - ).ldelim(); + DeploymentID.encode(message.deploymentId, writer.uint32(10).fork()).ldelim(); } if (message.state !== 0) { writer.uint32(16).int32(message.state); @@ -862,52 +726,30 @@ export const Deployment = { fromJSON(object: any): Deployment { return { $type: Deployment.$type, - deploymentId: isSet(object.deploymentId) - ? DeploymentID.fromJSON(object.deploymentId) - : undefined, + deploymentId: isSet(object.deploymentId) ? DeploymentID.fromJSON(object.deploymentId) : undefined, state: isSet(object.state) ? deployment_StateFromJSON(object.state) : 0, - version: isSet(object.version) - ? bytesFromBase64(object.version) - : new Uint8Array(), - createdAt: isSet(object.createdAt) - ? Long.fromValue(object.createdAt) - : Long.ZERO, + version: isSet(object.version) ? bytesFromBase64(object.version) : new Uint8Array(), + createdAt: isSet(object.createdAt) ? Long.fromValue(object.createdAt) : Long.ZERO }; }, toJSON(message: Deployment): unknown { const obj: any = {}; - message.deploymentId !== undefined && - (obj.deploymentId = message.deploymentId - ? DeploymentID.toJSON(message.deploymentId) - : undefined); - message.state !== undefined && - (obj.state = deployment_StateToJSON(message.state)); - message.version !== undefined && - (obj.version = base64FromBytes( - message.version !== undefined ? message.version : new Uint8Array() - )); - message.createdAt !== undefined && - (obj.createdAt = (message.createdAt || Long.ZERO).toString()); + message.deploymentId !== undefined && (obj.deploymentId = message.deploymentId ? DeploymentID.toJSON(message.deploymentId) : undefined); + message.state !== undefined && (obj.state = deployment_StateToJSON(message.state)); + message.version !== undefined && (obj.version = base64FromBytes(message.version !== undefined ? message.version : new Uint8Array())); + message.createdAt !== undefined && (obj.createdAt = (message.createdAt || Long.ZERO).toString()); return obj; }, - fromPartial, I>>( - object: I - ): Deployment { + fromPartial, I>>(object: I): Deployment { const message = createBaseDeployment(); - message.deploymentId = - object.deploymentId !== undefined && object.deploymentId !== null - ? DeploymentID.fromPartial(object.deploymentId) - : undefined; + message.deploymentId = object.deploymentId !== undefined && object.deploymentId !== null ? DeploymentID.fromPartial(object.deploymentId) : undefined; message.state = object.state ?? 0; message.version = object.version ?? new Uint8Array(); - message.createdAt = - object.createdAt !== undefined && object.createdAt !== null - ? Long.fromValue(object.createdAt) - : Long.ZERO; + message.createdAt = object.createdAt !== undefined && object.createdAt !== null ? Long.fromValue(object.createdAt) : Long.ZERO; return message; - }, + } }; messageTypeRegistry.set(Deployment.$type, Deployment); @@ -917,17 +759,14 @@ function createBaseDeploymentFilters(): DeploymentFilters { $type: "akash.deployment.v1beta1.DeploymentFilters", owner: "", dseq: Long.UZERO, - state: "", + state: "" }; } export const DeploymentFilters = { $type: "akash.deployment.v1beta1.DeploymentFilters" as const, - encode( - message: DeploymentFilters, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: DeploymentFilters, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -969,31 +808,25 @@ export const DeploymentFilters = { $type: DeploymentFilters.$type, owner: isSet(object.owner) ? String(object.owner) : "", dseq: isSet(object.dseq) ? Long.fromValue(object.dseq) : Long.UZERO, - state: isSet(object.state) ? String(object.state) : "", + state: isSet(object.state) ? String(object.state) : "" }; }, toJSON(message: DeploymentFilters): unknown { const obj: any = {}; message.owner !== undefined && (obj.owner = message.owner); - message.dseq !== undefined && - (obj.dseq = (message.dseq || Long.UZERO).toString()); + message.dseq !== undefined && (obj.dseq = (message.dseq || Long.UZERO).toString()); message.state !== undefined && (obj.state = message.state); return obj; }, - fromPartial, I>>( - object: I - ): DeploymentFilters { + fromPartial, I>>(object: I): DeploymentFilters { const message = createBaseDeploymentFilters(); message.owner = object.owner ?? ""; - message.dseq = - object.dseq !== undefined && object.dseq !== null - ? Long.fromValue(object.dseq) - : Long.UZERO; + message.dseq = object.dseq !== undefined && object.dseq !== null ? Long.fromValue(object.dseq) : Long.UZERO; message.state = object.state ?? ""; return message; - }, + } }; messageTypeRegistry.set(DeploymentFilters.$type, DeploymentFilters); @@ -1001,21 +834,13 @@ messageTypeRegistry.set(DeploymentFilters.$type, DeploymentFilters); /** Msg defines the deployment Msg service. */ export interface Msg { /** CreateDeployment defines a method to create new deployment given proper inputs. */ - CreateDeployment( - request: MsgCreateDeployment - ): Promise; + CreateDeployment(request: MsgCreateDeployment): Promise; /** DepositDeployment deposits more funds into the deployment account */ - DepositDeployment( - request: MsgDepositDeployment - ): Promise; + DepositDeployment(request: MsgDepositDeployment): Promise; /** UpdateDeployment defines a method to update a deployment given proper inputs. */ - UpdateDeployment( - request: MsgUpdateDeployment - ): Promise; + UpdateDeployment(request: MsgUpdateDeployment): Promise; /** CloseDeployment defines a method to close a deployment given proper inputs. */ - CloseDeployment( - request: MsgCloseDeployment - ): Promise; + CloseDeployment(request: MsgCloseDeployment): Promise; /** CloseGroup defines a method to close a group of a deployment given proper inputs. */ CloseGroup(request: MsgCloseGroup): Promise; /** PauseGroup defines a method to close a group of a deployment given proper inputs. */ @@ -1036,105 +861,51 @@ export class MsgClientImpl implements Msg { this.PauseGroup = this.PauseGroup.bind(this); this.StartGroup = this.StartGroup.bind(this); } - CreateDeployment( - request: MsgCreateDeployment - ): Promise { + CreateDeployment(request: MsgCreateDeployment): Promise { const data = MsgCreateDeployment.encode(request).finish(); - const promise = this.rpc.request( - "akash.deployment.v1beta1.Msg", - "CreateDeployment", - data - ); - return promise.then((data) => - MsgCreateDeploymentResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.deployment.v1beta1.Msg", "CreateDeployment", data); + return promise.then(data => MsgCreateDeploymentResponse.decode(new _m0.Reader(data))); } - DepositDeployment( - request: MsgDepositDeployment - ): Promise { + DepositDeployment(request: MsgDepositDeployment): Promise { const data = MsgDepositDeployment.encode(request).finish(); - const promise = this.rpc.request( - "akash.deployment.v1beta1.Msg", - "DepositDeployment", - data - ); - return promise.then((data) => - MsgDepositDeploymentResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.deployment.v1beta1.Msg", "DepositDeployment", data); + return promise.then(data => MsgDepositDeploymentResponse.decode(new _m0.Reader(data))); } - UpdateDeployment( - request: MsgUpdateDeployment - ): Promise { + UpdateDeployment(request: MsgUpdateDeployment): Promise { const data = MsgUpdateDeployment.encode(request).finish(); - const promise = this.rpc.request( - "akash.deployment.v1beta1.Msg", - "UpdateDeployment", - data - ); - return promise.then((data) => - MsgUpdateDeploymentResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.deployment.v1beta1.Msg", "UpdateDeployment", data); + return promise.then(data => MsgUpdateDeploymentResponse.decode(new _m0.Reader(data))); } - CloseDeployment( - request: MsgCloseDeployment - ): Promise { + CloseDeployment(request: MsgCloseDeployment): Promise { const data = MsgCloseDeployment.encode(request).finish(); - const promise = this.rpc.request( - "akash.deployment.v1beta1.Msg", - "CloseDeployment", - data - ); - return promise.then((data) => - MsgCloseDeploymentResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.deployment.v1beta1.Msg", "CloseDeployment", data); + return promise.then(data => MsgCloseDeploymentResponse.decode(new _m0.Reader(data))); } CloseGroup(request: MsgCloseGroup): Promise { const data = MsgCloseGroup.encode(request).finish(); - const promise = this.rpc.request( - "akash.deployment.v1beta1.Msg", - "CloseGroup", - data - ); - return promise.then((data) => - MsgCloseGroupResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.deployment.v1beta1.Msg", "CloseGroup", data); + return promise.then(data => MsgCloseGroupResponse.decode(new _m0.Reader(data))); } PauseGroup(request: MsgPauseGroup): Promise { const data = MsgPauseGroup.encode(request).finish(); - const promise = this.rpc.request( - "akash.deployment.v1beta1.Msg", - "PauseGroup", - data - ); - return promise.then((data) => - MsgPauseGroupResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.deployment.v1beta1.Msg", "PauseGroup", data); + return promise.then(data => MsgPauseGroupResponse.decode(new _m0.Reader(data))); } StartGroup(request: MsgStartGroup): Promise { const data = MsgStartGroup.encode(request).finish(); - const promise = this.rpc.request( - "akash.deployment.v1beta1.Msg", - "StartGroup", - data - ); - return promise.then((data) => - MsgStartGroupResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.deployment.v1beta1.Msg", "StartGroup", data); + return promise.then(data => MsgStartGroupResponse.decode(new _m0.Reader(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } declare var self: any | undefined; @@ -1148,9 +919,7 @@ var globalThis: any = (() => { throw "Unable to locate global object"; })(); -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); +const atob: (b64: string) => string = globalThis.atob || (b64 => globalThis.Buffer.from(b64, "base64").toString("binary")); function bytesFromBase64(b64: string): Uint8Array { const bin = atob(b64); const arr = new Uint8Array(bin.length); @@ -1160,45 +929,33 @@ function bytesFromBase64(b64: string): Uint8Array { return arr; } -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); +const btoa: (bin: string) => string = globalThis.btoa || (bin => globalThis.Buffer.from(bin, "binary").toString("base64")); function base64FromBytes(arr: Uint8Array): string { const bin: string[] = []; - arr.forEach((byte) => { + arr.forEach(byte => { bin.push(String.fromCharCode(byte)); }); return btoa(bin.join("")); } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/deployment/v1beta1/genesis.ts b/src/protobuf/akash/deployment/v1beta1/genesis.ts index e259ee3..2c5c8e7 100644 --- a/src/protobuf/akash/deployment/v1beta1/genesis.ts +++ b/src/protobuf/akash/deployment/v1beta1/genesis.ts @@ -26,17 +26,14 @@ function createBaseGenesisDeployment(): GenesisDeployment { return { $type: "akash.deployment.v1beta1.GenesisDeployment", deployment: undefined, - groups: [], + groups: [] }; } export const GenesisDeployment = { $type: "akash.deployment.v1beta1.GenesisDeployment" as const, - encode( - message: GenesisDeployment, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: GenesisDeployment, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.deployment !== undefined) { Deployment.encode(message.deployment, writer.uint32(10).fork()).ldelim(); } @@ -70,40 +67,28 @@ export const GenesisDeployment = { fromJSON(object: any): GenesisDeployment { return { $type: GenesisDeployment.$type, - deployment: isSet(object.deployment) - ? Deployment.fromJSON(object.deployment) - : undefined, - groups: Array.isArray(object?.groups) - ? object.groups.map((e: any) => Group.fromJSON(e)) - : [], + deployment: isSet(object.deployment) ? Deployment.fromJSON(object.deployment) : undefined, + groups: Array.isArray(object?.groups) ? object.groups.map((e: any) => Group.fromJSON(e)) : [] }; }, toJSON(message: GenesisDeployment): unknown { const obj: any = {}; - message.deployment !== undefined && - (obj.deployment = message.deployment - ? Deployment.toJSON(message.deployment) - : undefined); + message.deployment !== undefined && (obj.deployment = message.deployment ? Deployment.toJSON(message.deployment) : undefined); if (message.groups) { - obj.groups = message.groups.map((e) => (e ? Group.toJSON(e) : undefined)); + obj.groups = message.groups.map(e => (e ? Group.toJSON(e) : undefined)); } else { obj.groups = []; } return obj; }, - fromPartial, I>>( - object: I - ): GenesisDeployment { + fromPartial, I>>(object: I): GenesisDeployment { const message = createBaseGenesisDeployment(); - message.deployment = - object.deployment !== undefined && object.deployment !== null - ? Deployment.fromPartial(object.deployment) - : undefined; - message.groups = object.groups?.map((e) => Group.fromPartial(e)) || []; + message.deployment = object.deployment !== undefined && object.deployment !== null ? Deployment.fromPartial(object.deployment) : undefined; + message.groups = object.groups?.map(e => Group.fromPartial(e)) || []; return message; - }, + } }; messageTypeRegistry.set(GenesisDeployment.$type, GenesisDeployment); @@ -112,17 +97,14 @@ function createBaseGenesisState(): GenesisState { return { $type: "akash.deployment.v1beta1.GenesisState", deployments: [], - params: undefined, + params: undefined }; } export const GenesisState = { $type: "akash.deployment.v1beta1.GenesisState" as const, - encode( - message: GenesisState, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: GenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.deployments) { GenesisDeployment.encode(v!, writer.uint32(10).fork()).ldelim(); } @@ -140,9 +122,7 @@ export const GenesisState = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.deployments.push( - GenesisDeployment.decode(reader, reader.uint32()) - ); + message.deployments.push(GenesisDeployment.decode(reader, reader.uint32())); break; case 2: message.params = Params.decode(reader, reader.uint32()); @@ -158,71 +138,50 @@ export const GenesisState = { fromJSON(object: any): GenesisState { return { $type: GenesisState.$type, - deployments: Array.isArray(object?.deployments) - ? object.deployments.map((e: any) => GenesisDeployment.fromJSON(e)) - : [], - params: isSet(object.params) ? Params.fromJSON(object.params) : undefined, + deployments: Array.isArray(object?.deployments) ? object.deployments.map((e: any) => GenesisDeployment.fromJSON(e)) : [], + params: isSet(object.params) ? Params.fromJSON(object.params) : undefined }; }, toJSON(message: GenesisState): unknown { const obj: any = {}; if (message.deployments) { - obj.deployments = message.deployments.map((e) => - e ? GenesisDeployment.toJSON(e) : undefined - ); + obj.deployments = message.deployments.map(e => (e ? GenesisDeployment.toJSON(e) : undefined)); } else { obj.deployments = []; } - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); + message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): GenesisState { + fromPartial, I>>(object: I): GenesisState { const message = createBaseGenesisState(); - message.deployments = - object.deployments?.map((e) => GenesisDeployment.fromPartial(e)) || []; - message.params = - object.params !== undefined && object.params !== null - ? Params.fromPartial(object.params) - : undefined; + message.deployments = object.deployments?.map(e => GenesisDeployment.fromPartial(e)) || []; + message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; return message; - }, + } }; messageTypeRegistry.set(GenesisState.$type, GenesisState); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/deployment/v1beta1/group.ts b/src/protobuf/akash/deployment/v1beta1/group.ts index 93569a9..5a7befe 100644 --- a/src/protobuf/akash/deployment/v1beta1/group.ts +++ b/src/protobuf/akash/deployment/v1beta1/group.ts @@ -78,7 +78,7 @@ export enum Group_State { insufficient_funds = 3, /** closed - GroupClosed denotes state for group closed */ closed = 4, - UNRECOGNIZED = -1, + UNRECOGNIZED = -1 } export function group_StateFromJSON(object: any): Group_State { @@ -138,10 +138,7 @@ function createBaseMsgCloseGroup(): MsgCloseGroup { export const MsgCloseGroup = { $type: "akash.deployment.v1beta1.MsgCloseGroup" as const, - encode( - message: MsgCloseGroup, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MsgCloseGroup, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { GroupID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -169,27 +166,21 @@ export const MsgCloseGroup = { fromJSON(object: any): MsgCloseGroup { return { $type: MsgCloseGroup.$type, - id: isSet(object.id) ? GroupID.fromJSON(object.id) : undefined, + id: isSet(object.id) ? GroupID.fromJSON(object.id) : undefined }; }, toJSON(message: MsgCloseGroup): unknown { const obj: any = {}; - message.id !== undefined && - (obj.id = message.id ? GroupID.toJSON(message.id) : undefined); + message.id !== undefined && (obj.id = message.id ? GroupID.toJSON(message.id) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): MsgCloseGroup { + fromPartial, I>>(object: I): MsgCloseGroup { const message = createBaseMsgCloseGroup(); - message.id = - object.id !== undefined && object.id !== null - ? GroupID.fromPartial(object.id) - : undefined; + message.id = object.id !== undefined && object.id !== null ? GroupID.fromPartial(object.id) : undefined; return message; - }, + } }; messageTypeRegistry.set(MsgCloseGroup.$type, MsgCloseGroup); @@ -201,17 +192,11 @@ function createBaseMsgCloseGroupResponse(): MsgCloseGroupResponse { export const MsgCloseGroupResponse = { $type: "akash.deployment.v1beta1.MsgCloseGroupResponse" as const, - encode( - _: MsgCloseGroupResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: MsgCloseGroupResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgCloseGroupResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgCloseGroupResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCloseGroupResponse(); @@ -228,7 +213,7 @@ export const MsgCloseGroupResponse = { fromJSON(_: any): MsgCloseGroupResponse { return { - $type: MsgCloseGroupResponse.$type, + $type: MsgCloseGroupResponse.$type }; }, @@ -237,12 +222,10 @@ export const MsgCloseGroupResponse = { return obj; }, - fromPartial, I>>( - _: I - ): MsgCloseGroupResponse { + fromPartial, I>>(_: I): MsgCloseGroupResponse { const message = createBaseMsgCloseGroupResponse(); return message; - }, + } }; messageTypeRegistry.set(MsgCloseGroupResponse.$type, MsgCloseGroupResponse); @@ -254,10 +237,7 @@ function createBaseMsgPauseGroup(): MsgPauseGroup { export const MsgPauseGroup = { $type: "akash.deployment.v1beta1.MsgPauseGroup" as const, - encode( - message: MsgPauseGroup, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MsgPauseGroup, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { GroupID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -285,27 +265,21 @@ export const MsgPauseGroup = { fromJSON(object: any): MsgPauseGroup { return { $type: MsgPauseGroup.$type, - id: isSet(object.id) ? GroupID.fromJSON(object.id) : undefined, + id: isSet(object.id) ? GroupID.fromJSON(object.id) : undefined }; }, toJSON(message: MsgPauseGroup): unknown { const obj: any = {}; - message.id !== undefined && - (obj.id = message.id ? GroupID.toJSON(message.id) : undefined); + message.id !== undefined && (obj.id = message.id ? GroupID.toJSON(message.id) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): MsgPauseGroup { + fromPartial, I>>(object: I): MsgPauseGroup { const message = createBaseMsgPauseGroup(); - message.id = - object.id !== undefined && object.id !== null - ? GroupID.fromPartial(object.id) - : undefined; + message.id = object.id !== undefined && object.id !== null ? GroupID.fromPartial(object.id) : undefined; return message; - }, + } }; messageTypeRegistry.set(MsgPauseGroup.$type, MsgPauseGroup); @@ -317,17 +291,11 @@ function createBaseMsgPauseGroupResponse(): MsgPauseGroupResponse { export const MsgPauseGroupResponse = { $type: "akash.deployment.v1beta1.MsgPauseGroupResponse" as const, - encode( - _: MsgPauseGroupResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: MsgPauseGroupResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgPauseGroupResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgPauseGroupResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgPauseGroupResponse(); @@ -344,7 +312,7 @@ export const MsgPauseGroupResponse = { fromJSON(_: any): MsgPauseGroupResponse { return { - $type: MsgPauseGroupResponse.$type, + $type: MsgPauseGroupResponse.$type }; }, @@ -353,12 +321,10 @@ export const MsgPauseGroupResponse = { return obj; }, - fromPartial, I>>( - _: I - ): MsgPauseGroupResponse { + fromPartial, I>>(_: I): MsgPauseGroupResponse { const message = createBaseMsgPauseGroupResponse(); return message; - }, + } }; messageTypeRegistry.set(MsgPauseGroupResponse.$type, MsgPauseGroupResponse); @@ -370,10 +336,7 @@ function createBaseMsgStartGroup(): MsgStartGroup { export const MsgStartGroup = { $type: "akash.deployment.v1beta1.MsgStartGroup" as const, - encode( - message: MsgStartGroup, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MsgStartGroup, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { GroupID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -401,27 +364,21 @@ export const MsgStartGroup = { fromJSON(object: any): MsgStartGroup { return { $type: MsgStartGroup.$type, - id: isSet(object.id) ? GroupID.fromJSON(object.id) : undefined, + id: isSet(object.id) ? GroupID.fromJSON(object.id) : undefined }; }, toJSON(message: MsgStartGroup): unknown { const obj: any = {}; - message.id !== undefined && - (obj.id = message.id ? GroupID.toJSON(message.id) : undefined); + message.id !== undefined && (obj.id = message.id ? GroupID.toJSON(message.id) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): MsgStartGroup { + fromPartial, I>>(object: I): MsgStartGroup { const message = createBaseMsgStartGroup(); - message.id = - object.id !== undefined && object.id !== null - ? GroupID.fromPartial(object.id) - : undefined; + message.id = object.id !== undefined && object.id !== null ? GroupID.fromPartial(object.id) : undefined; return message; - }, + } }; messageTypeRegistry.set(MsgStartGroup.$type, MsgStartGroup); @@ -433,17 +390,11 @@ function createBaseMsgStartGroupResponse(): MsgStartGroupResponse { export const MsgStartGroupResponse = { $type: "akash.deployment.v1beta1.MsgStartGroupResponse" as const, - encode( - _: MsgStartGroupResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: MsgStartGroupResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgStartGroupResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgStartGroupResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgStartGroupResponse(); @@ -460,7 +411,7 @@ export const MsgStartGroupResponse = { fromJSON(_: any): MsgStartGroupResponse { return { - $type: MsgStartGroupResponse.$type, + $type: MsgStartGroupResponse.$type }; }, @@ -469,12 +420,10 @@ export const MsgStartGroupResponse = { return obj; }, - fromPartial, I>>( - _: I - ): MsgStartGroupResponse { + fromPartial, I>>(_: I): MsgStartGroupResponse { const message = createBaseMsgStartGroupResponse(); return message; - }, + } }; messageTypeRegistry.set(MsgStartGroupResponse.$type, MsgStartGroupResponse); @@ -484,17 +433,14 @@ function createBaseGroupID(): GroupID { $type: "akash.deployment.v1beta1.GroupID", owner: "", dseq: Long.UZERO, - gseq: 0, + gseq: 0 }; } export const GroupID = { $type: "akash.deployment.v1beta1.GroupID" as const, - encode( - message: GroupID, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: GroupID, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -536,15 +482,14 @@ export const GroupID = { $type: GroupID.$type, owner: isSet(object.owner) ? String(object.owner) : "", dseq: isSet(object.dseq) ? Long.fromValue(object.dseq) : Long.UZERO, - gseq: isSet(object.gseq) ? Number(object.gseq) : 0, + gseq: isSet(object.gseq) ? Number(object.gseq) : 0 }; }, toJSON(message: GroupID): unknown { const obj: any = {}; message.owner !== undefined && (obj.owner = message.owner); - message.dseq !== undefined && - (obj.dseq = (message.dseq || Long.UZERO).toString()); + message.dseq !== undefined && (obj.dseq = (message.dseq || Long.UZERO).toString()); message.gseq !== undefined && (obj.gseq = Math.round(message.gseq)); return obj; }, @@ -552,13 +497,10 @@ export const GroupID = { fromPartial, I>>(object: I): GroupID { const message = createBaseGroupID(); message.owner = object.owner ?? ""; - message.dseq = - object.dseq !== undefined && object.dseq !== null - ? Long.fromValue(object.dseq) - : Long.UZERO; + message.dseq = object.dseq !== undefined && object.dseq !== null ? Long.fromValue(object.dseq) : Long.UZERO; message.gseq = object.gseq ?? 0; return message; - }, + } }; messageTypeRegistry.set(GroupID.$type, GroupID); @@ -568,25 +510,19 @@ function createBaseGroupSpec(): GroupSpec { $type: "akash.deployment.v1beta1.GroupSpec", name: "", requirements: undefined, - resources: [], + resources: [] }; } export const GroupSpec = { $type: "akash.deployment.v1beta1.GroupSpec" as const, - encode( - message: GroupSpec, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: GroupSpec, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.name !== "") { writer.uint32(10).string(message.name); } if (message.requirements !== undefined) { - PlacementRequirements.encode( - message.requirements, - writer.uint32(18).fork() - ).ldelim(); + PlacementRequirements.encode(message.requirements, writer.uint32(18).fork()).ldelim(); } for (const v of message.resources) { Resource.encode(v!, writer.uint32(26).fork()).ldelim(); @@ -605,10 +541,7 @@ export const GroupSpec = { message.name = reader.string(); break; case 2: - message.requirements = PlacementRequirements.decode( - reader, - reader.uint32() - ); + message.requirements = PlacementRequirements.decode(reader, reader.uint32()); break; case 3: message.resources.push(Resource.decode(reader, reader.uint32())); @@ -625,45 +558,31 @@ export const GroupSpec = { return { $type: GroupSpec.$type, name: isSet(object.name) ? String(object.name) : "", - requirements: isSet(object.requirements) - ? PlacementRequirements.fromJSON(object.requirements) - : undefined, - resources: Array.isArray(object?.resources) - ? object.resources.map((e: any) => Resource.fromJSON(e)) - : [], + requirements: isSet(object.requirements) ? PlacementRequirements.fromJSON(object.requirements) : undefined, + resources: Array.isArray(object?.resources) ? object.resources.map((e: any) => Resource.fromJSON(e)) : [] }; }, toJSON(message: GroupSpec): unknown { const obj: any = {}; message.name !== undefined && (obj.name = message.name); - message.requirements !== undefined && - (obj.requirements = message.requirements - ? PlacementRequirements.toJSON(message.requirements) - : undefined); + message.requirements !== undefined && (obj.requirements = message.requirements ? PlacementRequirements.toJSON(message.requirements) : undefined); if (message.resources) { - obj.resources = message.resources.map((e) => - e ? Resource.toJSON(e) : undefined - ); + obj.resources = message.resources.map(e => (e ? Resource.toJSON(e) : undefined)); } else { obj.resources = []; } return obj; }, - fromPartial, I>>( - object: I - ): GroupSpec { + fromPartial, I>>(object: I): GroupSpec { const message = createBaseGroupSpec(); message.name = object.name ?? ""; message.requirements = - object.requirements !== undefined && object.requirements !== null - ? PlacementRequirements.fromPartial(object.requirements) - : undefined; - message.resources = - object.resources?.map((e) => Resource.fromPartial(e)) || []; + object.requirements !== undefined && object.requirements !== null ? PlacementRequirements.fromPartial(object.requirements) : undefined; + message.resources = object.resources?.map(e => Resource.fromPartial(e)) || []; return message; - }, + } }; messageTypeRegistry.set(GroupSpec.$type, GroupSpec); @@ -674,7 +593,7 @@ function createBaseGroup(): Group { groupId: undefined, state: 0, groupSpec: undefined, - createdAt: Long.ZERO, + createdAt: Long.ZERO }; } @@ -727,53 +646,30 @@ export const Group = { fromJSON(object: any): Group { return { $type: Group.$type, - groupId: isSet(object.groupId) - ? GroupID.fromJSON(object.groupId) - : undefined, + groupId: isSet(object.groupId) ? GroupID.fromJSON(object.groupId) : undefined, state: isSet(object.state) ? group_StateFromJSON(object.state) : 0, - groupSpec: isSet(object.groupSpec) - ? GroupSpec.fromJSON(object.groupSpec) - : undefined, - createdAt: isSet(object.createdAt) - ? Long.fromValue(object.createdAt) - : Long.ZERO, + groupSpec: isSet(object.groupSpec) ? GroupSpec.fromJSON(object.groupSpec) : undefined, + createdAt: isSet(object.createdAt) ? Long.fromValue(object.createdAt) : Long.ZERO }; }, toJSON(message: Group): unknown { const obj: any = {}; - message.groupId !== undefined && - (obj.groupId = message.groupId - ? GroupID.toJSON(message.groupId) - : undefined); - message.state !== undefined && - (obj.state = group_StateToJSON(message.state)); - message.groupSpec !== undefined && - (obj.groupSpec = message.groupSpec - ? GroupSpec.toJSON(message.groupSpec) - : undefined); - message.createdAt !== undefined && - (obj.createdAt = (message.createdAt || Long.ZERO).toString()); + message.groupId !== undefined && (obj.groupId = message.groupId ? GroupID.toJSON(message.groupId) : undefined); + message.state !== undefined && (obj.state = group_StateToJSON(message.state)); + message.groupSpec !== undefined && (obj.groupSpec = message.groupSpec ? GroupSpec.toJSON(message.groupSpec) : undefined); + message.createdAt !== undefined && (obj.createdAt = (message.createdAt || Long.ZERO).toString()); return obj; }, fromPartial, I>>(object: I): Group { const message = createBaseGroup(); - message.groupId = - object.groupId !== undefined && object.groupId !== null - ? GroupID.fromPartial(object.groupId) - : undefined; + message.groupId = object.groupId !== undefined && object.groupId !== null ? GroupID.fromPartial(object.groupId) : undefined; message.state = object.state ?? 0; - message.groupSpec = - object.groupSpec !== undefined && object.groupSpec !== null - ? GroupSpec.fromPartial(object.groupSpec) - : undefined; - message.createdAt = - object.createdAt !== undefined && object.createdAt !== null - ? Long.fromValue(object.createdAt) - : Long.ZERO; + message.groupSpec = object.groupSpec !== undefined && object.groupSpec !== null ? GroupSpec.fromPartial(object.groupSpec) : undefined; + message.createdAt = object.createdAt !== undefined && object.createdAt !== null ? Long.fromValue(object.createdAt) : Long.ZERO; return message; - }, + } }; messageTypeRegistry.set(Group.$type, Group); @@ -783,22 +679,16 @@ function createBaseResource(): Resource { $type: "akash.deployment.v1beta1.Resource", resources: undefined, count: 0, - price: undefined, + price: undefined }; } export const Resource = { $type: "akash.deployment.v1beta1.Resource" as const, - encode( - message: Resource, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Resource, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.resources !== undefined) { - ResourceUnits.encode( - message.resources, - writer.uint32(10).fork() - ).ldelim(); + ResourceUnits.encode(message.resources, writer.uint32(10).fork()).ldelim(); } if (message.count !== 0) { writer.uint32(16).uint32(message.count); @@ -836,71 +726,49 @@ export const Resource = { fromJSON(object: any): Resource { return { $type: Resource.$type, - resources: isSet(object.resources) - ? ResourceUnits.fromJSON(object.resources) - : undefined, + resources: isSet(object.resources) ? ResourceUnits.fromJSON(object.resources) : undefined, count: isSet(object.count) ? Number(object.count) : 0, - price: isSet(object.price) ? Coin.fromJSON(object.price) : undefined, + price: isSet(object.price) ? Coin.fromJSON(object.price) : undefined }; }, toJSON(message: Resource): unknown { const obj: any = {}; - message.resources !== undefined && - (obj.resources = message.resources - ? ResourceUnits.toJSON(message.resources) - : undefined); + message.resources !== undefined && (obj.resources = message.resources ? ResourceUnits.toJSON(message.resources) : undefined); message.count !== undefined && (obj.count = Math.round(message.count)); - message.price !== undefined && - (obj.price = message.price ? Coin.toJSON(message.price) : undefined); + message.price !== undefined && (obj.price = message.price ? Coin.toJSON(message.price) : undefined); return obj; }, fromPartial, I>>(object: I): Resource { const message = createBaseResource(); - message.resources = - object.resources !== undefined && object.resources !== null - ? ResourceUnits.fromPartial(object.resources) - : undefined; + message.resources = object.resources !== undefined && object.resources !== null ? ResourceUnits.fromPartial(object.resources) : undefined; message.count = object.count ?? 0; - message.price = - object.price !== undefined && object.price !== null - ? Coin.fromPartial(object.price) - : undefined; + message.price = object.price !== undefined && object.price !== null ? Coin.fromPartial(object.price) : undefined; return message; - }, + } }; messageTypeRegistry.set(Resource.$type, Resource); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/deployment/v1beta1/params.ts b/src/protobuf/akash/deployment/v1beta1/params.ts index dac26c3..ca31b9d 100644 --- a/src/protobuf/akash/deployment/v1beta1/params.ts +++ b/src/protobuf/akash/deployment/v1beta1/params.ts @@ -15,22 +15,16 @@ export interface Params { function createBaseParams(): Params { return { $type: "akash.deployment.v1beta1.Params", - deploymentMinDeposit: undefined, + deploymentMinDeposit: undefined }; } export const Params = { $type: "akash.deployment.v1beta1.Params" as const, - encode( - message: Params, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Params, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.deploymentMinDeposit !== undefined) { - Coin.encode( - message.deploymentMinDeposit, - writer.uint32(10).fork() - ).ldelim(); + Coin.encode(message.deploymentMinDeposit, writer.uint32(10).fork()).ldelim(); } return writer; }, @@ -56,62 +50,45 @@ export const Params = { fromJSON(object: any): Params { return { $type: Params.$type, - deploymentMinDeposit: isSet(object.deploymentMinDeposit) - ? Coin.fromJSON(object.deploymentMinDeposit) - : undefined, + deploymentMinDeposit: isSet(object.deploymentMinDeposit) ? Coin.fromJSON(object.deploymentMinDeposit) : undefined }; }, toJSON(message: Params): unknown { const obj: any = {}; message.deploymentMinDeposit !== undefined && - (obj.deploymentMinDeposit = message.deploymentMinDeposit - ? Coin.toJSON(message.deploymentMinDeposit) - : undefined); + (obj.deploymentMinDeposit = message.deploymentMinDeposit ? Coin.toJSON(message.deploymentMinDeposit) : undefined); return obj; }, fromPartial, I>>(object: I): Params { const message = createBaseParams(); message.deploymentMinDeposit = - object.deploymentMinDeposit !== undefined && - object.deploymentMinDeposit !== null - ? Coin.fromPartial(object.deploymentMinDeposit) - : undefined; + object.deploymentMinDeposit !== undefined && object.deploymentMinDeposit !== null ? Coin.fromPartial(object.deploymentMinDeposit) : undefined; return message; - }, + } }; messageTypeRegistry.set(Params.$type, Params); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/deployment/v1beta1/query.ts b/src/protobuf/akash/deployment/v1beta1/query.ts index 1c896c7..95b01ff 100644 --- a/src/protobuf/akash/deployment/v1beta1/query.ts +++ b/src/protobuf/akash/deployment/v1beta1/query.ts @@ -2,10 +2,7 @@ import { messageTypeRegistry } from "../../../typeRegistry"; import Long from "long"; import { DeploymentFilters, DeploymentID, Deployment } from "./deployment"; -import { - PageRequest, - PageResponse, -} from "../../../cosmos/base/query/v1beta1/pagination"; +import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; import { Group, GroupID } from "./group"; import { Account } from "../../escrow/v1beta1/types"; import * as _m0 from "protobufjs/minimal"; @@ -56,22 +53,16 @@ function createBaseQueryDeploymentsRequest(): QueryDeploymentsRequest { return { $type: "akash.deployment.v1beta1.QueryDeploymentsRequest", filters: undefined, - pagination: undefined, + pagination: undefined }; } export const QueryDeploymentsRequest = { $type: "akash.deployment.v1beta1.QueryDeploymentsRequest" as const, - encode( - message: QueryDeploymentsRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryDeploymentsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.filters !== undefined) { - DeploymentFilters.encode( - message.filters, - writer.uint32(10).fork() - ).ldelim(); + DeploymentFilters.encode(message.filters, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); @@ -79,10 +70,7 @@ export const QueryDeploymentsRequest = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryDeploymentsRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryDeploymentsRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryDeploymentsRequest(); @@ -106,42 +94,24 @@ export const QueryDeploymentsRequest = { fromJSON(object: any): QueryDeploymentsRequest { return { $type: QueryDeploymentsRequest.$type, - filters: isSet(object.filters) - ? DeploymentFilters.fromJSON(object.filters) - : undefined, - pagination: isSet(object.pagination) - ? PageRequest.fromJSON(object.pagination) - : undefined, + filters: isSet(object.filters) ? DeploymentFilters.fromJSON(object.filters) : undefined, + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined }; }, toJSON(message: QueryDeploymentsRequest): unknown { const obj: any = {}; - message.filters !== undefined && - (obj.filters = message.filters - ? DeploymentFilters.toJSON(message.filters) - : undefined); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); + message.filters !== undefined && (obj.filters = message.filters ? DeploymentFilters.toJSON(message.filters) : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryDeploymentsRequest { + fromPartial, I>>(object: I): QueryDeploymentsRequest { const message = createBaseQueryDeploymentsRequest(); - message.filters = - object.filters !== undefined && object.filters !== null - ? DeploymentFilters.fromPartial(object.filters) - : undefined; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; + message.filters = object.filters !== undefined && object.filters !== null ? DeploymentFilters.fromPartial(object.filters) : undefined; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryDeploymentsRequest.$type, QueryDeploymentsRequest); @@ -150,33 +120,24 @@ function createBaseQueryDeploymentsResponse(): QueryDeploymentsResponse { return { $type: "akash.deployment.v1beta1.QueryDeploymentsResponse", deployments: [], - pagination: undefined, + pagination: undefined }; } export const QueryDeploymentsResponse = { $type: "akash.deployment.v1beta1.QueryDeploymentsResponse" as const, - encode( - message: QueryDeploymentsResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryDeploymentsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.deployments) { QueryDeploymentResponse.encode(v!, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); + PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryDeploymentsResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryDeploymentsResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryDeploymentsResponse(); @@ -184,9 +145,7 @@ export const QueryDeploymentsResponse = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.deployments.push( - QueryDeploymentResponse.decode(reader, reader.uint32()) - ); + message.deployments.push(QueryDeploymentResponse.decode(reader, reader.uint32())); break; case 2: message.pagination = PageResponse.decode(reader, reader.uint32()); @@ -202,77 +161,50 @@ export const QueryDeploymentsResponse = { fromJSON(object: any): QueryDeploymentsResponse { return { $type: QueryDeploymentsResponse.$type, - deployments: Array.isArray(object?.deployments) - ? object.deployments.map((e: any) => - QueryDeploymentResponse.fromJSON(e) - ) - : [], - pagination: isSet(object.pagination) - ? PageResponse.fromJSON(object.pagination) - : undefined, + deployments: Array.isArray(object?.deployments) ? object.deployments.map((e: any) => QueryDeploymentResponse.fromJSON(e)) : [], + pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined }; }, toJSON(message: QueryDeploymentsResponse): unknown { const obj: any = {}; if (message.deployments) { - obj.deployments = message.deployments.map((e) => - e ? QueryDeploymentResponse.toJSON(e) : undefined - ); + obj.deployments = message.deployments.map(e => (e ? QueryDeploymentResponse.toJSON(e) : undefined)); } else { obj.deployments = []; } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryDeploymentsResponse { + fromPartial, I>>(object: I): QueryDeploymentsResponse { const message = createBaseQueryDeploymentsResponse(); - message.deployments = - object.deployments?.map((e) => QueryDeploymentResponse.fromPartial(e)) || - []; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageResponse.fromPartial(object.pagination) - : undefined; + message.deployments = object.deployments?.map(e => QueryDeploymentResponse.fromPartial(e)) || []; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; return message; - }, + } }; -messageTypeRegistry.set( - QueryDeploymentsResponse.$type, - QueryDeploymentsResponse -); +messageTypeRegistry.set(QueryDeploymentsResponse.$type, QueryDeploymentsResponse); function createBaseQueryDeploymentRequest(): QueryDeploymentRequest { return { $type: "akash.deployment.v1beta1.QueryDeploymentRequest", - id: undefined, + id: undefined }; } export const QueryDeploymentRequest = { $type: "akash.deployment.v1beta1.QueryDeploymentRequest" as const, - encode( - message: QueryDeploymentRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryDeploymentRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { DeploymentID.encode(message.id, writer.uint32(10).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryDeploymentRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryDeploymentRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryDeploymentRequest(); @@ -293,27 +225,21 @@ export const QueryDeploymentRequest = { fromJSON(object: any): QueryDeploymentRequest { return { $type: QueryDeploymentRequest.$type, - id: isSet(object.id) ? DeploymentID.fromJSON(object.id) : undefined, + id: isSet(object.id) ? DeploymentID.fromJSON(object.id) : undefined }; }, toJSON(message: QueryDeploymentRequest): unknown { const obj: any = {}; - message.id !== undefined && - (obj.id = message.id ? DeploymentID.toJSON(message.id) : undefined); + message.id !== undefined && (obj.id = message.id ? DeploymentID.toJSON(message.id) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryDeploymentRequest { + fromPartial, I>>(object: I): QueryDeploymentRequest { const message = createBaseQueryDeploymentRequest(); - message.id = - object.id !== undefined && object.id !== null - ? DeploymentID.fromPartial(object.id) - : undefined; + message.id = object.id !== undefined && object.id !== null ? DeploymentID.fromPartial(object.id) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryDeploymentRequest.$type, QueryDeploymentRequest); @@ -323,17 +249,14 @@ function createBaseQueryDeploymentResponse(): QueryDeploymentResponse { $type: "akash.deployment.v1beta1.QueryDeploymentResponse", deployment: undefined, groups: [], - escrowAccount: undefined, + escrowAccount: undefined }; } export const QueryDeploymentResponse = { $type: "akash.deployment.v1beta1.QueryDeploymentResponse" as const, - encode( - message: QueryDeploymentResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryDeploymentResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.deployment !== undefined) { Deployment.encode(message.deployment, writer.uint32(10).fork()).ldelim(); } @@ -346,10 +269,7 @@ export const QueryDeploymentResponse = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryDeploymentResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryDeploymentResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryDeploymentResponse(); @@ -376,51 +296,31 @@ export const QueryDeploymentResponse = { fromJSON(object: any): QueryDeploymentResponse { return { $type: QueryDeploymentResponse.$type, - deployment: isSet(object.deployment) - ? Deployment.fromJSON(object.deployment) - : undefined, - groups: Array.isArray(object?.groups) - ? object.groups.map((e: any) => Group.fromJSON(e)) - : [], - escrowAccount: isSet(object.escrowAccount) - ? Account.fromJSON(object.escrowAccount) - : undefined, + deployment: isSet(object.deployment) ? Deployment.fromJSON(object.deployment) : undefined, + groups: Array.isArray(object?.groups) ? object.groups.map((e: any) => Group.fromJSON(e)) : [], + escrowAccount: isSet(object.escrowAccount) ? Account.fromJSON(object.escrowAccount) : undefined }; }, toJSON(message: QueryDeploymentResponse): unknown { const obj: any = {}; - message.deployment !== undefined && - (obj.deployment = message.deployment - ? Deployment.toJSON(message.deployment) - : undefined); + message.deployment !== undefined && (obj.deployment = message.deployment ? Deployment.toJSON(message.deployment) : undefined); if (message.groups) { - obj.groups = message.groups.map((e) => (e ? Group.toJSON(e) : undefined)); + obj.groups = message.groups.map(e => (e ? Group.toJSON(e) : undefined)); } else { obj.groups = []; } - message.escrowAccount !== undefined && - (obj.escrowAccount = message.escrowAccount - ? Account.toJSON(message.escrowAccount) - : undefined); + message.escrowAccount !== undefined && (obj.escrowAccount = message.escrowAccount ? Account.toJSON(message.escrowAccount) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryDeploymentResponse { + fromPartial, I>>(object: I): QueryDeploymentResponse { const message = createBaseQueryDeploymentResponse(); - message.deployment = - object.deployment !== undefined && object.deployment !== null - ? Deployment.fromPartial(object.deployment) - : undefined; - message.groups = object.groups?.map((e) => Group.fromPartial(e)) || []; - message.escrowAccount = - object.escrowAccount !== undefined && object.escrowAccount !== null - ? Account.fromPartial(object.escrowAccount) - : undefined; + message.deployment = object.deployment !== undefined && object.deployment !== null ? Deployment.fromPartial(object.deployment) : undefined; + message.groups = object.groups?.map(e => Group.fromPartial(e)) || []; + message.escrowAccount = object.escrowAccount !== undefined && object.escrowAccount !== null ? Account.fromPartial(object.escrowAccount) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryDeploymentResponse.$type, QueryDeploymentResponse); @@ -432,10 +332,7 @@ function createBaseQueryGroupRequest(): QueryGroupRequest { export const QueryGroupRequest = { $type: "akash.deployment.v1beta1.QueryGroupRequest" as const, - encode( - message: QueryGroupRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryGroupRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { GroupID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -463,27 +360,21 @@ export const QueryGroupRequest = { fromJSON(object: any): QueryGroupRequest { return { $type: QueryGroupRequest.$type, - id: isSet(object.id) ? GroupID.fromJSON(object.id) : undefined, + id: isSet(object.id) ? GroupID.fromJSON(object.id) : undefined }; }, toJSON(message: QueryGroupRequest): unknown { const obj: any = {}; - message.id !== undefined && - (obj.id = message.id ? GroupID.toJSON(message.id) : undefined); + message.id !== undefined && (obj.id = message.id ? GroupID.toJSON(message.id) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryGroupRequest { + fromPartial, I>>(object: I): QueryGroupRequest { const message = createBaseQueryGroupRequest(); - message.id = - object.id !== undefined && object.id !== null - ? GroupID.fromPartial(object.id) - : undefined; + message.id = object.id !== undefined && object.id !== null ? GroupID.fromPartial(object.id) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryGroupRequest.$type, QueryGroupRequest); @@ -491,17 +382,14 @@ messageTypeRegistry.set(QueryGroupRequest.$type, QueryGroupRequest); function createBaseQueryGroupResponse(): QueryGroupResponse { return { $type: "akash.deployment.v1beta1.QueryGroupResponse", - group: undefined, + group: undefined }; } export const QueryGroupResponse = { $type: "akash.deployment.v1beta1.QueryGroupResponse" as const, - encode( - message: QueryGroupResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryGroupResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.group !== undefined) { Group.encode(message.group, writer.uint32(10).fork()).ldelim(); } @@ -529,27 +417,21 @@ export const QueryGroupResponse = { fromJSON(object: any): QueryGroupResponse { return { $type: QueryGroupResponse.$type, - group: isSet(object.group) ? Group.fromJSON(object.group) : undefined, + group: isSet(object.group) ? Group.fromJSON(object.group) : undefined }; }, toJSON(message: QueryGroupResponse): unknown { const obj: any = {}; - message.group !== undefined && - (obj.group = message.group ? Group.toJSON(message.group) : undefined); + message.group !== undefined && (obj.group = message.group ? Group.toJSON(message.group) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryGroupResponse { + fromPartial, I>>(object: I): QueryGroupResponse { const message = createBaseQueryGroupResponse(); - message.group = - object.group !== undefined && object.group !== null - ? Group.fromPartial(object.group) - : undefined; + message.group = object.group !== undefined && object.group !== null ? Group.fromPartial(object.group) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryGroupResponse.$type, QueryGroupResponse); @@ -557,9 +439,7 @@ messageTypeRegistry.set(QueryGroupResponse.$type, QueryGroupResponse); /** Query defines the gRPC querier service */ export interface Query { /** Deployments queries deployments */ - Deployments( - request: QueryDeploymentsRequest - ): Promise; + Deployments(request: QueryDeploymentsRequest): Promise; /** Deployment queries deployment details */ Deployment(request: QueryDeploymentRequest): Promise; /** Group queries group details */ @@ -574,83 +454,47 @@ export class QueryClientImpl implements Query { this.Deployment = this.Deployment.bind(this); this.Group = this.Group.bind(this); } - Deployments( - request: QueryDeploymentsRequest - ): Promise { + Deployments(request: QueryDeploymentsRequest): Promise { const data = QueryDeploymentsRequest.encode(request).finish(); - const promise = this.rpc.request( - "akash.deployment.v1beta1.Query", - "Deployments", - data - ); - return promise.then((data) => - QueryDeploymentsResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.deployment.v1beta1.Query", "Deployments", data); + return promise.then(data => QueryDeploymentsResponse.decode(new _m0.Reader(data))); } - Deployment( - request: QueryDeploymentRequest - ): Promise { + Deployment(request: QueryDeploymentRequest): Promise { const data = QueryDeploymentRequest.encode(request).finish(); - const promise = this.rpc.request( - "akash.deployment.v1beta1.Query", - "Deployment", - data - ); - return promise.then((data) => - QueryDeploymentResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.deployment.v1beta1.Query", "Deployment", data); + return promise.then(data => QueryDeploymentResponse.decode(new _m0.Reader(data))); } Group(request: QueryGroupRequest): Promise { const data = QueryGroupRequest.encode(request).finish(); - const promise = this.rpc.request( - "akash.deployment.v1beta1.Query", - "Group", - data - ); - return promise.then((data) => - QueryGroupResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.deployment.v1beta1.Query", "Group", data); + return promise.then(data => QueryGroupResponse.decode(new _m0.Reader(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/deployment/v1beta2/authz.ts b/src/protobuf/akash/deployment/v1beta2/authz.ts index 682ee16..93f46a9 100644 --- a/src/protobuf/akash/deployment/v1beta2/authz.ts +++ b/src/protobuf/akash/deployment/v1beta2/authz.ts @@ -22,27 +22,21 @@ export interface DepositDeploymentAuthorization { function createBaseDepositDeploymentAuthorization(): DepositDeploymentAuthorization { return { $type: "akash.deployment.v1beta2.DepositDeploymentAuthorization", - spendLimit: undefined, + spendLimit: undefined }; } export const DepositDeploymentAuthorization = { $type: "akash.deployment.v1beta2.DepositDeploymentAuthorization" as const, - encode( - message: DepositDeploymentAuthorization, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: DepositDeploymentAuthorization, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.spendLimit !== undefined) { Coin.encode(message.spendLimit, writer.uint32(10).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): DepositDeploymentAuthorization { + decode(input: _m0.Reader | Uint8Array, length?: number): DepositDeploymentAuthorization { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseDepositDeploymentAuthorization(); @@ -63,66 +57,43 @@ export const DepositDeploymentAuthorization = { fromJSON(object: any): DepositDeploymentAuthorization { return { $type: DepositDeploymentAuthorization.$type, - spendLimit: isSet(object.spendLimit) - ? Coin.fromJSON(object.spendLimit) - : undefined, + spendLimit: isSet(object.spendLimit) ? Coin.fromJSON(object.spendLimit) : undefined }; }, toJSON(message: DepositDeploymentAuthorization): unknown { const obj: any = {}; - message.spendLimit !== undefined && - (obj.spendLimit = message.spendLimit - ? Coin.toJSON(message.spendLimit) - : undefined); + message.spendLimit !== undefined && (obj.spendLimit = message.spendLimit ? Coin.toJSON(message.spendLimit) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): DepositDeploymentAuthorization { + fromPartial, I>>(object: I): DepositDeploymentAuthorization { const message = createBaseDepositDeploymentAuthorization(); - message.spendLimit = - object.spendLimit !== undefined && object.spendLimit !== null - ? Coin.fromPartial(object.spendLimit) - : undefined; + message.spendLimit = object.spendLimit !== undefined && object.spendLimit !== null ? Coin.fromPartial(object.spendLimit) : undefined; return message; - }, + } }; -messageTypeRegistry.set( - DepositDeploymentAuthorization.$type, - DepositDeploymentAuthorization -); +messageTypeRegistry.set(DepositDeploymentAuthorization.$type, DepositDeploymentAuthorization); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/deployment/v1beta2/deployment.ts b/src/protobuf/akash/deployment/v1beta2/deployment.ts index 143d627..e970e74 100644 --- a/src/protobuf/akash/deployment/v1beta2/deployment.ts +++ b/src/protobuf/akash/deployment/v1beta2/deployment.ts @@ -29,7 +29,7 @@ export enum Deployment_State { active = 1, /** closed - DeploymentClosed denotes state for deployment closed */ closed = 2, - UNRECOGNIZED = -1, + UNRECOGNIZED = -1 } export function deployment_StateFromJSON(object: any): Deployment_State { @@ -76,17 +76,14 @@ function createBaseDeploymentID(): DeploymentID { return { $type: "akash.deployment.v1beta2.DeploymentID", owner: "", - dseq: Long.UZERO, + dseq: Long.UZERO }; } export const DeploymentID = { $type: "akash.deployment.v1beta2.DeploymentID" as const, - encode( - message: DeploymentID, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: DeploymentID, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -121,29 +118,23 @@ export const DeploymentID = { return { $type: DeploymentID.$type, owner: isSet(object.owner) ? String(object.owner) : "", - dseq: isSet(object.dseq) ? Long.fromValue(object.dseq) : Long.UZERO, + dseq: isSet(object.dseq) ? Long.fromValue(object.dseq) : Long.UZERO }; }, toJSON(message: DeploymentID): unknown { const obj: any = {}; message.owner !== undefined && (obj.owner = message.owner); - message.dseq !== undefined && - (obj.dseq = (message.dseq || Long.UZERO).toString()); + message.dseq !== undefined && (obj.dseq = (message.dseq || Long.UZERO).toString()); return obj; }, - fromPartial, I>>( - object: I - ): DeploymentID { + fromPartial, I>>(object: I): DeploymentID { const message = createBaseDeploymentID(); message.owner = object.owner ?? ""; - message.dseq = - object.dseq !== undefined && object.dseq !== null - ? Long.fromValue(object.dseq) - : Long.UZERO; + message.dseq = object.dseq !== undefined && object.dseq !== null ? Long.fromValue(object.dseq) : Long.UZERO; return message; - }, + } }; messageTypeRegistry.set(DeploymentID.$type, DeploymentID); @@ -154,22 +145,16 @@ function createBaseDeployment(): Deployment { deploymentId: undefined, state: 0, version: new Uint8Array(), - createdAt: Long.ZERO, + createdAt: Long.ZERO }; } export const Deployment = { $type: "akash.deployment.v1beta2.Deployment" as const, - encode( - message: Deployment, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Deployment, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.deploymentId !== undefined) { - DeploymentID.encode( - message.deploymentId, - writer.uint32(10).fork() - ).ldelim(); + DeploymentID.encode(message.deploymentId, writer.uint32(10).fork()).ldelim(); } if (message.state !== 0) { writer.uint32(16).int32(message.state); @@ -213,52 +198,30 @@ export const Deployment = { fromJSON(object: any): Deployment { return { $type: Deployment.$type, - deploymentId: isSet(object.deploymentId) - ? DeploymentID.fromJSON(object.deploymentId) - : undefined, + deploymentId: isSet(object.deploymentId) ? DeploymentID.fromJSON(object.deploymentId) : undefined, state: isSet(object.state) ? deployment_StateFromJSON(object.state) : 0, - version: isSet(object.version) - ? bytesFromBase64(object.version) - : new Uint8Array(), - createdAt: isSet(object.createdAt) - ? Long.fromValue(object.createdAt) - : Long.ZERO, + version: isSet(object.version) ? bytesFromBase64(object.version) : new Uint8Array(), + createdAt: isSet(object.createdAt) ? Long.fromValue(object.createdAt) : Long.ZERO }; }, toJSON(message: Deployment): unknown { const obj: any = {}; - message.deploymentId !== undefined && - (obj.deploymentId = message.deploymentId - ? DeploymentID.toJSON(message.deploymentId) - : undefined); - message.state !== undefined && - (obj.state = deployment_StateToJSON(message.state)); - message.version !== undefined && - (obj.version = base64FromBytes( - message.version !== undefined ? message.version : new Uint8Array() - )); - message.createdAt !== undefined && - (obj.createdAt = (message.createdAt || Long.ZERO).toString()); + message.deploymentId !== undefined && (obj.deploymentId = message.deploymentId ? DeploymentID.toJSON(message.deploymentId) : undefined); + message.state !== undefined && (obj.state = deployment_StateToJSON(message.state)); + message.version !== undefined && (obj.version = base64FromBytes(message.version !== undefined ? message.version : new Uint8Array())); + message.createdAt !== undefined && (obj.createdAt = (message.createdAt || Long.ZERO).toString()); return obj; }, - fromPartial, I>>( - object: I - ): Deployment { + fromPartial, I>>(object: I): Deployment { const message = createBaseDeployment(); - message.deploymentId = - object.deploymentId !== undefined && object.deploymentId !== null - ? DeploymentID.fromPartial(object.deploymentId) - : undefined; + message.deploymentId = object.deploymentId !== undefined && object.deploymentId !== null ? DeploymentID.fromPartial(object.deploymentId) : undefined; message.state = object.state ?? 0; message.version = object.version ?? new Uint8Array(); - message.createdAt = - object.createdAt !== undefined && object.createdAt !== null - ? Long.fromValue(object.createdAt) - : Long.ZERO; + message.createdAt = object.createdAt !== undefined && object.createdAt !== null ? Long.fromValue(object.createdAt) : Long.ZERO; return message; - }, + } }; messageTypeRegistry.set(Deployment.$type, Deployment); @@ -268,17 +231,14 @@ function createBaseDeploymentFilters(): DeploymentFilters { $type: "akash.deployment.v1beta2.DeploymentFilters", owner: "", dseq: Long.UZERO, - state: "", + state: "" }; } export const DeploymentFilters = { $type: "akash.deployment.v1beta2.DeploymentFilters" as const, - encode( - message: DeploymentFilters, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: DeploymentFilters, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -320,31 +280,25 @@ export const DeploymentFilters = { $type: DeploymentFilters.$type, owner: isSet(object.owner) ? String(object.owner) : "", dseq: isSet(object.dseq) ? Long.fromValue(object.dseq) : Long.UZERO, - state: isSet(object.state) ? String(object.state) : "", + state: isSet(object.state) ? String(object.state) : "" }; }, toJSON(message: DeploymentFilters): unknown { const obj: any = {}; message.owner !== undefined && (obj.owner = message.owner); - message.dseq !== undefined && - (obj.dseq = (message.dseq || Long.UZERO).toString()); + message.dseq !== undefined && (obj.dseq = (message.dseq || Long.UZERO).toString()); message.state !== undefined && (obj.state = message.state); return obj; }, - fromPartial, I>>( - object: I - ): DeploymentFilters { + fromPartial, I>>(object: I): DeploymentFilters { const message = createBaseDeploymentFilters(); message.owner = object.owner ?? ""; - message.dseq = - object.dseq !== undefined && object.dseq !== null - ? Long.fromValue(object.dseq) - : Long.UZERO; + message.dseq = object.dseq !== undefined && object.dseq !== null ? Long.fromValue(object.dseq) : Long.UZERO; message.state = object.state ?? ""; return message; - }, + } }; messageTypeRegistry.set(DeploymentFilters.$type, DeploymentFilters); @@ -360,9 +314,7 @@ var globalThis: any = (() => { throw "Unable to locate global object"; })(); -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); +const atob: (b64: string) => string = globalThis.atob || (b64 => globalThis.Buffer.from(b64, "base64").toString("binary")); function bytesFromBase64(b64: string): Uint8Array { const bin = atob(b64); const arr = new Uint8Array(bin.length); @@ -372,45 +324,33 @@ function bytesFromBase64(b64: string): Uint8Array { return arr; } -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); +const btoa: (bin: string) => string = globalThis.btoa || (bin => globalThis.Buffer.from(bin, "binary").toString("base64")); function base64FromBytes(arr: Uint8Array): string { const bin: string[] = []; - arr.forEach((byte) => { + arr.forEach(byte => { bin.push(String.fromCharCode(byte)); }); return btoa(bin.join("")); } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/deployment/v1beta2/deploymentmsg.ts b/src/protobuf/akash/deployment/v1beta2/deploymentmsg.ts index 900f869..d3a3758 100644 --- a/src/protobuf/akash/deployment/v1beta2/deploymentmsg.ts +++ b/src/protobuf/akash/deployment/v1beta2/deploymentmsg.ts @@ -68,17 +68,14 @@ function createBaseMsgCreateDeployment(): MsgCreateDeployment { groups: [], version: new Uint8Array(), deposit: undefined, - depositor: "", + depositor: "" }; } export const MsgCreateDeployment = { $type: "akash.deployment.v1beta2.MsgCreateDeployment" as const, - encode( - message: MsgCreateDeployment, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MsgCreateDeployment, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { DeploymentID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -131,59 +128,36 @@ export const MsgCreateDeployment = { return { $type: MsgCreateDeployment.$type, id: isSet(object.id) ? DeploymentID.fromJSON(object.id) : undefined, - groups: Array.isArray(object?.groups) - ? object.groups.map((e: any) => GroupSpec.fromJSON(e)) - : [], - version: isSet(object.version) - ? bytesFromBase64(object.version) - : new Uint8Array(), - deposit: isSet(object.deposit) - ? Coin.fromJSON(object.deposit) - : undefined, - depositor: isSet(object.depositor) ? String(object.depositor) : "", + groups: Array.isArray(object?.groups) ? object.groups.map((e: any) => GroupSpec.fromJSON(e)) : [], + version: isSet(object.version) ? bytesFromBase64(object.version) : new Uint8Array(), + deposit: isSet(object.deposit) ? Coin.fromJSON(object.deposit) : undefined, + depositor: isSet(object.depositor) ? String(object.depositor) : "" }; }, toJSON(message: MsgCreateDeployment): unknown { const obj: any = {}; - message.id !== undefined && - (obj.id = message.id ? DeploymentID.toJSON(message.id) : undefined); + message.id !== undefined && (obj.id = message.id ? DeploymentID.toJSON(message.id) : undefined); if (message.groups) { - obj.groups = message.groups.map((e) => - e ? GroupSpec.toJSON(e) : undefined - ); + obj.groups = message.groups.map(e => (e ? GroupSpec.toJSON(e) : undefined)); } else { obj.groups = []; } - message.version !== undefined && - (obj.version = base64FromBytes( - message.version !== undefined ? message.version : new Uint8Array() - )); - message.deposit !== undefined && - (obj.deposit = message.deposit - ? Coin.toJSON(message.deposit) - : undefined); + message.version !== undefined && (obj.version = base64FromBytes(message.version !== undefined ? message.version : new Uint8Array())); + message.deposit !== undefined && (obj.deposit = message.deposit ? Coin.toJSON(message.deposit) : undefined); message.depositor !== undefined && (obj.depositor = message.depositor); return obj; }, - fromPartial, I>>( - object: I - ): MsgCreateDeployment { + fromPartial, I>>(object: I): MsgCreateDeployment { const message = createBaseMsgCreateDeployment(); - message.id = - object.id !== undefined && object.id !== null - ? DeploymentID.fromPartial(object.id) - : undefined; - message.groups = object.groups?.map((e) => GroupSpec.fromPartial(e)) || []; + message.id = object.id !== undefined && object.id !== null ? DeploymentID.fromPartial(object.id) : undefined; + message.groups = object.groups?.map(e => GroupSpec.fromPartial(e)) || []; message.version = object.version ?? new Uint8Array(); - message.deposit = - object.deposit !== undefined && object.deposit !== null - ? Coin.fromPartial(object.deposit) - : undefined; + message.deposit = object.deposit !== undefined && object.deposit !== null ? Coin.fromPartial(object.deposit) : undefined; message.depositor = object.depositor ?? ""; return message; - }, + } }; messageTypeRegistry.set(MsgCreateDeployment.$type, MsgCreateDeployment); @@ -195,17 +169,11 @@ function createBaseMsgCreateDeploymentResponse(): MsgCreateDeploymentResponse { export const MsgCreateDeploymentResponse = { $type: "akash.deployment.v1beta2.MsgCreateDeploymentResponse" as const, - encode( - _: MsgCreateDeploymentResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: MsgCreateDeploymentResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgCreateDeploymentResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreateDeploymentResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCreateDeploymentResponse(); @@ -222,7 +190,7 @@ export const MsgCreateDeploymentResponse = { fromJSON(_: any): MsgCreateDeploymentResponse { return { - $type: MsgCreateDeploymentResponse.$type, + $type: MsgCreateDeploymentResponse.$type }; }, @@ -231,35 +199,27 @@ export const MsgCreateDeploymentResponse = { return obj; }, - fromPartial, I>>( - _: I - ): MsgCreateDeploymentResponse { + fromPartial, I>>(_: I): MsgCreateDeploymentResponse { const message = createBaseMsgCreateDeploymentResponse(); return message; - }, + } }; -messageTypeRegistry.set( - MsgCreateDeploymentResponse.$type, - MsgCreateDeploymentResponse -); +messageTypeRegistry.set(MsgCreateDeploymentResponse.$type, MsgCreateDeploymentResponse); function createBaseMsgDepositDeployment(): MsgDepositDeployment { return { $type: "akash.deployment.v1beta2.MsgDepositDeployment", id: undefined, amount: undefined, - depositor: "", + depositor: "" }; } export const MsgDepositDeployment = { $type: "akash.deployment.v1beta2.MsgDepositDeployment" as const, - encode( - message: MsgDepositDeployment, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MsgDepositDeployment, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { DeploymentID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -272,10 +232,7 @@ export const MsgDepositDeployment = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgDepositDeployment { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgDepositDeployment { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgDepositDeployment(); @@ -304,35 +261,25 @@ export const MsgDepositDeployment = { $type: MsgDepositDeployment.$type, id: isSet(object.id) ? DeploymentID.fromJSON(object.id) : undefined, amount: isSet(object.amount) ? Coin.fromJSON(object.amount) : undefined, - depositor: isSet(object.depositor) ? String(object.depositor) : "", + depositor: isSet(object.depositor) ? String(object.depositor) : "" }; }, toJSON(message: MsgDepositDeployment): unknown { const obj: any = {}; - message.id !== undefined && - (obj.id = message.id ? DeploymentID.toJSON(message.id) : undefined); - message.amount !== undefined && - (obj.amount = message.amount ? Coin.toJSON(message.amount) : undefined); + message.id !== undefined && (obj.id = message.id ? DeploymentID.toJSON(message.id) : undefined); + message.amount !== undefined && (obj.amount = message.amount ? Coin.toJSON(message.amount) : undefined); message.depositor !== undefined && (obj.depositor = message.depositor); return obj; }, - fromPartial, I>>( - object: I - ): MsgDepositDeployment { + fromPartial, I>>(object: I): MsgDepositDeployment { const message = createBaseMsgDepositDeployment(); - message.id = - object.id !== undefined && object.id !== null - ? DeploymentID.fromPartial(object.id) - : undefined; - message.amount = - object.amount !== undefined && object.amount !== null - ? Coin.fromPartial(object.amount) - : undefined; + message.id = object.id !== undefined && object.id !== null ? DeploymentID.fromPartial(object.id) : undefined; + message.amount = object.amount !== undefined && object.amount !== null ? Coin.fromPartial(object.amount) : undefined; message.depositor = object.depositor ?? ""; return message; - }, + } }; messageTypeRegistry.set(MsgDepositDeployment.$type, MsgDepositDeployment); @@ -344,17 +291,11 @@ function createBaseMsgDepositDeploymentResponse(): MsgDepositDeploymentResponse export const MsgDepositDeploymentResponse = { $type: "akash.deployment.v1beta2.MsgDepositDeploymentResponse" as const, - encode( - _: MsgDepositDeploymentResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: MsgDepositDeploymentResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgDepositDeploymentResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgDepositDeploymentResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgDepositDeploymentResponse(); @@ -371,7 +312,7 @@ export const MsgDepositDeploymentResponse = { fromJSON(_: any): MsgDepositDeploymentResponse { return { - $type: MsgDepositDeploymentResponse.$type, + $type: MsgDepositDeploymentResponse.$type }; }, @@ -380,34 +321,26 @@ export const MsgDepositDeploymentResponse = { return obj; }, - fromPartial, I>>( - _: I - ): MsgDepositDeploymentResponse { + fromPartial, I>>(_: I): MsgDepositDeploymentResponse { const message = createBaseMsgDepositDeploymentResponse(); return message; - }, + } }; -messageTypeRegistry.set( - MsgDepositDeploymentResponse.$type, - MsgDepositDeploymentResponse -); +messageTypeRegistry.set(MsgDepositDeploymentResponse.$type, MsgDepositDeploymentResponse); function createBaseMsgUpdateDeployment(): MsgUpdateDeployment { return { $type: "akash.deployment.v1beta2.MsgUpdateDeployment", id: undefined, - version: new Uint8Array(), + version: new Uint8Array() }; } export const MsgUpdateDeployment = { $type: "akash.deployment.v1beta2.MsgUpdateDeployment" as const, - encode( - message: MsgUpdateDeployment, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MsgUpdateDeployment, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { DeploymentID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -442,34 +375,23 @@ export const MsgUpdateDeployment = { return { $type: MsgUpdateDeployment.$type, id: isSet(object.id) ? DeploymentID.fromJSON(object.id) : undefined, - version: isSet(object.version) - ? bytesFromBase64(object.version) - : new Uint8Array(), + version: isSet(object.version) ? bytesFromBase64(object.version) : new Uint8Array() }; }, toJSON(message: MsgUpdateDeployment): unknown { const obj: any = {}; - message.id !== undefined && - (obj.id = message.id ? DeploymentID.toJSON(message.id) : undefined); - message.version !== undefined && - (obj.version = base64FromBytes( - message.version !== undefined ? message.version : new Uint8Array() - )); + message.id !== undefined && (obj.id = message.id ? DeploymentID.toJSON(message.id) : undefined); + message.version !== undefined && (obj.version = base64FromBytes(message.version !== undefined ? message.version : new Uint8Array())); return obj; }, - fromPartial, I>>( - object: I - ): MsgUpdateDeployment { + fromPartial, I>>(object: I): MsgUpdateDeployment { const message = createBaseMsgUpdateDeployment(); - message.id = - object.id !== undefined && object.id !== null - ? DeploymentID.fromPartial(object.id) - : undefined; + message.id = object.id !== undefined && object.id !== null ? DeploymentID.fromPartial(object.id) : undefined; message.version = object.version ?? new Uint8Array(); return message; - }, + } }; messageTypeRegistry.set(MsgUpdateDeployment.$type, MsgUpdateDeployment); @@ -481,17 +403,11 @@ function createBaseMsgUpdateDeploymentResponse(): MsgUpdateDeploymentResponse { export const MsgUpdateDeploymentResponse = { $type: "akash.deployment.v1beta2.MsgUpdateDeploymentResponse" as const, - encode( - _: MsgUpdateDeploymentResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: MsgUpdateDeploymentResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgUpdateDeploymentResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgUpdateDeploymentResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgUpdateDeploymentResponse(); @@ -508,7 +424,7 @@ export const MsgUpdateDeploymentResponse = { fromJSON(_: any): MsgUpdateDeploymentResponse { return { - $type: MsgUpdateDeploymentResponse.$type, + $type: MsgUpdateDeploymentResponse.$type }; }, @@ -517,33 +433,25 @@ export const MsgUpdateDeploymentResponse = { return obj; }, - fromPartial, I>>( - _: I - ): MsgUpdateDeploymentResponse { + fromPartial, I>>(_: I): MsgUpdateDeploymentResponse { const message = createBaseMsgUpdateDeploymentResponse(); return message; - }, + } }; -messageTypeRegistry.set( - MsgUpdateDeploymentResponse.$type, - MsgUpdateDeploymentResponse -); +messageTypeRegistry.set(MsgUpdateDeploymentResponse.$type, MsgUpdateDeploymentResponse); function createBaseMsgCloseDeployment(): MsgCloseDeployment { return { $type: "akash.deployment.v1beta2.MsgCloseDeployment", - id: undefined, + id: undefined }; } export const MsgCloseDeployment = { $type: "akash.deployment.v1beta2.MsgCloseDeployment" as const, - encode( - message: MsgCloseDeployment, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MsgCloseDeployment, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { DeploymentID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -571,27 +479,21 @@ export const MsgCloseDeployment = { fromJSON(object: any): MsgCloseDeployment { return { $type: MsgCloseDeployment.$type, - id: isSet(object.id) ? DeploymentID.fromJSON(object.id) : undefined, + id: isSet(object.id) ? DeploymentID.fromJSON(object.id) : undefined }; }, toJSON(message: MsgCloseDeployment): unknown { const obj: any = {}; - message.id !== undefined && - (obj.id = message.id ? DeploymentID.toJSON(message.id) : undefined); + message.id !== undefined && (obj.id = message.id ? DeploymentID.toJSON(message.id) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): MsgCloseDeployment { + fromPartial, I>>(object: I): MsgCloseDeployment { const message = createBaseMsgCloseDeployment(); - message.id = - object.id !== undefined && object.id !== null - ? DeploymentID.fromPartial(object.id) - : undefined; + message.id = object.id !== undefined && object.id !== null ? DeploymentID.fromPartial(object.id) : undefined; return message; - }, + } }; messageTypeRegistry.set(MsgCloseDeployment.$type, MsgCloseDeployment); @@ -603,17 +505,11 @@ function createBaseMsgCloseDeploymentResponse(): MsgCloseDeploymentResponse { export const MsgCloseDeploymentResponse = { $type: "akash.deployment.v1beta2.MsgCloseDeploymentResponse" as const, - encode( - _: MsgCloseDeploymentResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: MsgCloseDeploymentResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgCloseDeploymentResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgCloseDeploymentResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCloseDeploymentResponse(); @@ -630,7 +526,7 @@ export const MsgCloseDeploymentResponse = { fromJSON(_: any): MsgCloseDeploymentResponse { return { - $type: MsgCloseDeploymentResponse.$type, + $type: MsgCloseDeploymentResponse.$type }; }, @@ -639,18 +535,13 @@ export const MsgCloseDeploymentResponse = { return obj; }, - fromPartial, I>>( - _: I - ): MsgCloseDeploymentResponse { + fromPartial, I>>(_: I): MsgCloseDeploymentResponse { const message = createBaseMsgCloseDeploymentResponse(); return message; - }, + } }; -messageTypeRegistry.set( - MsgCloseDeploymentResponse.$type, - MsgCloseDeploymentResponse -); +messageTypeRegistry.set(MsgCloseDeploymentResponse.$type, MsgCloseDeploymentResponse); declare var self: any | undefined; declare var window: any | undefined; @@ -663,9 +554,7 @@ var globalThis: any = (() => { throw "Unable to locate global object"; })(); -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); +const atob: (b64: string) => string = globalThis.atob || (b64 => globalThis.Buffer.from(b64, "base64").toString("binary")); function bytesFromBase64(b64: string): Uint8Array { const bin = atob(b64); const arr = new Uint8Array(bin.length); @@ -675,45 +564,33 @@ function bytesFromBase64(b64: string): Uint8Array { return arr; } -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); +const btoa: (bin: string) => string = globalThis.btoa || (bin => globalThis.Buffer.from(bin, "binary").toString("base64")); function base64FromBytes(arr: Uint8Array): string { const bin: string[] = []; - arr.forEach((byte) => { + arr.forEach(byte => { bin.push(String.fromCharCode(byte)); }); return btoa(bin.join("")); } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/deployment/v1beta2/genesis.ts b/src/protobuf/akash/deployment/v1beta2/genesis.ts index 7a8038c..0b264b3 100644 --- a/src/protobuf/akash/deployment/v1beta2/genesis.ts +++ b/src/protobuf/akash/deployment/v1beta2/genesis.ts @@ -26,17 +26,14 @@ function createBaseGenesisDeployment(): GenesisDeployment { return { $type: "akash.deployment.v1beta2.GenesisDeployment", deployment: undefined, - groups: [], + groups: [] }; } export const GenesisDeployment = { $type: "akash.deployment.v1beta2.GenesisDeployment" as const, - encode( - message: GenesisDeployment, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: GenesisDeployment, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.deployment !== undefined) { Deployment.encode(message.deployment, writer.uint32(10).fork()).ldelim(); } @@ -70,40 +67,28 @@ export const GenesisDeployment = { fromJSON(object: any): GenesisDeployment { return { $type: GenesisDeployment.$type, - deployment: isSet(object.deployment) - ? Deployment.fromJSON(object.deployment) - : undefined, - groups: Array.isArray(object?.groups) - ? object.groups.map((e: any) => Group.fromJSON(e)) - : [], + deployment: isSet(object.deployment) ? Deployment.fromJSON(object.deployment) : undefined, + groups: Array.isArray(object?.groups) ? object.groups.map((e: any) => Group.fromJSON(e)) : [] }; }, toJSON(message: GenesisDeployment): unknown { const obj: any = {}; - message.deployment !== undefined && - (obj.deployment = message.deployment - ? Deployment.toJSON(message.deployment) - : undefined); + message.deployment !== undefined && (obj.deployment = message.deployment ? Deployment.toJSON(message.deployment) : undefined); if (message.groups) { - obj.groups = message.groups.map((e) => (e ? Group.toJSON(e) : undefined)); + obj.groups = message.groups.map(e => (e ? Group.toJSON(e) : undefined)); } else { obj.groups = []; } return obj; }, - fromPartial, I>>( - object: I - ): GenesisDeployment { + fromPartial, I>>(object: I): GenesisDeployment { const message = createBaseGenesisDeployment(); - message.deployment = - object.deployment !== undefined && object.deployment !== null - ? Deployment.fromPartial(object.deployment) - : undefined; - message.groups = object.groups?.map((e) => Group.fromPartial(e)) || []; + message.deployment = object.deployment !== undefined && object.deployment !== null ? Deployment.fromPartial(object.deployment) : undefined; + message.groups = object.groups?.map(e => Group.fromPartial(e)) || []; return message; - }, + } }; messageTypeRegistry.set(GenesisDeployment.$type, GenesisDeployment); @@ -112,17 +97,14 @@ function createBaseGenesisState(): GenesisState { return { $type: "akash.deployment.v1beta2.GenesisState", deployments: [], - params: undefined, + params: undefined }; } export const GenesisState = { $type: "akash.deployment.v1beta2.GenesisState" as const, - encode( - message: GenesisState, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: GenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.deployments) { GenesisDeployment.encode(v!, writer.uint32(10).fork()).ldelim(); } @@ -140,9 +122,7 @@ export const GenesisState = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.deployments.push( - GenesisDeployment.decode(reader, reader.uint32()) - ); + message.deployments.push(GenesisDeployment.decode(reader, reader.uint32())); break; case 2: message.params = Params.decode(reader, reader.uint32()); @@ -158,71 +138,50 @@ export const GenesisState = { fromJSON(object: any): GenesisState { return { $type: GenesisState.$type, - deployments: Array.isArray(object?.deployments) - ? object.deployments.map((e: any) => GenesisDeployment.fromJSON(e)) - : [], - params: isSet(object.params) ? Params.fromJSON(object.params) : undefined, + deployments: Array.isArray(object?.deployments) ? object.deployments.map((e: any) => GenesisDeployment.fromJSON(e)) : [], + params: isSet(object.params) ? Params.fromJSON(object.params) : undefined }; }, toJSON(message: GenesisState): unknown { const obj: any = {}; if (message.deployments) { - obj.deployments = message.deployments.map((e) => - e ? GenesisDeployment.toJSON(e) : undefined - ); + obj.deployments = message.deployments.map(e => (e ? GenesisDeployment.toJSON(e) : undefined)); } else { obj.deployments = []; } - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); + message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): GenesisState { + fromPartial, I>>(object: I): GenesisState { const message = createBaseGenesisState(); - message.deployments = - object.deployments?.map((e) => GenesisDeployment.fromPartial(e)) || []; - message.params = - object.params !== undefined && object.params !== null - ? Params.fromPartial(object.params) - : undefined; + message.deployments = object.deployments?.map(e => GenesisDeployment.fromPartial(e)) || []; + message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; return message; - }, + } }; messageTypeRegistry.set(GenesisState.$type, GenesisState); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/deployment/v1beta2/group.ts b/src/protobuf/akash/deployment/v1beta2/group.ts index 155ee93..d08ff1a 100644 --- a/src/protobuf/akash/deployment/v1beta2/group.ts +++ b/src/protobuf/akash/deployment/v1beta2/group.ts @@ -28,7 +28,7 @@ export enum Group_State { insufficient_funds = 3, /** closed - GroupClosed denotes state for group closed */ closed = 4, - UNRECOGNIZED = -1, + UNRECOGNIZED = -1 } export function group_StateFromJSON(object: any): Group_State { @@ -79,7 +79,7 @@ function createBaseGroup(): Group { groupId: undefined, state: 0, groupSpec: undefined, - createdAt: Long.ZERO, + createdAt: Long.ZERO }; } @@ -132,85 +132,52 @@ export const Group = { fromJSON(object: any): Group { return { $type: Group.$type, - groupId: isSet(object.groupId) - ? GroupID.fromJSON(object.groupId) - : undefined, + groupId: isSet(object.groupId) ? GroupID.fromJSON(object.groupId) : undefined, state: isSet(object.state) ? group_StateFromJSON(object.state) : 0, - groupSpec: isSet(object.groupSpec) - ? GroupSpec.fromJSON(object.groupSpec) - : undefined, - createdAt: isSet(object.createdAt) - ? Long.fromValue(object.createdAt) - : Long.ZERO, + groupSpec: isSet(object.groupSpec) ? GroupSpec.fromJSON(object.groupSpec) : undefined, + createdAt: isSet(object.createdAt) ? Long.fromValue(object.createdAt) : Long.ZERO }; }, toJSON(message: Group): unknown { const obj: any = {}; - message.groupId !== undefined && - (obj.groupId = message.groupId - ? GroupID.toJSON(message.groupId) - : undefined); - message.state !== undefined && - (obj.state = group_StateToJSON(message.state)); - message.groupSpec !== undefined && - (obj.groupSpec = message.groupSpec - ? GroupSpec.toJSON(message.groupSpec) - : undefined); - message.createdAt !== undefined && - (obj.createdAt = (message.createdAt || Long.ZERO).toString()); + message.groupId !== undefined && (obj.groupId = message.groupId ? GroupID.toJSON(message.groupId) : undefined); + message.state !== undefined && (obj.state = group_StateToJSON(message.state)); + message.groupSpec !== undefined && (obj.groupSpec = message.groupSpec ? GroupSpec.toJSON(message.groupSpec) : undefined); + message.createdAt !== undefined && (obj.createdAt = (message.createdAt || Long.ZERO).toString()); return obj; }, fromPartial, I>>(object: I): Group { const message = createBaseGroup(); - message.groupId = - object.groupId !== undefined && object.groupId !== null - ? GroupID.fromPartial(object.groupId) - : undefined; + message.groupId = object.groupId !== undefined && object.groupId !== null ? GroupID.fromPartial(object.groupId) : undefined; message.state = object.state ?? 0; - message.groupSpec = - object.groupSpec !== undefined && object.groupSpec !== null - ? GroupSpec.fromPartial(object.groupSpec) - : undefined; - message.createdAt = - object.createdAt !== undefined && object.createdAt !== null - ? Long.fromValue(object.createdAt) - : Long.ZERO; + message.groupSpec = object.groupSpec !== undefined && object.groupSpec !== null ? GroupSpec.fromPartial(object.groupSpec) : undefined; + message.createdAt = object.createdAt !== undefined && object.createdAt !== null ? Long.fromValue(object.createdAt) : Long.ZERO; return message; - }, + } }; messageTypeRegistry.set(Group.$type, Group); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/deployment/v1beta2/groupid.ts b/src/protobuf/akash/deployment/v1beta2/groupid.ts index ed80752..c23fddd 100644 --- a/src/protobuf/akash/deployment/v1beta2/groupid.ts +++ b/src/protobuf/akash/deployment/v1beta2/groupid.ts @@ -18,17 +18,14 @@ function createBaseGroupID(): GroupID { $type: "akash.deployment.v1beta2.GroupID", owner: "", dseq: Long.UZERO, - gseq: 0, + gseq: 0 }; } export const GroupID = { $type: "akash.deployment.v1beta2.GroupID" as const, - encode( - message: GroupID, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: GroupID, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -70,15 +67,14 @@ export const GroupID = { $type: GroupID.$type, owner: isSet(object.owner) ? String(object.owner) : "", dseq: isSet(object.dseq) ? Long.fromValue(object.dseq) : Long.UZERO, - gseq: isSet(object.gseq) ? Number(object.gseq) : 0, + gseq: isSet(object.gseq) ? Number(object.gseq) : 0 }; }, toJSON(message: GroupID): unknown { const obj: any = {}; message.owner !== undefined && (obj.owner = message.owner); - message.dseq !== undefined && - (obj.dseq = (message.dseq || Long.UZERO).toString()); + message.dseq !== undefined && (obj.dseq = (message.dseq || Long.UZERO).toString()); message.gseq !== undefined && (obj.gseq = Math.round(message.gseq)); return obj; }, @@ -86,45 +82,32 @@ export const GroupID = { fromPartial, I>>(object: I): GroupID { const message = createBaseGroupID(); message.owner = object.owner ?? ""; - message.dseq = - object.dseq !== undefined && object.dseq !== null - ? Long.fromValue(object.dseq) - : Long.UZERO; + message.dseq = object.dseq !== undefined && object.dseq !== null ? Long.fromValue(object.dseq) : Long.UZERO; message.gseq = object.gseq ?? 0; return message; - }, + } }; messageTypeRegistry.set(GroupID.$type, GroupID); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/deployment/v1beta2/groupmsg.ts b/src/protobuf/akash/deployment/v1beta2/groupmsg.ts index a9e56b9..fdd45cb 100644 --- a/src/protobuf/akash/deployment/v1beta2/groupmsg.ts +++ b/src/protobuf/akash/deployment/v1beta2/groupmsg.ts @@ -46,10 +46,7 @@ function createBaseMsgCloseGroup(): MsgCloseGroup { export const MsgCloseGroup = { $type: "akash.deployment.v1beta2.MsgCloseGroup" as const, - encode( - message: MsgCloseGroup, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MsgCloseGroup, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { GroupID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -77,27 +74,21 @@ export const MsgCloseGroup = { fromJSON(object: any): MsgCloseGroup { return { $type: MsgCloseGroup.$type, - id: isSet(object.id) ? GroupID.fromJSON(object.id) : undefined, + id: isSet(object.id) ? GroupID.fromJSON(object.id) : undefined }; }, toJSON(message: MsgCloseGroup): unknown { const obj: any = {}; - message.id !== undefined && - (obj.id = message.id ? GroupID.toJSON(message.id) : undefined); + message.id !== undefined && (obj.id = message.id ? GroupID.toJSON(message.id) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): MsgCloseGroup { + fromPartial, I>>(object: I): MsgCloseGroup { const message = createBaseMsgCloseGroup(); - message.id = - object.id !== undefined && object.id !== null - ? GroupID.fromPartial(object.id) - : undefined; + message.id = object.id !== undefined && object.id !== null ? GroupID.fromPartial(object.id) : undefined; return message; - }, + } }; messageTypeRegistry.set(MsgCloseGroup.$type, MsgCloseGroup); @@ -109,17 +100,11 @@ function createBaseMsgCloseGroupResponse(): MsgCloseGroupResponse { export const MsgCloseGroupResponse = { $type: "akash.deployment.v1beta2.MsgCloseGroupResponse" as const, - encode( - _: MsgCloseGroupResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: MsgCloseGroupResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgCloseGroupResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgCloseGroupResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCloseGroupResponse(); @@ -136,7 +121,7 @@ export const MsgCloseGroupResponse = { fromJSON(_: any): MsgCloseGroupResponse { return { - $type: MsgCloseGroupResponse.$type, + $type: MsgCloseGroupResponse.$type }; }, @@ -145,12 +130,10 @@ export const MsgCloseGroupResponse = { return obj; }, - fromPartial, I>>( - _: I - ): MsgCloseGroupResponse { + fromPartial, I>>(_: I): MsgCloseGroupResponse { const message = createBaseMsgCloseGroupResponse(); return message; - }, + } }; messageTypeRegistry.set(MsgCloseGroupResponse.$type, MsgCloseGroupResponse); @@ -162,10 +145,7 @@ function createBaseMsgPauseGroup(): MsgPauseGroup { export const MsgPauseGroup = { $type: "akash.deployment.v1beta2.MsgPauseGroup" as const, - encode( - message: MsgPauseGroup, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MsgPauseGroup, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { GroupID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -193,27 +173,21 @@ export const MsgPauseGroup = { fromJSON(object: any): MsgPauseGroup { return { $type: MsgPauseGroup.$type, - id: isSet(object.id) ? GroupID.fromJSON(object.id) : undefined, + id: isSet(object.id) ? GroupID.fromJSON(object.id) : undefined }; }, toJSON(message: MsgPauseGroup): unknown { const obj: any = {}; - message.id !== undefined && - (obj.id = message.id ? GroupID.toJSON(message.id) : undefined); + message.id !== undefined && (obj.id = message.id ? GroupID.toJSON(message.id) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): MsgPauseGroup { + fromPartial, I>>(object: I): MsgPauseGroup { const message = createBaseMsgPauseGroup(); - message.id = - object.id !== undefined && object.id !== null - ? GroupID.fromPartial(object.id) - : undefined; + message.id = object.id !== undefined && object.id !== null ? GroupID.fromPartial(object.id) : undefined; return message; - }, + } }; messageTypeRegistry.set(MsgPauseGroup.$type, MsgPauseGroup); @@ -225,17 +199,11 @@ function createBaseMsgPauseGroupResponse(): MsgPauseGroupResponse { export const MsgPauseGroupResponse = { $type: "akash.deployment.v1beta2.MsgPauseGroupResponse" as const, - encode( - _: MsgPauseGroupResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: MsgPauseGroupResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgPauseGroupResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgPauseGroupResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgPauseGroupResponse(); @@ -252,7 +220,7 @@ export const MsgPauseGroupResponse = { fromJSON(_: any): MsgPauseGroupResponse { return { - $type: MsgPauseGroupResponse.$type, + $type: MsgPauseGroupResponse.$type }; }, @@ -261,12 +229,10 @@ export const MsgPauseGroupResponse = { return obj; }, - fromPartial, I>>( - _: I - ): MsgPauseGroupResponse { + fromPartial, I>>(_: I): MsgPauseGroupResponse { const message = createBaseMsgPauseGroupResponse(); return message; - }, + } }; messageTypeRegistry.set(MsgPauseGroupResponse.$type, MsgPauseGroupResponse); @@ -278,10 +244,7 @@ function createBaseMsgStartGroup(): MsgStartGroup { export const MsgStartGroup = { $type: "akash.deployment.v1beta2.MsgStartGroup" as const, - encode( - message: MsgStartGroup, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MsgStartGroup, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { GroupID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -309,27 +272,21 @@ export const MsgStartGroup = { fromJSON(object: any): MsgStartGroup { return { $type: MsgStartGroup.$type, - id: isSet(object.id) ? GroupID.fromJSON(object.id) : undefined, + id: isSet(object.id) ? GroupID.fromJSON(object.id) : undefined }; }, toJSON(message: MsgStartGroup): unknown { const obj: any = {}; - message.id !== undefined && - (obj.id = message.id ? GroupID.toJSON(message.id) : undefined); + message.id !== undefined && (obj.id = message.id ? GroupID.toJSON(message.id) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): MsgStartGroup { + fromPartial, I>>(object: I): MsgStartGroup { const message = createBaseMsgStartGroup(); - message.id = - object.id !== undefined && object.id !== null - ? GroupID.fromPartial(object.id) - : undefined; + message.id = object.id !== undefined && object.id !== null ? GroupID.fromPartial(object.id) : undefined; return message; - }, + } }; messageTypeRegistry.set(MsgStartGroup.$type, MsgStartGroup); @@ -341,17 +298,11 @@ function createBaseMsgStartGroupResponse(): MsgStartGroupResponse { export const MsgStartGroupResponse = { $type: "akash.deployment.v1beta2.MsgStartGroupResponse" as const, - encode( - _: MsgStartGroupResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: MsgStartGroupResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgStartGroupResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgStartGroupResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgStartGroupResponse(); @@ -368,7 +319,7 @@ export const MsgStartGroupResponse = { fromJSON(_: any): MsgStartGroupResponse { return { - $type: MsgStartGroupResponse.$type, + $type: MsgStartGroupResponse.$type }; }, @@ -377,44 +328,32 @@ export const MsgStartGroupResponse = { return obj; }, - fromPartial, I>>( - _: I - ): MsgStartGroupResponse { + fromPartial, I>>(_: I): MsgStartGroupResponse { const message = createBaseMsgStartGroupResponse(); return message; - }, + } }; messageTypeRegistry.set(MsgStartGroupResponse.$type, MsgStartGroupResponse); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/deployment/v1beta2/groupspec.ts b/src/protobuf/akash/deployment/v1beta2/groupspec.ts index cae2dfd..10bb58e 100644 --- a/src/protobuf/akash/deployment/v1beta2/groupspec.ts +++ b/src/protobuf/akash/deployment/v1beta2/groupspec.ts @@ -20,25 +20,19 @@ function createBaseGroupSpec(): GroupSpec { $type: "akash.deployment.v1beta2.GroupSpec", name: "", requirements: undefined, - resources: [], + resources: [] }; } export const GroupSpec = { $type: "akash.deployment.v1beta2.GroupSpec" as const, - encode( - message: GroupSpec, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: GroupSpec, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.name !== "") { writer.uint32(10).string(message.name); } if (message.requirements !== undefined) { - PlacementRequirements.encode( - message.requirements, - writer.uint32(18).fork() - ).ldelim(); + PlacementRequirements.encode(message.requirements, writer.uint32(18).fork()).ldelim(); } for (const v of message.resources) { Resource.encode(v!, writer.uint32(26).fork()).ldelim(); @@ -57,10 +51,7 @@ export const GroupSpec = { message.name = reader.string(); break; case 2: - message.requirements = PlacementRequirements.decode( - reader, - reader.uint32() - ); + message.requirements = PlacementRequirements.decode(reader, reader.uint32()); break; case 3: message.resources.push(Resource.decode(reader, reader.uint32())); @@ -77,77 +68,53 @@ export const GroupSpec = { return { $type: GroupSpec.$type, name: isSet(object.name) ? String(object.name) : "", - requirements: isSet(object.requirements) - ? PlacementRequirements.fromJSON(object.requirements) - : undefined, - resources: Array.isArray(object?.resources) - ? object.resources.map((e: any) => Resource.fromJSON(e)) - : [], + requirements: isSet(object.requirements) ? PlacementRequirements.fromJSON(object.requirements) : undefined, + resources: Array.isArray(object?.resources) ? object.resources.map((e: any) => Resource.fromJSON(e)) : [] }; }, toJSON(message: GroupSpec): unknown { const obj: any = {}; message.name !== undefined && (obj.name = message.name); - message.requirements !== undefined && - (obj.requirements = message.requirements - ? PlacementRequirements.toJSON(message.requirements) - : undefined); + message.requirements !== undefined && (obj.requirements = message.requirements ? PlacementRequirements.toJSON(message.requirements) : undefined); if (message.resources) { - obj.resources = message.resources.map((e) => - e ? Resource.toJSON(e) : undefined - ); + obj.resources = message.resources.map(e => (e ? Resource.toJSON(e) : undefined)); } else { obj.resources = []; } return obj; }, - fromPartial, I>>( - object: I - ): GroupSpec { + fromPartial, I>>(object: I): GroupSpec { const message = createBaseGroupSpec(); message.name = object.name ?? ""; message.requirements = - object.requirements !== undefined && object.requirements !== null - ? PlacementRequirements.fromPartial(object.requirements) - : undefined; - message.resources = - object.resources?.map((e) => Resource.fromPartial(e)) || []; + object.requirements !== undefined && object.requirements !== null ? PlacementRequirements.fromPartial(object.requirements) : undefined; + message.resources = object.resources?.map(e => Resource.fromPartial(e)) || []; return message; - }, + } }; messageTypeRegistry.set(GroupSpec.$type, GroupSpec); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/deployment/v1beta2/params.ts b/src/protobuf/akash/deployment/v1beta2/params.ts index 0287187..595d5fc 100644 --- a/src/protobuf/akash/deployment/v1beta2/params.ts +++ b/src/protobuf/akash/deployment/v1beta2/params.ts @@ -15,22 +15,16 @@ export interface Params { function createBaseParams(): Params { return { $type: "akash.deployment.v1beta2.Params", - deploymentMinDeposit: undefined, + deploymentMinDeposit: undefined }; } export const Params = { $type: "akash.deployment.v1beta2.Params" as const, - encode( - message: Params, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Params, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.deploymentMinDeposit !== undefined) { - Coin.encode( - message.deploymentMinDeposit, - writer.uint32(10).fork() - ).ldelim(); + Coin.encode(message.deploymentMinDeposit, writer.uint32(10).fork()).ldelim(); } return writer; }, @@ -56,62 +50,45 @@ export const Params = { fromJSON(object: any): Params { return { $type: Params.$type, - deploymentMinDeposit: isSet(object.deploymentMinDeposit) - ? Coin.fromJSON(object.deploymentMinDeposit) - : undefined, + deploymentMinDeposit: isSet(object.deploymentMinDeposit) ? Coin.fromJSON(object.deploymentMinDeposit) : undefined }; }, toJSON(message: Params): unknown { const obj: any = {}; message.deploymentMinDeposit !== undefined && - (obj.deploymentMinDeposit = message.deploymentMinDeposit - ? Coin.toJSON(message.deploymentMinDeposit) - : undefined); + (obj.deploymentMinDeposit = message.deploymentMinDeposit ? Coin.toJSON(message.deploymentMinDeposit) : undefined); return obj; }, fromPartial, I>>(object: I): Params { const message = createBaseParams(); message.deploymentMinDeposit = - object.deploymentMinDeposit !== undefined && - object.deploymentMinDeposit !== null - ? Coin.fromPartial(object.deploymentMinDeposit) - : undefined; + object.deploymentMinDeposit !== undefined && object.deploymentMinDeposit !== null ? Coin.fromPartial(object.deploymentMinDeposit) : undefined; return message; - }, + } }; messageTypeRegistry.set(Params.$type, Params); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/deployment/v1beta2/query.ts b/src/protobuf/akash/deployment/v1beta2/query.ts index 697f5ac..f7ba05e 100644 --- a/src/protobuf/akash/deployment/v1beta2/query.ts +++ b/src/protobuf/akash/deployment/v1beta2/query.ts @@ -2,10 +2,7 @@ import { messageTypeRegistry } from "../../../typeRegistry"; import Long from "long"; import { DeploymentFilters, DeploymentID, Deployment } from "./deployment"; -import { - PageRequest, - PageResponse, -} from "../../../cosmos/base/query/v1beta1/pagination"; +import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; import { Group } from "./group"; import { Account } from "../../escrow/v1beta2/types"; import { GroupID } from "./groupid"; @@ -57,22 +54,16 @@ function createBaseQueryDeploymentsRequest(): QueryDeploymentsRequest { return { $type: "akash.deployment.v1beta2.QueryDeploymentsRequest", filters: undefined, - pagination: undefined, + pagination: undefined }; } export const QueryDeploymentsRequest = { $type: "akash.deployment.v1beta2.QueryDeploymentsRequest" as const, - encode( - message: QueryDeploymentsRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryDeploymentsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.filters !== undefined) { - DeploymentFilters.encode( - message.filters, - writer.uint32(10).fork() - ).ldelim(); + DeploymentFilters.encode(message.filters, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); @@ -80,10 +71,7 @@ export const QueryDeploymentsRequest = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryDeploymentsRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryDeploymentsRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryDeploymentsRequest(); @@ -107,42 +95,24 @@ export const QueryDeploymentsRequest = { fromJSON(object: any): QueryDeploymentsRequest { return { $type: QueryDeploymentsRequest.$type, - filters: isSet(object.filters) - ? DeploymentFilters.fromJSON(object.filters) - : undefined, - pagination: isSet(object.pagination) - ? PageRequest.fromJSON(object.pagination) - : undefined, + filters: isSet(object.filters) ? DeploymentFilters.fromJSON(object.filters) : undefined, + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined }; }, toJSON(message: QueryDeploymentsRequest): unknown { const obj: any = {}; - message.filters !== undefined && - (obj.filters = message.filters - ? DeploymentFilters.toJSON(message.filters) - : undefined); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); + message.filters !== undefined && (obj.filters = message.filters ? DeploymentFilters.toJSON(message.filters) : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryDeploymentsRequest { + fromPartial, I>>(object: I): QueryDeploymentsRequest { const message = createBaseQueryDeploymentsRequest(); - message.filters = - object.filters !== undefined && object.filters !== null - ? DeploymentFilters.fromPartial(object.filters) - : undefined; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; + message.filters = object.filters !== undefined && object.filters !== null ? DeploymentFilters.fromPartial(object.filters) : undefined; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryDeploymentsRequest.$type, QueryDeploymentsRequest); @@ -151,33 +121,24 @@ function createBaseQueryDeploymentsResponse(): QueryDeploymentsResponse { return { $type: "akash.deployment.v1beta2.QueryDeploymentsResponse", deployments: [], - pagination: undefined, + pagination: undefined }; } export const QueryDeploymentsResponse = { $type: "akash.deployment.v1beta2.QueryDeploymentsResponse" as const, - encode( - message: QueryDeploymentsResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryDeploymentsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.deployments) { QueryDeploymentResponse.encode(v!, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); + PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryDeploymentsResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryDeploymentsResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryDeploymentsResponse(); @@ -185,9 +146,7 @@ export const QueryDeploymentsResponse = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.deployments.push( - QueryDeploymentResponse.decode(reader, reader.uint32()) - ); + message.deployments.push(QueryDeploymentResponse.decode(reader, reader.uint32())); break; case 2: message.pagination = PageResponse.decode(reader, reader.uint32()); @@ -203,77 +162,50 @@ export const QueryDeploymentsResponse = { fromJSON(object: any): QueryDeploymentsResponse { return { $type: QueryDeploymentsResponse.$type, - deployments: Array.isArray(object?.deployments) - ? object.deployments.map((e: any) => - QueryDeploymentResponse.fromJSON(e) - ) - : [], - pagination: isSet(object.pagination) - ? PageResponse.fromJSON(object.pagination) - : undefined, + deployments: Array.isArray(object?.deployments) ? object.deployments.map((e: any) => QueryDeploymentResponse.fromJSON(e)) : [], + pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined }; }, toJSON(message: QueryDeploymentsResponse): unknown { const obj: any = {}; if (message.deployments) { - obj.deployments = message.deployments.map((e) => - e ? QueryDeploymentResponse.toJSON(e) : undefined - ); + obj.deployments = message.deployments.map(e => (e ? QueryDeploymentResponse.toJSON(e) : undefined)); } else { obj.deployments = []; } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryDeploymentsResponse { + fromPartial, I>>(object: I): QueryDeploymentsResponse { const message = createBaseQueryDeploymentsResponse(); - message.deployments = - object.deployments?.map((e) => QueryDeploymentResponse.fromPartial(e)) || - []; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageResponse.fromPartial(object.pagination) - : undefined; + message.deployments = object.deployments?.map(e => QueryDeploymentResponse.fromPartial(e)) || []; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; return message; - }, + } }; -messageTypeRegistry.set( - QueryDeploymentsResponse.$type, - QueryDeploymentsResponse -); +messageTypeRegistry.set(QueryDeploymentsResponse.$type, QueryDeploymentsResponse); function createBaseQueryDeploymentRequest(): QueryDeploymentRequest { return { $type: "akash.deployment.v1beta2.QueryDeploymentRequest", - id: undefined, + id: undefined }; } export const QueryDeploymentRequest = { $type: "akash.deployment.v1beta2.QueryDeploymentRequest" as const, - encode( - message: QueryDeploymentRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryDeploymentRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { DeploymentID.encode(message.id, writer.uint32(10).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryDeploymentRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryDeploymentRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryDeploymentRequest(); @@ -294,27 +226,21 @@ export const QueryDeploymentRequest = { fromJSON(object: any): QueryDeploymentRequest { return { $type: QueryDeploymentRequest.$type, - id: isSet(object.id) ? DeploymentID.fromJSON(object.id) : undefined, + id: isSet(object.id) ? DeploymentID.fromJSON(object.id) : undefined }; }, toJSON(message: QueryDeploymentRequest): unknown { const obj: any = {}; - message.id !== undefined && - (obj.id = message.id ? DeploymentID.toJSON(message.id) : undefined); + message.id !== undefined && (obj.id = message.id ? DeploymentID.toJSON(message.id) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryDeploymentRequest { + fromPartial, I>>(object: I): QueryDeploymentRequest { const message = createBaseQueryDeploymentRequest(); - message.id = - object.id !== undefined && object.id !== null - ? DeploymentID.fromPartial(object.id) - : undefined; + message.id = object.id !== undefined && object.id !== null ? DeploymentID.fromPartial(object.id) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryDeploymentRequest.$type, QueryDeploymentRequest); @@ -324,17 +250,14 @@ function createBaseQueryDeploymentResponse(): QueryDeploymentResponse { $type: "akash.deployment.v1beta2.QueryDeploymentResponse", deployment: undefined, groups: [], - escrowAccount: undefined, + escrowAccount: undefined }; } export const QueryDeploymentResponse = { $type: "akash.deployment.v1beta2.QueryDeploymentResponse" as const, - encode( - message: QueryDeploymentResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryDeploymentResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.deployment !== undefined) { Deployment.encode(message.deployment, writer.uint32(10).fork()).ldelim(); } @@ -347,10 +270,7 @@ export const QueryDeploymentResponse = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryDeploymentResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryDeploymentResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryDeploymentResponse(); @@ -377,51 +297,31 @@ export const QueryDeploymentResponse = { fromJSON(object: any): QueryDeploymentResponse { return { $type: QueryDeploymentResponse.$type, - deployment: isSet(object.deployment) - ? Deployment.fromJSON(object.deployment) - : undefined, - groups: Array.isArray(object?.groups) - ? object.groups.map((e: any) => Group.fromJSON(e)) - : [], - escrowAccount: isSet(object.escrowAccount) - ? Account.fromJSON(object.escrowAccount) - : undefined, + deployment: isSet(object.deployment) ? Deployment.fromJSON(object.deployment) : undefined, + groups: Array.isArray(object?.groups) ? object.groups.map((e: any) => Group.fromJSON(e)) : [], + escrowAccount: isSet(object.escrowAccount) ? Account.fromJSON(object.escrowAccount) : undefined }; }, toJSON(message: QueryDeploymentResponse): unknown { const obj: any = {}; - message.deployment !== undefined && - (obj.deployment = message.deployment - ? Deployment.toJSON(message.deployment) - : undefined); + message.deployment !== undefined && (obj.deployment = message.deployment ? Deployment.toJSON(message.deployment) : undefined); if (message.groups) { - obj.groups = message.groups.map((e) => (e ? Group.toJSON(e) : undefined)); + obj.groups = message.groups.map(e => (e ? Group.toJSON(e) : undefined)); } else { obj.groups = []; } - message.escrowAccount !== undefined && - (obj.escrowAccount = message.escrowAccount - ? Account.toJSON(message.escrowAccount) - : undefined); + message.escrowAccount !== undefined && (obj.escrowAccount = message.escrowAccount ? Account.toJSON(message.escrowAccount) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryDeploymentResponse { + fromPartial, I>>(object: I): QueryDeploymentResponse { const message = createBaseQueryDeploymentResponse(); - message.deployment = - object.deployment !== undefined && object.deployment !== null - ? Deployment.fromPartial(object.deployment) - : undefined; - message.groups = object.groups?.map((e) => Group.fromPartial(e)) || []; - message.escrowAccount = - object.escrowAccount !== undefined && object.escrowAccount !== null - ? Account.fromPartial(object.escrowAccount) - : undefined; + message.deployment = object.deployment !== undefined && object.deployment !== null ? Deployment.fromPartial(object.deployment) : undefined; + message.groups = object.groups?.map(e => Group.fromPartial(e)) || []; + message.escrowAccount = object.escrowAccount !== undefined && object.escrowAccount !== null ? Account.fromPartial(object.escrowAccount) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryDeploymentResponse.$type, QueryDeploymentResponse); @@ -433,10 +333,7 @@ function createBaseQueryGroupRequest(): QueryGroupRequest { export const QueryGroupRequest = { $type: "akash.deployment.v1beta2.QueryGroupRequest" as const, - encode( - message: QueryGroupRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryGroupRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { GroupID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -464,27 +361,21 @@ export const QueryGroupRequest = { fromJSON(object: any): QueryGroupRequest { return { $type: QueryGroupRequest.$type, - id: isSet(object.id) ? GroupID.fromJSON(object.id) : undefined, + id: isSet(object.id) ? GroupID.fromJSON(object.id) : undefined }; }, toJSON(message: QueryGroupRequest): unknown { const obj: any = {}; - message.id !== undefined && - (obj.id = message.id ? GroupID.toJSON(message.id) : undefined); + message.id !== undefined && (obj.id = message.id ? GroupID.toJSON(message.id) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryGroupRequest { + fromPartial, I>>(object: I): QueryGroupRequest { const message = createBaseQueryGroupRequest(); - message.id = - object.id !== undefined && object.id !== null - ? GroupID.fromPartial(object.id) - : undefined; + message.id = object.id !== undefined && object.id !== null ? GroupID.fromPartial(object.id) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryGroupRequest.$type, QueryGroupRequest); @@ -492,17 +383,14 @@ messageTypeRegistry.set(QueryGroupRequest.$type, QueryGroupRequest); function createBaseQueryGroupResponse(): QueryGroupResponse { return { $type: "akash.deployment.v1beta2.QueryGroupResponse", - group: undefined, + group: undefined }; } export const QueryGroupResponse = { $type: "akash.deployment.v1beta2.QueryGroupResponse" as const, - encode( - message: QueryGroupResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryGroupResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.group !== undefined) { Group.encode(message.group, writer.uint32(10).fork()).ldelim(); } @@ -530,27 +418,21 @@ export const QueryGroupResponse = { fromJSON(object: any): QueryGroupResponse { return { $type: QueryGroupResponse.$type, - group: isSet(object.group) ? Group.fromJSON(object.group) : undefined, + group: isSet(object.group) ? Group.fromJSON(object.group) : undefined }; }, toJSON(message: QueryGroupResponse): unknown { const obj: any = {}; - message.group !== undefined && - (obj.group = message.group ? Group.toJSON(message.group) : undefined); + message.group !== undefined && (obj.group = message.group ? Group.toJSON(message.group) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryGroupResponse { + fromPartial, I>>(object: I): QueryGroupResponse { const message = createBaseQueryGroupResponse(); - message.group = - object.group !== undefined && object.group !== null - ? Group.fromPartial(object.group) - : undefined; + message.group = object.group !== undefined && object.group !== null ? Group.fromPartial(object.group) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryGroupResponse.$type, QueryGroupResponse); @@ -558,9 +440,7 @@ messageTypeRegistry.set(QueryGroupResponse.$type, QueryGroupResponse); /** Query defines the gRPC querier service */ export interface Query { /** Deployments queries deployments */ - Deployments( - request: QueryDeploymentsRequest - ): Promise; + Deployments(request: QueryDeploymentsRequest): Promise; /** Deployment queries deployment details */ Deployment(request: QueryDeploymentRequest): Promise; /** Group queries group details */ @@ -575,83 +455,47 @@ export class QueryClientImpl implements Query { this.Deployment = this.Deployment.bind(this); this.Group = this.Group.bind(this); } - Deployments( - request: QueryDeploymentsRequest - ): Promise { + Deployments(request: QueryDeploymentsRequest): Promise { const data = QueryDeploymentsRequest.encode(request).finish(); - const promise = this.rpc.request( - "akash.deployment.v1beta2.Query", - "Deployments", - data - ); - return promise.then((data) => - QueryDeploymentsResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.deployment.v1beta2.Query", "Deployments", data); + return promise.then(data => QueryDeploymentsResponse.decode(new _m0.Reader(data))); } - Deployment( - request: QueryDeploymentRequest - ): Promise { + Deployment(request: QueryDeploymentRequest): Promise { const data = QueryDeploymentRequest.encode(request).finish(); - const promise = this.rpc.request( - "akash.deployment.v1beta2.Query", - "Deployment", - data - ); - return promise.then((data) => - QueryDeploymentResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.deployment.v1beta2.Query", "Deployment", data); + return promise.then(data => QueryDeploymentResponse.decode(new _m0.Reader(data))); } Group(request: QueryGroupRequest): Promise { const data = QueryGroupRequest.encode(request).finish(); - const promise = this.rpc.request( - "akash.deployment.v1beta2.Query", - "Group", - data - ); - return promise.then((data) => - QueryGroupResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.deployment.v1beta2.Query", "Group", data); + return promise.then(data => QueryGroupResponse.decode(new _m0.Reader(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/deployment/v1beta2/resource.ts b/src/protobuf/akash/deployment/v1beta2/resource.ts index ecdf508..3af803c 100644 --- a/src/protobuf/akash/deployment/v1beta2/resource.ts +++ b/src/protobuf/akash/deployment/v1beta2/resource.ts @@ -20,22 +20,16 @@ function createBaseResource(): Resource { $type: "akash.deployment.v1beta2.Resource", resources: undefined, count: 0, - price: undefined, + price: undefined }; } export const Resource = { $type: "akash.deployment.v1beta2.Resource" as const, - encode( - message: Resource, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Resource, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.resources !== undefined) { - ResourceUnits.encode( - message.resources, - writer.uint32(10).fork() - ).ldelim(); + ResourceUnits.encode(message.resources, writer.uint32(10).fork()).ldelim(); } if (message.count !== 0) { writer.uint32(16).uint32(message.count); @@ -73,71 +67,49 @@ export const Resource = { fromJSON(object: any): Resource { return { $type: Resource.$type, - resources: isSet(object.resources) - ? ResourceUnits.fromJSON(object.resources) - : undefined, + resources: isSet(object.resources) ? ResourceUnits.fromJSON(object.resources) : undefined, count: isSet(object.count) ? Number(object.count) : 0, - price: isSet(object.price) ? DecCoin.fromJSON(object.price) : undefined, + price: isSet(object.price) ? DecCoin.fromJSON(object.price) : undefined }; }, toJSON(message: Resource): unknown { const obj: any = {}; - message.resources !== undefined && - (obj.resources = message.resources - ? ResourceUnits.toJSON(message.resources) - : undefined); + message.resources !== undefined && (obj.resources = message.resources ? ResourceUnits.toJSON(message.resources) : undefined); message.count !== undefined && (obj.count = Math.round(message.count)); - message.price !== undefined && - (obj.price = message.price ? DecCoin.toJSON(message.price) : undefined); + message.price !== undefined && (obj.price = message.price ? DecCoin.toJSON(message.price) : undefined); return obj; }, fromPartial, I>>(object: I): Resource { const message = createBaseResource(); - message.resources = - object.resources !== undefined && object.resources !== null - ? ResourceUnits.fromPartial(object.resources) - : undefined; + message.resources = object.resources !== undefined && object.resources !== null ? ResourceUnits.fromPartial(object.resources) : undefined; message.count = object.count ?? 0; - message.price = - object.price !== undefined && object.price !== null - ? DecCoin.fromPartial(object.price) - : undefined; + message.price = object.price !== undefined && object.price !== null ? DecCoin.fromPartial(object.price) : undefined; return message; - }, + } }; messageTypeRegistry.set(Resource.$type, Resource); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/deployment/v1beta2/service.ts b/src/protobuf/akash/deployment/v1beta2/service.ts index 51e568d..4d42036 100644 --- a/src/protobuf/akash/deployment/v1beta2/service.ts +++ b/src/protobuf/akash/deployment/v1beta2/service.ts @@ -7,16 +7,9 @@ import { MsgCreateDeployment, MsgDepositDeployment, MsgUpdateDeployment, - MsgCloseDeployment, + MsgCloseDeployment } from "./deploymentmsg"; -import { - MsgCloseGroupResponse, - MsgPauseGroupResponse, - MsgStartGroupResponse, - MsgCloseGroup, - MsgPauseGroup, - MsgStartGroup, -} from "./groupmsg"; +import { MsgCloseGroupResponse, MsgPauseGroupResponse, MsgStartGroupResponse, MsgCloseGroup, MsgPauseGroup, MsgStartGroup } from "./groupmsg"; import * as _m0 from "protobufjs/minimal"; export const protobufPackage = "akash.deployment.v1beta2"; @@ -24,21 +17,13 @@ export const protobufPackage = "akash.deployment.v1beta2"; /** Msg defines the deployment Msg service. */ export interface Msg { /** CreateDeployment defines a method to create new deployment given proper inputs. */ - CreateDeployment( - request: MsgCreateDeployment - ): Promise; + CreateDeployment(request: MsgCreateDeployment): Promise; /** DepositDeployment deposits more funds into the deployment account */ - DepositDeployment( - request: MsgDepositDeployment - ): Promise; + DepositDeployment(request: MsgDepositDeployment): Promise; /** UpdateDeployment defines a method to update a deployment given proper inputs. */ - UpdateDeployment( - request: MsgUpdateDeployment - ): Promise; + UpdateDeployment(request: MsgUpdateDeployment): Promise; /** CloseDeployment defines a method to close a deployment given proper inputs. */ - CloseDeployment( - request: MsgCloseDeployment - ): Promise; + CloseDeployment(request: MsgCloseDeployment): Promise; /** CloseGroup defines a method to close a group of a deployment given proper inputs. */ CloseGroup(request: MsgCloseGroup): Promise; /** PauseGroup defines a method to close a group of a deployment given proper inputs. */ @@ -59,103 +44,49 @@ export class MsgClientImpl implements Msg { this.PauseGroup = this.PauseGroup.bind(this); this.StartGroup = this.StartGroup.bind(this); } - CreateDeployment( - request: MsgCreateDeployment - ): Promise { + CreateDeployment(request: MsgCreateDeployment): Promise { const data = MsgCreateDeployment.encode(request).finish(); - const promise = this.rpc.request( - "akash.deployment.v1beta2.Msg", - "CreateDeployment", - data - ); - return promise.then((data) => - MsgCreateDeploymentResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.deployment.v1beta2.Msg", "CreateDeployment", data); + return promise.then(data => MsgCreateDeploymentResponse.decode(new _m0.Reader(data))); } - DepositDeployment( - request: MsgDepositDeployment - ): Promise { + DepositDeployment(request: MsgDepositDeployment): Promise { const data = MsgDepositDeployment.encode(request).finish(); - const promise = this.rpc.request( - "akash.deployment.v1beta2.Msg", - "DepositDeployment", - data - ); - return promise.then((data) => - MsgDepositDeploymentResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.deployment.v1beta2.Msg", "DepositDeployment", data); + return promise.then(data => MsgDepositDeploymentResponse.decode(new _m0.Reader(data))); } - UpdateDeployment( - request: MsgUpdateDeployment - ): Promise { + UpdateDeployment(request: MsgUpdateDeployment): Promise { const data = MsgUpdateDeployment.encode(request).finish(); - const promise = this.rpc.request( - "akash.deployment.v1beta2.Msg", - "UpdateDeployment", - data - ); - return promise.then((data) => - MsgUpdateDeploymentResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.deployment.v1beta2.Msg", "UpdateDeployment", data); + return promise.then(data => MsgUpdateDeploymentResponse.decode(new _m0.Reader(data))); } - CloseDeployment( - request: MsgCloseDeployment - ): Promise { + CloseDeployment(request: MsgCloseDeployment): Promise { const data = MsgCloseDeployment.encode(request).finish(); - const promise = this.rpc.request( - "akash.deployment.v1beta2.Msg", - "CloseDeployment", - data - ); - return promise.then((data) => - MsgCloseDeploymentResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.deployment.v1beta2.Msg", "CloseDeployment", data); + return promise.then(data => MsgCloseDeploymentResponse.decode(new _m0.Reader(data))); } CloseGroup(request: MsgCloseGroup): Promise { const data = MsgCloseGroup.encode(request).finish(); - const promise = this.rpc.request( - "akash.deployment.v1beta2.Msg", - "CloseGroup", - data - ); - return promise.then((data) => - MsgCloseGroupResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.deployment.v1beta2.Msg", "CloseGroup", data); + return promise.then(data => MsgCloseGroupResponse.decode(new _m0.Reader(data))); } PauseGroup(request: MsgPauseGroup): Promise { const data = MsgPauseGroup.encode(request).finish(); - const promise = this.rpc.request( - "akash.deployment.v1beta2.Msg", - "PauseGroup", - data - ); - return promise.then((data) => - MsgPauseGroupResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.deployment.v1beta2.Msg", "PauseGroup", data); + return promise.then(data => MsgPauseGroupResponse.decode(new _m0.Reader(data))); } StartGroup(request: MsgStartGroup): Promise { const data = MsgStartGroup.encode(request).finish(); - const promise = this.rpc.request( - "akash.deployment.v1beta2.Msg", - "StartGroup", - data - ); - return promise.then((data) => - MsgStartGroupResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.deployment.v1beta2.Msg", "StartGroup", data); + return promise.then(data => MsgStartGroupResponse.decode(new _m0.Reader(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } diff --git a/src/protobuf/akash/deployment/v1beta3/authz.ts b/src/protobuf/akash/deployment/v1beta3/authz.ts index ebe9369..e6b26c9 100644 --- a/src/protobuf/akash/deployment/v1beta3/authz.ts +++ b/src/protobuf/akash/deployment/v1beta3/authz.ts @@ -22,27 +22,21 @@ export interface DepositDeploymentAuthorization { function createBaseDepositDeploymentAuthorization(): DepositDeploymentAuthorization { return { $type: "akash.deployment.v1beta3.DepositDeploymentAuthorization", - spendLimit: undefined, + spendLimit: undefined }; } export const DepositDeploymentAuthorization = { $type: "akash.deployment.v1beta3.DepositDeploymentAuthorization" as const, - encode( - message: DepositDeploymentAuthorization, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: DepositDeploymentAuthorization, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.spendLimit !== undefined) { Coin.encode(message.spendLimit, writer.uint32(10).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): DepositDeploymentAuthorization { + decode(input: _m0.Reader | Uint8Array, length?: number): DepositDeploymentAuthorization { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseDepositDeploymentAuthorization(); @@ -63,66 +57,43 @@ export const DepositDeploymentAuthorization = { fromJSON(object: any): DepositDeploymentAuthorization { return { $type: DepositDeploymentAuthorization.$type, - spendLimit: isSet(object.spendLimit) - ? Coin.fromJSON(object.spendLimit) - : undefined, + spendLimit: isSet(object.spendLimit) ? Coin.fromJSON(object.spendLimit) : undefined }; }, toJSON(message: DepositDeploymentAuthorization): unknown { const obj: any = {}; - message.spendLimit !== undefined && - (obj.spendLimit = message.spendLimit - ? Coin.toJSON(message.spendLimit) - : undefined); + message.spendLimit !== undefined && (obj.spendLimit = message.spendLimit ? Coin.toJSON(message.spendLimit) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): DepositDeploymentAuthorization { + fromPartial, I>>(object: I): DepositDeploymentAuthorization { const message = createBaseDepositDeploymentAuthorization(); - message.spendLimit = - object.spendLimit !== undefined && object.spendLimit !== null - ? Coin.fromPartial(object.spendLimit) - : undefined; + message.spendLimit = object.spendLimit !== undefined && object.spendLimit !== null ? Coin.fromPartial(object.spendLimit) : undefined; return message; - }, + } }; -messageTypeRegistry.set( - DepositDeploymentAuthorization.$type, - DepositDeploymentAuthorization -); +messageTypeRegistry.set(DepositDeploymentAuthorization.$type, DepositDeploymentAuthorization); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/deployment/v1beta3/deployment.ts b/src/protobuf/akash/deployment/v1beta3/deployment.ts index 7b3aaec..09fa4b2 100644 --- a/src/protobuf/akash/deployment/v1beta3/deployment.ts +++ b/src/protobuf/akash/deployment/v1beta3/deployment.ts @@ -29,7 +29,7 @@ export enum Deployment_State { active = 1, /** closed - DeploymentClosed denotes state for deployment closed */ closed = 2, - UNRECOGNIZED = -1, + UNRECOGNIZED = -1 } export function deployment_StateFromJSON(object: any): Deployment_State { @@ -76,17 +76,14 @@ function createBaseDeploymentID(): DeploymentID { return { $type: "akash.deployment.v1beta3.DeploymentID", owner: "", - dseq: Long.UZERO, + dseq: Long.UZERO }; } export const DeploymentID = { $type: "akash.deployment.v1beta3.DeploymentID" as const, - encode( - message: DeploymentID, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: DeploymentID, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -121,29 +118,23 @@ export const DeploymentID = { return { $type: DeploymentID.$type, owner: isSet(object.owner) ? String(object.owner) : "", - dseq: isSet(object.dseq) ? Long.fromValue(object.dseq) : Long.UZERO, + dseq: isSet(object.dseq) ? Long.fromValue(object.dseq) : Long.UZERO }; }, toJSON(message: DeploymentID): unknown { const obj: any = {}; message.owner !== undefined && (obj.owner = message.owner); - message.dseq !== undefined && - (obj.dseq = (message.dseq || Long.UZERO).toString()); + message.dseq !== undefined && (obj.dseq = (message.dseq || Long.UZERO).toString()); return obj; }, - fromPartial, I>>( - object: I - ): DeploymentID { + fromPartial, I>>(object: I): DeploymentID { const message = createBaseDeploymentID(); message.owner = object.owner ?? ""; - message.dseq = - object.dseq !== undefined && object.dseq !== null - ? Long.fromValue(object.dseq) - : Long.UZERO; + message.dseq = object.dseq !== undefined && object.dseq !== null ? Long.fromValue(object.dseq) : Long.UZERO; return message; - }, + } }; messageTypeRegistry.set(DeploymentID.$type, DeploymentID); @@ -154,22 +145,16 @@ function createBaseDeployment(): Deployment { deploymentId: undefined, state: 0, version: new Uint8Array(), - createdAt: Long.ZERO, + createdAt: Long.ZERO }; } export const Deployment = { $type: "akash.deployment.v1beta3.Deployment" as const, - encode( - message: Deployment, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Deployment, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.deploymentId !== undefined) { - DeploymentID.encode( - message.deploymentId, - writer.uint32(10).fork() - ).ldelim(); + DeploymentID.encode(message.deploymentId, writer.uint32(10).fork()).ldelim(); } if (message.state !== 0) { writer.uint32(16).int32(message.state); @@ -213,52 +198,30 @@ export const Deployment = { fromJSON(object: any): Deployment { return { $type: Deployment.$type, - deploymentId: isSet(object.deploymentId) - ? DeploymentID.fromJSON(object.deploymentId) - : undefined, + deploymentId: isSet(object.deploymentId) ? DeploymentID.fromJSON(object.deploymentId) : undefined, state: isSet(object.state) ? deployment_StateFromJSON(object.state) : 0, - version: isSet(object.version) - ? bytesFromBase64(object.version) - : new Uint8Array(), - createdAt: isSet(object.createdAt) - ? Long.fromValue(object.createdAt) - : Long.ZERO, + version: isSet(object.version) ? bytesFromBase64(object.version) : new Uint8Array(), + createdAt: isSet(object.createdAt) ? Long.fromValue(object.createdAt) : Long.ZERO }; }, toJSON(message: Deployment): unknown { const obj: any = {}; - message.deploymentId !== undefined && - (obj.deploymentId = message.deploymentId - ? DeploymentID.toJSON(message.deploymentId) - : undefined); - message.state !== undefined && - (obj.state = deployment_StateToJSON(message.state)); - message.version !== undefined && - (obj.version = base64FromBytes( - message.version !== undefined ? message.version : new Uint8Array() - )); - message.createdAt !== undefined && - (obj.createdAt = (message.createdAt || Long.ZERO).toString()); + message.deploymentId !== undefined && (obj.deploymentId = message.deploymentId ? DeploymentID.toJSON(message.deploymentId) : undefined); + message.state !== undefined && (obj.state = deployment_StateToJSON(message.state)); + message.version !== undefined && (obj.version = base64FromBytes(message.version !== undefined ? message.version : new Uint8Array())); + message.createdAt !== undefined && (obj.createdAt = (message.createdAt || Long.ZERO).toString()); return obj; }, - fromPartial, I>>( - object: I - ): Deployment { + fromPartial, I>>(object: I): Deployment { const message = createBaseDeployment(); - message.deploymentId = - object.deploymentId !== undefined && object.deploymentId !== null - ? DeploymentID.fromPartial(object.deploymentId) - : undefined; + message.deploymentId = object.deploymentId !== undefined && object.deploymentId !== null ? DeploymentID.fromPartial(object.deploymentId) : undefined; message.state = object.state ?? 0; message.version = object.version ?? new Uint8Array(); - message.createdAt = - object.createdAt !== undefined && object.createdAt !== null - ? Long.fromValue(object.createdAt) - : Long.ZERO; + message.createdAt = object.createdAt !== undefined && object.createdAt !== null ? Long.fromValue(object.createdAt) : Long.ZERO; return message; - }, + } }; messageTypeRegistry.set(Deployment.$type, Deployment); @@ -268,17 +231,14 @@ function createBaseDeploymentFilters(): DeploymentFilters { $type: "akash.deployment.v1beta3.DeploymentFilters", owner: "", dseq: Long.UZERO, - state: "", + state: "" }; } export const DeploymentFilters = { $type: "akash.deployment.v1beta3.DeploymentFilters" as const, - encode( - message: DeploymentFilters, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: DeploymentFilters, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -320,31 +280,25 @@ export const DeploymentFilters = { $type: DeploymentFilters.$type, owner: isSet(object.owner) ? String(object.owner) : "", dseq: isSet(object.dseq) ? Long.fromValue(object.dseq) : Long.UZERO, - state: isSet(object.state) ? String(object.state) : "", + state: isSet(object.state) ? String(object.state) : "" }; }, toJSON(message: DeploymentFilters): unknown { const obj: any = {}; message.owner !== undefined && (obj.owner = message.owner); - message.dseq !== undefined && - (obj.dseq = (message.dseq || Long.UZERO).toString()); + message.dseq !== undefined && (obj.dseq = (message.dseq || Long.UZERO).toString()); message.state !== undefined && (obj.state = message.state); return obj; }, - fromPartial, I>>( - object: I - ): DeploymentFilters { + fromPartial, I>>(object: I): DeploymentFilters { const message = createBaseDeploymentFilters(); message.owner = object.owner ?? ""; - message.dseq = - object.dseq !== undefined && object.dseq !== null - ? Long.fromValue(object.dseq) - : Long.UZERO; + message.dseq = object.dseq !== undefined && object.dseq !== null ? Long.fromValue(object.dseq) : Long.UZERO; message.state = object.state ?? ""; return message; - }, + } }; messageTypeRegistry.set(DeploymentFilters.$type, DeploymentFilters); @@ -360,9 +314,7 @@ var globalThis: any = (() => { throw "Unable to locate global object"; })(); -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); +const atob: (b64: string) => string = globalThis.atob || (b64 => globalThis.Buffer.from(b64, "base64").toString("binary")); function bytesFromBase64(b64: string): Uint8Array { const bin = atob(b64); const arr = new Uint8Array(bin.length); @@ -372,45 +324,33 @@ function bytesFromBase64(b64: string): Uint8Array { return arr; } -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); +const btoa: (bin: string) => string = globalThis.btoa || (bin => globalThis.Buffer.from(bin, "binary").toString("base64")); function base64FromBytes(arr: Uint8Array): string { const bin: string[] = []; - arr.forEach((byte) => { + arr.forEach(byte => { bin.push(String.fromCharCode(byte)); }); return btoa(bin.join("")); } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/deployment/v1beta3/deploymentmsg.ts b/src/protobuf/akash/deployment/v1beta3/deploymentmsg.ts index 6d7988f..f9106ef 100644 --- a/src/protobuf/akash/deployment/v1beta3/deploymentmsg.ts +++ b/src/protobuf/akash/deployment/v1beta3/deploymentmsg.ts @@ -68,17 +68,14 @@ function createBaseMsgCreateDeployment(): MsgCreateDeployment { groups: [], version: new Uint8Array(), deposit: undefined, - depositor: "", + depositor: "" }; } export const MsgCreateDeployment = { $type: "akash.deployment.v1beta3.MsgCreateDeployment" as const, - encode( - message: MsgCreateDeployment, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MsgCreateDeployment, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { DeploymentID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -131,59 +128,36 @@ export const MsgCreateDeployment = { return { $type: MsgCreateDeployment.$type, id: isSet(object.id) ? DeploymentID.fromJSON(object.id) : undefined, - groups: Array.isArray(object?.groups) - ? object.groups.map((e: any) => GroupSpec.fromJSON(e)) - : [], - version: isSet(object.version) - ? bytesFromBase64(object.version) - : new Uint8Array(), - deposit: isSet(object.deposit) - ? Coin.fromJSON(object.deposit) - : undefined, - depositor: isSet(object.depositor) ? String(object.depositor) : "", + groups: Array.isArray(object?.groups) ? object.groups.map((e: any) => GroupSpec.fromJSON(e)) : [], + version: isSet(object.version) ? bytesFromBase64(object.version) : new Uint8Array(), + deposit: isSet(object.deposit) ? Coin.fromJSON(object.deposit) : undefined, + depositor: isSet(object.depositor) ? String(object.depositor) : "" }; }, toJSON(message: MsgCreateDeployment): unknown { const obj: any = {}; - message.id !== undefined && - (obj.id = message.id ? DeploymentID.toJSON(message.id) : undefined); + message.id !== undefined && (obj.id = message.id ? DeploymentID.toJSON(message.id) : undefined); if (message.groups) { - obj.groups = message.groups.map((e) => - e ? GroupSpec.toJSON(e) : undefined - ); + obj.groups = message.groups.map(e => (e ? GroupSpec.toJSON(e) : undefined)); } else { obj.groups = []; } - message.version !== undefined && - (obj.version = base64FromBytes( - message.version !== undefined ? message.version : new Uint8Array() - )); - message.deposit !== undefined && - (obj.deposit = message.deposit - ? Coin.toJSON(message.deposit) - : undefined); + message.version !== undefined && (obj.version = base64FromBytes(message.version !== undefined ? message.version : new Uint8Array())); + message.deposit !== undefined && (obj.deposit = message.deposit ? Coin.toJSON(message.deposit) : undefined); message.depositor !== undefined && (obj.depositor = message.depositor); return obj; }, - fromPartial, I>>( - object: I - ): MsgCreateDeployment { + fromPartial, I>>(object: I): MsgCreateDeployment { const message = createBaseMsgCreateDeployment(); - message.id = - object.id !== undefined && object.id !== null - ? DeploymentID.fromPartial(object.id) - : undefined; - message.groups = object.groups?.map((e) => GroupSpec.fromPartial(e)) || []; + message.id = object.id !== undefined && object.id !== null ? DeploymentID.fromPartial(object.id) : undefined; + message.groups = object.groups?.map(e => GroupSpec.fromPartial(e)) || []; message.version = object.version ?? new Uint8Array(); - message.deposit = - object.deposit !== undefined && object.deposit !== null - ? Coin.fromPartial(object.deposit) - : undefined; + message.deposit = object.deposit !== undefined && object.deposit !== null ? Coin.fromPartial(object.deposit) : undefined; message.depositor = object.depositor ?? ""; return message; - }, + } }; messageTypeRegistry.set(MsgCreateDeployment.$type, MsgCreateDeployment); @@ -195,17 +169,11 @@ function createBaseMsgCreateDeploymentResponse(): MsgCreateDeploymentResponse { export const MsgCreateDeploymentResponse = { $type: "akash.deployment.v1beta3.MsgCreateDeploymentResponse" as const, - encode( - _: MsgCreateDeploymentResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: MsgCreateDeploymentResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgCreateDeploymentResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreateDeploymentResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCreateDeploymentResponse(); @@ -222,7 +190,7 @@ export const MsgCreateDeploymentResponse = { fromJSON(_: any): MsgCreateDeploymentResponse { return { - $type: MsgCreateDeploymentResponse.$type, + $type: MsgCreateDeploymentResponse.$type }; }, @@ -231,35 +199,27 @@ export const MsgCreateDeploymentResponse = { return obj; }, - fromPartial, I>>( - _: I - ): MsgCreateDeploymentResponse { + fromPartial, I>>(_: I): MsgCreateDeploymentResponse { const message = createBaseMsgCreateDeploymentResponse(); return message; - }, + } }; -messageTypeRegistry.set( - MsgCreateDeploymentResponse.$type, - MsgCreateDeploymentResponse -); +messageTypeRegistry.set(MsgCreateDeploymentResponse.$type, MsgCreateDeploymentResponse); function createBaseMsgDepositDeployment(): MsgDepositDeployment { return { $type: "akash.deployment.v1beta3.MsgDepositDeployment", id: undefined, amount: undefined, - depositor: "", + depositor: "" }; } export const MsgDepositDeployment = { $type: "akash.deployment.v1beta3.MsgDepositDeployment" as const, - encode( - message: MsgDepositDeployment, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MsgDepositDeployment, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { DeploymentID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -272,10 +232,7 @@ export const MsgDepositDeployment = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgDepositDeployment { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgDepositDeployment { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgDepositDeployment(); @@ -304,35 +261,25 @@ export const MsgDepositDeployment = { $type: MsgDepositDeployment.$type, id: isSet(object.id) ? DeploymentID.fromJSON(object.id) : undefined, amount: isSet(object.amount) ? Coin.fromJSON(object.amount) : undefined, - depositor: isSet(object.depositor) ? String(object.depositor) : "", + depositor: isSet(object.depositor) ? String(object.depositor) : "" }; }, toJSON(message: MsgDepositDeployment): unknown { const obj: any = {}; - message.id !== undefined && - (obj.id = message.id ? DeploymentID.toJSON(message.id) : undefined); - message.amount !== undefined && - (obj.amount = message.amount ? Coin.toJSON(message.amount) : undefined); + message.id !== undefined && (obj.id = message.id ? DeploymentID.toJSON(message.id) : undefined); + message.amount !== undefined && (obj.amount = message.amount ? Coin.toJSON(message.amount) : undefined); message.depositor !== undefined && (obj.depositor = message.depositor); return obj; }, - fromPartial, I>>( - object: I - ): MsgDepositDeployment { + fromPartial, I>>(object: I): MsgDepositDeployment { const message = createBaseMsgDepositDeployment(); - message.id = - object.id !== undefined && object.id !== null - ? DeploymentID.fromPartial(object.id) - : undefined; - message.amount = - object.amount !== undefined && object.amount !== null - ? Coin.fromPartial(object.amount) - : undefined; + message.id = object.id !== undefined && object.id !== null ? DeploymentID.fromPartial(object.id) : undefined; + message.amount = object.amount !== undefined && object.amount !== null ? Coin.fromPartial(object.amount) : undefined; message.depositor = object.depositor ?? ""; return message; - }, + } }; messageTypeRegistry.set(MsgDepositDeployment.$type, MsgDepositDeployment); @@ -344,17 +291,11 @@ function createBaseMsgDepositDeploymentResponse(): MsgDepositDeploymentResponse export const MsgDepositDeploymentResponse = { $type: "akash.deployment.v1beta3.MsgDepositDeploymentResponse" as const, - encode( - _: MsgDepositDeploymentResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: MsgDepositDeploymentResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgDepositDeploymentResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgDepositDeploymentResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgDepositDeploymentResponse(); @@ -371,7 +312,7 @@ export const MsgDepositDeploymentResponse = { fromJSON(_: any): MsgDepositDeploymentResponse { return { - $type: MsgDepositDeploymentResponse.$type, + $type: MsgDepositDeploymentResponse.$type }; }, @@ -380,34 +321,26 @@ export const MsgDepositDeploymentResponse = { return obj; }, - fromPartial, I>>( - _: I - ): MsgDepositDeploymentResponse { + fromPartial, I>>(_: I): MsgDepositDeploymentResponse { const message = createBaseMsgDepositDeploymentResponse(); return message; - }, + } }; -messageTypeRegistry.set( - MsgDepositDeploymentResponse.$type, - MsgDepositDeploymentResponse -); +messageTypeRegistry.set(MsgDepositDeploymentResponse.$type, MsgDepositDeploymentResponse); function createBaseMsgUpdateDeployment(): MsgUpdateDeployment { return { $type: "akash.deployment.v1beta3.MsgUpdateDeployment", id: undefined, - version: new Uint8Array(), + version: new Uint8Array() }; } export const MsgUpdateDeployment = { $type: "akash.deployment.v1beta3.MsgUpdateDeployment" as const, - encode( - message: MsgUpdateDeployment, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MsgUpdateDeployment, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { DeploymentID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -442,34 +375,23 @@ export const MsgUpdateDeployment = { return { $type: MsgUpdateDeployment.$type, id: isSet(object.id) ? DeploymentID.fromJSON(object.id) : undefined, - version: isSet(object.version) - ? bytesFromBase64(object.version) - : new Uint8Array(), + version: isSet(object.version) ? bytesFromBase64(object.version) : new Uint8Array() }; }, toJSON(message: MsgUpdateDeployment): unknown { const obj: any = {}; - message.id !== undefined && - (obj.id = message.id ? DeploymentID.toJSON(message.id) : undefined); - message.version !== undefined && - (obj.version = base64FromBytes( - message.version !== undefined ? message.version : new Uint8Array() - )); + message.id !== undefined && (obj.id = message.id ? DeploymentID.toJSON(message.id) : undefined); + message.version !== undefined && (obj.version = base64FromBytes(message.version !== undefined ? message.version : new Uint8Array())); return obj; }, - fromPartial, I>>( - object: I - ): MsgUpdateDeployment { + fromPartial, I>>(object: I): MsgUpdateDeployment { const message = createBaseMsgUpdateDeployment(); - message.id = - object.id !== undefined && object.id !== null - ? DeploymentID.fromPartial(object.id) - : undefined; + message.id = object.id !== undefined && object.id !== null ? DeploymentID.fromPartial(object.id) : undefined; message.version = object.version ?? new Uint8Array(); return message; - }, + } }; messageTypeRegistry.set(MsgUpdateDeployment.$type, MsgUpdateDeployment); @@ -481,17 +403,11 @@ function createBaseMsgUpdateDeploymentResponse(): MsgUpdateDeploymentResponse { export const MsgUpdateDeploymentResponse = { $type: "akash.deployment.v1beta3.MsgUpdateDeploymentResponse" as const, - encode( - _: MsgUpdateDeploymentResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: MsgUpdateDeploymentResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgUpdateDeploymentResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgUpdateDeploymentResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgUpdateDeploymentResponse(); @@ -508,7 +424,7 @@ export const MsgUpdateDeploymentResponse = { fromJSON(_: any): MsgUpdateDeploymentResponse { return { - $type: MsgUpdateDeploymentResponse.$type, + $type: MsgUpdateDeploymentResponse.$type }; }, @@ -517,33 +433,25 @@ export const MsgUpdateDeploymentResponse = { return obj; }, - fromPartial, I>>( - _: I - ): MsgUpdateDeploymentResponse { + fromPartial, I>>(_: I): MsgUpdateDeploymentResponse { const message = createBaseMsgUpdateDeploymentResponse(); return message; - }, + } }; -messageTypeRegistry.set( - MsgUpdateDeploymentResponse.$type, - MsgUpdateDeploymentResponse -); +messageTypeRegistry.set(MsgUpdateDeploymentResponse.$type, MsgUpdateDeploymentResponse); function createBaseMsgCloseDeployment(): MsgCloseDeployment { return { $type: "akash.deployment.v1beta3.MsgCloseDeployment", - id: undefined, + id: undefined }; } export const MsgCloseDeployment = { $type: "akash.deployment.v1beta3.MsgCloseDeployment" as const, - encode( - message: MsgCloseDeployment, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MsgCloseDeployment, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { DeploymentID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -571,27 +479,21 @@ export const MsgCloseDeployment = { fromJSON(object: any): MsgCloseDeployment { return { $type: MsgCloseDeployment.$type, - id: isSet(object.id) ? DeploymentID.fromJSON(object.id) : undefined, + id: isSet(object.id) ? DeploymentID.fromJSON(object.id) : undefined }; }, toJSON(message: MsgCloseDeployment): unknown { const obj: any = {}; - message.id !== undefined && - (obj.id = message.id ? DeploymentID.toJSON(message.id) : undefined); + message.id !== undefined && (obj.id = message.id ? DeploymentID.toJSON(message.id) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): MsgCloseDeployment { + fromPartial, I>>(object: I): MsgCloseDeployment { const message = createBaseMsgCloseDeployment(); - message.id = - object.id !== undefined && object.id !== null - ? DeploymentID.fromPartial(object.id) - : undefined; + message.id = object.id !== undefined && object.id !== null ? DeploymentID.fromPartial(object.id) : undefined; return message; - }, + } }; messageTypeRegistry.set(MsgCloseDeployment.$type, MsgCloseDeployment); @@ -603,17 +505,11 @@ function createBaseMsgCloseDeploymentResponse(): MsgCloseDeploymentResponse { export const MsgCloseDeploymentResponse = { $type: "akash.deployment.v1beta3.MsgCloseDeploymentResponse" as const, - encode( - _: MsgCloseDeploymentResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: MsgCloseDeploymentResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgCloseDeploymentResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgCloseDeploymentResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCloseDeploymentResponse(); @@ -630,7 +526,7 @@ export const MsgCloseDeploymentResponse = { fromJSON(_: any): MsgCloseDeploymentResponse { return { - $type: MsgCloseDeploymentResponse.$type, + $type: MsgCloseDeploymentResponse.$type }; }, @@ -639,18 +535,13 @@ export const MsgCloseDeploymentResponse = { return obj; }, - fromPartial, I>>( - _: I - ): MsgCloseDeploymentResponse { + fromPartial, I>>(_: I): MsgCloseDeploymentResponse { const message = createBaseMsgCloseDeploymentResponse(); return message; - }, + } }; -messageTypeRegistry.set( - MsgCloseDeploymentResponse.$type, - MsgCloseDeploymentResponse -); +messageTypeRegistry.set(MsgCloseDeploymentResponse.$type, MsgCloseDeploymentResponse); declare var self: any | undefined; declare var window: any | undefined; @@ -663,9 +554,7 @@ var globalThis: any = (() => { throw "Unable to locate global object"; })(); -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); +const atob: (b64: string) => string = globalThis.atob || (b64 => globalThis.Buffer.from(b64, "base64").toString("binary")); function bytesFromBase64(b64: string): Uint8Array { const bin = atob(b64); const arr = new Uint8Array(bin.length); @@ -675,45 +564,33 @@ function bytesFromBase64(b64: string): Uint8Array { return arr; } -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); +const btoa: (bin: string) => string = globalThis.btoa || (bin => globalThis.Buffer.from(bin, "binary").toString("base64")); function base64FromBytes(arr: Uint8Array): string { const bin: string[] = []; - arr.forEach((byte) => { + arr.forEach(byte => { bin.push(String.fromCharCode(byte)); }); return btoa(bin.join("")); } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/deployment/v1beta3/genesis.ts b/src/protobuf/akash/deployment/v1beta3/genesis.ts index 365e81e..82deadc 100644 --- a/src/protobuf/akash/deployment/v1beta3/genesis.ts +++ b/src/protobuf/akash/deployment/v1beta3/genesis.ts @@ -26,17 +26,14 @@ function createBaseGenesisDeployment(): GenesisDeployment { return { $type: "akash.deployment.v1beta3.GenesisDeployment", deployment: undefined, - groups: [], + groups: [] }; } export const GenesisDeployment = { $type: "akash.deployment.v1beta3.GenesisDeployment" as const, - encode( - message: GenesisDeployment, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: GenesisDeployment, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.deployment !== undefined) { Deployment.encode(message.deployment, writer.uint32(10).fork()).ldelim(); } @@ -70,40 +67,28 @@ export const GenesisDeployment = { fromJSON(object: any): GenesisDeployment { return { $type: GenesisDeployment.$type, - deployment: isSet(object.deployment) - ? Deployment.fromJSON(object.deployment) - : undefined, - groups: Array.isArray(object?.groups) - ? object.groups.map((e: any) => Group.fromJSON(e)) - : [], + deployment: isSet(object.deployment) ? Deployment.fromJSON(object.deployment) : undefined, + groups: Array.isArray(object?.groups) ? object.groups.map((e: any) => Group.fromJSON(e)) : [] }; }, toJSON(message: GenesisDeployment): unknown { const obj: any = {}; - message.deployment !== undefined && - (obj.deployment = message.deployment - ? Deployment.toJSON(message.deployment) - : undefined); + message.deployment !== undefined && (obj.deployment = message.deployment ? Deployment.toJSON(message.deployment) : undefined); if (message.groups) { - obj.groups = message.groups.map((e) => (e ? Group.toJSON(e) : undefined)); + obj.groups = message.groups.map(e => (e ? Group.toJSON(e) : undefined)); } else { obj.groups = []; } return obj; }, - fromPartial, I>>( - object: I - ): GenesisDeployment { + fromPartial, I>>(object: I): GenesisDeployment { const message = createBaseGenesisDeployment(); - message.deployment = - object.deployment !== undefined && object.deployment !== null - ? Deployment.fromPartial(object.deployment) - : undefined; - message.groups = object.groups?.map((e) => Group.fromPartial(e)) || []; + message.deployment = object.deployment !== undefined && object.deployment !== null ? Deployment.fromPartial(object.deployment) : undefined; + message.groups = object.groups?.map(e => Group.fromPartial(e)) || []; return message; - }, + } }; messageTypeRegistry.set(GenesisDeployment.$type, GenesisDeployment); @@ -112,17 +97,14 @@ function createBaseGenesisState(): GenesisState { return { $type: "akash.deployment.v1beta3.GenesisState", deployments: [], - params: undefined, + params: undefined }; } export const GenesisState = { $type: "akash.deployment.v1beta3.GenesisState" as const, - encode( - message: GenesisState, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: GenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.deployments) { GenesisDeployment.encode(v!, writer.uint32(10).fork()).ldelim(); } @@ -140,9 +122,7 @@ export const GenesisState = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.deployments.push( - GenesisDeployment.decode(reader, reader.uint32()) - ); + message.deployments.push(GenesisDeployment.decode(reader, reader.uint32())); break; case 2: message.params = Params.decode(reader, reader.uint32()); @@ -158,71 +138,50 @@ export const GenesisState = { fromJSON(object: any): GenesisState { return { $type: GenesisState.$type, - deployments: Array.isArray(object?.deployments) - ? object.deployments.map((e: any) => GenesisDeployment.fromJSON(e)) - : [], - params: isSet(object.params) ? Params.fromJSON(object.params) : undefined, + deployments: Array.isArray(object?.deployments) ? object.deployments.map((e: any) => GenesisDeployment.fromJSON(e)) : [], + params: isSet(object.params) ? Params.fromJSON(object.params) : undefined }; }, toJSON(message: GenesisState): unknown { const obj: any = {}; if (message.deployments) { - obj.deployments = message.deployments.map((e) => - e ? GenesisDeployment.toJSON(e) : undefined - ); + obj.deployments = message.deployments.map(e => (e ? GenesisDeployment.toJSON(e) : undefined)); } else { obj.deployments = []; } - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); + message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): GenesisState { + fromPartial, I>>(object: I): GenesisState { const message = createBaseGenesisState(); - message.deployments = - object.deployments?.map((e) => GenesisDeployment.fromPartial(e)) || []; - message.params = - object.params !== undefined && object.params !== null - ? Params.fromPartial(object.params) - : undefined; + message.deployments = object.deployments?.map(e => GenesisDeployment.fromPartial(e)) || []; + message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; return message; - }, + } }; messageTypeRegistry.set(GenesisState.$type, GenesisState); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/deployment/v1beta3/group.ts b/src/protobuf/akash/deployment/v1beta3/group.ts index 8d2c200..81fd108 100644 --- a/src/protobuf/akash/deployment/v1beta3/group.ts +++ b/src/protobuf/akash/deployment/v1beta3/group.ts @@ -28,7 +28,7 @@ export enum Group_State { insufficient_funds = 3, /** closed - GroupClosed denotes state for group closed */ closed = 4, - UNRECOGNIZED = -1, + UNRECOGNIZED = -1 } export function group_StateFromJSON(object: any): Group_State { @@ -79,7 +79,7 @@ function createBaseGroup(): Group { groupId: undefined, state: 0, groupSpec: undefined, - createdAt: Long.ZERO, + createdAt: Long.ZERO }; } @@ -132,85 +132,52 @@ export const Group = { fromJSON(object: any): Group { return { $type: Group.$type, - groupId: isSet(object.groupId) - ? GroupID.fromJSON(object.groupId) - : undefined, + groupId: isSet(object.groupId) ? GroupID.fromJSON(object.groupId) : undefined, state: isSet(object.state) ? group_StateFromJSON(object.state) : 0, - groupSpec: isSet(object.groupSpec) - ? GroupSpec.fromJSON(object.groupSpec) - : undefined, - createdAt: isSet(object.createdAt) - ? Long.fromValue(object.createdAt) - : Long.ZERO, + groupSpec: isSet(object.groupSpec) ? GroupSpec.fromJSON(object.groupSpec) : undefined, + createdAt: isSet(object.createdAt) ? Long.fromValue(object.createdAt) : Long.ZERO }; }, toJSON(message: Group): unknown { const obj: any = {}; - message.groupId !== undefined && - (obj.groupId = message.groupId - ? GroupID.toJSON(message.groupId) - : undefined); - message.state !== undefined && - (obj.state = group_StateToJSON(message.state)); - message.groupSpec !== undefined && - (obj.groupSpec = message.groupSpec - ? GroupSpec.toJSON(message.groupSpec) - : undefined); - message.createdAt !== undefined && - (obj.createdAt = (message.createdAt || Long.ZERO).toString()); + message.groupId !== undefined && (obj.groupId = message.groupId ? GroupID.toJSON(message.groupId) : undefined); + message.state !== undefined && (obj.state = group_StateToJSON(message.state)); + message.groupSpec !== undefined && (obj.groupSpec = message.groupSpec ? GroupSpec.toJSON(message.groupSpec) : undefined); + message.createdAt !== undefined && (obj.createdAt = (message.createdAt || Long.ZERO).toString()); return obj; }, fromPartial, I>>(object: I): Group { const message = createBaseGroup(); - message.groupId = - object.groupId !== undefined && object.groupId !== null - ? GroupID.fromPartial(object.groupId) - : undefined; + message.groupId = object.groupId !== undefined && object.groupId !== null ? GroupID.fromPartial(object.groupId) : undefined; message.state = object.state ?? 0; - message.groupSpec = - object.groupSpec !== undefined && object.groupSpec !== null - ? GroupSpec.fromPartial(object.groupSpec) - : undefined; - message.createdAt = - object.createdAt !== undefined && object.createdAt !== null - ? Long.fromValue(object.createdAt) - : Long.ZERO; + message.groupSpec = object.groupSpec !== undefined && object.groupSpec !== null ? GroupSpec.fromPartial(object.groupSpec) : undefined; + message.createdAt = object.createdAt !== undefined && object.createdAt !== null ? Long.fromValue(object.createdAt) : Long.ZERO; return message; - }, + } }; messageTypeRegistry.set(Group.$type, Group); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/deployment/v1beta3/groupid.ts b/src/protobuf/akash/deployment/v1beta3/groupid.ts index d8e6dcb..a3e896c 100644 --- a/src/protobuf/akash/deployment/v1beta3/groupid.ts +++ b/src/protobuf/akash/deployment/v1beta3/groupid.ts @@ -18,17 +18,14 @@ function createBaseGroupID(): GroupID { $type: "akash.deployment.v1beta3.GroupID", owner: "", dseq: Long.UZERO, - gseq: 0, + gseq: 0 }; } export const GroupID = { $type: "akash.deployment.v1beta3.GroupID" as const, - encode( - message: GroupID, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: GroupID, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -70,15 +67,14 @@ export const GroupID = { $type: GroupID.$type, owner: isSet(object.owner) ? String(object.owner) : "", dseq: isSet(object.dseq) ? Long.fromValue(object.dseq) : Long.UZERO, - gseq: isSet(object.gseq) ? Number(object.gseq) : 0, + gseq: isSet(object.gseq) ? Number(object.gseq) : 0 }; }, toJSON(message: GroupID): unknown { const obj: any = {}; message.owner !== undefined && (obj.owner = message.owner); - message.dseq !== undefined && - (obj.dseq = (message.dseq || Long.UZERO).toString()); + message.dseq !== undefined && (obj.dseq = (message.dseq || Long.UZERO).toString()); message.gseq !== undefined && (obj.gseq = Math.round(message.gseq)); return obj; }, @@ -86,45 +82,32 @@ export const GroupID = { fromPartial, I>>(object: I): GroupID { const message = createBaseGroupID(); message.owner = object.owner ?? ""; - message.dseq = - object.dseq !== undefined && object.dseq !== null - ? Long.fromValue(object.dseq) - : Long.UZERO; + message.dseq = object.dseq !== undefined && object.dseq !== null ? Long.fromValue(object.dseq) : Long.UZERO; message.gseq = object.gseq ?? 0; return message; - }, + } }; messageTypeRegistry.set(GroupID.$type, GroupID); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/deployment/v1beta3/groupmsg.ts b/src/protobuf/akash/deployment/v1beta3/groupmsg.ts index d7fa90e..d6a972f 100644 --- a/src/protobuf/akash/deployment/v1beta3/groupmsg.ts +++ b/src/protobuf/akash/deployment/v1beta3/groupmsg.ts @@ -46,10 +46,7 @@ function createBaseMsgCloseGroup(): MsgCloseGroup { export const MsgCloseGroup = { $type: "akash.deployment.v1beta3.MsgCloseGroup" as const, - encode( - message: MsgCloseGroup, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MsgCloseGroup, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { GroupID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -77,27 +74,21 @@ export const MsgCloseGroup = { fromJSON(object: any): MsgCloseGroup { return { $type: MsgCloseGroup.$type, - id: isSet(object.id) ? GroupID.fromJSON(object.id) : undefined, + id: isSet(object.id) ? GroupID.fromJSON(object.id) : undefined }; }, toJSON(message: MsgCloseGroup): unknown { const obj: any = {}; - message.id !== undefined && - (obj.id = message.id ? GroupID.toJSON(message.id) : undefined); + message.id !== undefined && (obj.id = message.id ? GroupID.toJSON(message.id) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): MsgCloseGroup { + fromPartial, I>>(object: I): MsgCloseGroup { const message = createBaseMsgCloseGroup(); - message.id = - object.id !== undefined && object.id !== null - ? GroupID.fromPartial(object.id) - : undefined; + message.id = object.id !== undefined && object.id !== null ? GroupID.fromPartial(object.id) : undefined; return message; - }, + } }; messageTypeRegistry.set(MsgCloseGroup.$type, MsgCloseGroup); @@ -109,17 +100,11 @@ function createBaseMsgCloseGroupResponse(): MsgCloseGroupResponse { export const MsgCloseGroupResponse = { $type: "akash.deployment.v1beta3.MsgCloseGroupResponse" as const, - encode( - _: MsgCloseGroupResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: MsgCloseGroupResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgCloseGroupResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgCloseGroupResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCloseGroupResponse(); @@ -136,7 +121,7 @@ export const MsgCloseGroupResponse = { fromJSON(_: any): MsgCloseGroupResponse { return { - $type: MsgCloseGroupResponse.$type, + $type: MsgCloseGroupResponse.$type }; }, @@ -145,12 +130,10 @@ export const MsgCloseGroupResponse = { return obj; }, - fromPartial, I>>( - _: I - ): MsgCloseGroupResponse { + fromPartial, I>>(_: I): MsgCloseGroupResponse { const message = createBaseMsgCloseGroupResponse(); return message; - }, + } }; messageTypeRegistry.set(MsgCloseGroupResponse.$type, MsgCloseGroupResponse); @@ -162,10 +145,7 @@ function createBaseMsgPauseGroup(): MsgPauseGroup { export const MsgPauseGroup = { $type: "akash.deployment.v1beta3.MsgPauseGroup" as const, - encode( - message: MsgPauseGroup, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MsgPauseGroup, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { GroupID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -193,27 +173,21 @@ export const MsgPauseGroup = { fromJSON(object: any): MsgPauseGroup { return { $type: MsgPauseGroup.$type, - id: isSet(object.id) ? GroupID.fromJSON(object.id) : undefined, + id: isSet(object.id) ? GroupID.fromJSON(object.id) : undefined }; }, toJSON(message: MsgPauseGroup): unknown { const obj: any = {}; - message.id !== undefined && - (obj.id = message.id ? GroupID.toJSON(message.id) : undefined); + message.id !== undefined && (obj.id = message.id ? GroupID.toJSON(message.id) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): MsgPauseGroup { + fromPartial, I>>(object: I): MsgPauseGroup { const message = createBaseMsgPauseGroup(); - message.id = - object.id !== undefined && object.id !== null - ? GroupID.fromPartial(object.id) - : undefined; + message.id = object.id !== undefined && object.id !== null ? GroupID.fromPartial(object.id) : undefined; return message; - }, + } }; messageTypeRegistry.set(MsgPauseGroup.$type, MsgPauseGroup); @@ -225,17 +199,11 @@ function createBaseMsgPauseGroupResponse(): MsgPauseGroupResponse { export const MsgPauseGroupResponse = { $type: "akash.deployment.v1beta3.MsgPauseGroupResponse" as const, - encode( - _: MsgPauseGroupResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: MsgPauseGroupResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgPauseGroupResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgPauseGroupResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgPauseGroupResponse(); @@ -252,7 +220,7 @@ export const MsgPauseGroupResponse = { fromJSON(_: any): MsgPauseGroupResponse { return { - $type: MsgPauseGroupResponse.$type, + $type: MsgPauseGroupResponse.$type }; }, @@ -261,12 +229,10 @@ export const MsgPauseGroupResponse = { return obj; }, - fromPartial, I>>( - _: I - ): MsgPauseGroupResponse { + fromPartial, I>>(_: I): MsgPauseGroupResponse { const message = createBaseMsgPauseGroupResponse(); return message; - }, + } }; messageTypeRegistry.set(MsgPauseGroupResponse.$type, MsgPauseGroupResponse); @@ -278,10 +244,7 @@ function createBaseMsgStartGroup(): MsgStartGroup { export const MsgStartGroup = { $type: "akash.deployment.v1beta3.MsgStartGroup" as const, - encode( - message: MsgStartGroup, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MsgStartGroup, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { GroupID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -309,27 +272,21 @@ export const MsgStartGroup = { fromJSON(object: any): MsgStartGroup { return { $type: MsgStartGroup.$type, - id: isSet(object.id) ? GroupID.fromJSON(object.id) : undefined, + id: isSet(object.id) ? GroupID.fromJSON(object.id) : undefined }; }, toJSON(message: MsgStartGroup): unknown { const obj: any = {}; - message.id !== undefined && - (obj.id = message.id ? GroupID.toJSON(message.id) : undefined); + message.id !== undefined && (obj.id = message.id ? GroupID.toJSON(message.id) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): MsgStartGroup { + fromPartial, I>>(object: I): MsgStartGroup { const message = createBaseMsgStartGroup(); - message.id = - object.id !== undefined && object.id !== null - ? GroupID.fromPartial(object.id) - : undefined; + message.id = object.id !== undefined && object.id !== null ? GroupID.fromPartial(object.id) : undefined; return message; - }, + } }; messageTypeRegistry.set(MsgStartGroup.$type, MsgStartGroup); @@ -341,17 +298,11 @@ function createBaseMsgStartGroupResponse(): MsgStartGroupResponse { export const MsgStartGroupResponse = { $type: "akash.deployment.v1beta3.MsgStartGroupResponse" as const, - encode( - _: MsgStartGroupResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: MsgStartGroupResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgStartGroupResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgStartGroupResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgStartGroupResponse(); @@ -368,7 +319,7 @@ export const MsgStartGroupResponse = { fromJSON(_: any): MsgStartGroupResponse { return { - $type: MsgStartGroupResponse.$type, + $type: MsgStartGroupResponse.$type }; }, @@ -377,44 +328,32 @@ export const MsgStartGroupResponse = { return obj; }, - fromPartial, I>>( - _: I - ): MsgStartGroupResponse { + fromPartial, I>>(_: I): MsgStartGroupResponse { const message = createBaseMsgStartGroupResponse(); return message; - }, + } }; messageTypeRegistry.set(MsgStartGroupResponse.$type, MsgStartGroupResponse); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/deployment/v1beta3/groupspec.ts b/src/protobuf/akash/deployment/v1beta3/groupspec.ts index 975a935..b59cd6e 100644 --- a/src/protobuf/akash/deployment/v1beta3/groupspec.ts +++ b/src/protobuf/akash/deployment/v1beta3/groupspec.ts @@ -20,25 +20,19 @@ function createBaseGroupSpec(): GroupSpec { $type: "akash.deployment.v1beta3.GroupSpec", name: "", requirements: undefined, - resources: [], + resources: [] }; } export const GroupSpec = { $type: "akash.deployment.v1beta3.GroupSpec" as const, - encode( - message: GroupSpec, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: GroupSpec, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.name !== "") { writer.uint32(10).string(message.name); } if (message.requirements !== undefined) { - PlacementRequirements.encode( - message.requirements, - writer.uint32(18).fork() - ).ldelim(); + PlacementRequirements.encode(message.requirements, writer.uint32(18).fork()).ldelim(); } for (const v of message.resources) { ResourceUnit.encode(v!, writer.uint32(26).fork()).ldelim(); @@ -57,10 +51,7 @@ export const GroupSpec = { message.name = reader.string(); break; case 2: - message.requirements = PlacementRequirements.decode( - reader, - reader.uint32() - ); + message.requirements = PlacementRequirements.decode(reader, reader.uint32()); break; case 3: message.resources.push(ResourceUnit.decode(reader, reader.uint32())); @@ -77,77 +68,53 @@ export const GroupSpec = { return { $type: GroupSpec.$type, name: isSet(object.name) ? String(object.name) : "", - requirements: isSet(object.requirements) - ? PlacementRequirements.fromJSON(object.requirements) - : undefined, - resources: Array.isArray(object?.resources) - ? object.resources.map((e: any) => ResourceUnit.fromJSON(e)) - : [], + requirements: isSet(object.requirements) ? PlacementRequirements.fromJSON(object.requirements) : undefined, + resources: Array.isArray(object?.resources) ? object.resources.map((e: any) => ResourceUnit.fromJSON(e)) : [] }; }, toJSON(message: GroupSpec): unknown { const obj: any = {}; message.name !== undefined && (obj.name = message.name); - message.requirements !== undefined && - (obj.requirements = message.requirements - ? PlacementRequirements.toJSON(message.requirements) - : undefined); + message.requirements !== undefined && (obj.requirements = message.requirements ? PlacementRequirements.toJSON(message.requirements) : undefined); if (message.resources) { - obj.resources = message.resources.map((e) => - e ? ResourceUnit.toJSON(e) : undefined - ); + obj.resources = message.resources.map(e => (e ? ResourceUnit.toJSON(e) : undefined)); } else { obj.resources = []; } return obj; }, - fromPartial, I>>( - object: I - ): GroupSpec { + fromPartial, I>>(object: I): GroupSpec { const message = createBaseGroupSpec(); message.name = object.name ?? ""; message.requirements = - object.requirements !== undefined && object.requirements !== null - ? PlacementRequirements.fromPartial(object.requirements) - : undefined; - message.resources = - object.resources?.map((e) => ResourceUnit.fromPartial(e)) || []; + object.requirements !== undefined && object.requirements !== null ? PlacementRequirements.fromPartial(object.requirements) : undefined; + message.resources = object.resources?.map(e => ResourceUnit.fromPartial(e)) || []; return message; - }, + } }; messageTypeRegistry.set(GroupSpec.$type, GroupSpec); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/deployment/v1beta3/params.ts b/src/protobuf/akash/deployment/v1beta3/params.ts index 64abb00..edf4658 100644 --- a/src/protobuf/akash/deployment/v1beta3/params.ts +++ b/src/protobuf/akash/deployment/v1beta3/params.ts @@ -19,10 +19,7 @@ function createBaseParams(): Params { export const Params = { $type: "akash.deployment.v1beta3.Params" as const, - encode( - message: Params, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Params, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.minDeposits) { Coin.encode(v!, writer.uint32(10).fork()).ldelim(); } @@ -50,18 +47,14 @@ export const Params = { fromJSON(object: any): Params { return { $type: Params.$type, - minDeposits: Array.isArray(object?.minDeposits) - ? object.minDeposits.map((e: any) => Coin.fromJSON(e)) - : [], + minDeposits: Array.isArray(object?.minDeposits) ? object.minDeposits.map((e: any) => Coin.fromJSON(e)) : [] }; }, toJSON(message: Params): unknown { const obj: any = {}; if (message.minDeposits) { - obj.minDeposits = message.minDeposits.map((e) => - e ? Coin.toJSON(e) : undefined - ); + obj.minDeposits = message.minDeposits.map(e => (e ? Coin.toJSON(e) : undefined)); } else { obj.minDeposits = []; } @@ -70,42 +63,31 @@ export const Params = { fromPartial, I>>(object: I): Params { const message = createBaseParams(); - message.minDeposits = - object.minDeposits?.map((e) => Coin.fromPartial(e)) || []; + message.minDeposits = object.minDeposits?.map(e => Coin.fromPartial(e)) || []; return message; - }, + } }; messageTypeRegistry.set(Params.$type, Params); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/deployment/v1beta3/query.ts b/src/protobuf/akash/deployment/v1beta3/query.ts index 1011fe3..bdd934b 100644 --- a/src/protobuf/akash/deployment/v1beta3/query.ts +++ b/src/protobuf/akash/deployment/v1beta3/query.ts @@ -2,10 +2,7 @@ import { messageTypeRegistry } from "../../../typeRegistry"; import Long from "long"; import { DeploymentFilters, DeploymentID, Deployment } from "./deployment"; -import { - PageRequest, - PageResponse, -} from "../../../cosmos/base/query/v1beta1/pagination"; +import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; import { Group } from "./group"; import { Account } from "../../escrow/v1beta3/types"; import { GroupID } from "./groupid"; @@ -57,22 +54,16 @@ function createBaseQueryDeploymentsRequest(): QueryDeploymentsRequest { return { $type: "akash.deployment.v1beta3.QueryDeploymentsRequest", filters: undefined, - pagination: undefined, + pagination: undefined }; } export const QueryDeploymentsRequest = { $type: "akash.deployment.v1beta3.QueryDeploymentsRequest" as const, - encode( - message: QueryDeploymentsRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryDeploymentsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.filters !== undefined) { - DeploymentFilters.encode( - message.filters, - writer.uint32(10).fork() - ).ldelim(); + DeploymentFilters.encode(message.filters, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); @@ -80,10 +71,7 @@ export const QueryDeploymentsRequest = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryDeploymentsRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryDeploymentsRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryDeploymentsRequest(); @@ -107,42 +95,24 @@ export const QueryDeploymentsRequest = { fromJSON(object: any): QueryDeploymentsRequest { return { $type: QueryDeploymentsRequest.$type, - filters: isSet(object.filters) - ? DeploymentFilters.fromJSON(object.filters) - : undefined, - pagination: isSet(object.pagination) - ? PageRequest.fromJSON(object.pagination) - : undefined, + filters: isSet(object.filters) ? DeploymentFilters.fromJSON(object.filters) : undefined, + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined }; }, toJSON(message: QueryDeploymentsRequest): unknown { const obj: any = {}; - message.filters !== undefined && - (obj.filters = message.filters - ? DeploymentFilters.toJSON(message.filters) - : undefined); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); + message.filters !== undefined && (obj.filters = message.filters ? DeploymentFilters.toJSON(message.filters) : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryDeploymentsRequest { + fromPartial, I>>(object: I): QueryDeploymentsRequest { const message = createBaseQueryDeploymentsRequest(); - message.filters = - object.filters !== undefined && object.filters !== null - ? DeploymentFilters.fromPartial(object.filters) - : undefined; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; + message.filters = object.filters !== undefined && object.filters !== null ? DeploymentFilters.fromPartial(object.filters) : undefined; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryDeploymentsRequest.$type, QueryDeploymentsRequest); @@ -151,33 +121,24 @@ function createBaseQueryDeploymentsResponse(): QueryDeploymentsResponse { return { $type: "akash.deployment.v1beta3.QueryDeploymentsResponse", deployments: [], - pagination: undefined, + pagination: undefined }; } export const QueryDeploymentsResponse = { $type: "akash.deployment.v1beta3.QueryDeploymentsResponse" as const, - encode( - message: QueryDeploymentsResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryDeploymentsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.deployments) { QueryDeploymentResponse.encode(v!, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); + PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryDeploymentsResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryDeploymentsResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryDeploymentsResponse(); @@ -185,9 +146,7 @@ export const QueryDeploymentsResponse = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.deployments.push( - QueryDeploymentResponse.decode(reader, reader.uint32()) - ); + message.deployments.push(QueryDeploymentResponse.decode(reader, reader.uint32())); break; case 2: message.pagination = PageResponse.decode(reader, reader.uint32()); @@ -203,77 +162,50 @@ export const QueryDeploymentsResponse = { fromJSON(object: any): QueryDeploymentsResponse { return { $type: QueryDeploymentsResponse.$type, - deployments: Array.isArray(object?.deployments) - ? object.deployments.map((e: any) => - QueryDeploymentResponse.fromJSON(e) - ) - : [], - pagination: isSet(object.pagination) - ? PageResponse.fromJSON(object.pagination) - : undefined, + deployments: Array.isArray(object?.deployments) ? object.deployments.map((e: any) => QueryDeploymentResponse.fromJSON(e)) : [], + pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined }; }, toJSON(message: QueryDeploymentsResponse): unknown { const obj: any = {}; if (message.deployments) { - obj.deployments = message.deployments.map((e) => - e ? QueryDeploymentResponse.toJSON(e) : undefined - ); + obj.deployments = message.deployments.map(e => (e ? QueryDeploymentResponse.toJSON(e) : undefined)); } else { obj.deployments = []; } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryDeploymentsResponse { + fromPartial, I>>(object: I): QueryDeploymentsResponse { const message = createBaseQueryDeploymentsResponse(); - message.deployments = - object.deployments?.map((e) => QueryDeploymentResponse.fromPartial(e)) || - []; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageResponse.fromPartial(object.pagination) - : undefined; + message.deployments = object.deployments?.map(e => QueryDeploymentResponse.fromPartial(e)) || []; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; return message; - }, + } }; -messageTypeRegistry.set( - QueryDeploymentsResponse.$type, - QueryDeploymentsResponse -); +messageTypeRegistry.set(QueryDeploymentsResponse.$type, QueryDeploymentsResponse); function createBaseQueryDeploymentRequest(): QueryDeploymentRequest { return { $type: "akash.deployment.v1beta3.QueryDeploymentRequest", - id: undefined, + id: undefined }; } export const QueryDeploymentRequest = { $type: "akash.deployment.v1beta3.QueryDeploymentRequest" as const, - encode( - message: QueryDeploymentRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryDeploymentRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { DeploymentID.encode(message.id, writer.uint32(10).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryDeploymentRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryDeploymentRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryDeploymentRequest(); @@ -294,27 +226,21 @@ export const QueryDeploymentRequest = { fromJSON(object: any): QueryDeploymentRequest { return { $type: QueryDeploymentRequest.$type, - id: isSet(object.id) ? DeploymentID.fromJSON(object.id) : undefined, + id: isSet(object.id) ? DeploymentID.fromJSON(object.id) : undefined }; }, toJSON(message: QueryDeploymentRequest): unknown { const obj: any = {}; - message.id !== undefined && - (obj.id = message.id ? DeploymentID.toJSON(message.id) : undefined); + message.id !== undefined && (obj.id = message.id ? DeploymentID.toJSON(message.id) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryDeploymentRequest { + fromPartial, I>>(object: I): QueryDeploymentRequest { const message = createBaseQueryDeploymentRequest(); - message.id = - object.id !== undefined && object.id !== null - ? DeploymentID.fromPartial(object.id) - : undefined; + message.id = object.id !== undefined && object.id !== null ? DeploymentID.fromPartial(object.id) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryDeploymentRequest.$type, QueryDeploymentRequest); @@ -324,17 +250,14 @@ function createBaseQueryDeploymentResponse(): QueryDeploymentResponse { $type: "akash.deployment.v1beta3.QueryDeploymentResponse", deployment: undefined, groups: [], - escrowAccount: undefined, + escrowAccount: undefined }; } export const QueryDeploymentResponse = { $type: "akash.deployment.v1beta3.QueryDeploymentResponse" as const, - encode( - message: QueryDeploymentResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryDeploymentResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.deployment !== undefined) { Deployment.encode(message.deployment, writer.uint32(10).fork()).ldelim(); } @@ -347,10 +270,7 @@ export const QueryDeploymentResponse = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryDeploymentResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryDeploymentResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryDeploymentResponse(); @@ -377,51 +297,31 @@ export const QueryDeploymentResponse = { fromJSON(object: any): QueryDeploymentResponse { return { $type: QueryDeploymentResponse.$type, - deployment: isSet(object.deployment) - ? Deployment.fromJSON(object.deployment) - : undefined, - groups: Array.isArray(object?.groups) - ? object.groups.map((e: any) => Group.fromJSON(e)) - : [], - escrowAccount: isSet(object.escrowAccount) - ? Account.fromJSON(object.escrowAccount) - : undefined, + deployment: isSet(object.deployment) ? Deployment.fromJSON(object.deployment) : undefined, + groups: Array.isArray(object?.groups) ? object.groups.map((e: any) => Group.fromJSON(e)) : [], + escrowAccount: isSet(object.escrowAccount) ? Account.fromJSON(object.escrowAccount) : undefined }; }, toJSON(message: QueryDeploymentResponse): unknown { const obj: any = {}; - message.deployment !== undefined && - (obj.deployment = message.deployment - ? Deployment.toJSON(message.deployment) - : undefined); + message.deployment !== undefined && (obj.deployment = message.deployment ? Deployment.toJSON(message.deployment) : undefined); if (message.groups) { - obj.groups = message.groups.map((e) => (e ? Group.toJSON(e) : undefined)); + obj.groups = message.groups.map(e => (e ? Group.toJSON(e) : undefined)); } else { obj.groups = []; } - message.escrowAccount !== undefined && - (obj.escrowAccount = message.escrowAccount - ? Account.toJSON(message.escrowAccount) - : undefined); + message.escrowAccount !== undefined && (obj.escrowAccount = message.escrowAccount ? Account.toJSON(message.escrowAccount) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryDeploymentResponse { + fromPartial, I>>(object: I): QueryDeploymentResponse { const message = createBaseQueryDeploymentResponse(); - message.deployment = - object.deployment !== undefined && object.deployment !== null - ? Deployment.fromPartial(object.deployment) - : undefined; - message.groups = object.groups?.map((e) => Group.fromPartial(e)) || []; - message.escrowAccount = - object.escrowAccount !== undefined && object.escrowAccount !== null - ? Account.fromPartial(object.escrowAccount) - : undefined; + message.deployment = object.deployment !== undefined && object.deployment !== null ? Deployment.fromPartial(object.deployment) : undefined; + message.groups = object.groups?.map(e => Group.fromPartial(e)) || []; + message.escrowAccount = object.escrowAccount !== undefined && object.escrowAccount !== null ? Account.fromPartial(object.escrowAccount) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryDeploymentResponse.$type, QueryDeploymentResponse); @@ -433,10 +333,7 @@ function createBaseQueryGroupRequest(): QueryGroupRequest { export const QueryGroupRequest = { $type: "akash.deployment.v1beta3.QueryGroupRequest" as const, - encode( - message: QueryGroupRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryGroupRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { GroupID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -464,27 +361,21 @@ export const QueryGroupRequest = { fromJSON(object: any): QueryGroupRequest { return { $type: QueryGroupRequest.$type, - id: isSet(object.id) ? GroupID.fromJSON(object.id) : undefined, + id: isSet(object.id) ? GroupID.fromJSON(object.id) : undefined }; }, toJSON(message: QueryGroupRequest): unknown { const obj: any = {}; - message.id !== undefined && - (obj.id = message.id ? GroupID.toJSON(message.id) : undefined); + message.id !== undefined && (obj.id = message.id ? GroupID.toJSON(message.id) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryGroupRequest { + fromPartial, I>>(object: I): QueryGroupRequest { const message = createBaseQueryGroupRequest(); - message.id = - object.id !== undefined && object.id !== null - ? GroupID.fromPartial(object.id) - : undefined; + message.id = object.id !== undefined && object.id !== null ? GroupID.fromPartial(object.id) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryGroupRequest.$type, QueryGroupRequest); @@ -492,17 +383,14 @@ messageTypeRegistry.set(QueryGroupRequest.$type, QueryGroupRequest); function createBaseQueryGroupResponse(): QueryGroupResponse { return { $type: "akash.deployment.v1beta3.QueryGroupResponse", - group: undefined, + group: undefined }; } export const QueryGroupResponse = { $type: "akash.deployment.v1beta3.QueryGroupResponse" as const, - encode( - message: QueryGroupResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryGroupResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.group !== undefined) { Group.encode(message.group, writer.uint32(10).fork()).ldelim(); } @@ -530,27 +418,21 @@ export const QueryGroupResponse = { fromJSON(object: any): QueryGroupResponse { return { $type: QueryGroupResponse.$type, - group: isSet(object.group) ? Group.fromJSON(object.group) : undefined, + group: isSet(object.group) ? Group.fromJSON(object.group) : undefined }; }, toJSON(message: QueryGroupResponse): unknown { const obj: any = {}; - message.group !== undefined && - (obj.group = message.group ? Group.toJSON(message.group) : undefined); + message.group !== undefined && (obj.group = message.group ? Group.toJSON(message.group) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryGroupResponse { + fromPartial, I>>(object: I): QueryGroupResponse { const message = createBaseQueryGroupResponse(); - message.group = - object.group !== undefined && object.group !== null - ? Group.fromPartial(object.group) - : undefined; + message.group = object.group !== undefined && object.group !== null ? Group.fromPartial(object.group) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryGroupResponse.$type, QueryGroupResponse); @@ -558,9 +440,7 @@ messageTypeRegistry.set(QueryGroupResponse.$type, QueryGroupResponse); /** Query defines the gRPC querier service */ export interface Query { /** Deployments queries deployments */ - Deployments( - request: QueryDeploymentsRequest - ): Promise; + Deployments(request: QueryDeploymentsRequest): Promise; /** Deployment queries deployment details */ Deployment(request: QueryDeploymentRequest): Promise; /** Group queries group details */ @@ -575,83 +455,47 @@ export class QueryClientImpl implements Query { this.Deployment = this.Deployment.bind(this); this.Group = this.Group.bind(this); } - Deployments( - request: QueryDeploymentsRequest - ): Promise { + Deployments(request: QueryDeploymentsRequest): Promise { const data = QueryDeploymentsRequest.encode(request).finish(); - const promise = this.rpc.request( - "akash.deployment.v1beta3.Query", - "Deployments", - data - ); - return promise.then((data) => - QueryDeploymentsResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.deployment.v1beta3.Query", "Deployments", data); + return promise.then(data => QueryDeploymentsResponse.decode(new _m0.Reader(data))); } - Deployment( - request: QueryDeploymentRequest - ): Promise { + Deployment(request: QueryDeploymentRequest): Promise { const data = QueryDeploymentRequest.encode(request).finish(); - const promise = this.rpc.request( - "akash.deployment.v1beta3.Query", - "Deployment", - data - ); - return promise.then((data) => - QueryDeploymentResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.deployment.v1beta3.Query", "Deployment", data); + return promise.then(data => QueryDeploymentResponse.decode(new _m0.Reader(data))); } Group(request: QueryGroupRequest): Promise { const data = QueryGroupRequest.encode(request).finish(); - const promise = this.rpc.request( - "akash.deployment.v1beta3.Query", - "Group", - data - ); - return promise.then((data) => - QueryGroupResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.deployment.v1beta3.Query", "Group", data); + return promise.then(data => QueryGroupResponse.decode(new _m0.Reader(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/deployment/v1beta3/resource.ts b/src/protobuf/akash/deployment/v1beta3/resource.ts index e1b4bd2..2ac9d38 100644 --- a/src/protobuf/akash/deployment/v1beta3/resource.ts +++ b/src/protobuf/akash/deployment/v1beta3/resource.ts @@ -20,22 +20,16 @@ function createBaseResource(): Resource { $type: "akash.deployment.v1beta3.Resource", resources: undefined, count: 0, - price: undefined, + price: undefined }; } export const Resource = { $type: "akash.deployment.v1beta3.Resource" as const, - encode( - message: Resource, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Resource, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.resources !== undefined) { - ResourceUnits.encode( - message.resources, - writer.uint32(10).fork() - ).ldelim(); + ResourceUnits.encode(message.resources, writer.uint32(10).fork()).ldelim(); } if (message.count !== 0) { writer.uint32(16).uint32(message.count); @@ -73,71 +67,49 @@ export const Resource = { fromJSON(object: any): Resource { return { $type: Resource.$type, - resources: isSet(object.resources) - ? ResourceUnits.fromJSON(object.resources) - : undefined, + resources: isSet(object.resources) ? ResourceUnits.fromJSON(object.resources) : undefined, count: isSet(object.count) ? Number(object.count) : 0, - price: isSet(object.price) ? DecCoin.fromJSON(object.price) : undefined, + price: isSet(object.price) ? DecCoin.fromJSON(object.price) : undefined }; }, toJSON(message: Resource): unknown { const obj: any = {}; - message.resources !== undefined && - (obj.resources = message.resources - ? ResourceUnits.toJSON(message.resources) - : undefined); + message.resources !== undefined && (obj.resources = message.resources ? ResourceUnits.toJSON(message.resources) : undefined); message.count !== undefined && (obj.count = Math.round(message.count)); - message.price !== undefined && - (obj.price = message.price ? DecCoin.toJSON(message.price) : undefined); + message.price !== undefined && (obj.price = message.price ? DecCoin.toJSON(message.price) : undefined); return obj; }, fromPartial, I>>(object: I): Resource { const message = createBaseResource(); - message.resources = - object.resources !== undefined && object.resources !== null - ? ResourceUnits.fromPartial(object.resources) - : undefined; + message.resources = object.resources !== undefined && object.resources !== null ? ResourceUnits.fromPartial(object.resources) : undefined; message.count = object.count ?? 0; - message.price = - object.price !== undefined && object.price !== null - ? DecCoin.fromPartial(object.price) - : undefined; + message.price = object.price !== undefined && object.price !== null ? DecCoin.fromPartial(object.price) : undefined; return message; - }, + } }; messageTypeRegistry.set(Resource.$type, Resource); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/deployment/v1beta3/resourceunit.ts b/src/protobuf/akash/deployment/v1beta3/resourceunit.ts index 3da5561..d12bed3 100644 --- a/src/protobuf/akash/deployment/v1beta3/resourceunit.ts +++ b/src/protobuf/akash/deployment/v1beta3/resourceunit.ts @@ -20,17 +20,14 @@ function createBaseResourceUnit(): ResourceUnit { $type: "akash.deployment.v1beta3.ResourceUnit", resource: undefined, count: 0, - price: undefined, + price: undefined }; } export const ResourceUnit = { $type: "akash.deployment.v1beta3.ResourceUnit" as const, - encode( - message: ResourceUnit, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: ResourceUnit, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.resource !== undefined) { Resources.encode(message.resource, writer.uint32(10).fork()).ldelim(); } @@ -70,73 +67,49 @@ export const ResourceUnit = { fromJSON(object: any): ResourceUnit { return { $type: ResourceUnit.$type, - resource: isSet(object.resource) - ? Resources.fromJSON(object.resource) - : undefined, + resource: isSet(object.resource) ? Resources.fromJSON(object.resource) : undefined, count: isSet(object.count) ? Number(object.count) : 0, - price: isSet(object.price) ? DecCoin.fromJSON(object.price) : undefined, + price: isSet(object.price) ? DecCoin.fromJSON(object.price) : undefined }; }, toJSON(message: ResourceUnit): unknown { const obj: any = {}; - message.resource !== undefined && - (obj.resource = message.resource - ? Resources.toJSON(message.resource) - : undefined); + message.resource !== undefined && (obj.resource = message.resource ? Resources.toJSON(message.resource) : undefined); message.count !== undefined && (obj.count = Math.round(message.count)); - message.price !== undefined && - (obj.price = message.price ? DecCoin.toJSON(message.price) : undefined); + message.price !== undefined && (obj.price = message.price ? DecCoin.toJSON(message.price) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): ResourceUnit { + fromPartial, I>>(object: I): ResourceUnit { const message = createBaseResourceUnit(); - message.resource = - object.resource !== undefined && object.resource !== null - ? Resources.fromPartial(object.resource) - : undefined; + message.resource = object.resource !== undefined && object.resource !== null ? Resources.fromPartial(object.resource) : undefined; message.count = object.count ?? 0; - message.price = - object.price !== undefined && object.price !== null - ? DecCoin.fromPartial(object.price) - : undefined; + message.price = object.price !== undefined && object.price !== null ? DecCoin.fromPartial(object.price) : undefined; return message; - }, + } }; messageTypeRegistry.set(ResourceUnit.$type, ResourceUnit); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/deployment/v1beta3/service.ts b/src/protobuf/akash/deployment/v1beta3/service.ts index 5f3f20d..11b4e2b 100644 --- a/src/protobuf/akash/deployment/v1beta3/service.ts +++ b/src/protobuf/akash/deployment/v1beta3/service.ts @@ -7,16 +7,9 @@ import { MsgCreateDeployment, MsgDepositDeployment, MsgUpdateDeployment, - MsgCloseDeployment, + MsgCloseDeployment } from "./deploymentmsg"; -import { - MsgCloseGroupResponse, - MsgPauseGroupResponse, - MsgStartGroupResponse, - MsgCloseGroup, - MsgPauseGroup, - MsgStartGroup, -} from "./groupmsg"; +import { MsgCloseGroupResponse, MsgPauseGroupResponse, MsgStartGroupResponse, MsgCloseGroup, MsgPauseGroup, MsgStartGroup } from "./groupmsg"; import * as _m0 from "protobufjs/minimal"; export const protobufPackage = "akash.deployment.v1beta3"; @@ -24,21 +17,13 @@ export const protobufPackage = "akash.deployment.v1beta3"; /** Msg defines the deployment Msg service. */ export interface Msg { /** CreateDeployment defines a method to create new deployment given proper inputs. */ - CreateDeployment( - request: MsgCreateDeployment - ): Promise; + CreateDeployment(request: MsgCreateDeployment): Promise; /** DepositDeployment deposits more funds into the deployment account */ - DepositDeployment( - request: MsgDepositDeployment - ): Promise; + DepositDeployment(request: MsgDepositDeployment): Promise; /** UpdateDeployment defines a method to update a deployment given proper inputs. */ - UpdateDeployment( - request: MsgUpdateDeployment - ): Promise; + UpdateDeployment(request: MsgUpdateDeployment): Promise; /** CloseDeployment defines a method to close a deployment given proper inputs. */ - CloseDeployment( - request: MsgCloseDeployment - ): Promise; + CloseDeployment(request: MsgCloseDeployment): Promise; /** CloseGroup defines a method to close a group of a deployment given proper inputs. */ CloseGroup(request: MsgCloseGroup): Promise; /** PauseGroup defines a method to close a group of a deployment given proper inputs. */ @@ -59,103 +44,49 @@ export class MsgClientImpl implements Msg { this.PauseGroup = this.PauseGroup.bind(this); this.StartGroup = this.StartGroup.bind(this); } - CreateDeployment( - request: MsgCreateDeployment - ): Promise { + CreateDeployment(request: MsgCreateDeployment): Promise { const data = MsgCreateDeployment.encode(request).finish(); - const promise = this.rpc.request( - "akash.deployment.v1beta3.Msg", - "CreateDeployment", - data - ); - return promise.then((data) => - MsgCreateDeploymentResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.deployment.v1beta3.Msg", "CreateDeployment", data); + return promise.then(data => MsgCreateDeploymentResponse.decode(new _m0.Reader(data))); } - DepositDeployment( - request: MsgDepositDeployment - ): Promise { + DepositDeployment(request: MsgDepositDeployment): Promise { const data = MsgDepositDeployment.encode(request).finish(); - const promise = this.rpc.request( - "akash.deployment.v1beta3.Msg", - "DepositDeployment", - data - ); - return promise.then((data) => - MsgDepositDeploymentResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.deployment.v1beta3.Msg", "DepositDeployment", data); + return promise.then(data => MsgDepositDeploymentResponse.decode(new _m0.Reader(data))); } - UpdateDeployment( - request: MsgUpdateDeployment - ): Promise { + UpdateDeployment(request: MsgUpdateDeployment): Promise { const data = MsgUpdateDeployment.encode(request).finish(); - const promise = this.rpc.request( - "akash.deployment.v1beta3.Msg", - "UpdateDeployment", - data - ); - return promise.then((data) => - MsgUpdateDeploymentResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.deployment.v1beta3.Msg", "UpdateDeployment", data); + return promise.then(data => MsgUpdateDeploymentResponse.decode(new _m0.Reader(data))); } - CloseDeployment( - request: MsgCloseDeployment - ): Promise { + CloseDeployment(request: MsgCloseDeployment): Promise { const data = MsgCloseDeployment.encode(request).finish(); - const promise = this.rpc.request( - "akash.deployment.v1beta3.Msg", - "CloseDeployment", - data - ); - return promise.then((data) => - MsgCloseDeploymentResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.deployment.v1beta3.Msg", "CloseDeployment", data); + return promise.then(data => MsgCloseDeploymentResponse.decode(new _m0.Reader(data))); } CloseGroup(request: MsgCloseGroup): Promise { const data = MsgCloseGroup.encode(request).finish(); - const promise = this.rpc.request( - "akash.deployment.v1beta3.Msg", - "CloseGroup", - data - ); - return promise.then((data) => - MsgCloseGroupResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.deployment.v1beta3.Msg", "CloseGroup", data); + return promise.then(data => MsgCloseGroupResponse.decode(new _m0.Reader(data))); } PauseGroup(request: MsgPauseGroup): Promise { const data = MsgPauseGroup.encode(request).finish(); - const promise = this.rpc.request( - "akash.deployment.v1beta3.Msg", - "PauseGroup", - data - ); - return promise.then((data) => - MsgPauseGroupResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.deployment.v1beta3.Msg", "PauseGroup", data); + return promise.then(data => MsgPauseGroupResponse.decode(new _m0.Reader(data))); } StartGroup(request: MsgStartGroup): Promise { const data = MsgStartGroup.encode(request).finish(); - const promise = this.rpc.request( - "akash.deployment.v1beta3.Msg", - "StartGroup", - data - ); - return promise.then((data) => - MsgStartGroupResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.deployment.v1beta3.Msg", "StartGroup", data); + return promise.then(data => MsgStartGroupResponse.decode(new _m0.Reader(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } diff --git a/src/protobuf/akash/escrow/v1beta1/genesis.ts b/src/protobuf/akash/escrow/v1beta1/genesis.ts index 272f6b6..22d5539 100644 --- a/src/protobuf/akash/escrow/v1beta1/genesis.ts +++ b/src/protobuf/akash/escrow/v1beta1/genesis.ts @@ -17,17 +17,14 @@ function createBaseGenesisState(): GenesisState { return { $type: "akash.escrow.v1beta1.GenesisState", accounts: [], - payments: [], + payments: [] }; } export const GenesisState = { $type: "akash.escrow.v1beta1.GenesisState" as const, - encode( - message: GenesisState, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: GenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.accounts) { Account.encode(v!, writer.uint32(10).fork()).ldelim(); } @@ -61,76 +58,54 @@ export const GenesisState = { fromJSON(object: any): GenesisState { return { $type: GenesisState.$type, - accounts: Array.isArray(object?.accounts) - ? object.accounts.map((e: any) => Account.fromJSON(e)) - : [], - payments: Array.isArray(object?.payments) - ? object.payments.map((e: any) => Payment.fromJSON(e)) - : [], + accounts: Array.isArray(object?.accounts) ? object.accounts.map((e: any) => Account.fromJSON(e)) : [], + payments: Array.isArray(object?.payments) ? object.payments.map((e: any) => Payment.fromJSON(e)) : [] }; }, toJSON(message: GenesisState): unknown { const obj: any = {}; if (message.accounts) { - obj.accounts = message.accounts.map((e) => - e ? Account.toJSON(e) : undefined - ); + obj.accounts = message.accounts.map(e => (e ? Account.toJSON(e) : undefined)); } else { obj.accounts = []; } if (message.payments) { - obj.payments = message.payments.map((e) => - e ? Payment.toJSON(e) : undefined - ); + obj.payments = message.payments.map(e => (e ? Payment.toJSON(e) : undefined)); } else { obj.payments = []; } return obj; }, - fromPartial, I>>( - object: I - ): GenesisState { + fromPartial, I>>(object: I): GenesisState { const message = createBaseGenesisState(); - message.accounts = - object.accounts?.map((e) => Account.fromPartial(e)) || []; - message.payments = - object.payments?.map((e) => Payment.fromPartial(e)) || []; + message.accounts = object.accounts?.map(e => Account.fromPartial(e)) || []; + message.payments = object.payments?.map(e => Payment.fromPartial(e)) || []; return message; - }, + } }; messageTypeRegistry.set(GenesisState.$type, GenesisState); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/escrow/v1beta1/query.ts b/src/protobuf/akash/escrow/v1beta1/query.ts index 84fb950..fe462f5 100644 --- a/src/protobuf/akash/escrow/v1beta1/query.ts +++ b/src/protobuf/akash/escrow/v1beta1/query.ts @@ -1,10 +1,7 @@ /* eslint-disable */ import { messageTypeRegistry } from "../../../typeRegistry"; import Long from "long"; -import { - PageRequest, - PageResponse, -} from "../../../cosmos/base/query/v1beta1/pagination"; +import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; import { Account, Payment } from "./types"; import * as _m0 from "protobufjs/minimal"; @@ -52,17 +49,14 @@ function createBaseQueryAccountsRequest(): QueryAccountsRequest { xid: "", owner: "", state: "", - pagination: undefined, + pagination: undefined }; } export const QueryAccountsRequest = { $type: "akash.escrow.v1beta1.QueryAccountsRequest" as const, - encode( - message: QueryAccountsRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryAccountsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.scope !== "") { writer.uint32(10).string(message.scope); } @@ -81,10 +75,7 @@ export const QueryAccountsRequest = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryAccountsRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryAccountsRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryAccountsRequest(); @@ -121,9 +112,7 @@ export const QueryAccountsRequest = { xid: isSet(object.xid) ? String(object.xid) : "", owner: isSet(object.owner) ? String(object.owner) : "", state: isSet(object.state) ? String(object.state) : "", - pagination: isSet(object.pagination) - ? PageRequest.fromJSON(object.pagination) - : undefined, + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined }; }, @@ -133,27 +122,19 @@ export const QueryAccountsRequest = { message.xid !== undefined && (obj.xid = message.xid); message.owner !== undefined && (obj.owner = message.owner); message.state !== undefined && (obj.state = message.state); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryAccountsRequest { + fromPartial, I>>(object: I): QueryAccountsRequest { const message = createBaseQueryAccountsRequest(); message.scope = object.scope ?? ""; message.xid = object.xid ?? ""; message.owner = object.owner ?? ""; message.state = object.state ?? ""; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryAccountsRequest.$type, QueryAccountsRequest); @@ -162,33 +143,24 @@ function createBaseQueryAccountsResponse(): QueryAccountsResponse { return { $type: "akash.escrow.v1beta1.QueryAccountsResponse", accounts: [], - pagination: undefined, + pagination: undefined }; } export const QueryAccountsResponse = { $type: "akash.escrow.v1beta1.QueryAccountsResponse" as const, - encode( - message: QueryAccountsResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryAccountsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.accounts) { Account.encode(v!, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); + PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryAccountsResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryAccountsResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryAccountsResponse(); @@ -212,43 +184,28 @@ export const QueryAccountsResponse = { fromJSON(object: any): QueryAccountsResponse { return { $type: QueryAccountsResponse.$type, - accounts: Array.isArray(object?.accounts) - ? object.accounts.map((e: any) => Account.fromJSON(e)) - : [], - pagination: isSet(object.pagination) - ? PageResponse.fromJSON(object.pagination) - : undefined, + accounts: Array.isArray(object?.accounts) ? object.accounts.map((e: any) => Account.fromJSON(e)) : [], + pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined }; }, toJSON(message: QueryAccountsResponse): unknown { const obj: any = {}; if (message.accounts) { - obj.accounts = message.accounts.map((e) => - e ? Account.toJSON(e) : undefined - ); + obj.accounts = message.accounts.map(e => (e ? Account.toJSON(e) : undefined)); } else { obj.accounts = []; } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryAccountsResponse { + fromPartial, I>>(object: I): QueryAccountsResponse { const message = createBaseQueryAccountsResponse(); - message.accounts = - object.accounts?.map((e) => Account.fromPartial(e)) || []; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageResponse.fromPartial(object.pagination) - : undefined; + message.accounts = object.accounts?.map(e => Account.fromPartial(e)) || []; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryAccountsResponse.$type, QueryAccountsResponse); @@ -261,17 +218,14 @@ function createBaseQueryPaymentsRequest(): QueryPaymentsRequest { id: "", owner: "", state: "", - pagination: undefined, + pagination: undefined }; } export const QueryPaymentsRequest = { $type: "akash.escrow.v1beta1.QueryPaymentsRequest" as const, - encode( - message: QueryPaymentsRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryPaymentsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.scope !== "") { writer.uint32(10).string(message.scope); } @@ -293,10 +247,7 @@ export const QueryPaymentsRequest = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryPaymentsRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryPaymentsRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryPaymentsRequest(); @@ -337,9 +288,7 @@ export const QueryPaymentsRequest = { id: isSet(object.id) ? String(object.id) : "", owner: isSet(object.owner) ? String(object.owner) : "", state: isSet(object.state) ? String(object.state) : "", - pagination: isSet(object.pagination) - ? PageRequest.fromJSON(object.pagination) - : undefined, + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined }; }, @@ -350,28 +299,20 @@ export const QueryPaymentsRequest = { message.id !== undefined && (obj.id = message.id); message.owner !== undefined && (obj.owner = message.owner); message.state !== undefined && (obj.state = message.state); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryPaymentsRequest { + fromPartial, I>>(object: I): QueryPaymentsRequest { const message = createBaseQueryPaymentsRequest(); message.scope = object.scope ?? ""; message.xid = object.xid ?? ""; message.id = object.id ?? ""; message.owner = object.owner ?? ""; message.state = object.state ?? ""; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryPaymentsRequest.$type, QueryPaymentsRequest); @@ -380,33 +321,24 @@ function createBaseQueryPaymentsResponse(): QueryPaymentsResponse { return { $type: "akash.escrow.v1beta1.QueryPaymentsResponse", payments: [], - pagination: undefined, + pagination: undefined }; } export const QueryPaymentsResponse = { $type: "akash.escrow.v1beta1.QueryPaymentsResponse" as const, - encode( - message: QueryPaymentsResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryPaymentsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.payments) { Payment.encode(v!, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); + PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryPaymentsResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryPaymentsResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryPaymentsResponse(); @@ -430,43 +362,28 @@ export const QueryPaymentsResponse = { fromJSON(object: any): QueryPaymentsResponse { return { $type: QueryPaymentsResponse.$type, - payments: Array.isArray(object?.payments) - ? object.payments.map((e: any) => Payment.fromJSON(e)) - : [], - pagination: isSet(object.pagination) - ? PageResponse.fromJSON(object.pagination) - : undefined, + payments: Array.isArray(object?.payments) ? object.payments.map((e: any) => Payment.fromJSON(e)) : [], + pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined }; }, toJSON(message: QueryPaymentsResponse): unknown { const obj: any = {}; if (message.payments) { - obj.payments = message.payments.map((e) => - e ? Payment.toJSON(e) : undefined - ); + obj.payments = message.payments.map(e => (e ? Payment.toJSON(e) : undefined)); } else { obj.payments = []; } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryPaymentsResponse { + fromPartial, I>>(object: I): QueryPaymentsResponse { const message = createBaseQueryPaymentsResponse(); - message.payments = - object.payments?.map((e) => Payment.fromPartial(e)) || []; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageResponse.fromPartial(object.pagination) - : undefined; + message.payments = object.payments?.map(e => Payment.fromPartial(e)) || []; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryPaymentsResponse.$type, QueryPaymentsResponse); @@ -496,65 +413,39 @@ export class QueryClientImpl implements Query { } Accounts(request: QueryAccountsRequest): Promise { const data = QueryAccountsRequest.encode(request).finish(); - const promise = this.rpc.request( - "akash.escrow.v1beta1.Query", - "Accounts", - data - ); - return promise.then((data) => - QueryAccountsResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.escrow.v1beta1.Query", "Accounts", data); + return promise.then(data => QueryAccountsResponse.decode(new _m0.Reader(data))); } Payments(request: QueryPaymentsRequest): Promise { const data = QueryPaymentsRequest.encode(request).finish(); - const promise = this.rpc.request( - "akash.escrow.v1beta1.Query", - "Payments", - data - ); - return promise.then((data) => - QueryPaymentsResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.escrow.v1beta1.Query", "Payments", data); + return promise.then(data => QueryPaymentsResponse.decode(new _m0.Reader(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/escrow/v1beta1/types.ts b/src/protobuf/akash/escrow/v1beta1/types.ts index fd02bf6..97b7c4c 100644 --- a/src/protobuf/akash/escrow/v1beta1/types.ts +++ b/src/protobuf/akash/escrow/v1beta1/types.ts @@ -40,7 +40,7 @@ export enum Account_State { closed = 2, /** overdrawn - AccountOverdrawn is the state when an account is overdrawn */ overdrawn = 3, - UNRECOGNIZED = -1, + UNRECOGNIZED = -1 } export function account_StateFromJSON(object: any): Account_State { @@ -102,7 +102,7 @@ export enum Payment_State { closed = 2, /** overdrawn - PaymentStateOverdrawn is the state when the payment is overdrawn */ overdrawn = 3, - UNRECOGNIZED = -1, + UNRECOGNIZED = -1 } export function payment_StateFromJSON(object: any): Payment_State { @@ -149,10 +149,7 @@ function createBaseAccountID(): AccountID { export const AccountID = { $type: "akash.escrow.v1beta1.AccountID" as const, - encode( - message: AccountID, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: AccountID, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.scope !== "") { writer.uint32(10).string(message.scope); } @@ -187,7 +184,7 @@ export const AccountID = { return { $type: AccountID.$type, scope: isSet(object.scope) ? String(object.scope) : "", - xid: isSet(object.xid) ? String(object.xid) : "", + xid: isSet(object.xid) ? String(object.xid) : "" }; }, @@ -198,14 +195,12 @@ export const AccountID = { return obj; }, - fromPartial, I>>( - object: I - ): AccountID { + fromPartial, I>>(object: I): AccountID { const message = createBaseAccountID(); message.scope = object.scope ?? ""; message.xid = object.xid ?? ""; return message; - }, + } }; messageTypeRegistry.set(AccountID.$type, AccountID); @@ -218,17 +213,14 @@ function createBaseAccount(): Account { state: 0, balance: undefined, transferred: undefined, - settledAt: Long.ZERO, + settledAt: Long.ZERO }; } export const Account = { $type: "akash.escrow.v1beta1.Account" as const, - encode( - message: Account, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Account, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { AccountID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -289,60 +281,33 @@ export const Account = { id: isSet(object.id) ? AccountID.fromJSON(object.id) : undefined, owner: isSet(object.owner) ? String(object.owner) : "", state: isSet(object.state) ? account_StateFromJSON(object.state) : 0, - balance: isSet(object.balance) - ? Coin.fromJSON(object.balance) - : undefined, - transferred: isSet(object.transferred) - ? Coin.fromJSON(object.transferred) - : undefined, - settledAt: isSet(object.settledAt) - ? Long.fromValue(object.settledAt) - : Long.ZERO, + balance: isSet(object.balance) ? Coin.fromJSON(object.balance) : undefined, + transferred: isSet(object.transferred) ? Coin.fromJSON(object.transferred) : undefined, + settledAt: isSet(object.settledAt) ? Long.fromValue(object.settledAt) : Long.ZERO }; }, toJSON(message: Account): unknown { const obj: any = {}; - message.id !== undefined && - (obj.id = message.id ? AccountID.toJSON(message.id) : undefined); + message.id !== undefined && (obj.id = message.id ? AccountID.toJSON(message.id) : undefined); message.owner !== undefined && (obj.owner = message.owner); - message.state !== undefined && - (obj.state = account_StateToJSON(message.state)); - message.balance !== undefined && - (obj.balance = message.balance - ? Coin.toJSON(message.balance) - : undefined); - message.transferred !== undefined && - (obj.transferred = message.transferred - ? Coin.toJSON(message.transferred) - : undefined); - message.settledAt !== undefined && - (obj.settledAt = (message.settledAt || Long.ZERO).toString()); + message.state !== undefined && (obj.state = account_StateToJSON(message.state)); + message.balance !== undefined && (obj.balance = message.balance ? Coin.toJSON(message.balance) : undefined); + message.transferred !== undefined && (obj.transferred = message.transferred ? Coin.toJSON(message.transferred) : undefined); + message.settledAt !== undefined && (obj.settledAt = (message.settledAt || Long.ZERO).toString()); return obj; }, fromPartial, I>>(object: I): Account { const message = createBaseAccount(); - message.id = - object.id !== undefined && object.id !== null - ? AccountID.fromPartial(object.id) - : undefined; + message.id = object.id !== undefined && object.id !== null ? AccountID.fromPartial(object.id) : undefined; message.owner = object.owner ?? ""; message.state = object.state ?? 0; - message.balance = - object.balance !== undefined && object.balance !== null - ? Coin.fromPartial(object.balance) - : undefined; - message.transferred = - object.transferred !== undefined && object.transferred !== null - ? Coin.fromPartial(object.transferred) - : undefined; - message.settledAt = - object.settledAt !== undefined && object.settledAt !== null - ? Long.fromValue(object.settledAt) - : Long.ZERO; + message.balance = object.balance !== undefined && object.balance !== null ? Coin.fromPartial(object.balance) : undefined; + message.transferred = object.transferred !== undefined && object.transferred !== null ? Coin.fromPartial(object.transferred) : undefined; + message.settledAt = object.settledAt !== undefined && object.settledAt !== null ? Long.fromValue(object.settledAt) : Long.ZERO; return message; - }, + } }; messageTypeRegistry.set(Account.$type, Account); @@ -356,17 +321,14 @@ function createBasePayment(): Payment { state: 0, rate: undefined, balance: undefined, - withdrawn: undefined, + withdrawn: undefined }; } export const Payment = { $type: "akash.escrow.v1beta1.Payment" as const, - encode( - message: Payment, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Payment, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.accountId !== undefined) { AccountID.encode(message.accountId, writer.uint32(10).fork()).ldelim(); } @@ -430,100 +392,61 @@ export const Payment = { fromJSON(object: any): Payment { return { $type: Payment.$type, - accountId: isSet(object.accountId) - ? AccountID.fromJSON(object.accountId) - : undefined, + accountId: isSet(object.accountId) ? AccountID.fromJSON(object.accountId) : undefined, paymentId: isSet(object.paymentId) ? String(object.paymentId) : "", owner: isSet(object.owner) ? String(object.owner) : "", state: isSet(object.state) ? payment_StateFromJSON(object.state) : 0, rate: isSet(object.rate) ? Coin.fromJSON(object.rate) : undefined, - balance: isSet(object.balance) - ? Coin.fromJSON(object.balance) - : undefined, - withdrawn: isSet(object.withdrawn) - ? Coin.fromJSON(object.withdrawn) - : undefined, + balance: isSet(object.balance) ? Coin.fromJSON(object.balance) : undefined, + withdrawn: isSet(object.withdrawn) ? Coin.fromJSON(object.withdrawn) : undefined }; }, toJSON(message: Payment): unknown { const obj: any = {}; - message.accountId !== undefined && - (obj.accountId = message.accountId - ? AccountID.toJSON(message.accountId) - : undefined); + message.accountId !== undefined && (obj.accountId = message.accountId ? AccountID.toJSON(message.accountId) : undefined); message.paymentId !== undefined && (obj.paymentId = message.paymentId); message.owner !== undefined && (obj.owner = message.owner); - message.state !== undefined && - (obj.state = payment_StateToJSON(message.state)); - message.rate !== undefined && - (obj.rate = message.rate ? Coin.toJSON(message.rate) : undefined); - message.balance !== undefined && - (obj.balance = message.balance - ? Coin.toJSON(message.balance) - : undefined); - message.withdrawn !== undefined && - (obj.withdrawn = message.withdrawn - ? Coin.toJSON(message.withdrawn) - : undefined); + message.state !== undefined && (obj.state = payment_StateToJSON(message.state)); + message.rate !== undefined && (obj.rate = message.rate ? Coin.toJSON(message.rate) : undefined); + message.balance !== undefined && (obj.balance = message.balance ? Coin.toJSON(message.balance) : undefined); + message.withdrawn !== undefined && (obj.withdrawn = message.withdrawn ? Coin.toJSON(message.withdrawn) : undefined); return obj; }, fromPartial, I>>(object: I): Payment { const message = createBasePayment(); - message.accountId = - object.accountId !== undefined && object.accountId !== null - ? AccountID.fromPartial(object.accountId) - : undefined; + message.accountId = object.accountId !== undefined && object.accountId !== null ? AccountID.fromPartial(object.accountId) : undefined; message.paymentId = object.paymentId ?? ""; message.owner = object.owner ?? ""; message.state = object.state ?? 0; - message.rate = - object.rate !== undefined && object.rate !== null - ? Coin.fromPartial(object.rate) - : undefined; - message.balance = - object.balance !== undefined && object.balance !== null - ? Coin.fromPartial(object.balance) - : undefined; - message.withdrawn = - object.withdrawn !== undefined && object.withdrawn !== null - ? Coin.fromPartial(object.withdrawn) - : undefined; + message.rate = object.rate !== undefined && object.rate !== null ? Coin.fromPartial(object.rate) : undefined; + message.balance = object.balance !== undefined && object.balance !== null ? Coin.fromPartial(object.balance) : undefined; + message.withdrawn = object.withdrawn !== undefined && object.withdrawn !== null ? Coin.fromPartial(object.withdrawn) : undefined; return message; - }, + } }; messageTypeRegistry.set(Payment.$type, Payment); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/escrow/v1beta2/genesis.ts b/src/protobuf/akash/escrow/v1beta2/genesis.ts index dd030d1..a83ce61 100644 --- a/src/protobuf/akash/escrow/v1beta2/genesis.ts +++ b/src/protobuf/akash/escrow/v1beta2/genesis.ts @@ -17,17 +17,14 @@ function createBaseGenesisState(): GenesisState { return { $type: "akash.escrow.v1beta2.GenesisState", accounts: [], - payments: [], + payments: [] }; } export const GenesisState = { $type: "akash.escrow.v1beta2.GenesisState" as const, - encode( - message: GenesisState, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: GenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.accounts) { Account.encode(v!, writer.uint32(10).fork()).ldelim(); } @@ -48,9 +45,7 @@ export const GenesisState = { message.accounts.push(Account.decode(reader, reader.uint32())); break; case 2: - message.payments.push( - FractionalPayment.decode(reader, reader.uint32()) - ); + message.payments.push(FractionalPayment.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -63,76 +58,54 @@ export const GenesisState = { fromJSON(object: any): GenesisState { return { $type: GenesisState.$type, - accounts: Array.isArray(object?.accounts) - ? object.accounts.map((e: any) => Account.fromJSON(e)) - : [], - payments: Array.isArray(object?.payments) - ? object.payments.map((e: any) => FractionalPayment.fromJSON(e)) - : [], + accounts: Array.isArray(object?.accounts) ? object.accounts.map((e: any) => Account.fromJSON(e)) : [], + payments: Array.isArray(object?.payments) ? object.payments.map((e: any) => FractionalPayment.fromJSON(e)) : [] }; }, toJSON(message: GenesisState): unknown { const obj: any = {}; if (message.accounts) { - obj.accounts = message.accounts.map((e) => - e ? Account.toJSON(e) : undefined - ); + obj.accounts = message.accounts.map(e => (e ? Account.toJSON(e) : undefined)); } else { obj.accounts = []; } if (message.payments) { - obj.payments = message.payments.map((e) => - e ? FractionalPayment.toJSON(e) : undefined - ); + obj.payments = message.payments.map(e => (e ? FractionalPayment.toJSON(e) : undefined)); } else { obj.payments = []; } return obj; }, - fromPartial, I>>( - object: I - ): GenesisState { + fromPartial, I>>(object: I): GenesisState { const message = createBaseGenesisState(); - message.accounts = - object.accounts?.map((e) => Account.fromPartial(e)) || []; - message.payments = - object.payments?.map((e) => FractionalPayment.fromPartial(e)) || []; + message.accounts = object.accounts?.map(e => Account.fromPartial(e)) || []; + message.payments = object.payments?.map(e => FractionalPayment.fromPartial(e)) || []; return message; - }, + } }; messageTypeRegistry.set(GenesisState.$type, GenesisState); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/escrow/v1beta2/query.ts b/src/protobuf/akash/escrow/v1beta2/query.ts index 6ea08c6..efe9df0 100644 --- a/src/protobuf/akash/escrow/v1beta2/query.ts +++ b/src/protobuf/akash/escrow/v1beta2/query.ts @@ -1,10 +1,7 @@ /* eslint-disable */ import { messageTypeRegistry } from "../../../typeRegistry"; import Long from "long"; -import { - PageRequest, - PageResponse, -} from "../../../cosmos/base/query/v1beta1/pagination"; +import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; import { Account, FractionalPayment } from "./types"; import * as _m0 from "protobufjs/minimal"; @@ -52,17 +49,14 @@ function createBaseQueryAccountsRequest(): QueryAccountsRequest { xid: "", owner: "", state: "", - pagination: undefined, + pagination: undefined }; } export const QueryAccountsRequest = { $type: "akash.escrow.v1beta2.QueryAccountsRequest" as const, - encode( - message: QueryAccountsRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryAccountsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.scope !== "") { writer.uint32(10).string(message.scope); } @@ -81,10 +75,7 @@ export const QueryAccountsRequest = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryAccountsRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryAccountsRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryAccountsRequest(); @@ -121,9 +112,7 @@ export const QueryAccountsRequest = { xid: isSet(object.xid) ? String(object.xid) : "", owner: isSet(object.owner) ? String(object.owner) : "", state: isSet(object.state) ? String(object.state) : "", - pagination: isSet(object.pagination) - ? PageRequest.fromJSON(object.pagination) - : undefined, + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined }; }, @@ -133,27 +122,19 @@ export const QueryAccountsRequest = { message.xid !== undefined && (obj.xid = message.xid); message.owner !== undefined && (obj.owner = message.owner); message.state !== undefined && (obj.state = message.state); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryAccountsRequest { + fromPartial, I>>(object: I): QueryAccountsRequest { const message = createBaseQueryAccountsRequest(); message.scope = object.scope ?? ""; message.xid = object.xid ?? ""; message.owner = object.owner ?? ""; message.state = object.state ?? ""; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryAccountsRequest.$type, QueryAccountsRequest); @@ -162,33 +143,24 @@ function createBaseQueryAccountsResponse(): QueryAccountsResponse { return { $type: "akash.escrow.v1beta2.QueryAccountsResponse", accounts: [], - pagination: undefined, + pagination: undefined }; } export const QueryAccountsResponse = { $type: "akash.escrow.v1beta2.QueryAccountsResponse" as const, - encode( - message: QueryAccountsResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryAccountsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.accounts) { Account.encode(v!, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); + PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryAccountsResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryAccountsResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryAccountsResponse(); @@ -212,43 +184,28 @@ export const QueryAccountsResponse = { fromJSON(object: any): QueryAccountsResponse { return { $type: QueryAccountsResponse.$type, - accounts: Array.isArray(object?.accounts) - ? object.accounts.map((e: any) => Account.fromJSON(e)) - : [], - pagination: isSet(object.pagination) - ? PageResponse.fromJSON(object.pagination) - : undefined, + accounts: Array.isArray(object?.accounts) ? object.accounts.map((e: any) => Account.fromJSON(e)) : [], + pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined }; }, toJSON(message: QueryAccountsResponse): unknown { const obj: any = {}; if (message.accounts) { - obj.accounts = message.accounts.map((e) => - e ? Account.toJSON(e) : undefined - ); + obj.accounts = message.accounts.map(e => (e ? Account.toJSON(e) : undefined)); } else { obj.accounts = []; } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryAccountsResponse { + fromPartial, I>>(object: I): QueryAccountsResponse { const message = createBaseQueryAccountsResponse(); - message.accounts = - object.accounts?.map((e) => Account.fromPartial(e)) || []; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageResponse.fromPartial(object.pagination) - : undefined; + message.accounts = object.accounts?.map(e => Account.fromPartial(e)) || []; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryAccountsResponse.$type, QueryAccountsResponse); @@ -261,17 +218,14 @@ function createBaseQueryPaymentsRequest(): QueryPaymentsRequest { id: "", owner: "", state: "", - pagination: undefined, + pagination: undefined }; } export const QueryPaymentsRequest = { $type: "akash.escrow.v1beta2.QueryPaymentsRequest" as const, - encode( - message: QueryPaymentsRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryPaymentsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.scope !== "") { writer.uint32(10).string(message.scope); } @@ -293,10 +247,7 @@ export const QueryPaymentsRequest = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryPaymentsRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryPaymentsRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryPaymentsRequest(); @@ -337,9 +288,7 @@ export const QueryPaymentsRequest = { id: isSet(object.id) ? String(object.id) : "", owner: isSet(object.owner) ? String(object.owner) : "", state: isSet(object.state) ? String(object.state) : "", - pagination: isSet(object.pagination) - ? PageRequest.fromJSON(object.pagination) - : undefined, + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined }; }, @@ -350,28 +299,20 @@ export const QueryPaymentsRequest = { message.id !== undefined && (obj.id = message.id); message.owner !== undefined && (obj.owner = message.owner); message.state !== undefined && (obj.state = message.state); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryPaymentsRequest { + fromPartial, I>>(object: I): QueryPaymentsRequest { const message = createBaseQueryPaymentsRequest(); message.scope = object.scope ?? ""; message.xid = object.xid ?? ""; message.id = object.id ?? ""; message.owner = object.owner ?? ""; message.state = object.state ?? ""; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryPaymentsRequest.$type, QueryPaymentsRequest); @@ -380,33 +321,24 @@ function createBaseQueryPaymentsResponse(): QueryPaymentsResponse { return { $type: "akash.escrow.v1beta2.QueryPaymentsResponse", payments: [], - pagination: undefined, + pagination: undefined }; } export const QueryPaymentsResponse = { $type: "akash.escrow.v1beta2.QueryPaymentsResponse" as const, - encode( - message: QueryPaymentsResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryPaymentsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.payments) { FractionalPayment.encode(v!, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); + PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryPaymentsResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryPaymentsResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryPaymentsResponse(); @@ -414,9 +346,7 @@ export const QueryPaymentsResponse = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.payments.push( - FractionalPayment.decode(reader, reader.uint32()) - ); + message.payments.push(FractionalPayment.decode(reader, reader.uint32())); break; case 2: message.pagination = PageResponse.decode(reader, reader.uint32()); @@ -432,43 +362,28 @@ export const QueryPaymentsResponse = { fromJSON(object: any): QueryPaymentsResponse { return { $type: QueryPaymentsResponse.$type, - payments: Array.isArray(object?.payments) - ? object.payments.map((e: any) => FractionalPayment.fromJSON(e)) - : [], - pagination: isSet(object.pagination) - ? PageResponse.fromJSON(object.pagination) - : undefined, + payments: Array.isArray(object?.payments) ? object.payments.map((e: any) => FractionalPayment.fromJSON(e)) : [], + pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined }; }, toJSON(message: QueryPaymentsResponse): unknown { const obj: any = {}; if (message.payments) { - obj.payments = message.payments.map((e) => - e ? FractionalPayment.toJSON(e) : undefined - ); + obj.payments = message.payments.map(e => (e ? FractionalPayment.toJSON(e) : undefined)); } else { obj.payments = []; } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryPaymentsResponse { + fromPartial, I>>(object: I): QueryPaymentsResponse { const message = createBaseQueryPaymentsResponse(); - message.payments = - object.payments?.map((e) => FractionalPayment.fromPartial(e)) || []; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageResponse.fromPartial(object.pagination) - : undefined; + message.payments = object.payments?.map(e => FractionalPayment.fromPartial(e)) || []; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryPaymentsResponse.$type, QueryPaymentsResponse); @@ -498,65 +413,39 @@ export class QueryClientImpl implements Query { } Accounts(request: QueryAccountsRequest): Promise { const data = QueryAccountsRequest.encode(request).finish(); - const promise = this.rpc.request( - "akash.escrow.v1beta2.Query", - "Accounts", - data - ); - return promise.then((data) => - QueryAccountsResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.escrow.v1beta2.Query", "Accounts", data); + return promise.then(data => QueryAccountsResponse.decode(new _m0.Reader(data))); } Payments(request: QueryPaymentsRequest): Promise { const data = QueryPaymentsRequest.encode(request).finish(); - const promise = this.rpc.request( - "akash.escrow.v1beta2.Query", - "Payments", - data - ); - return promise.then((data) => - QueryPaymentsResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.escrow.v1beta2.Query", "Payments", data); + return promise.then(data => QueryPaymentsResponse.decode(new _m0.Reader(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/escrow/v1beta2/types.ts b/src/protobuf/akash/escrow/v1beta2/types.ts index f3dbbc3..f83add5 100644 --- a/src/protobuf/akash/escrow/v1beta2/types.ts +++ b/src/protobuf/akash/escrow/v1beta2/types.ts @@ -51,7 +51,7 @@ export enum Account_State { closed = 2, /** overdrawn - AccountOverdrawn is the state when an account is overdrawn */ overdrawn = 3, - UNRECOGNIZED = -1, + UNRECOGNIZED = -1 } export function account_StateFromJSON(object: any): Account_State { @@ -113,12 +113,10 @@ export enum FractionalPayment_State { closed = 2, /** overdrawn - PaymentStateOverdrawn is the state when the payment is overdrawn */ overdrawn = 3, - UNRECOGNIZED = -1, + UNRECOGNIZED = -1 } -export function fractionalPayment_StateFromJSON( - object: any -): FractionalPayment_State { +export function fractionalPayment_StateFromJSON(object: any): FractionalPayment_State { switch (object) { case 0: case "invalid": @@ -139,9 +137,7 @@ export function fractionalPayment_StateFromJSON( } } -export function fractionalPayment_StateToJSON( - object: FractionalPayment_State -): string { +export function fractionalPayment_StateToJSON(object: FractionalPayment_State): string { switch (object) { case FractionalPayment_State.invalid: return "invalid"; @@ -164,10 +160,7 @@ function createBaseAccountID(): AccountID { export const AccountID = { $type: "akash.escrow.v1beta2.AccountID" as const, - encode( - message: AccountID, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: AccountID, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.scope !== "") { writer.uint32(10).string(message.scope); } @@ -202,7 +195,7 @@ export const AccountID = { return { $type: AccountID.$type, scope: isSet(object.scope) ? String(object.scope) : "", - xid: isSet(object.xid) ? String(object.xid) : "", + xid: isSet(object.xid) ? String(object.xid) : "" }; }, @@ -213,14 +206,12 @@ export const AccountID = { return obj; }, - fromPartial, I>>( - object: I - ): AccountID { + fromPartial, I>>(object: I): AccountID { const message = createBaseAccountID(); message.scope = object.scope ?? ""; message.xid = object.xid ?? ""; return message; - }, + } }; messageTypeRegistry.set(AccountID.$type, AccountID); @@ -235,17 +226,14 @@ function createBaseAccount(): Account { transferred: undefined, settledAt: Long.ZERO, depositor: "", - funds: undefined, + funds: undefined }; } export const Account = { $type: "akash.escrow.v1beta2.Account" as const, - encode( - message: Account, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Account, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { AccountID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -318,70 +306,39 @@ export const Account = { id: isSet(object.id) ? AccountID.fromJSON(object.id) : undefined, owner: isSet(object.owner) ? String(object.owner) : "", state: isSet(object.state) ? account_StateFromJSON(object.state) : 0, - balance: isSet(object.balance) - ? DecCoin.fromJSON(object.balance) - : undefined, - transferred: isSet(object.transferred) - ? DecCoin.fromJSON(object.transferred) - : undefined, - settledAt: isSet(object.settledAt) - ? Long.fromValue(object.settledAt) - : Long.ZERO, + balance: isSet(object.balance) ? DecCoin.fromJSON(object.balance) : undefined, + transferred: isSet(object.transferred) ? DecCoin.fromJSON(object.transferred) : undefined, + settledAt: isSet(object.settledAt) ? Long.fromValue(object.settledAt) : Long.ZERO, depositor: isSet(object.depositor) ? String(object.depositor) : "", - funds: isSet(object.funds) ? DecCoin.fromJSON(object.funds) : undefined, + funds: isSet(object.funds) ? DecCoin.fromJSON(object.funds) : undefined }; }, toJSON(message: Account): unknown { const obj: any = {}; - message.id !== undefined && - (obj.id = message.id ? AccountID.toJSON(message.id) : undefined); + message.id !== undefined && (obj.id = message.id ? AccountID.toJSON(message.id) : undefined); message.owner !== undefined && (obj.owner = message.owner); - message.state !== undefined && - (obj.state = account_StateToJSON(message.state)); - message.balance !== undefined && - (obj.balance = message.balance - ? DecCoin.toJSON(message.balance) - : undefined); - message.transferred !== undefined && - (obj.transferred = message.transferred - ? DecCoin.toJSON(message.transferred) - : undefined); - message.settledAt !== undefined && - (obj.settledAt = (message.settledAt || Long.ZERO).toString()); + message.state !== undefined && (obj.state = account_StateToJSON(message.state)); + message.balance !== undefined && (obj.balance = message.balance ? DecCoin.toJSON(message.balance) : undefined); + message.transferred !== undefined && (obj.transferred = message.transferred ? DecCoin.toJSON(message.transferred) : undefined); + message.settledAt !== undefined && (obj.settledAt = (message.settledAt || Long.ZERO).toString()); message.depositor !== undefined && (obj.depositor = message.depositor); - message.funds !== undefined && - (obj.funds = message.funds ? DecCoin.toJSON(message.funds) : undefined); + message.funds !== undefined && (obj.funds = message.funds ? DecCoin.toJSON(message.funds) : undefined); return obj; }, fromPartial, I>>(object: I): Account { const message = createBaseAccount(); - message.id = - object.id !== undefined && object.id !== null - ? AccountID.fromPartial(object.id) - : undefined; + message.id = object.id !== undefined && object.id !== null ? AccountID.fromPartial(object.id) : undefined; message.owner = object.owner ?? ""; message.state = object.state ?? 0; - message.balance = - object.balance !== undefined && object.balance !== null - ? DecCoin.fromPartial(object.balance) - : undefined; - message.transferred = - object.transferred !== undefined && object.transferred !== null - ? DecCoin.fromPartial(object.transferred) - : undefined; - message.settledAt = - object.settledAt !== undefined && object.settledAt !== null - ? Long.fromValue(object.settledAt) - : Long.ZERO; + message.balance = object.balance !== undefined && object.balance !== null ? DecCoin.fromPartial(object.balance) : undefined; + message.transferred = object.transferred !== undefined && object.transferred !== null ? DecCoin.fromPartial(object.transferred) : undefined; + message.settledAt = object.settledAt !== undefined && object.settledAt !== null ? Long.fromValue(object.settledAt) : Long.ZERO; message.depositor = object.depositor ?? ""; - message.funds = - object.funds !== undefined && object.funds !== null - ? DecCoin.fromPartial(object.funds) - : undefined; + message.funds = object.funds !== undefined && object.funds !== null ? DecCoin.fromPartial(object.funds) : undefined; return message; - }, + } }; messageTypeRegistry.set(Account.$type, Account); @@ -395,17 +352,14 @@ function createBaseFractionalPayment(): FractionalPayment { state: 0, rate: undefined, balance: undefined, - withdrawn: undefined, + withdrawn: undefined }; } export const FractionalPayment = { $type: "akash.escrow.v1beta2.FractionalPayment" as const, - encode( - message: FractionalPayment, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: FractionalPayment, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.accountId !== undefined) { AccountID.encode(message.accountId, writer.uint32(10).fork()).ldelim(); } @@ -469,104 +423,61 @@ export const FractionalPayment = { fromJSON(object: any): FractionalPayment { return { $type: FractionalPayment.$type, - accountId: isSet(object.accountId) - ? AccountID.fromJSON(object.accountId) - : undefined, + accountId: isSet(object.accountId) ? AccountID.fromJSON(object.accountId) : undefined, paymentId: isSet(object.paymentId) ? String(object.paymentId) : "", owner: isSet(object.owner) ? String(object.owner) : "", - state: isSet(object.state) - ? fractionalPayment_StateFromJSON(object.state) - : 0, + state: isSet(object.state) ? fractionalPayment_StateFromJSON(object.state) : 0, rate: isSet(object.rate) ? DecCoin.fromJSON(object.rate) : undefined, - balance: isSet(object.balance) - ? DecCoin.fromJSON(object.balance) - : undefined, - withdrawn: isSet(object.withdrawn) - ? Coin.fromJSON(object.withdrawn) - : undefined, + balance: isSet(object.balance) ? DecCoin.fromJSON(object.balance) : undefined, + withdrawn: isSet(object.withdrawn) ? Coin.fromJSON(object.withdrawn) : undefined }; }, toJSON(message: FractionalPayment): unknown { const obj: any = {}; - message.accountId !== undefined && - (obj.accountId = message.accountId - ? AccountID.toJSON(message.accountId) - : undefined); + message.accountId !== undefined && (obj.accountId = message.accountId ? AccountID.toJSON(message.accountId) : undefined); message.paymentId !== undefined && (obj.paymentId = message.paymentId); message.owner !== undefined && (obj.owner = message.owner); - message.state !== undefined && - (obj.state = fractionalPayment_StateToJSON(message.state)); - message.rate !== undefined && - (obj.rate = message.rate ? DecCoin.toJSON(message.rate) : undefined); - message.balance !== undefined && - (obj.balance = message.balance - ? DecCoin.toJSON(message.balance) - : undefined); - message.withdrawn !== undefined && - (obj.withdrawn = message.withdrawn - ? Coin.toJSON(message.withdrawn) - : undefined); + message.state !== undefined && (obj.state = fractionalPayment_StateToJSON(message.state)); + message.rate !== undefined && (obj.rate = message.rate ? DecCoin.toJSON(message.rate) : undefined); + message.balance !== undefined && (obj.balance = message.balance ? DecCoin.toJSON(message.balance) : undefined); + message.withdrawn !== undefined && (obj.withdrawn = message.withdrawn ? Coin.toJSON(message.withdrawn) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): FractionalPayment { + fromPartial, I>>(object: I): FractionalPayment { const message = createBaseFractionalPayment(); - message.accountId = - object.accountId !== undefined && object.accountId !== null - ? AccountID.fromPartial(object.accountId) - : undefined; + message.accountId = object.accountId !== undefined && object.accountId !== null ? AccountID.fromPartial(object.accountId) : undefined; message.paymentId = object.paymentId ?? ""; message.owner = object.owner ?? ""; message.state = object.state ?? 0; - message.rate = - object.rate !== undefined && object.rate !== null - ? DecCoin.fromPartial(object.rate) - : undefined; - message.balance = - object.balance !== undefined && object.balance !== null - ? DecCoin.fromPartial(object.balance) - : undefined; - message.withdrawn = - object.withdrawn !== undefined && object.withdrawn !== null - ? Coin.fromPartial(object.withdrawn) - : undefined; + message.rate = object.rate !== undefined && object.rate !== null ? DecCoin.fromPartial(object.rate) : undefined; + message.balance = object.balance !== undefined && object.balance !== null ? DecCoin.fromPartial(object.balance) : undefined; + message.withdrawn = object.withdrawn !== undefined && object.withdrawn !== null ? Coin.fromPartial(object.withdrawn) : undefined; return message; - }, + } }; messageTypeRegistry.set(FractionalPayment.$type, FractionalPayment); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/escrow/v1beta3/genesis.ts b/src/protobuf/akash/escrow/v1beta3/genesis.ts index 3630887..ee3f508 100644 --- a/src/protobuf/akash/escrow/v1beta3/genesis.ts +++ b/src/protobuf/akash/escrow/v1beta3/genesis.ts @@ -17,17 +17,14 @@ function createBaseGenesisState(): GenesisState { return { $type: "akash.escrow.v1beta3.GenesisState", accounts: [], - payments: [], + payments: [] }; } export const GenesisState = { $type: "akash.escrow.v1beta3.GenesisState" as const, - encode( - message: GenesisState, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: GenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.accounts) { Account.encode(v!, writer.uint32(10).fork()).ldelim(); } @@ -48,9 +45,7 @@ export const GenesisState = { message.accounts.push(Account.decode(reader, reader.uint32())); break; case 2: - message.payments.push( - FractionalPayment.decode(reader, reader.uint32()) - ); + message.payments.push(FractionalPayment.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -63,76 +58,54 @@ export const GenesisState = { fromJSON(object: any): GenesisState { return { $type: GenesisState.$type, - accounts: Array.isArray(object?.accounts) - ? object.accounts.map((e: any) => Account.fromJSON(e)) - : [], - payments: Array.isArray(object?.payments) - ? object.payments.map((e: any) => FractionalPayment.fromJSON(e)) - : [], + accounts: Array.isArray(object?.accounts) ? object.accounts.map((e: any) => Account.fromJSON(e)) : [], + payments: Array.isArray(object?.payments) ? object.payments.map((e: any) => FractionalPayment.fromJSON(e)) : [] }; }, toJSON(message: GenesisState): unknown { const obj: any = {}; if (message.accounts) { - obj.accounts = message.accounts.map((e) => - e ? Account.toJSON(e) : undefined - ); + obj.accounts = message.accounts.map(e => (e ? Account.toJSON(e) : undefined)); } else { obj.accounts = []; } if (message.payments) { - obj.payments = message.payments.map((e) => - e ? FractionalPayment.toJSON(e) : undefined - ); + obj.payments = message.payments.map(e => (e ? FractionalPayment.toJSON(e) : undefined)); } else { obj.payments = []; } return obj; }, - fromPartial, I>>( - object: I - ): GenesisState { + fromPartial, I>>(object: I): GenesisState { const message = createBaseGenesisState(); - message.accounts = - object.accounts?.map((e) => Account.fromPartial(e)) || []; - message.payments = - object.payments?.map((e) => FractionalPayment.fromPartial(e)) || []; + message.accounts = object.accounts?.map(e => Account.fromPartial(e)) || []; + message.payments = object.payments?.map(e => FractionalPayment.fromPartial(e)) || []; return message; - }, + } }; messageTypeRegistry.set(GenesisState.$type, GenesisState); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/escrow/v1beta3/query.ts b/src/protobuf/akash/escrow/v1beta3/query.ts index dc9cd62..61de887 100644 --- a/src/protobuf/akash/escrow/v1beta3/query.ts +++ b/src/protobuf/akash/escrow/v1beta3/query.ts @@ -1,10 +1,7 @@ /* eslint-disable */ import { messageTypeRegistry } from "../../../typeRegistry"; import Long from "long"; -import { - PageRequest, - PageResponse, -} from "../../../cosmos/base/query/v1beta1/pagination"; +import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; import { Account, FractionalPayment } from "./types"; import * as _m0 from "protobufjs/minimal"; @@ -52,17 +49,14 @@ function createBaseQueryAccountsRequest(): QueryAccountsRequest { xid: "", owner: "", state: "", - pagination: undefined, + pagination: undefined }; } export const QueryAccountsRequest = { $type: "akash.escrow.v1beta3.QueryAccountsRequest" as const, - encode( - message: QueryAccountsRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryAccountsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.scope !== "") { writer.uint32(10).string(message.scope); } @@ -81,10 +75,7 @@ export const QueryAccountsRequest = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryAccountsRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryAccountsRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryAccountsRequest(); @@ -121,9 +112,7 @@ export const QueryAccountsRequest = { xid: isSet(object.xid) ? String(object.xid) : "", owner: isSet(object.owner) ? String(object.owner) : "", state: isSet(object.state) ? String(object.state) : "", - pagination: isSet(object.pagination) - ? PageRequest.fromJSON(object.pagination) - : undefined, + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined }; }, @@ -133,27 +122,19 @@ export const QueryAccountsRequest = { message.xid !== undefined && (obj.xid = message.xid); message.owner !== undefined && (obj.owner = message.owner); message.state !== undefined && (obj.state = message.state); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryAccountsRequest { + fromPartial, I>>(object: I): QueryAccountsRequest { const message = createBaseQueryAccountsRequest(); message.scope = object.scope ?? ""; message.xid = object.xid ?? ""; message.owner = object.owner ?? ""; message.state = object.state ?? ""; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryAccountsRequest.$type, QueryAccountsRequest); @@ -162,33 +143,24 @@ function createBaseQueryAccountsResponse(): QueryAccountsResponse { return { $type: "akash.escrow.v1beta3.QueryAccountsResponse", accounts: [], - pagination: undefined, + pagination: undefined }; } export const QueryAccountsResponse = { $type: "akash.escrow.v1beta3.QueryAccountsResponse" as const, - encode( - message: QueryAccountsResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryAccountsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.accounts) { Account.encode(v!, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); + PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryAccountsResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryAccountsResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryAccountsResponse(); @@ -212,43 +184,28 @@ export const QueryAccountsResponse = { fromJSON(object: any): QueryAccountsResponse { return { $type: QueryAccountsResponse.$type, - accounts: Array.isArray(object?.accounts) - ? object.accounts.map((e: any) => Account.fromJSON(e)) - : [], - pagination: isSet(object.pagination) - ? PageResponse.fromJSON(object.pagination) - : undefined, + accounts: Array.isArray(object?.accounts) ? object.accounts.map((e: any) => Account.fromJSON(e)) : [], + pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined }; }, toJSON(message: QueryAccountsResponse): unknown { const obj: any = {}; if (message.accounts) { - obj.accounts = message.accounts.map((e) => - e ? Account.toJSON(e) : undefined - ); + obj.accounts = message.accounts.map(e => (e ? Account.toJSON(e) : undefined)); } else { obj.accounts = []; } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryAccountsResponse { + fromPartial, I>>(object: I): QueryAccountsResponse { const message = createBaseQueryAccountsResponse(); - message.accounts = - object.accounts?.map((e) => Account.fromPartial(e)) || []; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageResponse.fromPartial(object.pagination) - : undefined; + message.accounts = object.accounts?.map(e => Account.fromPartial(e)) || []; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryAccountsResponse.$type, QueryAccountsResponse); @@ -261,17 +218,14 @@ function createBaseQueryPaymentsRequest(): QueryPaymentsRequest { id: "", owner: "", state: "", - pagination: undefined, + pagination: undefined }; } export const QueryPaymentsRequest = { $type: "akash.escrow.v1beta3.QueryPaymentsRequest" as const, - encode( - message: QueryPaymentsRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryPaymentsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.scope !== "") { writer.uint32(10).string(message.scope); } @@ -293,10 +247,7 @@ export const QueryPaymentsRequest = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryPaymentsRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryPaymentsRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryPaymentsRequest(); @@ -337,9 +288,7 @@ export const QueryPaymentsRequest = { id: isSet(object.id) ? String(object.id) : "", owner: isSet(object.owner) ? String(object.owner) : "", state: isSet(object.state) ? String(object.state) : "", - pagination: isSet(object.pagination) - ? PageRequest.fromJSON(object.pagination) - : undefined, + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined }; }, @@ -350,28 +299,20 @@ export const QueryPaymentsRequest = { message.id !== undefined && (obj.id = message.id); message.owner !== undefined && (obj.owner = message.owner); message.state !== undefined && (obj.state = message.state); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryPaymentsRequest { + fromPartial, I>>(object: I): QueryPaymentsRequest { const message = createBaseQueryPaymentsRequest(); message.scope = object.scope ?? ""; message.xid = object.xid ?? ""; message.id = object.id ?? ""; message.owner = object.owner ?? ""; message.state = object.state ?? ""; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryPaymentsRequest.$type, QueryPaymentsRequest); @@ -380,33 +321,24 @@ function createBaseQueryPaymentsResponse(): QueryPaymentsResponse { return { $type: "akash.escrow.v1beta3.QueryPaymentsResponse", payments: [], - pagination: undefined, + pagination: undefined }; } export const QueryPaymentsResponse = { $type: "akash.escrow.v1beta3.QueryPaymentsResponse" as const, - encode( - message: QueryPaymentsResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryPaymentsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.payments) { FractionalPayment.encode(v!, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); + PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryPaymentsResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryPaymentsResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryPaymentsResponse(); @@ -414,9 +346,7 @@ export const QueryPaymentsResponse = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.payments.push( - FractionalPayment.decode(reader, reader.uint32()) - ); + message.payments.push(FractionalPayment.decode(reader, reader.uint32())); break; case 2: message.pagination = PageResponse.decode(reader, reader.uint32()); @@ -432,43 +362,28 @@ export const QueryPaymentsResponse = { fromJSON(object: any): QueryPaymentsResponse { return { $type: QueryPaymentsResponse.$type, - payments: Array.isArray(object?.payments) - ? object.payments.map((e: any) => FractionalPayment.fromJSON(e)) - : [], - pagination: isSet(object.pagination) - ? PageResponse.fromJSON(object.pagination) - : undefined, + payments: Array.isArray(object?.payments) ? object.payments.map((e: any) => FractionalPayment.fromJSON(e)) : [], + pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined }; }, toJSON(message: QueryPaymentsResponse): unknown { const obj: any = {}; if (message.payments) { - obj.payments = message.payments.map((e) => - e ? FractionalPayment.toJSON(e) : undefined - ); + obj.payments = message.payments.map(e => (e ? FractionalPayment.toJSON(e) : undefined)); } else { obj.payments = []; } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryPaymentsResponse { + fromPartial, I>>(object: I): QueryPaymentsResponse { const message = createBaseQueryPaymentsResponse(); - message.payments = - object.payments?.map((e) => FractionalPayment.fromPartial(e)) || []; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageResponse.fromPartial(object.pagination) - : undefined; + message.payments = object.payments?.map(e => FractionalPayment.fromPartial(e)) || []; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryPaymentsResponse.$type, QueryPaymentsResponse); @@ -498,65 +413,39 @@ export class QueryClientImpl implements Query { } Accounts(request: QueryAccountsRequest): Promise { const data = QueryAccountsRequest.encode(request).finish(); - const promise = this.rpc.request( - "akash.escrow.v1beta3.Query", - "Accounts", - data - ); - return promise.then((data) => - QueryAccountsResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.escrow.v1beta3.Query", "Accounts", data); + return promise.then(data => QueryAccountsResponse.decode(new _m0.Reader(data))); } Payments(request: QueryPaymentsRequest): Promise { const data = QueryPaymentsRequest.encode(request).finish(); - const promise = this.rpc.request( - "akash.escrow.v1beta3.Query", - "Payments", - data - ); - return promise.then((data) => - QueryPaymentsResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.escrow.v1beta3.Query", "Payments", data); + return promise.then(data => QueryPaymentsResponse.decode(new _m0.Reader(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/escrow/v1beta3/types.ts b/src/protobuf/akash/escrow/v1beta3/types.ts index be80bdc..c235701 100644 --- a/src/protobuf/akash/escrow/v1beta3/types.ts +++ b/src/protobuf/akash/escrow/v1beta3/types.ts @@ -51,7 +51,7 @@ export enum Account_State { closed = 2, /** overdrawn - AccountOverdrawn is the state when an account is overdrawn */ overdrawn = 3, - UNRECOGNIZED = -1, + UNRECOGNIZED = -1 } export function account_StateFromJSON(object: any): Account_State { @@ -113,12 +113,10 @@ export enum FractionalPayment_State { closed = 2, /** overdrawn - PaymentStateOverdrawn is the state when the payment is overdrawn */ overdrawn = 3, - UNRECOGNIZED = -1, + UNRECOGNIZED = -1 } -export function fractionalPayment_StateFromJSON( - object: any -): FractionalPayment_State { +export function fractionalPayment_StateFromJSON(object: any): FractionalPayment_State { switch (object) { case 0: case "invalid": @@ -139,9 +137,7 @@ export function fractionalPayment_StateFromJSON( } } -export function fractionalPayment_StateToJSON( - object: FractionalPayment_State -): string { +export function fractionalPayment_StateToJSON(object: FractionalPayment_State): string { switch (object) { case FractionalPayment_State.invalid: return "invalid"; @@ -164,10 +160,7 @@ function createBaseAccountID(): AccountID { export const AccountID = { $type: "akash.escrow.v1beta3.AccountID" as const, - encode( - message: AccountID, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: AccountID, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.scope !== "") { writer.uint32(10).string(message.scope); } @@ -202,7 +195,7 @@ export const AccountID = { return { $type: AccountID.$type, scope: isSet(object.scope) ? String(object.scope) : "", - xid: isSet(object.xid) ? String(object.xid) : "", + xid: isSet(object.xid) ? String(object.xid) : "" }; }, @@ -213,14 +206,12 @@ export const AccountID = { return obj; }, - fromPartial, I>>( - object: I - ): AccountID { + fromPartial, I>>(object: I): AccountID { const message = createBaseAccountID(); message.scope = object.scope ?? ""; message.xid = object.xid ?? ""; return message; - }, + } }; messageTypeRegistry.set(AccountID.$type, AccountID); @@ -235,17 +226,14 @@ function createBaseAccount(): Account { transferred: undefined, settledAt: Long.ZERO, depositor: "", - funds: undefined, + funds: undefined }; } export const Account = { $type: "akash.escrow.v1beta3.Account" as const, - encode( - message: Account, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Account, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { AccountID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -318,70 +306,39 @@ export const Account = { id: isSet(object.id) ? AccountID.fromJSON(object.id) : undefined, owner: isSet(object.owner) ? String(object.owner) : "", state: isSet(object.state) ? account_StateFromJSON(object.state) : 0, - balance: isSet(object.balance) - ? DecCoin.fromJSON(object.balance) - : undefined, - transferred: isSet(object.transferred) - ? DecCoin.fromJSON(object.transferred) - : undefined, - settledAt: isSet(object.settledAt) - ? Long.fromValue(object.settledAt) - : Long.ZERO, + balance: isSet(object.balance) ? DecCoin.fromJSON(object.balance) : undefined, + transferred: isSet(object.transferred) ? DecCoin.fromJSON(object.transferred) : undefined, + settledAt: isSet(object.settledAt) ? Long.fromValue(object.settledAt) : Long.ZERO, depositor: isSet(object.depositor) ? String(object.depositor) : "", - funds: isSet(object.funds) ? DecCoin.fromJSON(object.funds) : undefined, + funds: isSet(object.funds) ? DecCoin.fromJSON(object.funds) : undefined }; }, toJSON(message: Account): unknown { const obj: any = {}; - message.id !== undefined && - (obj.id = message.id ? AccountID.toJSON(message.id) : undefined); + message.id !== undefined && (obj.id = message.id ? AccountID.toJSON(message.id) : undefined); message.owner !== undefined && (obj.owner = message.owner); - message.state !== undefined && - (obj.state = account_StateToJSON(message.state)); - message.balance !== undefined && - (obj.balance = message.balance - ? DecCoin.toJSON(message.balance) - : undefined); - message.transferred !== undefined && - (obj.transferred = message.transferred - ? DecCoin.toJSON(message.transferred) - : undefined); - message.settledAt !== undefined && - (obj.settledAt = (message.settledAt || Long.ZERO).toString()); + message.state !== undefined && (obj.state = account_StateToJSON(message.state)); + message.balance !== undefined && (obj.balance = message.balance ? DecCoin.toJSON(message.balance) : undefined); + message.transferred !== undefined && (obj.transferred = message.transferred ? DecCoin.toJSON(message.transferred) : undefined); + message.settledAt !== undefined && (obj.settledAt = (message.settledAt || Long.ZERO).toString()); message.depositor !== undefined && (obj.depositor = message.depositor); - message.funds !== undefined && - (obj.funds = message.funds ? DecCoin.toJSON(message.funds) : undefined); + message.funds !== undefined && (obj.funds = message.funds ? DecCoin.toJSON(message.funds) : undefined); return obj; }, fromPartial, I>>(object: I): Account { const message = createBaseAccount(); - message.id = - object.id !== undefined && object.id !== null - ? AccountID.fromPartial(object.id) - : undefined; + message.id = object.id !== undefined && object.id !== null ? AccountID.fromPartial(object.id) : undefined; message.owner = object.owner ?? ""; message.state = object.state ?? 0; - message.balance = - object.balance !== undefined && object.balance !== null - ? DecCoin.fromPartial(object.balance) - : undefined; - message.transferred = - object.transferred !== undefined && object.transferred !== null - ? DecCoin.fromPartial(object.transferred) - : undefined; - message.settledAt = - object.settledAt !== undefined && object.settledAt !== null - ? Long.fromValue(object.settledAt) - : Long.ZERO; + message.balance = object.balance !== undefined && object.balance !== null ? DecCoin.fromPartial(object.balance) : undefined; + message.transferred = object.transferred !== undefined && object.transferred !== null ? DecCoin.fromPartial(object.transferred) : undefined; + message.settledAt = object.settledAt !== undefined && object.settledAt !== null ? Long.fromValue(object.settledAt) : Long.ZERO; message.depositor = object.depositor ?? ""; - message.funds = - object.funds !== undefined && object.funds !== null - ? DecCoin.fromPartial(object.funds) - : undefined; + message.funds = object.funds !== undefined && object.funds !== null ? DecCoin.fromPartial(object.funds) : undefined; return message; - }, + } }; messageTypeRegistry.set(Account.$type, Account); @@ -395,17 +352,14 @@ function createBaseFractionalPayment(): FractionalPayment { state: 0, rate: undefined, balance: undefined, - withdrawn: undefined, + withdrawn: undefined }; } export const FractionalPayment = { $type: "akash.escrow.v1beta3.FractionalPayment" as const, - encode( - message: FractionalPayment, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: FractionalPayment, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.accountId !== undefined) { AccountID.encode(message.accountId, writer.uint32(10).fork()).ldelim(); } @@ -469,104 +423,61 @@ export const FractionalPayment = { fromJSON(object: any): FractionalPayment { return { $type: FractionalPayment.$type, - accountId: isSet(object.accountId) - ? AccountID.fromJSON(object.accountId) - : undefined, + accountId: isSet(object.accountId) ? AccountID.fromJSON(object.accountId) : undefined, paymentId: isSet(object.paymentId) ? String(object.paymentId) : "", owner: isSet(object.owner) ? String(object.owner) : "", - state: isSet(object.state) - ? fractionalPayment_StateFromJSON(object.state) - : 0, + state: isSet(object.state) ? fractionalPayment_StateFromJSON(object.state) : 0, rate: isSet(object.rate) ? DecCoin.fromJSON(object.rate) : undefined, - balance: isSet(object.balance) - ? DecCoin.fromJSON(object.balance) - : undefined, - withdrawn: isSet(object.withdrawn) - ? Coin.fromJSON(object.withdrawn) - : undefined, + balance: isSet(object.balance) ? DecCoin.fromJSON(object.balance) : undefined, + withdrawn: isSet(object.withdrawn) ? Coin.fromJSON(object.withdrawn) : undefined }; }, toJSON(message: FractionalPayment): unknown { const obj: any = {}; - message.accountId !== undefined && - (obj.accountId = message.accountId - ? AccountID.toJSON(message.accountId) - : undefined); + message.accountId !== undefined && (obj.accountId = message.accountId ? AccountID.toJSON(message.accountId) : undefined); message.paymentId !== undefined && (obj.paymentId = message.paymentId); message.owner !== undefined && (obj.owner = message.owner); - message.state !== undefined && - (obj.state = fractionalPayment_StateToJSON(message.state)); - message.rate !== undefined && - (obj.rate = message.rate ? DecCoin.toJSON(message.rate) : undefined); - message.balance !== undefined && - (obj.balance = message.balance - ? DecCoin.toJSON(message.balance) - : undefined); - message.withdrawn !== undefined && - (obj.withdrawn = message.withdrawn - ? Coin.toJSON(message.withdrawn) - : undefined); + message.state !== undefined && (obj.state = fractionalPayment_StateToJSON(message.state)); + message.rate !== undefined && (obj.rate = message.rate ? DecCoin.toJSON(message.rate) : undefined); + message.balance !== undefined && (obj.balance = message.balance ? DecCoin.toJSON(message.balance) : undefined); + message.withdrawn !== undefined && (obj.withdrawn = message.withdrawn ? Coin.toJSON(message.withdrawn) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): FractionalPayment { + fromPartial, I>>(object: I): FractionalPayment { const message = createBaseFractionalPayment(); - message.accountId = - object.accountId !== undefined && object.accountId !== null - ? AccountID.fromPartial(object.accountId) - : undefined; + message.accountId = object.accountId !== undefined && object.accountId !== null ? AccountID.fromPartial(object.accountId) : undefined; message.paymentId = object.paymentId ?? ""; message.owner = object.owner ?? ""; message.state = object.state ?? 0; - message.rate = - object.rate !== undefined && object.rate !== null - ? DecCoin.fromPartial(object.rate) - : undefined; - message.balance = - object.balance !== undefined && object.balance !== null - ? DecCoin.fromPartial(object.balance) - : undefined; - message.withdrawn = - object.withdrawn !== undefined && object.withdrawn !== null - ? Coin.fromPartial(object.withdrawn) - : undefined; + message.rate = object.rate !== undefined && object.rate !== null ? DecCoin.fromPartial(object.rate) : undefined; + message.balance = object.balance !== undefined && object.balance !== null ? DecCoin.fromPartial(object.balance) : undefined; + message.withdrawn = object.withdrawn !== undefined && object.withdrawn !== null ? Coin.fromPartial(object.withdrawn) : undefined; return message; - }, + } }; messageTypeRegistry.set(FractionalPayment.$type, FractionalPayment); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/gov/v1beta3/genesis.ts b/src/protobuf/akash/gov/v1beta3/genesis.ts index e2cb488..dfe92ae 100644 --- a/src/protobuf/akash/gov/v1beta3/genesis.ts +++ b/src/protobuf/akash/gov/v1beta3/genesis.ts @@ -19,15 +19,9 @@ function createBaseGenesisState(): GenesisState { export const GenesisState = { $type: "akash.gov.v1beta3.GenesisState" as const, - encode( - message: GenesisState, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: GenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.depositParams !== undefined) { - DepositParams.encode( - message.depositParams, - writer.uint32(10).fork() - ).ldelim(); + DepositParams.encode(message.depositParams, writer.uint32(10).fork()).ldelim(); } return writer; }, @@ -53,63 +47,43 @@ export const GenesisState = { fromJSON(object: any): GenesisState { return { $type: GenesisState.$type, - depositParams: isSet(object.depositParams) - ? DepositParams.fromJSON(object.depositParams) - : undefined, + depositParams: isSet(object.depositParams) ? DepositParams.fromJSON(object.depositParams) : undefined }; }, toJSON(message: GenesisState): unknown { const obj: any = {}; - message.depositParams !== undefined && - (obj.depositParams = message.depositParams - ? DepositParams.toJSON(message.depositParams) - : undefined); + message.depositParams !== undefined && (obj.depositParams = message.depositParams ? DepositParams.toJSON(message.depositParams) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): GenesisState { + fromPartial, I>>(object: I): GenesisState { const message = createBaseGenesisState(); - message.depositParams = - object.depositParams !== undefined && object.depositParams !== null - ? DepositParams.fromPartial(object.depositParams) - : undefined; + message.depositParams = object.depositParams !== undefined && object.depositParams !== null ? DepositParams.fromPartial(object.depositParams) : undefined; return message; - }, + } }; messageTypeRegistry.set(GenesisState.$type, GenesisState); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/gov/v1beta3/params.ts b/src/protobuf/akash/gov/v1beta3/params.ts index ad2f798..26fa5fc 100644 --- a/src/protobuf/akash/gov/v1beta3/params.ts +++ b/src/protobuf/akash/gov/v1beta3/params.ts @@ -18,17 +18,14 @@ export interface DepositParams { function createBaseDepositParams(): DepositParams { return { $type: "akash.gov.v1beta3.DepositParams", - minInitialDepositRate: new Uint8Array(), + minInitialDepositRate: new Uint8Array() }; } export const DepositParams = { $type: "akash.gov.v1beta3.DepositParams" as const, - encode( - message: DepositParams, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: DepositParams, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.minInitialDepositRate.length !== 0) { writer.uint32(10).bytes(message.minInitialDepositRate); } @@ -56,31 +53,22 @@ export const DepositParams = { fromJSON(object: any): DepositParams { return { $type: DepositParams.$type, - minInitialDepositRate: isSet(object.minInitialDepositRate) - ? bytesFromBase64(object.minInitialDepositRate) - : new Uint8Array(), + minInitialDepositRate: isSet(object.minInitialDepositRate) ? bytesFromBase64(object.minInitialDepositRate) : new Uint8Array() }; }, toJSON(message: DepositParams): unknown { const obj: any = {}; message.minInitialDepositRate !== undefined && - (obj.minInitialDepositRate = base64FromBytes( - message.minInitialDepositRate !== undefined - ? message.minInitialDepositRate - : new Uint8Array() - )); + (obj.minInitialDepositRate = base64FromBytes(message.minInitialDepositRate !== undefined ? message.minInitialDepositRate : new Uint8Array())); return obj; }, - fromPartial, I>>( - object: I - ): DepositParams { + fromPartial, I>>(object: I): DepositParams { const message = createBaseDepositParams(); - message.minInitialDepositRate = - object.minInitialDepositRate ?? new Uint8Array(); + message.minInitialDepositRate = object.minInitialDepositRate ?? new Uint8Array(); return message; - }, + } }; messageTypeRegistry.set(DepositParams.$type, DepositParams); @@ -96,9 +84,7 @@ var globalThis: any = (() => { throw "Unable to locate global object"; })(); -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); +const atob: (b64: string) => string = globalThis.atob || (b64 => globalThis.Buffer.from(b64, "base64").toString("binary")); function bytesFromBase64(b64: string): Uint8Array { const bin = atob(b64); const arr = new Uint8Array(bin.length); @@ -108,45 +94,33 @@ function bytesFromBase64(b64: string): Uint8Array { return arr; } -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); +const btoa: (bin: string) => string = globalThis.btoa || (bin => globalThis.Buffer.from(bin, "binary").toString("base64")); function base64FromBytes(arr: Uint8Array): string { const bin: string[] = []; - arr.forEach((byte) => { + arr.forEach(byte => { bin.push(String.fromCharCode(byte)); }); return btoa(bin.join("")); } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/icaauth/query.ts b/src/protobuf/akash/icaauth/query.ts index d57d0ef..d567aa9 100644 --- a/src/protobuf/akash/icaauth/query.ts +++ b/src/protobuf/akash/icaauth/query.ts @@ -22,17 +22,14 @@ function createBaseQueryInterchainAccountFromAddressRequest(): QueryInterchainAc return { $type: "akash.icaauth.QueryInterchainAccountFromAddressRequest", owner: "", - connectionId: "", + connectionId: "" }; } export const QueryInterchainAccountFromAddressRequest = { $type: "akash.icaauth.QueryInterchainAccountFromAddressRequest" as const, - encode( - message: QueryInterchainAccountFromAddressRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryInterchainAccountFromAddressRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -42,10 +39,7 @@ export const QueryInterchainAccountFromAddressRequest = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryInterchainAccountFromAddressRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryInterchainAccountFromAddressRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryInterchainAccountFromAddressRequest(); @@ -70,59 +64,45 @@ export const QueryInterchainAccountFromAddressRequest = { return { $type: QueryInterchainAccountFromAddressRequest.$type, owner: isSet(object.owner) ? String(object.owner) : "", - connectionId: isSet(object.connectionId) - ? String(object.connectionId) - : "", + connectionId: isSet(object.connectionId) ? String(object.connectionId) : "" }; }, toJSON(message: QueryInterchainAccountFromAddressRequest): unknown { const obj: any = {}; message.owner !== undefined && (obj.owner = message.owner); - message.connectionId !== undefined && - (obj.connectionId = message.connectionId); + message.connectionId !== undefined && (obj.connectionId = message.connectionId); return obj; }, - fromPartial< - I extends Exact, I> - >(object: I): QueryInterchainAccountFromAddressRequest { + fromPartial, I>>(object: I): QueryInterchainAccountFromAddressRequest { const message = createBaseQueryInterchainAccountFromAddressRequest(); message.owner = object.owner ?? ""; message.connectionId = object.connectionId ?? ""; return message; - }, + } }; -messageTypeRegistry.set( - QueryInterchainAccountFromAddressRequest.$type, - QueryInterchainAccountFromAddressRequest -); +messageTypeRegistry.set(QueryInterchainAccountFromAddressRequest.$type, QueryInterchainAccountFromAddressRequest); function createBaseQueryInterchainAccountFromAddressResponse(): QueryInterchainAccountFromAddressResponse { return { $type: "akash.icaauth.QueryInterchainAccountFromAddressResponse", - interchainAccountAddress: "", + interchainAccountAddress: "" }; } export const QueryInterchainAccountFromAddressResponse = { $type: "akash.icaauth.QueryInterchainAccountFromAddressResponse" as const, - encode( - message: QueryInterchainAccountFromAddressResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryInterchainAccountFromAddressResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.interchainAccountAddress !== "") { writer.uint32(10).string(message.interchainAccountAddress); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryInterchainAccountFromAddressResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryInterchainAccountFromAddressResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryInterchainAccountFromAddressResponse(); @@ -143,100 +123,66 @@ export const QueryInterchainAccountFromAddressResponse = { fromJSON(object: any): QueryInterchainAccountFromAddressResponse { return { $type: QueryInterchainAccountFromAddressResponse.$type, - interchainAccountAddress: isSet(object.interchainAccountAddress) - ? String(object.interchainAccountAddress) - : "", + interchainAccountAddress: isSet(object.interchainAccountAddress) ? String(object.interchainAccountAddress) : "" }; }, toJSON(message: QueryInterchainAccountFromAddressResponse): unknown { const obj: any = {}; - message.interchainAccountAddress !== undefined && - (obj.interchainAccountAddress = message.interchainAccountAddress); + message.interchainAccountAddress !== undefined && (obj.interchainAccountAddress = message.interchainAccountAddress); return obj; }, - fromPartial< - I extends Exact, I> - >(object: I): QueryInterchainAccountFromAddressResponse { + fromPartial, I>>(object: I): QueryInterchainAccountFromAddressResponse { const message = createBaseQueryInterchainAccountFromAddressResponse(); message.interchainAccountAddress = object.interchainAccountAddress ?? ""; return message; - }, + } }; -messageTypeRegistry.set( - QueryInterchainAccountFromAddressResponse.$type, - QueryInterchainAccountFromAddressResponse -); +messageTypeRegistry.set(QueryInterchainAccountFromAddressResponse.$type, QueryInterchainAccountFromAddressResponse); /** Query defines the gRPC querier service. */ export interface Query { /** QueryInterchainAccountFromAddress returns the interchain account for given owner address on a given connection pair */ - InterchainAccountFromAddress( - request: QueryInterchainAccountFromAddressRequest - ): Promise; + InterchainAccountFromAddress(request: QueryInterchainAccountFromAddressRequest): Promise; } export class QueryClientImpl implements Query { private readonly rpc: Rpc; constructor(rpc: Rpc) { this.rpc = rpc; - this.InterchainAccountFromAddress = - this.InterchainAccountFromAddress.bind(this); + this.InterchainAccountFromAddress = this.InterchainAccountFromAddress.bind(this); } - InterchainAccountFromAddress( - request: QueryInterchainAccountFromAddressRequest - ): Promise { - const data = - QueryInterchainAccountFromAddressRequest.encode(request).finish(); - const promise = this.rpc.request( - "akash.icaauth.Query", - "InterchainAccountFromAddress", - data - ); - return promise.then((data) => - QueryInterchainAccountFromAddressResponse.decode(new _m0.Reader(data)) - ); + InterchainAccountFromAddress(request: QueryInterchainAccountFromAddressRequest): Promise { + const data = QueryInterchainAccountFromAddressRequest.encode(request).finish(); + const promise = this.rpc.request("akash.icaauth.Query", "InterchainAccountFromAddress", data); + return promise.then(data => QueryInterchainAccountFromAddressResponse.decode(new _m0.Reader(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/icaauth/tx.ts b/src/protobuf/akash/icaauth/tx.ts index 60bee64..1034878 100644 --- a/src/protobuf/akash/icaauth/tx.ts +++ b/src/protobuf/akash/icaauth/tx.ts @@ -35,17 +35,14 @@ function createBaseMsgRegisterAccount(): MsgRegisterAccount { return { $type: "akash.icaauth.MsgRegisterAccount", owner: "", - connectionId: "", + connectionId: "" }; } export const MsgRegisterAccount = { $type: "akash.icaauth.MsgRegisterAccount" as const, - encode( - message: MsgRegisterAccount, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MsgRegisterAccount, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -80,28 +77,23 @@ export const MsgRegisterAccount = { return { $type: MsgRegisterAccount.$type, owner: isSet(object.owner) ? String(object.owner) : "", - connectionId: isSet(object.connectionId) - ? String(object.connectionId) - : "", + connectionId: isSet(object.connectionId) ? String(object.connectionId) : "" }; }, toJSON(message: MsgRegisterAccount): unknown { const obj: any = {}; message.owner !== undefined && (obj.owner = message.owner); - message.connectionId !== undefined && - (obj.connectionId = message.connectionId); + message.connectionId !== undefined && (obj.connectionId = message.connectionId); return obj; }, - fromPartial, I>>( - object: I - ): MsgRegisterAccount { + fromPartial, I>>(object: I): MsgRegisterAccount { const message = createBaseMsgRegisterAccount(); message.owner = object.owner ?? ""; message.connectionId = object.connectionId ?? ""; return message; - }, + } }; messageTypeRegistry.set(MsgRegisterAccount.$type, MsgRegisterAccount); @@ -113,17 +105,11 @@ function createBaseMsgRegisterAccountResponse(): MsgRegisterAccountResponse { export const MsgRegisterAccountResponse = { $type: "akash.icaauth.MsgRegisterAccountResponse" as const, - encode( - _: MsgRegisterAccountResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: MsgRegisterAccountResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgRegisterAccountResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgRegisterAccountResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgRegisterAccountResponse(); @@ -140,7 +126,7 @@ export const MsgRegisterAccountResponse = { fromJSON(_: any): MsgRegisterAccountResponse { return { - $type: MsgRegisterAccountResponse.$type, + $type: MsgRegisterAccountResponse.$type }; }, @@ -149,35 +135,27 @@ export const MsgRegisterAccountResponse = { return obj; }, - fromPartial, I>>( - _: I - ): MsgRegisterAccountResponse { + fromPartial, I>>(_: I): MsgRegisterAccountResponse { const message = createBaseMsgRegisterAccountResponse(); return message; - }, + } }; -messageTypeRegistry.set( - MsgRegisterAccountResponse.$type, - MsgRegisterAccountResponse -); +messageTypeRegistry.set(MsgRegisterAccountResponse.$type, MsgRegisterAccountResponse); function createBaseMsgSubmitTx(): MsgSubmitTx { return { $type: "akash.icaauth.MsgSubmitTx", owner: "", connectionId: "", - msg: undefined, + msg: undefined }; } export const MsgSubmitTx = { $type: "akash.icaauth.MsgSubmitTx" as const, - encode( - message: MsgSubmitTx, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MsgSubmitTx, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -218,35 +196,26 @@ export const MsgSubmitTx = { return { $type: MsgSubmitTx.$type, owner: isSet(object.owner) ? String(object.owner) : "", - connectionId: isSet(object.connectionId) - ? String(object.connectionId) - : "", - msg: isSet(object.msg) ? Any.fromJSON(object.msg) : undefined, + connectionId: isSet(object.connectionId) ? String(object.connectionId) : "", + msg: isSet(object.msg) ? Any.fromJSON(object.msg) : undefined }; }, toJSON(message: MsgSubmitTx): unknown { const obj: any = {}; message.owner !== undefined && (obj.owner = message.owner); - message.connectionId !== undefined && - (obj.connectionId = message.connectionId); - message.msg !== undefined && - (obj.msg = message.msg ? Any.toJSON(message.msg) : undefined); + message.connectionId !== undefined && (obj.connectionId = message.connectionId); + message.msg !== undefined && (obj.msg = message.msg ? Any.toJSON(message.msg) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): MsgSubmitTx { + fromPartial, I>>(object: I): MsgSubmitTx { const message = createBaseMsgSubmitTx(); message.owner = object.owner ?? ""; message.connectionId = object.connectionId ?? ""; - message.msg = - object.msg !== undefined && object.msg !== null - ? Any.fromPartial(object.msg) - : undefined; + message.msg = object.msg !== undefined && object.msg !== null ? Any.fromPartial(object.msg) : undefined; return message; - }, + } }; messageTypeRegistry.set(MsgSubmitTx.$type, MsgSubmitTx); @@ -258,10 +227,7 @@ function createBaseMsgSubmitTxResponse(): MsgSubmitTxResponse { export const MsgSubmitTxResponse = { $type: "akash.icaauth.MsgSubmitTxResponse" as const, - encode( - _: MsgSubmitTxResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: MsgSubmitTxResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, @@ -282,7 +248,7 @@ export const MsgSubmitTxResponse = { fromJSON(_: any): MsgSubmitTxResponse { return { - $type: MsgSubmitTxResponse.$type, + $type: MsgSubmitTxResponse.$type }; }, @@ -291,12 +257,10 @@ export const MsgSubmitTxResponse = { return obj; }, - fromPartial, I>>( - _: I - ): MsgSubmitTxResponse { + fromPartial, I>>(_: I): MsgSubmitTxResponse { const message = createBaseMsgSubmitTxResponse(); return message; - }, + } }; messageTypeRegistry.set(MsgSubmitTxResponse.$type, MsgSubmitTxResponse); @@ -304,9 +268,7 @@ messageTypeRegistry.set(MsgSubmitTxResponse.$type, MsgSubmitTxResponse); /** Msg defines the icaauth Msg service. */ export interface Msg { /** Register defines a rpc handler for MsgRegisterAccount */ - RegisterAccount( - request: MsgRegisterAccount - ): Promise; + RegisterAccount(request: MsgRegisterAccount): Promise; /** SubmitTx defines a rpc handler for MsgSubmitTx */ SubmitTx(request: MsgSubmitTx): Promise; } @@ -318,65 +280,41 @@ export class MsgClientImpl implements Msg { this.RegisterAccount = this.RegisterAccount.bind(this); this.SubmitTx = this.SubmitTx.bind(this); } - RegisterAccount( - request: MsgRegisterAccount - ): Promise { + RegisterAccount(request: MsgRegisterAccount): Promise { const data = MsgRegisterAccount.encode(request).finish(); - const promise = this.rpc.request( - "akash.icaauth.Msg", - "RegisterAccount", - data - ); - return promise.then((data) => - MsgRegisterAccountResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.icaauth.Msg", "RegisterAccount", data); + return promise.then(data => MsgRegisterAccountResponse.decode(new _m0.Reader(data))); } SubmitTx(request: MsgSubmitTx): Promise { const data = MsgSubmitTx.encode(request).finish(); const promise = this.rpc.request("akash.icaauth.Msg", "SubmitTx", data); - return promise.then((data) => - MsgSubmitTxResponse.decode(new _m0.Reader(data)) - ); + return promise.then(data => MsgSubmitTxResponse.decode(new _m0.Reader(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/inflation/v1beta2/genesis.ts b/src/protobuf/akash/inflation/v1beta2/genesis.ts index c2a1585..66f25f7 100644 --- a/src/protobuf/akash/inflation/v1beta2/genesis.ts +++ b/src/protobuf/akash/inflation/v1beta2/genesis.ts @@ -19,10 +19,7 @@ function createBaseGenesisState(): GenesisState { export const GenesisState = { $type: "akash.inflation.v1beta2.GenesisState" as const, - encode( - message: GenesisState, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: GenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.params !== undefined) { Params.encode(message.params, writer.uint32(10).fork()).ldelim(); } @@ -50,59 +47,43 @@ export const GenesisState = { fromJSON(object: any): GenesisState { return { $type: GenesisState.$type, - params: isSet(object.params) ? Params.fromJSON(object.params) : undefined, + params: isSet(object.params) ? Params.fromJSON(object.params) : undefined }; }, toJSON(message: GenesisState): unknown { const obj: any = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); + message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): GenesisState { + fromPartial, I>>(object: I): GenesisState { const message = createBaseGenesisState(); - message.params = - object.params !== undefined && object.params !== null - ? Params.fromPartial(object.params) - : undefined; + message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; return message; - }, + } }; messageTypeRegistry.set(GenesisState.$type, GenesisState); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/inflation/v1beta2/params.ts b/src/protobuf/akash/inflation/v1beta2/params.ts index c051bfc..f4adfbe 100644 --- a/src/protobuf/akash/inflation/v1beta2/params.ts +++ b/src/protobuf/akash/inflation/v1beta2/params.ts @@ -27,17 +27,14 @@ function createBaseParams(): Params { $type: "akash.inflation.v1beta2.Params", inflationDecayFactor: "", initialInflation: "", - variance: "", + variance: "" }; } export const Params = { $type: "akash.inflation.v1beta2.Params" as const, - encode( - message: Params, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Params, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.inflationDecayFactor !== "") { writer.uint32(10).string(message.inflationDecayFactor); } @@ -77,22 +74,16 @@ export const Params = { fromJSON(object: any): Params { return { $type: Params.$type, - inflationDecayFactor: isSet(object.inflationDecayFactor) - ? String(object.inflationDecayFactor) - : "", - initialInflation: isSet(object.initialInflation) - ? String(object.initialInflation) - : "", - variance: isSet(object.variance) ? String(object.variance) : "", + inflationDecayFactor: isSet(object.inflationDecayFactor) ? String(object.inflationDecayFactor) : "", + initialInflation: isSet(object.initialInflation) ? String(object.initialInflation) : "", + variance: isSet(object.variance) ? String(object.variance) : "" }; }, toJSON(message: Params): unknown { const obj: any = {}; - message.inflationDecayFactor !== undefined && - (obj.inflationDecayFactor = message.inflationDecayFactor); - message.initialInflation !== undefined && - (obj.initialInflation = message.initialInflation); + message.inflationDecayFactor !== undefined && (obj.inflationDecayFactor = message.inflationDecayFactor); + message.initialInflation !== undefined && (obj.initialInflation = message.initialInflation); message.variance !== undefined && (obj.variance = message.variance); return obj; }, @@ -103,39 +94,29 @@ export const Params = { message.initialInflation = object.initialInflation ?? ""; message.variance = object.variance ?? ""; return message; - }, + } }; messageTypeRegistry.set(Params.$type, Params); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/inflation/v1beta3/genesis.ts b/src/protobuf/akash/inflation/v1beta3/genesis.ts index 5a19c0d..fa5d48f 100644 --- a/src/protobuf/akash/inflation/v1beta3/genesis.ts +++ b/src/protobuf/akash/inflation/v1beta3/genesis.ts @@ -19,10 +19,7 @@ function createBaseGenesisState(): GenesisState { export const GenesisState = { $type: "akash.inflation.v1beta3.GenesisState" as const, - encode( - message: GenesisState, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: GenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.params !== undefined) { Params.encode(message.params, writer.uint32(10).fork()).ldelim(); } @@ -50,59 +47,43 @@ export const GenesisState = { fromJSON(object: any): GenesisState { return { $type: GenesisState.$type, - params: isSet(object.params) ? Params.fromJSON(object.params) : undefined, + params: isSet(object.params) ? Params.fromJSON(object.params) : undefined }; }, toJSON(message: GenesisState): unknown { const obj: any = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); + message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): GenesisState { + fromPartial, I>>(object: I): GenesisState { const message = createBaseGenesisState(); - message.params = - object.params !== undefined && object.params !== null - ? Params.fromPartial(object.params) - : undefined; + message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; return message; - }, + } }; messageTypeRegistry.set(GenesisState.$type, GenesisState); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/inflation/v1beta3/params.ts b/src/protobuf/akash/inflation/v1beta3/params.ts index 56648ef..aaca2f0 100644 --- a/src/protobuf/akash/inflation/v1beta3/params.ts +++ b/src/protobuf/akash/inflation/v1beta3/params.ts @@ -27,17 +27,14 @@ function createBaseParams(): Params { $type: "akash.inflation.v1beta3.Params", inflationDecayFactor: "", initialInflation: "", - variance: "", + variance: "" }; } export const Params = { $type: "akash.inflation.v1beta3.Params" as const, - encode( - message: Params, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Params, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.inflationDecayFactor !== "") { writer.uint32(10).string(message.inflationDecayFactor); } @@ -77,22 +74,16 @@ export const Params = { fromJSON(object: any): Params { return { $type: Params.$type, - inflationDecayFactor: isSet(object.inflationDecayFactor) - ? String(object.inflationDecayFactor) - : "", - initialInflation: isSet(object.initialInflation) - ? String(object.initialInflation) - : "", - variance: isSet(object.variance) ? String(object.variance) : "", + inflationDecayFactor: isSet(object.inflationDecayFactor) ? String(object.inflationDecayFactor) : "", + initialInflation: isSet(object.initialInflation) ? String(object.initialInflation) : "", + variance: isSet(object.variance) ? String(object.variance) : "" }; }, toJSON(message: Params): unknown { const obj: any = {}; - message.inflationDecayFactor !== undefined && - (obj.inflationDecayFactor = message.inflationDecayFactor); - message.initialInflation !== undefined && - (obj.initialInflation = message.initialInflation); + message.inflationDecayFactor !== undefined && (obj.inflationDecayFactor = message.inflationDecayFactor); + message.initialInflation !== undefined && (obj.initialInflation = message.initialInflation); message.variance !== undefined && (obj.variance = message.variance); return obj; }, @@ -103,39 +94,29 @@ export const Params = { message.initialInflation = object.initialInflation ?? ""; message.variance = object.variance ?? ""; return message; - }, + } }; messageTypeRegistry.set(Params.$type, Params); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/market/v1beta1/bid.ts b/src/protobuf/akash/market/v1beta1/bid.ts index c1c957b..9a463c6 100644 --- a/src/protobuf/akash/market/v1beta1/bid.ts +++ b/src/protobuf/akash/market/v1beta1/bid.ts @@ -66,7 +66,7 @@ export enum Bid_State { lost = 3, /** closed - BidClosed denotes state for bid closed */ closed = 4, - UNRECOGNIZED = -1, + UNRECOGNIZED = -1 } export function bid_StateFromJSON(object: any): Bid_State { @@ -127,17 +127,14 @@ function createBaseMsgCreateBid(): MsgCreateBid { order: undefined, provider: "", price: undefined, - deposit: undefined, + deposit: undefined }; } export const MsgCreateBid = { $type: "akash.market.v1beta1.MsgCreateBid" as const, - encode( - message: MsgCreateBid, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MsgCreateBid, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.order !== undefined) { OrderID.encode(message.order, writer.uint32(10).fork()).ldelim(); } @@ -186,45 +183,27 @@ export const MsgCreateBid = { order: isSet(object.order) ? OrderID.fromJSON(object.order) : undefined, provider: isSet(object.provider) ? String(object.provider) : "", price: isSet(object.price) ? Coin.fromJSON(object.price) : undefined, - deposit: isSet(object.deposit) - ? Coin.fromJSON(object.deposit) - : undefined, + deposit: isSet(object.deposit) ? Coin.fromJSON(object.deposit) : undefined }; }, toJSON(message: MsgCreateBid): unknown { const obj: any = {}; - message.order !== undefined && - (obj.order = message.order ? OrderID.toJSON(message.order) : undefined); + message.order !== undefined && (obj.order = message.order ? OrderID.toJSON(message.order) : undefined); message.provider !== undefined && (obj.provider = message.provider); - message.price !== undefined && - (obj.price = message.price ? Coin.toJSON(message.price) : undefined); - message.deposit !== undefined && - (obj.deposit = message.deposit - ? Coin.toJSON(message.deposit) - : undefined); + message.price !== undefined && (obj.price = message.price ? Coin.toJSON(message.price) : undefined); + message.deposit !== undefined && (obj.deposit = message.deposit ? Coin.toJSON(message.deposit) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): MsgCreateBid { + fromPartial, I>>(object: I): MsgCreateBid { const message = createBaseMsgCreateBid(); - message.order = - object.order !== undefined && object.order !== null - ? OrderID.fromPartial(object.order) - : undefined; + message.order = object.order !== undefined && object.order !== null ? OrderID.fromPartial(object.order) : undefined; message.provider = object.provider ?? ""; - message.price = - object.price !== undefined && object.price !== null - ? Coin.fromPartial(object.price) - : undefined; - message.deposit = - object.deposit !== undefined && object.deposit !== null - ? Coin.fromPartial(object.deposit) - : undefined; + message.price = object.price !== undefined && object.price !== null ? Coin.fromPartial(object.price) : undefined; + message.deposit = object.deposit !== undefined && object.deposit !== null ? Coin.fromPartial(object.deposit) : undefined; return message; - }, + } }; messageTypeRegistry.set(MsgCreateBid.$type, MsgCreateBid); @@ -236,17 +215,11 @@ function createBaseMsgCreateBidResponse(): MsgCreateBidResponse { export const MsgCreateBidResponse = { $type: "akash.market.v1beta1.MsgCreateBidResponse" as const, - encode( - _: MsgCreateBidResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: MsgCreateBidResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgCreateBidResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreateBidResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCreateBidResponse(); @@ -263,7 +236,7 @@ export const MsgCreateBidResponse = { fromJSON(_: any): MsgCreateBidResponse { return { - $type: MsgCreateBidResponse.$type, + $type: MsgCreateBidResponse.$type }; }, @@ -272,12 +245,10 @@ export const MsgCreateBidResponse = { return obj; }, - fromPartial, I>>( - _: I - ): MsgCreateBidResponse { + fromPartial, I>>(_: I): MsgCreateBidResponse { const message = createBaseMsgCreateBidResponse(); return message; - }, + } }; messageTypeRegistry.set(MsgCreateBidResponse.$type, MsgCreateBidResponse); @@ -289,10 +260,7 @@ function createBaseMsgCloseBid(): MsgCloseBid { export const MsgCloseBid = { $type: "akash.market.v1beta1.MsgCloseBid" as const, - encode( - message: MsgCloseBid, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MsgCloseBid, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.bidId !== undefined) { BidID.encode(message.bidId, writer.uint32(10).fork()).ldelim(); } @@ -320,27 +288,21 @@ export const MsgCloseBid = { fromJSON(object: any): MsgCloseBid { return { $type: MsgCloseBid.$type, - bidId: isSet(object.bidId) ? BidID.fromJSON(object.bidId) : undefined, + bidId: isSet(object.bidId) ? BidID.fromJSON(object.bidId) : undefined }; }, toJSON(message: MsgCloseBid): unknown { const obj: any = {}; - message.bidId !== undefined && - (obj.bidId = message.bidId ? BidID.toJSON(message.bidId) : undefined); + message.bidId !== undefined && (obj.bidId = message.bidId ? BidID.toJSON(message.bidId) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): MsgCloseBid { + fromPartial, I>>(object: I): MsgCloseBid { const message = createBaseMsgCloseBid(); - message.bidId = - object.bidId !== undefined && object.bidId !== null - ? BidID.fromPartial(object.bidId) - : undefined; + message.bidId = object.bidId !== undefined && object.bidId !== null ? BidID.fromPartial(object.bidId) : undefined; return message; - }, + } }; messageTypeRegistry.set(MsgCloseBid.$type, MsgCloseBid); @@ -352,10 +314,7 @@ function createBaseMsgCloseBidResponse(): MsgCloseBidResponse { export const MsgCloseBidResponse = { $type: "akash.market.v1beta1.MsgCloseBidResponse" as const, - encode( - _: MsgCloseBidResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: MsgCloseBidResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, @@ -376,7 +335,7 @@ export const MsgCloseBidResponse = { fromJSON(_: any): MsgCloseBidResponse { return { - $type: MsgCloseBidResponse.$type, + $type: MsgCloseBidResponse.$type }; }, @@ -385,12 +344,10 @@ export const MsgCloseBidResponse = { return obj; }, - fromPartial, I>>( - _: I - ): MsgCloseBidResponse { + fromPartial, I>>(_: I): MsgCloseBidResponse { const message = createBaseMsgCloseBidResponse(); return message; - }, + } }; messageTypeRegistry.set(MsgCloseBidResponse.$type, MsgCloseBidResponse); @@ -402,7 +359,7 @@ function createBaseBidID(): BidID { dseq: Long.UZERO, gseq: 0, oseq: 0, - provider: "", + provider: "" }; } @@ -465,15 +422,14 @@ export const BidID = { dseq: isSet(object.dseq) ? Long.fromString(object.dseq) : Long.UZERO, gseq: isSet(object.gseq) ? Number(object.gseq) : 0, oseq: isSet(object.oseq) ? Number(object.oseq) : 0, - provider: isSet(object.provider) ? String(object.provider) : "", + provider: isSet(object.provider) ? String(object.provider) : "" }; }, toJSON(message: BidID): unknown { const obj: any = {}; message.owner !== undefined && (obj.owner = message.owner); - message.dseq !== undefined && - (obj.dseq = (message.dseq || Long.UZERO).toString()); + message.dseq !== undefined && (obj.dseq = (message.dseq || Long.UZERO).toString()); message.gseq !== undefined && (obj.gseq = Math.round(message.gseq)); message.oseq !== undefined && (obj.oseq = Math.round(message.oseq)); message.provider !== undefined && (obj.provider = message.provider); @@ -483,15 +439,12 @@ export const BidID = { fromPartial, I>>(object: I): BidID { const message = createBaseBidID(); message.owner = object.owner ?? ""; - message.dseq = - object.dseq !== undefined && object.dseq !== null - ? Long.fromValue(object.dseq) - : Long.UZERO; + message.dseq = object.dseq !== undefined && object.dseq !== null ? Long.fromValue(object.dseq) : Long.UZERO; message.gseq = object.gseq ?? 0; message.oseq = object.oseq ?? 0; message.provider = object.provider ?? ""; return message; - }, + } }; messageTypeRegistry.set(BidID.$type, BidID); @@ -502,7 +455,7 @@ function createBaseBid(): Bid { bidId: undefined, state: 0, price: undefined, - createdAt: Long.ZERO, + createdAt: Long.ZERO }; } @@ -558,41 +511,27 @@ export const Bid = { bidId: isSet(object.bidId) ? BidID.fromJSON(object.bidId) : undefined, state: isSet(object.state) ? bid_StateFromJSON(object.state) : 0, price: isSet(object.price) ? Coin.fromJSON(object.price) : undefined, - createdAt: isSet(object.createdAt) - ? Long.fromString(object.createdAt) - : Long.ZERO, + createdAt: isSet(object.createdAt) ? Long.fromString(object.createdAt) : Long.ZERO }; }, toJSON(message: Bid): unknown { const obj: any = {}; - message.bidId !== undefined && - (obj.bidId = message.bidId ? BidID.toJSON(message.bidId) : undefined); + message.bidId !== undefined && (obj.bidId = message.bidId ? BidID.toJSON(message.bidId) : undefined); message.state !== undefined && (obj.state = bid_StateToJSON(message.state)); - message.price !== undefined && - (obj.price = message.price ? Coin.toJSON(message.price) : undefined); - message.createdAt !== undefined && - (obj.createdAt = (message.createdAt || Long.ZERO).toString()); + message.price !== undefined && (obj.price = message.price ? Coin.toJSON(message.price) : undefined); + message.createdAt !== undefined && (obj.createdAt = (message.createdAt || Long.ZERO).toString()); return obj; }, fromPartial, I>>(object: I): Bid { const message = createBaseBid(); - message.bidId = - object.bidId !== undefined && object.bidId !== null - ? BidID.fromPartial(object.bidId) - : undefined; + message.bidId = object.bidId !== undefined && object.bidId !== null ? BidID.fromPartial(object.bidId) : undefined; message.state = object.state ?? 0; - message.price = - object.price !== undefined && object.price !== null - ? Coin.fromPartial(object.price) - : undefined; - message.createdAt = - object.createdAt !== undefined && object.createdAt !== null - ? Long.fromValue(object.createdAt) - : Long.ZERO; + message.price = object.price !== undefined && object.price !== null ? Coin.fromPartial(object.price) : undefined; + message.createdAt = object.createdAt !== undefined && object.createdAt !== null ? Long.fromValue(object.createdAt) : Long.ZERO; return message; - }, + } }; messageTypeRegistry.set(Bid.$type, Bid); @@ -605,17 +544,14 @@ function createBaseBidFilters(): BidFilters { gseq: 0, oseq: 0, provider: "", - state: "", + state: "" }; } export const BidFilters = { $type: "akash.market.v1beta1.BidFilters" as const, - encode( - message: BidFilters, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: BidFilters, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -678,15 +614,14 @@ export const BidFilters = { gseq: isSet(object.gseq) ? Number(object.gseq) : 0, oseq: isSet(object.oseq) ? Number(object.oseq) : 0, provider: isSet(object.provider) ? String(object.provider) : "", - state: isSet(object.state) ? String(object.state) : "", + state: isSet(object.state) ? String(object.state) : "" }; }, toJSON(message: BidFilters): unknown { const obj: any = {}; message.owner !== undefined && (obj.owner = message.owner); - message.dseq !== undefined && - (obj.dseq = (message.dseq || Long.UZERO).toString()); + message.dseq !== undefined && (obj.dseq = (message.dseq || Long.UZERO).toString()); message.gseq !== undefined && (obj.gseq = Math.round(message.gseq)); message.oseq !== undefined && (obj.oseq = Math.round(message.oseq)); message.provider !== undefined && (obj.provider = message.provider); @@ -694,53 +629,38 @@ export const BidFilters = { return obj; }, - fromPartial, I>>( - object: I - ): BidFilters { + fromPartial, I>>(object: I): BidFilters { const message = createBaseBidFilters(); message.owner = object.owner ?? ""; - message.dseq = - object.dseq !== undefined && object.dseq !== null - ? Long.fromValue(object.dseq) - : Long.UZERO; + message.dseq = object.dseq !== undefined && object.dseq !== null ? Long.fromValue(object.dseq) : Long.UZERO; message.gseq = object.gseq ?? 0; message.oseq = object.oseq ?? 0; message.provider = object.provider ?? ""; message.state = object.state ?? ""; return message; - }, + } }; messageTypeRegistry.set(BidFilters.$type, BidFilters); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/market/v1beta1/genesis.ts b/src/protobuf/akash/market/v1beta1/genesis.ts index 9236d87..38f608e 100644 --- a/src/protobuf/akash/market/v1beta1/genesis.ts +++ b/src/protobuf/akash/market/v1beta1/genesis.ts @@ -21,17 +21,14 @@ function createBaseGenesisState(): GenesisState { $type: "akash.market.v1beta1.GenesisState", orders: [], leases: [], - params: undefined, + params: undefined }; } export const GenesisState = { $type: "akash.market.v1beta1.GenesisState" as const, - encode( - message: GenesisState, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: GenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.orders) { Order.encode(v!, writer.uint32(10).fork()).ldelim(); } @@ -71,77 +68,57 @@ export const GenesisState = { fromJSON(object: any): GenesisState { return { $type: GenesisState.$type, - orders: Array.isArray(object?.orders) - ? object.orders.map((e: any) => Order.fromJSON(e)) - : [], - leases: Array.isArray(object?.leases) - ? object.leases.map((e: any) => Lease.fromJSON(e)) - : [], - params: isSet(object.params) ? Params.fromJSON(object.params) : undefined, + orders: Array.isArray(object?.orders) ? object.orders.map((e: any) => Order.fromJSON(e)) : [], + leases: Array.isArray(object?.leases) ? object.leases.map((e: any) => Lease.fromJSON(e)) : [], + params: isSet(object.params) ? Params.fromJSON(object.params) : undefined }; }, toJSON(message: GenesisState): unknown { const obj: any = {}; if (message.orders) { - obj.orders = message.orders.map((e) => (e ? Order.toJSON(e) : undefined)); + obj.orders = message.orders.map(e => (e ? Order.toJSON(e) : undefined)); } else { obj.orders = []; } if (message.leases) { - obj.leases = message.leases.map((e) => (e ? Lease.toJSON(e) : undefined)); + obj.leases = message.leases.map(e => (e ? Lease.toJSON(e) : undefined)); } else { obj.leases = []; } - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); + message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): GenesisState { + fromPartial, I>>(object: I): GenesisState { const message = createBaseGenesisState(); - message.orders = object.orders?.map((e) => Order.fromPartial(e)) || []; - message.leases = object.leases?.map((e) => Lease.fromPartial(e)) || []; - message.params = - object.params !== undefined && object.params !== null - ? Params.fromPartial(object.params) - : undefined; + message.orders = object.orders?.map(e => Order.fromPartial(e)) || []; + message.leases = object.leases?.map(e => Lease.fromPartial(e)) || []; + message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; return message; - }, + } }; messageTypeRegistry.set(GenesisState.$type, GenesisState); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/market/v1beta1/lease.ts b/src/protobuf/akash/market/v1beta1/lease.ts index be5381c..b663024 100644 --- a/src/protobuf/akash/market/v1beta1/lease.ts +++ b/src/protobuf/akash/market/v1beta1/lease.ts @@ -36,7 +36,7 @@ export enum Lease_State { insufficient_funds = 2, /** closed - LeaseClosed denotes state for lease closed */ closed = 3, - UNRECOGNIZED = -1, + UNRECOGNIZED = -1 } export function lease_StateFromJSON(object: any): Lease_State { @@ -126,17 +126,14 @@ function createBaseLeaseID(): LeaseID { dseq: Long.UZERO, gseq: 0, oseq: 0, - provider: "", + provider: "" }; } export const LeaseID = { $type: "akash.market.v1beta1.LeaseID" as const, - encode( - message: LeaseID, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: LeaseID, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -192,15 +189,14 @@ export const LeaseID = { dseq: isSet(object.dseq) ? Long.fromString(object.dseq) : Long.UZERO, gseq: isSet(object.gseq) ? Number(object.gseq) : 0, oseq: isSet(object.oseq) ? Number(object.oseq) : 0, - provider: isSet(object.provider) ? String(object.provider) : "", + provider: isSet(object.provider) ? String(object.provider) : "" }; }, toJSON(message: LeaseID): unknown { const obj: any = {}; message.owner !== undefined && (obj.owner = message.owner); - message.dseq !== undefined && - (obj.dseq = (message.dseq || Long.UZERO).toString()); + message.dseq !== undefined && (obj.dseq = (message.dseq || Long.UZERO).toString()); message.gseq !== undefined && (obj.gseq = Math.round(message.gseq)); message.oseq !== undefined && (obj.oseq = Math.round(message.oseq)); message.provider !== undefined && (obj.provider = message.provider); @@ -210,15 +206,12 @@ export const LeaseID = { fromPartial, I>>(object: I): LeaseID { const message = createBaseLeaseID(); message.owner = object.owner ?? ""; - message.dseq = - object.dseq !== undefined && object.dseq !== null - ? Long.fromValue(object.dseq) - : Long.UZERO; + message.dseq = object.dseq !== undefined && object.dseq !== null ? Long.fromValue(object.dseq) : Long.UZERO; message.gseq = object.gseq ?? 0; message.oseq = object.oseq ?? 0; message.provider = object.provider ?? ""; return message; - }, + } }; messageTypeRegistry.set(LeaseID.$type, LeaseID); @@ -229,7 +222,7 @@ function createBaseLease(): Lease { leaseId: undefined, state: 0, price: undefined, - createdAt: Long.ZERO, + createdAt: Long.ZERO }; } @@ -282,49 +275,30 @@ export const Lease = { fromJSON(object: any): Lease { return { $type: Lease.$type, - leaseId: isSet(object.leaseId) - ? LeaseID.fromJSON(object.leaseId) - : undefined, + leaseId: isSet(object.leaseId) ? LeaseID.fromJSON(object.leaseId) : undefined, state: isSet(object.state) ? lease_StateFromJSON(object.state) : 0, price: isSet(object.price) ? Coin.fromJSON(object.price) : undefined, - createdAt: isSet(object.createdAt) - ? Long.fromString(object.createdAt) - : Long.ZERO, + createdAt: isSet(object.createdAt) ? Long.fromString(object.createdAt) : Long.ZERO }; }, toJSON(message: Lease): unknown { const obj: any = {}; - message.leaseId !== undefined && - (obj.leaseId = message.leaseId - ? LeaseID.toJSON(message.leaseId) - : undefined); - message.state !== undefined && - (obj.state = lease_StateToJSON(message.state)); - message.price !== undefined && - (obj.price = message.price ? Coin.toJSON(message.price) : undefined); - message.createdAt !== undefined && - (obj.createdAt = (message.createdAt || Long.ZERO).toString()); + message.leaseId !== undefined && (obj.leaseId = message.leaseId ? LeaseID.toJSON(message.leaseId) : undefined); + message.state !== undefined && (obj.state = lease_StateToJSON(message.state)); + message.price !== undefined && (obj.price = message.price ? Coin.toJSON(message.price) : undefined); + message.createdAt !== undefined && (obj.createdAt = (message.createdAt || Long.ZERO).toString()); return obj; }, fromPartial, I>>(object: I): Lease { const message = createBaseLease(); - message.leaseId = - object.leaseId !== undefined && object.leaseId !== null - ? LeaseID.fromPartial(object.leaseId) - : undefined; + message.leaseId = object.leaseId !== undefined && object.leaseId !== null ? LeaseID.fromPartial(object.leaseId) : undefined; message.state = object.state ?? 0; - message.price = - object.price !== undefined && object.price !== null - ? Coin.fromPartial(object.price) - : undefined; - message.createdAt = - object.createdAt !== undefined && object.createdAt !== null - ? Long.fromValue(object.createdAt) - : Long.ZERO; + message.price = object.price !== undefined && object.price !== null ? Coin.fromPartial(object.price) : undefined; + message.createdAt = object.createdAt !== undefined && object.createdAt !== null ? Long.fromValue(object.createdAt) : Long.ZERO; return message; - }, + } }; messageTypeRegistry.set(Lease.$type, Lease); @@ -337,17 +311,14 @@ function createBaseLeaseFilters(): LeaseFilters { gseq: 0, oseq: 0, provider: "", - state: "", + state: "" }; } export const LeaseFilters = { $type: "akash.market.v1beta1.LeaseFilters" as const, - encode( - message: LeaseFilters, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: LeaseFilters, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -410,15 +381,14 @@ export const LeaseFilters = { gseq: isSet(object.gseq) ? Number(object.gseq) : 0, oseq: isSet(object.oseq) ? Number(object.oseq) : 0, provider: isSet(object.provider) ? String(object.provider) : "", - state: isSet(object.state) ? String(object.state) : "", + state: isSet(object.state) ? String(object.state) : "" }; }, toJSON(message: LeaseFilters): unknown { const obj: any = {}; message.owner !== undefined && (obj.owner = message.owner); - message.dseq !== undefined && - (obj.dseq = (message.dseq || Long.UZERO).toString()); + message.dseq !== undefined && (obj.dseq = (message.dseq || Long.UZERO).toString()); message.gseq !== undefined && (obj.gseq = Math.round(message.gseq)); message.oseq !== undefined && (obj.oseq = Math.round(message.oseq)); message.provider !== undefined && (obj.provider = message.provider); @@ -426,21 +396,16 @@ export const LeaseFilters = { return obj; }, - fromPartial, I>>( - object: I - ): LeaseFilters { + fromPartial, I>>(object: I): LeaseFilters { const message = createBaseLeaseFilters(); message.owner = object.owner ?? ""; - message.dseq = - object.dseq !== undefined && object.dseq !== null - ? Long.fromValue(object.dseq) - : Long.UZERO; + message.dseq = object.dseq !== undefined && object.dseq !== null ? Long.fromValue(object.dseq) : Long.UZERO; message.gseq = object.gseq ?? 0; message.oseq = object.oseq ?? 0; message.provider = object.provider ?? ""; message.state = object.state ?? ""; return message; - }, + } }; messageTypeRegistry.set(LeaseFilters.$type, LeaseFilters); @@ -452,10 +417,7 @@ function createBaseMsgCreateLease(): MsgCreateLease { export const MsgCreateLease = { $type: "akash.market.v1beta1.MsgCreateLease" as const, - encode( - message: MsgCreateLease, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MsgCreateLease, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.bidId !== undefined) { BidID.encode(message.bidId, writer.uint32(10).fork()).ldelim(); } @@ -483,27 +445,21 @@ export const MsgCreateLease = { fromJSON(object: any): MsgCreateLease { return { $type: MsgCreateLease.$type, - bidId: isSet(object.bidId) ? BidID.fromJSON(object.bidId) : undefined, + bidId: isSet(object.bidId) ? BidID.fromJSON(object.bidId) : undefined }; }, toJSON(message: MsgCreateLease): unknown { const obj: any = {}; - message.bidId !== undefined && - (obj.bidId = message.bidId ? BidID.toJSON(message.bidId) : undefined); + message.bidId !== undefined && (obj.bidId = message.bidId ? BidID.toJSON(message.bidId) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): MsgCreateLease { + fromPartial, I>>(object: I): MsgCreateLease { const message = createBaseMsgCreateLease(); - message.bidId = - object.bidId !== undefined && object.bidId !== null - ? BidID.fromPartial(object.bidId) - : undefined; + message.bidId = object.bidId !== undefined && object.bidId !== null ? BidID.fromPartial(object.bidId) : undefined; return message; - }, + } }; messageTypeRegistry.set(MsgCreateLease.$type, MsgCreateLease); @@ -515,17 +471,11 @@ function createBaseMsgCreateLeaseResponse(): MsgCreateLeaseResponse { export const MsgCreateLeaseResponse = { $type: "akash.market.v1beta1.MsgCreateLeaseResponse" as const, - encode( - _: MsgCreateLeaseResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: MsgCreateLeaseResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgCreateLeaseResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreateLeaseResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCreateLeaseResponse(); @@ -542,7 +492,7 @@ export const MsgCreateLeaseResponse = { fromJSON(_: any): MsgCreateLeaseResponse { return { - $type: MsgCreateLeaseResponse.$type, + $type: MsgCreateLeaseResponse.$type }; }, @@ -551,12 +501,10 @@ export const MsgCreateLeaseResponse = { return obj; }, - fromPartial, I>>( - _: I - ): MsgCreateLeaseResponse { + fromPartial, I>>(_: I): MsgCreateLeaseResponse { const message = createBaseMsgCreateLeaseResponse(); return message; - }, + } }; messageTypeRegistry.set(MsgCreateLeaseResponse.$type, MsgCreateLeaseResponse); @@ -568,10 +516,7 @@ function createBaseMsgWithdrawLease(): MsgWithdrawLease { export const MsgWithdrawLease = { $type: "akash.market.v1beta1.MsgWithdrawLease" as const, - encode( - message: MsgWithdrawLease, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MsgWithdrawLease, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.bidId !== undefined) { LeaseID.encode(message.bidId, writer.uint32(10).fork()).ldelim(); } @@ -599,27 +544,21 @@ export const MsgWithdrawLease = { fromJSON(object: any): MsgWithdrawLease { return { $type: MsgWithdrawLease.$type, - bidId: isSet(object.bidId) ? LeaseID.fromJSON(object.bidId) : undefined, + bidId: isSet(object.bidId) ? LeaseID.fromJSON(object.bidId) : undefined }; }, toJSON(message: MsgWithdrawLease): unknown { const obj: any = {}; - message.bidId !== undefined && - (obj.bidId = message.bidId ? LeaseID.toJSON(message.bidId) : undefined); + message.bidId !== undefined && (obj.bidId = message.bidId ? LeaseID.toJSON(message.bidId) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): MsgWithdrawLease { + fromPartial, I>>(object: I): MsgWithdrawLease { const message = createBaseMsgWithdrawLease(); - message.bidId = - object.bidId !== undefined && object.bidId !== null - ? LeaseID.fromPartial(object.bidId) - : undefined; + message.bidId = object.bidId !== undefined && object.bidId !== null ? LeaseID.fromPartial(object.bidId) : undefined; return message; - }, + } }; messageTypeRegistry.set(MsgWithdrawLease.$type, MsgWithdrawLease); @@ -631,17 +570,11 @@ function createBaseMsgWithdrawLeaseResponse(): MsgWithdrawLeaseResponse { export const MsgWithdrawLeaseResponse = { $type: "akash.market.v1beta1.MsgWithdrawLeaseResponse" as const, - encode( - _: MsgWithdrawLeaseResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: MsgWithdrawLeaseResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgWithdrawLeaseResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgWithdrawLeaseResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgWithdrawLeaseResponse(); @@ -658,7 +591,7 @@ export const MsgWithdrawLeaseResponse = { fromJSON(_: any): MsgWithdrawLeaseResponse { return { - $type: MsgWithdrawLeaseResponse.$type, + $type: MsgWithdrawLeaseResponse.$type }; }, @@ -667,18 +600,13 @@ export const MsgWithdrawLeaseResponse = { return obj; }, - fromPartial, I>>( - _: I - ): MsgWithdrawLeaseResponse { + fromPartial, I>>(_: I): MsgWithdrawLeaseResponse { const message = createBaseMsgWithdrawLeaseResponse(); return message; - }, + } }; -messageTypeRegistry.set( - MsgWithdrawLeaseResponse.$type, - MsgWithdrawLeaseResponse -); +messageTypeRegistry.set(MsgWithdrawLeaseResponse.$type, MsgWithdrawLeaseResponse); function createBaseMsgCloseLease(): MsgCloseLease { return { $type: "akash.market.v1beta1.MsgCloseLease", leaseId: undefined }; @@ -687,10 +615,7 @@ function createBaseMsgCloseLease(): MsgCloseLease { export const MsgCloseLease = { $type: "akash.market.v1beta1.MsgCloseLease" as const, - encode( - message: MsgCloseLease, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MsgCloseLease, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.leaseId !== undefined) { LeaseID.encode(message.leaseId, writer.uint32(10).fork()).ldelim(); } @@ -718,31 +643,21 @@ export const MsgCloseLease = { fromJSON(object: any): MsgCloseLease { return { $type: MsgCloseLease.$type, - leaseId: isSet(object.leaseId) - ? LeaseID.fromJSON(object.leaseId) - : undefined, + leaseId: isSet(object.leaseId) ? LeaseID.fromJSON(object.leaseId) : undefined }; }, toJSON(message: MsgCloseLease): unknown { const obj: any = {}; - message.leaseId !== undefined && - (obj.leaseId = message.leaseId - ? LeaseID.toJSON(message.leaseId) - : undefined); + message.leaseId !== undefined && (obj.leaseId = message.leaseId ? LeaseID.toJSON(message.leaseId) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): MsgCloseLease { + fromPartial, I>>(object: I): MsgCloseLease { const message = createBaseMsgCloseLease(); - message.leaseId = - object.leaseId !== undefined && object.leaseId !== null - ? LeaseID.fromPartial(object.leaseId) - : undefined; + message.leaseId = object.leaseId !== undefined && object.leaseId !== null ? LeaseID.fromPartial(object.leaseId) : undefined; return message; - }, + } }; messageTypeRegistry.set(MsgCloseLease.$type, MsgCloseLease); @@ -754,17 +669,11 @@ function createBaseMsgCloseLeaseResponse(): MsgCloseLeaseResponse { export const MsgCloseLeaseResponse = { $type: "akash.market.v1beta1.MsgCloseLeaseResponse" as const, - encode( - _: MsgCloseLeaseResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: MsgCloseLeaseResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgCloseLeaseResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgCloseLeaseResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCloseLeaseResponse(); @@ -781,7 +690,7 @@ export const MsgCloseLeaseResponse = { fromJSON(_: any): MsgCloseLeaseResponse { return { - $type: MsgCloseLeaseResponse.$type, + $type: MsgCloseLeaseResponse.$type }; }, @@ -790,44 +699,32 @@ export const MsgCloseLeaseResponse = { return obj; }, - fromPartial, I>>( - _: I - ): MsgCloseLeaseResponse { + fromPartial, I>>(_: I): MsgCloseLeaseResponse { const message = createBaseMsgCloseLeaseResponse(); return message; - }, + } }; messageTypeRegistry.set(MsgCloseLeaseResponse.$type, MsgCloseLeaseResponse); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/market/v1beta1/order.ts b/src/protobuf/akash/market/v1beta1/order.ts index 5b25827..b4eed28 100644 --- a/src/protobuf/akash/market/v1beta1/order.ts +++ b/src/protobuf/akash/market/v1beta1/order.ts @@ -34,7 +34,7 @@ export enum Order_State { active = 2, /** closed - OrderClosed denotes state for order lost */ closed = 3, - UNRECOGNIZED = -1, + UNRECOGNIZED = -1 } export function order_StateFromJSON(object: any): Order_State { @@ -89,17 +89,14 @@ function createBaseOrderID(): OrderID { owner: "", dseq: Long.UZERO, gseq: 0, - oseq: 0, + oseq: 0 }; } export const OrderID = { $type: "akash.market.v1beta1.OrderID" as const, - encode( - message: OrderID, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: OrderID, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -148,15 +145,14 @@ export const OrderID = { owner: isSet(object.owner) ? String(object.owner) : "", dseq: isSet(object.dseq) ? Long.fromString(object.dseq) : Long.UZERO, gseq: isSet(object.gseq) ? Number(object.gseq) : 0, - oseq: isSet(object.oseq) ? Number(object.oseq) : 0, + oseq: isSet(object.oseq) ? Number(object.oseq) : 0 }; }, toJSON(message: OrderID): unknown { const obj: any = {}; message.owner !== undefined && (obj.owner = message.owner); - message.dseq !== undefined && - (obj.dseq = (message.dseq || Long.UZERO).toString()); + message.dseq !== undefined && (obj.dseq = (message.dseq || Long.UZERO).toString()); message.gseq !== undefined && (obj.gseq = Math.round(message.gseq)); message.oseq !== undefined && (obj.oseq = Math.round(message.oseq)); return obj; @@ -165,14 +161,11 @@ export const OrderID = { fromPartial, I>>(object: I): OrderID { const message = createBaseOrderID(); message.owner = object.owner ?? ""; - message.dseq = - object.dseq !== undefined && object.dseq !== null - ? Long.fromValue(object.dseq) - : Long.UZERO; + message.dseq = object.dseq !== undefined && object.dseq !== null ? Long.fromValue(object.dseq) : Long.UZERO; message.gseq = object.gseq ?? 0; message.oseq = object.oseq ?? 0; return message; - }, + } }; messageTypeRegistry.set(OrderID.$type, OrderID); @@ -183,7 +176,7 @@ function createBaseOrder(): Order { orderId: undefined, state: 0, spec: undefined, - createdAt: Long.ZERO, + createdAt: Long.ZERO }; } @@ -236,49 +229,30 @@ export const Order = { fromJSON(object: any): Order { return { $type: Order.$type, - orderId: isSet(object.orderId) - ? OrderID.fromJSON(object.orderId) - : undefined, + orderId: isSet(object.orderId) ? OrderID.fromJSON(object.orderId) : undefined, state: isSet(object.state) ? order_StateFromJSON(object.state) : 0, spec: isSet(object.spec) ? GroupSpec.fromJSON(object.spec) : undefined, - createdAt: isSet(object.createdAt) - ? Long.fromString(object.createdAt) - : Long.ZERO, + createdAt: isSet(object.createdAt) ? Long.fromString(object.createdAt) : Long.ZERO }; }, toJSON(message: Order): unknown { const obj: any = {}; - message.orderId !== undefined && - (obj.orderId = message.orderId - ? OrderID.toJSON(message.orderId) - : undefined); - message.state !== undefined && - (obj.state = order_StateToJSON(message.state)); - message.spec !== undefined && - (obj.spec = message.spec ? GroupSpec.toJSON(message.spec) : undefined); - message.createdAt !== undefined && - (obj.createdAt = (message.createdAt || Long.ZERO).toString()); + message.orderId !== undefined && (obj.orderId = message.orderId ? OrderID.toJSON(message.orderId) : undefined); + message.state !== undefined && (obj.state = order_StateToJSON(message.state)); + message.spec !== undefined && (obj.spec = message.spec ? GroupSpec.toJSON(message.spec) : undefined); + message.createdAt !== undefined && (obj.createdAt = (message.createdAt || Long.ZERO).toString()); return obj; }, fromPartial, I>>(object: I): Order { const message = createBaseOrder(); - message.orderId = - object.orderId !== undefined && object.orderId !== null - ? OrderID.fromPartial(object.orderId) - : undefined; + message.orderId = object.orderId !== undefined && object.orderId !== null ? OrderID.fromPartial(object.orderId) : undefined; message.state = object.state ?? 0; - message.spec = - object.spec !== undefined && object.spec !== null - ? GroupSpec.fromPartial(object.spec) - : undefined; - message.createdAt = - object.createdAt !== undefined && object.createdAt !== null - ? Long.fromValue(object.createdAt) - : Long.ZERO; + message.spec = object.spec !== undefined && object.spec !== null ? GroupSpec.fromPartial(object.spec) : undefined; + message.createdAt = object.createdAt !== undefined && object.createdAt !== null ? Long.fromValue(object.createdAt) : Long.ZERO; return message; - }, + } }; messageTypeRegistry.set(Order.$type, Order); @@ -290,17 +264,14 @@ function createBaseOrderFilters(): OrderFilters { dseq: Long.UZERO, gseq: 0, oseq: 0, - state: "", + state: "" }; } export const OrderFilters = { $type: "akash.market.v1beta1.OrderFilters" as const, - encode( - message: OrderFilters, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: OrderFilters, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -356,67 +327,51 @@ export const OrderFilters = { dseq: isSet(object.dseq) ? Long.fromString(object.dseq) : Long.UZERO, gseq: isSet(object.gseq) ? Number(object.gseq) : 0, oseq: isSet(object.oseq) ? Number(object.oseq) : 0, - state: isSet(object.state) ? String(object.state) : "", + state: isSet(object.state) ? String(object.state) : "" }; }, toJSON(message: OrderFilters): unknown { const obj: any = {}; message.owner !== undefined && (obj.owner = message.owner); - message.dseq !== undefined && - (obj.dseq = (message.dseq || Long.UZERO).toString()); + message.dseq !== undefined && (obj.dseq = (message.dseq || Long.UZERO).toString()); message.gseq !== undefined && (obj.gseq = Math.round(message.gseq)); message.oseq !== undefined && (obj.oseq = Math.round(message.oseq)); message.state !== undefined && (obj.state = message.state); return obj; }, - fromPartial, I>>( - object: I - ): OrderFilters { + fromPartial, I>>(object: I): OrderFilters { const message = createBaseOrderFilters(); message.owner = object.owner ?? ""; - message.dseq = - object.dseq !== undefined && object.dseq !== null - ? Long.fromValue(object.dseq) - : Long.UZERO; + message.dseq = object.dseq !== undefined && object.dseq !== null ? Long.fromValue(object.dseq) : Long.UZERO; message.gseq = object.gseq ?? 0; message.oseq = object.oseq ?? 0; message.state = object.state ?? ""; return message; - }, + } }; messageTypeRegistry.set(OrderFilters.$type, OrderFilters); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/market/v1beta1/params.ts b/src/protobuf/akash/market/v1beta1/params.ts index 500099d..913ce27 100644 --- a/src/protobuf/akash/market/v1beta1/params.ts +++ b/src/protobuf/akash/market/v1beta1/params.ts @@ -17,17 +17,14 @@ function createBaseParams(): Params { return { $type: "akash.market.v1beta1.Params", bidMinDeposit: undefined, - orderMaxBids: 0, + orderMaxBids: 0 }; } export const Params = { $type: "akash.market.v1beta1.Params" as const, - encode( - message: Params, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Params, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.bidMinDeposit !== undefined) { Coin.encode(message.bidMinDeposit, writer.uint32(10).fork()).ldelim(); } @@ -61,67 +58,46 @@ export const Params = { fromJSON(object: any): Params { return { $type: Params.$type, - bidMinDeposit: isSet(object.bidMinDeposit) - ? Coin.fromJSON(object.bidMinDeposit) - : undefined, - orderMaxBids: isSet(object.orderMaxBids) - ? Number(object.orderMaxBids) - : 0, + bidMinDeposit: isSet(object.bidMinDeposit) ? Coin.fromJSON(object.bidMinDeposit) : undefined, + orderMaxBids: isSet(object.orderMaxBids) ? Number(object.orderMaxBids) : 0 }; }, toJSON(message: Params): unknown { const obj: any = {}; - message.bidMinDeposit !== undefined && - (obj.bidMinDeposit = message.bidMinDeposit - ? Coin.toJSON(message.bidMinDeposit) - : undefined); - message.orderMaxBids !== undefined && - (obj.orderMaxBids = Math.round(message.orderMaxBids)); + message.bidMinDeposit !== undefined && (obj.bidMinDeposit = message.bidMinDeposit ? Coin.toJSON(message.bidMinDeposit) : undefined); + message.orderMaxBids !== undefined && (obj.orderMaxBids = Math.round(message.orderMaxBids)); return obj; }, fromPartial, I>>(object: I): Params { const message = createBaseParams(); - message.bidMinDeposit = - object.bidMinDeposit !== undefined && object.bidMinDeposit !== null - ? Coin.fromPartial(object.bidMinDeposit) - : undefined; + message.bidMinDeposit = object.bidMinDeposit !== undefined && object.bidMinDeposit !== null ? Coin.fromPartial(object.bidMinDeposit) : undefined; message.orderMaxBids = object.orderMaxBids ?? 0; return message; - }, + } }; messageTypeRegistry.set(Params.$type, Params); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/market/v1beta1/query.ts b/src/protobuf/akash/market/v1beta1/query.ts index 8227b1f..d1e6520 100644 --- a/src/protobuf/akash/market/v1beta1/query.ts +++ b/src/protobuf/akash/market/v1beta1/query.ts @@ -2,22 +2,11 @@ import { messageTypeRegistry } from "../../../typeRegistry"; import Long from "long"; import _m0 from "protobufjs/minimal"; -import { - OrderFilters, - OrderID, - Order, -} from "../../../akash/market/v1beta1/order"; -import { - PageRequest, - PageResponse, -} from "../../../cosmos/base/query/v1beta1/pagination"; +import { OrderFilters, OrderID, Order } from "../../../akash/market/v1beta1/order"; +import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; import { BidFilters, BidID, Bid } from "../../../akash/market/v1beta1/bid"; import { Account, Payment } from "../../../akash/escrow/v1beta1/types"; -import { - LeaseFilters, - LeaseID, - Lease, -} from "../../../akash/market/v1beta1/lease"; +import { LeaseFilters, LeaseID, Lease } from "../../../akash/market/v1beta1/lease"; export const protobufPackage = "akash.market.v1beta1"; @@ -105,17 +94,14 @@ function createBaseQueryOrdersRequest(): QueryOrdersRequest { return { $type: "akash.market.v1beta1.QueryOrdersRequest", filters: undefined, - pagination: undefined, + pagination: undefined }; } export const QueryOrdersRequest = { $type: "akash.market.v1beta1.QueryOrdersRequest" as const, - encode( - message: QueryOrdersRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryOrdersRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.filters !== undefined) { OrderFilters.encode(message.filters, writer.uint32(10).fork()).ldelim(); } @@ -149,42 +135,24 @@ export const QueryOrdersRequest = { fromJSON(object: any): QueryOrdersRequest { return { $type: QueryOrdersRequest.$type, - filters: isSet(object.filters) - ? OrderFilters.fromJSON(object.filters) - : undefined, - pagination: isSet(object.pagination) - ? PageRequest.fromJSON(object.pagination) - : undefined, + filters: isSet(object.filters) ? OrderFilters.fromJSON(object.filters) : undefined, + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined }; }, toJSON(message: QueryOrdersRequest): unknown { const obj: any = {}; - message.filters !== undefined && - (obj.filters = message.filters - ? OrderFilters.toJSON(message.filters) - : undefined); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); + message.filters !== undefined && (obj.filters = message.filters ? OrderFilters.toJSON(message.filters) : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryOrdersRequest { + fromPartial, I>>(object: I): QueryOrdersRequest { const message = createBaseQueryOrdersRequest(); - message.filters = - object.filters !== undefined && object.filters !== null - ? OrderFilters.fromPartial(object.filters) - : undefined; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; + message.filters = object.filters !== undefined && object.filters !== null ? OrderFilters.fromPartial(object.filters) : undefined; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryOrdersRequest.$type, QueryOrdersRequest); @@ -193,25 +161,19 @@ function createBaseQueryOrdersResponse(): QueryOrdersResponse { return { $type: "akash.market.v1beta1.QueryOrdersResponse", orders: [], - pagination: undefined, + pagination: undefined }; } export const QueryOrdersResponse = { $type: "akash.market.v1beta1.QueryOrdersResponse" as const, - encode( - message: QueryOrdersResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryOrdersResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.orders) { Order.encode(v!, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); + PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } return writer; }, @@ -240,40 +202,28 @@ export const QueryOrdersResponse = { fromJSON(object: any): QueryOrdersResponse { return { $type: QueryOrdersResponse.$type, - orders: Array.isArray(object?.orders) - ? object.orders.map((e: any) => Order.fromJSON(e)) - : [], - pagination: isSet(object.pagination) - ? PageResponse.fromJSON(object.pagination) - : undefined, + orders: Array.isArray(object?.orders) ? object.orders.map((e: any) => Order.fromJSON(e)) : [], + pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined }; }, toJSON(message: QueryOrdersResponse): unknown { const obj: any = {}; if (message.orders) { - obj.orders = message.orders.map((e) => (e ? Order.toJSON(e) : undefined)); + obj.orders = message.orders.map(e => (e ? Order.toJSON(e) : undefined)); } else { obj.orders = []; } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryOrdersResponse { + fromPartial, I>>(object: I): QueryOrdersResponse { const message = createBaseQueryOrdersResponse(); - message.orders = object.orders?.map((e) => Order.fromPartial(e)) || []; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageResponse.fromPartial(object.pagination) - : undefined; + message.orders = object.orders?.map(e => Order.fromPartial(e)) || []; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryOrdersResponse.$type, QueryOrdersResponse); @@ -285,10 +235,7 @@ function createBaseQueryOrderRequest(): QueryOrderRequest { export const QueryOrderRequest = { $type: "akash.market.v1beta1.QueryOrderRequest" as const, - encode( - message: QueryOrderRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryOrderRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { OrderID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -316,27 +263,21 @@ export const QueryOrderRequest = { fromJSON(object: any): QueryOrderRequest { return { $type: QueryOrderRequest.$type, - id: isSet(object.id) ? OrderID.fromJSON(object.id) : undefined, + id: isSet(object.id) ? OrderID.fromJSON(object.id) : undefined }; }, toJSON(message: QueryOrderRequest): unknown { const obj: any = {}; - message.id !== undefined && - (obj.id = message.id ? OrderID.toJSON(message.id) : undefined); + message.id !== undefined && (obj.id = message.id ? OrderID.toJSON(message.id) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryOrderRequest { + fromPartial, I>>(object: I): QueryOrderRequest { const message = createBaseQueryOrderRequest(); - message.id = - object.id !== undefined && object.id !== null - ? OrderID.fromPartial(object.id) - : undefined; + message.id = object.id !== undefined && object.id !== null ? OrderID.fromPartial(object.id) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryOrderRequest.$type, QueryOrderRequest); @@ -348,10 +289,7 @@ function createBaseQueryOrderResponse(): QueryOrderResponse { export const QueryOrderResponse = { $type: "akash.market.v1beta1.QueryOrderResponse" as const, - encode( - message: QueryOrderResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryOrderResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.order !== undefined) { Order.encode(message.order, writer.uint32(10).fork()).ldelim(); } @@ -379,27 +317,21 @@ export const QueryOrderResponse = { fromJSON(object: any): QueryOrderResponse { return { $type: QueryOrderResponse.$type, - order: isSet(object.order) ? Order.fromJSON(object.order) : undefined, + order: isSet(object.order) ? Order.fromJSON(object.order) : undefined }; }, toJSON(message: QueryOrderResponse): unknown { const obj: any = {}; - message.order !== undefined && - (obj.order = message.order ? Order.toJSON(message.order) : undefined); + message.order !== undefined && (obj.order = message.order ? Order.toJSON(message.order) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryOrderResponse { + fromPartial, I>>(object: I): QueryOrderResponse { const message = createBaseQueryOrderResponse(); - message.order = - object.order !== undefined && object.order !== null - ? Order.fromPartial(object.order) - : undefined; + message.order = object.order !== undefined && object.order !== null ? Order.fromPartial(object.order) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryOrderResponse.$type, QueryOrderResponse); @@ -408,17 +340,14 @@ function createBaseQueryBidsRequest(): QueryBidsRequest { return { $type: "akash.market.v1beta1.QueryBidsRequest", filters: undefined, - pagination: undefined, + pagination: undefined }; } export const QueryBidsRequest = { $type: "akash.market.v1beta1.QueryBidsRequest" as const, - encode( - message: QueryBidsRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryBidsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.filters !== undefined) { BidFilters.encode(message.filters, writer.uint32(10).fork()).ldelim(); } @@ -452,42 +381,24 @@ export const QueryBidsRequest = { fromJSON(object: any): QueryBidsRequest { return { $type: QueryBidsRequest.$type, - filters: isSet(object.filters) - ? BidFilters.fromJSON(object.filters) - : undefined, - pagination: isSet(object.pagination) - ? PageRequest.fromJSON(object.pagination) - : undefined, + filters: isSet(object.filters) ? BidFilters.fromJSON(object.filters) : undefined, + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined }; }, toJSON(message: QueryBidsRequest): unknown { const obj: any = {}; - message.filters !== undefined && - (obj.filters = message.filters - ? BidFilters.toJSON(message.filters) - : undefined); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); + message.filters !== undefined && (obj.filters = message.filters ? BidFilters.toJSON(message.filters) : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryBidsRequest { + fromPartial, I>>(object: I): QueryBidsRequest { const message = createBaseQueryBidsRequest(); - message.filters = - object.filters !== undefined && object.filters !== null - ? BidFilters.fromPartial(object.filters) - : undefined; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; + message.filters = object.filters !== undefined && object.filters !== null ? BidFilters.fromPartial(object.filters) : undefined; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryBidsRequest.$type, QueryBidsRequest); @@ -496,25 +407,19 @@ function createBaseQueryBidsResponse(): QueryBidsResponse { return { $type: "akash.market.v1beta1.QueryBidsResponse", bids: [], - pagination: undefined, + pagination: undefined }; } export const QueryBidsResponse = { $type: "akash.market.v1beta1.QueryBidsResponse" as const, - encode( - message: QueryBidsResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryBidsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.bids) { QueryBidResponse.encode(v!, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); + PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } return writer; }, @@ -543,43 +448,28 @@ export const QueryBidsResponse = { fromJSON(object: any): QueryBidsResponse { return { $type: QueryBidsResponse.$type, - bids: Array.isArray(object?.bids) - ? object.bids.map((e: any) => QueryBidResponse.fromJSON(e)) - : [], - pagination: isSet(object.pagination) - ? PageResponse.fromJSON(object.pagination) - : undefined, + bids: Array.isArray(object?.bids) ? object.bids.map((e: any) => QueryBidResponse.fromJSON(e)) : [], + pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined }; }, toJSON(message: QueryBidsResponse): unknown { const obj: any = {}; if (message.bids) { - obj.bids = message.bids.map((e) => - e ? QueryBidResponse.toJSON(e) : undefined - ); + obj.bids = message.bids.map(e => (e ? QueryBidResponse.toJSON(e) : undefined)); } else { obj.bids = []; } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryBidsResponse { + fromPartial, I>>(object: I): QueryBidsResponse { const message = createBaseQueryBidsResponse(); - message.bids = - object.bids?.map((e) => QueryBidResponse.fromPartial(e)) || []; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageResponse.fromPartial(object.pagination) - : undefined; + message.bids = object.bids?.map(e => QueryBidResponse.fromPartial(e)) || []; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryBidsResponse.$type, QueryBidsResponse); @@ -591,10 +481,7 @@ function createBaseQueryBidRequest(): QueryBidRequest { export const QueryBidRequest = { $type: "akash.market.v1beta1.QueryBidRequest" as const, - encode( - message: QueryBidRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryBidRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { BidID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -622,27 +509,21 @@ export const QueryBidRequest = { fromJSON(object: any): QueryBidRequest { return { $type: QueryBidRequest.$type, - id: isSet(object.id) ? BidID.fromJSON(object.id) : undefined, + id: isSet(object.id) ? BidID.fromJSON(object.id) : undefined }; }, toJSON(message: QueryBidRequest): unknown { const obj: any = {}; - message.id !== undefined && - (obj.id = message.id ? BidID.toJSON(message.id) : undefined); + message.id !== undefined && (obj.id = message.id ? BidID.toJSON(message.id) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryBidRequest { + fromPartial, I>>(object: I): QueryBidRequest { const message = createBaseQueryBidRequest(); - message.id = - object.id !== undefined && object.id !== null - ? BidID.fromPartial(object.id) - : undefined; + message.id = object.id !== undefined && object.id !== null ? BidID.fromPartial(object.id) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryBidRequest.$type, QueryBidRequest); @@ -651,17 +532,14 @@ function createBaseQueryBidResponse(): QueryBidResponse { return { $type: "akash.market.v1beta1.QueryBidResponse", bid: undefined, - escrowAccount: undefined, + escrowAccount: undefined }; } export const QueryBidResponse = { $type: "akash.market.v1beta1.QueryBidResponse" as const, - encode( - message: QueryBidResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryBidResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.bid !== undefined) { Bid.encode(message.bid, writer.uint32(10).fork()).ldelim(); } @@ -696,37 +574,23 @@ export const QueryBidResponse = { return { $type: QueryBidResponse.$type, bid: isSet(object.bid) ? Bid.fromJSON(object.bid) : undefined, - escrowAccount: isSet(object.escrowAccount) - ? Account.fromJSON(object.escrowAccount) - : undefined, + escrowAccount: isSet(object.escrowAccount) ? Account.fromJSON(object.escrowAccount) : undefined }; }, toJSON(message: QueryBidResponse): unknown { const obj: any = {}; - message.bid !== undefined && - (obj.bid = message.bid ? Bid.toJSON(message.bid) : undefined); - message.escrowAccount !== undefined && - (obj.escrowAccount = message.escrowAccount - ? Account.toJSON(message.escrowAccount) - : undefined); + message.bid !== undefined && (obj.bid = message.bid ? Bid.toJSON(message.bid) : undefined); + message.escrowAccount !== undefined && (obj.escrowAccount = message.escrowAccount ? Account.toJSON(message.escrowAccount) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryBidResponse { + fromPartial, I>>(object: I): QueryBidResponse { const message = createBaseQueryBidResponse(); - message.bid = - object.bid !== undefined && object.bid !== null - ? Bid.fromPartial(object.bid) - : undefined; - message.escrowAccount = - object.escrowAccount !== undefined && object.escrowAccount !== null - ? Account.fromPartial(object.escrowAccount) - : undefined; + message.bid = object.bid !== undefined && object.bid !== null ? Bid.fromPartial(object.bid) : undefined; + message.escrowAccount = object.escrowAccount !== undefined && object.escrowAccount !== null ? Account.fromPartial(object.escrowAccount) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryBidResponse.$type, QueryBidResponse); @@ -735,17 +599,14 @@ function createBaseQueryLeasesRequest(): QueryLeasesRequest { return { $type: "akash.market.v1beta1.QueryLeasesRequest", filters: undefined, - pagination: undefined, + pagination: undefined }; } export const QueryLeasesRequest = { $type: "akash.market.v1beta1.QueryLeasesRequest" as const, - encode( - message: QueryLeasesRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryLeasesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.filters !== undefined) { LeaseFilters.encode(message.filters, writer.uint32(10).fork()).ldelim(); } @@ -779,42 +640,24 @@ export const QueryLeasesRequest = { fromJSON(object: any): QueryLeasesRequest { return { $type: QueryLeasesRequest.$type, - filters: isSet(object.filters) - ? LeaseFilters.fromJSON(object.filters) - : undefined, - pagination: isSet(object.pagination) - ? PageRequest.fromJSON(object.pagination) - : undefined, + filters: isSet(object.filters) ? LeaseFilters.fromJSON(object.filters) : undefined, + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined }; }, toJSON(message: QueryLeasesRequest): unknown { const obj: any = {}; - message.filters !== undefined && - (obj.filters = message.filters - ? LeaseFilters.toJSON(message.filters) - : undefined); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); + message.filters !== undefined && (obj.filters = message.filters ? LeaseFilters.toJSON(message.filters) : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryLeasesRequest { + fromPartial, I>>(object: I): QueryLeasesRequest { const message = createBaseQueryLeasesRequest(); - message.filters = - object.filters !== undefined && object.filters !== null - ? LeaseFilters.fromPartial(object.filters) - : undefined; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; + message.filters = object.filters !== undefined && object.filters !== null ? LeaseFilters.fromPartial(object.filters) : undefined; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryLeasesRequest.$type, QueryLeasesRequest); @@ -823,25 +666,19 @@ function createBaseQueryLeasesResponse(): QueryLeasesResponse { return { $type: "akash.market.v1beta1.QueryLeasesResponse", leases: [], - pagination: undefined, + pagination: undefined }; } export const QueryLeasesResponse = { $type: "akash.market.v1beta1.QueryLeasesResponse" as const, - encode( - message: QueryLeasesResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryLeasesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.leases) { QueryLeaseResponse.encode(v!, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); + PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } return writer; }, @@ -854,9 +691,7 @@ export const QueryLeasesResponse = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.leases.push( - QueryLeaseResponse.decode(reader, reader.uint32()) - ); + message.leases.push(QueryLeaseResponse.decode(reader, reader.uint32())); break; case 2: message.pagination = PageResponse.decode(reader, reader.uint32()); @@ -872,43 +707,28 @@ export const QueryLeasesResponse = { fromJSON(object: any): QueryLeasesResponse { return { $type: QueryLeasesResponse.$type, - leases: Array.isArray(object?.leases) - ? object.leases.map((e: any) => QueryLeaseResponse.fromJSON(e)) - : [], - pagination: isSet(object.pagination) - ? PageResponse.fromJSON(object.pagination) - : undefined, + leases: Array.isArray(object?.leases) ? object.leases.map((e: any) => QueryLeaseResponse.fromJSON(e)) : [], + pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined }; }, toJSON(message: QueryLeasesResponse): unknown { const obj: any = {}; if (message.leases) { - obj.leases = message.leases.map((e) => - e ? QueryLeaseResponse.toJSON(e) : undefined - ); + obj.leases = message.leases.map(e => (e ? QueryLeaseResponse.toJSON(e) : undefined)); } else { obj.leases = []; } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryLeasesResponse { + fromPartial, I>>(object: I): QueryLeasesResponse { const message = createBaseQueryLeasesResponse(); - message.leases = - object.leases?.map((e) => QueryLeaseResponse.fromPartial(e)) || []; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageResponse.fromPartial(object.pagination) - : undefined; + message.leases = object.leases?.map(e => QueryLeaseResponse.fromPartial(e)) || []; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryLeasesResponse.$type, QueryLeasesResponse); @@ -920,10 +740,7 @@ function createBaseQueryLeaseRequest(): QueryLeaseRequest { export const QueryLeaseRequest = { $type: "akash.market.v1beta1.QueryLeaseRequest" as const, - encode( - message: QueryLeaseRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryLeaseRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { LeaseID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -951,27 +768,21 @@ export const QueryLeaseRequest = { fromJSON(object: any): QueryLeaseRequest { return { $type: QueryLeaseRequest.$type, - id: isSet(object.id) ? LeaseID.fromJSON(object.id) : undefined, + id: isSet(object.id) ? LeaseID.fromJSON(object.id) : undefined }; }, toJSON(message: QueryLeaseRequest): unknown { const obj: any = {}; - message.id !== undefined && - (obj.id = message.id ? LeaseID.toJSON(message.id) : undefined); + message.id !== undefined && (obj.id = message.id ? LeaseID.toJSON(message.id) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryLeaseRequest { + fromPartial, I>>(object: I): QueryLeaseRequest { const message = createBaseQueryLeaseRequest(); - message.id = - object.id !== undefined && object.id !== null - ? LeaseID.fromPartial(object.id) - : undefined; + message.id = object.id !== undefined && object.id !== null ? LeaseID.fromPartial(object.id) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryLeaseRequest.$type, QueryLeaseRequest); @@ -980,17 +791,14 @@ function createBaseQueryLeaseResponse(): QueryLeaseResponse { return { $type: "akash.market.v1beta1.QueryLeaseResponse", lease: undefined, - escrowPayment: undefined, + escrowPayment: undefined }; } export const QueryLeaseResponse = { $type: "akash.market.v1beta1.QueryLeaseResponse" as const, - encode( - message: QueryLeaseResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryLeaseResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.lease !== undefined) { Lease.encode(message.lease, writer.uint32(10).fork()).ldelim(); } @@ -1025,37 +833,23 @@ export const QueryLeaseResponse = { return { $type: QueryLeaseResponse.$type, lease: isSet(object.lease) ? Lease.fromJSON(object.lease) : undefined, - escrowPayment: isSet(object.escrowPayment) - ? Payment.fromJSON(object.escrowPayment) - : undefined, + escrowPayment: isSet(object.escrowPayment) ? Payment.fromJSON(object.escrowPayment) : undefined }; }, toJSON(message: QueryLeaseResponse): unknown { const obj: any = {}; - message.lease !== undefined && - (obj.lease = message.lease ? Lease.toJSON(message.lease) : undefined); - message.escrowPayment !== undefined && - (obj.escrowPayment = message.escrowPayment - ? Payment.toJSON(message.escrowPayment) - : undefined); + message.lease !== undefined && (obj.lease = message.lease ? Lease.toJSON(message.lease) : undefined); + message.escrowPayment !== undefined && (obj.escrowPayment = message.escrowPayment ? Payment.toJSON(message.escrowPayment) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryLeaseResponse { + fromPartial, I>>(object: I): QueryLeaseResponse { const message = createBaseQueryLeaseResponse(); - message.lease = - object.lease !== undefined && object.lease !== null - ? Lease.fromPartial(object.lease) - : undefined; - message.escrowPayment = - object.escrowPayment !== undefined && object.escrowPayment !== null - ? Payment.fromPartial(object.escrowPayment) - : undefined; + message.lease = object.lease !== undefined && object.lease !== null ? Lease.fromPartial(object.lease) : undefined; + message.escrowPayment = object.escrowPayment !== undefined && object.escrowPayment !== null ? Payment.fromPartial(object.escrowPayment) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryLeaseResponse.$type, QueryLeaseResponse); @@ -1089,109 +883,63 @@ export class QueryClientImpl implements Query { } Orders(request: QueryOrdersRequest): Promise { const data = QueryOrdersRequest.encode(request).finish(); - const promise = this.rpc.request( - "akash.market.v1beta1.Query", - "Orders", - data - ); - return promise.then((data) => - QueryOrdersResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.market.v1beta1.Query", "Orders", data); + return promise.then(data => QueryOrdersResponse.decode(new _m0.Reader(data))); } Order(request: QueryOrderRequest): Promise { const data = QueryOrderRequest.encode(request).finish(); - const promise = this.rpc.request( - "akash.market.v1beta1.Query", - "Order", - data - ); - return promise.then((data) => - QueryOrderResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.market.v1beta1.Query", "Order", data); + return promise.then(data => QueryOrderResponse.decode(new _m0.Reader(data))); } Bids(request: QueryBidsRequest): Promise { const data = QueryBidsRequest.encode(request).finish(); - const promise = this.rpc.request( - "akash.market.v1beta1.Query", - "Bids", - data - ); - return promise.then((data) => - QueryBidsResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.market.v1beta1.Query", "Bids", data); + return promise.then(data => QueryBidsResponse.decode(new _m0.Reader(data))); } Bid(request: QueryBidRequest): Promise { const data = QueryBidRequest.encode(request).finish(); const promise = this.rpc.request("akash.market.v1beta1.Query", "Bid", data); - return promise.then((data) => - QueryBidResponse.decode(new _m0.Reader(data)) - ); + return promise.then(data => QueryBidResponse.decode(new _m0.Reader(data))); } Leases(request: QueryLeasesRequest): Promise { const data = QueryLeasesRequest.encode(request).finish(); - const promise = this.rpc.request( - "akash.market.v1beta1.Query", - "Leases", - data - ); - return promise.then((data) => - QueryLeasesResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.market.v1beta1.Query", "Leases", data); + return promise.then(data => QueryLeasesResponse.decode(new _m0.Reader(data))); } Lease(request: QueryLeaseRequest): Promise { const data = QueryLeaseRequest.encode(request).finish(); - const promise = this.rpc.request( - "akash.market.v1beta1.Query", - "Lease", - data - ); - return promise.then((data) => - QueryLeaseResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.market.v1beta1.Query", "Lease", data); + return promise.then(data => QueryLeaseResponse.decode(new _m0.Reader(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/market/v1beta1/service.ts b/src/protobuf/akash/market/v1beta1/service.ts index 47ece26..fe2e161 100644 --- a/src/protobuf/akash/market/v1beta1/service.ts +++ b/src/protobuf/akash/market/v1beta1/service.ts @@ -1,19 +1,14 @@ /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; -import { - MsgCreateBidResponse, - MsgCloseBidResponse, - MsgCreateBid, - MsgCloseBid, -} from "../../../akash/market/v1beta1/bid"; +import { MsgCreateBidResponse, MsgCloseBidResponse, MsgCreateBid, MsgCloseBid } from "../../../akash/market/v1beta1/bid"; import { MsgWithdrawLeaseResponse, MsgCreateLeaseResponse, MsgCloseLeaseResponse, MsgWithdrawLease, MsgCreateLease, - MsgCloseLease, + MsgCloseLease } from "../../../akash/market/v1beta1/lease"; export const protobufPackage = "akash.market.v1beta1"; @@ -44,71 +39,37 @@ export class MsgClientImpl implements Msg { } CreateBid(request: MsgCreateBid): Promise { const data = MsgCreateBid.encode(request).finish(); - const promise = this.rpc.request( - "akash.market.v1beta1.Msg", - "CreateBid", - data - ); - return promise.then((data) => - MsgCreateBidResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.market.v1beta1.Msg", "CreateBid", data); + return promise.then(data => MsgCreateBidResponse.decode(new _m0.Reader(data))); } CloseBid(request: MsgCloseBid): Promise { const data = MsgCloseBid.encode(request).finish(); - const promise = this.rpc.request( - "akash.market.v1beta1.Msg", - "CloseBid", - data - ); - return promise.then((data) => - MsgCloseBidResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.market.v1beta1.Msg", "CloseBid", data); + return promise.then(data => MsgCloseBidResponse.decode(new _m0.Reader(data))); } WithdrawLease(request: MsgWithdrawLease): Promise { const data = MsgWithdrawLease.encode(request).finish(); - const promise = this.rpc.request( - "akash.market.v1beta1.Msg", - "WithdrawLease", - data - ); - return promise.then((data) => - MsgWithdrawLeaseResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.market.v1beta1.Msg", "WithdrawLease", data); + return promise.then(data => MsgWithdrawLeaseResponse.decode(new _m0.Reader(data))); } CreateLease(request: MsgCreateLease): Promise { const data = MsgCreateLease.encode(request).finish(); - const promise = this.rpc.request( - "akash.market.v1beta1.Msg", - "CreateLease", - data - ); - return promise.then((data) => - MsgCreateLeaseResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.market.v1beta1.Msg", "CreateLease", data); + return promise.then(data => MsgCreateLeaseResponse.decode(new _m0.Reader(data))); } CloseLease(request: MsgCloseLease): Promise { const data = MsgCloseLease.encode(request).finish(); - const promise = this.rpc.request( - "akash.market.v1beta1.Msg", - "CloseLease", - data - ); - return promise.then((data) => - MsgCloseLeaseResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.market.v1beta1.Msg", "CloseLease", data); + return promise.then(data => MsgCloseLeaseResponse.decode(new _m0.Reader(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } if (_m0.util.Long !== Long) { diff --git a/src/protobuf/akash/market/v1beta2/bid.ts b/src/protobuf/akash/market/v1beta2/bid.ts index 0322419..a6df004 100644 --- a/src/protobuf/akash/market/v1beta2/bid.ts +++ b/src/protobuf/akash/market/v1beta2/bid.ts @@ -66,7 +66,7 @@ export enum Bid_State { lost = 3, /** closed - BidClosed denotes state for bid closed */ closed = 4, - UNRECOGNIZED = -1, + UNRECOGNIZED = -1 } export function bid_StateFromJSON(object: any): Bid_State { @@ -128,17 +128,14 @@ function createBaseMsgCreateBid(): MsgCreateBid { order: undefined, provider: "", price: undefined, - deposit: undefined, + deposit: undefined }; } export const MsgCreateBid = { $type: "akash.market.v1beta2.MsgCreateBid" as const, - encode( - message: MsgCreateBid, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MsgCreateBid, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.order !== undefined) { OrderID.encode(message.order, writer.uint32(10).fork()).ldelim(); } @@ -187,45 +184,27 @@ export const MsgCreateBid = { order: isSet(object.order) ? OrderID.fromJSON(object.order) : undefined, provider: isSet(object.provider) ? String(object.provider) : "", price: isSet(object.price) ? DecCoin.fromJSON(object.price) : undefined, - deposit: isSet(object.deposit) - ? Coin.fromJSON(object.deposit) - : undefined, + deposit: isSet(object.deposit) ? Coin.fromJSON(object.deposit) : undefined }; }, toJSON(message: MsgCreateBid): unknown { const obj: any = {}; - message.order !== undefined && - (obj.order = message.order ? OrderID.toJSON(message.order) : undefined); + message.order !== undefined && (obj.order = message.order ? OrderID.toJSON(message.order) : undefined); message.provider !== undefined && (obj.provider = message.provider); - message.price !== undefined && - (obj.price = message.price ? DecCoin.toJSON(message.price) : undefined); - message.deposit !== undefined && - (obj.deposit = message.deposit - ? Coin.toJSON(message.deposit) - : undefined); + message.price !== undefined && (obj.price = message.price ? DecCoin.toJSON(message.price) : undefined); + message.deposit !== undefined && (obj.deposit = message.deposit ? Coin.toJSON(message.deposit) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): MsgCreateBid { + fromPartial, I>>(object: I): MsgCreateBid { const message = createBaseMsgCreateBid(); - message.order = - object.order !== undefined && object.order !== null - ? OrderID.fromPartial(object.order) - : undefined; + message.order = object.order !== undefined && object.order !== null ? OrderID.fromPartial(object.order) : undefined; message.provider = object.provider ?? ""; - message.price = - object.price !== undefined && object.price !== null - ? DecCoin.fromPartial(object.price) - : undefined; - message.deposit = - object.deposit !== undefined && object.deposit !== null - ? Coin.fromPartial(object.deposit) - : undefined; + message.price = object.price !== undefined && object.price !== null ? DecCoin.fromPartial(object.price) : undefined; + message.deposit = object.deposit !== undefined && object.deposit !== null ? Coin.fromPartial(object.deposit) : undefined; return message; - }, + } }; messageTypeRegistry.set(MsgCreateBid.$type, MsgCreateBid); @@ -237,17 +216,11 @@ function createBaseMsgCreateBidResponse(): MsgCreateBidResponse { export const MsgCreateBidResponse = { $type: "akash.market.v1beta2.MsgCreateBidResponse" as const, - encode( - _: MsgCreateBidResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: MsgCreateBidResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgCreateBidResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreateBidResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCreateBidResponse(); @@ -264,7 +237,7 @@ export const MsgCreateBidResponse = { fromJSON(_: any): MsgCreateBidResponse { return { - $type: MsgCreateBidResponse.$type, + $type: MsgCreateBidResponse.$type }; }, @@ -273,12 +246,10 @@ export const MsgCreateBidResponse = { return obj; }, - fromPartial, I>>( - _: I - ): MsgCreateBidResponse { + fromPartial, I>>(_: I): MsgCreateBidResponse { const message = createBaseMsgCreateBidResponse(); return message; - }, + } }; messageTypeRegistry.set(MsgCreateBidResponse.$type, MsgCreateBidResponse); @@ -290,10 +261,7 @@ function createBaseMsgCloseBid(): MsgCloseBid { export const MsgCloseBid = { $type: "akash.market.v1beta2.MsgCloseBid" as const, - encode( - message: MsgCloseBid, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MsgCloseBid, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.bidId !== undefined) { BidID.encode(message.bidId, writer.uint32(10).fork()).ldelim(); } @@ -321,27 +289,21 @@ export const MsgCloseBid = { fromJSON(object: any): MsgCloseBid { return { $type: MsgCloseBid.$type, - bidId: isSet(object.bidId) ? BidID.fromJSON(object.bidId) : undefined, + bidId: isSet(object.bidId) ? BidID.fromJSON(object.bidId) : undefined }; }, toJSON(message: MsgCloseBid): unknown { const obj: any = {}; - message.bidId !== undefined && - (obj.bidId = message.bidId ? BidID.toJSON(message.bidId) : undefined); + message.bidId !== undefined && (obj.bidId = message.bidId ? BidID.toJSON(message.bidId) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): MsgCloseBid { + fromPartial, I>>(object: I): MsgCloseBid { const message = createBaseMsgCloseBid(); - message.bidId = - object.bidId !== undefined && object.bidId !== null - ? BidID.fromPartial(object.bidId) - : undefined; + message.bidId = object.bidId !== undefined && object.bidId !== null ? BidID.fromPartial(object.bidId) : undefined; return message; - }, + } }; messageTypeRegistry.set(MsgCloseBid.$type, MsgCloseBid); @@ -353,10 +315,7 @@ function createBaseMsgCloseBidResponse(): MsgCloseBidResponse { export const MsgCloseBidResponse = { $type: "akash.market.v1beta2.MsgCloseBidResponse" as const, - encode( - _: MsgCloseBidResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: MsgCloseBidResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, @@ -377,7 +336,7 @@ export const MsgCloseBidResponse = { fromJSON(_: any): MsgCloseBidResponse { return { - $type: MsgCloseBidResponse.$type, + $type: MsgCloseBidResponse.$type }; }, @@ -386,12 +345,10 @@ export const MsgCloseBidResponse = { return obj; }, - fromPartial, I>>( - _: I - ): MsgCloseBidResponse { + fromPartial, I>>(_: I): MsgCloseBidResponse { const message = createBaseMsgCloseBidResponse(); return message; - }, + } }; messageTypeRegistry.set(MsgCloseBidResponse.$type, MsgCloseBidResponse); @@ -403,7 +360,7 @@ function createBaseBidID(): BidID { dseq: Long.UZERO, gseq: 0, oseq: 0, - provider: "", + provider: "" }; } @@ -466,15 +423,14 @@ export const BidID = { dseq: isSet(object.dseq) ? Long.fromValue(object.dseq) : Long.UZERO, gseq: isSet(object.gseq) ? Number(object.gseq) : 0, oseq: isSet(object.oseq) ? Number(object.oseq) : 0, - provider: isSet(object.provider) ? String(object.provider) : "", + provider: isSet(object.provider) ? String(object.provider) : "" }; }, toJSON(message: BidID): unknown { const obj: any = {}; message.owner !== undefined && (obj.owner = message.owner); - message.dseq !== undefined && - (obj.dseq = (message.dseq || Long.UZERO).toString()); + message.dseq !== undefined && (obj.dseq = (message.dseq || Long.UZERO).toString()); message.gseq !== undefined && (obj.gseq = Math.round(message.gseq)); message.oseq !== undefined && (obj.oseq = Math.round(message.oseq)); message.provider !== undefined && (obj.provider = message.provider); @@ -484,15 +440,12 @@ export const BidID = { fromPartial, I>>(object: I): BidID { const message = createBaseBidID(); message.owner = object.owner ?? ""; - message.dseq = - object.dseq !== undefined && object.dseq !== null - ? Long.fromValue(object.dseq) - : Long.UZERO; + message.dseq = object.dseq !== undefined && object.dseq !== null ? Long.fromValue(object.dseq) : Long.UZERO; message.gseq = object.gseq ?? 0; message.oseq = object.oseq ?? 0; message.provider = object.provider ?? ""; return message; - }, + } }; messageTypeRegistry.set(BidID.$type, BidID); @@ -503,7 +456,7 @@ function createBaseBid(): Bid { bidId: undefined, state: 0, price: undefined, - createdAt: Long.ZERO, + createdAt: Long.ZERO }; } @@ -559,41 +512,27 @@ export const Bid = { bidId: isSet(object.bidId) ? BidID.fromJSON(object.bidId) : undefined, state: isSet(object.state) ? bid_StateFromJSON(object.state) : 0, price: isSet(object.price) ? DecCoin.fromJSON(object.price) : undefined, - createdAt: isSet(object.createdAt) - ? Long.fromValue(object.createdAt) - : Long.ZERO, + createdAt: isSet(object.createdAt) ? Long.fromValue(object.createdAt) : Long.ZERO }; }, toJSON(message: Bid): unknown { const obj: any = {}; - message.bidId !== undefined && - (obj.bidId = message.bidId ? BidID.toJSON(message.bidId) : undefined); + message.bidId !== undefined && (obj.bidId = message.bidId ? BidID.toJSON(message.bidId) : undefined); message.state !== undefined && (obj.state = bid_StateToJSON(message.state)); - message.price !== undefined && - (obj.price = message.price ? DecCoin.toJSON(message.price) : undefined); - message.createdAt !== undefined && - (obj.createdAt = (message.createdAt || Long.ZERO).toString()); + message.price !== undefined && (obj.price = message.price ? DecCoin.toJSON(message.price) : undefined); + message.createdAt !== undefined && (obj.createdAt = (message.createdAt || Long.ZERO).toString()); return obj; }, fromPartial, I>>(object: I): Bid { const message = createBaseBid(); - message.bidId = - object.bidId !== undefined && object.bidId !== null - ? BidID.fromPartial(object.bidId) - : undefined; + message.bidId = object.bidId !== undefined && object.bidId !== null ? BidID.fromPartial(object.bidId) : undefined; message.state = object.state ?? 0; - message.price = - object.price !== undefined && object.price !== null - ? DecCoin.fromPartial(object.price) - : undefined; - message.createdAt = - object.createdAt !== undefined && object.createdAt !== null - ? Long.fromValue(object.createdAt) - : Long.ZERO; + message.price = object.price !== undefined && object.price !== null ? DecCoin.fromPartial(object.price) : undefined; + message.createdAt = object.createdAt !== undefined && object.createdAt !== null ? Long.fromValue(object.createdAt) : Long.ZERO; return message; - }, + } }; messageTypeRegistry.set(Bid.$type, Bid); @@ -606,17 +545,14 @@ function createBaseBidFilters(): BidFilters { gseq: 0, oseq: 0, provider: "", - state: "", + state: "" }; } export const BidFilters = { $type: "akash.market.v1beta2.BidFilters" as const, - encode( - message: BidFilters, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: BidFilters, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -679,15 +615,14 @@ export const BidFilters = { gseq: isSet(object.gseq) ? Number(object.gseq) : 0, oseq: isSet(object.oseq) ? Number(object.oseq) : 0, provider: isSet(object.provider) ? String(object.provider) : "", - state: isSet(object.state) ? String(object.state) : "", + state: isSet(object.state) ? String(object.state) : "" }; }, toJSON(message: BidFilters): unknown { const obj: any = {}; message.owner !== undefined && (obj.owner = message.owner); - message.dseq !== undefined && - (obj.dseq = (message.dseq || Long.UZERO).toString()); + message.dseq !== undefined && (obj.dseq = (message.dseq || Long.UZERO).toString()); message.gseq !== undefined && (obj.gseq = Math.round(message.gseq)); message.oseq !== undefined && (obj.oseq = Math.round(message.oseq)); message.provider !== undefined && (obj.provider = message.provider); @@ -695,53 +630,38 @@ export const BidFilters = { return obj; }, - fromPartial, I>>( - object: I - ): BidFilters { + fromPartial, I>>(object: I): BidFilters { const message = createBaseBidFilters(); message.owner = object.owner ?? ""; - message.dseq = - object.dseq !== undefined && object.dseq !== null - ? Long.fromValue(object.dseq) - : Long.UZERO; + message.dseq = object.dseq !== undefined && object.dseq !== null ? Long.fromValue(object.dseq) : Long.UZERO; message.gseq = object.gseq ?? 0; message.oseq = object.oseq ?? 0; message.provider = object.provider ?? ""; message.state = object.state ?? ""; return message; - }, + } }; messageTypeRegistry.set(BidFilters.$type, BidFilters); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/market/v1beta2/genesis.ts b/src/protobuf/akash/market/v1beta2/genesis.ts index 14ced2a..f405789 100644 --- a/src/protobuf/akash/market/v1beta2/genesis.ts +++ b/src/protobuf/akash/market/v1beta2/genesis.ts @@ -21,17 +21,14 @@ function createBaseGenesisState(): GenesisState { $type: "akash.market.v1beta2.GenesisState", orders: [], leases: [], - params: undefined, + params: undefined }; } export const GenesisState = { $type: "akash.market.v1beta2.GenesisState" as const, - encode( - message: GenesisState, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: GenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.orders) { Order.encode(v!, writer.uint32(10).fork()).ldelim(); } @@ -71,77 +68,57 @@ export const GenesisState = { fromJSON(object: any): GenesisState { return { $type: GenesisState.$type, - orders: Array.isArray(object?.orders) - ? object.orders.map((e: any) => Order.fromJSON(e)) - : [], - leases: Array.isArray(object?.leases) - ? object.leases.map((e: any) => Lease.fromJSON(e)) - : [], - params: isSet(object.params) ? Params.fromJSON(object.params) : undefined, + orders: Array.isArray(object?.orders) ? object.orders.map((e: any) => Order.fromJSON(e)) : [], + leases: Array.isArray(object?.leases) ? object.leases.map((e: any) => Lease.fromJSON(e)) : [], + params: isSet(object.params) ? Params.fromJSON(object.params) : undefined }; }, toJSON(message: GenesisState): unknown { const obj: any = {}; if (message.orders) { - obj.orders = message.orders.map((e) => (e ? Order.toJSON(e) : undefined)); + obj.orders = message.orders.map(e => (e ? Order.toJSON(e) : undefined)); } else { obj.orders = []; } if (message.leases) { - obj.leases = message.leases.map((e) => (e ? Lease.toJSON(e) : undefined)); + obj.leases = message.leases.map(e => (e ? Lease.toJSON(e) : undefined)); } else { obj.leases = []; } - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); + message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): GenesisState { + fromPartial, I>>(object: I): GenesisState { const message = createBaseGenesisState(); - message.orders = object.orders?.map((e) => Order.fromPartial(e)) || []; - message.leases = object.leases?.map((e) => Lease.fromPartial(e)) || []; - message.params = - object.params !== undefined && object.params !== null - ? Params.fromPartial(object.params) - : undefined; + message.orders = object.orders?.map(e => Order.fromPartial(e)) || []; + message.leases = object.leases?.map(e => Lease.fromPartial(e)) || []; + message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; return message; - }, + } }; messageTypeRegistry.set(GenesisState.$type, GenesisState); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/market/v1beta2/lease.ts b/src/protobuf/akash/market/v1beta2/lease.ts index 668f54a..e7e3b9c 100644 --- a/src/protobuf/akash/market/v1beta2/lease.ts +++ b/src/protobuf/akash/market/v1beta2/lease.ts @@ -37,7 +37,7 @@ export enum Lease_State { insufficient_funds = 2, /** closed - LeaseClosed denotes state for lease closed */ closed = 3, - UNRECOGNIZED = -1, + UNRECOGNIZED = -1 } export function lease_StateFromJSON(object: any): Lease_State { @@ -128,17 +128,14 @@ function createBaseLeaseID(): LeaseID { dseq: Long.UZERO, gseq: 0, oseq: 0, - provider: "", + provider: "" }; } export const LeaseID = { $type: "akash.market.v1beta2.LeaseID" as const, - encode( - message: LeaseID, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: LeaseID, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -194,15 +191,14 @@ export const LeaseID = { dseq: isSet(object.dseq) ? Long.fromValue(object.dseq) : Long.UZERO, gseq: isSet(object.gseq) ? Number(object.gseq) : 0, oseq: isSet(object.oseq) ? Number(object.oseq) : 0, - provider: isSet(object.provider) ? String(object.provider) : "", + provider: isSet(object.provider) ? String(object.provider) : "" }; }, toJSON(message: LeaseID): unknown { const obj: any = {}; message.owner !== undefined && (obj.owner = message.owner); - message.dseq !== undefined && - (obj.dseq = (message.dseq || Long.UZERO).toString()); + message.dseq !== undefined && (obj.dseq = (message.dseq || Long.UZERO).toString()); message.gseq !== undefined && (obj.gseq = Math.round(message.gseq)); message.oseq !== undefined && (obj.oseq = Math.round(message.oseq)); message.provider !== undefined && (obj.provider = message.provider); @@ -212,15 +208,12 @@ export const LeaseID = { fromPartial, I>>(object: I): LeaseID { const message = createBaseLeaseID(); message.owner = object.owner ?? ""; - message.dseq = - object.dseq !== undefined && object.dseq !== null - ? Long.fromValue(object.dseq) - : Long.UZERO; + message.dseq = object.dseq !== undefined && object.dseq !== null ? Long.fromValue(object.dseq) : Long.UZERO; message.gseq = object.gseq ?? 0; message.oseq = object.oseq ?? 0; message.provider = object.provider ?? ""; return message; - }, + } }; messageTypeRegistry.set(LeaseID.$type, LeaseID); @@ -232,7 +225,7 @@ function createBaseLease(): Lease { state: 0, price: undefined, createdAt: Long.ZERO, - closedOn: Long.ZERO, + closedOn: Long.ZERO }; } @@ -291,58 +284,33 @@ export const Lease = { fromJSON(object: any): Lease { return { $type: Lease.$type, - leaseId: isSet(object.leaseId) - ? LeaseID.fromJSON(object.leaseId) - : undefined, + leaseId: isSet(object.leaseId) ? LeaseID.fromJSON(object.leaseId) : undefined, state: isSet(object.state) ? lease_StateFromJSON(object.state) : 0, price: isSet(object.price) ? DecCoin.fromJSON(object.price) : undefined, - createdAt: isSet(object.createdAt) - ? Long.fromValue(object.createdAt) - : Long.ZERO, - closedOn: isSet(object.closedOn) - ? Long.fromValue(object.closedOn) - : Long.ZERO, + createdAt: isSet(object.createdAt) ? Long.fromValue(object.createdAt) : Long.ZERO, + closedOn: isSet(object.closedOn) ? Long.fromValue(object.closedOn) : Long.ZERO }; }, toJSON(message: Lease): unknown { const obj: any = {}; - message.leaseId !== undefined && - (obj.leaseId = message.leaseId - ? LeaseID.toJSON(message.leaseId) - : undefined); - message.state !== undefined && - (obj.state = lease_StateToJSON(message.state)); - message.price !== undefined && - (obj.price = message.price ? DecCoin.toJSON(message.price) : undefined); - message.createdAt !== undefined && - (obj.createdAt = (message.createdAt || Long.ZERO).toString()); - message.closedOn !== undefined && - (obj.closedOn = (message.closedOn || Long.ZERO).toString()); + message.leaseId !== undefined && (obj.leaseId = message.leaseId ? LeaseID.toJSON(message.leaseId) : undefined); + message.state !== undefined && (obj.state = lease_StateToJSON(message.state)); + message.price !== undefined && (obj.price = message.price ? DecCoin.toJSON(message.price) : undefined); + message.createdAt !== undefined && (obj.createdAt = (message.createdAt || Long.ZERO).toString()); + message.closedOn !== undefined && (obj.closedOn = (message.closedOn || Long.ZERO).toString()); return obj; }, fromPartial, I>>(object: I): Lease { const message = createBaseLease(); - message.leaseId = - object.leaseId !== undefined && object.leaseId !== null - ? LeaseID.fromPartial(object.leaseId) - : undefined; + message.leaseId = object.leaseId !== undefined && object.leaseId !== null ? LeaseID.fromPartial(object.leaseId) : undefined; message.state = object.state ?? 0; - message.price = - object.price !== undefined && object.price !== null - ? DecCoin.fromPartial(object.price) - : undefined; - message.createdAt = - object.createdAt !== undefined && object.createdAt !== null - ? Long.fromValue(object.createdAt) - : Long.ZERO; - message.closedOn = - object.closedOn !== undefined && object.closedOn !== null - ? Long.fromValue(object.closedOn) - : Long.ZERO; + message.price = object.price !== undefined && object.price !== null ? DecCoin.fromPartial(object.price) : undefined; + message.createdAt = object.createdAt !== undefined && object.createdAt !== null ? Long.fromValue(object.createdAt) : Long.ZERO; + message.closedOn = object.closedOn !== undefined && object.closedOn !== null ? Long.fromValue(object.closedOn) : Long.ZERO; return message; - }, + } }; messageTypeRegistry.set(Lease.$type, Lease); @@ -355,17 +323,14 @@ function createBaseLeaseFilters(): LeaseFilters { gseq: 0, oseq: 0, provider: "", - state: "", + state: "" }; } export const LeaseFilters = { $type: "akash.market.v1beta2.LeaseFilters" as const, - encode( - message: LeaseFilters, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: LeaseFilters, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -428,15 +393,14 @@ export const LeaseFilters = { gseq: isSet(object.gseq) ? Number(object.gseq) : 0, oseq: isSet(object.oseq) ? Number(object.oseq) : 0, provider: isSet(object.provider) ? String(object.provider) : "", - state: isSet(object.state) ? String(object.state) : "", + state: isSet(object.state) ? String(object.state) : "" }; }, toJSON(message: LeaseFilters): unknown { const obj: any = {}; message.owner !== undefined && (obj.owner = message.owner); - message.dseq !== undefined && - (obj.dseq = (message.dseq || Long.UZERO).toString()); + message.dseq !== undefined && (obj.dseq = (message.dseq || Long.UZERO).toString()); message.gseq !== undefined && (obj.gseq = Math.round(message.gseq)); message.oseq !== undefined && (obj.oseq = Math.round(message.oseq)); message.provider !== undefined && (obj.provider = message.provider); @@ -444,21 +408,16 @@ export const LeaseFilters = { return obj; }, - fromPartial, I>>( - object: I - ): LeaseFilters { + fromPartial, I>>(object: I): LeaseFilters { const message = createBaseLeaseFilters(); message.owner = object.owner ?? ""; - message.dseq = - object.dseq !== undefined && object.dseq !== null - ? Long.fromValue(object.dseq) - : Long.UZERO; + message.dseq = object.dseq !== undefined && object.dseq !== null ? Long.fromValue(object.dseq) : Long.UZERO; message.gseq = object.gseq ?? 0; message.oseq = object.oseq ?? 0; message.provider = object.provider ?? ""; message.state = object.state ?? ""; return message; - }, + } }; messageTypeRegistry.set(LeaseFilters.$type, LeaseFilters); @@ -470,10 +429,7 @@ function createBaseMsgCreateLease(): MsgCreateLease { export const MsgCreateLease = { $type: "akash.market.v1beta2.MsgCreateLease" as const, - encode( - message: MsgCreateLease, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MsgCreateLease, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.bidId !== undefined) { BidID.encode(message.bidId, writer.uint32(10).fork()).ldelim(); } @@ -501,27 +457,21 @@ export const MsgCreateLease = { fromJSON(object: any): MsgCreateLease { return { $type: MsgCreateLease.$type, - bidId: isSet(object.bidId) ? BidID.fromJSON(object.bidId) : undefined, + bidId: isSet(object.bidId) ? BidID.fromJSON(object.bidId) : undefined }; }, toJSON(message: MsgCreateLease): unknown { const obj: any = {}; - message.bidId !== undefined && - (obj.bidId = message.bidId ? BidID.toJSON(message.bidId) : undefined); + message.bidId !== undefined && (obj.bidId = message.bidId ? BidID.toJSON(message.bidId) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): MsgCreateLease { + fromPartial, I>>(object: I): MsgCreateLease { const message = createBaseMsgCreateLease(); - message.bidId = - object.bidId !== undefined && object.bidId !== null - ? BidID.fromPartial(object.bidId) - : undefined; + message.bidId = object.bidId !== undefined && object.bidId !== null ? BidID.fromPartial(object.bidId) : undefined; return message; - }, + } }; messageTypeRegistry.set(MsgCreateLease.$type, MsgCreateLease); @@ -533,17 +483,11 @@ function createBaseMsgCreateLeaseResponse(): MsgCreateLeaseResponse { export const MsgCreateLeaseResponse = { $type: "akash.market.v1beta2.MsgCreateLeaseResponse" as const, - encode( - _: MsgCreateLeaseResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: MsgCreateLeaseResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgCreateLeaseResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreateLeaseResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCreateLeaseResponse(); @@ -560,7 +504,7 @@ export const MsgCreateLeaseResponse = { fromJSON(_: any): MsgCreateLeaseResponse { return { - $type: MsgCreateLeaseResponse.$type, + $type: MsgCreateLeaseResponse.$type }; }, @@ -569,12 +513,10 @@ export const MsgCreateLeaseResponse = { return obj; }, - fromPartial, I>>( - _: I - ): MsgCreateLeaseResponse { + fromPartial, I>>(_: I): MsgCreateLeaseResponse { const message = createBaseMsgCreateLeaseResponse(); return message; - }, + } }; messageTypeRegistry.set(MsgCreateLeaseResponse.$type, MsgCreateLeaseResponse); @@ -586,10 +528,7 @@ function createBaseMsgWithdrawLease(): MsgWithdrawLease { export const MsgWithdrawLease = { $type: "akash.market.v1beta2.MsgWithdrawLease" as const, - encode( - message: MsgWithdrawLease, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MsgWithdrawLease, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.bidId !== undefined) { LeaseID.encode(message.bidId, writer.uint32(10).fork()).ldelim(); } @@ -617,27 +556,21 @@ export const MsgWithdrawLease = { fromJSON(object: any): MsgWithdrawLease { return { $type: MsgWithdrawLease.$type, - bidId: isSet(object.bidId) ? LeaseID.fromJSON(object.bidId) : undefined, + bidId: isSet(object.bidId) ? LeaseID.fromJSON(object.bidId) : undefined }; }, toJSON(message: MsgWithdrawLease): unknown { const obj: any = {}; - message.bidId !== undefined && - (obj.bidId = message.bidId ? LeaseID.toJSON(message.bidId) : undefined); + message.bidId !== undefined && (obj.bidId = message.bidId ? LeaseID.toJSON(message.bidId) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): MsgWithdrawLease { + fromPartial, I>>(object: I): MsgWithdrawLease { const message = createBaseMsgWithdrawLease(); - message.bidId = - object.bidId !== undefined && object.bidId !== null - ? LeaseID.fromPartial(object.bidId) - : undefined; + message.bidId = object.bidId !== undefined && object.bidId !== null ? LeaseID.fromPartial(object.bidId) : undefined; return message; - }, + } }; messageTypeRegistry.set(MsgWithdrawLease.$type, MsgWithdrawLease); @@ -649,17 +582,11 @@ function createBaseMsgWithdrawLeaseResponse(): MsgWithdrawLeaseResponse { export const MsgWithdrawLeaseResponse = { $type: "akash.market.v1beta2.MsgWithdrawLeaseResponse" as const, - encode( - _: MsgWithdrawLeaseResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: MsgWithdrawLeaseResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgWithdrawLeaseResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgWithdrawLeaseResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgWithdrawLeaseResponse(); @@ -676,7 +603,7 @@ export const MsgWithdrawLeaseResponse = { fromJSON(_: any): MsgWithdrawLeaseResponse { return { - $type: MsgWithdrawLeaseResponse.$type, + $type: MsgWithdrawLeaseResponse.$type }; }, @@ -685,18 +612,13 @@ export const MsgWithdrawLeaseResponse = { return obj; }, - fromPartial, I>>( - _: I - ): MsgWithdrawLeaseResponse { + fromPartial, I>>(_: I): MsgWithdrawLeaseResponse { const message = createBaseMsgWithdrawLeaseResponse(); return message; - }, + } }; -messageTypeRegistry.set( - MsgWithdrawLeaseResponse.$type, - MsgWithdrawLeaseResponse -); +messageTypeRegistry.set(MsgWithdrawLeaseResponse.$type, MsgWithdrawLeaseResponse); function createBaseMsgCloseLease(): MsgCloseLease { return { $type: "akash.market.v1beta2.MsgCloseLease", leaseId: undefined }; @@ -705,10 +627,7 @@ function createBaseMsgCloseLease(): MsgCloseLease { export const MsgCloseLease = { $type: "akash.market.v1beta2.MsgCloseLease" as const, - encode( - message: MsgCloseLease, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MsgCloseLease, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.leaseId !== undefined) { LeaseID.encode(message.leaseId, writer.uint32(10).fork()).ldelim(); } @@ -736,31 +655,21 @@ export const MsgCloseLease = { fromJSON(object: any): MsgCloseLease { return { $type: MsgCloseLease.$type, - leaseId: isSet(object.leaseId) - ? LeaseID.fromJSON(object.leaseId) - : undefined, + leaseId: isSet(object.leaseId) ? LeaseID.fromJSON(object.leaseId) : undefined }; }, toJSON(message: MsgCloseLease): unknown { const obj: any = {}; - message.leaseId !== undefined && - (obj.leaseId = message.leaseId - ? LeaseID.toJSON(message.leaseId) - : undefined); + message.leaseId !== undefined && (obj.leaseId = message.leaseId ? LeaseID.toJSON(message.leaseId) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): MsgCloseLease { + fromPartial, I>>(object: I): MsgCloseLease { const message = createBaseMsgCloseLease(); - message.leaseId = - object.leaseId !== undefined && object.leaseId !== null - ? LeaseID.fromPartial(object.leaseId) - : undefined; + message.leaseId = object.leaseId !== undefined && object.leaseId !== null ? LeaseID.fromPartial(object.leaseId) : undefined; return message; - }, + } }; messageTypeRegistry.set(MsgCloseLease.$type, MsgCloseLease); @@ -772,17 +681,11 @@ function createBaseMsgCloseLeaseResponse(): MsgCloseLeaseResponse { export const MsgCloseLeaseResponse = { $type: "akash.market.v1beta2.MsgCloseLeaseResponse" as const, - encode( - _: MsgCloseLeaseResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: MsgCloseLeaseResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgCloseLeaseResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgCloseLeaseResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCloseLeaseResponse(); @@ -799,7 +702,7 @@ export const MsgCloseLeaseResponse = { fromJSON(_: any): MsgCloseLeaseResponse { return { - $type: MsgCloseLeaseResponse.$type, + $type: MsgCloseLeaseResponse.$type }; }, @@ -808,44 +711,32 @@ export const MsgCloseLeaseResponse = { return obj; }, - fromPartial, I>>( - _: I - ): MsgCloseLeaseResponse { + fromPartial, I>>(_: I): MsgCloseLeaseResponse { const message = createBaseMsgCloseLeaseResponse(); return message; - }, + } }; messageTypeRegistry.set(MsgCloseLeaseResponse.$type, MsgCloseLeaseResponse); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/market/v1beta2/order.ts b/src/protobuf/akash/market/v1beta2/order.ts index 599e777..b456d1a 100644 --- a/src/protobuf/akash/market/v1beta2/order.ts +++ b/src/protobuf/akash/market/v1beta2/order.ts @@ -34,7 +34,7 @@ export enum Order_State { active = 2, /** closed - OrderClosed denotes state for order lost */ closed = 3, - UNRECOGNIZED = -1, + UNRECOGNIZED = -1 } export function order_StateFromJSON(object: any): Order_State { @@ -90,17 +90,14 @@ function createBaseOrderID(): OrderID { owner: "", dseq: Long.UZERO, gseq: 0, - oseq: 0, + oseq: 0 }; } export const OrderID = { $type: "akash.market.v1beta2.OrderID" as const, - encode( - message: OrderID, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: OrderID, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -149,15 +146,14 @@ export const OrderID = { owner: isSet(object.owner) ? String(object.owner) : "", dseq: isSet(object.dseq) ? Long.fromValue(object.dseq) : Long.UZERO, gseq: isSet(object.gseq) ? Number(object.gseq) : 0, - oseq: isSet(object.oseq) ? Number(object.oseq) : 0, + oseq: isSet(object.oseq) ? Number(object.oseq) : 0 }; }, toJSON(message: OrderID): unknown { const obj: any = {}; message.owner !== undefined && (obj.owner = message.owner); - message.dseq !== undefined && - (obj.dseq = (message.dseq || Long.UZERO).toString()); + message.dseq !== undefined && (obj.dseq = (message.dseq || Long.UZERO).toString()); message.gseq !== undefined && (obj.gseq = Math.round(message.gseq)); message.oseq !== undefined && (obj.oseq = Math.round(message.oseq)); return obj; @@ -166,14 +162,11 @@ export const OrderID = { fromPartial, I>>(object: I): OrderID { const message = createBaseOrderID(); message.owner = object.owner ?? ""; - message.dseq = - object.dseq !== undefined && object.dseq !== null - ? Long.fromValue(object.dseq) - : Long.UZERO; + message.dseq = object.dseq !== undefined && object.dseq !== null ? Long.fromValue(object.dseq) : Long.UZERO; message.gseq = object.gseq ?? 0; message.oseq = object.oseq ?? 0; return message; - }, + } }; messageTypeRegistry.set(OrderID.$type, OrderID); @@ -184,7 +177,7 @@ function createBaseOrder(): Order { orderId: undefined, state: 0, spec: undefined, - createdAt: Long.ZERO, + createdAt: Long.ZERO }; } @@ -237,49 +230,30 @@ export const Order = { fromJSON(object: any): Order { return { $type: Order.$type, - orderId: isSet(object.orderId) - ? OrderID.fromJSON(object.orderId) - : undefined, + orderId: isSet(object.orderId) ? OrderID.fromJSON(object.orderId) : undefined, state: isSet(object.state) ? order_StateFromJSON(object.state) : 0, spec: isSet(object.spec) ? GroupSpec.fromJSON(object.spec) : undefined, - createdAt: isSet(object.createdAt) - ? Long.fromValue(object.createdAt) - : Long.ZERO, + createdAt: isSet(object.createdAt) ? Long.fromValue(object.createdAt) : Long.ZERO }; }, toJSON(message: Order): unknown { const obj: any = {}; - message.orderId !== undefined && - (obj.orderId = message.orderId - ? OrderID.toJSON(message.orderId) - : undefined); - message.state !== undefined && - (obj.state = order_StateToJSON(message.state)); - message.spec !== undefined && - (obj.spec = message.spec ? GroupSpec.toJSON(message.spec) : undefined); - message.createdAt !== undefined && - (obj.createdAt = (message.createdAt || Long.ZERO).toString()); + message.orderId !== undefined && (obj.orderId = message.orderId ? OrderID.toJSON(message.orderId) : undefined); + message.state !== undefined && (obj.state = order_StateToJSON(message.state)); + message.spec !== undefined && (obj.spec = message.spec ? GroupSpec.toJSON(message.spec) : undefined); + message.createdAt !== undefined && (obj.createdAt = (message.createdAt || Long.ZERO).toString()); return obj; }, fromPartial, I>>(object: I): Order { const message = createBaseOrder(); - message.orderId = - object.orderId !== undefined && object.orderId !== null - ? OrderID.fromPartial(object.orderId) - : undefined; + message.orderId = object.orderId !== undefined && object.orderId !== null ? OrderID.fromPartial(object.orderId) : undefined; message.state = object.state ?? 0; - message.spec = - object.spec !== undefined && object.spec !== null - ? GroupSpec.fromPartial(object.spec) - : undefined; - message.createdAt = - object.createdAt !== undefined && object.createdAt !== null - ? Long.fromValue(object.createdAt) - : Long.ZERO; + message.spec = object.spec !== undefined && object.spec !== null ? GroupSpec.fromPartial(object.spec) : undefined; + message.createdAt = object.createdAt !== undefined && object.createdAt !== null ? Long.fromValue(object.createdAt) : Long.ZERO; return message; - }, + } }; messageTypeRegistry.set(Order.$type, Order); @@ -291,17 +265,14 @@ function createBaseOrderFilters(): OrderFilters { dseq: Long.UZERO, gseq: 0, oseq: 0, - state: "", + state: "" }; } export const OrderFilters = { $type: "akash.market.v1beta2.OrderFilters" as const, - encode( - message: OrderFilters, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: OrderFilters, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -357,67 +328,51 @@ export const OrderFilters = { dseq: isSet(object.dseq) ? Long.fromValue(object.dseq) : Long.UZERO, gseq: isSet(object.gseq) ? Number(object.gseq) : 0, oseq: isSet(object.oseq) ? Number(object.oseq) : 0, - state: isSet(object.state) ? String(object.state) : "", + state: isSet(object.state) ? String(object.state) : "" }; }, toJSON(message: OrderFilters): unknown { const obj: any = {}; message.owner !== undefined && (obj.owner = message.owner); - message.dseq !== undefined && - (obj.dseq = (message.dseq || Long.UZERO).toString()); + message.dseq !== undefined && (obj.dseq = (message.dseq || Long.UZERO).toString()); message.gseq !== undefined && (obj.gseq = Math.round(message.gseq)); message.oseq !== undefined && (obj.oseq = Math.round(message.oseq)); message.state !== undefined && (obj.state = message.state); return obj; }, - fromPartial, I>>( - object: I - ): OrderFilters { + fromPartial, I>>(object: I): OrderFilters { const message = createBaseOrderFilters(); message.owner = object.owner ?? ""; - message.dseq = - object.dseq !== undefined && object.dseq !== null - ? Long.fromValue(object.dseq) - : Long.UZERO; + message.dseq = object.dseq !== undefined && object.dseq !== null ? Long.fromValue(object.dseq) : Long.UZERO; message.gseq = object.gseq ?? 0; message.oseq = object.oseq ?? 0; message.state = object.state ?? ""; return message; - }, + } }; messageTypeRegistry.set(OrderFilters.$type, OrderFilters); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/market/v1beta2/params.ts b/src/protobuf/akash/market/v1beta2/params.ts index ea9ba6c..c28c709 100644 --- a/src/protobuf/akash/market/v1beta2/params.ts +++ b/src/protobuf/akash/market/v1beta2/params.ts @@ -17,17 +17,14 @@ function createBaseParams(): Params { return { $type: "akash.market.v1beta2.Params", bidMinDeposit: undefined, - orderMaxBids: 0, + orderMaxBids: 0 }; } export const Params = { $type: "akash.market.v1beta2.Params" as const, - encode( - message: Params, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Params, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.bidMinDeposit !== undefined) { Coin.encode(message.bidMinDeposit, writer.uint32(10).fork()).ldelim(); } @@ -61,67 +58,46 @@ export const Params = { fromJSON(object: any): Params { return { $type: Params.$type, - bidMinDeposit: isSet(object.bidMinDeposit) - ? Coin.fromJSON(object.bidMinDeposit) - : undefined, - orderMaxBids: isSet(object.orderMaxBids) - ? Number(object.orderMaxBids) - : 0, + bidMinDeposit: isSet(object.bidMinDeposit) ? Coin.fromJSON(object.bidMinDeposit) : undefined, + orderMaxBids: isSet(object.orderMaxBids) ? Number(object.orderMaxBids) : 0 }; }, toJSON(message: Params): unknown { const obj: any = {}; - message.bidMinDeposit !== undefined && - (obj.bidMinDeposit = message.bidMinDeposit - ? Coin.toJSON(message.bidMinDeposit) - : undefined); - message.orderMaxBids !== undefined && - (obj.orderMaxBids = Math.round(message.orderMaxBids)); + message.bidMinDeposit !== undefined && (obj.bidMinDeposit = message.bidMinDeposit ? Coin.toJSON(message.bidMinDeposit) : undefined); + message.orderMaxBids !== undefined && (obj.orderMaxBids = Math.round(message.orderMaxBids)); return obj; }, fromPartial, I>>(object: I): Params { const message = createBaseParams(); - message.bidMinDeposit = - object.bidMinDeposit !== undefined && object.bidMinDeposit !== null - ? Coin.fromPartial(object.bidMinDeposit) - : undefined; + message.bidMinDeposit = object.bidMinDeposit !== undefined && object.bidMinDeposit !== null ? Coin.fromPartial(object.bidMinDeposit) : undefined; message.orderMaxBids = object.orderMaxBids ?? 0; return message; - }, + } }; messageTypeRegistry.set(Params.$type, Params); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/market/v1beta2/query.ts b/src/protobuf/akash/market/v1beta2/query.ts index ceb764a..915fb37 100644 --- a/src/protobuf/akash/market/v1beta2/query.ts +++ b/src/protobuf/akash/market/v1beta2/query.ts @@ -2,10 +2,7 @@ import { messageTypeRegistry } from "../../../typeRegistry"; import Long from "long"; import { OrderFilters, Order, OrderID } from "./order"; -import { - PageRequest, - PageResponse, -} from "../../../cosmos/base/query/v1beta1/pagination"; +import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; import { BidFilters, BidID, Bid } from "./bid"; import { Account, FractionalPayment } from "../../escrow/v1beta2/types"; import { LeaseFilters, LeaseID, Lease } from "./lease"; @@ -97,17 +94,14 @@ function createBaseQueryOrdersRequest(): QueryOrdersRequest { return { $type: "akash.market.v1beta2.QueryOrdersRequest", filters: undefined, - pagination: undefined, + pagination: undefined }; } export const QueryOrdersRequest = { $type: "akash.market.v1beta2.QueryOrdersRequest" as const, - encode( - message: QueryOrdersRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryOrdersRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.filters !== undefined) { OrderFilters.encode(message.filters, writer.uint32(10).fork()).ldelim(); } @@ -141,42 +135,24 @@ export const QueryOrdersRequest = { fromJSON(object: any): QueryOrdersRequest { return { $type: QueryOrdersRequest.$type, - filters: isSet(object.filters) - ? OrderFilters.fromJSON(object.filters) - : undefined, - pagination: isSet(object.pagination) - ? PageRequest.fromJSON(object.pagination) - : undefined, + filters: isSet(object.filters) ? OrderFilters.fromJSON(object.filters) : undefined, + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined }; }, toJSON(message: QueryOrdersRequest): unknown { const obj: any = {}; - message.filters !== undefined && - (obj.filters = message.filters - ? OrderFilters.toJSON(message.filters) - : undefined); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); + message.filters !== undefined && (obj.filters = message.filters ? OrderFilters.toJSON(message.filters) : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryOrdersRequest { + fromPartial, I>>(object: I): QueryOrdersRequest { const message = createBaseQueryOrdersRequest(); - message.filters = - object.filters !== undefined && object.filters !== null - ? OrderFilters.fromPartial(object.filters) - : undefined; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; + message.filters = object.filters !== undefined && object.filters !== null ? OrderFilters.fromPartial(object.filters) : undefined; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryOrdersRequest.$type, QueryOrdersRequest); @@ -185,25 +161,19 @@ function createBaseQueryOrdersResponse(): QueryOrdersResponse { return { $type: "akash.market.v1beta2.QueryOrdersResponse", orders: [], - pagination: undefined, + pagination: undefined }; } export const QueryOrdersResponse = { $type: "akash.market.v1beta2.QueryOrdersResponse" as const, - encode( - message: QueryOrdersResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryOrdersResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.orders) { Order.encode(v!, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); + PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } return writer; }, @@ -232,40 +202,28 @@ export const QueryOrdersResponse = { fromJSON(object: any): QueryOrdersResponse { return { $type: QueryOrdersResponse.$type, - orders: Array.isArray(object?.orders) - ? object.orders.map((e: any) => Order.fromJSON(e)) - : [], - pagination: isSet(object.pagination) - ? PageResponse.fromJSON(object.pagination) - : undefined, + orders: Array.isArray(object?.orders) ? object.orders.map((e: any) => Order.fromJSON(e)) : [], + pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined }; }, toJSON(message: QueryOrdersResponse): unknown { const obj: any = {}; if (message.orders) { - obj.orders = message.orders.map((e) => (e ? Order.toJSON(e) : undefined)); + obj.orders = message.orders.map(e => (e ? Order.toJSON(e) : undefined)); } else { obj.orders = []; } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryOrdersResponse { + fromPartial, I>>(object: I): QueryOrdersResponse { const message = createBaseQueryOrdersResponse(); - message.orders = object.orders?.map((e) => Order.fromPartial(e)) || []; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageResponse.fromPartial(object.pagination) - : undefined; + message.orders = object.orders?.map(e => Order.fromPartial(e)) || []; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryOrdersResponse.$type, QueryOrdersResponse); @@ -277,10 +235,7 @@ function createBaseQueryOrderRequest(): QueryOrderRequest { export const QueryOrderRequest = { $type: "akash.market.v1beta2.QueryOrderRequest" as const, - encode( - message: QueryOrderRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryOrderRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { OrderID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -308,27 +263,21 @@ export const QueryOrderRequest = { fromJSON(object: any): QueryOrderRequest { return { $type: QueryOrderRequest.$type, - id: isSet(object.id) ? OrderID.fromJSON(object.id) : undefined, + id: isSet(object.id) ? OrderID.fromJSON(object.id) : undefined }; }, toJSON(message: QueryOrderRequest): unknown { const obj: any = {}; - message.id !== undefined && - (obj.id = message.id ? OrderID.toJSON(message.id) : undefined); + message.id !== undefined && (obj.id = message.id ? OrderID.toJSON(message.id) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryOrderRequest { + fromPartial, I>>(object: I): QueryOrderRequest { const message = createBaseQueryOrderRequest(); - message.id = - object.id !== undefined && object.id !== null - ? OrderID.fromPartial(object.id) - : undefined; + message.id = object.id !== undefined && object.id !== null ? OrderID.fromPartial(object.id) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryOrderRequest.$type, QueryOrderRequest); @@ -340,10 +289,7 @@ function createBaseQueryOrderResponse(): QueryOrderResponse { export const QueryOrderResponse = { $type: "akash.market.v1beta2.QueryOrderResponse" as const, - encode( - message: QueryOrderResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryOrderResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.order !== undefined) { Order.encode(message.order, writer.uint32(10).fork()).ldelim(); } @@ -371,27 +317,21 @@ export const QueryOrderResponse = { fromJSON(object: any): QueryOrderResponse { return { $type: QueryOrderResponse.$type, - order: isSet(object.order) ? Order.fromJSON(object.order) : undefined, + order: isSet(object.order) ? Order.fromJSON(object.order) : undefined }; }, toJSON(message: QueryOrderResponse): unknown { const obj: any = {}; - message.order !== undefined && - (obj.order = message.order ? Order.toJSON(message.order) : undefined); + message.order !== undefined && (obj.order = message.order ? Order.toJSON(message.order) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryOrderResponse { + fromPartial, I>>(object: I): QueryOrderResponse { const message = createBaseQueryOrderResponse(); - message.order = - object.order !== undefined && object.order !== null - ? Order.fromPartial(object.order) - : undefined; + message.order = object.order !== undefined && object.order !== null ? Order.fromPartial(object.order) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryOrderResponse.$type, QueryOrderResponse); @@ -400,17 +340,14 @@ function createBaseQueryBidsRequest(): QueryBidsRequest { return { $type: "akash.market.v1beta2.QueryBidsRequest", filters: undefined, - pagination: undefined, + pagination: undefined }; } export const QueryBidsRequest = { $type: "akash.market.v1beta2.QueryBidsRequest" as const, - encode( - message: QueryBidsRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryBidsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.filters !== undefined) { BidFilters.encode(message.filters, writer.uint32(10).fork()).ldelim(); } @@ -444,42 +381,24 @@ export const QueryBidsRequest = { fromJSON(object: any): QueryBidsRequest { return { $type: QueryBidsRequest.$type, - filters: isSet(object.filters) - ? BidFilters.fromJSON(object.filters) - : undefined, - pagination: isSet(object.pagination) - ? PageRequest.fromJSON(object.pagination) - : undefined, + filters: isSet(object.filters) ? BidFilters.fromJSON(object.filters) : undefined, + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined }; }, toJSON(message: QueryBidsRequest): unknown { const obj: any = {}; - message.filters !== undefined && - (obj.filters = message.filters - ? BidFilters.toJSON(message.filters) - : undefined); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); + message.filters !== undefined && (obj.filters = message.filters ? BidFilters.toJSON(message.filters) : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryBidsRequest { + fromPartial, I>>(object: I): QueryBidsRequest { const message = createBaseQueryBidsRequest(); - message.filters = - object.filters !== undefined && object.filters !== null - ? BidFilters.fromPartial(object.filters) - : undefined; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; + message.filters = object.filters !== undefined && object.filters !== null ? BidFilters.fromPartial(object.filters) : undefined; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryBidsRequest.$type, QueryBidsRequest); @@ -488,25 +407,19 @@ function createBaseQueryBidsResponse(): QueryBidsResponse { return { $type: "akash.market.v1beta2.QueryBidsResponse", bids: [], - pagination: undefined, + pagination: undefined }; } export const QueryBidsResponse = { $type: "akash.market.v1beta2.QueryBidsResponse" as const, - encode( - message: QueryBidsResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryBidsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.bids) { QueryBidResponse.encode(v!, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); + PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } return writer; }, @@ -535,43 +448,28 @@ export const QueryBidsResponse = { fromJSON(object: any): QueryBidsResponse { return { $type: QueryBidsResponse.$type, - bids: Array.isArray(object?.bids) - ? object.bids.map((e: any) => QueryBidResponse.fromJSON(e)) - : [], - pagination: isSet(object.pagination) - ? PageResponse.fromJSON(object.pagination) - : undefined, + bids: Array.isArray(object?.bids) ? object.bids.map((e: any) => QueryBidResponse.fromJSON(e)) : [], + pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined }; }, toJSON(message: QueryBidsResponse): unknown { const obj: any = {}; if (message.bids) { - obj.bids = message.bids.map((e) => - e ? QueryBidResponse.toJSON(e) : undefined - ); + obj.bids = message.bids.map(e => (e ? QueryBidResponse.toJSON(e) : undefined)); } else { obj.bids = []; } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryBidsResponse { + fromPartial, I>>(object: I): QueryBidsResponse { const message = createBaseQueryBidsResponse(); - message.bids = - object.bids?.map((e) => QueryBidResponse.fromPartial(e)) || []; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageResponse.fromPartial(object.pagination) - : undefined; + message.bids = object.bids?.map(e => QueryBidResponse.fromPartial(e)) || []; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryBidsResponse.$type, QueryBidsResponse); @@ -583,10 +481,7 @@ function createBaseQueryBidRequest(): QueryBidRequest { export const QueryBidRequest = { $type: "akash.market.v1beta2.QueryBidRequest" as const, - encode( - message: QueryBidRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryBidRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { BidID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -614,27 +509,21 @@ export const QueryBidRequest = { fromJSON(object: any): QueryBidRequest { return { $type: QueryBidRequest.$type, - id: isSet(object.id) ? BidID.fromJSON(object.id) : undefined, + id: isSet(object.id) ? BidID.fromJSON(object.id) : undefined }; }, toJSON(message: QueryBidRequest): unknown { const obj: any = {}; - message.id !== undefined && - (obj.id = message.id ? BidID.toJSON(message.id) : undefined); + message.id !== undefined && (obj.id = message.id ? BidID.toJSON(message.id) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryBidRequest { + fromPartial, I>>(object: I): QueryBidRequest { const message = createBaseQueryBidRequest(); - message.id = - object.id !== undefined && object.id !== null - ? BidID.fromPartial(object.id) - : undefined; + message.id = object.id !== undefined && object.id !== null ? BidID.fromPartial(object.id) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryBidRequest.$type, QueryBidRequest); @@ -643,17 +532,14 @@ function createBaseQueryBidResponse(): QueryBidResponse { return { $type: "akash.market.v1beta2.QueryBidResponse", bid: undefined, - escrowAccount: undefined, + escrowAccount: undefined }; } export const QueryBidResponse = { $type: "akash.market.v1beta2.QueryBidResponse" as const, - encode( - message: QueryBidResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryBidResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.bid !== undefined) { Bid.encode(message.bid, writer.uint32(10).fork()).ldelim(); } @@ -688,37 +574,23 @@ export const QueryBidResponse = { return { $type: QueryBidResponse.$type, bid: isSet(object.bid) ? Bid.fromJSON(object.bid) : undefined, - escrowAccount: isSet(object.escrowAccount) - ? Account.fromJSON(object.escrowAccount) - : undefined, + escrowAccount: isSet(object.escrowAccount) ? Account.fromJSON(object.escrowAccount) : undefined }; }, toJSON(message: QueryBidResponse): unknown { const obj: any = {}; - message.bid !== undefined && - (obj.bid = message.bid ? Bid.toJSON(message.bid) : undefined); - message.escrowAccount !== undefined && - (obj.escrowAccount = message.escrowAccount - ? Account.toJSON(message.escrowAccount) - : undefined); + message.bid !== undefined && (obj.bid = message.bid ? Bid.toJSON(message.bid) : undefined); + message.escrowAccount !== undefined && (obj.escrowAccount = message.escrowAccount ? Account.toJSON(message.escrowAccount) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryBidResponse { + fromPartial, I>>(object: I): QueryBidResponse { const message = createBaseQueryBidResponse(); - message.bid = - object.bid !== undefined && object.bid !== null - ? Bid.fromPartial(object.bid) - : undefined; - message.escrowAccount = - object.escrowAccount !== undefined && object.escrowAccount !== null - ? Account.fromPartial(object.escrowAccount) - : undefined; + message.bid = object.bid !== undefined && object.bid !== null ? Bid.fromPartial(object.bid) : undefined; + message.escrowAccount = object.escrowAccount !== undefined && object.escrowAccount !== null ? Account.fromPartial(object.escrowAccount) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryBidResponse.$type, QueryBidResponse); @@ -727,17 +599,14 @@ function createBaseQueryLeasesRequest(): QueryLeasesRequest { return { $type: "akash.market.v1beta2.QueryLeasesRequest", filters: undefined, - pagination: undefined, + pagination: undefined }; } export const QueryLeasesRequest = { $type: "akash.market.v1beta2.QueryLeasesRequest" as const, - encode( - message: QueryLeasesRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryLeasesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.filters !== undefined) { LeaseFilters.encode(message.filters, writer.uint32(10).fork()).ldelim(); } @@ -771,42 +640,24 @@ export const QueryLeasesRequest = { fromJSON(object: any): QueryLeasesRequest { return { $type: QueryLeasesRequest.$type, - filters: isSet(object.filters) - ? LeaseFilters.fromJSON(object.filters) - : undefined, - pagination: isSet(object.pagination) - ? PageRequest.fromJSON(object.pagination) - : undefined, + filters: isSet(object.filters) ? LeaseFilters.fromJSON(object.filters) : undefined, + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined }; }, toJSON(message: QueryLeasesRequest): unknown { const obj: any = {}; - message.filters !== undefined && - (obj.filters = message.filters - ? LeaseFilters.toJSON(message.filters) - : undefined); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); + message.filters !== undefined && (obj.filters = message.filters ? LeaseFilters.toJSON(message.filters) : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryLeasesRequest { + fromPartial, I>>(object: I): QueryLeasesRequest { const message = createBaseQueryLeasesRequest(); - message.filters = - object.filters !== undefined && object.filters !== null - ? LeaseFilters.fromPartial(object.filters) - : undefined; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; + message.filters = object.filters !== undefined && object.filters !== null ? LeaseFilters.fromPartial(object.filters) : undefined; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryLeasesRequest.$type, QueryLeasesRequest); @@ -815,25 +666,19 @@ function createBaseQueryLeasesResponse(): QueryLeasesResponse { return { $type: "akash.market.v1beta2.QueryLeasesResponse", leases: [], - pagination: undefined, + pagination: undefined }; } export const QueryLeasesResponse = { $type: "akash.market.v1beta2.QueryLeasesResponse" as const, - encode( - message: QueryLeasesResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryLeasesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.leases) { QueryLeaseResponse.encode(v!, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); + PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } return writer; }, @@ -846,9 +691,7 @@ export const QueryLeasesResponse = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.leases.push( - QueryLeaseResponse.decode(reader, reader.uint32()) - ); + message.leases.push(QueryLeaseResponse.decode(reader, reader.uint32())); break; case 2: message.pagination = PageResponse.decode(reader, reader.uint32()); @@ -864,43 +707,28 @@ export const QueryLeasesResponse = { fromJSON(object: any): QueryLeasesResponse { return { $type: QueryLeasesResponse.$type, - leases: Array.isArray(object?.leases) - ? object.leases.map((e: any) => QueryLeaseResponse.fromJSON(e)) - : [], - pagination: isSet(object.pagination) - ? PageResponse.fromJSON(object.pagination) - : undefined, + leases: Array.isArray(object?.leases) ? object.leases.map((e: any) => QueryLeaseResponse.fromJSON(e)) : [], + pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined }; }, toJSON(message: QueryLeasesResponse): unknown { const obj: any = {}; if (message.leases) { - obj.leases = message.leases.map((e) => - e ? QueryLeaseResponse.toJSON(e) : undefined - ); + obj.leases = message.leases.map(e => (e ? QueryLeaseResponse.toJSON(e) : undefined)); } else { obj.leases = []; } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryLeasesResponse { + fromPartial, I>>(object: I): QueryLeasesResponse { const message = createBaseQueryLeasesResponse(); - message.leases = - object.leases?.map((e) => QueryLeaseResponse.fromPartial(e)) || []; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageResponse.fromPartial(object.pagination) - : undefined; + message.leases = object.leases?.map(e => QueryLeaseResponse.fromPartial(e)) || []; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryLeasesResponse.$type, QueryLeasesResponse); @@ -912,10 +740,7 @@ function createBaseQueryLeaseRequest(): QueryLeaseRequest { export const QueryLeaseRequest = { $type: "akash.market.v1beta2.QueryLeaseRequest" as const, - encode( - message: QueryLeaseRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryLeaseRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { LeaseID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -943,27 +768,21 @@ export const QueryLeaseRequest = { fromJSON(object: any): QueryLeaseRequest { return { $type: QueryLeaseRequest.$type, - id: isSet(object.id) ? LeaseID.fromJSON(object.id) : undefined, + id: isSet(object.id) ? LeaseID.fromJSON(object.id) : undefined }; }, toJSON(message: QueryLeaseRequest): unknown { const obj: any = {}; - message.id !== undefined && - (obj.id = message.id ? LeaseID.toJSON(message.id) : undefined); + message.id !== undefined && (obj.id = message.id ? LeaseID.toJSON(message.id) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryLeaseRequest { + fromPartial, I>>(object: I): QueryLeaseRequest { const message = createBaseQueryLeaseRequest(); - message.id = - object.id !== undefined && object.id !== null - ? LeaseID.fromPartial(object.id) - : undefined; + message.id = object.id !== undefined && object.id !== null ? LeaseID.fromPartial(object.id) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryLeaseRequest.$type, QueryLeaseRequest); @@ -972,25 +791,19 @@ function createBaseQueryLeaseResponse(): QueryLeaseResponse { return { $type: "akash.market.v1beta2.QueryLeaseResponse", lease: undefined, - escrowPayment: undefined, + escrowPayment: undefined }; } export const QueryLeaseResponse = { $type: "akash.market.v1beta2.QueryLeaseResponse" as const, - encode( - message: QueryLeaseResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryLeaseResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.lease !== undefined) { Lease.encode(message.lease, writer.uint32(10).fork()).ldelim(); } if (message.escrowPayment !== undefined) { - FractionalPayment.encode( - message.escrowPayment, - writer.uint32(18).fork() - ).ldelim(); + FractionalPayment.encode(message.escrowPayment, writer.uint32(18).fork()).ldelim(); } return writer; }, @@ -1006,10 +819,7 @@ export const QueryLeaseResponse = { message.lease = Lease.decode(reader, reader.uint32()); break; case 2: - message.escrowPayment = FractionalPayment.decode( - reader, - reader.uint32() - ); + message.escrowPayment = FractionalPayment.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -1023,37 +833,24 @@ export const QueryLeaseResponse = { return { $type: QueryLeaseResponse.$type, lease: isSet(object.lease) ? Lease.fromJSON(object.lease) : undefined, - escrowPayment: isSet(object.escrowPayment) - ? FractionalPayment.fromJSON(object.escrowPayment) - : undefined, + escrowPayment: isSet(object.escrowPayment) ? FractionalPayment.fromJSON(object.escrowPayment) : undefined }; }, toJSON(message: QueryLeaseResponse): unknown { const obj: any = {}; - message.lease !== undefined && - (obj.lease = message.lease ? Lease.toJSON(message.lease) : undefined); - message.escrowPayment !== undefined && - (obj.escrowPayment = message.escrowPayment - ? FractionalPayment.toJSON(message.escrowPayment) - : undefined); + message.lease !== undefined && (obj.lease = message.lease ? Lease.toJSON(message.lease) : undefined); + message.escrowPayment !== undefined && (obj.escrowPayment = message.escrowPayment ? FractionalPayment.toJSON(message.escrowPayment) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryLeaseResponse { + fromPartial, I>>(object: I): QueryLeaseResponse { const message = createBaseQueryLeaseResponse(); - message.lease = - object.lease !== undefined && object.lease !== null - ? Lease.fromPartial(object.lease) - : undefined; + message.lease = object.lease !== undefined && object.lease !== null ? Lease.fromPartial(object.lease) : undefined; message.escrowPayment = - object.escrowPayment !== undefined && object.escrowPayment !== null - ? FractionalPayment.fromPartial(object.escrowPayment) - : undefined; + object.escrowPayment !== undefined && object.escrowPayment !== null ? FractionalPayment.fromPartial(object.escrowPayment) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryLeaseResponse.$type, QueryLeaseResponse); @@ -1087,109 +884,63 @@ export class QueryClientImpl implements Query { } Orders(request: QueryOrdersRequest): Promise { const data = QueryOrdersRequest.encode(request).finish(); - const promise = this.rpc.request( - "akash.market.v1beta2.Query", - "Orders", - data - ); - return promise.then((data) => - QueryOrdersResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.market.v1beta2.Query", "Orders", data); + return promise.then(data => QueryOrdersResponse.decode(new _m0.Reader(data))); } Order(request: QueryOrderRequest): Promise { const data = QueryOrderRequest.encode(request).finish(); - const promise = this.rpc.request( - "akash.market.v1beta2.Query", - "Order", - data - ); - return promise.then((data) => - QueryOrderResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.market.v1beta2.Query", "Order", data); + return promise.then(data => QueryOrderResponse.decode(new _m0.Reader(data))); } Bids(request: QueryBidsRequest): Promise { const data = QueryBidsRequest.encode(request).finish(); - const promise = this.rpc.request( - "akash.market.v1beta2.Query", - "Bids", - data - ); - return promise.then((data) => - QueryBidsResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.market.v1beta2.Query", "Bids", data); + return promise.then(data => QueryBidsResponse.decode(new _m0.Reader(data))); } Bid(request: QueryBidRequest): Promise { const data = QueryBidRequest.encode(request).finish(); const promise = this.rpc.request("akash.market.v1beta2.Query", "Bid", data); - return promise.then((data) => - QueryBidResponse.decode(new _m0.Reader(data)) - ); + return promise.then(data => QueryBidResponse.decode(new _m0.Reader(data))); } Leases(request: QueryLeasesRequest): Promise { const data = QueryLeasesRequest.encode(request).finish(); - const promise = this.rpc.request( - "akash.market.v1beta2.Query", - "Leases", - data - ); - return promise.then((data) => - QueryLeasesResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.market.v1beta2.Query", "Leases", data); + return promise.then(data => QueryLeasesResponse.decode(new _m0.Reader(data))); } Lease(request: QueryLeaseRequest): Promise { const data = QueryLeaseRequest.encode(request).finish(); - const promise = this.rpc.request( - "akash.market.v1beta2.Query", - "Lease", - data - ); - return promise.then((data) => - QueryLeaseResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.market.v1beta2.Query", "Lease", data); + return promise.then(data => QueryLeaseResponse.decode(new _m0.Reader(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/market/v1beta2/service.ts b/src/protobuf/akash/market/v1beta2/service.ts index f4410ee..6cd2728 100644 --- a/src/protobuf/akash/market/v1beta2/service.ts +++ b/src/protobuf/akash/market/v1beta2/service.ts @@ -1,18 +1,6 @@ /* eslint-disable */ -import { - MsgCreateBidResponse, - MsgCloseBidResponse, - MsgCreateBid, - MsgCloseBid, -} from "./bid"; -import { - MsgWithdrawLeaseResponse, - MsgCreateLeaseResponse, - MsgCloseLeaseResponse, - MsgWithdrawLease, - MsgCreateLease, - MsgCloseLease, -} from "./lease"; +import { MsgCreateBidResponse, MsgCloseBidResponse, MsgCreateBid, MsgCloseBid } from "./bid"; +import { MsgWithdrawLeaseResponse, MsgCreateLeaseResponse, MsgCloseLeaseResponse, MsgWithdrawLease, MsgCreateLease, MsgCloseLease } from "./lease"; import * as _m0 from "protobufjs/minimal"; export const protobufPackage = "akash.market.v1beta2"; @@ -43,69 +31,35 @@ export class MsgClientImpl implements Msg { } CreateBid(request: MsgCreateBid): Promise { const data = MsgCreateBid.encode(request).finish(); - const promise = this.rpc.request( - "akash.market.v1beta2.Msg", - "CreateBid", - data - ); - return promise.then((data) => - MsgCreateBidResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.market.v1beta2.Msg", "CreateBid", data); + return promise.then(data => MsgCreateBidResponse.decode(new _m0.Reader(data))); } CloseBid(request: MsgCloseBid): Promise { const data = MsgCloseBid.encode(request).finish(); - const promise = this.rpc.request( - "akash.market.v1beta2.Msg", - "CloseBid", - data - ); - return promise.then((data) => - MsgCloseBidResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.market.v1beta2.Msg", "CloseBid", data); + return promise.then(data => MsgCloseBidResponse.decode(new _m0.Reader(data))); } WithdrawLease(request: MsgWithdrawLease): Promise { const data = MsgWithdrawLease.encode(request).finish(); - const promise = this.rpc.request( - "akash.market.v1beta2.Msg", - "WithdrawLease", - data - ); - return promise.then((data) => - MsgWithdrawLeaseResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.market.v1beta2.Msg", "WithdrawLease", data); + return promise.then(data => MsgWithdrawLeaseResponse.decode(new _m0.Reader(data))); } CreateLease(request: MsgCreateLease): Promise { const data = MsgCreateLease.encode(request).finish(); - const promise = this.rpc.request( - "akash.market.v1beta2.Msg", - "CreateLease", - data - ); - return promise.then((data) => - MsgCreateLeaseResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.market.v1beta2.Msg", "CreateLease", data); + return promise.then(data => MsgCreateLeaseResponse.decode(new _m0.Reader(data))); } CloseLease(request: MsgCloseLease): Promise { const data = MsgCloseLease.encode(request).finish(); - const promise = this.rpc.request( - "akash.market.v1beta2.Msg", - "CloseLease", - data - ); - return promise.then((data) => - MsgCloseLeaseResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.market.v1beta2.Msg", "CloseLease", data); + return promise.then(data => MsgCloseLeaseResponse.decode(new _m0.Reader(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } diff --git a/src/protobuf/akash/market/v1beta3/bid.ts b/src/protobuf/akash/market/v1beta3/bid.ts index b09e2e7..fed89cc 100644 --- a/src/protobuf/akash/market/v1beta3/bid.ts +++ b/src/protobuf/akash/market/v1beta3/bid.ts @@ -66,7 +66,7 @@ export enum Bid_State { lost = 3, /** closed - BidClosed denotes state for bid closed */ closed = 4, - UNRECOGNIZED = -1, + UNRECOGNIZED = -1 } export function bid_StateFromJSON(object: any): Bid_State { @@ -128,17 +128,14 @@ function createBaseMsgCreateBid(): MsgCreateBid { order: undefined, provider: "", price: undefined, - deposit: undefined, + deposit: undefined }; } export const MsgCreateBid = { $type: "akash.market.v1beta3.MsgCreateBid" as const, - encode( - message: MsgCreateBid, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MsgCreateBid, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.order !== undefined) { OrderID.encode(message.order, writer.uint32(10).fork()).ldelim(); } @@ -187,45 +184,27 @@ export const MsgCreateBid = { order: isSet(object.order) ? OrderID.fromJSON(object.order) : undefined, provider: isSet(object.provider) ? String(object.provider) : "", price: isSet(object.price) ? DecCoin.fromJSON(object.price) : undefined, - deposit: isSet(object.deposit) - ? Coin.fromJSON(object.deposit) - : undefined, + deposit: isSet(object.deposit) ? Coin.fromJSON(object.deposit) : undefined }; }, toJSON(message: MsgCreateBid): unknown { const obj: any = {}; - message.order !== undefined && - (obj.order = message.order ? OrderID.toJSON(message.order) : undefined); + message.order !== undefined && (obj.order = message.order ? OrderID.toJSON(message.order) : undefined); message.provider !== undefined && (obj.provider = message.provider); - message.price !== undefined && - (obj.price = message.price ? DecCoin.toJSON(message.price) : undefined); - message.deposit !== undefined && - (obj.deposit = message.deposit - ? Coin.toJSON(message.deposit) - : undefined); + message.price !== undefined && (obj.price = message.price ? DecCoin.toJSON(message.price) : undefined); + message.deposit !== undefined && (obj.deposit = message.deposit ? Coin.toJSON(message.deposit) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): MsgCreateBid { + fromPartial, I>>(object: I): MsgCreateBid { const message = createBaseMsgCreateBid(); - message.order = - object.order !== undefined && object.order !== null - ? OrderID.fromPartial(object.order) - : undefined; + message.order = object.order !== undefined && object.order !== null ? OrderID.fromPartial(object.order) : undefined; message.provider = object.provider ?? ""; - message.price = - object.price !== undefined && object.price !== null - ? DecCoin.fromPartial(object.price) - : undefined; - message.deposit = - object.deposit !== undefined && object.deposit !== null - ? Coin.fromPartial(object.deposit) - : undefined; + message.price = object.price !== undefined && object.price !== null ? DecCoin.fromPartial(object.price) : undefined; + message.deposit = object.deposit !== undefined && object.deposit !== null ? Coin.fromPartial(object.deposit) : undefined; return message; - }, + } }; messageTypeRegistry.set(MsgCreateBid.$type, MsgCreateBid); @@ -237,17 +216,11 @@ function createBaseMsgCreateBidResponse(): MsgCreateBidResponse { export const MsgCreateBidResponse = { $type: "akash.market.v1beta3.MsgCreateBidResponse" as const, - encode( - _: MsgCreateBidResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: MsgCreateBidResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgCreateBidResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreateBidResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCreateBidResponse(); @@ -264,7 +237,7 @@ export const MsgCreateBidResponse = { fromJSON(_: any): MsgCreateBidResponse { return { - $type: MsgCreateBidResponse.$type, + $type: MsgCreateBidResponse.$type }; }, @@ -273,12 +246,10 @@ export const MsgCreateBidResponse = { return obj; }, - fromPartial, I>>( - _: I - ): MsgCreateBidResponse { + fromPartial, I>>(_: I): MsgCreateBidResponse { const message = createBaseMsgCreateBidResponse(); return message; - }, + } }; messageTypeRegistry.set(MsgCreateBidResponse.$type, MsgCreateBidResponse); @@ -290,10 +261,7 @@ function createBaseMsgCloseBid(): MsgCloseBid { export const MsgCloseBid = { $type: "akash.market.v1beta3.MsgCloseBid" as const, - encode( - message: MsgCloseBid, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MsgCloseBid, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.bidId !== undefined) { BidID.encode(message.bidId, writer.uint32(10).fork()).ldelim(); } @@ -321,27 +289,21 @@ export const MsgCloseBid = { fromJSON(object: any): MsgCloseBid { return { $type: MsgCloseBid.$type, - bidId: isSet(object.bidId) ? BidID.fromJSON(object.bidId) : undefined, + bidId: isSet(object.bidId) ? BidID.fromJSON(object.bidId) : undefined }; }, toJSON(message: MsgCloseBid): unknown { const obj: any = {}; - message.bidId !== undefined && - (obj.bidId = message.bidId ? BidID.toJSON(message.bidId) : undefined); + message.bidId !== undefined && (obj.bidId = message.bidId ? BidID.toJSON(message.bidId) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): MsgCloseBid { + fromPartial, I>>(object: I): MsgCloseBid { const message = createBaseMsgCloseBid(); - message.bidId = - object.bidId !== undefined && object.bidId !== null - ? BidID.fromPartial(object.bidId) - : undefined; + message.bidId = object.bidId !== undefined && object.bidId !== null ? BidID.fromPartial(object.bidId) : undefined; return message; - }, + } }; messageTypeRegistry.set(MsgCloseBid.$type, MsgCloseBid); @@ -353,10 +315,7 @@ function createBaseMsgCloseBidResponse(): MsgCloseBidResponse { export const MsgCloseBidResponse = { $type: "akash.market.v1beta3.MsgCloseBidResponse" as const, - encode( - _: MsgCloseBidResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: MsgCloseBidResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, @@ -377,7 +336,7 @@ export const MsgCloseBidResponse = { fromJSON(_: any): MsgCloseBidResponse { return { - $type: MsgCloseBidResponse.$type, + $type: MsgCloseBidResponse.$type }; }, @@ -386,12 +345,10 @@ export const MsgCloseBidResponse = { return obj; }, - fromPartial, I>>( - _: I - ): MsgCloseBidResponse { + fromPartial, I>>(_: I): MsgCloseBidResponse { const message = createBaseMsgCloseBidResponse(); return message; - }, + } }; messageTypeRegistry.set(MsgCloseBidResponse.$type, MsgCloseBidResponse); @@ -403,7 +360,7 @@ function createBaseBidID(): BidID { dseq: Long.UZERO, gseq: 0, oseq: 0, - provider: "", + provider: "" }; } @@ -466,15 +423,14 @@ export const BidID = { dseq: isSet(object.dseq) ? Long.fromValue(object.dseq) : Long.UZERO, gseq: isSet(object.gseq) ? Number(object.gseq) : 0, oseq: isSet(object.oseq) ? Number(object.oseq) : 0, - provider: isSet(object.provider) ? String(object.provider) : "", + provider: isSet(object.provider) ? String(object.provider) : "" }; }, toJSON(message: BidID): unknown { const obj: any = {}; message.owner !== undefined && (obj.owner = message.owner); - message.dseq !== undefined && - (obj.dseq = (message.dseq || Long.UZERO).toString()); + message.dseq !== undefined && (obj.dseq = (message.dseq || Long.UZERO).toString()); message.gseq !== undefined && (obj.gseq = Math.round(message.gseq)); message.oseq !== undefined && (obj.oseq = Math.round(message.oseq)); message.provider !== undefined && (obj.provider = message.provider); @@ -484,15 +440,12 @@ export const BidID = { fromPartial, I>>(object: I): BidID { const message = createBaseBidID(); message.owner = object.owner ?? ""; - message.dseq = - object.dseq !== undefined && object.dseq !== null - ? Long.fromValue(object.dseq) - : Long.UZERO; + message.dseq = object.dseq !== undefined && object.dseq !== null ? Long.fromValue(object.dseq) : Long.UZERO; message.gseq = object.gseq ?? 0; message.oseq = object.oseq ?? 0; message.provider = object.provider ?? ""; return message; - }, + } }; messageTypeRegistry.set(BidID.$type, BidID); @@ -503,7 +456,7 @@ function createBaseBid(): Bid { bidId: undefined, state: 0, price: undefined, - createdAt: Long.ZERO, + createdAt: Long.ZERO }; } @@ -559,41 +512,27 @@ export const Bid = { bidId: isSet(object.bidId) ? BidID.fromJSON(object.bidId) : undefined, state: isSet(object.state) ? bid_StateFromJSON(object.state) : 0, price: isSet(object.price) ? DecCoin.fromJSON(object.price) : undefined, - createdAt: isSet(object.createdAt) - ? Long.fromValue(object.createdAt) - : Long.ZERO, + createdAt: isSet(object.createdAt) ? Long.fromValue(object.createdAt) : Long.ZERO }; }, toJSON(message: Bid): unknown { const obj: any = {}; - message.bidId !== undefined && - (obj.bidId = message.bidId ? BidID.toJSON(message.bidId) : undefined); + message.bidId !== undefined && (obj.bidId = message.bidId ? BidID.toJSON(message.bidId) : undefined); message.state !== undefined && (obj.state = bid_StateToJSON(message.state)); - message.price !== undefined && - (obj.price = message.price ? DecCoin.toJSON(message.price) : undefined); - message.createdAt !== undefined && - (obj.createdAt = (message.createdAt || Long.ZERO).toString()); + message.price !== undefined && (obj.price = message.price ? DecCoin.toJSON(message.price) : undefined); + message.createdAt !== undefined && (obj.createdAt = (message.createdAt || Long.ZERO).toString()); return obj; }, fromPartial, I>>(object: I): Bid { const message = createBaseBid(); - message.bidId = - object.bidId !== undefined && object.bidId !== null - ? BidID.fromPartial(object.bidId) - : undefined; + message.bidId = object.bidId !== undefined && object.bidId !== null ? BidID.fromPartial(object.bidId) : undefined; message.state = object.state ?? 0; - message.price = - object.price !== undefined && object.price !== null - ? DecCoin.fromPartial(object.price) - : undefined; - message.createdAt = - object.createdAt !== undefined && object.createdAt !== null - ? Long.fromValue(object.createdAt) - : Long.ZERO; + message.price = object.price !== undefined && object.price !== null ? DecCoin.fromPartial(object.price) : undefined; + message.createdAt = object.createdAt !== undefined && object.createdAt !== null ? Long.fromValue(object.createdAt) : Long.ZERO; return message; - }, + } }; messageTypeRegistry.set(Bid.$type, Bid); @@ -606,17 +545,14 @@ function createBaseBidFilters(): BidFilters { gseq: 0, oseq: 0, provider: "", - state: "", + state: "" }; } export const BidFilters = { $type: "akash.market.v1beta3.BidFilters" as const, - encode( - message: BidFilters, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: BidFilters, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -679,15 +615,14 @@ export const BidFilters = { gseq: isSet(object.gseq) ? Number(object.gseq) : 0, oseq: isSet(object.oseq) ? Number(object.oseq) : 0, provider: isSet(object.provider) ? String(object.provider) : "", - state: isSet(object.state) ? String(object.state) : "", + state: isSet(object.state) ? String(object.state) : "" }; }, toJSON(message: BidFilters): unknown { const obj: any = {}; message.owner !== undefined && (obj.owner = message.owner); - message.dseq !== undefined && - (obj.dseq = (message.dseq || Long.UZERO).toString()); + message.dseq !== undefined && (obj.dseq = (message.dseq || Long.UZERO).toString()); message.gseq !== undefined && (obj.gseq = Math.round(message.gseq)); message.oseq !== undefined && (obj.oseq = Math.round(message.oseq)); message.provider !== undefined && (obj.provider = message.provider); @@ -695,53 +630,38 @@ export const BidFilters = { return obj; }, - fromPartial, I>>( - object: I - ): BidFilters { + fromPartial, I>>(object: I): BidFilters { const message = createBaseBidFilters(); message.owner = object.owner ?? ""; - message.dseq = - object.dseq !== undefined && object.dseq !== null - ? Long.fromValue(object.dseq) - : Long.UZERO; + message.dseq = object.dseq !== undefined && object.dseq !== null ? Long.fromValue(object.dseq) : Long.UZERO; message.gseq = object.gseq ?? 0; message.oseq = object.oseq ?? 0; message.provider = object.provider ?? ""; message.state = object.state ?? ""; return message; - }, + } }; messageTypeRegistry.set(BidFilters.$type, BidFilters); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/market/v1beta3/genesis.ts b/src/protobuf/akash/market/v1beta3/genesis.ts index d1cdd4b..85ab088 100644 --- a/src/protobuf/akash/market/v1beta3/genesis.ts +++ b/src/protobuf/akash/market/v1beta3/genesis.ts @@ -24,17 +24,14 @@ function createBaseGenesisState(): GenesisState { params: undefined, orders: [], leases: [], - bids: [], + bids: [] }; } export const GenesisState = { $type: "akash.market.v1beta3.GenesisState" as const, - encode( - message: GenesisState, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: GenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.params !== undefined) { Params.encode(message.params, writer.uint32(10).fork()).ldelim(); } @@ -81,85 +78,63 @@ export const GenesisState = { return { $type: GenesisState.$type, params: isSet(object.params) ? Params.fromJSON(object.params) : undefined, - orders: Array.isArray(object?.orders) - ? object.orders.map((e: any) => Order.fromJSON(e)) - : [], - leases: Array.isArray(object?.leases) - ? object.leases.map((e: any) => Lease.fromJSON(e)) - : [], - bids: Array.isArray(object?.bids) - ? object.bids.map((e: any) => Bid.fromJSON(e)) - : [], + orders: Array.isArray(object?.orders) ? object.orders.map((e: any) => Order.fromJSON(e)) : [], + leases: Array.isArray(object?.leases) ? object.leases.map((e: any) => Lease.fromJSON(e)) : [], + bids: Array.isArray(object?.bids) ? object.bids.map((e: any) => Bid.fromJSON(e)) : [] }; }, toJSON(message: GenesisState): unknown { const obj: any = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); + message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined); if (message.orders) { - obj.orders = message.orders.map((e) => (e ? Order.toJSON(e) : undefined)); + obj.orders = message.orders.map(e => (e ? Order.toJSON(e) : undefined)); } else { obj.orders = []; } if (message.leases) { - obj.leases = message.leases.map((e) => (e ? Lease.toJSON(e) : undefined)); + obj.leases = message.leases.map(e => (e ? Lease.toJSON(e) : undefined)); } else { obj.leases = []; } if (message.bids) { - obj.bids = message.bids.map((e) => (e ? Bid.toJSON(e) : undefined)); + obj.bids = message.bids.map(e => (e ? Bid.toJSON(e) : undefined)); } else { obj.bids = []; } return obj; }, - fromPartial, I>>( - object: I - ): GenesisState { + fromPartial, I>>(object: I): GenesisState { const message = createBaseGenesisState(); - message.params = - object.params !== undefined && object.params !== null - ? Params.fromPartial(object.params) - : undefined; - message.orders = object.orders?.map((e) => Order.fromPartial(e)) || []; - message.leases = object.leases?.map((e) => Lease.fromPartial(e)) || []; - message.bids = object.bids?.map((e) => Bid.fromPartial(e)) || []; + message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; + message.orders = object.orders?.map(e => Order.fromPartial(e)) || []; + message.leases = object.leases?.map(e => Lease.fromPartial(e)) || []; + message.bids = object.bids?.map(e => Bid.fromPartial(e)) || []; return message; - }, + } }; messageTypeRegistry.set(GenesisState.$type, GenesisState); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/market/v1beta3/lease.ts b/src/protobuf/akash/market/v1beta3/lease.ts index 081eb81..3d23384 100644 --- a/src/protobuf/akash/market/v1beta3/lease.ts +++ b/src/protobuf/akash/market/v1beta3/lease.ts @@ -37,7 +37,7 @@ export enum Lease_State { insufficient_funds = 2, /** closed - LeaseClosed denotes state for lease closed */ closed = 3, - UNRECOGNIZED = -1, + UNRECOGNIZED = -1 } export function lease_StateFromJSON(object: any): Lease_State { @@ -128,17 +128,14 @@ function createBaseLeaseID(): LeaseID { dseq: Long.UZERO, gseq: 0, oseq: 0, - provider: "", + provider: "" }; } export const LeaseID = { $type: "akash.market.v1beta3.LeaseID" as const, - encode( - message: LeaseID, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: LeaseID, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -194,15 +191,14 @@ export const LeaseID = { dseq: isSet(object.dseq) ? Long.fromValue(object.dseq) : Long.UZERO, gseq: isSet(object.gseq) ? Number(object.gseq) : 0, oseq: isSet(object.oseq) ? Number(object.oseq) : 0, - provider: isSet(object.provider) ? String(object.provider) : "", + provider: isSet(object.provider) ? String(object.provider) : "" }; }, toJSON(message: LeaseID): unknown { const obj: any = {}; message.owner !== undefined && (obj.owner = message.owner); - message.dseq !== undefined && - (obj.dseq = (message.dseq || Long.UZERO).toString()); + message.dseq !== undefined && (obj.dseq = (message.dseq || Long.UZERO).toString()); message.gseq !== undefined && (obj.gseq = Math.round(message.gseq)); message.oseq !== undefined && (obj.oseq = Math.round(message.oseq)); message.provider !== undefined && (obj.provider = message.provider); @@ -212,15 +208,12 @@ export const LeaseID = { fromPartial, I>>(object: I): LeaseID { const message = createBaseLeaseID(); message.owner = object.owner ?? ""; - message.dseq = - object.dseq !== undefined && object.dseq !== null - ? Long.fromValue(object.dseq) - : Long.UZERO; + message.dseq = object.dseq !== undefined && object.dseq !== null ? Long.fromValue(object.dseq) : Long.UZERO; message.gseq = object.gseq ?? 0; message.oseq = object.oseq ?? 0; message.provider = object.provider ?? ""; return message; - }, + } }; messageTypeRegistry.set(LeaseID.$type, LeaseID); @@ -232,7 +225,7 @@ function createBaseLease(): Lease { state: 0, price: undefined, createdAt: Long.ZERO, - closedOn: Long.ZERO, + closedOn: Long.ZERO }; } @@ -291,58 +284,33 @@ export const Lease = { fromJSON(object: any): Lease { return { $type: Lease.$type, - leaseId: isSet(object.leaseId) - ? LeaseID.fromJSON(object.leaseId) - : undefined, + leaseId: isSet(object.leaseId) ? LeaseID.fromJSON(object.leaseId) : undefined, state: isSet(object.state) ? lease_StateFromJSON(object.state) : 0, price: isSet(object.price) ? DecCoin.fromJSON(object.price) : undefined, - createdAt: isSet(object.createdAt) - ? Long.fromValue(object.createdAt) - : Long.ZERO, - closedOn: isSet(object.closedOn) - ? Long.fromValue(object.closedOn) - : Long.ZERO, + createdAt: isSet(object.createdAt) ? Long.fromValue(object.createdAt) : Long.ZERO, + closedOn: isSet(object.closedOn) ? Long.fromValue(object.closedOn) : Long.ZERO }; }, toJSON(message: Lease): unknown { const obj: any = {}; - message.leaseId !== undefined && - (obj.leaseId = message.leaseId - ? LeaseID.toJSON(message.leaseId) - : undefined); - message.state !== undefined && - (obj.state = lease_StateToJSON(message.state)); - message.price !== undefined && - (obj.price = message.price ? DecCoin.toJSON(message.price) : undefined); - message.createdAt !== undefined && - (obj.createdAt = (message.createdAt || Long.ZERO).toString()); - message.closedOn !== undefined && - (obj.closedOn = (message.closedOn || Long.ZERO).toString()); + message.leaseId !== undefined && (obj.leaseId = message.leaseId ? LeaseID.toJSON(message.leaseId) : undefined); + message.state !== undefined && (obj.state = lease_StateToJSON(message.state)); + message.price !== undefined && (obj.price = message.price ? DecCoin.toJSON(message.price) : undefined); + message.createdAt !== undefined && (obj.createdAt = (message.createdAt || Long.ZERO).toString()); + message.closedOn !== undefined && (obj.closedOn = (message.closedOn || Long.ZERO).toString()); return obj; }, fromPartial, I>>(object: I): Lease { const message = createBaseLease(); - message.leaseId = - object.leaseId !== undefined && object.leaseId !== null - ? LeaseID.fromPartial(object.leaseId) - : undefined; + message.leaseId = object.leaseId !== undefined && object.leaseId !== null ? LeaseID.fromPartial(object.leaseId) : undefined; message.state = object.state ?? 0; - message.price = - object.price !== undefined && object.price !== null - ? DecCoin.fromPartial(object.price) - : undefined; - message.createdAt = - object.createdAt !== undefined && object.createdAt !== null - ? Long.fromValue(object.createdAt) - : Long.ZERO; - message.closedOn = - object.closedOn !== undefined && object.closedOn !== null - ? Long.fromValue(object.closedOn) - : Long.ZERO; + message.price = object.price !== undefined && object.price !== null ? DecCoin.fromPartial(object.price) : undefined; + message.createdAt = object.createdAt !== undefined && object.createdAt !== null ? Long.fromValue(object.createdAt) : Long.ZERO; + message.closedOn = object.closedOn !== undefined && object.closedOn !== null ? Long.fromValue(object.closedOn) : Long.ZERO; return message; - }, + } }; messageTypeRegistry.set(Lease.$type, Lease); @@ -355,17 +323,14 @@ function createBaseLeaseFilters(): LeaseFilters { gseq: 0, oseq: 0, provider: "", - state: "", + state: "" }; } export const LeaseFilters = { $type: "akash.market.v1beta3.LeaseFilters" as const, - encode( - message: LeaseFilters, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: LeaseFilters, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -428,15 +393,14 @@ export const LeaseFilters = { gseq: isSet(object.gseq) ? Number(object.gseq) : 0, oseq: isSet(object.oseq) ? Number(object.oseq) : 0, provider: isSet(object.provider) ? String(object.provider) : "", - state: isSet(object.state) ? String(object.state) : "", + state: isSet(object.state) ? String(object.state) : "" }; }, toJSON(message: LeaseFilters): unknown { const obj: any = {}; message.owner !== undefined && (obj.owner = message.owner); - message.dseq !== undefined && - (obj.dseq = (message.dseq || Long.UZERO).toString()); + message.dseq !== undefined && (obj.dseq = (message.dseq || Long.UZERO).toString()); message.gseq !== undefined && (obj.gseq = Math.round(message.gseq)); message.oseq !== undefined && (obj.oseq = Math.round(message.oseq)); message.provider !== undefined && (obj.provider = message.provider); @@ -444,21 +408,16 @@ export const LeaseFilters = { return obj; }, - fromPartial, I>>( - object: I - ): LeaseFilters { + fromPartial, I>>(object: I): LeaseFilters { const message = createBaseLeaseFilters(); message.owner = object.owner ?? ""; - message.dseq = - object.dseq !== undefined && object.dseq !== null - ? Long.fromValue(object.dseq) - : Long.UZERO; + message.dseq = object.dseq !== undefined && object.dseq !== null ? Long.fromValue(object.dseq) : Long.UZERO; message.gseq = object.gseq ?? 0; message.oseq = object.oseq ?? 0; message.provider = object.provider ?? ""; message.state = object.state ?? ""; return message; - }, + } }; messageTypeRegistry.set(LeaseFilters.$type, LeaseFilters); @@ -470,10 +429,7 @@ function createBaseMsgCreateLease(): MsgCreateLease { export const MsgCreateLease = { $type: "akash.market.v1beta3.MsgCreateLease" as const, - encode( - message: MsgCreateLease, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MsgCreateLease, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.bidId !== undefined) { BidID.encode(message.bidId, writer.uint32(10).fork()).ldelim(); } @@ -501,27 +457,21 @@ export const MsgCreateLease = { fromJSON(object: any): MsgCreateLease { return { $type: MsgCreateLease.$type, - bidId: isSet(object.bidId) ? BidID.fromJSON(object.bidId) : undefined, + bidId: isSet(object.bidId) ? BidID.fromJSON(object.bidId) : undefined }; }, toJSON(message: MsgCreateLease): unknown { const obj: any = {}; - message.bidId !== undefined && - (obj.bidId = message.bidId ? BidID.toJSON(message.bidId) : undefined); + message.bidId !== undefined && (obj.bidId = message.bidId ? BidID.toJSON(message.bidId) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): MsgCreateLease { + fromPartial, I>>(object: I): MsgCreateLease { const message = createBaseMsgCreateLease(); - message.bidId = - object.bidId !== undefined && object.bidId !== null - ? BidID.fromPartial(object.bidId) - : undefined; + message.bidId = object.bidId !== undefined && object.bidId !== null ? BidID.fromPartial(object.bidId) : undefined; return message; - }, + } }; messageTypeRegistry.set(MsgCreateLease.$type, MsgCreateLease); @@ -533,17 +483,11 @@ function createBaseMsgCreateLeaseResponse(): MsgCreateLeaseResponse { export const MsgCreateLeaseResponse = { $type: "akash.market.v1beta3.MsgCreateLeaseResponse" as const, - encode( - _: MsgCreateLeaseResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: MsgCreateLeaseResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgCreateLeaseResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreateLeaseResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCreateLeaseResponse(); @@ -560,7 +504,7 @@ export const MsgCreateLeaseResponse = { fromJSON(_: any): MsgCreateLeaseResponse { return { - $type: MsgCreateLeaseResponse.$type, + $type: MsgCreateLeaseResponse.$type }; }, @@ -569,12 +513,10 @@ export const MsgCreateLeaseResponse = { return obj; }, - fromPartial, I>>( - _: I - ): MsgCreateLeaseResponse { + fromPartial, I>>(_: I): MsgCreateLeaseResponse { const message = createBaseMsgCreateLeaseResponse(); return message; - }, + } }; messageTypeRegistry.set(MsgCreateLeaseResponse.$type, MsgCreateLeaseResponse); @@ -586,10 +528,7 @@ function createBaseMsgWithdrawLease(): MsgWithdrawLease { export const MsgWithdrawLease = { $type: "akash.market.v1beta3.MsgWithdrawLease" as const, - encode( - message: MsgWithdrawLease, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MsgWithdrawLease, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.bidId !== undefined) { LeaseID.encode(message.bidId, writer.uint32(10).fork()).ldelim(); } @@ -617,27 +556,21 @@ export const MsgWithdrawLease = { fromJSON(object: any): MsgWithdrawLease { return { $type: MsgWithdrawLease.$type, - bidId: isSet(object.bidId) ? LeaseID.fromJSON(object.bidId) : undefined, + bidId: isSet(object.bidId) ? LeaseID.fromJSON(object.bidId) : undefined }; }, toJSON(message: MsgWithdrawLease): unknown { const obj: any = {}; - message.bidId !== undefined && - (obj.bidId = message.bidId ? LeaseID.toJSON(message.bidId) : undefined); + message.bidId !== undefined && (obj.bidId = message.bidId ? LeaseID.toJSON(message.bidId) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): MsgWithdrawLease { + fromPartial, I>>(object: I): MsgWithdrawLease { const message = createBaseMsgWithdrawLease(); - message.bidId = - object.bidId !== undefined && object.bidId !== null - ? LeaseID.fromPartial(object.bidId) - : undefined; + message.bidId = object.bidId !== undefined && object.bidId !== null ? LeaseID.fromPartial(object.bidId) : undefined; return message; - }, + } }; messageTypeRegistry.set(MsgWithdrawLease.$type, MsgWithdrawLease); @@ -649,17 +582,11 @@ function createBaseMsgWithdrawLeaseResponse(): MsgWithdrawLeaseResponse { export const MsgWithdrawLeaseResponse = { $type: "akash.market.v1beta3.MsgWithdrawLeaseResponse" as const, - encode( - _: MsgWithdrawLeaseResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: MsgWithdrawLeaseResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgWithdrawLeaseResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgWithdrawLeaseResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgWithdrawLeaseResponse(); @@ -676,7 +603,7 @@ export const MsgWithdrawLeaseResponse = { fromJSON(_: any): MsgWithdrawLeaseResponse { return { - $type: MsgWithdrawLeaseResponse.$type, + $type: MsgWithdrawLeaseResponse.$type }; }, @@ -685,18 +612,13 @@ export const MsgWithdrawLeaseResponse = { return obj; }, - fromPartial, I>>( - _: I - ): MsgWithdrawLeaseResponse { + fromPartial, I>>(_: I): MsgWithdrawLeaseResponse { const message = createBaseMsgWithdrawLeaseResponse(); return message; - }, + } }; -messageTypeRegistry.set( - MsgWithdrawLeaseResponse.$type, - MsgWithdrawLeaseResponse -); +messageTypeRegistry.set(MsgWithdrawLeaseResponse.$type, MsgWithdrawLeaseResponse); function createBaseMsgCloseLease(): MsgCloseLease { return { $type: "akash.market.v1beta3.MsgCloseLease", leaseId: undefined }; @@ -705,10 +627,7 @@ function createBaseMsgCloseLease(): MsgCloseLease { export const MsgCloseLease = { $type: "akash.market.v1beta3.MsgCloseLease" as const, - encode( - message: MsgCloseLease, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MsgCloseLease, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.leaseId !== undefined) { LeaseID.encode(message.leaseId, writer.uint32(10).fork()).ldelim(); } @@ -736,31 +655,21 @@ export const MsgCloseLease = { fromJSON(object: any): MsgCloseLease { return { $type: MsgCloseLease.$type, - leaseId: isSet(object.leaseId) - ? LeaseID.fromJSON(object.leaseId) - : undefined, + leaseId: isSet(object.leaseId) ? LeaseID.fromJSON(object.leaseId) : undefined }; }, toJSON(message: MsgCloseLease): unknown { const obj: any = {}; - message.leaseId !== undefined && - (obj.leaseId = message.leaseId - ? LeaseID.toJSON(message.leaseId) - : undefined); + message.leaseId !== undefined && (obj.leaseId = message.leaseId ? LeaseID.toJSON(message.leaseId) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): MsgCloseLease { + fromPartial, I>>(object: I): MsgCloseLease { const message = createBaseMsgCloseLease(); - message.leaseId = - object.leaseId !== undefined && object.leaseId !== null - ? LeaseID.fromPartial(object.leaseId) - : undefined; + message.leaseId = object.leaseId !== undefined && object.leaseId !== null ? LeaseID.fromPartial(object.leaseId) : undefined; return message; - }, + } }; messageTypeRegistry.set(MsgCloseLease.$type, MsgCloseLease); @@ -772,17 +681,11 @@ function createBaseMsgCloseLeaseResponse(): MsgCloseLeaseResponse { export const MsgCloseLeaseResponse = { $type: "akash.market.v1beta3.MsgCloseLeaseResponse" as const, - encode( - _: MsgCloseLeaseResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: MsgCloseLeaseResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgCloseLeaseResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgCloseLeaseResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCloseLeaseResponse(); @@ -799,7 +702,7 @@ export const MsgCloseLeaseResponse = { fromJSON(_: any): MsgCloseLeaseResponse { return { - $type: MsgCloseLeaseResponse.$type, + $type: MsgCloseLeaseResponse.$type }; }, @@ -808,44 +711,32 @@ export const MsgCloseLeaseResponse = { return obj; }, - fromPartial, I>>( - _: I - ): MsgCloseLeaseResponse { + fromPartial, I>>(_: I): MsgCloseLeaseResponse { const message = createBaseMsgCloseLeaseResponse(); return message; - }, + } }; messageTypeRegistry.set(MsgCloseLeaseResponse.$type, MsgCloseLeaseResponse); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/market/v1beta3/order.ts b/src/protobuf/akash/market/v1beta3/order.ts index 9884a76..1479674 100644 --- a/src/protobuf/akash/market/v1beta3/order.ts +++ b/src/protobuf/akash/market/v1beta3/order.ts @@ -34,7 +34,7 @@ export enum Order_State { active = 2, /** closed - OrderClosed denotes state for order lost */ closed = 3, - UNRECOGNIZED = -1, + UNRECOGNIZED = -1 } export function order_StateFromJSON(object: any): Order_State { @@ -90,17 +90,14 @@ function createBaseOrderID(): OrderID { owner: "", dseq: Long.UZERO, gseq: 0, - oseq: 0, + oseq: 0 }; } export const OrderID = { $type: "akash.market.v1beta3.OrderID" as const, - encode( - message: OrderID, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: OrderID, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -149,15 +146,14 @@ export const OrderID = { owner: isSet(object.owner) ? String(object.owner) : "", dseq: isSet(object.dseq) ? Long.fromValue(object.dseq) : Long.UZERO, gseq: isSet(object.gseq) ? Number(object.gseq) : 0, - oseq: isSet(object.oseq) ? Number(object.oseq) : 0, + oseq: isSet(object.oseq) ? Number(object.oseq) : 0 }; }, toJSON(message: OrderID): unknown { const obj: any = {}; message.owner !== undefined && (obj.owner = message.owner); - message.dseq !== undefined && - (obj.dseq = (message.dseq || Long.UZERO).toString()); + message.dseq !== undefined && (obj.dseq = (message.dseq || Long.UZERO).toString()); message.gseq !== undefined && (obj.gseq = Math.round(message.gseq)); message.oseq !== undefined && (obj.oseq = Math.round(message.oseq)); return obj; @@ -166,14 +162,11 @@ export const OrderID = { fromPartial, I>>(object: I): OrderID { const message = createBaseOrderID(); message.owner = object.owner ?? ""; - message.dseq = - object.dseq !== undefined && object.dseq !== null - ? Long.fromValue(object.dseq) - : Long.UZERO; + message.dseq = object.dseq !== undefined && object.dseq !== null ? Long.fromValue(object.dseq) : Long.UZERO; message.gseq = object.gseq ?? 0; message.oseq = object.oseq ?? 0; return message; - }, + } }; messageTypeRegistry.set(OrderID.$type, OrderID); @@ -184,7 +177,7 @@ function createBaseOrder(): Order { orderId: undefined, state: 0, spec: undefined, - createdAt: Long.ZERO, + createdAt: Long.ZERO }; } @@ -237,49 +230,30 @@ export const Order = { fromJSON(object: any): Order { return { $type: Order.$type, - orderId: isSet(object.orderId) - ? OrderID.fromJSON(object.orderId) - : undefined, + orderId: isSet(object.orderId) ? OrderID.fromJSON(object.orderId) : undefined, state: isSet(object.state) ? order_StateFromJSON(object.state) : 0, spec: isSet(object.spec) ? GroupSpec.fromJSON(object.spec) : undefined, - createdAt: isSet(object.createdAt) - ? Long.fromValue(object.createdAt) - : Long.ZERO, + createdAt: isSet(object.createdAt) ? Long.fromValue(object.createdAt) : Long.ZERO }; }, toJSON(message: Order): unknown { const obj: any = {}; - message.orderId !== undefined && - (obj.orderId = message.orderId - ? OrderID.toJSON(message.orderId) - : undefined); - message.state !== undefined && - (obj.state = order_StateToJSON(message.state)); - message.spec !== undefined && - (obj.spec = message.spec ? GroupSpec.toJSON(message.spec) : undefined); - message.createdAt !== undefined && - (obj.createdAt = (message.createdAt || Long.ZERO).toString()); + message.orderId !== undefined && (obj.orderId = message.orderId ? OrderID.toJSON(message.orderId) : undefined); + message.state !== undefined && (obj.state = order_StateToJSON(message.state)); + message.spec !== undefined && (obj.spec = message.spec ? GroupSpec.toJSON(message.spec) : undefined); + message.createdAt !== undefined && (obj.createdAt = (message.createdAt || Long.ZERO).toString()); return obj; }, fromPartial, I>>(object: I): Order { const message = createBaseOrder(); - message.orderId = - object.orderId !== undefined && object.orderId !== null - ? OrderID.fromPartial(object.orderId) - : undefined; + message.orderId = object.orderId !== undefined && object.orderId !== null ? OrderID.fromPartial(object.orderId) : undefined; message.state = object.state ?? 0; - message.spec = - object.spec !== undefined && object.spec !== null - ? GroupSpec.fromPartial(object.spec) - : undefined; - message.createdAt = - object.createdAt !== undefined && object.createdAt !== null - ? Long.fromValue(object.createdAt) - : Long.ZERO; + message.spec = object.spec !== undefined && object.spec !== null ? GroupSpec.fromPartial(object.spec) : undefined; + message.createdAt = object.createdAt !== undefined && object.createdAt !== null ? Long.fromValue(object.createdAt) : Long.ZERO; return message; - }, + } }; messageTypeRegistry.set(Order.$type, Order); @@ -291,17 +265,14 @@ function createBaseOrderFilters(): OrderFilters { dseq: Long.UZERO, gseq: 0, oseq: 0, - state: "", + state: "" }; } export const OrderFilters = { $type: "akash.market.v1beta3.OrderFilters" as const, - encode( - message: OrderFilters, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: OrderFilters, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -357,67 +328,51 @@ export const OrderFilters = { dseq: isSet(object.dseq) ? Long.fromValue(object.dseq) : Long.UZERO, gseq: isSet(object.gseq) ? Number(object.gseq) : 0, oseq: isSet(object.oseq) ? Number(object.oseq) : 0, - state: isSet(object.state) ? String(object.state) : "", + state: isSet(object.state) ? String(object.state) : "" }; }, toJSON(message: OrderFilters): unknown { const obj: any = {}; message.owner !== undefined && (obj.owner = message.owner); - message.dseq !== undefined && - (obj.dseq = (message.dseq || Long.UZERO).toString()); + message.dseq !== undefined && (obj.dseq = (message.dseq || Long.UZERO).toString()); message.gseq !== undefined && (obj.gseq = Math.round(message.gseq)); message.oseq !== undefined && (obj.oseq = Math.round(message.oseq)); message.state !== undefined && (obj.state = message.state); return obj; }, - fromPartial, I>>( - object: I - ): OrderFilters { + fromPartial, I>>(object: I): OrderFilters { const message = createBaseOrderFilters(); message.owner = object.owner ?? ""; - message.dseq = - object.dseq !== undefined && object.dseq !== null - ? Long.fromValue(object.dseq) - : Long.UZERO; + message.dseq = object.dseq !== undefined && object.dseq !== null ? Long.fromValue(object.dseq) : Long.UZERO; message.gseq = object.gseq ?? 0; message.oseq = object.oseq ?? 0; message.state = object.state ?? ""; return message; - }, + } }; messageTypeRegistry.set(OrderFilters.$type, OrderFilters); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/market/v1beta3/params.ts b/src/protobuf/akash/market/v1beta3/params.ts index 503f183..88bd574 100644 --- a/src/protobuf/akash/market/v1beta3/params.ts +++ b/src/protobuf/akash/market/v1beta3/params.ts @@ -17,17 +17,14 @@ function createBaseParams(): Params { return { $type: "akash.market.v1beta3.Params", bidMinDeposit: undefined, - orderMaxBids: 0, + orderMaxBids: 0 }; } export const Params = { $type: "akash.market.v1beta3.Params" as const, - encode( - message: Params, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Params, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.bidMinDeposit !== undefined) { Coin.encode(message.bidMinDeposit, writer.uint32(10).fork()).ldelim(); } @@ -61,67 +58,46 @@ export const Params = { fromJSON(object: any): Params { return { $type: Params.$type, - bidMinDeposit: isSet(object.bidMinDeposit) - ? Coin.fromJSON(object.bidMinDeposit) - : undefined, - orderMaxBids: isSet(object.orderMaxBids) - ? Number(object.orderMaxBids) - : 0, + bidMinDeposit: isSet(object.bidMinDeposit) ? Coin.fromJSON(object.bidMinDeposit) : undefined, + orderMaxBids: isSet(object.orderMaxBids) ? Number(object.orderMaxBids) : 0 }; }, toJSON(message: Params): unknown { const obj: any = {}; - message.bidMinDeposit !== undefined && - (obj.bidMinDeposit = message.bidMinDeposit - ? Coin.toJSON(message.bidMinDeposit) - : undefined); - message.orderMaxBids !== undefined && - (obj.orderMaxBids = Math.round(message.orderMaxBids)); + message.bidMinDeposit !== undefined && (obj.bidMinDeposit = message.bidMinDeposit ? Coin.toJSON(message.bidMinDeposit) : undefined); + message.orderMaxBids !== undefined && (obj.orderMaxBids = Math.round(message.orderMaxBids)); return obj; }, fromPartial, I>>(object: I): Params { const message = createBaseParams(); - message.bidMinDeposit = - object.bidMinDeposit !== undefined && object.bidMinDeposit !== null - ? Coin.fromPartial(object.bidMinDeposit) - : undefined; + message.bidMinDeposit = object.bidMinDeposit !== undefined && object.bidMinDeposit !== null ? Coin.fromPartial(object.bidMinDeposit) : undefined; message.orderMaxBids = object.orderMaxBids ?? 0; return message; - }, + } }; messageTypeRegistry.set(Params.$type, Params); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/market/v1beta3/query.ts b/src/protobuf/akash/market/v1beta3/query.ts index 89a1ddd..d71f967 100644 --- a/src/protobuf/akash/market/v1beta3/query.ts +++ b/src/protobuf/akash/market/v1beta3/query.ts @@ -2,10 +2,7 @@ import { messageTypeRegistry } from "../../../typeRegistry"; import Long from "long"; import { OrderFilters, Order, OrderID } from "./order"; -import { - PageRequest, - PageResponse, -} from "../../../cosmos/base/query/v1beta1/pagination"; +import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; import { BidFilters, BidID, Bid } from "./bid"; import { Account, FractionalPayment } from "../../escrow/v1beta3/types"; import { LeaseFilters, LeaseID, Lease } from "./lease"; @@ -97,17 +94,14 @@ function createBaseQueryOrdersRequest(): QueryOrdersRequest { return { $type: "akash.market.v1beta3.QueryOrdersRequest", filters: undefined, - pagination: undefined, + pagination: undefined }; } export const QueryOrdersRequest = { $type: "akash.market.v1beta3.QueryOrdersRequest" as const, - encode( - message: QueryOrdersRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryOrdersRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.filters !== undefined) { OrderFilters.encode(message.filters, writer.uint32(10).fork()).ldelim(); } @@ -141,42 +135,24 @@ export const QueryOrdersRequest = { fromJSON(object: any): QueryOrdersRequest { return { $type: QueryOrdersRequest.$type, - filters: isSet(object.filters) - ? OrderFilters.fromJSON(object.filters) - : undefined, - pagination: isSet(object.pagination) - ? PageRequest.fromJSON(object.pagination) - : undefined, + filters: isSet(object.filters) ? OrderFilters.fromJSON(object.filters) : undefined, + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined }; }, toJSON(message: QueryOrdersRequest): unknown { const obj: any = {}; - message.filters !== undefined && - (obj.filters = message.filters - ? OrderFilters.toJSON(message.filters) - : undefined); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); + message.filters !== undefined && (obj.filters = message.filters ? OrderFilters.toJSON(message.filters) : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryOrdersRequest { + fromPartial, I>>(object: I): QueryOrdersRequest { const message = createBaseQueryOrdersRequest(); - message.filters = - object.filters !== undefined && object.filters !== null - ? OrderFilters.fromPartial(object.filters) - : undefined; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; + message.filters = object.filters !== undefined && object.filters !== null ? OrderFilters.fromPartial(object.filters) : undefined; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryOrdersRequest.$type, QueryOrdersRequest); @@ -185,25 +161,19 @@ function createBaseQueryOrdersResponse(): QueryOrdersResponse { return { $type: "akash.market.v1beta3.QueryOrdersResponse", orders: [], - pagination: undefined, + pagination: undefined }; } export const QueryOrdersResponse = { $type: "akash.market.v1beta3.QueryOrdersResponse" as const, - encode( - message: QueryOrdersResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryOrdersResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.orders) { Order.encode(v!, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); + PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } return writer; }, @@ -232,40 +202,28 @@ export const QueryOrdersResponse = { fromJSON(object: any): QueryOrdersResponse { return { $type: QueryOrdersResponse.$type, - orders: Array.isArray(object?.orders) - ? object.orders.map((e: any) => Order.fromJSON(e)) - : [], - pagination: isSet(object.pagination) - ? PageResponse.fromJSON(object.pagination) - : undefined, + orders: Array.isArray(object?.orders) ? object.orders.map((e: any) => Order.fromJSON(e)) : [], + pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined }; }, toJSON(message: QueryOrdersResponse): unknown { const obj: any = {}; if (message.orders) { - obj.orders = message.orders.map((e) => (e ? Order.toJSON(e) : undefined)); + obj.orders = message.orders.map(e => (e ? Order.toJSON(e) : undefined)); } else { obj.orders = []; } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryOrdersResponse { + fromPartial, I>>(object: I): QueryOrdersResponse { const message = createBaseQueryOrdersResponse(); - message.orders = object.orders?.map((e) => Order.fromPartial(e)) || []; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageResponse.fromPartial(object.pagination) - : undefined; + message.orders = object.orders?.map(e => Order.fromPartial(e)) || []; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryOrdersResponse.$type, QueryOrdersResponse); @@ -277,10 +235,7 @@ function createBaseQueryOrderRequest(): QueryOrderRequest { export const QueryOrderRequest = { $type: "akash.market.v1beta3.QueryOrderRequest" as const, - encode( - message: QueryOrderRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryOrderRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { OrderID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -308,27 +263,21 @@ export const QueryOrderRequest = { fromJSON(object: any): QueryOrderRequest { return { $type: QueryOrderRequest.$type, - id: isSet(object.id) ? OrderID.fromJSON(object.id) : undefined, + id: isSet(object.id) ? OrderID.fromJSON(object.id) : undefined }; }, toJSON(message: QueryOrderRequest): unknown { const obj: any = {}; - message.id !== undefined && - (obj.id = message.id ? OrderID.toJSON(message.id) : undefined); + message.id !== undefined && (obj.id = message.id ? OrderID.toJSON(message.id) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryOrderRequest { + fromPartial, I>>(object: I): QueryOrderRequest { const message = createBaseQueryOrderRequest(); - message.id = - object.id !== undefined && object.id !== null - ? OrderID.fromPartial(object.id) - : undefined; + message.id = object.id !== undefined && object.id !== null ? OrderID.fromPartial(object.id) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryOrderRequest.$type, QueryOrderRequest); @@ -340,10 +289,7 @@ function createBaseQueryOrderResponse(): QueryOrderResponse { export const QueryOrderResponse = { $type: "akash.market.v1beta3.QueryOrderResponse" as const, - encode( - message: QueryOrderResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryOrderResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.order !== undefined) { Order.encode(message.order, writer.uint32(10).fork()).ldelim(); } @@ -371,27 +317,21 @@ export const QueryOrderResponse = { fromJSON(object: any): QueryOrderResponse { return { $type: QueryOrderResponse.$type, - order: isSet(object.order) ? Order.fromJSON(object.order) : undefined, + order: isSet(object.order) ? Order.fromJSON(object.order) : undefined }; }, toJSON(message: QueryOrderResponse): unknown { const obj: any = {}; - message.order !== undefined && - (obj.order = message.order ? Order.toJSON(message.order) : undefined); + message.order !== undefined && (obj.order = message.order ? Order.toJSON(message.order) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryOrderResponse { + fromPartial, I>>(object: I): QueryOrderResponse { const message = createBaseQueryOrderResponse(); - message.order = - object.order !== undefined && object.order !== null - ? Order.fromPartial(object.order) - : undefined; + message.order = object.order !== undefined && object.order !== null ? Order.fromPartial(object.order) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryOrderResponse.$type, QueryOrderResponse); @@ -400,17 +340,14 @@ function createBaseQueryBidsRequest(): QueryBidsRequest { return { $type: "akash.market.v1beta3.QueryBidsRequest", filters: undefined, - pagination: undefined, + pagination: undefined }; } export const QueryBidsRequest = { $type: "akash.market.v1beta3.QueryBidsRequest" as const, - encode( - message: QueryBidsRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryBidsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.filters !== undefined) { BidFilters.encode(message.filters, writer.uint32(10).fork()).ldelim(); } @@ -444,42 +381,24 @@ export const QueryBidsRequest = { fromJSON(object: any): QueryBidsRequest { return { $type: QueryBidsRequest.$type, - filters: isSet(object.filters) - ? BidFilters.fromJSON(object.filters) - : undefined, - pagination: isSet(object.pagination) - ? PageRequest.fromJSON(object.pagination) - : undefined, + filters: isSet(object.filters) ? BidFilters.fromJSON(object.filters) : undefined, + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined }; }, toJSON(message: QueryBidsRequest): unknown { const obj: any = {}; - message.filters !== undefined && - (obj.filters = message.filters - ? BidFilters.toJSON(message.filters) - : undefined); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); + message.filters !== undefined && (obj.filters = message.filters ? BidFilters.toJSON(message.filters) : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryBidsRequest { + fromPartial, I>>(object: I): QueryBidsRequest { const message = createBaseQueryBidsRequest(); - message.filters = - object.filters !== undefined && object.filters !== null - ? BidFilters.fromPartial(object.filters) - : undefined; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; + message.filters = object.filters !== undefined && object.filters !== null ? BidFilters.fromPartial(object.filters) : undefined; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryBidsRequest.$type, QueryBidsRequest); @@ -488,25 +407,19 @@ function createBaseQueryBidsResponse(): QueryBidsResponse { return { $type: "akash.market.v1beta3.QueryBidsResponse", bids: [], - pagination: undefined, + pagination: undefined }; } export const QueryBidsResponse = { $type: "akash.market.v1beta3.QueryBidsResponse" as const, - encode( - message: QueryBidsResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryBidsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.bids) { QueryBidResponse.encode(v!, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); + PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } return writer; }, @@ -535,43 +448,28 @@ export const QueryBidsResponse = { fromJSON(object: any): QueryBidsResponse { return { $type: QueryBidsResponse.$type, - bids: Array.isArray(object?.bids) - ? object.bids.map((e: any) => QueryBidResponse.fromJSON(e)) - : [], - pagination: isSet(object.pagination) - ? PageResponse.fromJSON(object.pagination) - : undefined, + bids: Array.isArray(object?.bids) ? object.bids.map((e: any) => QueryBidResponse.fromJSON(e)) : [], + pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined }; }, toJSON(message: QueryBidsResponse): unknown { const obj: any = {}; if (message.bids) { - obj.bids = message.bids.map((e) => - e ? QueryBidResponse.toJSON(e) : undefined - ); + obj.bids = message.bids.map(e => (e ? QueryBidResponse.toJSON(e) : undefined)); } else { obj.bids = []; } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryBidsResponse { + fromPartial, I>>(object: I): QueryBidsResponse { const message = createBaseQueryBidsResponse(); - message.bids = - object.bids?.map((e) => QueryBidResponse.fromPartial(e)) || []; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageResponse.fromPartial(object.pagination) - : undefined; + message.bids = object.bids?.map(e => QueryBidResponse.fromPartial(e)) || []; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryBidsResponse.$type, QueryBidsResponse); @@ -583,10 +481,7 @@ function createBaseQueryBidRequest(): QueryBidRequest { export const QueryBidRequest = { $type: "akash.market.v1beta3.QueryBidRequest" as const, - encode( - message: QueryBidRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryBidRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { BidID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -614,27 +509,21 @@ export const QueryBidRequest = { fromJSON(object: any): QueryBidRequest { return { $type: QueryBidRequest.$type, - id: isSet(object.id) ? BidID.fromJSON(object.id) : undefined, + id: isSet(object.id) ? BidID.fromJSON(object.id) : undefined }; }, toJSON(message: QueryBidRequest): unknown { const obj: any = {}; - message.id !== undefined && - (obj.id = message.id ? BidID.toJSON(message.id) : undefined); + message.id !== undefined && (obj.id = message.id ? BidID.toJSON(message.id) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryBidRequest { + fromPartial, I>>(object: I): QueryBidRequest { const message = createBaseQueryBidRequest(); - message.id = - object.id !== undefined && object.id !== null - ? BidID.fromPartial(object.id) - : undefined; + message.id = object.id !== undefined && object.id !== null ? BidID.fromPartial(object.id) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryBidRequest.$type, QueryBidRequest); @@ -643,17 +532,14 @@ function createBaseQueryBidResponse(): QueryBidResponse { return { $type: "akash.market.v1beta3.QueryBidResponse", bid: undefined, - escrowAccount: undefined, + escrowAccount: undefined }; } export const QueryBidResponse = { $type: "akash.market.v1beta3.QueryBidResponse" as const, - encode( - message: QueryBidResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryBidResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.bid !== undefined) { Bid.encode(message.bid, writer.uint32(10).fork()).ldelim(); } @@ -688,37 +574,23 @@ export const QueryBidResponse = { return { $type: QueryBidResponse.$type, bid: isSet(object.bid) ? Bid.fromJSON(object.bid) : undefined, - escrowAccount: isSet(object.escrowAccount) - ? Account.fromJSON(object.escrowAccount) - : undefined, + escrowAccount: isSet(object.escrowAccount) ? Account.fromJSON(object.escrowAccount) : undefined }; }, toJSON(message: QueryBidResponse): unknown { const obj: any = {}; - message.bid !== undefined && - (obj.bid = message.bid ? Bid.toJSON(message.bid) : undefined); - message.escrowAccount !== undefined && - (obj.escrowAccount = message.escrowAccount - ? Account.toJSON(message.escrowAccount) - : undefined); + message.bid !== undefined && (obj.bid = message.bid ? Bid.toJSON(message.bid) : undefined); + message.escrowAccount !== undefined && (obj.escrowAccount = message.escrowAccount ? Account.toJSON(message.escrowAccount) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryBidResponse { + fromPartial, I>>(object: I): QueryBidResponse { const message = createBaseQueryBidResponse(); - message.bid = - object.bid !== undefined && object.bid !== null - ? Bid.fromPartial(object.bid) - : undefined; - message.escrowAccount = - object.escrowAccount !== undefined && object.escrowAccount !== null - ? Account.fromPartial(object.escrowAccount) - : undefined; + message.bid = object.bid !== undefined && object.bid !== null ? Bid.fromPartial(object.bid) : undefined; + message.escrowAccount = object.escrowAccount !== undefined && object.escrowAccount !== null ? Account.fromPartial(object.escrowAccount) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryBidResponse.$type, QueryBidResponse); @@ -727,17 +599,14 @@ function createBaseQueryLeasesRequest(): QueryLeasesRequest { return { $type: "akash.market.v1beta3.QueryLeasesRequest", filters: undefined, - pagination: undefined, + pagination: undefined }; } export const QueryLeasesRequest = { $type: "akash.market.v1beta3.QueryLeasesRequest" as const, - encode( - message: QueryLeasesRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryLeasesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.filters !== undefined) { LeaseFilters.encode(message.filters, writer.uint32(10).fork()).ldelim(); } @@ -771,42 +640,24 @@ export const QueryLeasesRequest = { fromJSON(object: any): QueryLeasesRequest { return { $type: QueryLeasesRequest.$type, - filters: isSet(object.filters) - ? LeaseFilters.fromJSON(object.filters) - : undefined, - pagination: isSet(object.pagination) - ? PageRequest.fromJSON(object.pagination) - : undefined, + filters: isSet(object.filters) ? LeaseFilters.fromJSON(object.filters) : undefined, + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined }; }, toJSON(message: QueryLeasesRequest): unknown { const obj: any = {}; - message.filters !== undefined && - (obj.filters = message.filters - ? LeaseFilters.toJSON(message.filters) - : undefined); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); + message.filters !== undefined && (obj.filters = message.filters ? LeaseFilters.toJSON(message.filters) : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryLeasesRequest { + fromPartial, I>>(object: I): QueryLeasesRequest { const message = createBaseQueryLeasesRequest(); - message.filters = - object.filters !== undefined && object.filters !== null - ? LeaseFilters.fromPartial(object.filters) - : undefined; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; + message.filters = object.filters !== undefined && object.filters !== null ? LeaseFilters.fromPartial(object.filters) : undefined; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryLeasesRequest.$type, QueryLeasesRequest); @@ -815,25 +666,19 @@ function createBaseQueryLeasesResponse(): QueryLeasesResponse { return { $type: "akash.market.v1beta3.QueryLeasesResponse", leases: [], - pagination: undefined, + pagination: undefined }; } export const QueryLeasesResponse = { $type: "akash.market.v1beta3.QueryLeasesResponse" as const, - encode( - message: QueryLeasesResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryLeasesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.leases) { QueryLeaseResponse.encode(v!, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); + PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } return writer; }, @@ -846,9 +691,7 @@ export const QueryLeasesResponse = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.leases.push( - QueryLeaseResponse.decode(reader, reader.uint32()) - ); + message.leases.push(QueryLeaseResponse.decode(reader, reader.uint32())); break; case 2: message.pagination = PageResponse.decode(reader, reader.uint32()); @@ -864,43 +707,28 @@ export const QueryLeasesResponse = { fromJSON(object: any): QueryLeasesResponse { return { $type: QueryLeasesResponse.$type, - leases: Array.isArray(object?.leases) - ? object.leases.map((e: any) => QueryLeaseResponse.fromJSON(e)) - : [], - pagination: isSet(object.pagination) - ? PageResponse.fromJSON(object.pagination) - : undefined, + leases: Array.isArray(object?.leases) ? object.leases.map((e: any) => QueryLeaseResponse.fromJSON(e)) : [], + pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined }; }, toJSON(message: QueryLeasesResponse): unknown { const obj: any = {}; if (message.leases) { - obj.leases = message.leases.map((e) => - e ? QueryLeaseResponse.toJSON(e) : undefined - ); + obj.leases = message.leases.map(e => (e ? QueryLeaseResponse.toJSON(e) : undefined)); } else { obj.leases = []; } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryLeasesResponse { + fromPartial, I>>(object: I): QueryLeasesResponse { const message = createBaseQueryLeasesResponse(); - message.leases = - object.leases?.map((e) => QueryLeaseResponse.fromPartial(e)) || []; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageResponse.fromPartial(object.pagination) - : undefined; + message.leases = object.leases?.map(e => QueryLeaseResponse.fromPartial(e)) || []; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryLeasesResponse.$type, QueryLeasesResponse); @@ -912,10 +740,7 @@ function createBaseQueryLeaseRequest(): QueryLeaseRequest { export const QueryLeaseRequest = { $type: "akash.market.v1beta3.QueryLeaseRequest" as const, - encode( - message: QueryLeaseRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryLeaseRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { LeaseID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -943,27 +768,21 @@ export const QueryLeaseRequest = { fromJSON(object: any): QueryLeaseRequest { return { $type: QueryLeaseRequest.$type, - id: isSet(object.id) ? LeaseID.fromJSON(object.id) : undefined, + id: isSet(object.id) ? LeaseID.fromJSON(object.id) : undefined }; }, toJSON(message: QueryLeaseRequest): unknown { const obj: any = {}; - message.id !== undefined && - (obj.id = message.id ? LeaseID.toJSON(message.id) : undefined); + message.id !== undefined && (obj.id = message.id ? LeaseID.toJSON(message.id) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryLeaseRequest { + fromPartial, I>>(object: I): QueryLeaseRequest { const message = createBaseQueryLeaseRequest(); - message.id = - object.id !== undefined && object.id !== null - ? LeaseID.fromPartial(object.id) - : undefined; + message.id = object.id !== undefined && object.id !== null ? LeaseID.fromPartial(object.id) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryLeaseRequest.$type, QueryLeaseRequest); @@ -972,25 +791,19 @@ function createBaseQueryLeaseResponse(): QueryLeaseResponse { return { $type: "akash.market.v1beta3.QueryLeaseResponse", lease: undefined, - escrowPayment: undefined, + escrowPayment: undefined }; } export const QueryLeaseResponse = { $type: "akash.market.v1beta3.QueryLeaseResponse" as const, - encode( - message: QueryLeaseResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryLeaseResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.lease !== undefined) { Lease.encode(message.lease, writer.uint32(10).fork()).ldelim(); } if (message.escrowPayment !== undefined) { - FractionalPayment.encode( - message.escrowPayment, - writer.uint32(18).fork() - ).ldelim(); + FractionalPayment.encode(message.escrowPayment, writer.uint32(18).fork()).ldelim(); } return writer; }, @@ -1006,10 +819,7 @@ export const QueryLeaseResponse = { message.lease = Lease.decode(reader, reader.uint32()); break; case 2: - message.escrowPayment = FractionalPayment.decode( - reader, - reader.uint32() - ); + message.escrowPayment = FractionalPayment.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -1023,37 +833,24 @@ export const QueryLeaseResponse = { return { $type: QueryLeaseResponse.$type, lease: isSet(object.lease) ? Lease.fromJSON(object.lease) : undefined, - escrowPayment: isSet(object.escrowPayment) - ? FractionalPayment.fromJSON(object.escrowPayment) - : undefined, + escrowPayment: isSet(object.escrowPayment) ? FractionalPayment.fromJSON(object.escrowPayment) : undefined }; }, toJSON(message: QueryLeaseResponse): unknown { const obj: any = {}; - message.lease !== undefined && - (obj.lease = message.lease ? Lease.toJSON(message.lease) : undefined); - message.escrowPayment !== undefined && - (obj.escrowPayment = message.escrowPayment - ? FractionalPayment.toJSON(message.escrowPayment) - : undefined); + message.lease !== undefined && (obj.lease = message.lease ? Lease.toJSON(message.lease) : undefined); + message.escrowPayment !== undefined && (obj.escrowPayment = message.escrowPayment ? FractionalPayment.toJSON(message.escrowPayment) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryLeaseResponse { + fromPartial, I>>(object: I): QueryLeaseResponse { const message = createBaseQueryLeaseResponse(); - message.lease = - object.lease !== undefined && object.lease !== null - ? Lease.fromPartial(object.lease) - : undefined; + message.lease = object.lease !== undefined && object.lease !== null ? Lease.fromPartial(object.lease) : undefined; message.escrowPayment = - object.escrowPayment !== undefined && object.escrowPayment !== null - ? FractionalPayment.fromPartial(object.escrowPayment) - : undefined; + object.escrowPayment !== undefined && object.escrowPayment !== null ? FractionalPayment.fromPartial(object.escrowPayment) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryLeaseResponse.$type, QueryLeaseResponse); @@ -1087,109 +884,63 @@ export class QueryClientImpl implements Query { } Orders(request: QueryOrdersRequest): Promise { const data = QueryOrdersRequest.encode(request).finish(); - const promise = this.rpc.request( - "akash.market.v1beta3.Query", - "Orders", - data - ); - return promise.then((data) => - QueryOrdersResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.market.v1beta3.Query", "Orders", data); + return promise.then(data => QueryOrdersResponse.decode(new _m0.Reader(data))); } Order(request: QueryOrderRequest): Promise { const data = QueryOrderRequest.encode(request).finish(); - const promise = this.rpc.request( - "akash.market.v1beta3.Query", - "Order", - data - ); - return promise.then((data) => - QueryOrderResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.market.v1beta3.Query", "Order", data); + return promise.then(data => QueryOrderResponse.decode(new _m0.Reader(data))); } Bids(request: QueryBidsRequest): Promise { const data = QueryBidsRequest.encode(request).finish(); - const promise = this.rpc.request( - "akash.market.v1beta3.Query", - "Bids", - data - ); - return promise.then((data) => - QueryBidsResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.market.v1beta3.Query", "Bids", data); + return promise.then(data => QueryBidsResponse.decode(new _m0.Reader(data))); } Bid(request: QueryBidRequest): Promise { const data = QueryBidRequest.encode(request).finish(); const promise = this.rpc.request("akash.market.v1beta3.Query", "Bid", data); - return promise.then((data) => - QueryBidResponse.decode(new _m0.Reader(data)) - ); + return promise.then(data => QueryBidResponse.decode(new _m0.Reader(data))); } Leases(request: QueryLeasesRequest): Promise { const data = QueryLeasesRequest.encode(request).finish(); - const promise = this.rpc.request( - "akash.market.v1beta3.Query", - "Leases", - data - ); - return promise.then((data) => - QueryLeasesResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.market.v1beta3.Query", "Leases", data); + return promise.then(data => QueryLeasesResponse.decode(new _m0.Reader(data))); } Lease(request: QueryLeaseRequest): Promise { const data = QueryLeaseRequest.encode(request).finish(); - const promise = this.rpc.request( - "akash.market.v1beta3.Query", - "Lease", - data - ); - return promise.then((data) => - QueryLeaseResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.market.v1beta3.Query", "Lease", data); + return promise.then(data => QueryLeaseResponse.decode(new _m0.Reader(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/market/v1beta3/service.ts b/src/protobuf/akash/market/v1beta3/service.ts index 41e9268..942d3bd 100644 --- a/src/protobuf/akash/market/v1beta3/service.ts +++ b/src/protobuf/akash/market/v1beta3/service.ts @@ -1,18 +1,6 @@ /* eslint-disable */ -import { - MsgCreateBidResponse, - MsgCloseBidResponse, - MsgCreateBid, - MsgCloseBid, -} from "./bid"; -import { - MsgWithdrawLeaseResponse, - MsgCreateLeaseResponse, - MsgCloseLeaseResponse, - MsgWithdrawLease, - MsgCreateLease, - MsgCloseLease, -} from "./lease"; +import { MsgCreateBidResponse, MsgCloseBidResponse, MsgCreateBid, MsgCloseBid } from "./bid"; +import { MsgWithdrawLeaseResponse, MsgCreateLeaseResponse, MsgCloseLeaseResponse, MsgWithdrawLease, MsgCreateLease, MsgCloseLease } from "./lease"; import * as _m0 from "protobufjs/minimal"; export const protobufPackage = "akash.market.v1beta3"; @@ -43,69 +31,35 @@ export class MsgClientImpl implements Msg { } CreateBid(request: MsgCreateBid): Promise { const data = MsgCreateBid.encode(request).finish(); - const promise = this.rpc.request( - "akash.market.v1beta3.Msg", - "CreateBid", - data - ); - return promise.then((data) => - MsgCreateBidResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.market.v1beta3.Msg", "CreateBid", data); + return promise.then(data => MsgCreateBidResponse.decode(new _m0.Reader(data))); } CloseBid(request: MsgCloseBid): Promise { const data = MsgCloseBid.encode(request).finish(); - const promise = this.rpc.request( - "akash.market.v1beta3.Msg", - "CloseBid", - data - ); - return promise.then((data) => - MsgCloseBidResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.market.v1beta3.Msg", "CloseBid", data); + return promise.then(data => MsgCloseBidResponse.decode(new _m0.Reader(data))); } WithdrawLease(request: MsgWithdrawLease): Promise { const data = MsgWithdrawLease.encode(request).finish(); - const promise = this.rpc.request( - "akash.market.v1beta3.Msg", - "WithdrawLease", - data - ); - return promise.then((data) => - MsgWithdrawLeaseResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.market.v1beta3.Msg", "WithdrawLease", data); + return promise.then(data => MsgWithdrawLeaseResponse.decode(new _m0.Reader(data))); } CreateLease(request: MsgCreateLease): Promise { const data = MsgCreateLease.encode(request).finish(); - const promise = this.rpc.request( - "akash.market.v1beta3.Msg", - "CreateLease", - data - ); - return promise.then((data) => - MsgCreateLeaseResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.market.v1beta3.Msg", "CreateLease", data); + return promise.then(data => MsgCreateLeaseResponse.decode(new _m0.Reader(data))); } CloseLease(request: MsgCloseLease): Promise { const data = MsgCloseLease.encode(request).finish(); - const promise = this.rpc.request( - "akash.market.v1beta3.Msg", - "CloseLease", - data - ); - return promise.then((data) => - MsgCloseLeaseResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.market.v1beta3.Msg", "CloseLease", data); + return promise.then(data => MsgCloseLeaseResponse.decode(new _m0.Reader(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } diff --git a/src/protobuf/akash/market/v1beta4/bid.ts b/src/protobuf/akash/market/v1beta4/bid.ts index 3e593e1..9f30090 100644 --- a/src/protobuf/akash/market/v1beta4/bid.ts +++ b/src/protobuf/akash/market/v1beta4/bid.ts @@ -79,7 +79,7 @@ export enum Bid_State { lost = 3, /** closed - BidClosed denotes state for bid closed */ closed = 4, - UNRECOGNIZED = -1, + UNRECOGNIZED = -1 } export function bid_StateFromJSON(object: any): Bid_State { @@ -139,17 +139,14 @@ function createBaseResourceOffer(): ResourceOffer { return { $type: "akash.market.v1beta4.ResourceOffer", resources: undefined, - count: 0, + count: 0 }; } export const ResourceOffer = { $type: "akash.market.v1beta4.ResourceOffer" as const, - encode( - message: ResourceOffer, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: ResourceOffer, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.resources !== undefined) { Resources.encode(message.resources, writer.uint32(10).fork()).ldelim(); } @@ -183,34 +180,24 @@ export const ResourceOffer = { fromJSON(object: any): ResourceOffer { return { $type: ResourceOffer.$type, - resources: isSet(object.resources) - ? Resources.fromJSON(object.resources) - : undefined, - count: isSet(object.count) ? Number(object.count) : 0, + resources: isSet(object.resources) ? Resources.fromJSON(object.resources) : undefined, + count: isSet(object.count) ? Number(object.count) : 0 }; }, toJSON(message: ResourceOffer): unknown { const obj: any = {}; - message.resources !== undefined && - (obj.resources = message.resources - ? Resources.toJSON(message.resources) - : undefined); + message.resources !== undefined && (obj.resources = message.resources ? Resources.toJSON(message.resources) : undefined); message.count !== undefined && (obj.count = Math.round(message.count)); return obj; }, - fromPartial, I>>( - object: I - ): ResourceOffer { + fromPartial, I>>(object: I): ResourceOffer { const message = createBaseResourceOffer(); - message.resources = - object.resources !== undefined && object.resources !== null - ? Resources.fromPartial(object.resources) - : undefined; + message.resources = object.resources !== undefined && object.resources !== null ? Resources.fromPartial(object.resources) : undefined; message.count = object.count ?? 0; return message; - }, + } }; messageTypeRegistry.set(ResourceOffer.$type, ResourceOffer); @@ -222,17 +209,14 @@ function createBaseMsgCreateBid(): MsgCreateBid { provider: "", price: undefined, deposit: undefined, - resourcesOffer: [], + resourcesOffer: [] }; } export const MsgCreateBid = { $type: "akash.market.v1beta4.MsgCreateBid" as const, - encode( - message: MsgCreateBid, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MsgCreateBid, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.order !== undefined) { OrderID.encode(message.order, writer.uint32(10).fork()).ldelim(); } @@ -271,9 +255,7 @@ export const MsgCreateBid = { message.deposit = Coin.decode(reader, reader.uint32()); break; case 5: - message.resourcesOffer.push( - ResourceOffer.decode(reader, reader.uint32()) - ); + message.resourcesOffer.push(ResourceOffer.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -289,57 +271,34 @@ export const MsgCreateBid = { order: isSet(object.order) ? OrderID.fromJSON(object.order) : undefined, provider: isSet(object.provider) ? String(object.provider) : "", price: isSet(object.price) ? DecCoin.fromJSON(object.price) : undefined, - deposit: isSet(object.deposit) - ? Coin.fromJSON(object.deposit) - : undefined, - resourcesOffer: Array.isArray(object?.resourcesOffer) - ? object.resourcesOffer.map((e: any) => ResourceOffer.fromJSON(e)) - : [], + deposit: isSet(object.deposit) ? Coin.fromJSON(object.deposit) : undefined, + resourcesOffer: Array.isArray(object?.resourcesOffer) ? object.resourcesOffer.map((e: any) => ResourceOffer.fromJSON(e)) : [] }; }, toJSON(message: MsgCreateBid): unknown { const obj: any = {}; - message.order !== undefined && - (obj.order = message.order ? OrderID.toJSON(message.order) : undefined); + message.order !== undefined && (obj.order = message.order ? OrderID.toJSON(message.order) : undefined); message.provider !== undefined && (obj.provider = message.provider); - message.price !== undefined && - (obj.price = message.price ? DecCoin.toJSON(message.price) : undefined); - message.deposit !== undefined && - (obj.deposit = message.deposit - ? Coin.toJSON(message.deposit) - : undefined); + message.price !== undefined && (obj.price = message.price ? DecCoin.toJSON(message.price) : undefined); + message.deposit !== undefined && (obj.deposit = message.deposit ? Coin.toJSON(message.deposit) : undefined); if (message.resourcesOffer) { - obj.resourcesOffer = message.resourcesOffer.map((e) => - e ? ResourceOffer.toJSON(e) : undefined - ); + obj.resourcesOffer = message.resourcesOffer.map(e => (e ? ResourceOffer.toJSON(e) : undefined)); } else { obj.resourcesOffer = []; } return obj; }, - fromPartial, I>>( - object: I - ): MsgCreateBid { + fromPartial, I>>(object: I): MsgCreateBid { const message = createBaseMsgCreateBid(); - message.order = - object.order !== undefined && object.order !== null - ? OrderID.fromPartial(object.order) - : undefined; + message.order = object.order !== undefined && object.order !== null ? OrderID.fromPartial(object.order) : undefined; message.provider = object.provider ?? ""; - message.price = - object.price !== undefined && object.price !== null - ? DecCoin.fromPartial(object.price) - : undefined; - message.deposit = - object.deposit !== undefined && object.deposit !== null - ? Coin.fromPartial(object.deposit) - : undefined; - message.resourcesOffer = - object.resourcesOffer?.map((e) => ResourceOffer.fromPartial(e)) || []; + message.price = object.price !== undefined && object.price !== null ? DecCoin.fromPartial(object.price) : undefined; + message.deposit = object.deposit !== undefined && object.deposit !== null ? Coin.fromPartial(object.deposit) : undefined; + message.resourcesOffer = object.resourcesOffer?.map(e => ResourceOffer.fromPartial(e)) || []; return message; - }, + } }; messageTypeRegistry.set(MsgCreateBid.$type, MsgCreateBid); @@ -351,17 +310,11 @@ function createBaseMsgCreateBidResponse(): MsgCreateBidResponse { export const MsgCreateBidResponse = { $type: "akash.market.v1beta4.MsgCreateBidResponse" as const, - encode( - _: MsgCreateBidResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: MsgCreateBidResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgCreateBidResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreateBidResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCreateBidResponse(); @@ -378,7 +331,7 @@ export const MsgCreateBidResponse = { fromJSON(_: any): MsgCreateBidResponse { return { - $type: MsgCreateBidResponse.$type, + $type: MsgCreateBidResponse.$type }; }, @@ -387,12 +340,10 @@ export const MsgCreateBidResponse = { return obj; }, - fromPartial, I>>( - _: I - ): MsgCreateBidResponse { + fromPartial, I>>(_: I): MsgCreateBidResponse { const message = createBaseMsgCreateBidResponse(); return message; - }, + } }; messageTypeRegistry.set(MsgCreateBidResponse.$type, MsgCreateBidResponse); @@ -404,10 +355,7 @@ function createBaseMsgCloseBid(): MsgCloseBid { export const MsgCloseBid = { $type: "akash.market.v1beta4.MsgCloseBid" as const, - encode( - message: MsgCloseBid, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MsgCloseBid, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.bidId !== undefined) { BidID.encode(message.bidId, writer.uint32(10).fork()).ldelim(); } @@ -435,27 +383,21 @@ export const MsgCloseBid = { fromJSON(object: any): MsgCloseBid { return { $type: MsgCloseBid.$type, - bidId: isSet(object.bidId) ? BidID.fromJSON(object.bidId) : undefined, + bidId: isSet(object.bidId) ? BidID.fromJSON(object.bidId) : undefined }; }, toJSON(message: MsgCloseBid): unknown { const obj: any = {}; - message.bidId !== undefined && - (obj.bidId = message.bidId ? BidID.toJSON(message.bidId) : undefined); + message.bidId !== undefined && (obj.bidId = message.bidId ? BidID.toJSON(message.bidId) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): MsgCloseBid { + fromPartial, I>>(object: I): MsgCloseBid { const message = createBaseMsgCloseBid(); - message.bidId = - object.bidId !== undefined && object.bidId !== null - ? BidID.fromPartial(object.bidId) - : undefined; + message.bidId = object.bidId !== undefined && object.bidId !== null ? BidID.fromPartial(object.bidId) : undefined; return message; - }, + } }; messageTypeRegistry.set(MsgCloseBid.$type, MsgCloseBid); @@ -467,10 +409,7 @@ function createBaseMsgCloseBidResponse(): MsgCloseBidResponse { export const MsgCloseBidResponse = { $type: "akash.market.v1beta4.MsgCloseBidResponse" as const, - encode( - _: MsgCloseBidResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: MsgCloseBidResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, @@ -491,7 +430,7 @@ export const MsgCloseBidResponse = { fromJSON(_: any): MsgCloseBidResponse { return { - $type: MsgCloseBidResponse.$type, + $type: MsgCloseBidResponse.$type }; }, @@ -500,12 +439,10 @@ export const MsgCloseBidResponse = { return obj; }, - fromPartial, I>>( - _: I - ): MsgCloseBidResponse { + fromPartial, I>>(_: I): MsgCloseBidResponse { const message = createBaseMsgCloseBidResponse(); return message; - }, + } }; messageTypeRegistry.set(MsgCloseBidResponse.$type, MsgCloseBidResponse); @@ -517,7 +454,7 @@ function createBaseBidID(): BidID { dseq: Long.UZERO, gseq: 0, oseq: 0, - provider: "", + provider: "" }; } @@ -580,15 +517,14 @@ export const BidID = { dseq: isSet(object.dseq) ? Long.fromValue(object.dseq) : Long.UZERO, gseq: isSet(object.gseq) ? Number(object.gseq) : 0, oseq: isSet(object.oseq) ? Number(object.oseq) : 0, - provider: isSet(object.provider) ? String(object.provider) : "", + provider: isSet(object.provider) ? String(object.provider) : "" }; }, toJSON(message: BidID): unknown { const obj: any = {}; message.owner !== undefined && (obj.owner = message.owner); - message.dseq !== undefined && - (obj.dseq = (message.dseq || Long.UZERO).toString()); + message.dseq !== undefined && (obj.dseq = (message.dseq || Long.UZERO).toString()); message.gseq !== undefined && (obj.gseq = Math.round(message.gseq)); message.oseq !== undefined && (obj.oseq = Math.round(message.oseq)); message.provider !== undefined && (obj.provider = message.provider); @@ -598,15 +534,12 @@ export const BidID = { fromPartial, I>>(object: I): BidID { const message = createBaseBidID(); message.owner = object.owner ?? ""; - message.dseq = - object.dseq !== undefined && object.dseq !== null - ? Long.fromValue(object.dseq) - : Long.UZERO; + message.dseq = object.dseq !== undefined && object.dseq !== null ? Long.fromValue(object.dseq) : Long.UZERO; message.gseq = object.gseq ?? 0; message.oseq = object.oseq ?? 0; message.provider = object.provider ?? ""; return message; - }, + } }; messageTypeRegistry.set(BidID.$type, BidID); @@ -618,7 +551,7 @@ function createBaseBid(): Bid { state: 0, price: undefined, createdAt: Long.ZERO, - resourcesOffer: [], + resourcesOffer: [] }; } @@ -664,9 +597,7 @@ export const Bid = { message.createdAt = reader.int64() as Long; break; case 5: - message.resourcesOffer.push( - ResourceOffer.decode(reader, reader.uint32()) - ); + message.resourcesOffer.push(ResourceOffer.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -682,28 +613,19 @@ export const Bid = { bidId: isSet(object.bidId) ? BidID.fromJSON(object.bidId) : undefined, state: isSet(object.state) ? bid_StateFromJSON(object.state) : 0, price: isSet(object.price) ? DecCoin.fromJSON(object.price) : undefined, - createdAt: isSet(object.createdAt) - ? Long.fromValue(object.createdAt) - : Long.ZERO, - resourcesOffer: Array.isArray(object?.resourcesOffer) - ? object.resourcesOffer.map((e: any) => ResourceOffer.fromJSON(e)) - : [], + createdAt: isSet(object.createdAt) ? Long.fromValue(object.createdAt) : Long.ZERO, + resourcesOffer: Array.isArray(object?.resourcesOffer) ? object.resourcesOffer.map((e: any) => ResourceOffer.fromJSON(e)) : [] }; }, toJSON(message: Bid): unknown { const obj: any = {}; - message.bidId !== undefined && - (obj.bidId = message.bidId ? BidID.toJSON(message.bidId) : undefined); + message.bidId !== undefined && (obj.bidId = message.bidId ? BidID.toJSON(message.bidId) : undefined); message.state !== undefined && (obj.state = bid_StateToJSON(message.state)); - message.price !== undefined && - (obj.price = message.price ? DecCoin.toJSON(message.price) : undefined); - message.createdAt !== undefined && - (obj.createdAt = (message.createdAt || Long.ZERO).toString()); + message.price !== undefined && (obj.price = message.price ? DecCoin.toJSON(message.price) : undefined); + message.createdAt !== undefined && (obj.createdAt = (message.createdAt || Long.ZERO).toString()); if (message.resourcesOffer) { - obj.resourcesOffer = message.resourcesOffer.map((e) => - e ? ResourceOffer.toJSON(e) : undefined - ); + obj.resourcesOffer = message.resourcesOffer.map(e => (e ? ResourceOffer.toJSON(e) : undefined)); } else { obj.resourcesOffer = []; } @@ -712,23 +634,13 @@ export const Bid = { fromPartial, I>>(object: I): Bid { const message = createBaseBid(); - message.bidId = - object.bidId !== undefined && object.bidId !== null - ? BidID.fromPartial(object.bidId) - : undefined; + message.bidId = object.bidId !== undefined && object.bidId !== null ? BidID.fromPartial(object.bidId) : undefined; message.state = object.state ?? 0; - message.price = - object.price !== undefined && object.price !== null - ? DecCoin.fromPartial(object.price) - : undefined; - message.createdAt = - object.createdAt !== undefined && object.createdAt !== null - ? Long.fromValue(object.createdAt) - : Long.ZERO; - message.resourcesOffer = - object.resourcesOffer?.map((e) => ResourceOffer.fromPartial(e)) || []; + message.price = object.price !== undefined && object.price !== null ? DecCoin.fromPartial(object.price) : undefined; + message.createdAt = object.createdAt !== undefined && object.createdAt !== null ? Long.fromValue(object.createdAt) : Long.ZERO; + message.resourcesOffer = object.resourcesOffer?.map(e => ResourceOffer.fromPartial(e)) || []; return message; - }, + } }; messageTypeRegistry.set(Bid.$type, Bid); @@ -741,17 +653,14 @@ function createBaseBidFilters(): BidFilters { gseq: 0, oseq: 0, provider: "", - state: "", + state: "" }; } export const BidFilters = { $type: "akash.market.v1beta4.BidFilters" as const, - encode( - message: BidFilters, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: BidFilters, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -814,15 +723,14 @@ export const BidFilters = { gseq: isSet(object.gseq) ? Number(object.gseq) : 0, oseq: isSet(object.oseq) ? Number(object.oseq) : 0, provider: isSet(object.provider) ? String(object.provider) : "", - state: isSet(object.state) ? String(object.state) : "", + state: isSet(object.state) ? String(object.state) : "" }; }, toJSON(message: BidFilters): unknown { const obj: any = {}; message.owner !== undefined && (obj.owner = message.owner); - message.dseq !== undefined && - (obj.dseq = (message.dseq || Long.UZERO).toString()); + message.dseq !== undefined && (obj.dseq = (message.dseq || Long.UZERO).toString()); message.gseq !== undefined && (obj.gseq = Math.round(message.gseq)); message.oseq !== undefined && (obj.oseq = Math.round(message.oseq)); message.provider !== undefined && (obj.provider = message.provider); @@ -830,53 +738,38 @@ export const BidFilters = { return obj; }, - fromPartial, I>>( - object: I - ): BidFilters { + fromPartial, I>>(object: I): BidFilters { const message = createBaseBidFilters(); message.owner = object.owner ?? ""; - message.dseq = - object.dseq !== undefined && object.dseq !== null - ? Long.fromValue(object.dseq) - : Long.UZERO; + message.dseq = object.dseq !== undefined && object.dseq !== null ? Long.fromValue(object.dseq) : Long.UZERO; message.gseq = object.gseq ?? 0; message.oseq = object.oseq ?? 0; message.provider = object.provider ?? ""; message.state = object.state ?? ""; return message; - }, + } }; messageTypeRegistry.set(BidFilters.$type, BidFilters); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/market/v1beta4/genesis.ts b/src/protobuf/akash/market/v1beta4/genesis.ts index a2c17f3..de2dc9f 100644 --- a/src/protobuf/akash/market/v1beta4/genesis.ts +++ b/src/protobuf/akash/market/v1beta4/genesis.ts @@ -24,17 +24,14 @@ function createBaseGenesisState(): GenesisState { params: undefined, orders: [], leases: [], - bids: [], + bids: [] }; } export const GenesisState = { $type: "akash.market.v1beta4.GenesisState" as const, - encode( - message: GenesisState, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: GenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.params !== undefined) { Params.encode(message.params, writer.uint32(10).fork()).ldelim(); } @@ -81,85 +78,63 @@ export const GenesisState = { return { $type: GenesisState.$type, params: isSet(object.params) ? Params.fromJSON(object.params) : undefined, - orders: Array.isArray(object?.orders) - ? object.orders.map((e: any) => Order.fromJSON(e)) - : [], - leases: Array.isArray(object?.leases) - ? object.leases.map((e: any) => Lease.fromJSON(e)) - : [], - bids: Array.isArray(object?.bids) - ? object.bids.map((e: any) => Bid.fromJSON(e)) - : [], + orders: Array.isArray(object?.orders) ? object.orders.map((e: any) => Order.fromJSON(e)) : [], + leases: Array.isArray(object?.leases) ? object.leases.map((e: any) => Lease.fromJSON(e)) : [], + bids: Array.isArray(object?.bids) ? object.bids.map((e: any) => Bid.fromJSON(e)) : [] }; }, toJSON(message: GenesisState): unknown { const obj: any = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); + message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined); if (message.orders) { - obj.orders = message.orders.map((e) => (e ? Order.toJSON(e) : undefined)); + obj.orders = message.orders.map(e => (e ? Order.toJSON(e) : undefined)); } else { obj.orders = []; } if (message.leases) { - obj.leases = message.leases.map((e) => (e ? Lease.toJSON(e) : undefined)); + obj.leases = message.leases.map(e => (e ? Lease.toJSON(e) : undefined)); } else { obj.leases = []; } if (message.bids) { - obj.bids = message.bids.map((e) => (e ? Bid.toJSON(e) : undefined)); + obj.bids = message.bids.map(e => (e ? Bid.toJSON(e) : undefined)); } else { obj.bids = []; } return obj; }, - fromPartial, I>>( - object: I - ): GenesisState { + fromPartial, I>>(object: I): GenesisState { const message = createBaseGenesisState(); - message.params = - object.params !== undefined && object.params !== null - ? Params.fromPartial(object.params) - : undefined; - message.orders = object.orders?.map((e) => Order.fromPartial(e)) || []; - message.leases = object.leases?.map((e) => Lease.fromPartial(e)) || []; - message.bids = object.bids?.map((e) => Bid.fromPartial(e)) || []; + message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; + message.orders = object.orders?.map(e => Order.fromPartial(e)) || []; + message.leases = object.leases?.map(e => Lease.fromPartial(e)) || []; + message.bids = object.bids?.map(e => Bid.fromPartial(e)) || []; return message; - }, + } }; messageTypeRegistry.set(GenesisState.$type, GenesisState); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/market/v1beta4/lease.ts b/src/protobuf/akash/market/v1beta4/lease.ts index bde1925..1f7c531 100644 --- a/src/protobuf/akash/market/v1beta4/lease.ts +++ b/src/protobuf/akash/market/v1beta4/lease.ts @@ -37,7 +37,7 @@ export enum Lease_State { insufficient_funds = 2, /** closed - LeaseClosed denotes state for lease closed */ closed = 3, - UNRECOGNIZED = -1, + UNRECOGNIZED = -1 } export function lease_StateFromJSON(object: any): Lease_State { @@ -128,17 +128,14 @@ function createBaseLeaseID(): LeaseID { dseq: Long.UZERO, gseq: 0, oseq: 0, - provider: "", + provider: "" }; } export const LeaseID = { $type: "akash.market.v1beta4.LeaseID" as const, - encode( - message: LeaseID, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: LeaseID, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -194,15 +191,14 @@ export const LeaseID = { dseq: isSet(object.dseq) ? Long.fromValue(object.dseq) : Long.UZERO, gseq: isSet(object.gseq) ? Number(object.gseq) : 0, oseq: isSet(object.oseq) ? Number(object.oseq) : 0, - provider: isSet(object.provider) ? String(object.provider) : "", + provider: isSet(object.provider) ? String(object.provider) : "" }; }, toJSON(message: LeaseID): unknown { const obj: any = {}; message.owner !== undefined && (obj.owner = message.owner); - message.dseq !== undefined && - (obj.dseq = (message.dseq || Long.UZERO).toString()); + message.dseq !== undefined && (obj.dseq = (message.dseq || Long.UZERO).toString()); message.gseq !== undefined && (obj.gseq = Math.round(message.gseq)); message.oseq !== undefined && (obj.oseq = Math.round(message.oseq)); message.provider !== undefined && (obj.provider = message.provider); @@ -212,15 +208,12 @@ export const LeaseID = { fromPartial, I>>(object: I): LeaseID { const message = createBaseLeaseID(); message.owner = object.owner ?? ""; - message.dseq = - object.dseq !== undefined && object.dseq !== null - ? Long.fromValue(object.dseq) - : Long.UZERO; + message.dseq = object.dseq !== undefined && object.dseq !== null ? Long.fromValue(object.dseq) : Long.UZERO; message.gseq = object.gseq ?? 0; message.oseq = object.oseq ?? 0; message.provider = object.provider ?? ""; return message; - }, + } }; messageTypeRegistry.set(LeaseID.$type, LeaseID); @@ -232,7 +225,7 @@ function createBaseLease(): Lease { state: 0, price: undefined, createdAt: Long.ZERO, - closedOn: Long.ZERO, + closedOn: Long.ZERO }; } @@ -291,58 +284,33 @@ export const Lease = { fromJSON(object: any): Lease { return { $type: Lease.$type, - leaseId: isSet(object.leaseId) - ? LeaseID.fromJSON(object.leaseId) - : undefined, + leaseId: isSet(object.leaseId) ? LeaseID.fromJSON(object.leaseId) : undefined, state: isSet(object.state) ? lease_StateFromJSON(object.state) : 0, price: isSet(object.price) ? DecCoin.fromJSON(object.price) : undefined, - createdAt: isSet(object.createdAt) - ? Long.fromValue(object.createdAt) - : Long.ZERO, - closedOn: isSet(object.closedOn) - ? Long.fromValue(object.closedOn) - : Long.ZERO, + createdAt: isSet(object.createdAt) ? Long.fromValue(object.createdAt) : Long.ZERO, + closedOn: isSet(object.closedOn) ? Long.fromValue(object.closedOn) : Long.ZERO }; }, toJSON(message: Lease): unknown { const obj: any = {}; - message.leaseId !== undefined && - (obj.leaseId = message.leaseId - ? LeaseID.toJSON(message.leaseId) - : undefined); - message.state !== undefined && - (obj.state = lease_StateToJSON(message.state)); - message.price !== undefined && - (obj.price = message.price ? DecCoin.toJSON(message.price) : undefined); - message.createdAt !== undefined && - (obj.createdAt = (message.createdAt || Long.ZERO).toString()); - message.closedOn !== undefined && - (obj.closedOn = (message.closedOn || Long.ZERO).toString()); + message.leaseId !== undefined && (obj.leaseId = message.leaseId ? LeaseID.toJSON(message.leaseId) : undefined); + message.state !== undefined && (obj.state = lease_StateToJSON(message.state)); + message.price !== undefined && (obj.price = message.price ? DecCoin.toJSON(message.price) : undefined); + message.createdAt !== undefined && (obj.createdAt = (message.createdAt || Long.ZERO).toString()); + message.closedOn !== undefined && (obj.closedOn = (message.closedOn || Long.ZERO).toString()); return obj; }, fromPartial, I>>(object: I): Lease { const message = createBaseLease(); - message.leaseId = - object.leaseId !== undefined && object.leaseId !== null - ? LeaseID.fromPartial(object.leaseId) - : undefined; + message.leaseId = object.leaseId !== undefined && object.leaseId !== null ? LeaseID.fromPartial(object.leaseId) : undefined; message.state = object.state ?? 0; - message.price = - object.price !== undefined && object.price !== null - ? DecCoin.fromPartial(object.price) - : undefined; - message.createdAt = - object.createdAt !== undefined && object.createdAt !== null - ? Long.fromValue(object.createdAt) - : Long.ZERO; - message.closedOn = - object.closedOn !== undefined && object.closedOn !== null - ? Long.fromValue(object.closedOn) - : Long.ZERO; + message.price = object.price !== undefined && object.price !== null ? DecCoin.fromPartial(object.price) : undefined; + message.createdAt = object.createdAt !== undefined && object.createdAt !== null ? Long.fromValue(object.createdAt) : Long.ZERO; + message.closedOn = object.closedOn !== undefined && object.closedOn !== null ? Long.fromValue(object.closedOn) : Long.ZERO; return message; - }, + } }; messageTypeRegistry.set(Lease.$type, Lease); @@ -355,17 +323,14 @@ function createBaseLeaseFilters(): LeaseFilters { gseq: 0, oseq: 0, provider: "", - state: "", + state: "" }; } export const LeaseFilters = { $type: "akash.market.v1beta4.LeaseFilters" as const, - encode( - message: LeaseFilters, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: LeaseFilters, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -428,15 +393,14 @@ export const LeaseFilters = { gseq: isSet(object.gseq) ? Number(object.gseq) : 0, oseq: isSet(object.oseq) ? Number(object.oseq) : 0, provider: isSet(object.provider) ? String(object.provider) : "", - state: isSet(object.state) ? String(object.state) : "", + state: isSet(object.state) ? String(object.state) : "" }; }, toJSON(message: LeaseFilters): unknown { const obj: any = {}; message.owner !== undefined && (obj.owner = message.owner); - message.dseq !== undefined && - (obj.dseq = (message.dseq || Long.UZERO).toString()); + message.dseq !== undefined && (obj.dseq = (message.dseq || Long.UZERO).toString()); message.gseq !== undefined && (obj.gseq = Math.round(message.gseq)); message.oseq !== undefined && (obj.oseq = Math.round(message.oseq)); message.provider !== undefined && (obj.provider = message.provider); @@ -444,21 +408,16 @@ export const LeaseFilters = { return obj; }, - fromPartial, I>>( - object: I - ): LeaseFilters { + fromPartial, I>>(object: I): LeaseFilters { const message = createBaseLeaseFilters(); message.owner = object.owner ?? ""; - message.dseq = - object.dseq !== undefined && object.dseq !== null - ? Long.fromValue(object.dseq) - : Long.UZERO; + message.dseq = object.dseq !== undefined && object.dseq !== null ? Long.fromValue(object.dseq) : Long.UZERO; message.gseq = object.gseq ?? 0; message.oseq = object.oseq ?? 0; message.provider = object.provider ?? ""; message.state = object.state ?? ""; return message; - }, + } }; messageTypeRegistry.set(LeaseFilters.$type, LeaseFilters); @@ -470,10 +429,7 @@ function createBaseMsgCreateLease(): MsgCreateLease { export const MsgCreateLease = { $type: "akash.market.v1beta4.MsgCreateLease" as const, - encode( - message: MsgCreateLease, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MsgCreateLease, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.bidId !== undefined) { BidID.encode(message.bidId, writer.uint32(10).fork()).ldelim(); } @@ -501,27 +457,21 @@ export const MsgCreateLease = { fromJSON(object: any): MsgCreateLease { return { $type: MsgCreateLease.$type, - bidId: isSet(object.bidId) ? BidID.fromJSON(object.bidId) : undefined, + bidId: isSet(object.bidId) ? BidID.fromJSON(object.bidId) : undefined }; }, toJSON(message: MsgCreateLease): unknown { const obj: any = {}; - message.bidId !== undefined && - (obj.bidId = message.bidId ? BidID.toJSON(message.bidId) : undefined); + message.bidId !== undefined && (obj.bidId = message.bidId ? BidID.toJSON(message.bidId) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): MsgCreateLease { + fromPartial, I>>(object: I): MsgCreateLease { const message = createBaseMsgCreateLease(); - message.bidId = - object.bidId !== undefined && object.bidId !== null - ? BidID.fromPartial(object.bidId) - : undefined; + message.bidId = object.bidId !== undefined && object.bidId !== null ? BidID.fromPartial(object.bidId) : undefined; return message; - }, + } }; messageTypeRegistry.set(MsgCreateLease.$type, MsgCreateLease); @@ -533,17 +483,11 @@ function createBaseMsgCreateLeaseResponse(): MsgCreateLeaseResponse { export const MsgCreateLeaseResponse = { $type: "akash.market.v1beta4.MsgCreateLeaseResponse" as const, - encode( - _: MsgCreateLeaseResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: MsgCreateLeaseResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgCreateLeaseResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreateLeaseResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCreateLeaseResponse(); @@ -560,7 +504,7 @@ export const MsgCreateLeaseResponse = { fromJSON(_: any): MsgCreateLeaseResponse { return { - $type: MsgCreateLeaseResponse.$type, + $type: MsgCreateLeaseResponse.$type }; }, @@ -569,12 +513,10 @@ export const MsgCreateLeaseResponse = { return obj; }, - fromPartial, I>>( - _: I - ): MsgCreateLeaseResponse { + fromPartial, I>>(_: I): MsgCreateLeaseResponse { const message = createBaseMsgCreateLeaseResponse(); return message; - }, + } }; messageTypeRegistry.set(MsgCreateLeaseResponse.$type, MsgCreateLeaseResponse); @@ -586,10 +528,7 @@ function createBaseMsgWithdrawLease(): MsgWithdrawLease { export const MsgWithdrawLease = { $type: "akash.market.v1beta4.MsgWithdrawLease" as const, - encode( - message: MsgWithdrawLease, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MsgWithdrawLease, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.bidId !== undefined) { LeaseID.encode(message.bidId, writer.uint32(10).fork()).ldelim(); } @@ -617,27 +556,21 @@ export const MsgWithdrawLease = { fromJSON(object: any): MsgWithdrawLease { return { $type: MsgWithdrawLease.$type, - bidId: isSet(object.bidId) ? LeaseID.fromJSON(object.bidId) : undefined, + bidId: isSet(object.bidId) ? LeaseID.fromJSON(object.bidId) : undefined }; }, toJSON(message: MsgWithdrawLease): unknown { const obj: any = {}; - message.bidId !== undefined && - (obj.bidId = message.bidId ? LeaseID.toJSON(message.bidId) : undefined); + message.bidId !== undefined && (obj.bidId = message.bidId ? LeaseID.toJSON(message.bidId) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): MsgWithdrawLease { + fromPartial, I>>(object: I): MsgWithdrawLease { const message = createBaseMsgWithdrawLease(); - message.bidId = - object.bidId !== undefined && object.bidId !== null - ? LeaseID.fromPartial(object.bidId) - : undefined; + message.bidId = object.bidId !== undefined && object.bidId !== null ? LeaseID.fromPartial(object.bidId) : undefined; return message; - }, + } }; messageTypeRegistry.set(MsgWithdrawLease.$type, MsgWithdrawLease); @@ -649,17 +582,11 @@ function createBaseMsgWithdrawLeaseResponse(): MsgWithdrawLeaseResponse { export const MsgWithdrawLeaseResponse = { $type: "akash.market.v1beta4.MsgWithdrawLeaseResponse" as const, - encode( - _: MsgWithdrawLeaseResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: MsgWithdrawLeaseResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgWithdrawLeaseResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgWithdrawLeaseResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgWithdrawLeaseResponse(); @@ -676,7 +603,7 @@ export const MsgWithdrawLeaseResponse = { fromJSON(_: any): MsgWithdrawLeaseResponse { return { - $type: MsgWithdrawLeaseResponse.$type, + $type: MsgWithdrawLeaseResponse.$type }; }, @@ -685,18 +612,13 @@ export const MsgWithdrawLeaseResponse = { return obj; }, - fromPartial, I>>( - _: I - ): MsgWithdrawLeaseResponse { + fromPartial, I>>(_: I): MsgWithdrawLeaseResponse { const message = createBaseMsgWithdrawLeaseResponse(); return message; - }, + } }; -messageTypeRegistry.set( - MsgWithdrawLeaseResponse.$type, - MsgWithdrawLeaseResponse -); +messageTypeRegistry.set(MsgWithdrawLeaseResponse.$type, MsgWithdrawLeaseResponse); function createBaseMsgCloseLease(): MsgCloseLease { return { $type: "akash.market.v1beta4.MsgCloseLease", leaseId: undefined }; @@ -705,10 +627,7 @@ function createBaseMsgCloseLease(): MsgCloseLease { export const MsgCloseLease = { $type: "akash.market.v1beta4.MsgCloseLease" as const, - encode( - message: MsgCloseLease, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MsgCloseLease, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.leaseId !== undefined) { LeaseID.encode(message.leaseId, writer.uint32(10).fork()).ldelim(); } @@ -736,31 +655,21 @@ export const MsgCloseLease = { fromJSON(object: any): MsgCloseLease { return { $type: MsgCloseLease.$type, - leaseId: isSet(object.leaseId) - ? LeaseID.fromJSON(object.leaseId) - : undefined, + leaseId: isSet(object.leaseId) ? LeaseID.fromJSON(object.leaseId) : undefined }; }, toJSON(message: MsgCloseLease): unknown { const obj: any = {}; - message.leaseId !== undefined && - (obj.leaseId = message.leaseId - ? LeaseID.toJSON(message.leaseId) - : undefined); + message.leaseId !== undefined && (obj.leaseId = message.leaseId ? LeaseID.toJSON(message.leaseId) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): MsgCloseLease { + fromPartial, I>>(object: I): MsgCloseLease { const message = createBaseMsgCloseLease(); - message.leaseId = - object.leaseId !== undefined && object.leaseId !== null - ? LeaseID.fromPartial(object.leaseId) - : undefined; + message.leaseId = object.leaseId !== undefined && object.leaseId !== null ? LeaseID.fromPartial(object.leaseId) : undefined; return message; - }, + } }; messageTypeRegistry.set(MsgCloseLease.$type, MsgCloseLease); @@ -772,17 +681,11 @@ function createBaseMsgCloseLeaseResponse(): MsgCloseLeaseResponse { export const MsgCloseLeaseResponse = { $type: "akash.market.v1beta4.MsgCloseLeaseResponse" as const, - encode( - _: MsgCloseLeaseResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: MsgCloseLeaseResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgCloseLeaseResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgCloseLeaseResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCloseLeaseResponse(); @@ -799,7 +702,7 @@ export const MsgCloseLeaseResponse = { fromJSON(_: any): MsgCloseLeaseResponse { return { - $type: MsgCloseLeaseResponse.$type, + $type: MsgCloseLeaseResponse.$type }; }, @@ -808,44 +711,32 @@ export const MsgCloseLeaseResponse = { return obj; }, - fromPartial, I>>( - _: I - ): MsgCloseLeaseResponse { + fromPartial, I>>(_: I): MsgCloseLeaseResponse { const message = createBaseMsgCloseLeaseResponse(); return message; - }, + } }; messageTypeRegistry.set(MsgCloseLeaseResponse.$type, MsgCloseLeaseResponse); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/market/v1beta4/order.ts b/src/protobuf/akash/market/v1beta4/order.ts index 0d3138e..0ce55fc 100644 --- a/src/protobuf/akash/market/v1beta4/order.ts +++ b/src/protobuf/akash/market/v1beta4/order.ts @@ -34,7 +34,7 @@ export enum Order_State { active = 2, /** closed - OrderClosed denotes state for order lost */ closed = 3, - UNRECOGNIZED = -1, + UNRECOGNIZED = -1 } export function order_StateFromJSON(object: any): Order_State { @@ -90,17 +90,14 @@ function createBaseOrderID(): OrderID { owner: "", dseq: Long.UZERO, gseq: 0, - oseq: 0, + oseq: 0 }; } export const OrderID = { $type: "akash.market.v1beta4.OrderID" as const, - encode( - message: OrderID, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: OrderID, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -149,15 +146,14 @@ export const OrderID = { owner: isSet(object.owner) ? String(object.owner) : "", dseq: isSet(object.dseq) ? Long.fromValue(object.dseq) : Long.UZERO, gseq: isSet(object.gseq) ? Number(object.gseq) : 0, - oseq: isSet(object.oseq) ? Number(object.oseq) : 0, + oseq: isSet(object.oseq) ? Number(object.oseq) : 0 }; }, toJSON(message: OrderID): unknown { const obj: any = {}; message.owner !== undefined && (obj.owner = message.owner); - message.dseq !== undefined && - (obj.dseq = (message.dseq || Long.UZERO).toString()); + message.dseq !== undefined && (obj.dseq = (message.dseq || Long.UZERO).toString()); message.gseq !== undefined && (obj.gseq = Math.round(message.gseq)); message.oseq !== undefined && (obj.oseq = Math.round(message.oseq)); return obj; @@ -166,14 +162,11 @@ export const OrderID = { fromPartial, I>>(object: I): OrderID { const message = createBaseOrderID(); message.owner = object.owner ?? ""; - message.dseq = - object.dseq !== undefined && object.dseq !== null - ? Long.fromValue(object.dseq) - : Long.UZERO; + message.dseq = object.dseq !== undefined && object.dseq !== null ? Long.fromValue(object.dseq) : Long.UZERO; message.gseq = object.gseq ?? 0; message.oseq = object.oseq ?? 0; return message; - }, + } }; messageTypeRegistry.set(OrderID.$type, OrderID); @@ -184,7 +177,7 @@ function createBaseOrder(): Order { orderId: undefined, state: 0, spec: undefined, - createdAt: Long.ZERO, + createdAt: Long.ZERO }; } @@ -237,49 +230,30 @@ export const Order = { fromJSON(object: any): Order { return { $type: Order.$type, - orderId: isSet(object.orderId) - ? OrderID.fromJSON(object.orderId) - : undefined, + orderId: isSet(object.orderId) ? OrderID.fromJSON(object.orderId) : undefined, state: isSet(object.state) ? order_StateFromJSON(object.state) : 0, spec: isSet(object.spec) ? GroupSpec.fromJSON(object.spec) : undefined, - createdAt: isSet(object.createdAt) - ? Long.fromValue(object.createdAt) - : Long.ZERO, + createdAt: isSet(object.createdAt) ? Long.fromValue(object.createdAt) : Long.ZERO }; }, toJSON(message: Order): unknown { const obj: any = {}; - message.orderId !== undefined && - (obj.orderId = message.orderId - ? OrderID.toJSON(message.orderId) - : undefined); - message.state !== undefined && - (obj.state = order_StateToJSON(message.state)); - message.spec !== undefined && - (obj.spec = message.spec ? GroupSpec.toJSON(message.spec) : undefined); - message.createdAt !== undefined && - (obj.createdAt = (message.createdAt || Long.ZERO).toString()); + message.orderId !== undefined && (obj.orderId = message.orderId ? OrderID.toJSON(message.orderId) : undefined); + message.state !== undefined && (obj.state = order_StateToJSON(message.state)); + message.spec !== undefined && (obj.spec = message.spec ? GroupSpec.toJSON(message.spec) : undefined); + message.createdAt !== undefined && (obj.createdAt = (message.createdAt || Long.ZERO).toString()); return obj; }, fromPartial, I>>(object: I): Order { const message = createBaseOrder(); - message.orderId = - object.orderId !== undefined && object.orderId !== null - ? OrderID.fromPartial(object.orderId) - : undefined; + message.orderId = object.orderId !== undefined && object.orderId !== null ? OrderID.fromPartial(object.orderId) : undefined; message.state = object.state ?? 0; - message.spec = - object.spec !== undefined && object.spec !== null - ? GroupSpec.fromPartial(object.spec) - : undefined; - message.createdAt = - object.createdAt !== undefined && object.createdAt !== null - ? Long.fromValue(object.createdAt) - : Long.ZERO; + message.spec = object.spec !== undefined && object.spec !== null ? GroupSpec.fromPartial(object.spec) : undefined; + message.createdAt = object.createdAt !== undefined && object.createdAt !== null ? Long.fromValue(object.createdAt) : Long.ZERO; return message; - }, + } }; messageTypeRegistry.set(Order.$type, Order); @@ -291,17 +265,14 @@ function createBaseOrderFilters(): OrderFilters { dseq: Long.UZERO, gseq: 0, oseq: 0, - state: "", + state: "" }; } export const OrderFilters = { $type: "akash.market.v1beta4.OrderFilters" as const, - encode( - message: OrderFilters, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: OrderFilters, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -357,67 +328,51 @@ export const OrderFilters = { dseq: isSet(object.dseq) ? Long.fromValue(object.dseq) : Long.UZERO, gseq: isSet(object.gseq) ? Number(object.gseq) : 0, oseq: isSet(object.oseq) ? Number(object.oseq) : 0, - state: isSet(object.state) ? String(object.state) : "", + state: isSet(object.state) ? String(object.state) : "" }; }, toJSON(message: OrderFilters): unknown { const obj: any = {}; message.owner !== undefined && (obj.owner = message.owner); - message.dseq !== undefined && - (obj.dseq = (message.dseq || Long.UZERO).toString()); + message.dseq !== undefined && (obj.dseq = (message.dseq || Long.UZERO).toString()); message.gseq !== undefined && (obj.gseq = Math.round(message.gseq)); message.oseq !== undefined && (obj.oseq = Math.round(message.oseq)); message.state !== undefined && (obj.state = message.state); return obj; }, - fromPartial, I>>( - object: I - ): OrderFilters { + fromPartial, I>>(object: I): OrderFilters { const message = createBaseOrderFilters(); message.owner = object.owner ?? ""; - message.dseq = - object.dseq !== undefined && object.dseq !== null - ? Long.fromValue(object.dseq) - : Long.UZERO; + message.dseq = object.dseq !== undefined && object.dseq !== null ? Long.fromValue(object.dseq) : Long.UZERO; message.gseq = object.gseq ?? 0; message.oseq = object.oseq ?? 0; message.state = object.state ?? ""; return message; - }, + } }; messageTypeRegistry.set(OrderFilters.$type, OrderFilters); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/market/v1beta4/params.ts b/src/protobuf/akash/market/v1beta4/params.ts index 38beacb..2e88794 100644 --- a/src/protobuf/akash/market/v1beta4/params.ts +++ b/src/protobuf/akash/market/v1beta4/params.ts @@ -17,17 +17,14 @@ function createBaseParams(): Params { return { $type: "akash.market.v1beta4.Params", bidMinDeposit: undefined, - orderMaxBids: 0, + orderMaxBids: 0 }; } export const Params = { $type: "akash.market.v1beta4.Params" as const, - encode( - message: Params, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Params, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.bidMinDeposit !== undefined) { Coin.encode(message.bidMinDeposit, writer.uint32(10).fork()).ldelim(); } @@ -61,67 +58,46 @@ export const Params = { fromJSON(object: any): Params { return { $type: Params.$type, - bidMinDeposit: isSet(object.bidMinDeposit) - ? Coin.fromJSON(object.bidMinDeposit) - : undefined, - orderMaxBids: isSet(object.orderMaxBids) - ? Number(object.orderMaxBids) - : 0, + bidMinDeposit: isSet(object.bidMinDeposit) ? Coin.fromJSON(object.bidMinDeposit) : undefined, + orderMaxBids: isSet(object.orderMaxBids) ? Number(object.orderMaxBids) : 0 }; }, toJSON(message: Params): unknown { const obj: any = {}; - message.bidMinDeposit !== undefined && - (obj.bidMinDeposit = message.bidMinDeposit - ? Coin.toJSON(message.bidMinDeposit) - : undefined); - message.orderMaxBids !== undefined && - (obj.orderMaxBids = Math.round(message.orderMaxBids)); + message.bidMinDeposit !== undefined && (obj.bidMinDeposit = message.bidMinDeposit ? Coin.toJSON(message.bidMinDeposit) : undefined); + message.orderMaxBids !== undefined && (obj.orderMaxBids = Math.round(message.orderMaxBids)); return obj; }, fromPartial, I>>(object: I): Params { const message = createBaseParams(); - message.bidMinDeposit = - object.bidMinDeposit !== undefined && object.bidMinDeposit !== null - ? Coin.fromPartial(object.bidMinDeposit) - : undefined; + message.bidMinDeposit = object.bidMinDeposit !== undefined && object.bidMinDeposit !== null ? Coin.fromPartial(object.bidMinDeposit) : undefined; message.orderMaxBids = object.orderMaxBids ?? 0; return message; - }, + } }; messageTypeRegistry.set(Params.$type, Params); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/market/v1beta4/query.ts b/src/protobuf/akash/market/v1beta4/query.ts index f636960..a6213a0 100644 --- a/src/protobuf/akash/market/v1beta4/query.ts +++ b/src/protobuf/akash/market/v1beta4/query.ts @@ -2,10 +2,7 @@ import { messageTypeRegistry } from "../../../typeRegistry"; import Long from "long"; import { OrderFilters, Order, OrderID } from "./order"; -import { - PageRequest, - PageResponse, -} from "../../../cosmos/base/query/v1beta1/pagination"; +import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; import { BidFilters, BidID, Bid } from "./bid"; import { Account, FractionalPayment } from "../../escrow/v1beta3/types"; import { LeaseFilters, LeaseID, Lease } from "./lease"; @@ -97,17 +94,14 @@ function createBaseQueryOrdersRequest(): QueryOrdersRequest { return { $type: "akash.market.v1beta4.QueryOrdersRequest", filters: undefined, - pagination: undefined, + pagination: undefined }; } export const QueryOrdersRequest = { $type: "akash.market.v1beta4.QueryOrdersRequest" as const, - encode( - message: QueryOrdersRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryOrdersRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.filters !== undefined) { OrderFilters.encode(message.filters, writer.uint32(10).fork()).ldelim(); } @@ -141,42 +135,24 @@ export const QueryOrdersRequest = { fromJSON(object: any): QueryOrdersRequest { return { $type: QueryOrdersRequest.$type, - filters: isSet(object.filters) - ? OrderFilters.fromJSON(object.filters) - : undefined, - pagination: isSet(object.pagination) - ? PageRequest.fromJSON(object.pagination) - : undefined, + filters: isSet(object.filters) ? OrderFilters.fromJSON(object.filters) : undefined, + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined }; }, toJSON(message: QueryOrdersRequest): unknown { const obj: any = {}; - message.filters !== undefined && - (obj.filters = message.filters - ? OrderFilters.toJSON(message.filters) - : undefined); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); + message.filters !== undefined && (obj.filters = message.filters ? OrderFilters.toJSON(message.filters) : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryOrdersRequest { + fromPartial, I>>(object: I): QueryOrdersRequest { const message = createBaseQueryOrdersRequest(); - message.filters = - object.filters !== undefined && object.filters !== null - ? OrderFilters.fromPartial(object.filters) - : undefined; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; + message.filters = object.filters !== undefined && object.filters !== null ? OrderFilters.fromPartial(object.filters) : undefined; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryOrdersRequest.$type, QueryOrdersRequest); @@ -185,25 +161,19 @@ function createBaseQueryOrdersResponse(): QueryOrdersResponse { return { $type: "akash.market.v1beta4.QueryOrdersResponse", orders: [], - pagination: undefined, + pagination: undefined }; } export const QueryOrdersResponse = { $type: "akash.market.v1beta4.QueryOrdersResponse" as const, - encode( - message: QueryOrdersResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryOrdersResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.orders) { Order.encode(v!, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); + PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } return writer; }, @@ -232,40 +202,28 @@ export const QueryOrdersResponse = { fromJSON(object: any): QueryOrdersResponse { return { $type: QueryOrdersResponse.$type, - orders: Array.isArray(object?.orders) - ? object.orders.map((e: any) => Order.fromJSON(e)) - : [], - pagination: isSet(object.pagination) - ? PageResponse.fromJSON(object.pagination) - : undefined, + orders: Array.isArray(object?.orders) ? object.orders.map((e: any) => Order.fromJSON(e)) : [], + pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined }; }, toJSON(message: QueryOrdersResponse): unknown { const obj: any = {}; if (message.orders) { - obj.orders = message.orders.map((e) => (e ? Order.toJSON(e) : undefined)); + obj.orders = message.orders.map(e => (e ? Order.toJSON(e) : undefined)); } else { obj.orders = []; } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryOrdersResponse { + fromPartial, I>>(object: I): QueryOrdersResponse { const message = createBaseQueryOrdersResponse(); - message.orders = object.orders?.map((e) => Order.fromPartial(e)) || []; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageResponse.fromPartial(object.pagination) - : undefined; + message.orders = object.orders?.map(e => Order.fromPartial(e)) || []; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryOrdersResponse.$type, QueryOrdersResponse); @@ -277,10 +235,7 @@ function createBaseQueryOrderRequest(): QueryOrderRequest { export const QueryOrderRequest = { $type: "akash.market.v1beta4.QueryOrderRequest" as const, - encode( - message: QueryOrderRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryOrderRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { OrderID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -308,27 +263,21 @@ export const QueryOrderRequest = { fromJSON(object: any): QueryOrderRequest { return { $type: QueryOrderRequest.$type, - id: isSet(object.id) ? OrderID.fromJSON(object.id) : undefined, + id: isSet(object.id) ? OrderID.fromJSON(object.id) : undefined }; }, toJSON(message: QueryOrderRequest): unknown { const obj: any = {}; - message.id !== undefined && - (obj.id = message.id ? OrderID.toJSON(message.id) : undefined); + message.id !== undefined && (obj.id = message.id ? OrderID.toJSON(message.id) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryOrderRequest { + fromPartial, I>>(object: I): QueryOrderRequest { const message = createBaseQueryOrderRequest(); - message.id = - object.id !== undefined && object.id !== null - ? OrderID.fromPartial(object.id) - : undefined; + message.id = object.id !== undefined && object.id !== null ? OrderID.fromPartial(object.id) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryOrderRequest.$type, QueryOrderRequest); @@ -340,10 +289,7 @@ function createBaseQueryOrderResponse(): QueryOrderResponse { export const QueryOrderResponse = { $type: "akash.market.v1beta4.QueryOrderResponse" as const, - encode( - message: QueryOrderResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryOrderResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.order !== undefined) { Order.encode(message.order, writer.uint32(10).fork()).ldelim(); } @@ -371,27 +317,21 @@ export const QueryOrderResponse = { fromJSON(object: any): QueryOrderResponse { return { $type: QueryOrderResponse.$type, - order: isSet(object.order) ? Order.fromJSON(object.order) : undefined, + order: isSet(object.order) ? Order.fromJSON(object.order) : undefined }; }, toJSON(message: QueryOrderResponse): unknown { const obj: any = {}; - message.order !== undefined && - (obj.order = message.order ? Order.toJSON(message.order) : undefined); + message.order !== undefined && (obj.order = message.order ? Order.toJSON(message.order) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryOrderResponse { + fromPartial, I>>(object: I): QueryOrderResponse { const message = createBaseQueryOrderResponse(); - message.order = - object.order !== undefined && object.order !== null - ? Order.fromPartial(object.order) - : undefined; + message.order = object.order !== undefined && object.order !== null ? Order.fromPartial(object.order) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryOrderResponse.$type, QueryOrderResponse); @@ -400,17 +340,14 @@ function createBaseQueryBidsRequest(): QueryBidsRequest { return { $type: "akash.market.v1beta4.QueryBidsRequest", filters: undefined, - pagination: undefined, + pagination: undefined }; } export const QueryBidsRequest = { $type: "akash.market.v1beta4.QueryBidsRequest" as const, - encode( - message: QueryBidsRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryBidsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.filters !== undefined) { BidFilters.encode(message.filters, writer.uint32(10).fork()).ldelim(); } @@ -444,42 +381,24 @@ export const QueryBidsRequest = { fromJSON(object: any): QueryBidsRequest { return { $type: QueryBidsRequest.$type, - filters: isSet(object.filters) - ? BidFilters.fromJSON(object.filters) - : undefined, - pagination: isSet(object.pagination) - ? PageRequest.fromJSON(object.pagination) - : undefined, + filters: isSet(object.filters) ? BidFilters.fromJSON(object.filters) : undefined, + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined }; }, toJSON(message: QueryBidsRequest): unknown { const obj: any = {}; - message.filters !== undefined && - (obj.filters = message.filters - ? BidFilters.toJSON(message.filters) - : undefined); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); + message.filters !== undefined && (obj.filters = message.filters ? BidFilters.toJSON(message.filters) : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryBidsRequest { + fromPartial, I>>(object: I): QueryBidsRequest { const message = createBaseQueryBidsRequest(); - message.filters = - object.filters !== undefined && object.filters !== null - ? BidFilters.fromPartial(object.filters) - : undefined; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; + message.filters = object.filters !== undefined && object.filters !== null ? BidFilters.fromPartial(object.filters) : undefined; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryBidsRequest.$type, QueryBidsRequest); @@ -488,25 +407,19 @@ function createBaseQueryBidsResponse(): QueryBidsResponse { return { $type: "akash.market.v1beta4.QueryBidsResponse", bids: [], - pagination: undefined, + pagination: undefined }; } export const QueryBidsResponse = { $type: "akash.market.v1beta4.QueryBidsResponse" as const, - encode( - message: QueryBidsResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryBidsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.bids) { QueryBidResponse.encode(v!, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); + PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } return writer; }, @@ -535,43 +448,28 @@ export const QueryBidsResponse = { fromJSON(object: any): QueryBidsResponse { return { $type: QueryBidsResponse.$type, - bids: Array.isArray(object?.bids) - ? object.bids.map((e: any) => QueryBidResponse.fromJSON(e)) - : [], - pagination: isSet(object.pagination) - ? PageResponse.fromJSON(object.pagination) - : undefined, + bids: Array.isArray(object?.bids) ? object.bids.map((e: any) => QueryBidResponse.fromJSON(e)) : [], + pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined }; }, toJSON(message: QueryBidsResponse): unknown { const obj: any = {}; if (message.bids) { - obj.bids = message.bids.map((e) => - e ? QueryBidResponse.toJSON(e) : undefined - ); + obj.bids = message.bids.map(e => (e ? QueryBidResponse.toJSON(e) : undefined)); } else { obj.bids = []; } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryBidsResponse { + fromPartial, I>>(object: I): QueryBidsResponse { const message = createBaseQueryBidsResponse(); - message.bids = - object.bids?.map((e) => QueryBidResponse.fromPartial(e)) || []; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageResponse.fromPartial(object.pagination) - : undefined; + message.bids = object.bids?.map(e => QueryBidResponse.fromPartial(e)) || []; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryBidsResponse.$type, QueryBidsResponse); @@ -583,10 +481,7 @@ function createBaseQueryBidRequest(): QueryBidRequest { export const QueryBidRequest = { $type: "akash.market.v1beta4.QueryBidRequest" as const, - encode( - message: QueryBidRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryBidRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { BidID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -614,27 +509,21 @@ export const QueryBidRequest = { fromJSON(object: any): QueryBidRequest { return { $type: QueryBidRequest.$type, - id: isSet(object.id) ? BidID.fromJSON(object.id) : undefined, + id: isSet(object.id) ? BidID.fromJSON(object.id) : undefined }; }, toJSON(message: QueryBidRequest): unknown { const obj: any = {}; - message.id !== undefined && - (obj.id = message.id ? BidID.toJSON(message.id) : undefined); + message.id !== undefined && (obj.id = message.id ? BidID.toJSON(message.id) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryBidRequest { + fromPartial, I>>(object: I): QueryBidRequest { const message = createBaseQueryBidRequest(); - message.id = - object.id !== undefined && object.id !== null - ? BidID.fromPartial(object.id) - : undefined; + message.id = object.id !== undefined && object.id !== null ? BidID.fromPartial(object.id) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryBidRequest.$type, QueryBidRequest); @@ -643,17 +532,14 @@ function createBaseQueryBidResponse(): QueryBidResponse { return { $type: "akash.market.v1beta4.QueryBidResponse", bid: undefined, - escrowAccount: undefined, + escrowAccount: undefined }; } export const QueryBidResponse = { $type: "akash.market.v1beta4.QueryBidResponse" as const, - encode( - message: QueryBidResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryBidResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.bid !== undefined) { Bid.encode(message.bid, writer.uint32(10).fork()).ldelim(); } @@ -688,37 +574,23 @@ export const QueryBidResponse = { return { $type: QueryBidResponse.$type, bid: isSet(object.bid) ? Bid.fromJSON(object.bid) : undefined, - escrowAccount: isSet(object.escrowAccount) - ? Account.fromJSON(object.escrowAccount) - : undefined, + escrowAccount: isSet(object.escrowAccount) ? Account.fromJSON(object.escrowAccount) : undefined }; }, toJSON(message: QueryBidResponse): unknown { const obj: any = {}; - message.bid !== undefined && - (obj.bid = message.bid ? Bid.toJSON(message.bid) : undefined); - message.escrowAccount !== undefined && - (obj.escrowAccount = message.escrowAccount - ? Account.toJSON(message.escrowAccount) - : undefined); + message.bid !== undefined && (obj.bid = message.bid ? Bid.toJSON(message.bid) : undefined); + message.escrowAccount !== undefined && (obj.escrowAccount = message.escrowAccount ? Account.toJSON(message.escrowAccount) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryBidResponse { + fromPartial, I>>(object: I): QueryBidResponse { const message = createBaseQueryBidResponse(); - message.bid = - object.bid !== undefined && object.bid !== null - ? Bid.fromPartial(object.bid) - : undefined; - message.escrowAccount = - object.escrowAccount !== undefined && object.escrowAccount !== null - ? Account.fromPartial(object.escrowAccount) - : undefined; + message.bid = object.bid !== undefined && object.bid !== null ? Bid.fromPartial(object.bid) : undefined; + message.escrowAccount = object.escrowAccount !== undefined && object.escrowAccount !== null ? Account.fromPartial(object.escrowAccount) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryBidResponse.$type, QueryBidResponse); @@ -727,17 +599,14 @@ function createBaseQueryLeasesRequest(): QueryLeasesRequest { return { $type: "akash.market.v1beta4.QueryLeasesRequest", filters: undefined, - pagination: undefined, + pagination: undefined }; } export const QueryLeasesRequest = { $type: "akash.market.v1beta4.QueryLeasesRequest" as const, - encode( - message: QueryLeasesRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryLeasesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.filters !== undefined) { LeaseFilters.encode(message.filters, writer.uint32(10).fork()).ldelim(); } @@ -771,42 +640,24 @@ export const QueryLeasesRequest = { fromJSON(object: any): QueryLeasesRequest { return { $type: QueryLeasesRequest.$type, - filters: isSet(object.filters) - ? LeaseFilters.fromJSON(object.filters) - : undefined, - pagination: isSet(object.pagination) - ? PageRequest.fromJSON(object.pagination) - : undefined, + filters: isSet(object.filters) ? LeaseFilters.fromJSON(object.filters) : undefined, + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined }; }, toJSON(message: QueryLeasesRequest): unknown { const obj: any = {}; - message.filters !== undefined && - (obj.filters = message.filters - ? LeaseFilters.toJSON(message.filters) - : undefined); - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); + message.filters !== undefined && (obj.filters = message.filters ? LeaseFilters.toJSON(message.filters) : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryLeasesRequest { + fromPartial, I>>(object: I): QueryLeasesRequest { const message = createBaseQueryLeasesRequest(); - message.filters = - object.filters !== undefined && object.filters !== null - ? LeaseFilters.fromPartial(object.filters) - : undefined; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; + message.filters = object.filters !== undefined && object.filters !== null ? LeaseFilters.fromPartial(object.filters) : undefined; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryLeasesRequest.$type, QueryLeasesRequest); @@ -815,25 +666,19 @@ function createBaseQueryLeasesResponse(): QueryLeasesResponse { return { $type: "akash.market.v1beta4.QueryLeasesResponse", leases: [], - pagination: undefined, + pagination: undefined }; } export const QueryLeasesResponse = { $type: "akash.market.v1beta4.QueryLeasesResponse" as const, - encode( - message: QueryLeasesResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryLeasesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.leases) { QueryLeaseResponse.encode(v!, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); + PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } return writer; }, @@ -846,9 +691,7 @@ export const QueryLeasesResponse = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.leases.push( - QueryLeaseResponse.decode(reader, reader.uint32()) - ); + message.leases.push(QueryLeaseResponse.decode(reader, reader.uint32())); break; case 2: message.pagination = PageResponse.decode(reader, reader.uint32()); @@ -864,43 +707,28 @@ export const QueryLeasesResponse = { fromJSON(object: any): QueryLeasesResponse { return { $type: QueryLeasesResponse.$type, - leases: Array.isArray(object?.leases) - ? object.leases.map((e: any) => QueryLeaseResponse.fromJSON(e)) - : [], - pagination: isSet(object.pagination) - ? PageResponse.fromJSON(object.pagination) - : undefined, + leases: Array.isArray(object?.leases) ? object.leases.map((e: any) => QueryLeaseResponse.fromJSON(e)) : [], + pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined }; }, toJSON(message: QueryLeasesResponse): unknown { const obj: any = {}; if (message.leases) { - obj.leases = message.leases.map((e) => - e ? QueryLeaseResponse.toJSON(e) : undefined - ); + obj.leases = message.leases.map(e => (e ? QueryLeaseResponse.toJSON(e) : undefined)); } else { obj.leases = []; } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryLeasesResponse { + fromPartial, I>>(object: I): QueryLeasesResponse { const message = createBaseQueryLeasesResponse(); - message.leases = - object.leases?.map((e) => QueryLeaseResponse.fromPartial(e)) || []; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageResponse.fromPartial(object.pagination) - : undefined; + message.leases = object.leases?.map(e => QueryLeaseResponse.fromPartial(e)) || []; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryLeasesResponse.$type, QueryLeasesResponse); @@ -912,10 +740,7 @@ function createBaseQueryLeaseRequest(): QueryLeaseRequest { export const QueryLeaseRequest = { $type: "akash.market.v1beta4.QueryLeaseRequest" as const, - encode( - message: QueryLeaseRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryLeaseRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { LeaseID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -943,27 +768,21 @@ export const QueryLeaseRequest = { fromJSON(object: any): QueryLeaseRequest { return { $type: QueryLeaseRequest.$type, - id: isSet(object.id) ? LeaseID.fromJSON(object.id) : undefined, + id: isSet(object.id) ? LeaseID.fromJSON(object.id) : undefined }; }, toJSON(message: QueryLeaseRequest): unknown { const obj: any = {}; - message.id !== undefined && - (obj.id = message.id ? LeaseID.toJSON(message.id) : undefined); + message.id !== undefined && (obj.id = message.id ? LeaseID.toJSON(message.id) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryLeaseRequest { + fromPartial, I>>(object: I): QueryLeaseRequest { const message = createBaseQueryLeaseRequest(); - message.id = - object.id !== undefined && object.id !== null - ? LeaseID.fromPartial(object.id) - : undefined; + message.id = object.id !== undefined && object.id !== null ? LeaseID.fromPartial(object.id) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryLeaseRequest.$type, QueryLeaseRequest); @@ -972,25 +791,19 @@ function createBaseQueryLeaseResponse(): QueryLeaseResponse { return { $type: "akash.market.v1beta4.QueryLeaseResponse", lease: undefined, - escrowPayment: undefined, + escrowPayment: undefined }; } export const QueryLeaseResponse = { $type: "akash.market.v1beta4.QueryLeaseResponse" as const, - encode( - message: QueryLeaseResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryLeaseResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.lease !== undefined) { Lease.encode(message.lease, writer.uint32(10).fork()).ldelim(); } if (message.escrowPayment !== undefined) { - FractionalPayment.encode( - message.escrowPayment, - writer.uint32(18).fork() - ).ldelim(); + FractionalPayment.encode(message.escrowPayment, writer.uint32(18).fork()).ldelim(); } return writer; }, @@ -1006,10 +819,7 @@ export const QueryLeaseResponse = { message.lease = Lease.decode(reader, reader.uint32()); break; case 2: - message.escrowPayment = FractionalPayment.decode( - reader, - reader.uint32() - ); + message.escrowPayment = FractionalPayment.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -1023,37 +833,24 @@ export const QueryLeaseResponse = { return { $type: QueryLeaseResponse.$type, lease: isSet(object.lease) ? Lease.fromJSON(object.lease) : undefined, - escrowPayment: isSet(object.escrowPayment) - ? FractionalPayment.fromJSON(object.escrowPayment) - : undefined, + escrowPayment: isSet(object.escrowPayment) ? FractionalPayment.fromJSON(object.escrowPayment) : undefined }; }, toJSON(message: QueryLeaseResponse): unknown { const obj: any = {}; - message.lease !== undefined && - (obj.lease = message.lease ? Lease.toJSON(message.lease) : undefined); - message.escrowPayment !== undefined && - (obj.escrowPayment = message.escrowPayment - ? FractionalPayment.toJSON(message.escrowPayment) - : undefined); + message.lease !== undefined && (obj.lease = message.lease ? Lease.toJSON(message.lease) : undefined); + message.escrowPayment !== undefined && (obj.escrowPayment = message.escrowPayment ? FractionalPayment.toJSON(message.escrowPayment) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryLeaseResponse { + fromPartial, I>>(object: I): QueryLeaseResponse { const message = createBaseQueryLeaseResponse(); - message.lease = - object.lease !== undefined && object.lease !== null - ? Lease.fromPartial(object.lease) - : undefined; + message.lease = object.lease !== undefined && object.lease !== null ? Lease.fromPartial(object.lease) : undefined; message.escrowPayment = - object.escrowPayment !== undefined && object.escrowPayment !== null - ? FractionalPayment.fromPartial(object.escrowPayment) - : undefined; + object.escrowPayment !== undefined && object.escrowPayment !== null ? FractionalPayment.fromPartial(object.escrowPayment) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryLeaseResponse.$type, QueryLeaseResponse); @@ -1087,109 +884,63 @@ export class QueryClientImpl implements Query { } Orders(request: QueryOrdersRequest): Promise { const data = QueryOrdersRequest.encode(request).finish(); - const promise = this.rpc.request( - "akash.market.v1beta4.Query", - "Orders", - data - ); - return promise.then((data) => - QueryOrdersResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.market.v1beta4.Query", "Orders", data); + return promise.then(data => QueryOrdersResponse.decode(new _m0.Reader(data))); } Order(request: QueryOrderRequest): Promise { const data = QueryOrderRequest.encode(request).finish(); - const promise = this.rpc.request( - "akash.market.v1beta4.Query", - "Order", - data - ); - return promise.then((data) => - QueryOrderResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.market.v1beta4.Query", "Order", data); + return promise.then(data => QueryOrderResponse.decode(new _m0.Reader(data))); } Bids(request: QueryBidsRequest): Promise { const data = QueryBidsRequest.encode(request).finish(); - const promise = this.rpc.request( - "akash.market.v1beta4.Query", - "Bids", - data - ); - return promise.then((data) => - QueryBidsResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.market.v1beta4.Query", "Bids", data); + return promise.then(data => QueryBidsResponse.decode(new _m0.Reader(data))); } Bid(request: QueryBidRequest): Promise { const data = QueryBidRequest.encode(request).finish(); const promise = this.rpc.request("akash.market.v1beta4.Query", "Bid", data); - return promise.then((data) => - QueryBidResponse.decode(new _m0.Reader(data)) - ); + return promise.then(data => QueryBidResponse.decode(new _m0.Reader(data))); } Leases(request: QueryLeasesRequest): Promise { const data = QueryLeasesRequest.encode(request).finish(); - const promise = this.rpc.request( - "akash.market.v1beta4.Query", - "Leases", - data - ); - return promise.then((data) => - QueryLeasesResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.market.v1beta4.Query", "Leases", data); + return promise.then(data => QueryLeasesResponse.decode(new _m0.Reader(data))); } Lease(request: QueryLeaseRequest): Promise { const data = QueryLeaseRequest.encode(request).finish(); - const promise = this.rpc.request( - "akash.market.v1beta4.Query", - "Lease", - data - ); - return promise.then((data) => - QueryLeaseResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.market.v1beta4.Query", "Lease", data); + return promise.then(data => QueryLeaseResponse.decode(new _m0.Reader(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/market/v1beta4/service.ts b/src/protobuf/akash/market/v1beta4/service.ts index 96db0f6..fb4f4b5 100644 --- a/src/protobuf/akash/market/v1beta4/service.ts +++ b/src/protobuf/akash/market/v1beta4/service.ts @@ -1,18 +1,6 @@ /* eslint-disable */ -import { - MsgCreateBidResponse, - MsgCloseBidResponse, - MsgCreateBid, - MsgCloseBid, -} from "./bid"; -import { - MsgWithdrawLeaseResponse, - MsgCreateLeaseResponse, - MsgCloseLeaseResponse, - MsgWithdrawLease, - MsgCreateLease, - MsgCloseLease, -} from "./lease"; +import { MsgCreateBidResponse, MsgCloseBidResponse, MsgCreateBid, MsgCloseBid } from "./bid"; +import { MsgWithdrawLeaseResponse, MsgCreateLeaseResponse, MsgCloseLeaseResponse, MsgWithdrawLease, MsgCreateLease, MsgCloseLease } from "./lease"; import * as _m0 from "protobufjs/minimal"; export const protobufPackage = "akash.market.v1beta4"; @@ -43,69 +31,35 @@ export class MsgClientImpl implements Msg { } CreateBid(request: MsgCreateBid): Promise { const data = MsgCreateBid.encode(request).finish(); - const promise = this.rpc.request( - "akash.market.v1beta4.Msg", - "CreateBid", - data - ); - return promise.then((data) => - MsgCreateBidResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.market.v1beta4.Msg", "CreateBid", data); + return promise.then(data => MsgCreateBidResponse.decode(new _m0.Reader(data))); } CloseBid(request: MsgCloseBid): Promise { const data = MsgCloseBid.encode(request).finish(); - const promise = this.rpc.request( - "akash.market.v1beta4.Msg", - "CloseBid", - data - ); - return promise.then((data) => - MsgCloseBidResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.market.v1beta4.Msg", "CloseBid", data); + return promise.then(data => MsgCloseBidResponse.decode(new _m0.Reader(data))); } WithdrawLease(request: MsgWithdrawLease): Promise { const data = MsgWithdrawLease.encode(request).finish(); - const promise = this.rpc.request( - "akash.market.v1beta4.Msg", - "WithdrawLease", - data - ); - return promise.then((data) => - MsgWithdrawLeaseResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.market.v1beta4.Msg", "WithdrawLease", data); + return promise.then(data => MsgWithdrawLeaseResponse.decode(new _m0.Reader(data))); } CreateLease(request: MsgCreateLease): Promise { const data = MsgCreateLease.encode(request).finish(); - const promise = this.rpc.request( - "akash.market.v1beta4.Msg", - "CreateLease", - data - ); - return promise.then((data) => - MsgCreateLeaseResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.market.v1beta4.Msg", "CreateLease", data); + return promise.then(data => MsgCreateLeaseResponse.decode(new _m0.Reader(data))); } CloseLease(request: MsgCloseLease): Promise { const data = MsgCloseLease.encode(request).finish(); - const promise = this.rpc.request( - "akash.market.v1beta4.Msg", - "CloseLease", - data - ); - return promise.then((data) => - MsgCloseLeaseResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.market.v1beta4.Msg", "CloseLease", data); + return promise.then(data => MsgCloseLeaseResponse.decode(new _m0.Reader(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } diff --git a/src/protobuf/akash/provider/v1beta1/genesis.ts b/src/protobuf/akash/provider/v1beta1/genesis.ts index cc07eee..2cd12e9 100644 --- a/src/protobuf/akash/provider/v1beta1/genesis.ts +++ b/src/protobuf/akash/provider/v1beta1/genesis.ts @@ -19,10 +19,7 @@ function createBaseGenesisState(): GenesisState { export const GenesisState = { $type: "akash.provider.v1beta1.GenesisState" as const, - encode( - message: GenesisState, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: GenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.providers) { Provider.encode(v!, writer.uint32(10).fork()).ldelim(); } @@ -50,64 +47,47 @@ export const GenesisState = { fromJSON(object: any): GenesisState { return { $type: GenesisState.$type, - providers: Array.isArray(object?.providers) - ? object.providers.map((e: any) => Provider.fromJSON(e)) - : [], + providers: Array.isArray(object?.providers) ? object.providers.map((e: any) => Provider.fromJSON(e)) : [] }; }, toJSON(message: GenesisState): unknown { const obj: any = {}; if (message.providers) { - obj.providers = message.providers.map((e) => - e ? Provider.toJSON(e) : undefined - ); + obj.providers = message.providers.map(e => (e ? Provider.toJSON(e) : undefined)); } else { obj.providers = []; } return obj; }, - fromPartial, I>>( - object: I - ): GenesisState { + fromPartial, I>>(object: I): GenesisState { const message = createBaseGenesisState(); - message.providers = - object.providers?.map((e) => Provider.fromPartial(e)) || []; + message.providers = object.providers?.map(e => Provider.fromPartial(e)) || []; return message; - }, + } }; messageTypeRegistry.set(GenesisState.$type, GenesisState); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/provider/v1beta1/provider.ts b/src/protobuf/akash/provider/v1beta1/provider.ts index 442b5e2..30232e1 100644 --- a/src/protobuf/akash/provider/v1beta1/provider.ts +++ b/src/protobuf/akash/provider/v1beta1/provider.ts @@ -65,17 +65,14 @@ function createBaseProviderInfo(): ProviderInfo { return { $type: "akash.provider.v1beta1.ProviderInfo", email: "", - website: "", + website: "" }; } export const ProviderInfo = { $type: "akash.provider.v1beta1.ProviderInfo" as const, - encode( - message: ProviderInfo, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: ProviderInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.email !== "") { writer.uint32(10).string(message.email); } @@ -110,7 +107,7 @@ export const ProviderInfo = { return { $type: ProviderInfo.$type, email: isSet(object.email) ? String(object.email) : "", - website: isSet(object.website) ? String(object.website) : "", + website: isSet(object.website) ? String(object.website) : "" }; }, @@ -121,14 +118,12 @@ export const ProviderInfo = { return obj; }, - fromPartial, I>>( - object: I - ): ProviderInfo { + fromPartial, I>>(object: I): ProviderInfo { const message = createBaseProviderInfo(); message.email = object.email ?? ""; message.website = object.website ?? ""; return message; - }, + } }; messageTypeRegistry.set(ProviderInfo.$type, ProviderInfo); @@ -139,17 +134,14 @@ function createBaseMsgCreateProvider(): MsgCreateProvider { owner: "", hostUri: "", attributes: [], - info: undefined, + info: undefined }; } export const MsgCreateProvider = { $type: "akash.provider.v1beta1.MsgCreateProvider" as const, - encode( - message: MsgCreateProvider, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MsgCreateProvider, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -197,10 +189,8 @@ export const MsgCreateProvider = { $type: MsgCreateProvider.$type, owner: isSet(object.owner) ? String(object.owner) : "", hostUri: isSet(object.hostUri) ? String(object.hostUri) : "", - attributes: Array.isArray(object?.attributes) - ? object.attributes.map((e: any) => Attribute.fromJSON(e)) - : [], - info: isSet(object.info) ? ProviderInfo.fromJSON(object.info) : undefined, + attributes: Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromJSON(e)) : [], + info: isSet(object.info) ? ProviderInfo.fromJSON(object.info) : undefined }; }, @@ -209,31 +199,22 @@ export const MsgCreateProvider = { message.owner !== undefined && (obj.owner = message.owner); message.hostUri !== undefined && (obj.hostUri = message.hostUri); if (message.attributes) { - obj.attributes = message.attributes.map((e) => - e ? Attribute.toJSON(e) : undefined - ); + obj.attributes = message.attributes.map(e => (e ? Attribute.toJSON(e) : undefined)); } else { obj.attributes = []; } - message.info !== undefined && - (obj.info = message.info ? ProviderInfo.toJSON(message.info) : undefined); + message.info !== undefined && (obj.info = message.info ? ProviderInfo.toJSON(message.info) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): MsgCreateProvider { + fromPartial, I>>(object: I): MsgCreateProvider { const message = createBaseMsgCreateProvider(); message.owner = object.owner ?? ""; message.hostUri = object.hostUri ?? ""; - message.attributes = - object.attributes?.map((e) => Attribute.fromPartial(e)) || []; - message.info = - object.info !== undefined && object.info !== null - ? ProviderInfo.fromPartial(object.info) - : undefined; + message.attributes = object.attributes?.map(e => Attribute.fromPartial(e)) || []; + message.info = object.info !== undefined && object.info !== null ? ProviderInfo.fromPartial(object.info) : undefined; return message; - }, + } }; messageTypeRegistry.set(MsgCreateProvider.$type, MsgCreateProvider); @@ -245,17 +226,11 @@ function createBaseMsgCreateProviderResponse(): MsgCreateProviderResponse { export const MsgCreateProviderResponse = { $type: "akash.provider.v1beta1.MsgCreateProviderResponse" as const, - encode( - _: MsgCreateProviderResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: MsgCreateProviderResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgCreateProviderResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreateProviderResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCreateProviderResponse(); @@ -272,7 +247,7 @@ export const MsgCreateProviderResponse = { fromJSON(_: any): MsgCreateProviderResponse { return { - $type: MsgCreateProviderResponse.$type, + $type: MsgCreateProviderResponse.$type }; }, @@ -281,18 +256,13 @@ export const MsgCreateProviderResponse = { return obj; }, - fromPartial, I>>( - _: I - ): MsgCreateProviderResponse { + fromPartial, I>>(_: I): MsgCreateProviderResponse { const message = createBaseMsgCreateProviderResponse(); return message; - }, + } }; -messageTypeRegistry.set( - MsgCreateProviderResponse.$type, - MsgCreateProviderResponse -); +messageTypeRegistry.set(MsgCreateProviderResponse.$type, MsgCreateProviderResponse); function createBaseMsgUpdateProvider(): MsgUpdateProvider { return { @@ -300,17 +270,14 @@ function createBaseMsgUpdateProvider(): MsgUpdateProvider { owner: "", hostUri: "", attributes: [], - info: undefined, + info: undefined }; } export const MsgUpdateProvider = { $type: "akash.provider.v1beta1.MsgUpdateProvider" as const, - encode( - message: MsgUpdateProvider, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MsgUpdateProvider, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -358,10 +325,8 @@ export const MsgUpdateProvider = { $type: MsgUpdateProvider.$type, owner: isSet(object.owner) ? String(object.owner) : "", hostUri: isSet(object.hostUri) ? String(object.hostUri) : "", - attributes: Array.isArray(object?.attributes) - ? object.attributes.map((e: any) => Attribute.fromJSON(e)) - : [], - info: isSet(object.info) ? ProviderInfo.fromJSON(object.info) : undefined, + attributes: Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromJSON(e)) : [], + info: isSet(object.info) ? ProviderInfo.fromJSON(object.info) : undefined }; }, @@ -370,31 +335,22 @@ export const MsgUpdateProvider = { message.owner !== undefined && (obj.owner = message.owner); message.hostUri !== undefined && (obj.hostUri = message.hostUri); if (message.attributes) { - obj.attributes = message.attributes.map((e) => - e ? Attribute.toJSON(e) : undefined - ); + obj.attributes = message.attributes.map(e => (e ? Attribute.toJSON(e) : undefined)); } else { obj.attributes = []; } - message.info !== undefined && - (obj.info = message.info ? ProviderInfo.toJSON(message.info) : undefined); + message.info !== undefined && (obj.info = message.info ? ProviderInfo.toJSON(message.info) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): MsgUpdateProvider { + fromPartial, I>>(object: I): MsgUpdateProvider { const message = createBaseMsgUpdateProvider(); message.owner = object.owner ?? ""; message.hostUri = object.hostUri ?? ""; - message.attributes = - object.attributes?.map((e) => Attribute.fromPartial(e)) || []; - message.info = - object.info !== undefined && object.info !== null - ? ProviderInfo.fromPartial(object.info) - : undefined; + message.attributes = object.attributes?.map(e => Attribute.fromPartial(e)) || []; + message.info = object.info !== undefined && object.info !== null ? ProviderInfo.fromPartial(object.info) : undefined; return message; - }, + } }; messageTypeRegistry.set(MsgUpdateProvider.$type, MsgUpdateProvider); @@ -406,17 +362,11 @@ function createBaseMsgUpdateProviderResponse(): MsgUpdateProviderResponse { export const MsgUpdateProviderResponse = { $type: "akash.provider.v1beta1.MsgUpdateProviderResponse" as const, - encode( - _: MsgUpdateProviderResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: MsgUpdateProviderResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgUpdateProviderResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgUpdateProviderResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgUpdateProviderResponse(); @@ -433,7 +383,7 @@ export const MsgUpdateProviderResponse = { fromJSON(_: any): MsgUpdateProviderResponse { return { - $type: MsgUpdateProviderResponse.$type, + $type: MsgUpdateProviderResponse.$type }; }, @@ -442,18 +392,13 @@ export const MsgUpdateProviderResponse = { return obj; }, - fromPartial, I>>( - _: I - ): MsgUpdateProviderResponse { + fromPartial, I>>(_: I): MsgUpdateProviderResponse { const message = createBaseMsgUpdateProviderResponse(); return message; - }, + } }; -messageTypeRegistry.set( - MsgUpdateProviderResponse.$type, - MsgUpdateProviderResponse -); +messageTypeRegistry.set(MsgUpdateProviderResponse.$type, MsgUpdateProviderResponse); function createBaseMsgDeleteProvider(): MsgDeleteProvider { return { $type: "akash.provider.v1beta1.MsgDeleteProvider", owner: "" }; @@ -462,10 +407,7 @@ function createBaseMsgDeleteProvider(): MsgDeleteProvider { export const MsgDeleteProvider = { $type: "akash.provider.v1beta1.MsgDeleteProvider" as const, - encode( - message: MsgDeleteProvider, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MsgDeleteProvider, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -493,7 +435,7 @@ export const MsgDeleteProvider = { fromJSON(object: any): MsgDeleteProvider { return { $type: MsgDeleteProvider.$type, - owner: isSet(object.owner) ? String(object.owner) : "", + owner: isSet(object.owner) ? String(object.owner) : "" }; }, @@ -503,13 +445,11 @@ export const MsgDeleteProvider = { return obj; }, - fromPartial, I>>( - object: I - ): MsgDeleteProvider { + fromPartial, I>>(object: I): MsgDeleteProvider { const message = createBaseMsgDeleteProvider(); message.owner = object.owner ?? ""; return message; - }, + } }; messageTypeRegistry.set(MsgDeleteProvider.$type, MsgDeleteProvider); @@ -521,17 +461,11 @@ function createBaseMsgDeleteProviderResponse(): MsgDeleteProviderResponse { export const MsgDeleteProviderResponse = { $type: "akash.provider.v1beta1.MsgDeleteProviderResponse" as const, - encode( - _: MsgDeleteProviderResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: MsgDeleteProviderResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgDeleteProviderResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgDeleteProviderResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgDeleteProviderResponse(); @@ -548,7 +482,7 @@ export const MsgDeleteProviderResponse = { fromJSON(_: any): MsgDeleteProviderResponse { return { - $type: MsgDeleteProviderResponse.$type, + $type: MsgDeleteProviderResponse.$type }; }, @@ -557,18 +491,13 @@ export const MsgDeleteProviderResponse = { return obj; }, - fromPartial, I>>( - _: I - ): MsgDeleteProviderResponse { + fromPartial, I>>(_: I): MsgDeleteProviderResponse { const message = createBaseMsgDeleteProviderResponse(); return message; - }, + } }; -messageTypeRegistry.set( - MsgDeleteProviderResponse.$type, - MsgDeleteProviderResponse -); +messageTypeRegistry.set(MsgDeleteProviderResponse.$type, MsgDeleteProviderResponse); function createBaseProvider(): Provider { return { @@ -576,17 +505,14 @@ function createBaseProvider(): Provider { owner: "", hostUri: "", attributes: [], - info: undefined, + info: undefined }; } export const Provider = { $type: "akash.provider.v1beta1.Provider" as const, - encode( - message: Provider, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Provider, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -634,10 +560,8 @@ export const Provider = { $type: Provider.$type, owner: isSet(object.owner) ? String(object.owner) : "", hostUri: isSet(object.hostUri) ? String(object.hostUri) : "", - attributes: Array.isArray(object?.attributes) - ? object.attributes.map((e: any) => Attribute.fromJSON(e)) - : [], - info: isSet(object.info) ? ProviderInfo.fromJSON(object.info) : undefined, + attributes: Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromJSON(e)) : [], + info: isSet(object.info) ? ProviderInfo.fromJSON(object.info) : undefined }; }, @@ -646,14 +570,11 @@ export const Provider = { message.owner !== undefined && (obj.owner = message.owner); message.hostUri !== undefined && (obj.hostUri = message.hostUri); if (message.attributes) { - obj.attributes = message.attributes.map((e) => - e ? Attribute.toJSON(e) : undefined - ); + obj.attributes = message.attributes.map(e => (e ? Attribute.toJSON(e) : undefined)); } else { obj.attributes = []; } - message.info !== undefined && - (obj.info = message.info ? ProviderInfo.toJSON(message.info) : undefined); + message.info !== undefined && (obj.info = message.info ? ProviderInfo.toJSON(message.info) : undefined); return obj; }, @@ -661,14 +582,10 @@ export const Provider = { const message = createBaseProvider(); message.owner = object.owner ?? ""; message.hostUri = object.hostUri ?? ""; - message.attributes = - object.attributes?.map((e) => Attribute.fromPartial(e)) || []; - message.info = - object.info !== undefined && object.info !== null - ? ProviderInfo.fromPartial(object.info) - : undefined; + message.attributes = object.attributes?.map(e => Attribute.fromPartial(e)) || []; + message.info = object.info !== undefined && object.info !== null ? ProviderInfo.fromPartial(object.info) : undefined; return message; - }, + } }; messageTypeRegistry.set(Provider.$type, Provider); @@ -676,17 +593,11 @@ messageTypeRegistry.set(Provider.$type, Provider); /** Msg defines the provider Msg service */ export interface Msg { /** CreateProvider defines a method that creates a provider given the proper inputs */ - CreateProvider( - request: MsgCreateProvider - ): Promise; + CreateProvider(request: MsgCreateProvider): Promise; /** UpdateProvider defines a method that updates a provider given the proper inputs */ - UpdateProvider( - request: MsgUpdateProvider - ): Promise; + UpdateProvider(request: MsgUpdateProvider): Promise; /** DeleteProvider defines a method that deletes a provider given the proper inputs */ - DeleteProvider( - request: MsgDeleteProvider - ): Promise; + DeleteProvider(request: MsgDeleteProvider): Promise; } export class MsgClientImpl implements Msg { @@ -697,85 +608,47 @@ export class MsgClientImpl implements Msg { this.UpdateProvider = this.UpdateProvider.bind(this); this.DeleteProvider = this.DeleteProvider.bind(this); } - CreateProvider( - request: MsgCreateProvider - ): Promise { + CreateProvider(request: MsgCreateProvider): Promise { const data = MsgCreateProvider.encode(request).finish(); - const promise = this.rpc.request( - "akash.provider.v1beta1.Msg", - "CreateProvider", - data - ); - return promise.then((data) => - MsgCreateProviderResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.provider.v1beta1.Msg", "CreateProvider", data); + return promise.then(data => MsgCreateProviderResponse.decode(new _m0.Reader(data))); } - UpdateProvider( - request: MsgUpdateProvider - ): Promise { + UpdateProvider(request: MsgUpdateProvider): Promise { const data = MsgUpdateProvider.encode(request).finish(); - const promise = this.rpc.request( - "akash.provider.v1beta1.Msg", - "UpdateProvider", - data - ); - return promise.then((data) => - MsgUpdateProviderResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.provider.v1beta1.Msg", "UpdateProvider", data); + return promise.then(data => MsgUpdateProviderResponse.decode(new _m0.Reader(data))); } - DeleteProvider( - request: MsgDeleteProvider - ): Promise { + DeleteProvider(request: MsgDeleteProvider): Promise { const data = MsgDeleteProvider.encode(request).finish(); - const promise = this.rpc.request( - "akash.provider.v1beta1.Msg", - "DeleteProvider", - data - ); - return promise.then((data) => - MsgDeleteProviderResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.provider.v1beta1.Msg", "DeleteProvider", data); + return promise.then(data => MsgDeleteProviderResponse.decode(new _m0.Reader(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/provider/v1beta1/query.ts b/src/protobuf/akash/provider/v1beta1/query.ts index 962bb5d..5981395 100644 --- a/src/protobuf/akash/provider/v1beta1/query.ts +++ b/src/protobuf/akash/provider/v1beta1/query.ts @@ -2,10 +2,7 @@ import { messageTypeRegistry } from "../../../typeRegistry"; import Long from "long"; import _m0 from "protobufjs/minimal"; -import { - PageRequest, - PageResponse, -} from "../../../cosmos/base/query/v1beta1/pagination"; +import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; import { Provider } from "../../../akash/provider/v1beta1/provider"; export const protobufPackage = "akash.provider.v1beta1"; @@ -38,27 +35,21 @@ export interface QueryProviderResponse { function createBaseQueryProvidersRequest(): QueryProvidersRequest { return { $type: "akash.provider.v1beta1.QueryProvidersRequest", - pagination: undefined, + pagination: undefined }; } export const QueryProvidersRequest = { $type: "akash.provider.v1beta1.QueryProvidersRequest" as const, - encode( - message: QueryProvidersRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryProvidersRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.pagination !== undefined) { PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryProvidersRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryProvidersRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryProvidersRequest(); @@ -79,31 +70,21 @@ export const QueryProvidersRequest = { fromJSON(object: any): QueryProvidersRequest { return { $type: QueryProvidersRequest.$type, - pagination: isSet(object.pagination) - ? PageRequest.fromJSON(object.pagination) - : undefined, + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined }; }, toJSON(message: QueryProvidersRequest): unknown { const obj: any = {}; - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryProvidersRequest { + fromPartial, I>>(object: I): QueryProvidersRequest { const message = createBaseQueryProvidersRequest(); - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryProvidersRequest.$type, QueryProvidersRequest); @@ -112,33 +93,24 @@ function createBaseQueryProvidersResponse(): QueryProvidersResponse { return { $type: "akash.provider.v1beta1.QueryProvidersResponse", providers: [], - pagination: undefined, + pagination: undefined }; } export const QueryProvidersResponse = { $type: "akash.provider.v1beta1.QueryProvidersResponse" as const, - encode( - message: QueryProvidersResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryProvidersResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.providers) { Provider.encode(v!, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); + PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryProvidersResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryProvidersResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryProvidersResponse(); @@ -162,43 +134,28 @@ export const QueryProvidersResponse = { fromJSON(object: any): QueryProvidersResponse { return { $type: QueryProvidersResponse.$type, - providers: Array.isArray(object?.providers) - ? object.providers.map((e: any) => Provider.fromJSON(e)) - : [], - pagination: isSet(object.pagination) - ? PageResponse.fromJSON(object.pagination) - : undefined, + providers: Array.isArray(object?.providers) ? object.providers.map((e: any) => Provider.fromJSON(e)) : [], + pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined }; }, toJSON(message: QueryProvidersResponse): unknown { const obj: any = {}; if (message.providers) { - obj.providers = message.providers.map((e) => - e ? Provider.toJSON(e) : undefined - ); + obj.providers = message.providers.map(e => (e ? Provider.toJSON(e) : undefined)); } else { obj.providers = []; } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryProvidersResponse { + fromPartial, I>>(object: I): QueryProvidersResponse { const message = createBaseQueryProvidersResponse(); - message.providers = - object.providers?.map((e) => Provider.fromPartial(e)) || []; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageResponse.fromPartial(object.pagination) - : undefined; + message.providers = object.providers?.map(e => Provider.fromPartial(e)) || []; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryProvidersResponse.$type, QueryProvidersResponse); @@ -210,20 +167,14 @@ function createBaseQueryProviderRequest(): QueryProviderRequest { export const QueryProviderRequest = { $type: "akash.provider.v1beta1.QueryProviderRequest" as const, - encode( - message: QueryProviderRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryProviderRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryProviderRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryProviderRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryProviderRequest(); @@ -244,7 +195,7 @@ export const QueryProviderRequest = { fromJSON(object: any): QueryProviderRequest { return { $type: QueryProviderRequest.$type, - owner: isSet(object.owner) ? String(object.owner) : "", + owner: isSet(object.owner) ? String(object.owner) : "" }; }, @@ -254,13 +205,11 @@ export const QueryProviderRequest = { return obj; }, - fromPartial, I>>( - object: I - ): QueryProviderRequest { + fromPartial, I>>(object: I): QueryProviderRequest { const message = createBaseQueryProviderRequest(); message.owner = object.owner ?? ""; return message; - }, + } }; messageTypeRegistry.set(QueryProviderRequest.$type, QueryProviderRequest); @@ -268,27 +217,21 @@ messageTypeRegistry.set(QueryProviderRequest.$type, QueryProviderRequest); function createBaseQueryProviderResponse(): QueryProviderResponse { return { $type: "akash.provider.v1beta1.QueryProviderResponse", - provider: undefined, + provider: undefined }; } export const QueryProviderResponse = { $type: "akash.provider.v1beta1.QueryProviderResponse" as const, - encode( - message: QueryProviderResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryProviderResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.provider !== undefined) { Provider.encode(message.provider, writer.uint32(10).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryProviderResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryProviderResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryProviderResponse(); @@ -309,31 +252,21 @@ export const QueryProviderResponse = { fromJSON(object: any): QueryProviderResponse { return { $type: QueryProviderResponse.$type, - provider: isSet(object.provider) - ? Provider.fromJSON(object.provider) - : undefined, + provider: isSet(object.provider) ? Provider.fromJSON(object.provider) : undefined }; }, toJSON(message: QueryProviderResponse): unknown { const obj: any = {}; - message.provider !== undefined && - (obj.provider = message.provider - ? Provider.toJSON(message.provider) - : undefined); + message.provider !== undefined && (obj.provider = message.provider ? Provider.toJSON(message.provider) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryProviderResponse { + fromPartial, I>>(object: I): QueryProviderResponse { const message = createBaseQueryProviderResponse(); - message.provider = - object.provider !== undefined && object.provider !== null - ? Provider.fromPartial(object.provider) - : undefined; + message.provider = object.provider !== undefined && object.provider !== null ? Provider.fromPartial(object.provider) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryProviderResponse.$type, QueryProviderResponse); @@ -355,65 +288,39 @@ export class QueryClientImpl implements Query { } Providers(request: QueryProvidersRequest): Promise { const data = QueryProvidersRequest.encode(request).finish(); - const promise = this.rpc.request( - "akash.provider.v1beta1.Query", - "Providers", - data - ); - return promise.then((data) => - QueryProvidersResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.provider.v1beta1.Query", "Providers", data); + return promise.then(data => QueryProvidersResponse.decode(new _m0.Reader(data))); } Provider(request: QueryProviderRequest): Promise { const data = QueryProviderRequest.encode(request).finish(); - const promise = this.rpc.request( - "akash.provider.v1beta1.Query", - "Provider", - data - ); - return promise.then((data) => - QueryProviderResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.provider.v1beta1.Query", "Provider", data); + return promise.then(data => QueryProviderResponse.decode(new _m0.Reader(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/provider/v1beta2/genesis.ts b/src/protobuf/akash/provider/v1beta2/genesis.ts index 40f39ff..b1779a4 100644 --- a/src/protobuf/akash/provider/v1beta2/genesis.ts +++ b/src/protobuf/akash/provider/v1beta2/genesis.ts @@ -19,10 +19,7 @@ function createBaseGenesisState(): GenesisState { export const GenesisState = { $type: "akash.provider.v1beta2.GenesisState" as const, - encode( - message: GenesisState, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: GenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.providers) { Provider.encode(v!, writer.uint32(10).fork()).ldelim(); } @@ -50,64 +47,47 @@ export const GenesisState = { fromJSON(object: any): GenesisState { return { $type: GenesisState.$type, - providers: Array.isArray(object?.providers) - ? object.providers.map((e: any) => Provider.fromJSON(e)) - : [], + providers: Array.isArray(object?.providers) ? object.providers.map((e: any) => Provider.fromJSON(e)) : [] }; }, toJSON(message: GenesisState): unknown { const obj: any = {}; if (message.providers) { - obj.providers = message.providers.map((e) => - e ? Provider.toJSON(e) : undefined - ); + obj.providers = message.providers.map(e => (e ? Provider.toJSON(e) : undefined)); } else { obj.providers = []; } return obj; }, - fromPartial, I>>( - object: I - ): GenesisState { + fromPartial, I>>(object: I): GenesisState { const message = createBaseGenesisState(); - message.providers = - object.providers?.map((e) => Provider.fromPartial(e)) || []; + message.providers = object.providers?.map(e => Provider.fromPartial(e)) || []; return message; - }, + } }; messageTypeRegistry.set(GenesisState.$type, GenesisState); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/provider/v1beta2/provider.ts b/src/protobuf/akash/provider/v1beta2/provider.ts index cc95613..592e33f 100644 --- a/src/protobuf/akash/provider/v1beta2/provider.ts +++ b/src/protobuf/akash/provider/v1beta2/provider.ts @@ -65,17 +65,14 @@ function createBaseProviderInfo(): ProviderInfo { return { $type: "akash.provider.v1beta2.ProviderInfo", email: "", - website: "", + website: "" }; } export const ProviderInfo = { $type: "akash.provider.v1beta2.ProviderInfo" as const, - encode( - message: ProviderInfo, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: ProviderInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.email !== "") { writer.uint32(10).string(message.email); } @@ -110,7 +107,7 @@ export const ProviderInfo = { return { $type: ProviderInfo.$type, email: isSet(object.email) ? String(object.email) : "", - website: isSet(object.website) ? String(object.website) : "", + website: isSet(object.website) ? String(object.website) : "" }; }, @@ -121,14 +118,12 @@ export const ProviderInfo = { return obj; }, - fromPartial, I>>( - object: I - ): ProviderInfo { + fromPartial, I>>(object: I): ProviderInfo { const message = createBaseProviderInfo(); message.email = object.email ?? ""; message.website = object.website ?? ""; return message; - }, + } }; messageTypeRegistry.set(ProviderInfo.$type, ProviderInfo); @@ -139,17 +134,14 @@ function createBaseMsgCreateProvider(): MsgCreateProvider { owner: "", hostUri: "", attributes: [], - info: undefined, + info: undefined }; } export const MsgCreateProvider = { $type: "akash.provider.v1beta2.MsgCreateProvider" as const, - encode( - message: MsgCreateProvider, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MsgCreateProvider, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -197,10 +189,8 @@ export const MsgCreateProvider = { $type: MsgCreateProvider.$type, owner: isSet(object.owner) ? String(object.owner) : "", hostUri: isSet(object.hostUri) ? String(object.hostUri) : "", - attributes: Array.isArray(object?.attributes) - ? object.attributes.map((e: any) => Attribute.fromJSON(e)) - : [], - info: isSet(object.info) ? ProviderInfo.fromJSON(object.info) : undefined, + attributes: Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromJSON(e)) : [], + info: isSet(object.info) ? ProviderInfo.fromJSON(object.info) : undefined }; }, @@ -209,31 +199,22 @@ export const MsgCreateProvider = { message.owner !== undefined && (obj.owner = message.owner); message.hostUri !== undefined && (obj.hostUri = message.hostUri); if (message.attributes) { - obj.attributes = message.attributes.map((e) => - e ? Attribute.toJSON(e) : undefined - ); + obj.attributes = message.attributes.map(e => (e ? Attribute.toJSON(e) : undefined)); } else { obj.attributes = []; } - message.info !== undefined && - (obj.info = message.info ? ProviderInfo.toJSON(message.info) : undefined); + message.info !== undefined && (obj.info = message.info ? ProviderInfo.toJSON(message.info) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): MsgCreateProvider { + fromPartial, I>>(object: I): MsgCreateProvider { const message = createBaseMsgCreateProvider(); message.owner = object.owner ?? ""; message.hostUri = object.hostUri ?? ""; - message.attributes = - object.attributes?.map((e) => Attribute.fromPartial(e)) || []; - message.info = - object.info !== undefined && object.info !== null - ? ProviderInfo.fromPartial(object.info) - : undefined; + message.attributes = object.attributes?.map(e => Attribute.fromPartial(e)) || []; + message.info = object.info !== undefined && object.info !== null ? ProviderInfo.fromPartial(object.info) : undefined; return message; - }, + } }; messageTypeRegistry.set(MsgCreateProvider.$type, MsgCreateProvider); @@ -245,17 +226,11 @@ function createBaseMsgCreateProviderResponse(): MsgCreateProviderResponse { export const MsgCreateProviderResponse = { $type: "akash.provider.v1beta2.MsgCreateProviderResponse" as const, - encode( - _: MsgCreateProviderResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: MsgCreateProviderResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgCreateProviderResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreateProviderResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCreateProviderResponse(); @@ -272,7 +247,7 @@ export const MsgCreateProviderResponse = { fromJSON(_: any): MsgCreateProviderResponse { return { - $type: MsgCreateProviderResponse.$type, + $type: MsgCreateProviderResponse.$type }; }, @@ -281,18 +256,13 @@ export const MsgCreateProviderResponse = { return obj; }, - fromPartial, I>>( - _: I - ): MsgCreateProviderResponse { + fromPartial, I>>(_: I): MsgCreateProviderResponse { const message = createBaseMsgCreateProviderResponse(); return message; - }, + } }; -messageTypeRegistry.set( - MsgCreateProviderResponse.$type, - MsgCreateProviderResponse -); +messageTypeRegistry.set(MsgCreateProviderResponse.$type, MsgCreateProviderResponse); function createBaseMsgUpdateProvider(): MsgUpdateProvider { return { @@ -300,17 +270,14 @@ function createBaseMsgUpdateProvider(): MsgUpdateProvider { owner: "", hostUri: "", attributes: [], - info: undefined, + info: undefined }; } export const MsgUpdateProvider = { $type: "akash.provider.v1beta2.MsgUpdateProvider" as const, - encode( - message: MsgUpdateProvider, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MsgUpdateProvider, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -358,10 +325,8 @@ export const MsgUpdateProvider = { $type: MsgUpdateProvider.$type, owner: isSet(object.owner) ? String(object.owner) : "", hostUri: isSet(object.hostUri) ? String(object.hostUri) : "", - attributes: Array.isArray(object?.attributes) - ? object.attributes.map((e: any) => Attribute.fromJSON(e)) - : [], - info: isSet(object.info) ? ProviderInfo.fromJSON(object.info) : undefined, + attributes: Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromJSON(e)) : [], + info: isSet(object.info) ? ProviderInfo.fromJSON(object.info) : undefined }; }, @@ -370,31 +335,22 @@ export const MsgUpdateProvider = { message.owner !== undefined && (obj.owner = message.owner); message.hostUri !== undefined && (obj.hostUri = message.hostUri); if (message.attributes) { - obj.attributes = message.attributes.map((e) => - e ? Attribute.toJSON(e) : undefined - ); + obj.attributes = message.attributes.map(e => (e ? Attribute.toJSON(e) : undefined)); } else { obj.attributes = []; } - message.info !== undefined && - (obj.info = message.info ? ProviderInfo.toJSON(message.info) : undefined); + message.info !== undefined && (obj.info = message.info ? ProviderInfo.toJSON(message.info) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): MsgUpdateProvider { + fromPartial, I>>(object: I): MsgUpdateProvider { const message = createBaseMsgUpdateProvider(); message.owner = object.owner ?? ""; message.hostUri = object.hostUri ?? ""; - message.attributes = - object.attributes?.map((e) => Attribute.fromPartial(e)) || []; - message.info = - object.info !== undefined && object.info !== null - ? ProviderInfo.fromPartial(object.info) - : undefined; + message.attributes = object.attributes?.map(e => Attribute.fromPartial(e)) || []; + message.info = object.info !== undefined && object.info !== null ? ProviderInfo.fromPartial(object.info) : undefined; return message; - }, + } }; messageTypeRegistry.set(MsgUpdateProvider.$type, MsgUpdateProvider); @@ -406,17 +362,11 @@ function createBaseMsgUpdateProviderResponse(): MsgUpdateProviderResponse { export const MsgUpdateProviderResponse = { $type: "akash.provider.v1beta2.MsgUpdateProviderResponse" as const, - encode( - _: MsgUpdateProviderResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: MsgUpdateProviderResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgUpdateProviderResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgUpdateProviderResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgUpdateProviderResponse(); @@ -433,7 +383,7 @@ export const MsgUpdateProviderResponse = { fromJSON(_: any): MsgUpdateProviderResponse { return { - $type: MsgUpdateProviderResponse.$type, + $type: MsgUpdateProviderResponse.$type }; }, @@ -442,18 +392,13 @@ export const MsgUpdateProviderResponse = { return obj; }, - fromPartial, I>>( - _: I - ): MsgUpdateProviderResponse { + fromPartial, I>>(_: I): MsgUpdateProviderResponse { const message = createBaseMsgUpdateProviderResponse(); return message; - }, + } }; -messageTypeRegistry.set( - MsgUpdateProviderResponse.$type, - MsgUpdateProviderResponse -); +messageTypeRegistry.set(MsgUpdateProviderResponse.$type, MsgUpdateProviderResponse); function createBaseMsgDeleteProvider(): MsgDeleteProvider { return { $type: "akash.provider.v1beta2.MsgDeleteProvider", owner: "" }; @@ -462,10 +407,7 @@ function createBaseMsgDeleteProvider(): MsgDeleteProvider { export const MsgDeleteProvider = { $type: "akash.provider.v1beta2.MsgDeleteProvider" as const, - encode( - message: MsgDeleteProvider, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MsgDeleteProvider, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -493,7 +435,7 @@ export const MsgDeleteProvider = { fromJSON(object: any): MsgDeleteProvider { return { $type: MsgDeleteProvider.$type, - owner: isSet(object.owner) ? String(object.owner) : "", + owner: isSet(object.owner) ? String(object.owner) : "" }; }, @@ -503,13 +445,11 @@ export const MsgDeleteProvider = { return obj; }, - fromPartial, I>>( - object: I - ): MsgDeleteProvider { + fromPartial, I>>(object: I): MsgDeleteProvider { const message = createBaseMsgDeleteProvider(); message.owner = object.owner ?? ""; return message; - }, + } }; messageTypeRegistry.set(MsgDeleteProvider.$type, MsgDeleteProvider); @@ -521,17 +461,11 @@ function createBaseMsgDeleteProviderResponse(): MsgDeleteProviderResponse { export const MsgDeleteProviderResponse = { $type: "akash.provider.v1beta2.MsgDeleteProviderResponse" as const, - encode( - _: MsgDeleteProviderResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: MsgDeleteProviderResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgDeleteProviderResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgDeleteProviderResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgDeleteProviderResponse(); @@ -548,7 +482,7 @@ export const MsgDeleteProviderResponse = { fromJSON(_: any): MsgDeleteProviderResponse { return { - $type: MsgDeleteProviderResponse.$type, + $type: MsgDeleteProviderResponse.$type }; }, @@ -557,18 +491,13 @@ export const MsgDeleteProviderResponse = { return obj; }, - fromPartial, I>>( - _: I - ): MsgDeleteProviderResponse { + fromPartial, I>>(_: I): MsgDeleteProviderResponse { const message = createBaseMsgDeleteProviderResponse(); return message; - }, + } }; -messageTypeRegistry.set( - MsgDeleteProviderResponse.$type, - MsgDeleteProviderResponse -); +messageTypeRegistry.set(MsgDeleteProviderResponse.$type, MsgDeleteProviderResponse); function createBaseProvider(): Provider { return { @@ -576,17 +505,14 @@ function createBaseProvider(): Provider { owner: "", hostUri: "", attributes: [], - info: undefined, + info: undefined }; } export const Provider = { $type: "akash.provider.v1beta2.Provider" as const, - encode( - message: Provider, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Provider, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -634,10 +560,8 @@ export const Provider = { $type: Provider.$type, owner: isSet(object.owner) ? String(object.owner) : "", hostUri: isSet(object.hostUri) ? String(object.hostUri) : "", - attributes: Array.isArray(object?.attributes) - ? object.attributes.map((e: any) => Attribute.fromJSON(e)) - : [], - info: isSet(object.info) ? ProviderInfo.fromJSON(object.info) : undefined, + attributes: Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromJSON(e)) : [], + info: isSet(object.info) ? ProviderInfo.fromJSON(object.info) : undefined }; }, @@ -646,14 +570,11 @@ export const Provider = { message.owner !== undefined && (obj.owner = message.owner); message.hostUri !== undefined && (obj.hostUri = message.hostUri); if (message.attributes) { - obj.attributes = message.attributes.map((e) => - e ? Attribute.toJSON(e) : undefined - ); + obj.attributes = message.attributes.map(e => (e ? Attribute.toJSON(e) : undefined)); } else { obj.attributes = []; } - message.info !== undefined && - (obj.info = message.info ? ProviderInfo.toJSON(message.info) : undefined); + message.info !== undefined && (obj.info = message.info ? ProviderInfo.toJSON(message.info) : undefined); return obj; }, @@ -661,14 +582,10 @@ export const Provider = { const message = createBaseProvider(); message.owner = object.owner ?? ""; message.hostUri = object.hostUri ?? ""; - message.attributes = - object.attributes?.map((e) => Attribute.fromPartial(e)) || []; - message.info = - object.info !== undefined && object.info !== null - ? ProviderInfo.fromPartial(object.info) - : undefined; + message.attributes = object.attributes?.map(e => Attribute.fromPartial(e)) || []; + message.info = object.info !== undefined && object.info !== null ? ProviderInfo.fromPartial(object.info) : undefined; return message; - }, + } }; messageTypeRegistry.set(Provider.$type, Provider); @@ -676,17 +593,11 @@ messageTypeRegistry.set(Provider.$type, Provider); /** Msg defines the provider Msg service */ export interface Msg { /** CreateProvider defines a method that creates a provider given the proper inputs */ - CreateProvider( - request: MsgCreateProvider - ): Promise; + CreateProvider(request: MsgCreateProvider): Promise; /** UpdateProvider defines a method that updates a provider given the proper inputs */ - UpdateProvider( - request: MsgUpdateProvider - ): Promise; + UpdateProvider(request: MsgUpdateProvider): Promise; /** DeleteProvider defines a method that deletes a provider given the proper inputs */ - DeleteProvider( - request: MsgDeleteProvider - ): Promise; + DeleteProvider(request: MsgDeleteProvider): Promise; } export class MsgClientImpl implements Msg { @@ -697,85 +608,47 @@ export class MsgClientImpl implements Msg { this.UpdateProvider = this.UpdateProvider.bind(this); this.DeleteProvider = this.DeleteProvider.bind(this); } - CreateProvider( - request: MsgCreateProvider - ): Promise { + CreateProvider(request: MsgCreateProvider): Promise { const data = MsgCreateProvider.encode(request).finish(); - const promise = this.rpc.request( - "akash.provider.v1beta2.Msg", - "CreateProvider", - data - ); - return promise.then((data) => - MsgCreateProviderResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.provider.v1beta2.Msg", "CreateProvider", data); + return promise.then(data => MsgCreateProviderResponse.decode(new _m0.Reader(data))); } - UpdateProvider( - request: MsgUpdateProvider - ): Promise { + UpdateProvider(request: MsgUpdateProvider): Promise { const data = MsgUpdateProvider.encode(request).finish(); - const promise = this.rpc.request( - "akash.provider.v1beta2.Msg", - "UpdateProvider", - data - ); - return promise.then((data) => - MsgUpdateProviderResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.provider.v1beta2.Msg", "UpdateProvider", data); + return promise.then(data => MsgUpdateProviderResponse.decode(new _m0.Reader(data))); } - DeleteProvider( - request: MsgDeleteProvider - ): Promise { + DeleteProvider(request: MsgDeleteProvider): Promise { const data = MsgDeleteProvider.encode(request).finish(); - const promise = this.rpc.request( - "akash.provider.v1beta2.Msg", - "DeleteProvider", - data - ); - return promise.then((data) => - MsgDeleteProviderResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.provider.v1beta2.Msg", "DeleteProvider", data); + return promise.then(data => MsgDeleteProviderResponse.decode(new _m0.Reader(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/provider/v1beta2/query.ts b/src/protobuf/akash/provider/v1beta2/query.ts index a041139..6984847 100644 --- a/src/protobuf/akash/provider/v1beta2/query.ts +++ b/src/protobuf/akash/provider/v1beta2/query.ts @@ -1,10 +1,7 @@ /* eslint-disable */ import { messageTypeRegistry } from "../../../typeRegistry"; import Long from "long"; -import { - PageRequest, - PageResponse, -} from "../../../cosmos/base/query/v1beta1/pagination"; +import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; import { Provider } from "./provider"; import * as _m0 from "protobufjs/minimal"; @@ -38,27 +35,21 @@ export interface QueryProviderResponse { function createBaseQueryProvidersRequest(): QueryProvidersRequest { return { $type: "akash.provider.v1beta2.QueryProvidersRequest", - pagination: undefined, + pagination: undefined }; } export const QueryProvidersRequest = { $type: "akash.provider.v1beta2.QueryProvidersRequest" as const, - encode( - message: QueryProvidersRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryProvidersRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.pagination !== undefined) { PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryProvidersRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryProvidersRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryProvidersRequest(); @@ -79,31 +70,21 @@ export const QueryProvidersRequest = { fromJSON(object: any): QueryProvidersRequest { return { $type: QueryProvidersRequest.$type, - pagination: isSet(object.pagination) - ? PageRequest.fromJSON(object.pagination) - : undefined, + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined }; }, toJSON(message: QueryProvidersRequest): unknown { const obj: any = {}; - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryProvidersRequest { + fromPartial, I>>(object: I): QueryProvidersRequest { const message = createBaseQueryProvidersRequest(); - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryProvidersRequest.$type, QueryProvidersRequest); @@ -112,33 +93,24 @@ function createBaseQueryProvidersResponse(): QueryProvidersResponse { return { $type: "akash.provider.v1beta2.QueryProvidersResponse", providers: [], - pagination: undefined, + pagination: undefined }; } export const QueryProvidersResponse = { $type: "akash.provider.v1beta2.QueryProvidersResponse" as const, - encode( - message: QueryProvidersResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryProvidersResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.providers) { Provider.encode(v!, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); + PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryProvidersResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryProvidersResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryProvidersResponse(); @@ -162,43 +134,28 @@ export const QueryProvidersResponse = { fromJSON(object: any): QueryProvidersResponse { return { $type: QueryProvidersResponse.$type, - providers: Array.isArray(object?.providers) - ? object.providers.map((e: any) => Provider.fromJSON(e)) - : [], - pagination: isSet(object.pagination) - ? PageResponse.fromJSON(object.pagination) - : undefined, + providers: Array.isArray(object?.providers) ? object.providers.map((e: any) => Provider.fromJSON(e)) : [], + pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined }; }, toJSON(message: QueryProvidersResponse): unknown { const obj: any = {}; if (message.providers) { - obj.providers = message.providers.map((e) => - e ? Provider.toJSON(e) : undefined - ); + obj.providers = message.providers.map(e => (e ? Provider.toJSON(e) : undefined)); } else { obj.providers = []; } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryProvidersResponse { + fromPartial, I>>(object: I): QueryProvidersResponse { const message = createBaseQueryProvidersResponse(); - message.providers = - object.providers?.map((e) => Provider.fromPartial(e)) || []; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageResponse.fromPartial(object.pagination) - : undefined; + message.providers = object.providers?.map(e => Provider.fromPartial(e)) || []; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryProvidersResponse.$type, QueryProvidersResponse); @@ -210,20 +167,14 @@ function createBaseQueryProviderRequest(): QueryProviderRequest { export const QueryProviderRequest = { $type: "akash.provider.v1beta2.QueryProviderRequest" as const, - encode( - message: QueryProviderRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryProviderRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryProviderRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryProviderRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryProviderRequest(); @@ -244,7 +195,7 @@ export const QueryProviderRequest = { fromJSON(object: any): QueryProviderRequest { return { $type: QueryProviderRequest.$type, - owner: isSet(object.owner) ? String(object.owner) : "", + owner: isSet(object.owner) ? String(object.owner) : "" }; }, @@ -254,13 +205,11 @@ export const QueryProviderRequest = { return obj; }, - fromPartial, I>>( - object: I - ): QueryProviderRequest { + fromPartial, I>>(object: I): QueryProviderRequest { const message = createBaseQueryProviderRequest(); message.owner = object.owner ?? ""; return message; - }, + } }; messageTypeRegistry.set(QueryProviderRequest.$type, QueryProviderRequest); @@ -268,27 +217,21 @@ messageTypeRegistry.set(QueryProviderRequest.$type, QueryProviderRequest); function createBaseQueryProviderResponse(): QueryProviderResponse { return { $type: "akash.provider.v1beta2.QueryProviderResponse", - provider: undefined, + provider: undefined }; } export const QueryProviderResponse = { $type: "akash.provider.v1beta2.QueryProviderResponse" as const, - encode( - message: QueryProviderResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryProviderResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.provider !== undefined) { Provider.encode(message.provider, writer.uint32(10).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryProviderResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryProviderResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryProviderResponse(); @@ -309,31 +252,21 @@ export const QueryProviderResponse = { fromJSON(object: any): QueryProviderResponse { return { $type: QueryProviderResponse.$type, - provider: isSet(object.provider) - ? Provider.fromJSON(object.provider) - : undefined, + provider: isSet(object.provider) ? Provider.fromJSON(object.provider) : undefined }; }, toJSON(message: QueryProviderResponse): unknown { const obj: any = {}; - message.provider !== undefined && - (obj.provider = message.provider - ? Provider.toJSON(message.provider) - : undefined); + message.provider !== undefined && (obj.provider = message.provider ? Provider.toJSON(message.provider) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryProviderResponse { + fromPartial, I>>(object: I): QueryProviderResponse { const message = createBaseQueryProviderResponse(); - message.provider = - object.provider !== undefined && object.provider !== null - ? Provider.fromPartial(object.provider) - : undefined; + message.provider = object.provider !== undefined && object.provider !== null ? Provider.fromPartial(object.provider) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryProviderResponse.$type, QueryProviderResponse); @@ -355,65 +288,39 @@ export class QueryClientImpl implements Query { } Providers(request: QueryProvidersRequest): Promise { const data = QueryProvidersRequest.encode(request).finish(); - const promise = this.rpc.request( - "akash.provider.v1beta2.Query", - "Providers", - data - ); - return promise.then((data) => - QueryProvidersResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.provider.v1beta2.Query", "Providers", data); + return promise.then(data => QueryProvidersResponse.decode(new _m0.Reader(data))); } Provider(request: QueryProviderRequest): Promise { const data = QueryProviderRequest.encode(request).finish(); - const promise = this.rpc.request( - "akash.provider.v1beta2.Query", - "Provider", - data - ); - return promise.then((data) => - QueryProviderResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.provider.v1beta2.Query", "Provider", data); + return promise.then(data => QueryProviderResponse.decode(new _m0.Reader(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/provider/v1beta3/genesis.ts b/src/protobuf/akash/provider/v1beta3/genesis.ts index eee67bd..f11b227 100644 --- a/src/protobuf/akash/provider/v1beta3/genesis.ts +++ b/src/protobuf/akash/provider/v1beta3/genesis.ts @@ -19,10 +19,7 @@ function createBaseGenesisState(): GenesisState { export const GenesisState = { $type: "akash.provider.v1beta3.GenesisState" as const, - encode( - message: GenesisState, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: GenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.providers) { Provider.encode(v!, writer.uint32(10).fork()).ldelim(); } @@ -50,64 +47,47 @@ export const GenesisState = { fromJSON(object: any): GenesisState { return { $type: GenesisState.$type, - providers: Array.isArray(object?.providers) - ? object.providers.map((e: any) => Provider.fromJSON(e)) - : [], + providers: Array.isArray(object?.providers) ? object.providers.map((e: any) => Provider.fromJSON(e)) : [] }; }, toJSON(message: GenesisState): unknown { const obj: any = {}; if (message.providers) { - obj.providers = message.providers.map((e) => - e ? Provider.toJSON(e) : undefined - ); + obj.providers = message.providers.map(e => (e ? Provider.toJSON(e) : undefined)); } else { obj.providers = []; } return obj; }, - fromPartial, I>>( - object: I - ): GenesisState { + fromPartial, I>>(object: I): GenesisState { const message = createBaseGenesisState(); - message.providers = - object.providers?.map((e) => Provider.fromPartial(e)) || []; + message.providers = object.providers?.map(e => Provider.fromPartial(e)) || []; return message; - }, + } }; messageTypeRegistry.set(GenesisState.$type, GenesisState); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/provider/v1beta3/provider.ts b/src/protobuf/akash/provider/v1beta3/provider.ts index 4f578c0..1a15719 100644 --- a/src/protobuf/akash/provider/v1beta3/provider.ts +++ b/src/protobuf/akash/provider/v1beta3/provider.ts @@ -65,17 +65,14 @@ function createBaseProviderInfo(): ProviderInfo { return { $type: "akash.provider.v1beta3.ProviderInfo", email: "", - website: "", + website: "" }; } export const ProviderInfo = { $type: "akash.provider.v1beta3.ProviderInfo" as const, - encode( - message: ProviderInfo, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: ProviderInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.email !== "") { writer.uint32(10).string(message.email); } @@ -110,7 +107,7 @@ export const ProviderInfo = { return { $type: ProviderInfo.$type, email: isSet(object.email) ? String(object.email) : "", - website: isSet(object.website) ? String(object.website) : "", + website: isSet(object.website) ? String(object.website) : "" }; }, @@ -121,14 +118,12 @@ export const ProviderInfo = { return obj; }, - fromPartial, I>>( - object: I - ): ProviderInfo { + fromPartial, I>>(object: I): ProviderInfo { const message = createBaseProviderInfo(); message.email = object.email ?? ""; message.website = object.website ?? ""; return message; - }, + } }; messageTypeRegistry.set(ProviderInfo.$type, ProviderInfo); @@ -139,17 +134,14 @@ function createBaseMsgCreateProvider(): MsgCreateProvider { owner: "", hostUri: "", attributes: [], - info: undefined, + info: undefined }; } export const MsgCreateProvider = { $type: "akash.provider.v1beta3.MsgCreateProvider" as const, - encode( - message: MsgCreateProvider, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MsgCreateProvider, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -197,10 +189,8 @@ export const MsgCreateProvider = { $type: MsgCreateProvider.$type, owner: isSet(object.owner) ? String(object.owner) : "", hostUri: isSet(object.hostUri) ? String(object.hostUri) : "", - attributes: Array.isArray(object?.attributes) - ? object.attributes.map((e: any) => Attribute.fromJSON(e)) - : [], - info: isSet(object.info) ? ProviderInfo.fromJSON(object.info) : undefined, + attributes: Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromJSON(e)) : [], + info: isSet(object.info) ? ProviderInfo.fromJSON(object.info) : undefined }; }, @@ -209,31 +199,22 @@ export const MsgCreateProvider = { message.owner !== undefined && (obj.owner = message.owner); message.hostUri !== undefined && (obj.hostUri = message.hostUri); if (message.attributes) { - obj.attributes = message.attributes.map((e) => - e ? Attribute.toJSON(e) : undefined - ); + obj.attributes = message.attributes.map(e => (e ? Attribute.toJSON(e) : undefined)); } else { obj.attributes = []; } - message.info !== undefined && - (obj.info = message.info ? ProviderInfo.toJSON(message.info) : undefined); + message.info !== undefined && (obj.info = message.info ? ProviderInfo.toJSON(message.info) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): MsgCreateProvider { + fromPartial, I>>(object: I): MsgCreateProvider { const message = createBaseMsgCreateProvider(); message.owner = object.owner ?? ""; message.hostUri = object.hostUri ?? ""; - message.attributes = - object.attributes?.map((e) => Attribute.fromPartial(e)) || []; - message.info = - object.info !== undefined && object.info !== null - ? ProviderInfo.fromPartial(object.info) - : undefined; + message.attributes = object.attributes?.map(e => Attribute.fromPartial(e)) || []; + message.info = object.info !== undefined && object.info !== null ? ProviderInfo.fromPartial(object.info) : undefined; return message; - }, + } }; messageTypeRegistry.set(MsgCreateProvider.$type, MsgCreateProvider); @@ -245,17 +226,11 @@ function createBaseMsgCreateProviderResponse(): MsgCreateProviderResponse { export const MsgCreateProviderResponse = { $type: "akash.provider.v1beta3.MsgCreateProviderResponse" as const, - encode( - _: MsgCreateProviderResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: MsgCreateProviderResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgCreateProviderResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreateProviderResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCreateProviderResponse(); @@ -272,7 +247,7 @@ export const MsgCreateProviderResponse = { fromJSON(_: any): MsgCreateProviderResponse { return { - $type: MsgCreateProviderResponse.$type, + $type: MsgCreateProviderResponse.$type }; }, @@ -281,18 +256,13 @@ export const MsgCreateProviderResponse = { return obj; }, - fromPartial, I>>( - _: I - ): MsgCreateProviderResponse { + fromPartial, I>>(_: I): MsgCreateProviderResponse { const message = createBaseMsgCreateProviderResponse(); return message; - }, + } }; -messageTypeRegistry.set( - MsgCreateProviderResponse.$type, - MsgCreateProviderResponse -); +messageTypeRegistry.set(MsgCreateProviderResponse.$type, MsgCreateProviderResponse); function createBaseMsgUpdateProvider(): MsgUpdateProvider { return { @@ -300,17 +270,14 @@ function createBaseMsgUpdateProvider(): MsgUpdateProvider { owner: "", hostUri: "", attributes: [], - info: undefined, + info: undefined }; } export const MsgUpdateProvider = { $type: "akash.provider.v1beta3.MsgUpdateProvider" as const, - encode( - message: MsgUpdateProvider, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MsgUpdateProvider, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -358,10 +325,8 @@ export const MsgUpdateProvider = { $type: MsgUpdateProvider.$type, owner: isSet(object.owner) ? String(object.owner) : "", hostUri: isSet(object.hostUri) ? String(object.hostUri) : "", - attributes: Array.isArray(object?.attributes) - ? object.attributes.map((e: any) => Attribute.fromJSON(e)) - : [], - info: isSet(object.info) ? ProviderInfo.fromJSON(object.info) : undefined, + attributes: Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromJSON(e)) : [], + info: isSet(object.info) ? ProviderInfo.fromJSON(object.info) : undefined }; }, @@ -370,31 +335,22 @@ export const MsgUpdateProvider = { message.owner !== undefined && (obj.owner = message.owner); message.hostUri !== undefined && (obj.hostUri = message.hostUri); if (message.attributes) { - obj.attributes = message.attributes.map((e) => - e ? Attribute.toJSON(e) : undefined - ); + obj.attributes = message.attributes.map(e => (e ? Attribute.toJSON(e) : undefined)); } else { obj.attributes = []; } - message.info !== undefined && - (obj.info = message.info ? ProviderInfo.toJSON(message.info) : undefined); + message.info !== undefined && (obj.info = message.info ? ProviderInfo.toJSON(message.info) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): MsgUpdateProvider { + fromPartial, I>>(object: I): MsgUpdateProvider { const message = createBaseMsgUpdateProvider(); message.owner = object.owner ?? ""; message.hostUri = object.hostUri ?? ""; - message.attributes = - object.attributes?.map((e) => Attribute.fromPartial(e)) || []; - message.info = - object.info !== undefined && object.info !== null - ? ProviderInfo.fromPartial(object.info) - : undefined; + message.attributes = object.attributes?.map(e => Attribute.fromPartial(e)) || []; + message.info = object.info !== undefined && object.info !== null ? ProviderInfo.fromPartial(object.info) : undefined; return message; - }, + } }; messageTypeRegistry.set(MsgUpdateProvider.$type, MsgUpdateProvider); @@ -406,17 +362,11 @@ function createBaseMsgUpdateProviderResponse(): MsgUpdateProviderResponse { export const MsgUpdateProviderResponse = { $type: "akash.provider.v1beta3.MsgUpdateProviderResponse" as const, - encode( - _: MsgUpdateProviderResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: MsgUpdateProviderResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgUpdateProviderResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgUpdateProviderResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgUpdateProviderResponse(); @@ -433,7 +383,7 @@ export const MsgUpdateProviderResponse = { fromJSON(_: any): MsgUpdateProviderResponse { return { - $type: MsgUpdateProviderResponse.$type, + $type: MsgUpdateProviderResponse.$type }; }, @@ -442,18 +392,13 @@ export const MsgUpdateProviderResponse = { return obj; }, - fromPartial, I>>( - _: I - ): MsgUpdateProviderResponse { + fromPartial, I>>(_: I): MsgUpdateProviderResponse { const message = createBaseMsgUpdateProviderResponse(); return message; - }, + } }; -messageTypeRegistry.set( - MsgUpdateProviderResponse.$type, - MsgUpdateProviderResponse -); +messageTypeRegistry.set(MsgUpdateProviderResponse.$type, MsgUpdateProviderResponse); function createBaseMsgDeleteProvider(): MsgDeleteProvider { return { $type: "akash.provider.v1beta3.MsgDeleteProvider", owner: "" }; @@ -462,10 +407,7 @@ function createBaseMsgDeleteProvider(): MsgDeleteProvider { export const MsgDeleteProvider = { $type: "akash.provider.v1beta3.MsgDeleteProvider" as const, - encode( - message: MsgDeleteProvider, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MsgDeleteProvider, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -493,7 +435,7 @@ export const MsgDeleteProvider = { fromJSON(object: any): MsgDeleteProvider { return { $type: MsgDeleteProvider.$type, - owner: isSet(object.owner) ? String(object.owner) : "", + owner: isSet(object.owner) ? String(object.owner) : "" }; }, @@ -503,13 +445,11 @@ export const MsgDeleteProvider = { return obj; }, - fromPartial, I>>( - object: I - ): MsgDeleteProvider { + fromPartial, I>>(object: I): MsgDeleteProvider { const message = createBaseMsgDeleteProvider(); message.owner = object.owner ?? ""; return message; - }, + } }; messageTypeRegistry.set(MsgDeleteProvider.$type, MsgDeleteProvider); @@ -521,17 +461,11 @@ function createBaseMsgDeleteProviderResponse(): MsgDeleteProviderResponse { export const MsgDeleteProviderResponse = { $type: "akash.provider.v1beta3.MsgDeleteProviderResponse" as const, - encode( - _: MsgDeleteProviderResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: MsgDeleteProviderResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MsgDeleteProviderResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): MsgDeleteProviderResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgDeleteProviderResponse(); @@ -548,7 +482,7 @@ export const MsgDeleteProviderResponse = { fromJSON(_: any): MsgDeleteProviderResponse { return { - $type: MsgDeleteProviderResponse.$type, + $type: MsgDeleteProviderResponse.$type }; }, @@ -557,18 +491,13 @@ export const MsgDeleteProviderResponse = { return obj; }, - fromPartial, I>>( - _: I - ): MsgDeleteProviderResponse { + fromPartial, I>>(_: I): MsgDeleteProviderResponse { const message = createBaseMsgDeleteProviderResponse(); return message; - }, + } }; -messageTypeRegistry.set( - MsgDeleteProviderResponse.$type, - MsgDeleteProviderResponse -); +messageTypeRegistry.set(MsgDeleteProviderResponse.$type, MsgDeleteProviderResponse); function createBaseProvider(): Provider { return { @@ -576,17 +505,14 @@ function createBaseProvider(): Provider { owner: "", hostUri: "", attributes: [], - info: undefined, + info: undefined }; } export const Provider = { $type: "akash.provider.v1beta3.Provider" as const, - encode( - message: Provider, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Provider, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } @@ -634,10 +560,8 @@ export const Provider = { $type: Provider.$type, owner: isSet(object.owner) ? String(object.owner) : "", hostUri: isSet(object.hostUri) ? String(object.hostUri) : "", - attributes: Array.isArray(object?.attributes) - ? object.attributes.map((e: any) => Attribute.fromJSON(e)) - : [], - info: isSet(object.info) ? ProviderInfo.fromJSON(object.info) : undefined, + attributes: Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromJSON(e)) : [], + info: isSet(object.info) ? ProviderInfo.fromJSON(object.info) : undefined }; }, @@ -646,14 +570,11 @@ export const Provider = { message.owner !== undefined && (obj.owner = message.owner); message.hostUri !== undefined && (obj.hostUri = message.hostUri); if (message.attributes) { - obj.attributes = message.attributes.map((e) => - e ? Attribute.toJSON(e) : undefined - ); + obj.attributes = message.attributes.map(e => (e ? Attribute.toJSON(e) : undefined)); } else { obj.attributes = []; } - message.info !== undefined && - (obj.info = message.info ? ProviderInfo.toJSON(message.info) : undefined); + message.info !== undefined && (obj.info = message.info ? ProviderInfo.toJSON(message.info) : undefined); return obj; }, @@ -661,14 +582,10 @@ export const Provider = { const message = createBaseProvider(); message.owner = object.owner ?? ""; message.hostUri = object.hostUri ?? ""; - message.attributes = - object.attributes?.map((e) => Attribute.fromPartial(e)) || []; - message.info = - object.info !== undefined && object.info !== null - ? ProviderInfo.fromPartial(object.info) - : undefined; + message.attributes = object.attributes?.map(e => Attribute.fromPartial(e)) || []; + message.info = object.info !== undefined && object.info !== null ? ProviderInfo.fromPartial(object.info) : undefined; return message; - }, + } }; messageTypeRegistry.set(Provider.$type, Provider); @@ -676,17 +593,11 @@ messageTypeRegistry.set(Provider.$type, Provider); /** Msg defines the provider Msg service */ export interface Msg { /** CreateProvider defines a method that creates a provider given the proper inputs */ - CreateProvider( - request: MsgCreateProvider - ): Promise; + CreateProvider(request: MsgCreateProvider): Promise; /** UpdateProvider defines a method that updates a provider given the proper inputs */ - UpdateProvider( - request: MsgUpdateProvider - ): Promise; + UpdateProvider(request: MsgUpdateProvider): Promise; /** DeleteProvider defines a method that deletes a provider given the proper inputs */ - DeleteProvider( - request: MsgDeleteProvider - ): Promise; + DeleteProvider(request: MsgDeleteProvider): Promise; } export class MsgClientImpl implements Msg { @@ -697,85 +608,47 @@ export class MsgClientImpl implements Msg { this.UpdateProvider = this.UpdateProvider.bind(this); this.DeleteProvider = this.DeleteProvider.bind(this); } - CreateProvider( - request: MsgCreateProvider - ): Promise { + CreateProvider(request: MsgCreateProvider): Promise { const data = MsgCreateProvider.encode(request).finish(); - const promise = this.rpc.request( - "akash.provider.v1beta3.Msg", - "CreateProvider", - data - ); - return promise.then((data) => - MsgCreateProviderResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.provider.v1beta3.Msg", "CreateProvider", data); + return promise.then(data => MsgCreateProviderResponse.decode(new _m0.Reader(data))); } - UpdateProvider( - request: MsgUpdateProvider - ): Promise { + UpdateProvider(request: MsgUpdateProvider): Promise { const data = MsgUpdateProvider.encode(request).finish(); - const promise = this.rpc.request( - "akash.provider.v1beta3.Msg", - "UpdateProvider", - data - ); - return promise.then((data) => - MsgUpdateProviderResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.provider.v1beta3.Msg", "UpdateProvider", data); + return promise.then(data => MsgUpdateProviderResponse.decode(new _m0.Reader(data))); } - DeleteProvider( - request: MsgDeleteProvider - ): Promise { + DeleteProvider(request: MsgDeleteProvider): Promise { const data = MsgDeleteProvider.encode(request).finish(); - const promise = this.rpc.request( - "akash.provider.v1beta3.Msg", - "DeleteProvider", - data - ); - return promise.then((data) => - MsgDeleteProviderResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.provider.v1beta3.Msg", "DeleteProvider", data); + return promise.then(data => MsgDeleteProviderResponse.decode(new _m0.Reader(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/provider/v1beta3/query.ts b/src/protobuf/akash/provider/v1beta3/query.ts index 576227d..3630d3b 100644 --- a/src/protobuf/akash/provider/v1beta3/query.ts +++ b/src/protobuf/akash/provider/v1beta3/query.ts @@ -1,10 +1,7 @@ /* eslint-disable */ import { messageTypeRegistry } from "../../../typeRegistry"; import Long from "long"; -import { - PageRequest, - PageResponse, -} from "../../../cosmos/base/query/v1beta1/pagination"; +import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; import { Provider } from "./provider"; import * as _m0 from "protobufjs/minimal"; @@ -38,27 +35,21 @@ export interface QueryProviderResponse { function createBaseQueryProvidersRequest(): QueryProvidersRequest { return { $type: "akash.provider.v1beta3.QueryProvidersRequest", - pagination: undefined, + pagination: undefined }; } export const QueryProvidersRequest = { $type: "akash.provider.v1beta3.QueryProvidersRequest" as const, - encode( - message: QueryProvidersRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryProvidersRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.pagination !== undefined) { PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryProvidersRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryProvidersRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryProvidersRequest(); @@ -79,31 +70,21 @@ export const QueryProvidersRequest = { fromJSON(object: any): QueryProvidersRequest { return { $type: QueryProvidersRequest.$type, - pagination: isSet(object.pagination) - ? PageRequest.fromJSON(object.pagination) - : undefined, + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined }; }, toJSON(message: QueryProvidersRequest): unknown { const obj: any = {}; - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageRequest.toJSON(message.pagination) - : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryProvidersRequest { + fromPartial, I>>(object: I): QueryProvidersRequest { const message = createBaseQueryProvidersRequest(); - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryProvidersRequest.$type, QueryProvidersRequest); @@ -112,33 +93,24 @@ function createBaseQueryProvidersResponse(): QueryProvidersResponse { return { $type: "akash.provider.v1beta3.QueryProvidersResponse", providers: [], - pagination: undefined, + pagination: undefined }; } export const QueryProvidersResponse = { $type: "akash.provider.v1beta3.QueryProvidersResponse" as const, - encode( - message: QueryProvidersResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryProvidersResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.providers) { Provider.encode(v!, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork() - ).ldelim(); + PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryProvidersResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryProvidersResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryProvidersResponse(); @@ -162,43 +134,28 @@ export const QueryProvidersResponse = { fromJSON(object: any): QueryProvidersResponse { return { $type: QueryProvidersResponse.$type, - providers: Array.isArray(object?.providers) - ? object.providers.map((e: any) => Provider.fromJSON(e)) - : [], - pagination: isSet(object.pagination) - ? PageResponse.fromJSON(object.pagination) - : undefined, + providers: Array.isArray(object?.providers) ? object.providers.map((e: any) => Provider.fromJSON(e)) : [], + pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined }; }, toJSON(message: QueryProvidersResponse): unknown { const obj: any = {}; if (message.providers) { - obj.providers = message.providers.map((e) => - e ? Provider.toJSON(e) : undefined - ); + obj.providers = message.providers.map(e => (e ? Provider.toJSON(e) : undefined)); } else { obj.providers = []; } - message.pagination !== undefined && - (obj.pagination = message.pagination - ? PageResponse.toJSON(message.pagination) - : undefined); + message.pagination !== undefined && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryProvidersResponse { + fromPartial, I>>(object: I): QueryProvidersResponse { const message = createBaseQueryProvidersResponse(); - message.providers = - object.providers?.map((e) => Provider.fromPartial(e)) || []; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageResponse.fromPartial(object.pagination) - : undefined; + message.providers = object.providers?.map(e => Provider.fromPartial(e)) || []; + message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryProvidersResponse.$type, QueryProvidersResponse); @@ -210,20 +167,14 @@ function createBaseQueryProviderRequest(): QueryProviderRequest { export const QueryProviderRequest = { $type: "akash.provider.v1beta3.QueryProviderRequest" as const, - encode( - message: QueryProviderRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryProviderRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.owner !== "") { writer.uint32(10).string(message.owner); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryProviderRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryProviderRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryProviderRequest(); @@ -244,7 +195,7 @@ export const QueryProviderRequest = { fromJSON(object: any): QueryProviderRequest { return { $type: QueryProviderRequest.$type, - owner: isSet(object.owner) ? String(object.owner) : "", + owner: isSet(object.owner) ? String(object.owner) : "" }; }, @@ -254,13 +205,11 @@ export const QueryProviderRequest = { return obj; }, - fromPartial, I>>( - object: I - ): QueryProviderRequest { + fromPartial, I>>(object: I): QueryProviderRequest { const message = createBaseQueryProviderRequest(); message.owner = object.owner ?? ""; return message; - }, + } }; messageTypeRegistry.set(QueryProviderRequest.$type, QueryProviderRequest); @@ -268,27 +217,21 @@ messageTypeRegistry.set(QueryProviderRequest.$type, QueryProviderRequest); function createBaseQueryProviderResponse(): QueryProviderResponse { return { $type: "akash.provider.v1beta3.QueryProviderResponse", - provider: undefined, + provider: undefined }; } export const QueryProviderResponse = { $type: "akash.provider.v1beta3.QueryProviderResponse" as const, - encode( - message: QueryProviderResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: QueryProviderResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.provider !== undefined) { Provider.encode(message.provider, writer.uint32(10).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): QueryProviderResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): QueryProviderResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryProviderResponse(); @@ -309,31 +252,21 @@ export const QueryProviderResponse = { fromJSON(object: any): QueryProviderResponse { return { $type: QueryProviderResponse.$type, - provider: isSet(object.provider) - ? Provider.fromJSON(object.provider) - : undefined, + provider: isSet(object.provider) ? Provider.fromJSON(object.provider) : undefined }; }, toJSON(message: QueryProviderResponse): unknown { const obj: any = {}; - message.provider !== undefined && - (obj.provider = message.provider - ? Provider.toJSON(message.provider) - : undefined); + message.provider !== undefined && (obj.provider = message.provider ? Provider.toJSON(message.provider) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): QueryProviderResponse { + fromPartial, I>>(object: I): QueryProviderResponse { const message = createBaseQueryProviderResponse(); - message.provider = - object.provider !== undefined && object.provider !== null - ? Provider.fromPartial(object.provider) - : undefined; + message.provider = object.provider !== undefined && object.provider !== null ? Provider.fromPartial(object.provider) : undefined; return message; - }, + } }; messageTypeRegistry.set(QueryProviderResponse.$type, QueryProviderResponse); @@ -355,65 +288,39 @@ export class QueryClientImpl implements Query { } Providers(request: QueryProvidersRequest): Promise { const data = QueryProvidersRequest.encode(request).finish(); - const promise = this.rpc.request( - "akash.provider.v1beta3.Query", - "Providers", - data - ); - return promise.then((data) => - QueryProvidersResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.provider.v1beta3.Query", "Providers", data); + return promise.then(data => QueryProvidersResponse.decode(new _m0.Reader(data))); } Provider(request: QueryProviderRequest): Promise { const data = QueryProviderRequest.encode(request).finish(); - const promise = this.rpc.request( - "akash.provider.v1beta3.Query", - "Provider", - data - ); - return promise.then((data) => - QueryProviderResponse.decode(new _m0.Reader(data)) - ); + const promise = this.rpc.request("akash.provider.v1beta3.Query", "Provider", data); + return promise.then(data => QueryProviderResponse.decode(new _m0.Reader(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/staking/v1beta3/genesis.ts b/src/protobuf/akash/staking/v1beta3/genesis.ts index 1079008..867eb28 100644 --- a/src/protobuf/akash/staking/v1beta3/genesis.ts +++ b/src/protobuf/akash/staking/v1beta3/genesis.ts @@ -19,10 +19,7 @@ function createBaseGenesisState(): GenesisState { export const GenesisState = { $type: "akash.staking.v1beta3.GenesisState" as const, - encode( - message: GenesisState, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: GenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.params !== undefined) { Params.encode(message.params, writer.uint32(10).fork()).ldelim(); } @@ -50,59 +47,43 @@ export const GenesisState = { fromJSON(object: any): GenesisState { return { $type: GenesisState.$type, - params: isSet(object.params) ? Params.fromJSON(object.params) : undefined, + params: isSet(object.params) ? Params.fromJSON(object.params) : undefined }; }, toJSON(message: GenesisState): unknown { const obj: any = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); + message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): GenesisState { + fromPartial, I>>(object: I): GenesisState { const message = createBaseGenesisState(); - message.params = - object.params !== undefined && object.params !== null - ? Params.fromPartial(object.params) - : undefined; + message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; return message; - }, + } }; messageTypeRegistry.set(GenesisState.$type, GenesisState); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/staking/v1beta3/params.ts b/src/protobuf/akash/staking/v1beta3/params.ts index 2aa2b96..d7034bb 100644 --- a/src/protobuf/akash/staking/v1beta3/params.ts +++ b/src/protobuf/akash/staking/v1beta3/params.ts @@ -19,10 +19,7 @@ function createBaseParams(): Params { export const Params = { $type: "akash.staking.v1beta3.Params" as const, - encode( - message: Params, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Params, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.minCommissionRate !== "") { writer.uint32(10).string(message.minCommissionRate); } @@ -50,16 +47,13 @@ export const Params = { fromJSON(object: any): Params { return { $type: Params.$type, - minCommissionRate: isSet(object.minCommissionRate) - ? String(object.minCommissionRate) - : "", + minCommissionRate: isSet(object.minCommissionRate) ? String(object.minCommissionRate) : "" }; }, toJSON(message: Params): unknown { const obj: any = {}; - message.minCommissionRate !== undefined && - (obj.minCommissionRate = message.minCommissionRate); + message.minCommissionRate !== undefined && (obj.minCommissionRate = message.minCommissionRate); return obj; }, @@ -67,39 +61,29 @@ export const Params = { const message = createBaseParams(); message.minCommissionRate = object.minCommissionRate ?? ""; return message; - }, + } }; messageTypeRegistry.set(Params.$type, Params); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/take/v1beta3/genesis.ts b/src/protobuf/akash/take/v1beta3/genesis.ts index 1a2ec57..67404da 100644 --- a/src/protobuf/akash/take/v1beta3/genesis.ts +++ b/src/protobuf/akash/take/v1beta3/genesis.ts @@ -19,10 +19,7 @@ function createBaseGenesisState(): GenesisState { export const GenesisState = { $type: "akash.take.v1beta3.GenesisState" as const, - encode( - message: GenesisState, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: GenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.params !== undefined) { Params.encode(message.params, writer.uint32(10).fork()).ldelim(); } @@ -50,59 +47,43 @@ export const GenesisState = { fromJSON(object: any): GenesisState { return { $type: GenesisState.$type, - params: isSet(object.params) ? Params.fromJSON(object.params) : undefined, + params: isSet(object.params) ? Params.fromJSON(object.params) : undefined }; }, toJSON(message: GenesisState): unknown { const obj: any = {}; - message.params !== undefined && - (obj.params = message.params ? Params.toJSON(message.params) : undefined); + message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): GenesisState { + fromPartial, I>>(object: I): GenesisState { const message = createBaseGenesisState(); - message.params = - object.params !== undefined && object.params !== null - ? Params.fromPartial(object.params) - : undefined; + message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined; return message; - }, + } }; messageTypeRegistry.set(GenesisState.$type, GenesisState); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/take/v1beta3/params.ts b/src/protobuf/akash/take/v1beta3/params.ts index 14e51d4..f129c2c 100644 --- a/src/protobuf/akash/take/v1beta3/params.ts +++ b/src/protobuf/akash/take/v1beta3/params.ts @@ -27,10 +27,7 @@ function createBaseDenomTakeRate(): DenomTakeRate { export const DenomTakeRate = { $type: "akash.take.v1beta3.DenomTakeRate" as const, - encode( - message: DenomTakeRate, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: DenomTakeRate, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.denom !== "") { writer.uint32(10).string(message.denom); } @@ -65,7 +62,7 @@ export const DenomTakeRate = { return { $type: DenomTakeRate.$type, denom: isSet(object.denom) ? String(object.denom) : "", - rate: isSet(object.rate) ? Number(object.rate) : 0, + rate: isSet(object.rate) ? Number(object.rate) : 0 }; }, @@ -76,14 +73,12 @@ export const DenomTakeRate = { return obj; }, - fromPartial, I>>( - object: I - ): DenomTakeRate { + fromPartial, I>>(object: I): DenomTakeRate { const message = createBaseDenomTakeRate(); message.denom = object.denom ?? ""; message.rate = object.rate ?? 0; return message; - }, + } }; messageTypeRegistry.set(DenomTakeRate.$type, DenomTakeRate); @@ -92,17 +87,14 @@ function createBaseParams(): Params { return { $type: "akash.take.v1beta3.Params", denomTakeRates: [], - defaultTakeRate: 0, + defaultTakeRate: 0 }; } export const Params = { $type: "akash.take.v1beta3.Params" as const, - encode( - message: Params, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Params, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.denomTakeRates) { DenomTakeRate.encode(v!, writer.uint32(10).fork()).ldelim(); } @@ -120,9 +112,7 @@ export const Params = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.denomTakeRates.push( - DenomTakeRate.decode(reader, reader.uint32()) - ); + message.denomTakeRates.push(DenomTakeRate.decode(reader, reader.uint32())); break; case 2: message.defaultTakeRate = reader.uint32(); @@ -138,68 +128,50 @@ export const Params = { fromJSON(object: any): Params { return { $type: Params.$type, - denomTakeRates: Array.isArray(object?.denomTakeRates) - ? object.denomTakeRates.map((e: any) => DenomTakeRate.fromJSON(e)) - : [], - defaultTakeRate: isSet(object.defaultTakeRate) - ? Number(object.defaultTakeRate) - : 0, + denomTakeRates: Array.isArray(object?.denomTakeRates) ? object.denomTakeRates.map((e: any) => DenomTakeRate.fromJSON(e)) : [], + defaultTakeRate: isSet(object.defaultTakeRate) ? Number(object.defaultTakeRate) : 0 }; }, toJSON(message: Params): unknown { const obj: any = {}; if (message.denomTakeRates) { - obj.denomTakeRates = message.denomTakeRates.map((e) => - e ? DenomTakeRate.toJSON(e) : undefined - ); + obj.denomTakeRates = message.denomTakeRates.map(e => (e ? DenomTakeRate.toJSON(e) : undefined)); } else { obj.denomTakeRates = []; } - message.defaultTakeRate !== undefined && - (obj.defaultTakeRate = Math.round(message.defaultTakeRate)); + message.defaultTakeRate !== undefined && (obj.defaultTakeRate = Math.round(message.defaultTakeRate)); return obj; }, fromPartial, I>>(object: I): Params { const message = createBaseParams(); - message.denomTakeRates = - object.denomTakeRates?.map((e) => DenomTakeRate.fromPartial(e)) || []; + message.denomTakeRates = object.denomTakeRates?.map(e => DenomTakeRate.fromPartial(e)) || []; message.defaultTakeRate = object.defaultTakeRate ?? 0; return message; - }, + } }; messageTypeRegistry.set(Params.$type, Params); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/akash/take/v1beta3/query.ts b/src/protobuf/akash/take/v1beta3/query.ts index a39cf73..fa1aa07 100644 --- a/src/protobuf/akash/take/v1beta3/query.ts +++ b/src/protobuf/akash/take/v1beta3/query.ts @@ -12,9 +12,5 @@ export class QueryClientImpl implements Query { } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } diff --git a/src/protobuf/cosmos/base/query/v1beta1/pagination.ts b/src/protobuf/cosmos/base/query/v1beta1/pagination.ts index f70f3f7..2fa5dde 100644 --- a/src/protobuf/cosmos/base/query/v1beta1/pagination.ts +++ b/src/protobuf/cosmos/base/query/v1beta1/pagination.ts @@ -78,17 +78,14 @@ function createBasePageRequest(): PageRequest { offset: Long.UZERO, limit: Long.UZERO, countTotal: false, - reverse: false, + reverse: false }; } export const PageRequest = { $type: "cosmos.base.query.v1beta1.PageRequest" as const, - encode( - message: PageRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: PageRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.key.length !== 0) { writer.uint32(10).bytes(message.key); } @@ -144,42 +141,29 @@ export const PageRequest = { offset: isSet(object.offset) ? Long.fromValue(object.offset) : Long.UZERO, limit: isSet(object.limit) ? Long.fromValue(object.limit) : Long.UZERO, countTotal: isSet(object.countTotal) ? Boolean(object.countTotal) : false, - reverse: isSet(object.reverse) ? Boolean(object.reverse) : false, + reverse: isSet(object.reverse) ? Boolean(object.reverse) : false }; }, toJSON(message: PageRequest): unknown { const obj: any = {}; - message.key !== undefined && - (obj.key = base64FromBytes( - message.key !== undefined ? message.key : new Uint8Array() - )); - message.offset !== undefined && - (obj.offset = (message.offset || Long.UZERO).toString()); - message.limit !== undefined && - (obj.limit = (message.limit || Long.UZERO).toString()); + message.key !== undefined && (obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array())); + message.offset !== undefined && (obj.offset = (message.offset || Long.UZERO).toString()); + message.limit !== undefined && (obj.limit = (message.limit || Long.UZERO).toString()); message.countTotal !== undefined && (obj.countTotal = message.countTotal); message.reverse !== undefined && (obj.reverse = message.reverse); return obj; }, - fromPartial, I>>( - object: I - ): PageRequest { + fromPartial, I>>(object: I): PageRequest { const message = createBasePageRequest(); message.key = object.key ?? new Uint8Array(); - message.offset = - object.offset !== undefined && object.offset !== null - ? Long.fromValue(object.offset) - : Long.UZERO; - message.limit = - object.limit !== undefined && object.limit !== null - ? Long.fromValue(object.limit) - : Long.UZERO; + message.offset = object.offset !== undefined && object.offset !== null ? Long.fromValue(object.offset) : Long.UZERO; + message.limit = object.limit !== undefined && object.limit !== null ? Long.fromValue(object.limit) : Long.UZERO; message.countTotal = object.countTotal ?? false; message.reverse = object.reverse ?? false; return message; - }, + } }; messageTypeRegistry.set(PageRequest.$type, PageRequest); @@ -188,17 +172,14 @@ function createBasePageResponse(): PageResponse { return { $type: "cosmos.base.query.v1beta1.PageResponse", nextKey: new Uint8Array(), - total: Long.UZERO, + total: Long.UZERO }; } export const PageResponse = { $type: "cosmos.base.query.v1beta1.PageResponse" as const, - encode( - message: PageResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: PageResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.nextKey.length !== 0) { writer.uint32(10).bytes(message.nextKey); } @@ -232,35 +213,24 @@ export const PageResponse = { fromJSON(object: any): PageResponse { return { $type: PageResponse.$type, - nextKey: isSet(object.nextKey) - ? bytesFromBase64(object.nextKey) - : new Uint8Array(), - total: isSet(object.total) ? Long.fromValue(object.total) : Long.UZERO, + nextKey: isSet(object.nextKey) ? bytesFromBase64(object.nextKey) : new Uint8Array(), + total: isSet(object.total) ? Long.fromValue(object.total) : Long.UZERO }; }, toJSON(message: PageResponse): unknown { const obj: any = {}; - message.nextKey !== undefined && - (obj.nextKey = base64FromBytes( - message.nextKey !== undefined ? message.nextKey : new Uint8Array() - )); - message.total !== undefined && - (obj.total = (message.total || Long.UZERO).toString()); + message.nextKey !== undefined && (obj.nextKey = base64FromBytes(message.nextKey !== undefined ? message.nextKey : new Uint8Array())); + message.total !== undefined && (obj.total = (message.total || Long.UZERO).toString()); return obj; }, - fromPartial, I>>( - object: I - ): PageResponse { + fromPartial, I>>(object: I): PageResponse { const message = createBasePageResponse(); message.nextKey = object.nextKey ?? new Uint8Array(); - message.total = - object.total !== undefined && object.total !== null - ? Long.fromValue(object.total) - : Long.UZERO; + message.total = object.total !== undefined && object.total !== null ? Long.fromValue(object.total) : Long.UZERO; return message; - }, + } }; messageTypeRegistry.set(PageResponse.$type, PageResponse); @@ -276,9 +246,7 @@ var globalThis: any = (() => { throw "Unable to locate global object"; })(); -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); +const atob: (b64: string) => string = globalThis.atob || (b64 => globalThis.Buffer.from(b64, "base64").toString("binary")); function bytesFromBase64(b64: string): Uint8Array { const bin = atob(b64); const arr = new Uint8Array(bin.length); @@ -288,45 +256,33 @@ function bytesFromBase64(b64: string): Uint8Array { return arr; } -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); +const btoa: (bin: string) => string = globalThis.btoa || (bin => globalThis.Buffer.from(bin, "binary").toString("base64")); function base64FromBytes(arr: Uint8Array): string { const bin: string[] = []; - arr.forEach((byte) => { + arr.forEach(byte => { bin.push(String.fromCharCode(byte)); }); return btoa(bin.join("")); } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/cosmos/base/v1beta1/coin.ts b/src/protobuf/cosmos/base/v1beta1/coin.ts index 093f3f4..ec33641 100644 --- a/src/protobuf/cosmos/base/v1beta1/coin.ts +++ b/src/protobuf/cosmos/base/v1beta1/coin.ts @@ -83,7 +83,7 @@ export const Coin = { return { $type: Coin.$type, denom: isSet(object.denom) ? String(object.denom) : "", - amount: isSet(object.amount) ? String(object.amount) : "", + amount: isSet(object.amount) ? String(object.amount) : "" }; }, @@ -99,7 +99,7 @@ export const Coin = { message.denom = object.denom ?? ""; message.amount = object.amount ?? ""; return message; - }, + } }; messageTypeRegistry.set(Coin.$type, Coin); @@ -111,15 +111,12 @@ function createBaseDecCoin(): DecCoin { export const DecCoin = { $type: "cosmos.base.v1beta1.DecCoin" as const, - encode( - message: DecCoin, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: DecCoin, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.denom !== "") { writer.uint32(10).string(message.denom); } if (message.amount !== "") { - writer.uint32(18).string(message.amount.padEnd(23, '0')); + writer.uint32(18).string(message.amount.padEnd(23, "0")); } return writer; }, @@ -135,7 +132,7 @@ export const DecCoin = { message.denom = reader.string(); break; case 2: - message.amount = (parseInt(reader.string()) / (10 ** 18)).toPrecision(18); + message.amount = (parseInt(reader.string()) / 10 ** 18).toPrecision(18); break; default: reader.skipType(tag & 7); @@ -149,7 +146,7 @@ export const DecCoin = { return { $type: DecCoin.$type, denom: isSet(object.denom) ? String(object.denom) : "", - amount: isSet(object.amount) ? String(object.amount) : "", + amount: isSet(object.amount) ? String(object.amount) : "" }; }, @@ -165,7 +162,7 @@ export const DecCoin = { message.denom = object.denom ?? ""; message.amount = object.amount ?? ""; return message; - }, + } }; messageTypeRegistry.set(DecCoin.$type, DecCoin); @@ -177,10 +174,7 @@ function createBaseIntProto(): IntProto { export const IntProto = { $type: "cosmos.base.v1beta1.IntProto" as const, - encode( - message: IntProto, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: IntProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.int !== "") { writer.uint32(10).string(message.int); } @@ -208,7 +202,7 @@ export const IntProto = { fromJSON(object: any): IntProto { return { $type: IntProto.$type, - int: isSet(object.int) ? String(object.int) : "", + int: isSet(object.int) ? String(object.int) : "" }; }, @@ -222,7 +216,7 @@ export const IntProto = { const message = createBaseIntProto(); message.int = object.int ?? ""; return message; - }, + } }; messageTypeRegistry.set(IntProto.$type, IntProto); @@ -234,10 +228,7 @@ function createBaseDecProto(): DecProto { export const DecProto = { $type: "cosmos.base.v1beta1.DecProto" as const, - encode( - message: DecProto, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: DecProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.dec !== "") { writer.uint32(10).string(message.dec); } @@ -265,7 +256,7 @@ export const DecProto = { fromJSON(object: any): DecProto { return { $type: DecProto.$type, - dec: isSet(object.dec) ? String(object.dec) : "", + dec: isSet(object.dec) ? String(object.dec) : "" }; }, @@ -279,39 +270,29 @@ export const DecProto = { const message = createBaseDecProto(); message.dec = object.dec ?? ""; return message; - }, + } }; messageTypeRegistry.set(DecProto.$type, DecProto); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/google/api/http.ts b/src/protobuf/google/api/http.ts index 3c227a7..a6e1d89 100644 --- a/src/protobuf/google/api/http.ts +++ b/src/protobuf/google/api/http.ts @@ -307,7 +307,7 @@ function createBaseHttp(): Http { return { $type: "google.api.Http", rules: [], - fullyDecodeReservedExpansion: false, + fullyDecodeReservedExpansion: false }; } @@ -348,36 +348,28 @@ export const Http = { fromJSON(object: any): Http { return { $type: Http.$type, - rules: Array.isArray(object?.rules) - ? object.rules.map((e: any) => HttpRule.fromJSON(e)) - : [], - fullyDecodeReservedExpansion: isSet(object.fullyDecodeReservedExpansion) - ? Boolean(object.fullyDecodeReservedExpansion) - : false, + rules: Array.isArray(object?.rules) ? object.rules.map((e: any) => HttpRule.fromJSON(e)) : [], + fullyDecodeReservedExpansion: isSet(object.fullyDecodeReservedExpansion) ? Boolean(object.fullyDecodeReservedExpansion) : false }; }, toJSON(message: Http): unknown { const obj: any = {}; if (message.rules) { - obj.rules = message.rules.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); + obj.rules = message.rules.map(e => (e ? HttpRule.toJSON(e) : undefined)); } else { obj.rules = []; } - message.fullyDecodeReservedExpansion !== undefined && - (obj.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion); + message.fullyDecodeReservedExpansion !== undefined && (obj.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion); return obj; }, fromPartial, I>>(object: I): Http { const message = createBaseHttp(); - message.rules = object.rules?.map((e) => HttpRule.fromPartial(e)) || []; - message.fullyDecodeReservedExpansion = - object.fullyDecodeReservedExpansion ?? false; + message.rules = object.rules?.map(e => HttpRule.fromPartial(e)) || []; + message.fullyDecodeReservedExpansion = object.fullyDecodeReservedExpansion ?? false; return message; - }, + } }; messageTypeRegistry.set(Http.$type, Http); @@ -394,17 +386,14 @@ function createBaseHttpRule(): HttpRule { custom: undefined, body: "", responseBody: "", - additionalBindings: [], + additionalBindings: [] }; } export const HttpRule = { $type: "google.api.HttpRule" as const, - encode( - message: HttpRule, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: HttpRule, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.selector !== "") { writer.uint32(10).string(message.selector); } @@ -424,10 +413,7 @@ export const HttpRule = { writer.uint32(50).string(message.patch); } if (message.custom !== undefined) { - CustomHttpPattern.encode( - message.custom, - writer.uint32(66).fork() - ).ldelim(); + CustomHttpPattern.encode(message.custom, writer.uint32(66).fork()).ldelim(); } if (message.body !== "") { writer.uint32(58).string(message.body); @@ -476,9 +462,7 @@ export const HttpRule = { message.responseBody = reader.string(); break; case 11: - message.additionalBindings.push( - HttpRule.decode(reader, reader.uint32()) - ); + message.additionalBindings.push(HttpRule.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -497,16 +481,10 @@ export const HttpRule = { post: isSet(object.post) ? String(object.post) : undefined, delete: isSet(object.delete) ? String(object.delete) : undefined, patch: isSet(object.patch) ? String(object.patch) : undefined, - custom: isSet(object.custom) - ? CustomHttpPattern.fromJSON(object.custom) - : undefined, + custom: isSet(object.custom) ? CustomHttpPattern.fromJSON(object.custom) : undefined, body: isSet(object.body) ? String(object.body) : "", - responseBody: isSet(object.responseBody) - ? String(object.responseBody) - : "", - additionalBindings: Array.isArray(object?.additionalBindings) - ? object.additionalBindings.map((e: any) => HttpRule.fromJSON(e)) - : [], + responseBody: isSet(object.responseBody) ? String(object.responseBody) : "", + additionalBindings: Array.isArray(object?.additionalBindings) ? object.additionalBindings.map((e: any) => HttpRule.fromJSON(e)) : [] }; }, @@ -518,17 +496,11 @@ export const HttpRule = { message.post !== undefined && (obj.post = message.post); message.delete !== undefined && (obj.delete = message.delete); message.patch !== undefined && (obj.patch = message.patch); - message.custom !== undefined && - (obj.custom = message.custom - ? CustomHttpPattern.toJSON(message.custom) - : undefined); + message.custom !== undefined && (obj.custom = message.custom ? CustomHttpPattern.toJSON(message.custom) : undefined); message.body !== undefined && (obj.body = message.body); - message.responseBody !== undefined && - (obj.responseBody = message.responseBody); + message.responseBody !== undefined && (obj.responseBody = message.responseBody); if (message.additionalBindings) { - obj.additionalBindings = message.additionalBindings.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); + obj.additionalBindings = message.additionalBindings.map(e => (e ? HttpRule.toJSON(e) : undefined)); } else { obj.additionalBindings = []; } @@ -543,16 +515,12 @@ export const HttpRule = { message.post = object.post ?? undefined; message.delete = object.delete ?? undefined; message.patch = object.patch ?? undefined; - message.custom = - object.custom !== undefined && object.custom !== null - ? CustomHttpPattern.fromPartial(object.custom) - : undefined; + message.custom = object.custom !== undefined && object.custom !== null ? CustomHttpPattern.fromPartial(object.custom) : undefined; message.body = object.body ?? ""; message.responseBody = object.responseBody ?? ""; - message.additionalBindings = - object.additionalBindings?.map((e) => HttpRule.fromPartial(e)) || []; + message.additionalBindings = object.additionalBindings?.map(e => HttpRule.fromPartial(e)) || []; return message; - }, + } }; messageTypeRegistry.set(HttpRule.$type, HttpRule); @@ -564,10 +532,7 @@ function createBaseCustomHttpPattern(): CustomHttpPattern { export const CustomHttpPattern = { $type: "google.api.CustomHttpPattern" as const, - encode( - message: CustomHttpPattern, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: CustomHttpPattern, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.kind !== "") { writer.uint32(10).string(message.kind); } @@ -602,7 +567,7 @@ export const CustomHttpPattern = { return { $type: CustomHttpPattern.$type, kind: isSet(object.kind) ? String(object.kind) : "", - path: isSet(object.path) ? String(object.path) : "", + path: isSet(object.path) ? String(object.path) : "" }; }, @@ -613,46 +578,34 @@ export const CustomHttpPattern = { return obj; }, - fromPartial, I>>( - object: I - ): CustomHttpPattern { + fromPartial, I>>(object: I): CustomHttpPattern { const message = createBaseCustomHttpPattern(); message.kind = object.kind ?? ""; message.path = object.path ?? ""; return message; - }, + } }; messageTypeRegistry.set(CustomHttpPattern.$type, CustomHttpPattern); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/google/protobuf/any.ts b/src/protobuf/google/protobuf/any.ts index ca7edf5..8d80147 100644 --- a/src/protobuf/google/protobuf/any.ts +++ b/src/protobuf/google/protobuf/any.ts @@ -164,19 +164,14 @@ export const Any = { return { $type: Any.$type, typeUrl: isSet(object.typeUrl) ? String(object.typeUrl) : "", - value: isSet(object.value) - ? bytesFromBase64(object.value) - : new Uint8Array(), + value: isSet(object.value) ? bytesFromBase64(object.value) : new Uint8Array() }; }, toJSON(message: Any): unknown { const obj: any = {}; message.typeUrl !== undefined && (obj.typeUrl = message.typeUrl); - message.value !== undefined && - (obj.value = base64FromBytes( - message.value !== undefined ? message.value : new Uint8Array() - )); + message.value !== undefined && (obj.value = base64FromBytes(message.value !== undefined ? message.value : new Uint8Array())); return obj; }, @@ -185,7 +180,7 @@ export const Any = { message.typeUrl = object.typeUrl ?? ""; message.value = object.value ?? new Uint8Array(); return message; - }, + } }; messageTypeRegistry.set(Any.$type, Any); @@ -201,9 +196,7 @@ var globalThis: any = (() => { throw "Unable to locate global object"; })(); -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); +const atob: (b64: string) => string = globalThis.atob || (b64 => globalThis.Buffer.from(b64, "base64").toString("binary")); function bytesFromBase64(b64: string): Uint8Array { const bin = atob(b64); const arr = new Uint8Array(bin.length); @@ -213,45 +206,33 @@ function bytesFromBase64(b64: string): Uint8Array { return arr; } -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); +const btoa: (bin: string) => string = globalThis.btoa || (bin => globalThis.Buffer.from(bin, "binary").toString("base64")); function base64FromBytes(arr: Uint8Array): string { const bin: string[] = []; - arr.forEach((byte) => { + arr.forEach(byte => { bin.push(String.fromCharCode(byte)); }); return btoa(bin.join("")); } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/google/protobuf/descriptor.ts b/src/protobuf/google/protobuf/descriptor.ts index 348bbb6..0283b35 100644 --- a/src/protobuf/google/protobuf/descriptor.ts +++ b/src/protobuf/google/protobuf/descriptor.ts @@ -209,12 +209,10 @@ export enum FieldDescriptorProto_Type { TYPE_SINT32 = 17, /** TYPE_SINT64 - Uses ZigZag encoding. */ TYPE_SINT64 = 18, - UNRECOGNIZED = -1, + UNRECOGNIZED = -1 } -export function fieldDescriptorProto_TypeFromJSON( - object: any -): FieldDescriptorProto_Type { +export function fieldDescriptorProto_TypeFromJSON(object: any): FieldDescriptorProto_Type { switch (object) { case 1: case "TYPE_DOUBLE": @@ -277,9 +275,7 @@ export function fieldDescriptorProto_TypeFromJSON( } } -export function fieldDescriptorProto_TypeToJSON( - object: FieldDescriptorProto_Type -): string { +export function fieldDescriptorProto_TypeToJSON(object: FieldDescriptorProto_Type): string { switch (object) { case FieldDescriptorProto_Type.TYPE_DOUBLE: return "TYPE_DOUBLE"; @@ -328,12 +324,10 @@ export enum FieldDescriptorProto_Label { LABEL_OPTIONAL = 1, LABEL_REQUIRED = 2, LABEL_REPEATED = 3, - UNRECOGNIZED = -1, + UNRECOGNIZED = -1 } -export function fieldDescriptorProto_LabelFromJSON( - object: any -): FieldDescriptorProto_Label { +export function fieldDescriptorProto_LabelFromJSON(object: any): FieldDescriptorProto_Label { switch (object) { case 1: case "LABEL_OPTIONAL": @@ -351,9 +345,7 @@ export function fieldDescriptorProto_LabelFromJSON( } } -export function fieldDescriptorProto_LabelToJSON( - object: FieldDescriptorProto_Label -): string { +export function fieldDescriptorProto_LabelToJSON(object: FieldDescriptorProto_Label): string { switch (object) { case FieldDescriptorProto_Label.LABEL_OPTIONAL: return "LABEL_OPTIONAL"; @@ -572,12 +564,10 @@ export enum FileOptions_OptimizeMode { CODE_SIZE = 2, /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ LITE_RUNTIME = 3, - UNRECOGNIZED = -1, + UNRECOGNIZED = -1 } -export function fileOptions_OptimizeModeFromJSON( - object: any -): FileOptions_OptimizeMode { +export function fileOptions_OptimizeModeFromJSON(object: any): FileOptions_OptimizeMode { switch (object) { case 1: case "SPEED": @@ -595,9 +585,7 @@ export function fileOptions_OptimizeModeFromJSON( } } -export function fileOptions_OptimizeModeToJSON( - object: FileOptions_OptimizeMode -): string { +export function fileOptions_OptimizeModeToJSON(object: FileOptions_OptimizeMode): string { switch (object) { case FileOptions_OptimizeMode.SPEED: return "SPEED"; @@ -755,7 +743,7 @@ export enum FieldOptions_CType { STRING = 0, CORD = 1, STRING_PIECE = 2, - UNRECOGNIZED = -1, + UNRECOGNIZED = -1 } export function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType { @@ -797,7 +785,7 @@ export enum FieldOptions_JSType { JS_STRING = 1, /** JS_NUMBER - Use JavaScript numbers. */ JS_NUMBER = 2, - UNRECOGNIZED = -1, + UNRECOGNIZED = -1 } export function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType { @@ -907,12 +895,10 @@ export enum MethodOptions_IdempotencyLevel { NO_SIDE_EFFECTS = 1, /** IDEMPOTENT - idempotent, but may have side effects */ IDEMPOTENT = 2, - UNRECOGNIZED = -1, + UNRECOGNIZED = -1 } -export function methodOptions_IdempotencyLevelFromJSON( - object: any -): MethodOptions_IdempotencyLevel { +export function methodOptions_IdempotencyLevelFromJSON(object: any): MethodOptions_IdempotencyLevel { switch (object) { case 0: case "IDEMPOTENCY_UNKNOWN": @@ -930,9 +916,7 @@ export function methodOptions_IdempotencyLevelFromJSON( } } -export function methodOptions_IdempotencyLevelToJSON( - object: MethodOptions_IdempotencyLevel -): string { +export function methodOptions_IdempotencyLevelToJSON(object: MethodOptions_IdempotencyLevel): string { switch (object) { case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: return "IDEMPOTENCY_UNKNOWN"; @@ -1169,10 +1153,7 @@ function createBaseFileDescriptorSet(): FileDescriptorSet { export const FileDescriptorSet = { $type: "google.protobuf.FileDescriptorSet" as const, - encode( - message: FileDescriptorSet, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: FileDescriptorSet, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.file) { FileDescriptorProto.encode(v!, writer.uint32(10).fork()).ldelim(); } @@ -1187,9 +1168,7 @@ export const FileDescriptorSet = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.file.push( - FileDescriptorProto.decode(reader, reader.uint32()) - ); + message.file.push(FileDescriptorProto.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -1202,32 +1181,25 @@ export const FileDescriptorSet = { fromJSON(object: any): FileDescriptorSet { return { $type: FileDescriptorSet.$type, - file: Array.isArray(object?.file) - ? object.file.map((e: any) => FileDescriptorProto.fromJSON(e)) - : [], + file: Array.isArray(object?.file) ? object.file.map((e: any) => FileDescriptorProto.fromJSON(e)) : [] }; }, toJSON(message: FileDescriptorSet): unknown { const obj: any = {}; if (message.file) { - obj.file = message.file.map((e) => - e ? FileDescriptorProto.toJSON(e) : undefined - ); + obj.file = message.file.map(e => (e ? FileDescriptorProto.toJSON(e) : undefined)); } else { obj.file = []; } return obj; }, - fromPartial, I>>( - object: I - ): FileDescriptorSet { + fromPartial, I>>(object: I): FileDescriptorSet { const message = createBaseFileDescriptorSet(); - message.file = - object.file?.map((e) => FileDescriptorProto.fromPartial(e)) || []; + message.file = object.file?.map(e => FileDescriptorProto.fromPartial(e)) || []; return message; - }, + } }; messageTypeRegistry.set(FileDescriptorSet.$type, FileDescriptorSet); @@ -1246,17 +1218,14 @@ function createBaseFileDescriptorProto(): FileDescriptorProto { extension: [], options: undefined, sourceCodeInfo: undefined, - syntax: "", + syntax: "" }; } export const FileDescriptorProto = { $type: "google.protobuf.FileDescriptorProto" as const, - encode( - message: FileDescriptorProto, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: FileDescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.name !== "") { writer.uint32(10).string(message.name); } @@ -1292,10 +1261,7 @@ export const FileDescriptorProto = { FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); } if (message.sourceCodeInfo !== undefined) { - SourceCodeInfo.encode( - message.sourceCodeInfo, - writer.uint32(74).fork() - ).ldelim(); + SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(74).fork()).ldelim(); } if (message.syntax !== "") { writer.uint32(98).string(message.syntax); @@ -1340,33 +1306,22 @@ export const FileDescriptorProto = { } break; case 4: - message.messageType.push( - DescriptorProto.decode(reader, reader.uint32()) - ); + message.messageType.push(DescriptorProto.decode(reader, reader.uint32())); break; case 5: - message.enumType.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); + message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); break; case 6: - message.service.push( - ServiceDescriptorProto.decode(reader, reader.uint32()) - ); + message.service.push(ServiceDescriptorProto.decode(reader, reader.uint32())); break; case 7: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); + message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); break; case 8: message.options = FileOptions.decode(reader, reader.uint32()); break; case 9: - message.sourceCodeInfo = SourceCodeInfo.decode( - reader, - reader.uint32() - ); + message.sourceCodeInfo = SourceCodeInfo.decode(reader, reader.uint32()); break; case 12: message.syntax = reader.string(); @@ -1384,34 +1339,16 @@ export const FileDescriptorProto = { $type: FileDescriptorProto.$type, name: isSet(object.name) ? String(object.name) : "", package: isSet(object.package) ? String(object.package) : "", - dependency: Array.isArray(object?.dependency) - ? object.dependency.map((e: any) => String(e)) - : [], - publicDependency: Array.isArray(object?.publicDependency) - ? object.publicDependency.map((e: any) => Number(e)) - : [], - weakDependency: Array.isArray(object?.weakDependency) - ? object.weakDependency.map((e: any) => Number(e)) - : [], - messageType: Array.isArray(object?.messageType) - ? object.messageType.map((e: any) => DescriptorProto.fromJSON(e)) - : [], - enumType: Array.isArray(object?.enumType) - ? object.enumType.map((e: any) => EnumDescriptorProto.fromJSON(e)) - : [], - service: Array.isArray(object?.service) - ? object.service.map((e: any) => ServiceDescriptorProto.fromJSON(e)) - : [], - extension: Array.isArray(object?.extension) - ? object.extension.map((e: any) => FieldDescriptorProto.fromJSON(e)) - : [], - options: isSet(object.options) - ? FileOptions.fromJSON(object.options) - : undefined, - sourceCodeInfo: isSet(object.sourceCodeInfo) - ? SourceCodeInfo.fromJSON(object.sourceCodeInfo) - : undefined, - syntax: isSet(object.syntax) ? String(object.syntax) : "", + dependency: Array.isArray(object?.dependency) ? object.dependency.map((e: any) => String(e)) : [], + publicDependency: Array.isArray(object?.publicDependency) ? object.publicDependency.map((e: any) => Number(e)) : [], + weakDependency: Array.isArray(object?.weakDependency) ? object.weakDependency.map((e: any) => Number(e)) : [], + messageType: Array.isArray(object?.messageType) ? object.messageType.map((e: any) => DescriptorProto.fromJSON(e)) : [], + enumType: Array.isArray(object?.enumType) ? object.enumType.map((e: any) => EnumDescriptorProto.fromJSON(e)) : [], + service: Array.isArray(object?.service) ? object.service.map((e: any) => ServiceDescriptorProto.fromJSON(e)) : [], + extension: Array.isArray(object?.extension) ? object.extension.map((e: any) => FieldDescriptorProto.fromJSON(e)) : [], + options: isSet(object.options) ? FileOptions.fromJSON(object.options) : undefined, + sourceCodeInfo: isSet(object.sourceCodeInfo) ? SourceCodeInfo.fromJSON(object.sourceCodeInfo) : undefined, + syntax: isSet(object.syntax) ? String(object.syntax) : "" }; }, @@ -1420,88 +1357,63 @@ export const FileDescriptorProto = { message.name !== undefined && (obj.name = message.name); message.package !== undefined && (obj.package = message.package); if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); + obj.dependency = message.dependency.map(e => e); } else { obj.dependency = []; } if (message.publicDependency) { - obj.publicDependency = message.publicDependency.map((e) => Math.round(e)); + obj.publicDependency = message.publicDependency.map(e => Math.round(e)); } else { obj.publicDependency = []; } if (message.weakDependency) { - obj.weakDependency = message.weakDependency.map((e) => Math.round(e)); + obj.weakDependency = message.weakDependency.map(e => Math.round(e)); } else { obj.weakDependency = []; } if (message.messageType) { - obj.messageType = message.messageType.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); + obj.messageType = message.messageType.map(e => (e ? DescriptorProto.toJSON(e) : undefined)); } else { obj.messageType = []; } if (message.enumType) { - obj.enumType = message.enumType.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); + obj.enumType = message.enumType.map(e => (e ? EnumDescriptorProto.toJSON(e) : undefined)); } else { obj.enumType = []; } if (message.service) { - obj.service = message.service.map((e) => - e ? ServiceDescriptorProto.toJSON(e) : undefined - ); + obj.service = message.service.map(e => (e ? ServiceDescriptorProto.toJSON(e) : undefined)); } else { obj.service = []; } if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); + obj.extension = message.extension.map(e => (e ? FieldDescriptorProto.toJSON(e) : undefined)); } else { obj.extension = []; } - message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); - message.sourceCodeInfo !== undefined && - (obj.sourceCodeInfo = message.sourceCodeInfo - ? SourceCodeInfo.toJSON(message.sourceCodeInfo) - : undefined); + message.options !== undefined && (obj.options = message.options ? FileOptions.toJSON(message.options) : undefined); + message.sourceCodeInfo !== undefined && (obj.sourceCodeInfo = message.sourceCodeInfo ? SourceCodeInfo.toJSON(message.sourceCodeInfo) : undefined); message.syntax !== undefined && (obj.syntax = message.syntax); return obj; }, - fromPartial, I>>( - object: I - ): FileDescriptorProto { + fromPartial, I>>(object: I): FileDescriptorProto { const message = createBaseFileDescriptorProto(); message.name = object.name ?? ""; message.package = object.package ?? ""; - message.dependency = object.dependency?.map((e) => e) || []; - message.publicDependency = object.publicDependency?.map((e) => e) || []; - message.weakDependency = object.weakDependency?.map((e) => e) || []; - message.messageType = - object.messageType?.map((e) => DescriptorProto.fromPartial(e)) || []; - message.enumType = - object.enumType?.map((e) => EnumDescriptorProto.fromPartial(e)) || []; - message.service = - object.service?.map((e) => ServiceDescriptorProto.fromPartial(e)) || []; - message.extension = - object.extension?.map((e) => FieldDescriptorProto.fromPartial(e)) || []; - message.options = - object.options !== undefined && object.options !== null - ? FileOptions.fromPartial(object.options) - : undefined; + message.dependency = object.dependency?.map(e => e) || []; + message.publicDependency = object.publicDependency?.map(e => e) || []; + message.weakDependency = object.weakDependency?.map(e => e) || []; + message.messageType = object.messageType?.map(e => DescriptorProto.fromPartial(e)) || []; + message.enumType = object.enumType?.map(e => EnumDescriptorProto.fromPartial(e)) || []; + message.service = object.service?.map(e => ServiceDescriptorProto.fromPartial(e)) || []; + message.extension = object.extension?.map(e => FieldDescriptorProto.fromPartial(e)) || []; + message.options = object.options !== undefined && object.options !== null ? FileOptions.fromPartial(object.options) : undefined; message.sourceCodeInfo = - object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null - ? SourceCodeInfo.fromPartial(object.sourceCodeInfo) - : undefined; + object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null ? SourceCodeInfo.fromPartial(object.sourceCodeInfo) : undefined; message.syntax = object.syntax ?? ""; return message; - }, + } }; messageTypeRegistry.set(FileDescriptorProto.$type, FileDescriptorProto); @@ -1518,17 +1430,14 @@ function createBaseDescriptorProto(): DescriptorProto { oneofDecl: [], options: undefined, reservedRange: [], - reservedName: [], + reservedName: [] }; } export const DescriptorProto = { $type: "google.protobuf.DescriptorProto" as const, - encode( - message: DescriptorProto, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: DescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.name !== "") { writer.uint32(10).string(message.name); } @@ -1545,10 +1454,7 @@ export const DescriptorProto = { EnumDescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); } for (const v of message.extensionRange) { - DescriptorProto_ExtensionRange.encode( - v!, - writer.uint32(42).fork() - ).ldelim(); + DescriptorProto_ExtensionRange.encode(v!, writer.uint32(42).fork()).ldelim(); } for (const v of message.oneofDecl) { OneofDescriptorProto.encode(v!, writer.uint32(66).fork()).ldelim(); @@ -1557,10 +1463,7 @@ export const DescriptorProto = { MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); } for (const v of message.reservedRange) { - DescriptorProto_ReservedRange.encode( - v!, - writer.uint32(74).fork() - ).ldelim(); + DescriptorProto_ReservedRange.encode(v!, writer.uint32(74).fork()).ldelim(); } for (const v of message.reservedName) { writer.uint32(82).string(v!); @@ -1579,42 +1482,28 @@ export const DescriptorProto = { message.name = reader.string(); break; case 2: - message.field.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); + message.field.push(FieldDescriptorProto.decode(reader, reader.uint32())); break; case 6: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); + message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); break; case 3: - message.nestedType.push( - DescriptorProto.decode(reader, reader.uint32()) - ); + message.nestedType.push(DescriptorProto.decode(reader, reader.uint32())); break; case 4: - message.enumType.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); + message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); break; case 5: - message.extensionRange.push( - DescriptorProto_ExtensionRange.decode(reader, reader.uint32()) - ); + message.extensionRange.push(DescriptorProto_ExtensionRange.decode(reader, reader.uint32())); break; case 8: - message.oneofDecl.push( - OneofDescriptorProto.decode(reader, reader.uint32()) - ); + message.oneofDecl.push(OneofDescriptorProto.decode(reader, reader.uint32())); break; case 7: message.options = MessageOptions.decode(reader, reader.uint32()); break; case 9: - message.reservedRange.push( - DescriptorProto_ReservedRange.decode(reader, reader.uint32()) - ); + message.reservedRange.push(DescriptorProto_ReservedRange.decode(reader, reader.uint32())); break; case 10: message.reservedName.push(reader.string()); @@ -1631,37 +1520,15 @@ export const DescriptorProto = { return { $type: DescriptorProto.$type, name: isSet(object.name) ? String(object.name) : "", - field: Array.isArray(object?.field) - ? object.field.map((e: any) => FieldDescriptorProto.fromJSON(e)) - : [], - extension: Array.isArray(object?.extension) - ? object.extension.map((e: any) => FieldDescriptorProto.fromJSON(e)) - : [], - nestedType: Array.isArray(object?.nestedType) - ? object.nestedType.map((e: any) => DescriptorProto.fromJSON(e)) - : [], - enumType: Array.isArray(object?.enumType) - ? object.enumType.map((e: any) => EnumDescriptorProto.fromJSON(e)) - : [], - extensionRange: Array.isArray(object?.extensionRange) - ? object.extensionRange.map((e: any) => - DescriptorProto_ExtensionRange.fromJSON(e) - ) - : [], - oneofDecl: Array.isArray(object?.oneofDecl) - ? object.oneofDecl.map((e: any) => OneofDescriptorProto.fromJSON(e)) - : [], - options: isSet(object.options) - ? MessageOptions.fromJSON(object.options) - : undefined, - reservedRange: Array.isArray(object?.reservedRange) - ? object.reservedRange.map((e: any) => - DescriptorProto_ReservedRange.fromJSON(e) - ) - : [], - reservedName: Array.isArray(object?.reservedName) - ? object.reservedName.map((e: any) => String(e)) - : [], + field: Array.isArray(object?.field) ? object.field.map((e: any) => FieldDescriptorProto.fromJSON(e)) : [], + extension: Array.isArray(object?.extension) ? object.extension.map((e: any) => FieldDescriptorProto.fromJSON(e)) : [], + nestedType: Array.isArray(object?.nestedType) ? object.nestedType.map((e: any) => DescriptorProto.fromJSON(e)) : [], + enumType: Array.isArray(object?.enumType) ? object.enumType.map((e: any) => EnumDescriptorProto.fromJSON(e)) : [], + extensionRange: Array.isArray(object?.extensionRange) ? object.extensionRange.map((e: any) => DescriptorProto_ExtensionRange.fromJSON(e)) : [], + oneofDecl: Array.isArray(object?.oneofDecl) ? object.oneofDecl.map((e: any) => OneofDescriptorProto.fromJSON(e)) : [], + options: isSet(object.options) ? MessageOptions.fromJSON(object.options) : undefined, + reservedRange: Array.isArray(object?.reservedRange) ? object.reservedRange.map((e: any) => DescriptorProto_ReservedRange.fromJSON(e)) : [], + reservedName: Array.isArray(object?.reservedName) ? object.reservedName.map((e: any) => String(e)) : [] }; }, @@ -1669,96 +1536,63 @@ export const DescriptorProto = { const obj: any = {}; message.name !== undefined && (obj.name = message.name); if (message.field) { - obj.field = message.field.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); + obj.field = message.field.map(e => (e ? FieldDescriptorProto.toJSON(e) : undefined)); } else { obj.field = []; } if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); + obj.extension = message.extension.map(e => (e ? FieldDescriptorProto.toJSON(e) : undefined)); } else { obj.extension = []; } if (message.nestedType) { - obj.nestedType = message.nestedType.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); + obj.nestedType = message.nestedType.map(e => (e ? DescriptorProto.toJSON(e) : undefined)); } else { obj.nestedType = []; } if (message.enumType) { - obj.enumType = message.enumType.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); + obj.enumType = message.enumType.map(e => (e ? EnumDescriptorProto.toJSON(e) : undefined)); } else { obj.enumType = []; } if (message.extensionRange) { - obj.extensionRange = message.extensionRange.map((e) => - e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined - ); + obj.extensionRange = message.extensionRange.map(e => (e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined)); } else { obj.extensionRange = []; } if (message.oneofDecl) { - obj.oneofDecl = message.oneofDecl.map((e) => - e ? OneofDescriptorProto.toJSON(e) : undefined - ); + obj.oneofDecl = message.oneofDecl.map(e => (e ? OneofDescriptorProto.toJSON(e) : undefined)); } else { obj.oneofDecl = []; } - message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); + message.options !== undefined && (obj.options = message.options ? MessageOptions.toJSON(message.options) : undefined); if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => - e ? DescriptorProto_ReservedRange.toJSON(e) : undefined - ); + obj.reservedRange = message.reservedRange.map(e => (e ? DescriptorProto_ReservedRange.toJSON(e) : undefined)); } else { obj.reservedRange = []; } if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); + obj.reservedName = message.reservedName.map(e => e); } else { obj.reservedName = []; } return obj; }, - fromPartial, I>>( - object: I - ): DescriptorProto { + fromPartial, I>>(object: I): DescriptorProto { const message = createBaseDescriptorProto(); message.name = object.name ?? ""; - message.field = - object.field?.map((e) => FieldDescriptorProto.fromPartial(e)) || []; - message.extension = - object.extension?.map((e) => FieldDescriptorProto.fromPartial(e)) || []; - message.nestedType = - object.nestedType?.map((e) => DescriptorProto.fromPartial(e)) || []; - message.enumType = - object.enumType?.map((e) => EnumDescriptorProto.fromPartial(e)) || []; - message.extensionRange = - object.extensionRange?.map((e) => - DescriptorProto_ExtensionRange.fromPartial(e) - ) || []; - message.oneofDecl = - object.oneofDecl?.map((e) => OneofDescriptorProto.fromPartial(e)) || []; - message.options = - object.options !== undefined && object.options !== null - ? MessageOptions.fromPartial(object.options) - : undefined; - message.reservedRange = - object.reservedRange?.map((e) => - DescriptorProto_ReservedRange.fromPartial(e) - ) || []; - message.reservedName = object.reservedName?.map((e) => e) || []; + message.field = object.field?.map(e => FieldDescriptorProto.fromPartial(e)) || []; + message.extension = object.extension?.map(e => FieldDescriptorProto.fromPartial(e)) || []; + message.nestedType = object.nestedType?.map(e => DescriptorProto.fromPartial(e)) || []; + message.enumType = object.enumType?.map(e => EnumDescriptorProto.fromPartial(e)) || []; + message.extensionRange = object.extensionRange?.map(e => DescriptorProto_ExtensionRange.fromPartial(e)) || []; + message.oneofDecl = object.oneofDecl?.map(e => OneofDescriptorProto.fromPartial(e)) || []; + message.options = object.options !== undefined && object.options !== null ? MessageOptions.fromPartial(object.options) : undefined; + message.reservedRange = object.reservedRange?.map(e => DescriptorProto_ReservedRange.fromPartial(e)) || []; + message.reservedName = object.reservedName?.map(e => e) || []; return message; - }, + } }; messageTypeRegistry.set(DescriptorProto.$type, DescriptorProto); @@ -1768,17 +1602,14 @@ function createBaseDescriptorProto_ExtensionRange(): DescriptorProto_ExtensionRa $type: "google.protobuf.DescriptorProto.ExtensionRange", start: 0, end: 0, - options: undefined, + options: undefined }; } export const DescriptorProto_ExtensionRange = { $type: "google.protobuf.DescriptorProto.ExtensionRange" as const, - encode( - message: DescriptorProto_ExtensionRange, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: DescriptorProto_ExtensionRange, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.start !== 0) { writer.uint32(8).int32(message.start); } @@ -1786,18 +1617,12 @@ export const DescriptorProto_ExtensionRange = { writer.uint32(16).int32(message.end); } if (message.options !== undefined) { - ExtensionRangeOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); + ExtensionRangeOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): DescriptorProto_ExtensionRange { + decode(input: _m0.Reader | Uint8Array, length?: number): DescriptorProto_ExtensionRange { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseDescriptorProto_ExtensionRange(); @@ -1811,10 +1636,7 @@ export const DescriptorProto_ExtensionRange = { message.end = reader.int32(); break; case 3: - message.options = ExtensionRangeOptions.decode( - reader, - reader.uint32() - ); + message.options = ExtensionRangeOptions.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -1829,9 +1651,7 @@ export const DescriptorProto_ExtensionRange = { $type: DescriptorProto_ExtensionRange.$type, start: isSet(object.start) ? Number(object.start) : 0, end: isSet(object.end) ? Number(object.end) : 0, - options: isSet(object.options) - ? ExtensionRangeOptions.fromJSON(object.options) - : undefined, + options: isSet(object.options) ? ExtensionRangeOptions.fromJSON(object.options) : undefined }; }, @@ -1839,47 +1659,33 @@ export const DescriptorProto_ExtensionRange = { const obj: any = {}; message.start !== undefined && (obj.start = Math.round(message.start)); message.end !== undefined && (obj.end = Math.round(message.end)); - message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); + message.options !== undefined && (obj.options = message.options ? ExtensionRangeOptions.toJSON(message.options) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): DescriptorProto_ExtensionRange { + fromPartial, I>>(object: I): DescriptorProto_ExtensionRange { const message = createBaseDescriptorProto_ExtensionRange(); message.start = object.start ?? 0; message.end = object.end ?? 0; - message.options = - object.options !== undefined && object.options !== null - ? ExtensionRangeOptions.fromPartial(object.options) - : undefined; + message.options = object.options !== undefined && object.options !== null ? ExtensionRangeOptions.fromPartial(object.options) : undefined; return message; - }, + } }; -messageTypeRegistry.set( - DescriptorProto_ExtensionRange.$type, - DescriptorProto_ExtensionRange -); +messageTypeRegistry.set(DescriptorProto_ExtensionRange.$type, DescriptorProto_ExtensionRange); function createBaseDescriptorProto_ReservedRange(): DescriptorProto_ReservedRange { return { $type: "google.protobuf.DescriptorProto.ReservedRange", start: 0, - end: 0, + end: 0 }; } export const DescriptorProto_ReservedRange = { $type: "google.protobuf.DescriptorProto.ReservedRange" as const, - encode( - message: DescriptorProto_ReservedRange, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: DescriptorProto_ReservedRange, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.start !== 0) { writer.uint32(8).int32(message.start); } @@ -1889,10 +1695,7 @@ export const DescriptorProto_ReservedRange = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): DescriptorProto_ReservedRange { + decode(input: _m0.Reader | Uint8Array, length?: number): DescriptorProto_ReservedRange { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseDescriptorProto_ReservedRange(); @@ -1917,7 +1720,7 @@ export const DescriptorProto_ReservedRange = { return { $type: DescriptorProto_ReservedRange.$type, start: isSet(object.start) ? Number(object.start) : 0, - end: isSet(object.end) ? Number(object.end) : 0, + end: isSet(object.end) ? Number(object.end) : 0 }; }, @@ -1928,45 +1731,34 @@ export const DescriptorProto_ReservedRange = { return obj; }, - fromPartial, I>>( - object: I - ): DescriptorProto_ReservedRange { + fromPartial, I>>(object: I): DescriptorProto_ReservedRange { const message = createBaseDescriptorProto_ReservedRange(); message.start = object.start ?? 0; message.end = object.end ?? 0; return message; - }, + } }; -messageTypeRegistry.set( - DescriptorProto_ReservedRange.$type, - DescriptorProto_ReservedRange -); +messageTypeRegistry.set(DescriptorProto_ReservedRange.$type, DescriptorProto_ReservedRange); function createBaseExtensionRangeOptions(): ExtensionRangeOptions { return { $type: "google.protobuf.ExtensionRangeOptions", - uninterpretedOption: [], + uninterpretedOption: [] }; } export const ExtensionRangeOptions = { $type: "google.protobuf.ExtensionRangeOptions" as const, - encode( - message: ExtensionRangeOptions, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: ExtensionRangeOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.uninterpretedOption) { UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): ExtensionRangeOptions { + decode(input: _m0.Reader | Uint8Array, length?: number): ExtensionRangeOptions { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseExtensionRangeOptions(); @@ -1974,9 +1766,7 @@ export const ExtensionRangeOptions = { const tag = reader.uint32(); switch (tag >>> 3) { case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); + message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -1989,36 +1779,25 @@ export const ExtensionRangeOptions = { fromJSON(object: any): ExtensionRangeOptions { return { $type: ExtensionRangeOptions.$type, - uninterpretedOption: Array.isArray(object?.uninterpretedOption) - ? object.uninterpretedOption.map((e: any) => - UninterpretedOption.fromJSON(e) - ) - : [], + uninterpretedOption: Array.isArray(object?.uninterpretedOption) ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)) : [] }; }, toJSON(message: ExtensionRangeOptions): unknown { const obj: any = {}; if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); + obj.uninterpretedOption = message.uninterpretedOption.map(e => (e ? UninterpretedOption.toJSON(e) : undefined)); } else { obj.uninterpretedOption = []; } return obj; }, - fromPartial, I>>( - object: I - ): ExtensionRangeOptions { + fromPartial, I>>(object: I): ExtensionRangeOptions { const message = createBaseExtensionRangeOptions(); - message.uninterpretedOption = - object.uninterpretedOption?.map((e) => - UninterpretedOption.fromPartial(e) - ) || []; + message.uninterpretedOption = object.uninterpretedOption?.map(e => UninterpretedOption.fromPartial(e)) || []; return message; - }, + } }; messageTypeRegistry.set(ExtensionRangeOptions.$type, ExtensionRangeOptions); @@ -2036,17 +1815,14 @@ function createBaseFieldDescriptorProto(): FieldDescriptorProto { oneofIndex: 0, jsonName: "", options: undefined, - proto3Optional: false, + proto3Optional: false }; } export const FieldDescriptorProto = { $type: "google.protobuf.FieldDescriptorProto" as const, - encode( - message: FieldDescriptorProto, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: FieldDescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.name !== "") { writer.uint32(10).string(message.name); } @@ -2083,10 +1859,7 @@ export const FieldDescriptorProto = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): FieldDescriptorProto { + decode(input: _m0.Reader | Uint8Array, length?: number): FieldDescriptorProto { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseFieldDescriptorProto(); @@ -2139,25 +1912,15 @@ export const FieldDescriptorProto = { $type: FieldDescriptorProto.$type, name: isSet(object.name) ? String(object.name) : "", number: isSet(object.number) ? Number(object.number) : 0, - label: isSet(object.label) - ? fieldDescriptorProto_LabelFromJSON(object.label) - : 1, - type: isSet(object.type) - ? fieldDescriptorProto_TypeFromJSON(object.type) - : 1, + label: isSet(object.label) ? fieldDescriptorProto_LabelFromJSON(object.label) : 1, + type: isSet(object.type) ? fieldDescriptorProto_TypeFromJSON(object.type) : 1, typeName: isSet(object.typeName) ? String(object.typeName) : "", extendee: isSet(object.extendee) ? String(object.extendee) : "", - defaultValue: isSet(object.defaultValue) - ? String(object.defaultValue) - : "", + defaultValue: isSet(object.defaultValue) ? String(object.defaultValue) : "", oneofIndex: isSet(object.oneofIndex) ? Number(object.oneofIndex) : 0, jsonName: isSet(object.jsonName) ? String(object.jsonName) : "", - options: isSet(object.options) - ? FieldOptions.fromJSON(object.options) - : undefined, - proto3Optional: isSet(object.proto3Optional) - ? Boolean(object.proto3Optional) - : false, + options: isSet(object.options) ? FieldOptions.fromJSON(object.options) : undefined, + proto3Optional: isSet(object.proto3Optional) ? Boolean(object.proto3Optional) : false }; }, @@ -2165,29 +1928,19 @@ export const FieldDescriptorProto = { const obj: any = {}; message.name !== undefined && (obj.name = message.name); message.number !== undefined && (obj.number = Math.round(message.number)); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); + message.label !== undefined && (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); + message.type !== undefined && (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); message.typeName !== undefined && (obj.typeName = message.typeName); message.extendee !== undefined && (obj.extendee = message.extendee); - message.defaultValue !== undefined && - (obj.defaultValue = message.defaultValue); - message.oneofIndex !== undefined && - (obj.oneofIndex = Math.round(message.oneofIndex)); + message.defaultValue !== undefined && (obj.defaultValue = message.defaultValue); + message.oneofIndex !== undefined && (obj.oneofIndex = Math.round(message.oneofIndex)); message.jsonName !== undefined && (obj.jsonName = message.jsonName); - message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - message.proto3Optional !== undefined && - (obj.proto3Optional = message.proto3Optional); + message.options !== undefined && (obj.options = message.options ? FieldOptions.toJSON(message.options) : undefined); + message.proto3Optional !== undefined && (obj.proto3Optional = message.proto3Optional); return obj; }, - fromPartial, I>>( - object: I - ): FieldDescriptorProto { + fromPartial, I>>(object: I): FieldDescriptorProto { const message = createBaseFieldDescriptorProto(); message.name = object.name ?? ""; message.number = object.number ?? 0; @@ -2198,13 +1951,10 @@ export const FieldDescriptorProto = { message.defaultValue = object.defaultValue ?? ""; message.oneofIndex = object.oneofIndex ?? 0; message.jsonName = object.jsonName ?? ""; - message.options = - object.options !== undefined && object.options !== null - ? FieldOptions.fromPartial(object.options) - : undefined; + message.options = object.options !== undefined && object.options !== null ? FieldOptions.fromPartial(object.options) : undefined; message.proto3Optional = object.proto3Optional ?? false; return message; - }, + } }; messageTypeRegistry.set(FieldDescriptorProto.$type, FieldDescriptorProto); @@ -2213,17 +1963,14 @@ function createBaseOneofDescriptorProto(): OneofDescriptorProto { return { $type: "google.protobuf.OneofDescriptorProto", name: "", - options: undefined, + options: undefined }; } export const OneofDescriptorProto = { $type: "google.protobuf.OneofDescriptorProto" as const, - encode( - message: OneofDescriptorProto, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: OneofDescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.name !== "") { writer.uint32(10).string(message.name); } @@ -2233,10 +1980,7 @@ export const OneofDescriptorProto = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): OneofDescriptorProto { + decode(input: _m0.Reader | Uint8Array, length?: number): OneofDescriptorProto { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseOneofDescriptorProto(); @@ -2261,33 +2005,23 @@ export const OneofDescriptorProto = { return { $type: OneofDescriptorProto.$type, name: isSet(object.name) ? String(object.name) : "", - options: isSet(object.options) - ? OneofOptions.fromJSON(object.options) - : undefined, + options: isSet(object.options) ? OneofOptions.fromJSON(object.options) : undefined }; }, toJSON(message: OneofDescriptorProto): unknown { const obj: any = {}; message.name !== undefined && (obj.name = message.name); - message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); + message.options !== undefined && (obj.options = message.options ? OneofOptions.toJSON(message.options) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): OneofDescriptorProto { + fromPartial, I>>(object: I): OneofDescriptorProto { const message = createBaseOneofDescriptorProto(); message.name = object.name ?? ""; - message.options = - object.options !== undefined && object.options !== null - ? OneofOptions.fromPartial(object.options) - : undefined; + message.options = object.options !== undefined && object.options !== null ? OneofOptions.fromPartial(object.options) : undefined; return message; - }, + } }; messageTypeRegistry.set(OneofDescriptorProto.$type, OneofDescriptorProto); @@ -2299,17 +2033,14 @@ function createBaseEnumDescriptorProto(): EnumDescriptorProto { value: [], options: undefined, reservedRange: [], - reservedName: [], + reservedName: [] }; } export const EnumDescriptorProto = { $type: "google.protobuf.EnumDescriptorProto" as const, - encode( - message: EnumDescriptorProto, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: EnumDescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.name !== "") { writer.uint32(10).string(message.name); } @@ -2320,10 +2051,7 @@ export const EnumDescriptorProto = { EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); } for (const v of message.reservedRange) { - EnumDescriptorProto_EnumReservedRange.encode( - v!, - writer.uint32(34).fork() - ).ldelim(); + EnumDescriptorProto_EnumReservedRange.encode(v!, writer.uint32(34).fork()).ldelim(); } for (const v of message.reservedName) { writer.uint32(42).string(v!); @@ -2342,20 +2070,13 @@ export const EnumDescriptorProto = { message.name = reader.string(); break; case 2: - message.value.push( - EnumValueDescriptorProto.decode(reader, reader.uint32()) - ); + message.value.push(EnumValueDescriptorProto.decode(reader, reader.uint32())); break; case 3: message.options = EnumOptions.decode(reader, reader.uint32()); break; case 4: - message.reservedRange.push( - EnumDescriptorProto_EnumReservedRange.decode( - reader, - reader.uint32() - ) - ); + message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.decode(reader, reader.uint32())); break; case 5: message.reservedName.push(reader.string()); @@ -2372,20 +2093,10 @@ export const EnumDescriptorProto = { return { $type: EnumDescriptorProto.$type, name: isSet(object.name) ? String(object.name) : "", - value: Array.isArray(object?.value) - ? object.value.map((e: any) => EnumValueDescriptorProto.fromJSON(e)) - : [], - options: isSet(object.options) - ? EnumOptions.fromJSON(object.options) - : undefined, - reservedRange: Array.isArray(object?.reservedRange) - ? object.reservedRange.map((e: any) => - EnumDescriptorProto_EnumReservedRange.fromJSON(e) - ) - : [], - reservedName: Array.isArray(object?.reservedName) - ? object.reservedName.map((e: any) => String(e)) - : [], + value: Array.isArray(object?.value) ? object.value.map((e: any) => EnumValueDescriptorProto.fromJSON(e)) : [], + options: isSet(object.options) ? EnumOptions.fromJSON(object.options) : undefined, + reservedRange: Array.isArray(object?.reservedRange) ? object.reservedRange.map((e: any) => EnumDescriptorProto_EnumReservedRange.fromJSON(e)) : [], + reservedName: Array.isArray(object?.reservedName) ? object.reservedName.map((e: any) => String(e)) : [] }; }, @@ -2393,49 +2104,33 @@ export const EnumDescriptorProto = { const obj: any = {}; message.name !== undefined && (obj.name = message.name); if (message.value) { - obj.value = message.value.map((e) => - e ? EnumValueDescriptorProto.toJSON(e) : undefined - ); + obj.value = message.value.map(e => (e ? EnumValueDescriptorProto.toJSON(e) : undefined)); } else { obj.value = []; } - message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); + message.options !== undefined && (obj.options = message.options ? EnumOptions.toJSON(message.options) : undefined); if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => - e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined - ); + obj.reservedRange = message.reservedRange.map(e => (e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined)); } else { obj.reservedRange = []; } if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); + obj.reservedName = message.reservedName.map(e => e); } else { obj.reservedName = []; } return obj; }, - fromPartial, I>>( - object: I - ): EnumDescriptorProto { + fromPartial, I>>(object: I): EnumDescriptorProto { const message = createBaseEnumDescriptorProto(); message.name = object.name ?? ""; - message.value = - object.value?.map((e) => EnumValueDescriptorProto.fromPartial(e)) || []; - message.options = - object.options !== undefined && object.options !== null - ? EnumOptions.fromPartial(object.options) - : undefined; - message.reservedRange = - object.reservedRange?.map((e) => - EnumDescriptorProto_EnumReservedRange.fromPartial(e) - ) || []; - message.reservedName = object.reservedName?.map((e) => e) || []; + message.value = object.value?.map(e => EnumValueDescriptorProto.fromPartial(e)) || []; + message.options = object.options !== undefined && object.options !== null ? EnumOptions.fromPartial(object.options) : undefined; + message.reservedRange = object.reservedRange?.map(e => EnumDescriptorProto_EnumReservedRange.fromPartial(e)) || []; + message.reservedName = object.reservedName?.map(e => e) || []; return message; - }, + } }; messageTypeRegistry.set(EnumDescriptorProto.$type, EnumDescriptorProto); @@ -2444,17 +2139,14 @@ function createBaseEnumDescriptorProto_EnumReservedRange(): EnumDescriptorProto_ return { $type: "google.protobuf.EnumDescriptorProto.EnumReservedRange", start: 0, - end: 0, + end: 0 }; } export const EnumDescriptorProto_EnumReservedRange = { $type: "google.protobuf.EnumDescriptorProto.EnumReservedRange" as const, - encode( - message: EnumDescriptorProto_EnumReservedRange, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: EnumDescriptorProto_EnumReservedRange, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.start !== 0) { writer.uint32(8).int32(message.start); } @@ -2464,10 +2156,7 @@ export const EnumDescriptorProto_EnumReservedRange = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): EnumDescriptorProto_EnumReservedRange { + decode(input: _m0.Reader | Uint8Array, length?: number): EnumDescriptorProto_EnumReservedRange { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseEnumDescriptorProto_EnumReservedRange(); @@ -2492,7 +2181,7 @@ export const EnumDescriptorProto_EnumReservedRange = { return { $type: EnumDescriptorProto_EnumReservedRange.$type, start: isSet(object.start) ? Number(object.start) : 0, - end: isSet(object.end) ? Number(object.end) : 0, + end: isSet(object.end) ? Number(object.end) : 0 }; }, @@ -2503,37 +2192,29 @@ export const EnumDescriptorProto_EnumReservedRange = { return obj; }, - fromPartial< - I extends Exact, I> - >(object: I): EnumDescriptorProto_EnumReservedRange { + fromPartial, I>>(object: I): EnumDescriptorProto_EnumReservedRange { const message = createBaseEnumDescriptorProto_EnumReservedRange(); message.start = object.start ?? 0; message.end = object.end ?? 0; return message; - }, + } }; -messageTypeRegistry.set( - EnumDescriptorProto_EnumReservedRange.$type, - EnumDescriptorProto_EnumReservedRange -); +messageTypeRegistry.set(EnumDescriptorProto_EnumReservedRange.$type, EnumDescriptorProto_EnumReservedRange); function createBaseEnumValueDescriptorProto(): EnumValueDescriptorProto { return { $type: "google.protobuf.EnumValueDescriptorProto", name: "", number: 0, - options: undefined, + options: undefined }; } export const EnumValueDescriptorProto = { $type: "google.protobuf.EnumValueDescriptorProto" as const, - encode( - message: EnumValueDescriptorProto, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: EnumValueDescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.name !== "") { writer.uint32(10).string(message.name); } @@ -2541,18 +2222,12 @@ export const EnumValueDescriptorProto = { writer.uint32(16).int32(message.number); } if (message.options !== undefined) { - EnumValueOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); + EnumValueOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): EnumValueDescriptorProto { + decode(input: _m0.Reader | Uint8Array, length?: number): EnumValueDescriptorProto { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseEnumValueDescriptorProto(); @@ -2581,9 +2256,7 @@ export const EnumValueDescriptorProto = { $type: EnumValueDescriptorProto.$type, name: isSet(object.name) ? String(object.name) : "", number: isSet(object.number) ? Number(object.number) : 0, - options: isSet(object.options) - ? EnumValueOptions.fromJSON(object.options) - : undefined, + options: isSet(object.options) ? EnumValueOptions.fromJSON(object.options) : undefined }; }, @@ -2591,48 +2264,34 @@ export const EnumValueDescriptorProto = { const obj: any = {}; message.name !== undefined && (obj.name = message.name); message.number !== undefined && (obj.number = Math.round(message.number)); - message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); + message.options !== undefined && (obj.options = message.options ? EnumValueOptions.toJSON(message.options) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): EnumValueDescriptorProto { + fromPartial, I>>(object: I): EnumValueDescriptorProto { const message = createBaseEnumValueDescriptorProto(); message.name = object.name ?? ""; message.number = object.number ?? 0; - message.options = - object.options !== undefined && object.options !== null - ? EnumValueOptions.fromPartial(object.options) - : undefined; + message.options = object.options !== undefined && object.options !== null ? EnumValueOptions.fromPartial(object.options) : undefined; return message; - }, + } }; -messageTypeRegistry.set( - EnumValueDescriptorProto.$type, - EnumValueDescriptorProto -); +messageTypeRegistry.set(EnumValueDescriptorProto.$type, EnumValueDescriptorProto); function createBaseServiceDescriptorProto(): ServiceDescriptorProto { return { $type: "google.protobuf.ServiceDescriptorProto", name: "", method: [], - options: undefined, + options: undefined }; } export const ServiceDescriptorProto = { $type: "google.protobuf.ServiceDescriptorProto" as const, - encode( - message: ServiceDescriptorProto, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: ServiceDescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.name !== "") { writer.uint32(10).string(message.name); } @@ -2645,10 +2304,7 @@ export const ServiceDescriptorProto = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): ServiceDescriptorProto { + decode(input: _m0.Reader | Uint8Array, length?: number): ServiceDescriptorProto { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseServiceDescriptorProto(); @@ -2659,9 +2315,7 @@ export const ServiceDescriptorProto = { message.name = reader.string(); break; case 2: - message.method.push( - MethodDescriptorProto.decode(reader, reader.uint32()) - ); + message.method.push(MethodDescriptorProto.decode(reader, reader.uint32())); break; case 3: message.options = ServiceOptions.decode(reader, reader.uint32()); @@ -2678,12 +2332,8 @@ export const ServiceDescriptorProto = { return { $type: ServiceDescriptorProto.$type, name: isSet(object.name) ? String(object.name) : "", - method: Array.isArray(object?.method) - ? object.method.map((e: any) => MethodDescriptorProto.fromJSON(e)) - : [], - options: isSet(object.options) - ? ServiceOptions.fromJSON(object.options) - : undefined, + method: Array.isArray(object?.method) ? object.method.map((e: any) => MethodDescriptorProto.fromJSON(e)) : [], + options: isSet(object.options) ? ServiceOptions.fromJSON(object.options) : undefined }; }, @@ -2691,32 +2341,21 @@ export const ServiceDescriptorProto = { const obj: any = {}; message.name !== undefined && (obj.name = message.name); if (message.method) { - obj.method = message.method.map((e) => - e ? MethodDescriptorProto.toJSON(e) : undefined - ); + obj.method = message.method.map(e => (e ? MethodDescriptorProto.toJSON(e) : undefined)); } else { obj.method = []; } - message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); + message.options !== undefined && (obj.options = message.options ? ServiceOptions.toJSON(message.options) : undefined); return obj; }, - fromPartial, I>>( - object: I - ): ServiceDescriptorProto { + fromPartial, I>>(object: I): ServiceDescriptorProto { const message = createBaseServiceDescriptorProto(); message.name = object.name ?? ""; - message.method = - object.method?.map((e) => MethodDescriptorProto.fromPartial(e)) || []; - message.options = - object.options !== undefined && object.options !== null - ? ServiceOptions.fromPartial(object.options) - : undefined; + message.method = object.method?.map(e => MethodDescriptorProto.fromPartial(e)) || []; + message.options = object.options !== undefined && object.options !== null ? ServiceOptions.fromPartial(object.options) : undefined; return message; - }, + } }; messageTypeRegistry.set(ServiceDescriptorProto.$type, ServiceDescriptorProto); @@ -2729,17 +2368,14 @@ function createBaseMethodDescriptorProto(): MethodDescriptorProto { outputType: "", options: undefined, clientStreaming: false, - serverStreaming: false, + serverStreaming: false }; } export const MethodDescriptorProto = { $type: "google.protobuf.MethodDescriptorProto" as const, - encode( - message: MethodDescriptorProto, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MethodDescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.name !== "") { writer.uint32(10).string(message.name); } @@ -2761,10 +2397,7 @@ export const MethodDescriptorProto = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MethodDescriptorProto { + decode(input: _m0.Reader | Uint8Array, length?: number): MethodDescriptorProto { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMethodDescriptorProto(); @@ -2803,15 +2436,9 @@ export const MethodDescriptorProto = { name: isSet(object.name) ? String(object.name) : "", inputType: isSet(object.inputType) ? String(object.inputType) : "", outputType: isSet(object.outputType) ? String(object.outputType) : "", - options: isSet(object.options) - ? MethodOptions.fromJSON(object.options) - : undefined, - clientStreaming: isSet(object.clientStreaming) - ? Boolean(object.clientStreaming) - : false, - serverStreaming: isSet(object.serverStreaming) - ? Boolean(object.serverStreaming) - : false, + options: isSet(object.options) ? MethodOptions.fromJSON(object.options) : undefined, + clientStreaming: isSet(object.clientStreaming) ? Boolean(object.clientStreaming) : false, + serverStreaming: isSet(object.serverStreaming) ? Boolean(object.serverStreaming) : false }; }, @@ -2820,32 +2447,22 @@ export const MethodDescriptorProto = { message.name !== undefined && (obj.name = message.name); message.inputType !== undefined && (obj.inputType = message.inputType); message.outputType !== undefined && (obj.outputType = message.outputType); - message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.clientStreaming !== undefined && - (obj.clientStreaming = message.clientStreaming); - message.serverStreaming !== undefined && - (obj.serverStreaming = message.serverStreaming); + message.options !== undefined && (obj.options = message.options ? MethodOptions.toJSON(message.options) : undefined); + message.clientStreaming !== undefined && (obj.clientStreaming = message.clientStreaming); + message.serverStreaming !== undefined && (obj.serverStreaming = message.serverStreaming); return obj; }, - fromPartial, I>>( - object: I - ): MethodDescriptorProto { + fromPartial, I>>(object: I): MethodDescriptorProto { const message = createBaseMethodDescriptorProto(); message.name = object.name ?? ""; message.inputType = object.inputType ?? ""; message.outputType = object.outputType ?? ""; - message.options = - object.options !== undefined && object.options !== null - ? MethodOptions.fromPartial(object.options) - : undefined; + message.options = object.options !== undefined && object.options !== null ? MethodOptions.fromPartial(object.options) : undefined; message.clientStreaming = object.clientStreaming ?? false; message.serverStreaming = object.serverStreaming ?? false; return message; - }, + } }; messageTypeRegistry.set(MethodDescriptorProto.$type, MethodDescriptorProto); @@ -2873,17 +2490,14 @@ function createBaseFileOptions(): FileOptions { phpNamespace: "", phpMetadataNamespace: "", rubyPackage: "", - uninterpretedOption: [], + uninterpretedOption: [] }; } export const FileOptions = { $type: "google.protobuf.FileOptions" as const, - encode( - message: FileOptions, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: FileOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.javaPackage !== "") { writer.uint32(10).string(message.javaPackage); } @@ -3018,9 +2632,7 @@ export const FileOptions = { message.rubyPackage = reader.string(); break; case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); + message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -3034,122 +2646,65 @@ export const FileOptions = { return { $type: FileOptions.$type, javaPackage: isSet(object.javaPackage) ? String(object.javaPackage) : "", - javaOuterClassname: isSet(object.javaOuterClassname) - ? String(object.javaOuterClassname) - : "", - javaMultipleFiles: isSet(object.javaMultipleFiles) - ? Boolean(object.javaMultipleFiles) - : false, - javaGenerateEqualsAndHash: isSet(object.javaGenerateEqualsAndHash) - ? Boolean(object.javaGenerateEqualsAndHash) - : false, - javaStringCheckUtf8: isSet(object.javaStringCheckUtf8) - ? Boolean(object.javaStringCheckUtf8) - : false, - optimizeFor: isSet(object.optimizeFor) - ? fileOptions_OptimizeModeFromJSON(object.optimizeFor) - : 1, + javaOuterClassname: isSet(object.javaOuterClassname) ? String(object.javaOuterClassname) : "", + javaMultipleFiles: isSet(object.javaMultipleFiles) ? Boolean(object.javaMultipleFiles) : false, + javaGenerateEqualsAndHash: isSet(object.javaGenerateEqualsAndHash) ? Boolean(object.javaGenerateEqualsAndHash) : false, + javaStringCheckUtf8: isSet(object.javaStringCheckUtf8) ? Boolean(object.javaStringCheckUtf8) : false, + optimizeFor: isSet(object.optimizeFor) ? fileOptions_OptimizeModeFromJSON(object.optimizeFor) : 1, goPackage: isSet(object.goPackage) ? String(object.goPackage) : "", - ccGenericServices: isSet(object.ccGenericServices) - ? Boolean(object.ccGenericServices) - : false, - javaGenericServices: isSet(object.javaGenericServices) - ? Boolean(object.javaGenericServices) - : false, - pyGenericServices: isSet(object.pyGenericServices) - ? Boolean(object.pyGenericServices) - : false, - phpGenericServices: isSet(object.phpGenericServices) - ? Boolean(object.phpGenericServices) - : false, + ccGenericServices: isSet(object.ccGenericServices) ? Boolean(object.ccGenericServices) : false, + javaGenericServices: isSet(object.javaGenericServices) ? Boolean(object.javaGenericServices) : false, + pyGenericServices: isSet(object.pyGenericServices) ? Boolean(object.pyGenericServices) : false, + phpGenericServices: isSet(object.phpGenericServices) ? Boolean(object.phpGenericServices) : false, deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false, - ccEnableArenas: isSet(object.ccEnableArenas) - ? Boolean(object.ccEnableArenas) - : false, - objcClassPrefix: isSet(object.objcClassPrefix) - ? String(object.objcClassPrefix) - : "", - csharpNamespace: isSet(object.csharpNamespace) - ? String(object.csharpNamespace) - : "", + ccEnableArenas: isSet(object.ccEnableArenas) ? Boolean(object.ccEnableArenas) : false, + objcClassPrefix: isSet(object.objcClassPrefix) ? String(object.objcClassPrefix) : "", + csharpNamespace: isSet(object.csharpNamespace) ? String(object.csharpNamespace) : "", swiftPrefix: isSet(object.swiftPrefix) ? String(object.swiftPrefix) : "", - phpClassPrefix: isSet(object.phpClassPrefix) - ? String(object.phpClassPrefix) - : "", - phpNamespace: isSet(object.phpNamespace) - ? String(object.phpNamespace) - : "", - phpMetadataNamespace: isSet(object.phpMetadataNamespace) - ? String(object.phpMetadataNamespace) - : "", + phpClassPrefix: isSet(object.phpClassPrefix) ? String(object.phpClassPrefix) : "", + phpNamespace: isSet(object.phpNamespace) ? String(object.phpNamespace) : "", + phpMetadataNamespace: isSet(object.phpMetadataNamespace) ? String(object.phpMetadataNamespace) : "", rubyPackage: isSet(object.rubyPackage) ? String(object.rubyPackage) : "", - uninterpretedOption: Array.isArray(object?.uninterpretedOption) - ? object.uninterpretedOption.map((e: any) => - UninterpretedOption.fromJSON(e) - ) - : [], + uninterpretedOption: Array.isArray(object?.uninterpretedOption) ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)) : [] }; }, toJSON(message: FileOptions): unknown { const obj: any = {}; - message.javaPackage !== undefined && - (obj.javaPackage = message.javaPackage); - message.javaOuterClassname !== undefined && - (obj.javaOuterClassname = message.javaOuterClassname); - message.javaMultipleFiles !== undefined && - (obj.javaMultipleFiles = message.javaMultipleFiles); - message.javaGenerateEqualsAndHash !== undefined && - (obj.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash); - message.javaStringCheckUtf8 !== undefined && - (obj.javaStringCheckUtf8 = message.javaStringCheckUtf8); - message.optimizeFor !== undefined && - (obj.optimizeFor = fileOptions_OptimizeModeToJSON(message.optimizeFor)); + message.javaPackage !== undefined && (obj.javaPackage = message.javaPackage); + message.javaOuterClassname !== undefined && (obj.javaOuterClassname = message.javaOuterClassname); + message.javaMultipleFiles !== undefined && (obj.javaMultipleFiles = message.javaMultipleFiles); + message.javaGenerateEqualsAndHash !== undefined && (obj.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash); + message.javaStringCheckUtf8 !== undefined && (obj.javaStringCheckUtf8 = message.javaStringCheckUtf8); + message.optimizeFor !== undefined && (obj.optimizeFor = fileOptions_OptimizeModeToJSON(message.optimizeFor)); message.goPackage !== undefined && (obj.goPackage = message.goPackage); - message.ccGenericServices !== undefined && - (obj.ccGenericServices = message.ccGenericServices); - message.javaGenericServices !== undefined && - (obj.javaGenericServices = message.javaGenericServices); - message.pyGenericServices !== undefined && - (obj.pyGenericServices = message.pyGenericServices); - message.phpGenericServices !== undefined && - (obj.phpGenericServices = message.phpGenericServices); + message.ccGenericServices !== undefined && (obj.ccGenericServices = message.ccGenericServices); + message.javaGenericServices !== undefined && (obj.javaGenericServices = message.javaGenericServices); + message.pyGenericServices !== undefined && (obj.pyGenericServices = message.pyGenericServices); + message.phpGenericServices !== undefined && (obj.phpGenericServices = message.phpGenericServices); message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.ccEnableArenas !== undefined && - (obj.ccEnableArenas = message.ccEnableArenas); - message.objcClassPrefix !== undefined && - (obj.objcClassPrefix = message.objcClassPrefix); - message.csharpNamespace !== undefined && - (obj.csharpNamespace = message.csharpNamespace); - message.swiftPrefix !== undefined && - (obj.swiftPrefix = message.swiftPrefix); - message.phpClassPrefix !== undefined && - (obj.phpClassPrefix = message.phpClassPrefix); - message.phpNamespace !== undefined && - (obj.phpNamespace = message.phpNamespace); - message.phpMetadataNamespace !== undefined && - (obj.phpMetadataNamespace = message.phpMetadataNamespace); - message.rubyPackage !== undefined && - (obj.rubyPackage = message.rubyPackage); + message.ccEnableArenas !== undefined && (obj.ccEnableArenas = message.ccEnableArenas); + message.objcClassPrefix !== undefined && (obj.objcClassPrefix = message.objcClassPrefix); + message.csharpNamespace !== undefined && (obj.csharpNamespace = message.csharpNamespace); + message.swiftPrefix !== undefined && (obj.swiftPrefix = message.swiftPrefix); + message.phpClassPrefix !== undefined && (obj.phpClassPrefix = message.phpClassPrefix); + message.phpNamespace !== undefined && (obj.phpNamespace = message.phpNamespace); + message.phpMetadataNamespace !== undefined && (obj.phpMetadataNamespace = message.phpMetadataNamespace); + message.rubyPackage !== undefined && (obj.rubyPackage = message.rubyPackage); if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); + obj.uninterpretedOption = message.uninterpretedOption.map(e => (e ? UninterpretedOption.toJSON(e) : undefined)); } else { obj.uninterpretedOption = []; } return obj; }, - fromPartial, I>>( - object: I - ): FileOptions { + fromPartial, I>>(object: I): FileOptions { const message = createBaseFileOptions(); message.javaPackage = object.javaPackage ?? ""; message.javaOuterClassname = object.javaOuterClassname ?? ""; message.javaMultipleFiles = object.javaMultipleFiles ?? false; - message.javaGenerateEqualsAndHash = - object.javaGenerateEqualsAndHash ?? false; + message.javaGenerateEqualsAndHash = object.javaGenerateEqualsAndHash ?? false; message.javaStringCheckUtf8 = object.javaStringCheckUtf8 ?? false; message.optimizeFor = object.optimizeFor ?? 1; message.goPackage = object.goPackage ?? ""; @@ -3166,12 +2721,9 @@ export const FileOptions = { message.phpNamespace = object.phpNamespace ?? ""; message.phpMetadataNamespace = object.phpMetadataNamespace ?? ""; message.rubyPackage = object.rubyPackage ?? ""; - message.uninterpretedOption = - object.uninterpretedOption?.map((e) => - UninterpretedOption.fromPartial(e) - ) || []; + message.uninterpretedOption = object.uninterpretedOption?.map(e => UninterpretedOption.fromPartial(e)) || []; return message; - }, + } }; messageTypeRegistry.set(FileOptions.$type, FileOptions); @@ -3183,17 +2735,14 @@ function createBaseMessageOptions(): MessageOptions { noStandardDescriptorAccessor: false, deprecated: false, mapEntry: false, - uninterpretedOption: [], + uninterpretedOption: [] }; } export const MessageOptions = { $type: "google.protobuf.MessageOptions" as const, - encode( - message: MessageOptions, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MessageOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.messageSetWireFormat === true) { writer.uint32(8).bool(message.messageSetWireFormat); } @@ -3232,9 +2781,7 @@ export const MessageOptions = { message.mapEntry = reader.bool(); break; case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); + message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -3247,55 +2794,37 @@ export const MessageOptions = { fromJSON(object: any): MessageOptions { return { $type: MessageOptions.$type, - messageSetWireFormat: isSet(object.messageSetWireFormat) - ? Boolean(object.messageSetWireFormat) - : false, - noStandardDescriptorAccessor: isSet(object.noStandardDescriptorAccessor) - ? Boolean(object.noStandardDescriptorAccessor) - : false, + messageSetWireFormat: isSet(object.messageSetWireFormat) ? Boolean(object.messageSetWireFormat) : false, + noStandardDescriptorAccessor: isSet(object.noStandardDescriptorAccessor) ? Boolean(object.noStandardDescriptorAccessor) : false, deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false, mapEntry: isSet(object.mapEntry) ? Boolean(object.mapEntry) : false, - uninterpretedOption: Array.isArray(object?.uninterpretedOption) - ? object.uninterpretedOption.map((e: any) => - UninterpretedOption.fromJSON(e) - ) - : [], + uninterpretedOption: Array.isArray(object?.uninterpretedOption) ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)) : [] }; }, toJSON(message: MessageOptions): unknown { const obj: any = {}; - message.messageSetWireFormat !== undefined && - (obj.messageSetWireFormat = message.messageSetWireFormat); - message.noStandardDescriptorAccessor !== undefined && - (obj.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor); + message.messageSetWireFormat !== undefined && (obj.messageSetWireFormat = message.messageSetWireFormat); + message.noStandardDescriptorAccessor !== undefined && (obj.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor); message.deprecated !== undefined && (obj.deprecated = message.deprecated); message.mapEntry !== undefined && (obj.mapEntry = message.mapEntry); if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); + obj.uninterpretedOption = message.uninterpretedOption.map(e => (e ? UninterpretedOption.toJSON(e) : undefined)); } else { obj.uninterpretedOption = []; } return obj; }, - fromPartial, I>>( - object: I - ): MessageOptions { + fromPartial, I>>(object: I): MessageOptions { const message = createBaseMessageOptions(); message.messageSetWireFormat = object.messageSetWireFormat ?? false; - message.noStandardDescriptorAccessor = - object.noStandardDescriptorAccessor ?? false; + message.noStandardDescriptorAccessor = object.noStandardDescriptorAccessor ?? false; message.deprecated = object.deprecated ?? false; message.mapEntry = object.mapEntry ?? false; - message.uninterpretedOption = - object.uninterpretedOption?.map((e) => - UninterpretedOption.fromPartial(e) - ) || []; + message.uninterpretedOption = object.uninterpretedOption?.map(e => UninterpretedOption.fromPartial(e)) || []; return message; - }, + } }; messageTypeRegistry.set(MessageOptions.$type, MessageOptions); @@ -3309,17 +2838,14 @@ function createBaseFieldOptions(): FieldOptions { lazy: false, deprecated: false, weak: false, - uninterpretedOption: [], + uninterpretedOption: [] }; } export const FieldOptions = { $type: "google.protobuf.FieldOptions" as const, - encode( - message: FieldOptions, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: FieldOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.ctype !== 0) { writer.uint32(8).int32(message.ctype); } @@ -3370,9 +2896,7 @@ export const FieldOptions = { message.weak = reader.bool(); break; case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); + message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -3387,43 +2911,31 @@ export const FieldOptions = { $type: FieldOptions.$type, ctype: isSet(object.ctype) ? fieldOptions_CTypeFromJSON(object.ctype) : 0, packed: isSet(object.packed) ? Boolean(object.packed) : false, - jstype: isSet(object.jstype) - ? fieldOptions_JSTypeFromJSON(object.jstype) - : 0, + jstype: isSet(object.jstype) ? fieldOptions_JSTypeFromJSON(object.jstype) : 0, lazy: isSet(object.lazy) ? Boolean(object.lazy) : false, deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false, weak: isSet(object.weak) ? Boolean(object.weak) : false, - uninterpretedOption: Array.isArray(object?.uninterpretedOption) - ? object.uninterpretedOption.map((e: any) => - UninterpretedOption.fromJSON(e) - ) - : [], + uninterpretedOption: Array.isArray(object?.uninterpretedOption) ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)) : [] }; }, toJSON(message: FieldOptions): unknown { const obj: any = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); + message.ctype !== undefined && (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); + message.jstype !== undefined && (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); message.lazy !== undefined && (obj.lazy = message.lazy); message.deprecated !== undefined && (obj.deprecated = message.deprecated); message.weak !== undefined && (obj.weak = message.weak); if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); + obj.uninterpretedOption = message.uninterpretedOption.map(e => (e ? UninterpretedOption.toJSON(e) : undefined)); } else { obj.uninterpretedOption = []; } return obj; }, - fromPartial, I>>( - object: I - ): FieldOptions { + fromPartial, I>>(object: I): FieldOptions { const message = createBaseFieldOptions(); message.ctype = object.ctype ?? 0; message.packed = object.packed ?? false; @@ -3431,12 +2943,9 @@ export const FieldOptions = { message.lazy = object.lazy ?? false; message.deprecated = object.deprecated ?? false; message.weak = object.weak ?? false; - message.uninterpretedOption = - object.uninterpretedOption?.map((e) => - UninterpretedOption.fromPartial(e) - ) || []; + message.uninterpretedOption = object.uninterpretedOption?.map(e => UninterpretedOption.fromPartial(e)) || []; return message; - }, + } }; messageTypeRegistry.set(FieldOptions.$type, FieldOptions); @@ -3448,10 +2957,7 @@ function createBaseOneofOptions(): OneofOptions { export const OneofOptions = { $type: "google.protobuf.OneofOptions" as const, - encode( - message: OneofOptions, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: OneofOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.uninterpretedOption) { UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); } @@ -3466,9 +2972,7 @@ export const OneofOptions = { const tag = reader.uint32(); switch (tag >>> 3) { case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); + message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -3481,36 +2985,25 @@ export const OneofOptions = { fromJSON(object: any): OneofOptions { return { $type: OneofOptions.$type, - uninterpretedOption: Array.isArray(object?.uninterpretedOption) - ? object.uninterpretedOption.map((e: any) => - UninterpretedOption.fromJSON(e) - ) - : [], + uninterpretedOption: Array.isArray(object?.uninterpretedOption) ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)) : [] }; }, toJSON(message: OneofOptions): unknown { const obj: any = {}; if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); + obj.uninterpretedOption = message.uninterpretedOption.map(e => (e ? UninterpretedOption.toJSON(e) : undefined)); } else { obj.uninterpretedOption = []; } return obj; }, - fromPartial, I>>( - object: I - ): OneofOptions { + fromPartial, I>>(object: I): OneofOptions { const message = createBaseOneofOptions(); - message.uninterpretedOption = - object.uninterpretedOption?.map((e) => - UninterpretedOption.fromPartial(e) - ) || []; + message.uninterpretedOption = object.uninterpretedOption?.map(e => UninterpretedOption.fromPartial(e)) || []; return message; - }, + } }; messageTypeRegistry.set(OneofOptions.$type, OneofOptions); @@ -3520,17 +3013,14 @@ function createBaseEnumOptions(): EnumOptions { $type: "google.protobuf.EnumOptions", allowAlias: false, deprecated: false, - uninterpretedOption: [], + uninterpretedOption: [] }; } export const EnumOptions = { $type: "google.protobuf.EnumOptions" as const, - encode( - message: EnumOptions, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: EnumOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.allowAlias === true) { writer.uint32(16).bool(message.allowAlias); } @@ -3557,9 +3047,7 @@ export const EnumOptions = { message.deprecated = reader.bool(); break; case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); + message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -3574,11 +3062,7 @@ export const EnumOptions = { $type: EnumOptions.$type, allowAlias: isSet(object.allowAlias) ? Boolean(object.allowAlias) : false, deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false, - uninterpretedOption: Array.isArray(object?.uninterpretedOption) - ? object.uninterpretedOption.map((e: any) => - UninterpretedOption.fromJSON(e) - ) - : [], + uninterpretedOption: Array.isArray(object?.uninterpretedOption) ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)) : [] }; }, @@ -3587,27 +3071,20 @@ export const EnumOptions = { message.allowAlias !== undefined && (obj.allowAlias = message.allowAlias); message.deprecated !== undefined && (obj.deprecated = message.deprecated); if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); + obj.uninterpretedOption = message.uninterpretedOption.map(e => (e ? UninterpretedOption.toJSON(e) : undefined)); } else { obj.uninterpretedOption = []; } return obj; }, - fromPartial, I>>( - object: I - ): EnumOptions { + fromPartial, I>>(object: I): EnumOptions { const message = createBaseEnumOptions(); message.allowAlias = object.allowAlias ?? false; message.deprecated = object.deprecated ?? false; - message.uninterpretedOption = - object.uninterpretedOption?.map((e) => - UninterpretedOption.fromPartial(e) - ) || []; + message.uninterpretedOption = object.uninterpretedOption?.map(e => UninterpretedOption.fromPartial(e)) || []; return message; - }, + } }; messageTypeRegistry.set(EnumOptions.$type, EnumOptions); @@ -3616,17 +3093,14 @@ function createBaseEnumValueOptions(): EnumValueOptions { return { $type: "google.protobuf.EnumValueOptions", deprecated: false, - uninterpretedOption: [], + uninterpretedOption: [] }; } export const EnumValueOptions = { $type: "google.protobuf.EnumValueOptions" as const, - encode( - message: EnumValueOptions, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: EnumValueOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.deprecated === true) { writer.uint32(8).bool(message.deprecated); } @@ -3647,9 +3121,7 @@ export const EnumValueOptions = { message.deprecated = reader.bool(); break; case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); + message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -3663,11 +3135,7 @@ export const EnumValueOptions = { return { $type: EnumValueOptions.$type, deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false, - uninterpretedOption: Array.isArray(object?.uninterpretedOption) - ? object.uninterpretedOption.map((e: any) => - UninterpretedOption.fromJSON(e) - ) - : [], + uninterpretedOption: Array.isArray(object?.uninterpretedOption) ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)) : [] }; }, @@ -3675,26 +3143,19 @@ export const EnumValueOptions = { const obj: any = {}; message.deprecated !== undefined && (obj.deprecated = message.deprecated); if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); + obj.uninterpretedOption = message.uninterpretedOption.map(e => (e ? UninterpretedOption.toJSON(e) : undefined)); } else { obj.uninterpretedOption = []; } return obj; }, - fromPartial, I>>( - object: I - ): EnumValueOptions { + fromPartial, I>>(object: I): EnumValueOptions { const message = createBaseEnumValueOptions(); message.deprecated = object.deprecated ?? false; - message.uninterpretedOption = - object.uninterpretedOption?.map((e) => - UninterpretedOption.fromPartial(e) - ) || []; + message.uninterpretedOption = object.uninterpretedOption?.map(e => UninterpretedOption.fromPartial(e)) || []; return message; - }, + } }; messageTypeRegistry.set(EnumValueOptions.$type, EnumValueOptions); @@ -3703,17 +3164,14 @@ function createBaseServiceOptions(): ServiceOptions { return { $type: "google.protobuf.ServiceOptions", deprecated: false, - uninterpretedOption: [], + uninterpretedOption: [] }; } export const ServiceOptions = { $type: "google.protobuf.ServiceOptions" as const, - encode( - message: ServiceOptions, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: ServiceOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.deprecated === true) { writer.uint32(264).bool(message.deprecated); } @@ -3734,9 +3192,7 @@ export const ServiceOptions = { message.deprecated = reader.bool(); break; case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); + message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -3750,11 +3206,7 @@ export const ServiceOptions = { return { $type: ServiceOptions.$type, deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false, - uninterpretedOption: Array.isArray(object?.uninterpretedOption) - ? object.uninterpretedOption.map((e: any) => - UninterpretedOption.fromJSON(e) - ) - : [], + uninterpretedOption: Array.isArray(object?.uninterpretedOption) ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)) : [] }; }, @@ -3762,26 +3214,19 @@ export const ServiceOptions = { const obj: any = {}; message.deprecated !== undefined && (obj.deprecated = message.deprecated); if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); + obj.uninterpretedOption = message.uninterpretedOption.map(e => (e ? UninterpretedOption.toJSON(e) : undefined)); } else { obj.uninterpretedOption = []; } return obj; }, - fromPartial, I>>( - object: I - ): ServiceOptions { + fromPartial, I>>(object: I): ServiceOptions { const message = createBaseServiceOptions(); message.deprecated = object.deprecated ?? false; - message.uninterpretedOption = - object.uninterpretedOption?.map((e) => - UninterpretedOption.fromPartial(e) - ) || []; + message.uninterpretedOption = object.uninterpretedOption?.map(e => UninterpretedOption.fromPartial(e)) || []; return message; - }, + } }; messageTypeRegistry.set(ServiceOptions.$type, ServiceOptions); @@ -3791,17 +3236,14 @@ function createBaseMethodOptions(): MethodOptions { $type: "google.protobuf.MethodOptions", deprecated: false, idempotencyLevel: 0, - uninterpretedOption: [], + uninterpretedOption: [] }; } export const MethodOptions = { $type: "google.protobuf.MethodOptions" as const, - encode( - message: MethodOptions, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MethodOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.deprecated === true) { writer.uint32(264).bool(message.deprecated); } @@ -3828,9 +3270,7 @@ export const MethodOptions = { message.idempotencyLevel = reader.int32() as any; break; case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); + message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -3844,46 +3284,30 @@ export const MethodOptions = { return { $type: MethodOptions.$type, deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false, - idempotencyLevel: isSet(object.idempotencyLevel) - ? methodOptions_IdempotencyLevelFromJSON(object.idempotencyLevel) - : 0, - uninterpretedOption: Array.isArray(object?.uninterpretedOption) - ? object.uninterpretedOption.map((e: any) => - UninterpretedOption.fromJSON(e) - ) - : [], + idempotencyLevel: isSet(object.idempotencyLevel) ? methodOptions_IdempotencyLevelFromJSON(object.idempotencyLevel) : 0, + uninterpretedOption: Array.isArray(object?.uninterpretedOption) ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)) : [] }; }, toJSON(message: MethodOptions): unknown { const obj: any = {}; message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotencyLevel !== undefined && - (obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON( - message.idempotencyLevel - )); + message.idempotencyLevel !== undefined && (obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON(message.idempotencyLevel)); if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined - ); + obj.uninterpretedOption = message.uninterpretedOption.map(e => (e ? UninterpretedOption.toJSON(e) : undefined)); } else { obj.uninterpretedOption = []; } return obj; }, - fromPartial, I>>( - object: I - ): MethodOptions { + fromPartial, I>>(object: I): MethodOptions { const message = createBaseMethodOptions(); message.deprecated = object.deprecated ?? false; message.idempotencyLevel = object.idempotencyLevel ?? 0; - message.uninterpretedOption = - object.uninterpretedOption?.map((e) => - UninterpretedOption.fromPartial(e) - ) || []; + message.uninterpretedOption = object.uninterpretedOption?.map(e => UninterpretedOption.fromPartial(e)) || []; return message; - }, + } }; messageTypeRegistry.set(MethodOptions.$type, MethodOptions); @@ -3897,22 +3321,16 @@ function createBaseUninterpretedOption(): UninterpretedOption { negativeIntValue: Long.ZERO, doubleValue: 0, stringValue: new Uint8Array(), - aggregateValue: "", + aggregateValue: "" }; } export const UninterpretedOption = { $type: "google.protobuf.UninterpretedOption" as const, - encode( - message: UninterpretedOption, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: UninterpretedOption, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.name) { - UninterpretedOption_NamePart.encode( - v!, - writer.uint32(18).fork() - ).ldelim(); + UninterpretedOption_NamePart.encode(v!, writer.uint32(18).fork()).ldelim(); } if (message.identifierValue !== "") { writer.uint32(26).string(message.identifierValue); @@ -3943,9 +3361,7 @@ export const UninterpretedOption = { const tag = reader.uint32(); switch (tag >>> 3) { case 2: - message.name.push( - UninterpretedOption_NamePart.decode(reader, reader.uint32()) - ); + message.name.push(UninterpretedOption_NamePart.decode(reader, reader.uint32())); break; case 3: message.identifierValue = reader.string(); @@ -3976,81 +3392,43 @@ export const UninterpretedOption = { fromJSON(object: any): UninterpretedOption { return { $type: UninterpretedOption.$type, - name: Array.isArray(object?.name) - ? object.name.map((e: any) => UninterpretedOption_NamePart.fromJSON(e)) - : [], - identifierValue: isSet(object.identifierValue) - ? String(object.identifierValue) - : "", - positiveIntValue: isSet(object.positiveIntValue) - ? Long.fromValue(object.positiveIntValue) - : Long.UZERO, - negativeIntValue: isSet(object.negativeIntValue) - ? Long.fromValue(object.negativeIntValue) - : Long.ZERO, + name: Array.isArray(object?.name) ? object.name.map((e: any) => UninterpretedOption_NamePart.fromJSON(e)) : [], + identifierValue: isSet(object.identifierValue) ? String(object.identifierValue) : "", + positiveIntValue: isSet(object.positiveIntValue) ? Long.fromValue(object.positiveIntValue) : Long.UZERO, + negativeIntValue: isSet(object.negativeIntValue) ? Long.fromValue(object.negativeIntValue) : Long.ZERO, doubleValue: isSet(object.doubleValue) ? Number(object.doubleValue) : 0, - stringValue: isSet(object.stringValue) - ? bytesFromBase64(object.stringValue) - : new Uint8Array(), - aggregateValue: isSet(object.aggregateValue) - ? String(object.aggregateValue) - : "", + stringValue: isSet(object.stringValue) ? bytesFromBase64(object.stringValue) : new Uint8Array(), + aggregateValue: isSet(object.aggregateValue) ? String(object.aggregateValue) : "" }; }, toJSON(message: UninterpretedOption): unknown { const obj: any = {}; if (message.name) { - obj.name = message.name.map((e) => - e ? UninterpretedOption_NamePart.toJSON(e) : undefined - ); + obj.name = message.name.map(e => (e ? UninterpretedOption_NamePart.toJSON(e) : undefined)); } else { obj.name = []; } - message.identifierValue !== undefined && - (obj.identifierValue = message.identifierValue); - message.positiveIntValue !== undefined && - (obj.positiveIntValue = ( - message.positiveIntValue || Long.UZERO - ).toString()); - message.negativeIntValue !== undefined && - (obj.negativeIntValue = ( - message.negativeIntValue || Long.ZERO - ).toString()); - message.doubleValue !== undefined && - (obj.doubleValue = message.doubleValue); - message.stringValue !== undefined && - (obj.stringValue = base64FromBytes( - message.stringValue !== undefined - ? message.stringValue - : new Uint8Array() - )); - message.aggregateValue !== undefined && - (obj.aggregateValue = message.aggregateValue); + message.identifierValue !== undefined && (obj.identifierValue = message.identifierValue); + message.positiveIntValue !== undefined && (obj.positiveIntValue = (message.positiveIntValue || Long.UZERO).toString()); + message.negativeIntValue !== undefined && (obj.negativeIntValue = (message.negativeIntValue || Long.ZERO).toString()); + message.doubleValue !== undefined && (obj.doubleValue = message.doubleValue); + message.stringValue !== undefined && (obj.stringValue = base64FromBytes(message.stringValue !== undefined ? message.stringValue : new Uint8Array())); + message.aggregateValue !== undefined && (obj.aggregateValue = message.aggregateValue); return obj; }, - fromPartial, I>>( - object: I - ): UninterpretedOption { + fromPartial, I>>(object: I): UninterpretedOption { const message = createBaseUninterpretedOption(); - message.name = - object.name?.map((e) => UninterpretedOption_NamePart.fromPartial(e)) || - []; + message.name = object.name?.map(e => UninterpretedOption_NamePart.fromPartial(e)) || []; message.identifierValue = object.identifierValue ?? ""; - message.positiveIntValue = - object.positiveIntValue !== undefined && object.positiveIntValue !== null - ? Long.fromValue(object.positiveIntValue) - : Long.UZERO; - message.negativeIntValue = - object.negativeIntValue !== undefined && object.negativeIntValue !== null - ? Long.fromValue(object.negativeIntValue) - : Long.ZERO; + message.positiveIntValue = object.positiveIntValue !== undefined && object.positiveIntValue !== null ? Long.fromValue(object.positiveIntValue) : Long.UZERO; + message.negativeIntValue = object.negativeIntValue !== undefined && object.negativeIntValue !== null ? Long.fromValue(object.negativeIntValue) : Long.ZERO; message.doubleValue = object.doubleValue ?? 0; message.stringValue = object.stringValue ?? new Uint8Array(); message.aggregateValue = object.aggregateValue ?? ""; return message; - }, + } }; messageTypeRegistry.set(UninterpretedOption.$type, UninterpretedOption); @@ -4059,17 +3437,14 @@ function createBaseUninterpretedOption_NamePart(): UninterpretedOption_NamePart return { $type: "google.protobuf.UninterpretedOption.NamePart", namePart: "", - isExtension: false, + isExtension: false }; } export const UninterpretedOption_NamePart = { $type: "google.protobuf.UninterpretedOption.NamePart" as const, - encode( - message: UninterpretedOption_NamePart, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: UninterpretedOption_NamePart, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.namePart !== "") { writer.uint32(10).string(message.namePart); } @@ -4079,10 +3454,7 @@ export const UninterpretedOption_NamePart = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): UninterpretedOption_NamePart { + decode(input: _m0.Reader | Uint8Array, length?: number): UninterpretedOption_NamePart { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseUninterpretedOption_NamePart(); @@ -4107,34 +3479,26 @@ export const UninterpretedOption_NamePart = { return { $type: UninterpretedOption_NamePart.$type, namePart: isSet(object.namePart) ? String(object.namePart) : "", - isExtension: isSet(object.isExtension) - ? Boolean(object.isExtension) - : false, + isExtension: isSet(object.isExtension) ? Boolean(object.isExtension) : false }; }, toJSON(message: UninterpretedOption_NamePart): unknown { const obj: any = {}; message.namePart !== undefined && (obj.namePart = message.namePart); - message.isExtension !== undefined && - (obj.isExtension = message.isExtension); + message.isExtension !== undefined && (obj.isExtension = message.isExtension); return obj; }, - fromPartial, I>>( - object: I - ): UninterpretedOption_NamePart { + fromPartial, I>>(object: I): UninterpretedOption_NamePart { const message = createBaseUninterpretedOption_NamePart(); message.namePart = object.namePart ?? ""; message.isExtension = object.isExtension ?? false; return message; - }, + } }; -messageTypeRegistry.set( - UninterpretedOption_NamePart.$type, - UninterpretedOption_NamePart -); +messageTypeRegistry.set(UninterpretedOption_NamePart.$type, UninterpretedOption_NamePart); function createBaseSourceCodeInfo(): SourceCodeInfo { return { $type: "google.protobuf.SourceCodeInfo", location: [] }; @@ -4143,10 +3507,7 @@ function createBaseSourceCodeInfo(): SourceCodeInfo { export const SourceCodeInfo = { $type: "google.protobuf.SourceCodeInfo" as const, - encode( - message: SourceCodeInfo, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: SourceCodeInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.location) { SourceCodeInfo_Location.encode(v!, writer.uint32(10).fork()).ldelim(); } @@ -4161,9 +3522,7 @@ export const SourceCodeInfo = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.location.push( - SourceCodeInfo_Location.decode(reader, reader.uint32()) - ); + message.location.push(SourceCodeInfo_Location.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -4176,32 +3535,25 @@ export const SourceCodeInfo = { fromJSON(object: any): SourceCodeInfo { return { $type: SourceCodeInfo.$type, - location: Array.isArray(object?.location) - ? object.location.map((e: any) => SourceCodeInfo_Location.fromJSON(e)) - : [], + location: Array.isArray(object?.location) ? object.location.map((e: any) => SourceCodeInfo_Location.fromJSON(e)) : [] }; }, toJSON(message: SourceCodeInfo): unknown { const obj: any = {}; if (message.location) { - obj.location = message.location.map((e) => - e ? SourceCodeInfo_Location.toJSON(e) : undefined - ); + obj.location = message.location.map(e => (e ? SourceCodeInfo_Location.toJSON(e) : undefined)); } else { obj.location = []; } return obj; }, - fromPartial, I>>( - object: I - ): SourceCodeInfo { + fromPartial, I>>(object: I): SourceCodeInfo { const message = createBaseSourceCodeInfo(); - message.location = - object.location?.map((e) => SourceCodeInfo_Location.fromPartial(e)) || []; + message.location = object.location?.map(e => SourceCodeInfo_Location.fromPartial(e)) || []; return message; - }, + } }; messageTypeRegistry.set(SourceCodeInfo.$type, SourceCodeInfo); @@ -4213,17 +3565,14 @@ function createBaseSourceCodeInfo_Location(): SourceCodeInfo_Location { span: [], leadingComments: "", trailingComments: "", - leadingDetachedComments: [], + leadingDetachedComments: [] }; } export const SourceCodeInfo_Location = { $type: "google.protobuf.SourceCodeInfo.Location" as const, - encode( - message: SourceCodeInfo_Location, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: SourceCodeInfo_Location, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { writer.uint32(10).fork(); for (const v of message.path) { writer.int32(v); @@ -4246,10 +3595,7 @@ export const SourceCodeInfo_Location = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): SourceCodeInfo_Location { + decode(input: _m0.Reader | Uint8Array, length?: number): SourceCodeInfo_Location { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSourceCodeInfo_Location(); @@ -4296,62 +3642,45 @@ export const SourceCodeInfo_Location = { fromJSON(object: any): SourceCodeInfo_Location { return { $type: SourceCodeInfo_Location.$type, - path: Array.isArray(object?.path) - ? object.path.map((e: any) => Number(e)) - : [], - span: Array.isArray(object?.span) - ? object.span.map((e: any) => Number(e)) - : [], - leadingComments: isSet(object.leadingComments) - ? String(object.leadingComments) - : "", - trailingComments: isSet(object.trailingComments) - ? String(object.trailingComments) - : "", - leadingDetachedComments: Array.isArray(object?.leadingDetachedComments) - ? object.leadingDetachedComments.map((e: any) => String(e)) - : [], + path: Array.isArray(object?.path) ? object.path.map((e: any) => Number(e)) : [], + span: Array.isArray(object?.span) ? object.span.map((e: any) => Number(e)) : [], + leadingComments: isSet(object.leadingComments) ? String(object.leadingComments) : "", + trailingComments: isSet(object.trailingComments) ? String(object.trailingComments) : "", + leadingDetachedComments: Array.isArray(object?.leadingDetachedComments) ? object.leadingDetachedComments.map((e: any) => String(e)) : [] }; }, toJSON(message: SourceCodeInfo_Location): unknown { const obj: any = {}; if (message.path) { - obj.path = message.path.map((e) => Math.round(e)); + obj.path = message.path.map(e => Math.round(e)); } else { obj.path = []; } if (message.span) { - obj.span = message.span.map((e) => Math.round(e)); + obj.span = message.span.map(e => Math.round(e)); } else { obj.span = []; } - message.leadingComments !== undefined && - (obj.leadingComments = message.leadingComments); - message.trailingComments !== undefined && - (obj.trailingComments = message.trailingComments); + message.leadingComments !== undefined && (obj.leadingComments = message.leadingComments); + message.trailingComments !== undefined && (obj.trailingComments = message.trailingComments); if (message.leadingDetachedComments) { - obj.leadingDetachedComments = message.leadingDetachedComments.map( - (e) => e - ); + obj.leadingDetachedComments = message.leadingDetachedComments.map(e => e); } else { obj.leadingDetachedComments = []; } return obj; }, - fromPartial, I>>( - object: I - ): SourceCodeInfo_Location { + fromPartial, I>>(object: I): SourceCodeInfo_Location { const message = createBaseSourceCodeInfo_Location(); - message.path = object.path?.map((e) => e) || []; - message.span = object.span?.map((e) => e) || []; + message.path = object.path?.map(e => e) || []; + message.span = object.span?.map(e => e) || []; message.leadingComments = object.leadingComments ?? ""; message.trailingComments = object.trailingComments ?? ""; - message.leadingDetachedComments = - object.leadingDetachedComments?.map((e) => e) || []; + message.leadingDetachedComments = object.leadingDetachedComments?.map(e => e) || []; return message; - }, + } }; messageTypeRegistry.set(SourceCodeInfo_Location.$type, SourceCodeInfo_Location); @@ -4363,15 +3692,9 @@ function createBaseGeneratedCodeInfo(): GeneratedCodeInfo { export const GeneratedCodeInfo = { $type: "google.protobuf.GeneratedCodeInfo" as const, - encode( - message: GeneratedCodeInfo, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: GeneratedCodeInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode( - v!, - writer.uint32(10).fork() - ).ldelim(); + GeneratedCodeInfo_Annotation.encode(v!, writer.uint32(10).fork()).ldelim(); } return writer; }, @@ -4384,9 +3707,7 @@ export const GeneratedCodeInfo = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.annotation.push( - GeneratedCodeInfo_Annotation.decode(reader, reader.uint32()) - ); + message.annotation.push(GeneratedCodeInfo_Annotation.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -4399,36 +3720,25 @@ export const GeneratedCodeInfo = { fromJSON(object: any): GeneratedCodeInfo { return { $type: GeneratedCodeInfo.$type, - annotation: Array.isArray(object?.annotation) - ? object.annotation.map((e: any) => - GeneratedCodeInfo_Annotation.fromJSON(e) - ) - : [], + annotation: Array.isArray(object?.annotation) ? object.annotation.map((e: any) => GeneratedCodeInfo_Annotation.fromJSON(e)) : [] }; }, toJSON(message: GeneratedCodeInfo): unknown { const obj: any = {}; if (message.annotation) { - obj.annotation = message.annotation.map((e) => - e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined - ); + obj.annotation = message.annotation.map(e => (e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined)); } else { obj.annotation = []; } return obj; }, - fromPartial, I>>( - object: I - ): GeneratedCodeInfo { + fromPartial, I>>(object: I): GeneratedCodeInfo { const message = createBaseGeneratedCodeInfo(); - message.annotation = - object.annotation?.map((e) => - GeneratedCodeInfo_Annotation.fromPartial(e) - ) || []; + message.annotation = object.annotation?.map(e => GeneratedCodeInfo_Annotation.fromPartial(e)) || []; return message; - }, + } }; messageTypeRegistry.set(GeneratedCodeInfo.$type, GeneratedCodeInfo); @@ -4439,17 +3749,14 @@ function createBaseGeneratedCodeInfo_Annotation(): GeneratedCodeInfo_Annotation path: [], sourceFile: "", begin: 0, - end: 0, + end: 0 }; } export const GeneratedCodeInfo_Annotation = { $type: "google.protobuf.GeneratedCodeInfo.Annotation" as const, - encode( - message: GeneratedCodeInfo_Annotation, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: GeneratedCodeInfo_Annotation, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { writer.uint32(10).fork(); for (const v of message.path) { writer.int32(v); @@ -4467,10 +3774,7 @@ export const GeneratedCodeInfo_Annotation = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): GeneratedCodeInfo_Annotation { + decode(input: _m0.Reader | Uint8Array, length?: number): GeneratedCodeInfo_Annotation { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGeneratedCodeInfo_Annotation(); @@ -4507,19 +3811,17 @@ export const GeneratedCodeInfo_Annotation = { fromJSON(object: any): GeneratedCodeInfo_Annotation { return { $type: GeneratedCodeInfo_Annotation.$type, - path: Array.isArray(object?.path) - ? object.path.map((e: any) => Number(e)) - : [], + path: Array.isArray(object?.path) ? object.path.map((e: any) => Number(e)) : [], sourceFile: isSet(object.sourceFile) ? String(object.sourceFile) : "", begin: isSet(object.begin) ? Number(object.begin) : 0, - end: isSet(object.end) ? Number(object.end) : 0, + end: isSet(object.end) ? Number(object.end) : 0 }; }, toJSON(message: GeneratedCodeInfo_Annotation): unknown { const obj: any = {}; if (message.path) { - obj.path = message.path.map((e) => Math.round(e)); + obj.path = message.path.map(e => Math.round(e)); } else { obj.path = []; } @@ -4529,22 +3831,17 @@ export const GeneratedCodeInfo_Annotation = { return obj; }, - fromPartial, I>>( - object: I - ): GeneratedCodeInfo_Annotation { + fromPartial, I>>(object: I): GeneratedCodeInfo_Annotation { const message = createBaseGeneratedCodeInfo_Annotation(); - message.path = object.path?.map((e) => e) || []; + message.path = object.path?.map(e => e) || []; message.sourceFile = object.sourceFile ?? ""; message.begin = object.begin ?? 0; message.end = object.end ?? 0; return message; - }, + } }; -messageTypeRegistry.set( - GeneratedCodeInfo_Annotation.$type, - GeneratedCodeInfo_Annotation -); +messageTypeRegistry.set(GeneratedCodeInfo_Annotation.$type, GeneratedCodeInfo_Annotation); declare var self: any | undefined; declare var window: any | undefined; @@ -4557,9 +3854,7 @@ var globalThis: any = (() => { throw "Unable to locate global object"; })(); -const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); +const atob: (b64: string) => string = globalThis.atob || (b64 => globalThis.Buffer.from(b64, "base64").toString("binary")); function bytesFromBase64(b64: string): Uint8Array { const bin = atob(b64); const arr = new Uint8Array(bin.length); @@ -4569,45 +3864,33 @@ function bytesFromBase64(b64: string): Uint8Array { return arr; } -const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); +const btoa: (bin: string) => string = globalThis.btoa || (bin => globalThis.Buffer.from(bin, "binary").toString("base64")); function base64FromBytes(arr: Uint8Array): string { const bin: string[] = []; - arr.forEach((byte) => { + arr.forEach(byte => { bin.push(String.fromCharCode(byte)); }); return btoa(bin.join("")); } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & Record< - Exclude | "$type">, - never - >; + : P & { [K in keyof P]: Exact } & Record | "$type">, never>; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/src/protobuf/typeRegistry.ts b/src/protobuf/typeRegistry.ts index 0e75e8c..82e3c70 100644 --- a/src/protobuf/typeRegistry.ts +++ b/src/protobuf/typeRegistry.ts @@ -15,22 +15,15 @@ export type UnknownMessage = { $type: string }; export const messageTypeRegistry = new Map(); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long - ? string | number | Long - : T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; + ? string | number | Long + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in Exclude]?: DeepPartial } + : Partial; diff --git a/src/rpc/index.ts b/src/rpc/index.ts index e5e7ba2..738c0f1 100644 --- a/src/rpc/index.ts +++ b/src/rpc/index.ts @@ -23,4 +23,4 @@ export async function getMsgClient(endpoint: string, signer: OfflineSigner) { }; return SigningStargateClient.connectWithSigner(endpoint, signer, options); -} \ No newline at end of file +} diff --git a/src/sdl/index.ts b/src/sdl/index.ts index 9102cef..c72d183 100644 --- a/src/sdl/index.ts +++ b/src/sdl/index.ts @@ -471,7 +471,7 @@ export class SDL { const deployment = this.data.deployment[name]; const profile = this.data.profiles.compute[deployment[placement].profile]; - let manifestService: v2ManifestService = { + const manifestService: v2ManifestService = { Name: name, Image: service.image, Command: service.command || null, @@ -630,7 +630,7 @@ export class SDL { groupResourceUnits(resource: v2ComputeResources | undefined, asString: boolean) { if (!resource) return {}; - let units = { + const units = { endpoints: null } as any; @@ -757,7 +757,7 @@ export class SDL { const yamlJson = this.data; const ipEndpointNames = this.computeEndpointSequenceNumbers(yamlJson); - let groups = {} as any; + const groups = {} as any; Object.keys(yamlJson.services).forEach(svcName => { const svc = yamlJson.services[svcName]; @@ -807,7 +807,7 @@ export class SDL { count: svcdepl.count }; - let endpoints = [] as any[]; + const endpoints = [] as any[]; svc?.expose?.forEach(expose => { expose?.to ?.filter(to => to.global) diff --git a/src/sdl/sizes.ts b/src/sdl/sizes.ts index b55ed86..10c315b 100644 --- a/src/sdl/sizes.ts +++ b/src/sdl/sizes.ts @@ -1,48 +1,46 @@ const prefixes = "kmgtpe".split(""); function parseSizeString(size: string): [number, string, string] { - const regex = /^([\d.]+)([a-zA-Z])([a-zA-Z]*)$/; - const match = size.match(regex); + const regex = /^([\d.]+)([a-zA-Z])([a-zA-Z]*)$/; + const match = size.match(regex); - if (match) { - const [, value, unit1, unit2] = match; - return [parseFloat(value), unit1.toLowerCase(), unit2.toLowerCase()]; - } + if (match) { + const [, value, unit1, unit2] = match; + return [parseFloat(value), unit1.toLowerCase(), unit2.toLowerCase()]; + } - throw new Error(`Invalid size string: ${size}`); + throw new Error(`Invalid size string: ${size}`); } export function convertResourceString(resourceStr: string): number { - const [value, prefix, unit] = parseSizeString(resourceStr.toLowerCase()); - const power = prefixes.indexOf(prefix); - const base = unit === 'i' ? 1024 : 1000; + const [value, prefix, unit] = parseSizeString(resourceStr.toLowerCase()); + const power = prefixes.indexOf(prefix); + const base = unit === "i" ? 1024 : 1000; - return power !== -1 - ? value * Math.pow(base, (power + 1)) - : value; + return power !== -1 ? value * Math.pow(base, power + 1) : value; } // checks to see if the resource string has an suffix, and extracts the // value and suffix if it does, otherwise return the numerical value and // an empty string function parseCpuResourceString(size: string): [number, string] { - const regex = /^([\d.]+)([a-zA-Z]*)$/; - const match = size.match(regex); + const regex = /^([\d.]+)([a-zA-Z]*)$/; + const match = size.match(regex); - if (match) { - const [, value, unit1] = match; - return [parseFloat(value), unit1.toLowerCase()]; - } + if (match) { + const [, value, unit1] = match; + return [parseFloat(value), unit1.toLowerCase()]; + } - throw new Error(`Invalid size string: ${size}`); + throw new Error(`Invalid size string: ${size}`); } export function convertCpuResourceString(resourceStr: string): number { - const [value, unit] = parseCpuResourceString(resourceStr.toLowerCase()); + const [value, unit] = parseCpuResourceString(resourceStr.toLowerCase()); - if (unit === 'm') { - return value; - } + if (unit === "m") { + return value; + } - return value * 1000; -} \ No newline at end of file + return value * 1000; +} diff --git a/src/sdl/types.ts b/src/sdl/types.ts index 4270208..7284d71 100644 --- a/src/sdl/types.ts +++ b/src/sdl/types.ts @@ -1,280 +1,277 @@ - export type v2Manifest = v2Group[]; export type v3Manifest = v3Group[]; export type v3Group = { - name: string, - services: v3ManifestService[], -} + name: string; + services: v3ManifestService[]; +}; export type v2Group = { - Name: string, - Services: v2ManifestService[], -} + Name: string; + Services: v2ManifestService[]; +}; export type v2ManifestService = { - Name: string, - Image: string, - Command: string[] | null, - Args: string[] | null, - Env: string[] | null, - Resources: ResourceUnits, - Count: number - Expose: v2ServiceExpose[], - params?: v2ManifestServiceParams, -} + Name: string; + Image: string; + Command: string[] | null; + Args: string[] | null; + Env: string[] | null; + Resources: ResourceUnits; + Count: number; + Expose: v2ServiceExpose[]; + params?: v2ManifestServiceParams; +}; export type v3ManifestService = { - name: string, - image: string, - command: string[] | null, - args: string[] | null, - env: string[] | null, - resources: ResourceUnits, - count: number - expose: v3ServiceExpose[], - params: v3ManifestServiceParams | null, -} + name: string; + image: string; + command: string[] | null; + args: string[] | null; + env: string[] | null; + resources: ResourceUnits; + count: number; + expose: v3ServiceExpose[]; + params: v3ManifestServiceParams | null; +}; export type v2ServiceExposeHttpOptions = { - MaxBodySize: number, - ReadTimeout: number, - SendTimeout: number, - NextTries: number, - NextTimeout: number, - NextCases: string[], -} + MaxBodySize: number; + ReadTimeout: number; + SendTimeout: number; + NextTries: number; + NextTimeout: number; + NextCases: string[]; +}; export type v3ServiceExposeHttpOptions = { - maxBodySize: number, - readTimeout: number, - sendTimeout: number, - nextTries: number, - nextTimeout: number, - nextCases: string[], -} - -export type ResourceUnits = { + maxBodySize: number; + readTimeout: number; + sendTimeout: number; + nextTries: number; + nextTimeout: number; + nextCases: string[]; +}; -} +export type ResourceUnits = {}; export type v2ServiceExpose = { - Port: number, - ExternalPort: number, - Proto: string, - Service: any, - Global: boolean, - Hosts: any, - HTTPOptions: v2ServiceExposeHttpOptions, - IP: string, - EndpointSequenceNumber: number, -} + Port: number; + ExternalPort: number; + Proto: string; + Service: any; + Global: boolean; + Hosts: any; + HTTPOptions: v2ServiceExposeHttpOptions; + IP: string; + EndpointSequenceNumber: number; +}; export type v3ServiceExpose = { - port: number, - externalPort: number, - proto: string, - service: any, - global: boolean, - hosts: any, - httpOptions: v3ServiceExposeHttpOptions, - ip: string, - endpointSequenceNumber: number, -} + port: number; + externalPort: number; + proto: string; + service: any; + global: boolean; + hosts: any; + httpOptions: v3ServiceExposeHttpOptions; + ip: string; + endpointSequenceNumber: number; +}; export type v2ManifestServiceParams = { - Storage: v2ServiceStorageParams[], -} + Storage: v2ServiceStorageParams[]; +}; export type v3ManifestServiceParams = { - storage: v2ServiceStorageParams[], -} + storage: v2ServiceStorageParams[]; +}; export type v2Sdl = { - services: Record, - profiles: v2Profiles, - deployment: Record, - endpoints: Record, -} + services: Record; + profiles: v2Profiles; + deployment: Record; + endpoints: Record; +}; export type v3Sdl = { - services: Record, - profiles: v3Profiles, - deployment: Record, - endpoints: Record, -} + services: Record; + profiles: v3Profiles; + deployment: Record; + endpoints: Record; +}; export type v2Endpoint = { - kind: string, -} + kind: string; +}; export type v2ExposeTo = { - service?: string, - global?: boolean, - http_options: v2HTTPOptions, - ip: string, -} + service?: string; + global?: boolean; + http_options: v2HTTPOptions; + ip: string; +}; export type v2HTTPOptions = { - max_body_size: number, - read_timeout: number, - send_timeout: number, - next_tries: number, - next_timeout: number, - next_cases: string[], -} + max_body_size: number; + read_timeout: number; + send_timeout: number; + next_tries: number; + next_timeout: number; + next_cases: string[]; +}; export type v2Accept = { - items?: string[], -} + items?: string[]; +}; export type v2Expose = { - port: number, - as: number, - proto?: string, - to?: v2ExposeTo[], - accept: v2Accept, - http_options: v2HTTPOptions, -} + port: number; + as: number; + proto?: string; + to?: v2ExposeTo[]; + accept: v2Accept; + http_options: v2HTTPOptions; +}; export type v2Dependency = { - service: string, -} + service: string; +}; export type v2ServiceStorageParams = { - name: string, - mount: string, - readOnly: boolean, -} + name: string; + mount: string; + readOnly: boolean; +}; export type v2ServiceParams = { - storage?: Record, -} + storage?: Record; +}; export type v2Service = { - image: string, - command: string[] | null, - args: string[] | null, - env: string[] | null, - expose: v2Expose[], - dependencies?: v2Dependency[], - params?: v2ServiceParams, -} + image: string; + command: string[] | null; + args: string[] | null; + env: string[] | null; + expose: v2Expose[]; + dependencies?: v2Dependency[]; + params?: v2ServiceParams; +}; export type v2ServiceDeployment = { - profile: string, - count: number, -} + profile: string; + count: number; +}; -export type v2Deployment = Record +export type v2Deployment = Record; -export type v2CPUAttributes = Record +export type v2CPUAttributes = Record; export type v2ResourceCPU = { - units: number | string, - attributes?: v2CPUAttributes, -} + units: number | string; + attributes?: v2CPUAttributes; +}; export type v2ResourceMemory = { - size: string; - attributes?: Record, -} + size: string; + attributes?: Record; +}; export type v3GPUAttributes = { - vendor: { - [vendor: string]: Array<{ model: string, ram?: string }> - } -} + vendor: { + [vendor: string]: Array<{ model: string; ram?: string }>; + }; +}; export type v3ResourceGPU = { - units: number | string, - attributes?: v3GPUAttributes, -} + units: number | string; + attributes?: v3GPUAttributes; +}; export type v2StorageAttributes = Record; export type v2ResourceStorage = { - name: string, - size: string, - attributes: v2StorageAttributes, -} + name: string; + size: string; + attributes: v2StorageAttributes; +}; export type v2ResourceStorageArray = v2ResourceStorage[]; export type v2ComputeResources = { - cpu: v2ResourceCPU, - memory: v2ResourceMemory, - storage: v2ResourceStorageArray | v2ResourceStorage, -} + cpu: v2ResourceCPU; + memory: v2ResourceMemory; + storage: v2ResourceStorageArray | v2ResourceStorage; +}; export type v3ComputeResources = { - cpu: v2ResourceCPU, - memory: v2ResourceMemory, - storage: v2ResourceStorageArray | v2ResourceStorage, - gpu: v3ResourceGPU, - id: number, -} + cpu: v2ResourceCPU; + memory: v2ResourceMemory; + storage: v2ResourceStorageArray | v2ResourceStorage; + gpu: v3ResourceGPU; + id: number; +}; export type v2ProfileCompute = { - resources: v2ComputeResources, -} + resources: v2ComputeResources; +}; export type v3ProfileCompute = { - resources: v3ComputeResources, -} + resources: v3ComputeResources; +}; -export type v2PlacementAttributes = Attributes +export type v2PlacementAttributes = Attributes; export type v2Coin = { - denom: string, - value: number, - amount: number, -} + denom: string; + value: number; + amount: number; +}; -export type v2PlacementPricing = Record +export type v2PlacementPricing = Record; export type SignedBy = { - allOf: string[], - anyOf: string[], -} + allOf: string[]; + anyOf: string[]; +}; export type v2ProfilePlacement = { - attributes: v2PlacementAttributes, - signedBy: SignedBy, - pricing: v2PlacementPricing, -} + attributes: v2PlacementAttributes; + signedBy: SignedBy; + pricing: v2PlacementPricing; +}; export type v2Profiles = { - compute: Record, - placement: Record, -} + compute: Record; + placement: Record; +}; export type v3Profiles = { - compute: Record, - placement: Record, -} + compute: Record; + placement: Record; +}; export type Attribute = { - key: string, - value: string, -} + key: string; + value: string; +}; export type v3DeploymentGroup = { - name: string, - resources: Array<{ - resource: v3ComputeResources, - price: number, - count: number, - endpoints: Array<{ kind: number; sequence_number: number; }>, - }>, - requirements: { - attributes: Array, - signedBy: { - allOf: string[], - anyOf: string[], - }, - }, -}; - -export type Attributes = Attribute[]; \ No newline at end of file + name: string; + resources: Array<{ + resource: v3ComputeResources; + price: number; + count: number; + endpoints: Array<{ kind: number; sequence_number: number }>; + }>; + requirements: { + attributes: Array; + signedBy: { + allOf: string[]; + anyOf: string[]; + }; + }; +}; + +export type Attributes = Attribute[]; diff --git a/src/stargate/index.ts b/src/stargate/index.ts index 4f54f86..71e231e 100644 --- a/src/stargate/index.ts +++ b/src/stargate/index.ts @@ -1,17 +1,9 @@ -import { - MessageType, - messageTypeRegistry, - UnknownMessage, -} from "../protobuf/typeRegistry"; +import { MessageType, messageTypeRegistry, UnknownMessage } from "../protobuf/typeRegistry"; -export const getAkashTypeRegistry: () => [ - string, - MessageType -][] = () => - Array.from(messageTypeRegistry).map(([path, type]) => [`/${path}`, type]); +export const getAkashTypeRegistry: () => [string, MessageType][] = () => + Array.from(messageTypeRegistry).map(([path, type]) => [`/${path}`, type]); -export const getTypeUrl: (type: MessageType) => string = (type) => - `/${type.$type}`; +export const getTypeUrl: (type: MessageType) => string = type => `/${type.$type}`; /* TODO: this should be generated from the proto files */ export enum messages { @@ -24,5 +16,5 @@ export enum messages { MsgCloseGroup = "/akash.deployment.v1beta3.MsgCloseGroup", MsgPauseGroup = "/akash.deployment.v1beta3.MsgPauseGroup", MsgStartGroup = "/akash.deployment.v1beta3.MsgStartGroup", - MsgCreateLease = "/akash.market.v1beta4.MsgCreateLease", + MsgCreateLease = "/akash.market.v1beta4.MsgCreateLease" } diff --git a/src/util.ts b/src/util.ts index 043e309..1b093e2 100644 --- a/src/util.ts +++ b/src/util.ts @@ -6,4 +6,4 @@ export const map = (fn: any) => (xs: any[]) => xs.map(fn); export const filter = (fn: any) => (xs: any[]) => xs.filter(fn); -export const awaitAll = Promise.all.bind(Promise); \ No newline at end of file +export const awaitAll = Promise.all.bind(Promise); diff --git a/src/wallet/index.ts b/src/wallet/index.ts index 0c7a87a..cbf2ed7 100644 --- a/src/wallet/index.ts +++ b/src/wallet/index.ts @@ -9,7 +9,7 @@ export async function createAccount(password: string) { keytar.setPassword("AkashNetwork", address, wallet.mnemonic); return { mnemonic: wallet.mnemonic, - address, + address }; } diff --git a/src/wallet/storage.ts b/src/wallet/storage.ts index 877fdbf..c269ea2 100644 --- a/src/wallet/storage.ts +++ b/src/wallet/storage.ts @@ -11,5 +11,5 @@ export async function setPassword() {} export default { getPassword, - setPassword, + setPassword }; diff --git a/src/webpack/crypto.ts b/src/webpack/crypto.ts index d39d01f..9677087 100644 --- a/src/webpack/crypto.ts +++ b/src/webpack/crypto.ts @@ -1,3 +1,3 @@ const crypto = window?.crypto; -export default crypto; \ No newline at end of file +export default crypto; diff --git a/src/webpack/perf_hooks.ts b/src/webpack/perf_hooks.ts index 68bb7a2..ece2e0a 100644 --- a/src/webpack/perf_hooks.ts +++ b/src/webpack/perf_hooks.ts @@ -1,3 +1,3 @@ const performance = window?.performance; -export default performance; \ No newline at end of file +export default performance; diff --git a/tests/fixtures/gpu_basic.manifest.json b/tests/fixtures/gpu_basic.manifest.json index b2082fa..94f9883 100644 --- a/tests/fixtures/gpu_basic.manifest.json +++ b/tests/fixtures/gpu_basic.manifest.json @@ -57,19 +57,14 @@ "proto": "TCP", "service": "", "global": true, - "hosts": [ - "ahostname.com" - ], + "hosts": ["ahostname.com"], "httpOptions": { "maxBodySize": 1048576, "readTimeout": 60000, "sendTimeout": 60000, "nextTries": 3, "nextTimeout": 0, - "nextCases": [ - "error", - "timeout" - ] + "nextCases": ["error", "timeout"] }, "ip": "", "endpointSequenceNumber": 0 @@ -87,10 +82,7 @@ "sendTimeout": 60000, "nextTries": 3, "nextTimeout": 0, - "nextCases": [ - "error", - "timeout" - ] + "nextCases": ["error", "timeout"] }, "ip": "", "endpointSequenceNumber": 0 diff --git a/tests/fixtures/gpu_basic_ram.manifest.json b/tests/fixtures/gpu_basic_ram.manifest.json index 7aaed07..0412a68 100644 --- a/tests/fixtures/gpu_basic_ram.manifest.json +++ b/tests/fixtures/gpu_basic_ram.manifest.json @@ -57,19 +57,14 @@ "proto": "TCP", "service": "", "global": true, - "hosts": [ - "ahostname.com" - ], + "hosts": ["ahostname.com"], "httpOptions": { "maxBodySize": 1048576, "readTimeout": 60000, "sendTimeout": 60000, "nextTries": 3, "nextTimeout": 0, - "nextCases": [ - "error", - "timeout" - ] + "nextCases": ["error", "timeout"] }, "ip": "", "endpointSequenceNumber": 0 @@ -87,10 +82,7 @@ "sendTimeout": 60000, "nextTries": 3, "nextTimeout": 0, - "nextCases": [ - "error", - "timeout" - ] + "nextCases": ["error", "timeout"] }, "ip": "", "endpointSequenceNumber": 0 diff --git a/tests/fixtures/wordpress.manifest.json b/tests/fixtures/wordpress.manifest.json index 7be1028..18f0b1b 100644 --- a/tests/fixtures/wordpress.manifest.json +++ b/tests/fixtures/wordpress.manifest.json @@ -7,12 +7,7 @@ "image": "mariadb:10.6.4", "command": null, "args": null, - "env": [ - "MYSQL_RANDOM_ROOT_PASSWORD=1", - "MYSQL_DATABASE=wordpress", - "MYSQL_USER=wordpress", - "MYSQL_PASSWORD=testpass4you" - ], + "env": ["MYSQL_RANDOM_ROOT_PASSWORD=1", "MYSQL_DATABASE=wordpress", "MYSQL_USER=wordpress", "MYSQL_PASSWORD=testpass4you"], "resources": { "id": 1, "cpu": { @@ -71,10 +66,7 @@ "sendTimeout": 60000, "nextTries": 3, "nextTimeout": 0, - "nextCases": [ - "error", - "timeout" - ] + "nextCases": ["error", "timeout"] }, "ip": "", "endpointSequenceNumber": 0 @@ -92,10 +84,7 @@ "sendTimeout": 60000, "nextTries": 3, "nextTimeout": 0, - "nextCases": [ - "error", - "timeout" - ] + "nextCases": ["error", "timeout"] }, "ip": "", "endpointSequenceNumber": 0 @@ -116,12 +105,7 @@ "image": "wordpress", "command": null, "args": null, - "env": [ - "WORDPRESS_DB_HOST=db", - "WORDPRESS_DB_USER=wordpress", - "WORDPRESS_DB_PASSWORD=testpass4you", - "WORDPRESS_DB_NAME=wordpress" - ], + "env": ["WORDPRESS_DB_HOST=db", "WORDPRESS_DB_USER=wordpress", "WORDPRESS_DB_PASSWORD=testpass4you", "WORDPRESS_DB_NAME=wordpress"], "resources": { "id": 2, "cpu": { @@ -184,10 +168,7 @@ "sendTimeout": 60000, "nextTries": 3, "nextTimeout": 0, - "nextCases": [ - "error", - "timeout" - ] + "nextCases": ["error", "timeout"] }, "ip": "", "endpointSequenceNumber": 0 diff --git a/tests/test_deployments.ts b/tests/test_deployments.ts index 0e29dea..36d270f 100644 --- a/tests/test_deployments.ts +++ b/tests/test_deployments.ts @@ -8,28 +8,24 @@ import { QueryDeploymentRequest, QueryDeploymentResponse, QueryDeploymentsRequest, - QueryDeploymentsResponse, + QueryDeploymentsResponse } from "../src/protobuf/akash/deployment/v1beta3/query"; -tap.test("Deployments: query deployment list with owner filter", async (t) => { +tap.test("Deployments: query deployment list with owner filter", async t => { t.plan(1); - const client = new QueryClientImpl( - await getRpc("https://rpc.akash.forbole.com:443") - ); + const client = new QueryClientImpl(await getRpc("https://rpc.akash.forbole.com:443")); const request = QueryDeploymentsRequest.fromJSON({ filters: { - owner: "akash1qqzwc5d7hynl67nsmn9jukvwqp3vzdl6j2t7lk", - }, + owner: "akash1qqzwc5d7hynl67nsmn9jukvwqp3vzdl6j2t7lk" + } }); const res = await client.Deployments(request); - testSnap(t)("Deployments query matches expected result")( - QueryDeploymentsResponse.toJSON(res) - ); + testSnap(t)("Deployments query matches expected result")(QueryDeploymentsResponse.toJSON(res)); }); -tap.test("Deployments: query deployment with owner and dseq", async (t) => { +tap.test("Deployments: query deployment with owner and dseq", async t => { t.plan(1); const rpc = await getRpc("https://rpc.akash.forbole.com:443"); @@ -37,12 +33,10 @@ tap.test("Deployments: query deployment with owner and dseq", async (t) => { const request = QueryDeploymentRequest.fromJSON({ id: { owner: "akash1qqzwc5d7hynl67nsmn9jukvwqp3vzdl6j2t7lk", - dseq: "1027706", - }, + dseq: "1027706" + } }); const res = await client.Deployment(request); - testSnap(t)("Deployments query matches expected result")( - QueryDeploymentResponse.toJSON(res) - ); + testSnap(t)("Deployments query matches expected result")(QueryDeploymentResponse.toJSON(res)); }); diff --git a/tests/test_sdl_basic.ts b/tests/test_sdl_basic.ts index c6b41a2..38bf0ee 100644 --- a/tests/test_sdl_basic.ts +++ b/tests/test_sdl_basic.ts @@ -1,6 +1,6 @@ import tap from "tap"; -import { SDL } from '../src/sdl'; +import { SDL } from "../src/sdl"; const testSDL = `version: '2.0' services: @@ -42,57 +42,54 @@ deployment: const expectedManifest = [ { - "Name": "akash", - "Services": [ + Name: "akash", + Services: [ { - "Name": "tetris", - "Image": "bsord/tetris", - "Command": null, - "Args": null, - "Env": null, - "Resources": { - "cpu": { - "units": { - "val": "1000" + Name: "tetris", + Image: "bsord/tetris", + Command: null, + Args: null, + Env: null, + Resources: { + cpu: { + units: { + val: "1000" } }, - "memory": { - "size": { - "val": "536870912" + memory: { + size: { + val: "536870912" } }, - "storage": [ + storage: [ { - "name": "default", - "size": { - "val": "536870912" + name: "default", + size: { + val: "536870912" } } ], - "endpoints": null + endpoints: null }, - "Count": 1, - "Expose": [ + Count: 1, + Expose: [ { - "Port": 80, - "ExternalPort": 80, - "Proto": "TCP", - "Service": "", - "Global": true, - "Hosts": null, - "HTTPOptions": { - "MaxBodySize": 1048576, - "ReadTimeout": 60000, - "SendTimeout": 60000, - "NextTries": 3, - "NextTimeout": 0, - "NextCases": [ - "error", - "timeout" - ] + Port: 80, + ExternalPort: 80, + Proto: "TCP", + Service: "", + Global: true, + Hosts: null, + HTTPOptions: { + MaxBodySize: 1048576, + ReadTimeout: 60000, + SendTimeout: 60000, + NextTries: 3, + NextTimeout: 0, + NextCases: ["error", "timeout"] }, - "IP": "", - "EndpointSequenceNumber": 0 + IP: "", + EndpointSequenceNumber: 0 } ] } @@ -102,98 +99,68 @@ const expectedManifest = [ const expectedGroups = [ { - "name": "akash", - "requirements": { - "attributes": [ + name: "akash", + requirements: { + attributes: [ { - "key": "host", - "value": "akash" + key: "host", + value: "akash" } ], - "signedBy": { - "allOf": [], - "anyOf": [ - "akash1365yvmc4s7awdyj3n2sav7xfx76adc6dnmlx63", - "akash18qa2a2ltfyvkyj0ggj3hkvuj6twzyumuaru9s4" - ] + signedBy: { + allOf: [], + anyOf: ["akash1365yvmc4s7awdyj3n2sav7xfx76adc6dnmlx63", "akash18qa2a2ltfyvkyj0ggj3hkvuj6twzyumuaru9s4"] } }, - "resources": [ + resources: [ { - "resources": { - "cpu": { - "units": { - "val": new Uint8Array([ - 49, - 48, - 48, - 48 - ]) + resources: { + cpu: { + units: { + val: new Uint8Array([49, 48, 48, 48]) }, - "attributes": undefined, + attributes: undefined }, - "memory": { - "quantity": { - "val": new Uint8Array([ - 53, - 51, - 54, - 56, - 55, - 48, - 57, - 49, - 50 - ]), + memory: { + quantity: { + val: new Uint8Array([53, 51, 54, 56, 55, 48, 57, 49, 50]) }, - "attributes": undefined, + attributes: undefined }, - "storage": [ + storage: [ { - "name": "default", - "quantity": { - "val": new Uint8Array([ - 53, - 51, - 54, - 56, - 55, - 48, - 57, - 49, - 50 - ]), + name: "default", + quantity: { + val: new Uint8Array([53, 51, 54, 56, 55, 48, 57, 49, 50]) }, - "attributes": undefined, + attributes: undefined } ], - "endpoints": [ + endpoints: [ { - "kind": 0, - "sequence_number": 0 + kind: 0, + sequence_number: 0 } ] }, - "price": { - "denom": "uakt", - "amount": "10000" + price: { + denom: "uakt", + amount: "10000" }, - "count": 1 + count: 1 } ] } ]; -const expectedPreVersionJson = '[{"Name":"akash","Services":[{"Args":null,"Command":null,"Count":1,"Env":null,"Expose":[{"EndpointSequenceNumber":0,"ExternalPort":80,"Global":true,"HTTPOptions":{"MaxBodySize":1048576,"NextCases":["error","timeout"],"NextTimeout":0,"NextTries":3,"ReadTimeout":60000,"SendTimeout":60000},"Hosts":null,"IP":"","Port":80,"Proto":"TCP","Service":""}],"Image":"bsord/tetris","Name":"tetris","Resources":{"cpu":{"units":{"val":"1000"}},"endpoints":null,"memory":{"size":{"val":"536870912"}},"storage":[{"name":"default","size":{"val":"536870912"}}]}}]}]'; +const expectedPreVersionJson = + '[{"Name":"akash","Services":[{"Args":null,"Command":null,"Count":1,"Env":null,"Expose":[{"EndpointSequenceNumber":0,"ExternalPort":80,"Global":true,"HTTPOptions":{"MaxBodySize":1048576,"NextCases":["error","timeout"],"NextTimeout":0,"NextTries":3,"ReadTimeout":60000,"SendTimeout":60000},"Hosts":null,"IP":"","Port":80,"Proto":"TCP","Service":""}],"Image":"bsord/tetris","Name":"tetris","Resources":{"cpu":{"units":{"val":"1000"}},"endpoints":null,"memory":{"size":{"val":"536870912"}},"storage":[{"name":"default","size":{"val":"536870912"}}]}}]}]'; const expectedVersion = new Uint8Array([ - 119, 216, 99, 142, 214, 87, 92, 43, - 168, 216, 126, 234, 231, 181, 75, 175, - 102, 90, 218, 232, 182, 53, 158, 91, - 6, 246, 3, 15, 63, 120, 212, 176 + 119, 216, 99, 142, 214, 87, 92, 43, 168, 216, 126, 234, 231, 181, 75, 175, 102, 90, 218, 232, 182, 53, 158, 91, 6, 246, 3, 15, 63, 120, 212, 176 ]); -tap.test("SDL: fromString", async (t) => { +tap.test("SDL: fromString", async t => { t.plan(2); const sdl = SDL.fromString(testSDL); @@ -202,7 +169,7 @@ tap.test("SDL: fromString", async (t) => { t.ok(sdl.data !== null, "SDL has data object"); }); -tap.test("SDL: Manifest", async (t) => { +tap.test("SDL: Manifest", async t => { t.plan(1); const sdl = SDL.fromString(testSDL); @@ -212,7 +179,7 @@ tap.test("SDL: Manifest", async (t) => { t.same(result, expected, "Manifest matches expected result"); }); -tap.test("SDL: DeploymentGroups", async (t) => { +tap.test("SDL: DeploymentGroups", async t => { t.plan(1); const sdl = SDL.fromString(testSDL); @@ -222,7 +189,7 @@ tap.test("SDL: DeploymentGroups", async (t) => { t.same(result, expected, "Deployment groups matches expected result"); }); -tap.test("SDL: Version", async (t) => { +tap.test("SDL: Version", async t => { t.plan(2); const sdl = SDL.fromString(testSDL); @@ -230,6 +197,6 @@ tap.test("SDL: Version", async (t) => { const result = await sdl.manifestVersion(); const expected = expectedVersion; - t.same(preversionJson, expectedPreVersionJson, 'Manifest pre-encoding JSON matches'); + t.same(preversionJson, expectedPreVersionJson, "Manifest pre-encoding JSON matches"); t.same(result, expected, "Manifest version matches expected result"); -}); \ No newline at end of file +}); diff --git a/tests/test_sdl_basic_beta3.ts b/tests/test_sdl_basic_beta3.ts index 3732a05..e9456b2 100644 --- a/tests/test_sdl_basic_beta3.ts +++ b/tests/test_sdl_basic_beta3.ts @@ -1,6 +1,6 @@ import tap from "tap"; -import { SDL } from '../src/sdl'; +import { SDL } from "../src/sdl"; const testSDL = `version: '2.0' services: @@ -44,111 +44,81 @@ deployment: const expectedGroups = [ { - "name": "akash", - "requirements": { - "attributes": [ + name: "akash", + requirements: { + attributes: [ { - "key": "host", - "value": "akash" + key: "host", + value: "akash" } ], - "signedBy": { - "allOf": [], - "anyOf": [ - "akash1365yvmc4s7awdyj3n2sav7xfx76adc6dnmlx63", - "akash18qa2a2ltfyvkyj0ggj3hkvuj6twzyumuaru9s4" - ] + signedBy: { + allOf: [], + anyOf: ["akash1365yvmc4s7awdyj3n2sav7xfx76adc6dnmlx63", "akash18qa2a2ltfyvkyj0ggj3hkvuj6twzyumuaru9s4"] } }, - "resources": [ + resources: [ { - "resource": { - "cpu": { - "units": { - "val": new Uint8Array([ - 49, - 48, - 48, - 48 - ]) + resource: { + cpu: { + units: { + val: new Uint8Array([49, 48, 48, 48]) }, - "attributes": undefined, + attributes: undefined }, - "memory": { - "quantity": { - "val": new Uint8Array([ - 53, - 51, - 54, - 56, - 55, - 48, - 57, - 49, - 50 - ]), + memory: { + quantity: { + val: new Uint8Array([53, 51, 54, 56, 55, 48, 57, 49, 50]) }, - "attributes": undefined, + attributes: undefined }, - "storage": [ + storage: [ { - "name": "default", - "quantity": { - "val": new Uint8Array([ - 53, - 51, - 54, - 56, - 55, - 48, - 57, - 49, - 50 - ]), + name: "default", + quantity: { + val: new Uint8Array([53, 51, 54, 56, 55, 48, 57, 49, 50]) }, - "attributes": undefined, - }, + attributes: undefined + } ], - "gpu": { - "units": { - "val": new Uint8Array([ - 48 - ]), + gpu: { + units: { + val: new Uint8Array([48]) }, - "attributes": undefined, + attributes: undefined }, - "endpoints": [ + endpoints: [ { - "sequence_number": 0 + sequence_number: 0 } ], - "id": 1, + id: 1 }, - "price": { - "denom": "uakt", - "amount": "10000" + price: { + denom: "uakt", + amount: "10000" }, - "count": 1 + count: 1 } ] } ]; -tap.test("SDL: fromString", async (t) => { +tap.test("SDL: fromString", async t => { t.plan(2); - const sdl = SDL.fromString(testSDL, 'beta3'); + const sdl = SDL.fromString(testSDL, "beta3"); t.ok(sdl instanceof SDL, "Default SDL is not undefined"); t.ok(sdl.data !== null, "SDL has data object"); }); -tap.test("SDL: DeploymentGroups", async (t) => { +tap.test("SDL: DeploymentGroups", async t => { t.plan(1); - const sdl = SDL.fromString(testSDL, 'beta3'); + const sdl = SDL.fromString(testSDL, "beta3"); const result = sdl.groups(); const expected = expectedGroups; t.same(result, expected, "Deployment groups matches expected result"); -}); \ No newline at end of file +}); diff --git a/tests/test_sdl_empty_profile.ts b/tests/test_sdl_empty_profile.ts index e30435a..3ea7458 100644 --- a/tests/test_sdl_empty_profile.ts +++ b/tests/test_sdl_empty_profile.ts @@ -1,6 +1,6 @@ import tap from "tap"; -import { SDL } from '../src/sdl'; +import { SDL } from "../src/sdl"; const testSDL = `version: '2.0' services: @@ -42,57 +42,54 @@ deployment: const expectedManifest = [ { - "Name": "akash", - "Services": [ + Name: "akash", + Services: [ { - "Name": "tetris-main", - "Image": "bsord/tetris", - "Command": null, - "Args": null, - "Env": null, - "Resources": { - "cpu": { - "units": { - "val": "1000" + Name: "tetris-main", + Image: "bsord/tetris", + Command: null, + Args: null, + Env: null, + Resources: { + cpu: { + units: { + val: "1000" } }, - "memory": { - "size": { - "val": 536870912 + memory: { + size: { + val: 536870912 } }, - "storage": [ + storage: [ { - "name": "default", - "size": { - "val": 536870912 + name: "default", + size: { + val: 536870912 } } ], - "endpoints": null + endpoints: null }, - "Count": 1, - "Expose": [ + Count: 1, + Expose: [ { - "Port": 80, - "ExternalPort": 80, - "Proto": "TCP", - "Service": "", - "Global": true, - "Hosts": null, - "HTTPOptions": { - "MaxBodySize": 1048576, - "ReadTimeout": 60000, - "SendTimeout": 60000, - "NextTries": 3, - "NextTimeout": 0, - "NextCases": [ - "error", - "timeout" - ] + Port: 80, + ExternalPort: 80, + Proto: "TCP", + Service: "", + Global: true, + Hosts: null, + HTTPOptions: { + MaxBodySize: 1048576, + ReadTimeout: 60000, + SendTimeout: 60000, + NextTries: 3, + NextTimeout: 0, + NextCases: ["error", "timeout"] }, - "IP": "", - "EndpointSequenceNumber": 0 + IP: "", + EndpointSequenceNumber: 0 } ] } @@ -102,28 +99,25 @@ const expectedManifest = [ const expectedGroups = [ { - "name": "akash", - "requirements": { - "attributes": [ + name: "akash", + requirements: { + attributes: [ { - "key": "host", - "value": "akash" + key: "host", + value: "akash" } ], - "signedBy": { - "allOf": [], - "anyOf": [ - "akash1365yvmc4s7awdyj3n2sav7xfx76adc6dnmlx63", - "akash18qa2a2ltfyvkyj0ggj3hkvuj6twzyumuaru9s4" - ] + signedBy: { + allOf: [], + anyOf: ["akash1365yvmc4s7awdyj3n2sav7xfx76adc6dnmlx63", "akash18qa2a2ltfyvkyj0ggj3hkvuj6twzyumuaru9s4"] } }, - "resources": [ + resources: [ { - "resources": { - "cpu": { - "units": { - "val": { + resources: { + cpu: { + units: { + val: { "0": 49, "1": 48, "2": 48, @@ -131,9 +125,9 @@ const expectedGroups = [ } } }, - "memory": { - "quantity": { - "val": { + memory: { + quantity: { + val: { "0": 53, "1": 51, "2": 54, @@ -146,11 +140,11 @@ const expectedGroups = [ } } }, - "storage": [ + storage: [ { - "name": "default", - "quantity": { - "val": { + name: "default", + quantity: { + val: { "0": 53, "1": 51, "2": 54, @@ -164,33 +158,31 @@ const expectedGroups = [ } } ], - "endpoints": [ + endpoints: [ { - "kind": 0, - "sequence_number": 0 + kind: 0, + sequence_number: 0 } ] }, - "price": { - "denom": "uakt", - "amount": "10000" + price: { + denom: "uakt", + amount: "10000" }, - "count": 1 + count: 1 } ] } ]; -const expectedPreVersionJson = '[{"Name":"akash","Services":[{"Args":null,"Command":null,"Count":1,"Env":null,"Expose":[{"EndpointSequenceNumber":0,"ExternalPort":80,"Global":true,"HTTPOptions":{"MaxBodySize":1048576,"NextCases":["error","timeout"],"NextTimeout":0,"NextTries":3,"ReadTimeout":60000,"SendTimeout":60000},"Hosts":null,"IP":"","Port":80,"Proto":"TCP","Service":""}],"Image":"bsord/tetris","Name":"tetris-main","Resources":{"cpu":{"units":{"val":"1000"}},"endpoints":null,"memory":{"size":{"val":"536870912"}},"storage":[{"name":"default","size":{"val":"536870912"}}]}}]}]'; +const expectedPreVersionJson = + '[{"Name":"akash","Services":[{"Args":null,"Command":null,"Count":1,"Env":null,"Expose":[{"EndpointSequenceNumber":0,"ExternalPort":80,"Global":true,"HTTPOptions":{"MaxBodySize":1048576,"NextCases":["error","timeout"],"NextTimeout":0,"NextTries":3,"ReadTimeout":60000,"SendTimeout":60000},"Hosts":null,"IP":"","Port":80,"Proto":"TCP","Service":""}],"Image":"bsord/tetris","Name":"tetris-main","Resources":{"cpu":{"units":{"val":"1000"}},"endpoints":null,"memory":{"size":{"val":"536870912"}},"storage":[{"name":"default","size":{"val":"536870912"}}]}}]}]'; const expectedVersion = new Uint8Array([ - 247, 77, 26, 95, 231, 205, 208, 76, - 208, 217, 59, 106, 109, 76, 73, 196, - 37, 14, 75, 170, 210, 120, 231, 213, - 69, 226, 219, 203, 236, 116, 106, 135 + 247, 77, 26, 95, 231, 205, 208, 76, 208, 217, 59, 106, 109, 76, 73, 196, 37, 14, 75, 170, 210, 120, 231, 213, 69, 226, 219, 203, 236, 116, 106, 135 ]); -tap.test("SDL: fromString", async (t) => { +tap.test("SDL: fromString", async t => { t.plan(2); const sdl = SDL.fromString(testSDL); @@ -199,7 +191,7 @@ tap.test("SDL: fromString", async (t) => { t.ok(sdl.data !== null, "SDL has data object"); }); -tap.test("SDL: Manifest", async (t) => { +tap.test("SDL: Manifest", async t => { t.plan(1); const sdl = SDL.fromString(testSDL); @@ -209,7 +201,7 @@ tap.test("SDL: Manifest", async (t) => { t.same(result, expected, "Manifest matches expected result"); }); -tap.test("SDL: Version", async (t) => { +tap.test("SDL: Version", async t => { t.plan(2); const sdl = SDL.fromString(testSDL); @@ -217,6 +209,6 @@ tap.test("SDL: Version", async (t) => { const result = await sdl.manifestVersion(); const expected = expectedVersion; - t.same(preversionJson, expectedPreVersionJson, 'Manifest pre-encoding JSON matches'); + t.same(preversionJson, expectedPreVersionJson, "Manifest pre-encoding JSON matches"); t.same(result, expected, "Manifest version matches expected result"); -}); \ No newline at end of file +}); diff --git a/tests/test_sdl_env.ts b/tests/test_sdl_env.ts index 64fcd1e..87d2003 100644 --- a/tests/test_sdl_env.ts +++ b/tests/test_sdl_env.ts @@ -1,6 +1,6 @@ import tap from "tap"; -import { SDL } from '../src/sdl'; +import { SDL } from "../src/sdl"; const testSDL = `version: '2.0' services: @@ -46,61 +46,54 @@ deployment: const testManifest = [ { - "Name": "akash", - "Services": [ + Name: "akash", + Services: [ { - "Name": "tetris", - "Image": "bsord/tetris", - "Command": null, - "Args": null, - "Env": [ - "EMPTY=", - "ENV1=test1", - "ENV2=test2" - ], - "Resources": { - "cpu": { - "units": { - "val": "1000" + Name: "tetris", + Image: "bsord/tetris", + Command: null, + Args: null, + Env: ["EMPTY=", "ENV1=test1", "ENV2=test2"], + Resources: { + cpu: { + units: { + val: "1000" } }, - "memory": { - "size": { - "val": "536870912" + memory: { + size: { + val: "536870912" } }, - "storage": [ + storage: [ { - "name": "default", - "size": { - "val": "536870912" + name: "default", + size: { + val: "536870912" } } ], - "endpoints": null + endpoints: null }, - "Count": 1, - "Expose": [ + Count: 1, + Expose: [ { - "Port": 80, - "ExternalPort": 80, - "Proto": "TCP", - "Service": "", - "Global": true, - "Hosts": null, - "HTTPOptions": { - "MaxBodySize": 1048576, - "ReadTimeout": 60000, - "SendTimeout": 60000, - "NextTries": 3, - "NextTimeout": 0, - "NextCases": [ - "error", - "timeout" - ] + Port: 80, + ExternalPort: 80, + Proto: "TCP", + Service: "", + Global: true, + Hosts: null, + HTTPOptions: { + MaxBodySize: 1048576, + ReadTimeout: 60000, + SendTimeout: 60000, + NextTries: 3, + NextTimeout: 0, + NextCases: ["error", "timeout"] }, - "IP": "", - "EndpointSequenceNumber": 0 + IP: "", + EndpointSequenceNumber: 0 } ] } @@ -108,7 +101,7 @@ const testManifest = [ } ]; -tap.test("SDL: Manifest w/ env", async (t) => { +tap.test("SDL: Manifest w/ env", async t => { t.plan(1); const sdl = SDL.fromString(testSDL); @@ -116,4 +109,4 @@ tap.test("SDL: Manifest w/ env", async (t) => { const expected = testManifest; t.same(result, expected, "Manifest matches expected result"); -}); \ No newline at end of file +}); diff --git a/tests/test_sdl_gpu.ts b/tests/test_sdl_gpu.ts index 5529cce..14844e2 100644 --- a/tests/test_sdl_gpu.ts +++ b/tests/test_sdl_gpu.ts @@ -1,28 +1,26 @@ import tap from "tap"; import fs from "fs"; -import { SDL } from '../src/sdl'; +import { SDL } from "../src/sdl"; -const testSDL = fs.readFileSync('./tests/fixtures/gpu_basic.sdl.yml', 'utf8'); +const testSDL = fs.readFileSync("./tests/fixtures/gpu_basic.sdl.yml", "utf8"); -const expectedManifest = JSON.parse( - fs.readFileSync('./tests/fixtures/gpu_basic.manifest.json', 'utf8') -); +const expectedManifest = JSON.parse(fs.readFileSync("./tests/fixtures/gpu_basic.manifest.json", "utf8")); -tap.test("SDL: GPU Manifest", async (t) => { +tap.test("SDL: GPU Manifest", async t => { t.plan(1); - const sdl = SDL.fromString(testSDL, 'beta3'); + const sdl = SDL.fromString(testSDL, "beta3"); const result = sdl.manifest(); t.same(result, expectedManifest, "Manifest matches expected result"); }); -tap.test("SDL: GPU Version", async (t) => { +tap.test("SDL: GPU Version", async t => { t.plan(1); - const sdl = SDL.fromString(testSDL, 'beta3'); + const sdl = SDL.fromString(testSDL, "beta3"); const result = await sdl.manifestVersion(); t.matchSnapshot(result, "Manifest version matches expected result"); -}); \ No newline at end of file +}); diff --git a/tests/test_sdl_gpu_attributes.ts b/tests/test_sdl_gpu_attributes.ts index 8256408..55597f8 100644 --- a/tests/test_sdl_gpu_attributes.ts +++ b/tests/test_sdl_gpu_attributes.ts @@ -1,35 +1,32 @@ import tap from "tap"; import fs from "fs"; -import { SDL } from '../src/sdl'; +import { SDL } from "../src/sdl"; -tap.test("SDL: fromString", async (t) => { +tap.test("SDL: fromString", async t => { t.plan(4); - const validSDL = fs.readFileSync('./tests/fixtures/gpu_no_gpu_valid.sdl.yml', 'utf8'); - const hasAttrSDL = fs.readFileSync('./tests/fixtures/gpu_no_gpu_invalid_has_attributes.sdl.yml', 'utf8'); - const noVendorSdl = fs.readFileSync('./tests/fixtures/gpu_invalid_no_vendor.sdl.yml', 'utf8'); - const noModelsSdl = fs.readFileSync('./tests/fixtures/gpu_invalid_no_models.sdl.yml', 'utf8'); + const validSDL = fs.readFileSync("./tests/fixtures/gpu_no_gpu_valid.sdl.yml", "utf8"); + const hasAttrSDL = fs.readFileSync("./tests/fixtures/gpu_no_gpu_invalid_has_attributes.sdl.yml", "utf8"); + const noVendorSdl = fs.readFileSync("./tests/fixtures/gpu_invalid_no_vendor.sdl.yml", "utf8"); + const noModelsSdl = fs.readFileSync("./tests/fixtures/gpu_invalid_no_models.sdl.yml", "utf8"); - t.doesNotThrow( - () => SDL.fromString(validSDL, 'beta3'), - "accept if GPU units is 0, and no attributes are present" - ); + t.doesNotThrow(() => SDL.fromString(validSDL, "beta3"), "accept if GPU units is 0, and no attributes are present"); t.throws( - () => SDL.fromString(hasAttrSDL, 'beta3'), + () => SDL.fromString(hasAttrSDL, "beta3"), new Error("GPU must not have attributes if units is 0"), "throw an error if GPU units is not 0, and the are no attributes present" ); t.throws( - () => SDL.fromString(noVendorSdl, 'beta3'), + () => SDL.fromString(noVendorSdl, "beta3"), new Error("GPU must specify a vendor if units is not 0"), "throw an error if GPU units is not 0, and the vendor is not present" ); t.throws( - () => SDL.fromString(noModelsSdl, 'beta3'), + () => SDL.fromString(noModelsSdl, "beta3"), new Error("GPU must specify models if units is not 0"), "throw an error if GPU units is not 0, and the models are not present" ); diff --git a/tests/test_sdl_gpu_vendor_only.ts b/tests/test_sdl_gpu_vendor_only.ts index df25a88..2476bd9 100644 --- a/tests/test_sdl_gpu_vendor_only.ts +++ b/tests/test_sdl_gpu_vendor_only.ts @@ -1,6 +1,6 @@ import tap from "tap"; -import { SDL } from '../src/sdl'; +import { SDL } from "../src/sdl"; const testSDL = `version: "2.0" services: @@ -54,20 +54,20 @@ deployment: count: 2 `; -tap.test("SDL: GPU Manifest", async (t) => { +tap.test("SDL: GPU Manifest", async t => { t.plan(1); - const sdl = SDL.fromString(testSDL, 'beta3'); + const sdl = SDL.fromString(testSDL, "beta3"); const result = sdl.manifest(); t.matchSnapshot(result, "Manifest matches expected result"); }); -tap.test("SDL: GPU Version", async (t) => { +tap.test("SDL: GPU Version", async t => { t.plan(1); - const sdl = SDL.fromString(testSDL, 'beta3'); + const sdl = SDL.fromString(testSDL, "beta3"); const result = await sdl.manifestVersion(); t.matchSnapshot(result, "Manifest version matches expected result"); -}); \ No newline at end of file +}); diff --git a/tests/test_sdl_httpopts.ts b/tests/test_sdl_httpopts.ts index a983872..fa824fe 100644 --- a/tests/test_sdl_httpopts.ts +++ b/tests/test_sdl_httpopts.ts @@ -1,6 +1,6 @@ import tap from "tap"; -import { SDL } from '../src/sdl'; +import { SDL } from "../src/sdl"; const testSDL = `version: '2.0' services: @@ -49,56 +49,54 @@ deployment: const testManifest = [ { - "Name": "akash", - "Services": [ + Name: "akash", + Services: [ { - "Name": "tetris", - "Image": "bsord/tetris", - "Command": null, - "Args": null, - "Env": null, - "Resources": { - "cpu": { - "units": { - "val": "1000" + Name: "tetris", + Image: "bsord/tetris", + Command: null, + Args: null, + Env: null, + Resources: { + cpu: { + units: { + val: "1000" } }, - "memory": { - "size": { - "val": "536870912" + memory: { + size: { + val: "536870912" } }, - "storage": [ + storage: [ { - "name": "default", - "size": { - "val": "536870912" + name: "default", + size: { + val: "536870912" } } ], - "endpoints": null + endpoints: null }, - "Count": 1, - "Expose": [ + Count: 1, + Expose: [ { - "Port": 80, - "ExternalPort": 80, - "Proto": "TCP", - "Service": "", - "Global": true, - "Hosts": null, - "HTTPOptions": { - "MaxBodySize": 104857600, - "ReadTimeout": 50, - "SendTimeout": 100, - "NextTries": 24, - "NextTimeout": 48, - "NextCases": [ - "500" - ] + Port: 80, + ExternalPort: 80, + Proto: "TCP", + Service: "", + Global: true, + Hosts: null, + HTTPOptions: { + MaxBodySize: 104857600, + ReadTimeout: 50, + SendTimeout: 100, + NextTries: 24, + NextTimeout: 48, + NextCases: ["500"] }, - "IP": "", - "EndpointSequenceNumber": 0 + IP: "", + EndpointSequenceNumber: 0 } ] } @@ -106,7 +104,7 @@ const testManifest = [ } ]; -tap.test("SDL: Manifest w/ HTTP options", async (t) => { +tap.test("SDL: Manifest w/ HTTP options", async t => { t.plan(1); const sdl = SDL.fromString(testSDL); @@ -114,4 +112,4 @@ tap.test("SDL: Manifest w/ HTTP options", async (t) => { const expected = testManifest; t.same(result, expected, "Manifest matches expected result"); -}); \ No newline at end of file +}); diff --git a/tests/test_sdl_ip_lease.ts b/tests/test_sdl_ip_lease.ts index 57424a4..72ea7ed 100644 --- a/tests/test_sdl_ip_lease.ts +++ b/tests/test_sdl_ip_lease.ts @@ -3,13 +3,10 @@ import fs from "fs"; import { SDL } from "../src/sdl"; -tap.test("SDL: IP Lease Manifest", async (t) => { +tap.test("SDL: IP Lease Manifest", async t => { t.plan(1); - const validSDL = fs.readFileSync( - "./tests/fixtures/ip_lease_valid.sdl.yml", - "utf8" - ); + const validSDL = fs.readFileSync("./tests/fixtures/ip_lease_valid.sdl.yml", "utf8"); const sdl = SDL.fromString(validSDL, "beta2"); const result = sdl.manifest(); diff --git a/tests/test_sdl_persistent_storage_attributes.ts b/tests/test_sdl_persistent_storage_attributes.ts index e152220..eebf8a9 100644 --- a/tests/test_sdl_persistent_storage_attributes.ts +++ b/tests/test_sdl_persistent_storage_attributes.ts @@ -3,13 +3,10 @@ import fs from "fs"; import { SDL } from "../src/sdl"; -tap.test("SDL: Persistent Storage Manifest", async (t) => { +tap.test("SDL: Persistent Storage Manifest", async t => { t.plan(1); - const validSDL = fs.readFileSync( - "./tests/fixtures/persistent_storage_valid.sdl.yml", - "utf8" - ); + const validSDL = fs.readFileSync("./tests/fixtures/persistent_storage_valid.sdl.yml", "utf8"); const sdl = SDL.fromString(validSDL, "beta2"); const result = sdl.manifest(); diff --git a/tests/test_sdl_sweeper.ts b/tests/test_sdl_sweeper.ts index f2105b3..dc1effb 100644 --- a/tests/test_sdl_sweeper.ts +++ b/tests/test_sdl_sweeper.ts @@ -1,6 +1,6 @@ import tap from "tap"; -import { SDL } from '../src/sdl'; +import { SDL } from "../src/sdl"; const testSDL = `version: '2.0' services: @@ -42,57 +42,54 @@ deployment: const expectedManifest = [ { - "Name": "akash", - "Services": [ + Name: "akash", + Services: [ { - "Name": "minesweeper", - "Image": "creepto/minesweeper", - "Command": null, - "Args": null, - "Env": null, - "Resources": { - "cpu": { - "units": { - "val": "100" + Name: "minesweeper", + Image: "creepto/minesweeper", + Command: null, + Args: null, + Env: null, + Resources: { + cpu: { + units: { + val: "100" } }, - "memory": { - "quantity": { - "val": "536870912" + memory: { + quantity: { + val: "536870912" } }, - "storage": [ + storage: [ { - "name": "default", - "quantity": { - "val": "536870912" + name: "default", + quantity: { + val: "536870912" } } ], - "endpoints": null + endpoints: null }, - "Count": 1, - "Expose": [ + Count: 1, + Expose: [ { - "Port": 3000, - "ExternalPort": 80, - "Proto": "TCP", - "Service": "", - "Global": true, - "Hosts": null, - "HTTPOptions": { - "MaxBodySize": 1048576, - "ReadTimeout": 60000, - "SendTimeout": 60000, - "NextTries": 3, - "NextTimeout": 0, - "NextCases": [ - "error", - "timeout" - ] + Port: 3000, + ExternalPort: 80, + Proto: "TCP", + Service: "", + Global: true, + Hosts: null, + HTTPOptions: { + MaxBodySize: 1048576, + ReadTimeout: 60000, + SendTimeout: 60000, + NextTries: 3, + NextTimeout: 0, + NextCases: ["error", "timeout"] }, - "IP": "", - "EndpointSequenceNumber": 0 + IP: "", + EndpointSequenceNumber: 0 } ] } @@ -102,37 +99,34 @@ const expectedManifest = [ const expectedGroups = [ { - "name": "akash", - "requirements": { - "attributes": [ + name: "akash", + requirements: { + attributes: [ { - "key": "organization", - "value": "akash.network" + key: "organization", + value: "akash.network" } ], - "signedBy": { - "allOf": [], - "anyOf": [ - "akash1365yvmc4s7awdyj3n2sav7xfx76adc6dnmlx63", - "akash18qa2a2ltfyvkyj0ggj3hkvuj6twzyumuaru9s4" - ] + signedBy: { + allOf: [], + anyOf: ["akash1365yvmc4s7awdyj3n2sav7xfx76adc6dnmlx63", "akash18qa2a2ltfyvkyj0ggj3hkvuj6twzyumuaru9s4"] } }, - "resources": [ + resources: [ { - "resources": { - "cpu": { - "units": { - "val": { + resources: { + cpu: { + units: { + val: { "0": 49, "1": 48, "2": 48 } } }, - "memory": { - "quantity": { - "val": { + memory: { + quantity: { + val: { "0": 53, "1": 51, "2": 54, @@ -145,11 +139,11 @@ const expectedGroups = [ } } }, - "storage": [ + storage: [ { - "name": "default", - "quantity": { - "val": { + name: "default", + quantity: { + val: { "0": 53, "1": 51, "2": 54, @@ -163,31 +157,28 @@ const expectedGroups = [ } } ], - "endpoints": [ + endpoints: [ { - "kind": 0, - "sequence_number": 0 + kind: 0, + sequence_number: 0 } ] }, - "price": { - "denom": "uakt", - "amount": "10000" + price: { + denom: "uakt", + amount: "10000" }, - "count": 1 + count: 1 } ] } ]; const expectedVersion = new Uint8Array([ - 117, 11, 114, 73, 243, 231, 14, 234, - 211, 32, 100, 158, 202, 240, 89, 251, - 6, 222, 2, 248, 30, 169, 146, 97, - 176, 103, 44, 196, 64, 220, 97, 102 + 117, 11, 114, 73, 243, 231, 14, 234, 211, 32, 100, 158, 202, 240, 89, 251, 6, 222, 2, 248, 30, 169, 146, 97, 176, 103, 44, 196, 64, 220, 97, 102 ]); -tap.test("SDL mine: fromString", async (t) => { +tap.test("SDL mine: fromString", async t => { t.plan(2); const sdl = SDL.fromString(testSDL); @@ -196,7 +187,7 @@ tap.test("SDL mine: fromString", async (t) => { t.ok(sdl.data !== null, "SDL has data object"); }); -tap.test("SDL mine: Manifest", async (t) => { +tap.test("SDL mine: Manifest", async t => { t.plan(1); const sdl = SDL.fromString(testSDL); @@ -206,7 +197,7 @@ tap.test("SDL mine: Manifest", async (t) => { t.same(result, expected, "Manifest matches expected result"); }); -tap.test("SDL mine: DeploymentGroups", async (t) => { +tap.test("SDL mine: DeploymentGroups", async t => { t.plan(1); const sdl = SDL.fromString(testSDL); @@ -216,7 +207,7 @@ tap.test("SDL mine: DeploymentGroups", async (t) => { t.same(result, expected, "Deployment groups matches expected result"); }); -tap.test("SDL mine: Version", async (t) => { +tap.test("SDL mine: Version", async t => { t.plan(1); const sdl = SDL.fromString(testSDL); @@ -224,4 +215,4 @@ tap.test("SDL mine: Version", async (t) => { const expected = expectedVersion; t.same(result, expected, "Manifest version matches expected result"); -}); \ No newline at end of file +}); diff --git a/tests/test_sdl_v3_resources.ts b/tests/test_sdl_v3_resources.ts index b6ba009..146fe71 100644 --- a/tests/test_sdl_v3_resources.ts +++ b/tests/test_sdl_v3_resources.ts @@ -1,13 +1,13 @@ import tap from "tap"; import fs from "fs"; -import { SDL } from '../src/sdl'; +import { SDL } from "../src/sdl"; -tap.test("SDL: Create v3 Resource Groups", async (t) => { +tap.test("SDL: Create v3 Resource Groups", async t => { t.plan(1); - const testSDL = fs.readFileSync('./tests/fixtures/gpu_basic.sdl.yml', 'utf8'); - const sdl = SDL.fromString(testSDL, 'beta3'); + const testSDL = fs.readFileSync("./tests/fixtures/gpu_basic.sdl.yml", "utf8"); + const sdl = SDL.fromString(testSDL, "beta3"); t.matchSnapshot(sdl.groups(), "Groups matches expected result"); }); diff --git a/tests/test_sdl_wordpress.ts b/tests/test_sdl_wordpress.ts index b51cd8a..b459553 100644 --- a/tests/test_sdl_wordpress.ts +++ b/tests/test_sdl_wordpress.ts @@ -1,37 +1,35 @@ import tap from "tap"; import fs from "fs"; -import { SDL } from '../src/sdl'; +import { SDL } from "../src/sdl"; -const testSDL = fs.readFileSync('./tests/fixtures/wordpress.sdl.yml', 'utf8'); +const testSDL = fs.readFileSync("./tests/fixtures/wordpress.sdl.yml", "utf8"); -const expectedManifest = JSON.parse( - fs.readFileSync('./tests/fixtures/wordpress.manifest.json', 'utf8') -); +const expectedManifest = JSON.parse(fs.readFileSync("./tests/fixtures/wordpress.manifest.json", "utf8")); -tap.test("SDL: Wordpress Manifest", async (t) => { +tap.test("SDL: Wordpress Manifest", async t => { t.plan(1); - const sdl = SDL.fromString(testSDL, 'beta3'); + const sdl = SDL.fromString(testSDL, "beta3"); const result = sdl.manifestSorted(); t.same(result, expectedManifest, "Manifest matches expected result"); }); -tap.test("SDL: Wordpress Deployment Groups", async (t) => { +tap.test("SDL: Wordpress Deployment Groups", async t => { t.plan(1); - const sdl = SDL.fromString(testSDL, 'beta3'); + const sdl = SDL.fromString(testSDL, "beta3"); const result = sdl.groups(); t.matchSnapshot(result, "Groups matches expected result"); }); -tap.test("SDL: Wordpress Version", async (t) => { +tap.test("SDL: Wordpress Version", async t => { t.plan(1); - const sdl = SDL.fromString(testSDL, 'beta3'); + const sdl = SDL.fromString(testSDL, "beta3"); const result = await sdl.manifestVersion(); t.matchSnapshot(result, "Manifest version matches expected result"); -}); \ No newline at end of file +}); diff --git a/tests/util.ts b/tests/util.ts index afb11aa..0ba98fc 100644 --- a/tests/util.ts +++ b/tests/util.ts @@ -1,22 +1,19 @@ -import sinon from "sinon" +import sinon from "sinon"; export function testRpc(spy: sinon.SinonSpy, response = null) { return { request: spy - } + }; } -export const testSnap = (test: Tap.Test) => (message: string) => (value: any) => ( - test.matchSnapshot(value, message) -) +export const testSnap = (test: Tap.Test) => (message: string) => (value: any) => test.matchSnapshot(value, message); export const testParams = (test: Tap.Test, spy: sinon.SinonSpy) => (params: any, message: string) => (result: any) => { test.ok(spy.calledWith(...params), message); return result; -} +}; -export const wrapMockResponse = (value: string) => ( +export const wrapMockResponse = (value: string) => Promise.resolve({ json: () => ({ result: { response: { value } } }) - }) -) \ No newline at end of file + }); diff --git a/tsconfig.json b/tsconfig.json index 1b05778..759daac 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -68,11 +68,6 @@ "skipLibCheck": true /* Skip type checking of declaration files. */, "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ }, - "include": [ - "./src" - ], - "exclude": [ - "./examples", - "./tests" - ] + "include": ["./src"], + "exclude": ["./examples", "./tests"] } diff --git a/webpack.config.js b/webpack.config.js index 476fe59..1710c9e 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -10,20 +10,20 @@ module.exports = { alias: { // add as many aliases as you like! keytar: path.resolve(__dirname, "src/wallet/storage.ts"), - perf_hooks: path.resolve(__dirname, "src/webpack/perf_hooks.ts"), + perf_hooks: path.resolve(__dirname, "src/webpack/perf_hooks.ts") }, extensions: [".wasm", ".mjs", ".js", ".json", ".jsx", ".ts"], fallback: { - http: require.resolve("stream-http"), - }, + http: require.resolve("stream-http") + } }, module: { rules: [ { test: /\.tsx?$/, - use: "ts-loader", - }, - ], + use: "ts-loader" + } + ] }, plugins: [new NodePolyfillPlugin()], output: { @@ -31,9 +31,9 @@ module.exports = { path: path.resolve(__dirname, "umd"), library: { type: "umd", - name: "akjs", + name: "akjs" }, // prevent error: `Uncaught ReferenceError: self is not define` - globalObject: "this", - }, + globalObject: "this" + } };