From 245e94086296473c66ea26ca6d9ef60cb8e519c3 Mon Sep 17 00:00:00 2001 From: Leechael Yim Date: Thu, 19 Oct 2023 17:08:02 +0800 Subject: [PATCH 1/9] dependencies(jssdk): replace undici with cross-fetch --- frontend/packages/sdk/package.json | 2 +- frontend/packages/sdk/src/abis/fetchers.ts | 2 +- .../sdk/src/pruntime/createPruntimeClient.ts | 2 +- frontend/packages/sdk/tsup.browser.ts | 12 ++--- frontend/packages/sdk/yarn.lock | 44 ++++++++++++++----- 5 files changed, 41 insertions(+), 21 deletions(-) diff --git a/frontend/packages/sdk/package.json b/frontend/packages/sdk/package.json index 77d1526e64..991433dfc0 100644 --- a/frontend/packages/sdk/package.json +++ b/frontend/packages/sdk/package.json @@ -48,9 +48,9 @@ "@polkadot/types": "^10.9.1", "@polkadot/util": "^12.3.2", "@polkadot/util-crypto": "^12.3.2", + "cross-fetch": "^4.0.0", "crypto-browserify": "^3.12.0", "protobufjs": "^7.2.4", - "undici": "^5.22.1", "viem": "^1.5.0" }, "devDependencies": { diff --git a/frontend/packages/sdk/src/abis/fetchers.ts b/frontend/packages/sdk/src/abis/fetchers.ts index eeb0915baa..42ff164e99 100644 --- a/frontend/packages/sdk/src/abis/fetchers.ts +++ b/frontend/packages/sdk/src/abis/fetchers.ts @@ -1,5 +1,5 @@ import { type Bool } from '@polkadot/types' -import { fetch } from 'undici' +import fetch from 'cross-fetch' import { type PinkContractPromise } from '../contracts/PinkContract' import { type OnChainRegistry } from '../OnChainRegistry' import { type CertificateData } from '../pruntime/certificate' diff --git a/frontend/packages/sdk/src/pruntime/createPruntimeClient.ts b/frontend/packages/sdk/src/pruntime/createPruntimeClient.ts index 2ac5ff4ab7..c6adfaf513 100644 --- a/frontend/packages/sdk/src/pruntime/createPruntimeClient.ts +++ b/frontend/packages/sdk/src/pruntime/createPruntimeClient.ts @@ -1,4 +1,4 @@ -import { fetch } from 'undici' +import fetch from 'cross-fetch' import { prpc, pruntime_rpc as pruntimeRpc } from './proto' /** diff --git a/frontend/packages/sdk/tsup.browser.ts b/frontend/packages/sdk/tsup.browser.ts index 9cbaf9ff30..7a88c073b0 100644 --- a/frontend/packages/sdk/tsup.browser.ts +++ b/frontend/packages/sdk/tsup.browser.ts @@ -42,12 +42,12 @@ export default defineConfig({ NodeGlobalsPolyfillPlugin({ buffer: true, }), - ReplaceModulesPlugin([ - { - name: 'undici', - contents: 'export const fetch = global.fetch || window.fetch;', - }, - ]), + // ReplaceModulesPlugin([ + // { + // name: 'undici', + // contents: 'export const fetch = global.fetch || window.fetch;', + // }, + // ]), ], entry: ['src/index.ts'], outDir: './dist/browser', diff --git a/frontend/packages/sdk/yarn.lock b/frontend/packages/sdk/yarn.lock index 6087b52ae0..592e4c6b5b 100644 --- a/frontend/packages/sdk/yarn.lock +++ b/frontend/packages/sdk/yarn.lock @@ -309,11 +309,6 @@ resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.49.0.tgz#86f79756004a97fa4df866835093f1df3d03c333" integrity sha512-1S8uAY/MTJqVx0SC4epBq+N2yhuwtNwLbJYNZyhL2pO1ZVKn5HFXav5T41Ryzy9K9V7ZId2JB2oy/W4aCd9/2w== -"@fastify/busboy@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@fastify/busboy/-/busboy-2.0.0.tgz#f22824caff3ae506b18207bad4126dbc6ccdb6b8" - integrity sha512-JUFJad5lv7jxj926GPgymrWQxxjPYuJNiNjNMzqT+HiuP6Vl3dk5xzG+8sTX96np0ZAluvaMzPsjhHZ5rNuNQQ== - "@humanwhocodes/config-array@^0.11.11": version "0.11.11" resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.11.tgz#88a04c570dbbc7dd943e4712429c3df09bc32844" @@ -1646,6 +1641,13 @@ create-require@^1.1.0: resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== +cross-fetch@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-4.0.0.tgz#f037aef1580bb3a1a35164ea2a848ba81b445983" + integrity sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g== + dependencies: + node-fetch "^2.6.12" + cross-spawn@^7.0.2, cross-spawn@^7.0.3: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" @@ -3303,6 +3305,13 @@ node-domexception@^1.0.0: resolved "https://registry.yarnpkg.com/node-domexception/-/node-domexception-1.0.0.tgz#6888db46a1f71c0b76b3f7555016b63fe64766e5" integrity sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ== +node-fetch@^2.6.12: + version "2.7.0" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" + integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== + dependencies: + whatwg-url "^5.0.0" + node-fetch@^3.3.1: version "3.3.1" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-3.3.1.tgz#b3eea7b54b3a48020e46f4f88b9c5a7430d20b2e" @@ -4269,6 +4278,11 @@ tr46@^1.0.1: dependencies: punycode "^2.1.0" +tr46@~0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" + integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== + tree-kill@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/tree-kill/-/tree-kill-1.2.2.tgz#4ca09a9092c88b73a7cdc5e8a01b507b0790a0cc" @@ -4451,13 +4465,6 @@ underscore@~1.13.2: resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.13.6.tgz#04786a1f589dc6c09f761fc5f45b89e935136441" integrity sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A== -undici@^5.22.1: - version "5.26.2" - resolved "https://registry.yarnpkg.com/undici/-/undici-5.26.2.tgz#fa61bfe40f732540d15e58b0c1271872d8e3c995" - integrity sha512-a4PDLQgLTPHVzOK+x3F79/M4GtyYPl+aX9AAK7aQxpwxDwCqkeZCScy7Gk5kWT3JtdFq1uhO3uZJdLtHI4dK9A== - dependencies: - "@fastify/busboy" "^2.0.0" - untildify@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/untildify/-/untildify-4.0.0.tgz#2bc947b953652487e4600949fb091e3ae8cd919b" @@ -4562,11 +4569,24 @@ web-streams-polyfill@^3.0.3: resolved "https://registry.yarnpkg.com/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz#71c2718c52b45fd49dbeee88634b3a60ceab42a6" integrity sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q== +webidl-conversions@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" + integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== + webidl-conversions@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg== +whatwg-url@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" + integrity sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw== + dependencies: + tr46 "~0.0.3" + webidl-conversions "^3.0.0" + whatwg-url@^7.0.0: version "7.1.0" resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-7.1.0.tgz#c2c492f1eca612988efd3d2266be1b9fc6170d06" From b0b8658bdd056a9d9406d92217b7c03d47a8f6a7 Mon Sep 17 00:00:00 2001 From: Leechael Yim Date: Thu, 19 Oct 2023 21:09:48 +0800 Subject: [PATCH 2/9] refactor(jssdk): use util-crypto instead of wasm-crypto --- frontend/packages/sdk/src/OnChainRegistry.ts | 4 ++-- frontend/packages/sdk/src/contracts/PinkBlueprint.ts | 8 ++++---- frontend/packages/sdk/src/contracts/PinkContract.ts | 8 ++++---- .../packages/sdk/src/contracts/PinkLoggerContract.ts | 4 ++-- frontend/packages/sdk/src/pruntime/certificate.ts | 12 ++++++------ frontend/packages/sdk/src/pruntime/coders.ts | 4 ++-- frontend/packages/sdk/src/pruntime/pinkQuery.ts | 5 +++-- 7 files changed, 23 insertions(+), 22 deletions(-) diff --git a/frontend/packages/sdk/src/OnChainRegistry.ts b/frontend/packages/sdk/src/OnChainRegistry.ts index 17548465eb..b12d46f6fc 100644 --- a/frontend/packages/sdk/src/OnChainRegistry.ts +++ b/frontend/packages/sdk/src/OnChainRegistry.ts @@ -3,7 +3,7 @@ import type { Result, U64 } from '@polkadot/types' import { Enum, Map, Option, Text, U8aFixed, Vec } from '@polkadot/types' import { AccountId } from '@polkadot/types/interfaces' import { BN } from '@polkadot/util' -import { waitReady } from '@polkadot/wasm-crypto' +import { cryptoWaitReady } from '@polkadot/util-crypto' import systemAbi from './abis/system.json' import { PinkContractPromise } from './contracts/PinkContract' import { PinkLoggerContractPromise } from './contracts/PinkLoggerContract' @@ -101,7 +101,7 @@ export class OnChainRegistry { options = { autoConnect: true, ...(options || {}) } const instance = new OnChainRegistry(api) // We should ensure the wasm & api has been initialized here. - await Promise.all([waitReady(), api.isReady]) + await Promise.all([cryptoWaitReady(), api.isReady]) if (options.autoConnect) { await instance.connect( options.clusterId, diff --git a/frontend/packages/sdk/src/contracts/PinkBlueprint.ts b/frontend/packages/sdk/src/contracts/PinkBlueprint.ts index 70938cddae..601f018e15 100644 --- a/frontend/packages/sdk/src/contracts/PinkBlueprint.ts +++ b/frontend/packages/sdk/src/contracts/PinkBlueprint.ts @@ -10,7 +10,7 @@ import { type Option } from '@polkadot/types' import type { AccountId, ContractInstantiateResult, Hash } from '@polkadot/types/interfaces' import type { IKeyringPair, ISubmittableResult } from '@polkadot/types/types' import { BN, BN_ZERO, hexAddPrefix, hexToU8a, isUndefined } from '@polkadot/util' -import { sr25519Agree, sr25519KeypairFromSeed } from '@polkadot/wasm-crypto' +import { sr25519Agreement, sr25519PairFromSeed } from '@polkadot/util-crypto' import { from } from 'rxjs' import type { OnChainRegistry } from '../OnChainRegistry' import { phalaTypes } from '../options' @@ -291,11 +291,11 @@ export class PinkBlueprintPromise { // Generate a keypair for encryption // NOTE: each instance only has a pre-generated pair now, it maybe better to generate a new keypair every time encrypting const seed = hexToU8a(hexAddPrefix(randomHex(32))) - const pair = sr25519KeypairFromSeed(seed) - const [sk, pk] = [pair.slice(0, 64), pair.slice(64)] + const pair = sr25519PairFromSeed(seed) + const [sk, pk] = [pair.secretKey, pair.publicKey] const { cert } = options - const queryAgreementKey = sr25519Agree(hexToU8a(hexAddPrefix(this.phatRegistry.remotePubkey)), sk) + const queryAgreementKey = sr25519Agreement(sk, hexToU8a(hexAddPrefix(this.phatRegistry.remotePubkey))) const inkQueryInternal = async (origin: string | AccountId | Uint8Array) => { if (typeof origin === 'string') { diff --git a/frontend/packages/sdk/src/contracts/PinkContract.ts b/frontend/packages/sdk/src/contracts/PinkContract.ts index 8ad4fdcd81..f740f54a6f 100644 --- a/frontend/packages/sdk/src/contracts/PinkContract.ts +++ b/frontend/packages/sdk/src/contracts/PinkContract.ts @@ -13,7 +13,7 @@ import type { Bytes, Null, Result, Struct, Text, Vec, u8 } from '@polkadot/types import type { AccountId, ContractExecResult, EventRecord } from '@polkadot/types/interfaces' import type { Codec, IEnum, IKeyringPair, ISubmittableResult, Registry } from '@polkadot/types/types' import { BN, BN_ZERO, hexAddPrefix, hexToU8a } from '@polkadot/util' -import { sr25519Agree, sr25519KeypairFromSeed } from '@polkadot/wasm-crypto' +import { sr25519Agreement, sr25519PairFromSeed } from '@polkadot/util-crypto' import { from } from 'rxjs' import type { OnChainRegistry } from '../OnChainRegistry' import type { CertificateData } from '../pruntime/certificate' @@ -338,10 +338,10 @@ export class PinkContractPromise< // Generate a keypair for encryption // NOTE: each instance only has a pre-generated pair now, it maybe better to generate a new keypair every time encrypting const seed = hexToU8a(hexAddPrefix(randomHex(32))) - const pair = sr25519KeypairFromSeed(seed) - const [sk, pk] = [pair.slice(0, 64), pair.slice(64)] + const pair = sr25519PairFromSeed(seed) + const [sk, pk] = [pair.secretKey, pair.publicKey] - const queryAgreementKey = sr25519Agree(hexToU8a(hexAddPrefix(this.phatRegistry.remotePubkey)), sk) + const queryAgreementKey = sr25519Agreement(sk, hexToU8a(hexAddPrefix(this.phatRegistry.remotePubkey))) const inkQueryInternal = async (origin: string | AccountId | Uint8Array): Promise => { if (typeof origin === 'string') { diff --git a/frontend/packages/sdk/src/contracts/PinkLoggerContract.ts b/frontend/packages/sdk/src/contracts/PinkLoggerContract.ts index 076317dd9e..d125d94f4d 100644 --- a/frontend/packages/sdk/src/contracts/PinkLoggerContract.ts +++ b/frontend/packages/sdk/src/contracts/PinkLoggerContract.ts @@ -5,7 +5,7 @@ import type { Enum, Struct, Text } from '@polkadot/types' import type { AccountId } from '@polkadot/types/interfaces' import type { Result } from '@polkadot/types-codec' import { hexAddPrefix, hexToString, hexToU8a } from '@polkadot/util' -import { sr25519Agree } from '@polkadot/wasm-crypto' +import { sr25519Agreement } from '@polkadot/util-crypto' import type { OnChainRegistry } from '../OnChainRegistry' import { phalaTypes } from '../options' import { type CertificateData, generatePair, signCertificate } from '../pruntime/certificate' @@ -165,7 +165,7 @@ function sidevmQueryWithReader({ phactory, remotePubkey, address, cert }: Sidevm return async function unsafeRunSidevmQuery(sidevmMessage: Record): Promise { const [sk, pk] = generatePair() const encodedQuery = InkQuerySidevmMessage(address, sidevmMessage) - const queryAgreementKey = sr25519Agree(hexToU8a(hexAddPrefix(remotePubkey)), sk) + const queryAgreementKey = sr25519Agreement(sk, hexToU8a(hexAddPrefix(remotePubkey))) const response = await pinkQuery(phactory, pk, queryAgreementKey, encodedQuery.toHex(), cert) const inkResponse = phalaTypes.createType('InkResponse', response) if (inkResponse.result.isErr) { diff --git a/frontend/packages/sdk/src/pruntime/certificate.ts b/frontend/packages/sdk/src/pruntime/certificate.ts index 5338c31785..9edc4d7153 100644 --- a/frontend/packages/sdk/src/pruntime/certificate.ts +++ b/frontend/packages/sdk/src/pruntime/certificate.ts @@ -3,9 +3,8 @@ import type { Signer as InjectedSigner } from '@polkadot/api/types' import type { KeyringPair } from '@polkadot/keyring/types' import type { Signer } from '@polkadot/types/types' import { hexAddPrefix, hexToU8a, u8aToHex } from '@polkadot/util' -import { decodeAddress } from '@polkadot/util-crypto' +import { cryptoWaitReady, decodeAddress, sr25519PairFromSeed } from '@polkadot/util-crypto' import { KeypairType } from '@polkadot/util-crypto/types' -import { sr25519KeypairFromSeed, waitReady } from '@polkadot/wasm-crypto' import { type Account, type Client } from 'viem' import { signTypedData } from 'viem/wallet' import { phalaTypes } from '../options' @@ -49,8 +48,9 @@ const isUsingSigner = (params: CertificateParams): params is CertificateParamsWi export function generatePair(): [Uint8Array, Uint8Array] { const generatedSeed = hexToU8a(hexAddPrefix(randomHex(32))) - const generatedPair = sr25519KeypairFromSeed(generatedSeed) - return [generatedPair.slice(0, 64), generatedPair.slice(64)] + const generatedPair = sr25519PairFromSeed(generatedSeed) + return [generatedPair.secretKey, generatedPair.publicKey] + // return [generatedPair.slice(0, 64), generatedPair.slice(64)] } function getSignatureTypeFromAccount(account: KeyringPair | InjectedAccount) { @@ -84,7 +84,7 @@ function CertificateBody(pubkey: string, ttl: number, config_bits: number = 0) { } export async function signCertificate(params: CertificateParams): Promise { - await waitReady() + await cryptoWaitReady() if (params.api) { console.warn( 'signCertificate not longer need pass the ApiPromise as parameter, it will remove from type hint in the next.' @@ -162,7 +162,7 @@ export async function unstable_signEip712Certificate({ compactPubkey: string ttl?: number }): Promise { - await waitReady() + await cryptoWaitReady() const [secret, pubkey] = generatePair() const address = account.address || account const eip712Cert = CertificateBody(u8aToHex(pubkey), ttl) diff --git a/frontend/packages/sdk/src/pruntime/coders.ts b/frontend/packages/sdk/src/pruntime/coders.ts index c31e976673..53848a3d23 100644 --- a/frontend/packages/sdk/src/pruntime/coders.ts +++ b/frontend/packages/sdk/src/pruntime/coders.ts @@ -1,7 +1,7 @@ import { U8aFixed } from '@polkadot/types' import { type AccountId } from '@polkadot/types/interfaces' import { BN, BN_ZERO, hexAddPrefix, hexToU8a, stringToHex, u8aToHex } from '@polkadot/util' -import { sr25519Agree } from '@polkadot/wasm-crypto' +import { sr25519Agreement } from '@polkadot/util-crypto' import { phalaTypes } from '../options' import { encrypt } from '../utils/aes-256-gcm' import { randomHex } from '../utils/hex' @@ -109,7 +109,7 @@ export function EncryptedInkCommand( storageDepositLimit?: LooseNumber ) { const [sk, pk] = generatePair() - const commandAgreementKey = sr25519Agree(hexToU8a(address), sk) + const commandAgreementKey = sr25519Agreement(sk, hexToU8a(address)) const payload = phalaTypes.createType('InkCommand', { InkMessage: { nonce: hexAddPrefix(randomHex(32)), diff --git a/frontend/packages/sdk/src/pruntime/pinkQuery.ts b/frontend/packages/sdk/src/pruntime/pinkQuery.ts index e43c439b6f..e41de884fe 100644 --- a/frontend/packages/sdk/src/pruntime/pinkQuery.ts +++ b/frontend/packages/sdk/src/pruntime/pinkQuery.ts @@ -1,6 +1,6 @@ import { type CodecMap } from '@polkadot/types' import { hexAddPrefix, hexToU8a, u8aToHex } from '@polkadot/util' -import { sr25519Sign } from '@polkadot/wasm-crypto' +import { sr25519Sign } from '@polkadot/util-crypto' import { phalaTypes } from '../options' import { decrypt, encrypt } from '../utils/aes-256-gcm' import { randomHex } from '../utils/hex' @@ -36,7 +36,8 @@ export async function pinkQuery( const signature: pruntimeRpc.ISignature = { signedBy: certificate, signatureType: pruntimeRpc.SignatureType.Sr25519, - signature: sr25519Sign(pubkey, secret, encodedEncryptedData), + // signature: sr25519Sign(pubkey, secret, encodedEncryptedData), + signature: sr25519Sign(encodedEncryptedData, { publicKey: pubkey, secretKey: secret }), } // Send request. From d86836d714bd1189e35ed4f8f286dc647263127f Mon Sep 17 00:00:00 2001 From: Leechael Yim Date: Thu, 19 Oct 2023 23:01:06 +0800 Subject: [PATCH 3/9] imp(jssdk): reduce the bundle size --- frontend/packages/sdk/package.json | 4 +- frontend/packages/sdk/tsup.browser.ts | 9 +- frontend/packages/sdk/tsup.node.ts | 1 + frontend/packages/sdk/yarn.lock | 205 +++++++++++++++++++++++++- 4 files changed, 210 insertions(+), 9 deletions(-) diff --git a/frontend/packages/sdk/package.json b/frontend/packages/sdk/package.json index 991433dfc0..daf75376c8 100644 --- a/frontend/packages/sdk/package.json +++ b/frontend/packages/sdk/package.json @@ -46,12 +46,14 @@ "@polkadot/api-contract": "^10.9.1", "@polkadot/keyring": "^12.3.2", "@polkadot/types": "^10.9.1", + "@polkadot/types-augment": "^10.9.1", "@polkadot/util": "^12.3.2", "@polkadot/util-crypto": "^12.3.2", "cross-fetch": "^4.0.0", "crypto-browserify": "^3.12.0", "protobufjs": "^7.2.4", - "viem": "^1.5.0" + "viem": "^1.5.0", + "rxjs": "^7.8.1" }, "devDependencies": { "@esbuild-plugins/node-globals-polyfill": "^0.2.3", diff --git a/frontend/packages/sdk/tsup.browser.ts b/frontend/packages/sdk/tsup.browser.ts index 7a88c073b0..93f4ca90bb 100644 --- a/frontend/packages/sdk/tsup.browser.ts +++ b/frontend/packages/sdk/tsup.browser.ts @@ -42,12 +42,6 @@ export default defineConfig({ NodeGlobalsPolyfillPlugin({ buffer: true, }), - // ReplaceModulesPlugin([ - // { - // name: 'undici', - // contents: 'export const fetch = global.fetch || window.fetch;', - // }, - // ]), ], entry: ['src/index.ts'], outDir: './dist/browser', @@ -57,5 +51,6 @@ export default defineConfig({ target: 'node16', clean: true, platform: 'browser', - noExternal: ['crypto-browserify', 'protobufjs', 'randomBytes', 'undici'], + noExternal: ['crypto-browserify', 'protobufjs', 'randomBytes'], + metafile: true }) diff --git a/frontend/packages/sdk/tsup.node.ts b/frontend/packages/sdk/tsup.node.ts index 3e259b028b..75e3c29901 100644 --- a/frontend/packages/sdk/tsup.node.ts +++ b/frontend/packages/sdk/tsup.node.ts @@ -9,4 +9,5 @@ export default defineConfig({ target: 'node16', clean: true, noExternal: ['protobufjs'], + metafile: true }) diff --git a/frontend/packages/sdk/yarn.lock b/frontend/packages/sdk/yarn.lock index 592e4c6b5b..eedde4cb23 100644 --- a/frontend/packages/sdk/yarn.lock +++ b/frontend/packages/sdk/yarn.lock @@ -411,6 +411,13 @@ dependencies: "@noble/hashes" "1.3.1" +"@noble/curves@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.2.0.tgz#92d7e12e4e49b23105a2555c6984d41733d65c35" + integrity sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw== + dependencies: + "@noble/hashes" "1.3.2" + "@noble/hashes@1.3.0": version "1.3.0" resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.0.tgz#085fd70f6d7d9d109671090ccae1d3bec62554a1" @@ -421,6 +428,11 @@ resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.1.tgz#8831ef002114670c603c458ab8b11328406953a9" integrity sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA== +"@noble/hashes@1.3.2", "@noble/hashes@^1.3.2": + version "1.3.2" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.2.tgz#6f26dbc8fbc7205873ce3cee2f690eba0d421b39" + integrity sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ== + "@nodelib/fs.scandir@2.1.5": version "2.1.5" resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" @@ -551,6 +563,15 @@ "@polkadot/util-crypto" "12.3.2" tslib "^2.5.3" +"@polkadot/keyring@^12.5.1": + version "12.5.1" + resolved "https://registry.yarnpkg.com/@polkadot/keyring/-/keyring-12.5.1.tgz#2f38504aa915f54bbd265f3793a6be55010eb1f5" + integrity sha512-u6b+Q7wI6WY/vwmJS9uUHy/5hKZ226nTlVNmxjkj9GvrRsQvUSwS94163yHPJwiZJiIv5xK5m0rwCMyoYu+wjA== + dependencies: + "@polkadot/util" "12.5.1" + "@polkadot/util-crypto" "12.5.1" + tslib "^2.6.2" + "@polkadot/networks@12.3.2", "@polkadot/networks@^12.3.1": version "12.3.2" resolved "https://registry.yarnpkg.com/@polkadot/networks/-/networks-12.3.2.tgz#131b0439c481add159814dd2cf0286c6c3fe5b3b" @@ -560,6 +581,15 @@ "@substrate/ss58-registry" "^1.40.0" tslib "^2.5.3" +"@polkadot/networks@12.5.1": + version "12.5.1" + resolved "https://registry.yarnpkg.com/@polkadot/networks/-/networks-12.5.1.tgz#685c69d24d78a64f4e750609af22678d57fe1192" + integrity sha512-PP6UUdzz6iHHZH4q96cUEhTcydHj16+61sqeaYEJSF6Q9iY+5WVWQ26+rdjmre/EBdrMQkSS/CKy73mO5z/JkQ== + dependencies: + "@polkadot/util" "12.5.1" + "@substrate/ss58-registry" "^1.43.0" + tslib "^2.6.2" + "@polkadot/rpc-augment@10.9.1": version "10.9.1" resolved "https://registry.yarnpkg.com/@polkadot/rpc-augment/-/rpc-augment-10.9.1.tgz#214ec3ee145d20caa61ea204041a3aadb89c6b0f" @@ -603,6 +633,16 @@ optionalDependencies: "@substrate/connect" "0.7.26" +"@polkadot/types-augment@10.10.1", "@polkadot/types-augment@^10.9.1": + version "10.10.1" + resolved "https://registry.yarnpkg.com/@polkadot/types-augment/-/types-augment-10.10.1.tgz#178ce0b22681109396fc681a027f35da7d757cef" + integrity sha512-XRHE75IocXfFE6EADYov3pqXCyBk5SWbiHoZ0+4WYWP9SwMuzsBaAy84NlhLBlkG3+ehIqi0HpAd/qrljJGZbg== + dependencies: + "@polkadot/types" "10.10.1" + "@polkadot/types-codec" "10.10.1" + "@polkadot/util" "^12.5.1" + tslib "^2.6.2" + "@polkadot/types-augment@10.9.1": version "10.9.1" resolved "https://registry.yarnpkg.com/@polkadot/types-augment/-/types-augment-10.9.1.tgz#5f1c1225c04ffbfe243629a46087c9c9de25a6b3" @@ -613,6 +653,15 @@ "@polkadot/util" "^12.3.1" tslib "^2.5.3" +"@polkadot/types-codec@10.10.1": + version "10.10.1" + resolved "https://registry.yarnpkg.com/@polkadot/types-codec/-/types-codec-10.10.1.tgz#61d28a461493bfb72606b4399078460969a049c8" + integrity sha512-ETPG0wzWzt/bDKRQmYbO7CLe/0lUt8VrG6/bECdv+Kye+8Qedba2LZyTWm/9f2ngms8TZ82yI8mPv/mozdtfnw== + dependencies: + "@polkadot/util" "^12.5.1" + "@polkadot/x-bigint" "^12.5.1" + tslib "^2.6.2" + "@polkadot/types-codec@10.9.1": version "10.9.1" resolved "https://registry.yarnpkg.com/@polkadot/types-codec/-/types-codec-10.9.1.tgz#f30026d3dfeaa69c07c45fa66d1c39318fd232cc" @@ -622,6 +671,15 @@ "@polkadot/x-bigint" "^12.3.1" tslib "^2.5.3" +"@polkadot/types-create@10.10.1": + version "10.10.1" + resolved "https://registry.yarnpkg.com/@polkadot/types-create/-/types-create-10.10.1.tgz#76f1729ef3f4699d99e708801312e43825368827" + integrity sha512-7OiLzd+Ter5zrpjP7fDwA1m89kd38VvMVixfOSv8x7ld2pDT+yyyKl14TCwRSWrKWCMtIb6M3iasPhq5cUa7cw== + dependencies: + "@polkadot/types-codec" "10.10.1" + "@polkadot/util" "^12.5.1" + tslib "^2.6.2" + "@polkadot/types-create@10.9.1": version "10.9.1" resolved "https://registry.yarnpkg.com/@polkadot/types-create/-/types-create-10.9.1.tgz#087d7e2af51cce558b67e3859613b932a3bdc0a3" @@ -651,6 +709,20 @@ "@polkadot/util" "^12.3.1" tslib "^2.5.3" +"@polkadot/types@10.10.1": + version "10.10.1" + resolved "https://registry.yarnpkg.com/@polkadot/types/-/types-10.10.1.tgz#4a55909ff35b0b568c0b1539ae923a259b0dba6a" + integrity sha512-Ben62P1tjYEhKag34GBGcLX6NqcFR1VD5nNbWaxgr+t36Jl/tlHs6P9DlbFqQP7Tt9FmGrAYY0m3oTkhjG1NzA== + dependencies: + "@polkadot/keyring" "^12.5.1" + "@polkadot/types-augment" "10.10.1" + "@polkadot/types-codec" "10.10.1" + "@polkadot/types-create" "10.10.1" + "@polkadot/util" "^12.5.1" + "@polkadot/util-crypto" "^12.5.1" + rxjs "^7.8.1" + tslib "^2.6.2" + "@polkadot/types@10.9.1", "@polkadot/types@^10.9.1": version "10.9.1" resolved "https://registry.yarnpkg.com/@polkadot/types/-/types-10.9.1.tgz#f111d00f7278ad3be95deba3d701fafefe080cb2" @@ -681,6 +753,22 @@ "@scure/base" "1.1.1" tslib "^2.5.3" +"@polkadot/util-crypto@12.5.1", "@polkadot/util-crypto@^12.5.1": + version "12.5.1" + resolved "https://registry.yarnpkg.com/@polkadot/util-crypto/-/util-crypto-12.5.1.tgz#1753b23abfb9d72db950399ef65b0cbe5bef9f2f" + integrity sha512-Y8ORbMcsM/VOqSG3DgqutRGQ8XXK+X9M3C8oOEI2Tji65ZsXbh9Yh+ryPLM0oBp/9vqOXjkLgZJbbVuQceOw0A== + dependencies: + "@noble/curves" "^1.2.0" + "@noble/hashes" "^1.3.2" + "@polkadot/networks" "12.5.1" + "@polkadot/util" "12.5.1" + "@polkadot/wasm-crypto" "^7.2.2" + "@polkadot/wasm-util" "^7.2.2" + "@polkadot/x-bigint" "12.5.1" + "@polkadot/x-randomvalues" "12.5.1" + "@scure/base" "^1.1.3" + tslib "^2.6.2" + "@polkadot/util@12.3.2", "@polkadot/util@^12.3.1", "@polkadot/util@^12.3.2": version "12.3.2" resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-12.3.2.tgz#f46e147b0e6a426da5ba59df4ce65de1a3effe4a" @@ -694,6 +782,19 @@ bn.js "^5.2.1" tslib "^2.5.3" +"@polkadot/util@12.5.1", "@polkadot/util@^12.5.1": + version "12.5.1" + resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-12.5.1.tgz#f4e7415600b013d3b69527aa88904acf085be3f5" + integrity sha512-fDBZL7D4/baMG09Qowseo884m3QBzErGkRWNBId1UjWR99kyex+cIY9fOSzmuQxo6nLdJlLHw1Nz2caN3+Bq0A== + dependencies: + "@polkadot/x-bigint" "12.5.1" + "@polkadot/x-global" "12.5.1" + "@polkadot/x-textdecoder" "12.5.1" + "@polkadot/x-textencoder" "12.5.1" + "@types/bn.js" "^5.1.1" + bn.js "^5.2.1" + tslib "^2.6.2" + "@polkadot/wasm-bridge@7.2.1": version "7.2.1" resolved "https://registry.yarnpkg.com/@polkadot/wasm-bridge/-/wasm-bridge-7.2.1.tgz#8464a96552207d2b49c6f32137b24132534b91ee" @@ -702,6 +803,14 @@ "@polkadot/wasm-util" "7.2.1" tslib "^2.5.0" +"@polkadot/wasm-bridge@7.2.2": + version "7.2.2" + resolved "https://registry.yarnpkg.com/@polkadot/wasm-bridge/-/wasm-bridge-7.2.2.tgz#957b82b17927fe080729e8930b5b5c554f77b8df" + integrity sha512-CgNENd65DVYtackOVXXRA0D1RPoCv5+77IdBCf7kNqu6LeAnR4nfTI6qjaApUdN1xRweUsQjSH7tu7VjkMOA0A== + dependencies: + "@polkadot/wasm-util" "7.2.2" + tslib "^2.6.1" + "@polkadot/wasm-crypto-asmjs@7.2.1": version "7.2.1" resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto-asmjs/-/wasm-crypto-asmjs-7.2.1.tgz#3e7a91e2905ab7354bc37b82f3e151a62bb024db" @@ -709,6 +818,13 @@ dependencies: tslib "^2.5.0" +"@polkadot/wasm-crypto-asmjs@7.2.2": + version "7.2.2" + resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto-asmjs/-/wasm-crypto-asmjs-7.2.2.tgz#25243a4d5d8d997761141b616623cacff4329f13" + integrity sha512-wKg+cpsWQCTSVhjlHuNeB/184rxKqY3vaklacbLOMbUXieIfuDBav5PJdzS3yeiVE60TpYaHW4iX/5OYHS82gg== + dependencies: + tslib "^2.6.1" + "@polkadot/wasm-crypto-init@7.2.1": version "7.2.1" resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto-init/-/wasm-crypto-init-7.2.1.tgz#9dbba41ed7d382575240f1483cf5a139ff2787bd" @@ -720,6 +836,17 @@ "@polkadot/wasm-util" "7.2.1" tslib "^2.5.0" +"@polkadot/wasm-crypto-init@7.2.2": + version "7.2.2" + resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto-init/-/wasm-crypto-init-7.2.2.tgz#ffd105b87fc1b679c06c85c0848183c27bc539e3" + integrity sha512-vD4iPIp9x+SssUIWUenxWLPw4BVIwhXHNMpsV81egK990tvpyIxL205/EF5QRb1mKn8WfWcNFm5tYwwh9NdnnA== + dependencies: + "@polkadot/wasm-bridge" "7.2.2" + "@polkadot/wasm-crypto-asmjs" "7.2.2" + "@polkadot/wasm-crypto-wasm" "7.2.2" + "@polkadot/wasm-util" "7.2.2" + tslib "^2.6.1" + "@polkadot/wasm-crypto-wasm@7.2.1": version "7.2.1" resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto-wasm/-/wasm-crypto-wasm-7.2.1.tgz#d2486322c725f6e5d2cc2d6abcb77ecbbaedc738" @@ -728,6 +855,14 @@ "@polkadot/wasm-util" "7.2.1" tslib "^2.5.0" +"@polkadot/wasm-crypto-wasm@7.2.2": + version "7.2.2" + resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto-wasm/-/wasm-crypto-wasm-7.2.2.tgz#9e49a1565bda2bc830708693b491b37ad8a2144d" + integrity sha512-3efoIB6jA3Hhv6k0YIBwCtlC8gCSWCk+R296yIXRLLr3cGN415KM/PO/d1JIXYI64lbrRzWRmZRhllw3jf6Atg== + dependencies: + "@polkadot/wasm-util" "7.2.2" + tslib "^2.6.1" + "@polkadot/wasm-crypto@^7.2.1": version "7.2.1" resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto/-/wasm-crypto-7.2.1.tgz#db671dcb73f1646dc13478b5ffc3be18c64babe1" @@ -740,6 +875,18 @@ "@polkadot/wasm-util" "7.2.1" tslib "^2.5.0" +"@polkadot/wasm-crypto@^7.2.2": + version "7.2.2" + resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto/-/wasm-crypto-7.2.2.tgz#3c4b300c0997f4f7e2ddcdf8101d97fa1f5d1a7f" + integrity sha512-1ZY1rxUTawYm0m1zylvBMFovNIHYgG2v/XoASNp/EMG5c8FQIxCbhJRaTBA983GVq4lN/IAKREKEp9ZbLLqssA== + dependencies: + "@polkadot/wasm-bridge" "7.2.2" + "@polkadot/wasm-crypto-asmjs" "7.2.2" + "@polkadot/wasm-crypto-init" "7.2.2" + "@polkadot/wasm-crypto-wasm" "7.2.2" + "@polkadot/wasm-util" "7.2.2" + tslib "^2.6.1" + "@polkadot/wasm-util@7.2.1", "@polkadot/wasm-util@^7.2.1": version "7.2.1" resolved "https://registry.yarnpkg.com/@polkadot/wasm-util/-/wasm-util-7.2.1.tgz#fda233120ec02f77f0d14e4d3c7ad9ce06535fb8" @@ -747,6 +894,13 @@ dependencies: tslib "^2.5.0" +"@polkadot/wasm-util@7.2.2", "@polkadot/wasm-util@^7.2.2": + version "7.2.2" + resolved "https://registry.yarnpkg.com/@polkadot/wasm-util/-/wasm-util-7.2.2.tgz#f8aa62eba9a35466aa23f3c5634f3e8dbd398bbf" + integrity sha512-N/25960ifCc56sBlJZ2h5UBpEPvxBmMLgwYsl7CUuT+ea2LuJW9Xh8VHDN/guYXwmm92/KvuendYkEUykpm/JQ== + dependencies: + tslib "^2.6.1" + "@polkadot/x-bigint@12.3.2", "@polkadot/x-bigint@^12.3.1": version "12.3.2" resolved "https://registry.yarnpkg.com/@polkadot/x-bigint/-/x-bigint-12.3.2.tgz#0e99489cc7938bed40762aaaed58ded6850ab54b" @@ -755,6 +909,14 @@ "@polkadot/x-global" "12.3.2" tslib "^2.5.3" +"@polkadot/x-bigint@12.5.1", "@polkadot/x-bigint@^12.5.1": + version "12.5.1" + resolved "https://registry.yarnpkg.com/@polkadot/x-bigint/-/x-bigint-12.5.1.tgz#0a6a3a34fae51468e7b02b42e0ff0747fd88a80a" + integrity sha512-Fw39eoN9v0sqxSzfSC5awaDVdzojIiE7d1hRSQgVSrES+8whWvtbYMR0qwbVhTuW7DvogHmye41P9xKMlXZysg== + dependencies: + "@polkadot/x-global" "12.5.1" + tslib "^2.6.2" + "@polkadot/x-fetch@^12.3.1": version "12.3.2" resolved "https://registry.yarnpkg.com/@polkadot/x-fetch/-/x-fetch-12.3.2.tgz#7e8d2113268e792dd5d1b259ef13839c6aa77996" @@ -771,6 +933,13 @@ dependencies: tslib "^2.5.3" +"@polkadot/x-global@12.5.1": + version "12.5.1" + resolved "https://registry.yarnpkg.com/@polkadot/x-global/-/x-global-12.5.1.tgz#947bb90e0c46c853ffe216dd6dcb6847d5c18a98" + integrity sha512-6K0YtWEg0eXInDOihU5aSzeb1t9TiDdX9ZuRly+58ALSqw5kPZYmQLbzE1d8HWzyXRXK+YH65GtLzfMGqfYHmw== + dependencies: + tslib "^2.6.2" + "@polkadot/x-randomvalues@12.3.2": version "12.3.2" resolved "https://registry.yarnpkg.com/@polkadot/x-randomvalues/-/x-randomvalues-12.3.2.tgz#43ac489a998098bdd40b3f82f28adb5b542db2a5" @@ -779,6 +948,14 @@ "@polkadot/x-global" "12.3.2" tslib "^2.5.3" +"@polkadot/x-randomvalues@12.5.1": + version "12.5.1" + resolved "https://registry.yarnpkg.com/@polkadot/x-randomvalues/-/x-randomvalues-12.5.1.tgz#b30c6fa8749f5776f1d8a78b6edddb9b0f9c2853" + integrity sha512-UsMb1d+77EPNjW78BpHjZLIm4TaIpfqq89OhZP/6gDIoS2V9iE/AK3jOWKm1G7Y2F8XIoX1qzQpuMakjfagFoQ== + dependencies: + "@polkadot/x-global" "12.5.1" + tslib "^2.6.2" + "@polkadot/x-textdecoder@12.3.2": version "12.3.2" resolved "https://registry.yarnpkg.com/@polkadot/x-textdecoder/-/x-textdecoder-12.3.2.tgz#bbd5682744f3552ce5d4d792ff48a3ca525eafcf" @@ -787,6 +964,14 @@ "@polkadot/x-global" "12.3.2" tslib "^2.5.3" +"@polkadot/x-textdecoder@12.5.1": + version "12.5.1" + resolved "https://registry.yarnpkg.com/@polkadot/x-textdecoder/-/x-textdecoder-12.5.1.tgz#8d89d2b5efbffb2550a48f8afb4a834e1d8d4f6e" + integrity sha512-j2YZGWfwhMC8nHW3BXq10fAPY02ObLL/qoTjCMJ1Cmc/OGq18Ep7k9cXXbjFAq3wf3tUUewt/u/hStKCk3IvfQ== + dependencies: + "@polkadot/x-global" "12.5.1" + tslib "^2.6.2" + "@polkadot/x-textencoder@12.3.2": version "12.3.2" resolved "https://registry.yarnpkg.com/@polkadot/x-textencoder/-/x-textencoder-12.3.2.tgz#223e6f6dd78e2d81c6dcc6f244c76ceae7b08e32" @@ -795,6 +980,14 @@ "@polkadot/x-global" "12.3.2" tslib "^2.5.3" +"@polkadot/x-textencoder@12.5.1": + version "12.5.1" + resolved "https://registry.yarnpkg.com/@polkadot/x-textencoder/-/x-textencoder-12.5.1.tgz#9104e37a60068df2fbf57c81a7ce48669430c76c" + integrity sha512-1JNNpOGb4wD+c7zFuOqjibl49LPnHNr4rj4s3WflLUIZvOMY6euoDuN3ISjQSHCLlVSoH0sOCWA3qXZU4bCTDQ== + dependencies: + "@polkadot/x-global" "12.5.1" + tslib "^2.6.2" + "@polkadot/x-ws@^12.3.1": version "12.3.2" resolved "https://registry.yarnpkg.com/@polkadot/x-ws/-/x-ws-12.3.2.tgz#422559dfbdaac4c965d5e1b406b6cc4529214f94" @@ -862,6 +1055,11 @@ resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.1.tgz#ebb651ee52ff84f420097055f4bf46cfba403938" integrity sha512-ZxOhsSyxYwLJj3pLZCefNitxsj093tb2vq90mp2txoYeBqbcjDjqFhyM8eUjq/uFm6zJ+mUuqxlS2FkuSY1MTA== +"@scure/base@^1.1.3": + version "1.1.3" + resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.3.tgz#8584115565228290a6c6c4961973e0903bb3df2f" + integrity sha512-/+SgoRjLq7Xlf0CWuLHq2LUZeL/w65kfzAPG5NH9pcmBhs+nunQTn4gvdwgMTIXnt9b2C/1SeL2XiysZEyIC9Q== + "@scure/bip32@1.3.0": version "1.3.0" resolved "https://registry.yarnpkg.com/@scure/bip32/-/bip32-1.3.0.tgz#6c8d980ef3f290987736acd0ee2e0f0d50068d87" @@ -903,6 +1101,11 @@ resolved "https://registry.yarnpkg.com/@substrate/ss58-registry/-/ss58-registry-1.40.0.tgz#2223409c496271df786c1ca8496898896595441e" integrity sha512-QuU2nBql3J4KCnOWtWDw4n1K4JU0T79j54ZZvm/9nhsX6AIar13FyhsaBfs6QkJ2ixTQAnd7TocJIoJRWbqMZA== +"@substrate/ss58-registry@^1.43.0": + version "1.43.0" + resolved "https://registry.yarnpkg.com/@substrate/ss58-registry/-/ss58-registry-1.43.0.tgz#93108e45cb7ef6d82560c153e3692c2aa1c711b3" + integrity sha512-USEkXA46P9sqClL7PZv0QFsit4S8Im97wchKG0/H/9q3AT/S76r40UHfCr4Un7eBJPE23f7fU9BZ0ITpP9MCsA== + "@tsconfig/node10@^1.0.7": version "1.0.9" resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.9.tgz#df4907fc07a886922637b15e02d4cebc4c0021b2" @@ -4337,7 +4540,7 @@ tslib@^2.5.3: resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.0.tgz#b295854684dbda164e181d259a22cd779dcd7bc3" integrity sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA== -tslib@^2.6.0: +tslib@^2.6.0, tslib@^2.6.1, tslib@^2.6.2: version "2.6.2" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== From 2897a66c8baac884e445ce7a3349fb42cae8c19d Mon Sep 17 00:00:00 2001 From: Leechael Yim Date: Thu, 19 Oct 2023 23:11:48 +0800 Subject: [PATCH 4/9] build(jssdk): ignore the metafile in final package --- frontend/packages/sdk/package.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/packages/sdk/package.json b/frontend/packages/sdk/package.json index daf75376c8..a2a0c1dd97 100644 --- a/frontend/packages/sdk/package.json +++ b/frontend/packages/sdk/package.json @@ -24,7 +24,10 @@ } }, "files": [ - "dist/*" + "dist/*/*.js", + "dist/*/*.ts", + "dist/*/*.mjs", + "dist/*/*.mts" ], "scripts": { "prebuild": "shx rm -rf dist", From 3adb0e3391b159cefed3b64d0e6a5dd85063da57 Mon Sep 17 00:00:00 2001 From: Leechael Yim Date: Fri, 20 Oct 2023 01:00:13 +0800 Subject: [PATCH 5/9] imp(jssdk): configure pfjs compile filter and cut down the size of generated files --- frontend/packages/sdk/pbconfig.json | 27 + frontend/packages/sdk/scripts/build_proto.sh | 2 +- frontend/packages/sdk/src/OnChainRegistry.ts | 1 + .../sdk/src/pruntime/proto/index.d.ts | 5716 +----- .../packages/sdk/src/pruntime/proto/index.js | 14442 +++------------- frontend/packages/sdk/tsup.browser.ts | 2 +- frontend/packages/sdk/tsup.node.ts | 2 +- 7 files changed, 2820 insertions(+), 17372 deletions(-) create mode 100644 frontend/packages/sdk/pbconfig.json diff --git a/frontend/packages/sdk/pbconfig.json b/frontend/packages/sdk/pbconfig.json new file mode 100644 index 0000000000..b19fb34913 --- /dev/null +++ b/frontend/packages/sdk/pbconfig.json @@ -0,0 +1,27 @@ +{ + "messageNames": [ + "google.protobuf.Empty", + "prpc.PrpcError", + "pruntime_rpc.PhactoryAPI.GetInfo", + "pruntime_rpc.PhactoryInfo", + "pruntime_rpc.PhactoryAPI.ContractQuery", + "pruntime_rpc.ContractQueryRequest", + "pruntime_rpc.ContractQueryResponse", + "pruntime_rpc.PhactoryAPI.GetContractInfo", + "pruntime_rpc.GetContractInfoRequest", + "pruntime_rpc.GetContractInfoResponse", + "pruntime_rpc.PhactoryAPI.GetRuntimeInfo", + "pruntime_rpc.GetRuntimeInfoRequest", + "pruntime_rpc.InitRuntimeResponse", + "pruntime_rpc.PhactoryAPI.UploadSidevmCode", + "pruntime_rpc.SidevmCode", + "pruntime_rpc.PhactoryAPI.CalculateContractId", + "pruntime_rpc.ContractParameters", + "pruntime_rpc.ContractId", + "pruntime_rpc.PhactoryAPI.AddEndpoint", + "pruntime_rpc.AddEndpointRequest", + "pruntime_rpc.GetEndpointResponse", + "pruntime_rpc.Certificate", + "pruntime_rpc.SignatureType" + ] +} diff --git a/frontend/packages/sdk/scripts/build_proto.sh b/frontend/packages/sdk/scripts/build_proto.sh index d4e6804cf1..4888b1c2a6 100755 --- a/frontend/packages/sdk/scripts/build_proto.sh +++ b/frontend/packages/sdk/scripts/build_proto.sh @@ -11,7 +11,7 @@ downloadProto "pruntime_rpc" echo "Generating static code from proto files" rm -rf src/pruntime/proto/* -node_modules/.bin/pbjs -w commonjs -t static-module -o src/pruntime/proto/index.js proto/*.proto +node_modules/.bin/pbjs -w commonjs -t static-module --filter pbconfig.json -o src/pruntime/proto/index.js proto/*.proto node_modules/.bin/pbts -o src/pruntime/proto/index.d.ts src/pruntime/proto/index.js echo "Done" diff --git a/frontend/packages/sdk/src/OnChainRegistry.ts b/frontend/packages/sdk/src/OnChainRegistry.ts index b12d46f6fc..1db1ae9cac 100644 --- a/frontend/packages/sdk/src/OnChainRegistry.ts +++ b/frontend/packages/sdk/src/OnChainRegistry.ts @@ -213,6 +213,7 @@ export class OnChainRegistry { try { await this.#phactory.getInfo({}) } catch (err) { + console.error(err) throw new Error( 'Phactory API not compatible, you might need downgrade your @phala/sdk or connect to an up-to-date endpoint.' ) diff --git a/frontend/packages/sdk/src/pruntime/proto/index.d.ts b/frontend/packages/sdk/src/pruntime/proto/index.d.ts index c367e18307..30fc8e2482 100644 --- a/frontend/packages/sdk/src/pruntime/proto/index.d.ts +++ b/frontend/packages/sdk/src/pruntime/proto/index.d.ts @@ -613,6 +613,20 @@ export namespace pruntime_rpc { * @returns Promise */ public loadClusterState(request: pruntime_rpc.ISaveClusterStateResponse): Promise; + + /** + * Calls TryUpgradePinkRuntime. + * @param request PinkRuntimeVersion message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public tryUpgradePinkRuntime(request: pruntime_rpc.IPinkRuntimeVersion, callback: pruntime_rpc.PhactoryAPI.TryUpgradePinkRuntimeCallback): void; + + /** + * Calls TryUpgradePinkRuntime. + * @param request PinkRuntimeVersion message or plain object + * @returns Promise + */ + public tryUpgradePinkRuntime(request: pruntime_rpc.IPinkRuntimeVersion): Promise; } namespace PhactoryAPI { @@ -861,6 +875,13 @@ export namespace pruntime_rpc { * @param [response] Empty */ type LoadClusterStateCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link pruntime_rpc.PhactoryAPI#tryUpgradePinkRuntime}. + * @param error Error, if any + * @param [response] Empty + */ + type TryUpgradePinkRuntimeCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; } /** Properties of a PhactoryInfo. */ @@ -1465,6065 +1486,1834 @@ export namespace pruntime_rpc { public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SyncedTo. */ - interface ISyncedTo { + /** Properties of a GetRuntimeInfoRequest. */ + interface IGetRuntimeInfoRequest { + + /** GetRuntimeInfoRequest forceRefreshRa */ + forceRefreshRa?: (boolean|null); - /** SyncedTo syncedTo */ - syncedTo?: (number|null); + /** GetRuntimeInfoRequest encodedOperator */ + encodedOperator?: (Uint8Array|null); } - /** Represents a SyncedTo. */ - class SyncedTo implements ISyncedTo { + /** Represents a GetRuntimeInfoRequest. */ + class GetRuntimeInfoRequest implements IGetRuntimeInfoRequest { /** - * Constructs a new SyncedTo. + * Constructs a new GetRuntimeInfoRequest. * @param [properties] Properties to set */ - constructor(properties?: pruntime_rpc.ISyncedTo); + constructor(properties?: pruntime_rpc.IGetRuntimeInfoRequest); - /** SyncedTo syncedTo. */ - public syncedTo: number; + /** GetRuntimeInfoRequest forceRefreshRa. */ + public forceRefreshRa: boolean; + + /** GetRuntimeInfoRequest encodedOperator. */ + public encodedOperator?: (Uint8Array|null); + + /** GetRuntimeInfoRequest _encodedOperator. */ + public _encodedOperator?: "encodedOperator"; /** - * Creates a new SyncedTo instance using the specified properties. + * Creates a new GetRuntimeInfoRequest instance using the specified properties. * @param [properties] Properties to set - * @returns SyncedTo instance + * @returns GetRuntimeInfoRequest instance */ - public static create(properties?: pruntime_rpc.ISyncedTo): pruntime_rpc.SyncedTo; + public static create(properties?: pruntime_rpc.IGetRuntimeInfoRequest): pruntime_rpc.GetRuntimeInfoRequest; /** - * Encodes the specified SyncedTo message. Does not implicitly {@link pruntime_rpc.SyncedTo.verify|verify} messages. - * @param message SyncedTo message or plain object to encode + * Encodes the specified GetRuntimeInfoRequest message. Does not implicitly {@link pruntime_rpc.GetRuntimeInfoRequest.verify|verify} messages. + * @param message GetRuntimeInfoRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: pruntime_rpc.ISyncedTo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: pruntime_rpc.IGetRuntimeInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SyncedTo message, length delimited. Does not implicitly {@link pruntime_rpc.SyncedTo.verify|verify} messages. - * @param message SyncedTo message or plain object to encode + * Encodes the specified GetRuntimeInfoRequest message, length delimited. Does not implicitly {@link pruntime_rpc.GetRuntimeInfoRequest.verify|verify} messages. + * @param message GetRuntimeInfoRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: pruntime_rpc.ISyncedTo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: pruntime_rpc.IGetRuntimeInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SyncedTo message from the specified reader or buffer. + * Decodes a GetRuntimeInfoRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SyncedTo + * @returns GetRuntimeInfoRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.SyncedTo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.GetRuntimeInfoRequest; /** - * Decodes a SyncedTo message from the specified reader or buffer, length delimited. + * Decodes a GetRuntimeInfoRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SyncedTo + * @returns GetRuntimeInfoRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.SyncedTo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.GetRuntimeInfoRequest; /** - * Verifies a SyncedTo message. + * Verifies a GetRuntimeInfoRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SyncedTo message from a plain object. Also converts values to their respective internal types. + * Creates a GetRuntimeInfoRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SyncedTo + * @returns GetRuntimeInfoRequest */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.SyncedTo; + public static fromObject(object: { [k: string]: any }): pruntime_rpc.GetRuntimeInfoRequest; /** - * Creates a plain object from a SyncedTo message. Also converts values to other types if specified. - * @param message SyncedTo + * Creates a plain object from a GetRuntimeInfoRequest message. Also converts values to other types if specified. + * @param message GetRuntimeInfoRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: pruntime_rpc.SyncedTo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: pruntime_rpc.GetRuntimeInfoRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SyncedTo to JSON. + * Converts this GetRuntimeInfoRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SyncedTo + * Gets the default type url for GetRuntimeInfoRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a HeadersToSync. */ - interface IHeadersToSync { + /** Properties of an InitRuntimeResponse. */ + interface IInitRuntimeResponse { + + /** InitRuntimeResponse encodedRuntimeInfo */ + encodedRuntimeInfo?: (Uint8Array|null); + + /** InitRuntimeResponse encodedGenesisBlockHash */ + encodedGenesisBlockHash?: (Uint8Array|null); + + /** InitRuntimeResponse encodedPublicKey */ + encodedPublicKey?: (Uint8Array|null); - /** HeadersToSync encodedHeaders */ - encodedHeaders?: (Uint8Array|null); + /** InitRuntimeResponse encodedEcdhPublicKey */ + encodedEcdhPublicKey?: (Uint8Array|null); - /** HeadersToSync encodedAuthoritySetChange */ - encodedAuthoritySetChange?: (Uint8Array|null); + /** InitRuntimeResponse attestation */ + attestation?: (pruntime_rpc.IAttestation|null); } - /** Represents a HeadersToSync. */ - class HeadersToSync implements IHeadersToSync { + /** Represents an InitRuntimeResponse. */ + class InitRuntimeResponse implements IInitRuntimeResponse { /** - * Constructs a new HeadersToSync. + * Constructs a new InitRuntimeResponse. * @param [properties] Properties to set */ - constructor(properties?: pruntime_rpc.IHeadersToSync); + constructor(properties?: pruntime_rpc.IInitRuntimeResponse); + + /** InitRuntimeResponse encodedRuntimeInfo. */ + public encodedRuntimeInfo: Uint8Array; + + /** InitRuntimeResponse encodedGenesisBlockHash. */ + public encodedGenesisBlockHash: Uint8Array; + + /** InitRuntimeResponse encodedPublicKey. */ + public encodedPublicKey: Uint8Array; - /** HeadersToSync encodedHeaders. */ - public encodedHeaders: Uint8Array; + /** InitRuntimeResponse encodedEcdhPublicKey. */ + public encodedEcdhPublicKey: Uint8Array; - /** HeadersToSync encodedAuthoritySetChange. */ - public encodedAuthoritySetChange?: (Uint8Array|null); + /** InitRuntimeResponse attestation. */ + public attestation?: (pruntime_rpc.IAttestation|null); - /** HeadersToSync _encodedAuthoritySetChange. */ - public _encodedAuthoritySetChange?: "encodedAuthoritySetChange"; + /** InitRuntimeResponse _attestation. */ + public _attestation?: "attestation"; /** - * Creates a new HeadersToSync instance using the specified properties. + * Creates a new InitRuntimeResponse instance using the specified properties. * @param [properties] Properties to set - * @returns HeadersToSync instance + * @returns InitRuntimeResponse instance */ - public static create(properties?: pruntime_rpc.IHeadersToSync): pruntime_rpc.HeadersToSync; + public static create(properties?: pruntime_rpc.IInitRuntimeResponse): pruntime_rpc.InitRuntimeResponse; /** - * Encodes the specified HeadersToSync message. Does not implicitly {@link pruntime_rpc.HeadersToSync.verify|verify} messages. - * @param message HeadersToSync message or plain object to encode + * Encodes the specified InitRuntimeResponse message. Does not implicitly {@link pruntime_rpc.InitRuntimeResponse.verify|verify} messages. + * @param message InitRuntimeResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: pruntime_rpc.IHeadersToSync, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: pruntime_rpc.IInitRuntimeResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified HeadersToSync message, length delimited. Does not implicitly {@link pruntime_rpc.HeadersToSync.verify|verify} messages. - * @param message HeadersToSync message or plain object to encode + * Encodes the specified InitRuntimeResponse message, length delimited. Does not implicitly {@link pruntime_rpc.InitRuntimeResponse.verify|verify} messages. + * @param message InitRuntimeResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: pruntime_rpc.IHeadersToSync, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: pruntime_rpc.IInitRuntimeResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a HeadersToSync message from the specified reader or buffer. + * Decodes an InitRuntimeResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns HeadersToSync + * @returns InitRuntimeResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.HeadersToSync; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.InitRuntimeResponse; /** - * Decodes a HeadersToSync message from the specified reader or buffer, length delimited. + * Decodes an InitRuntimeResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns HeadersToSync + * @returns InitRuntimeResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.HeadersToSync; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.InitRuntimeResponse; /** - * Verifies a HeadersToSync message. + * Verifies an InitRuntimeResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a HeadersToSync message from a plain object. Also converts values to their respective internal types. + * Creates an InitRuntimeResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns HeadersToSync + * @returns InitRuntimeResponse */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.HeadersToSync; + public static fromObject(object: { [k: string]: any }): pruntime_rpc.InitRuntimeResponse; /** - * Creates a plain object from a HeadersToSync message. Also converts values to other types if specified. - * @param message HeadersToSync + * Creates a plain object from an InitRuntimeResponse message. Also converts values to other types if specified. + * @param message InitRuntimeResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: pruntime_rpc.HeadersToSync, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: pruntime_rpc.InitRuntimeResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this HeadersToSync to JSON. + * Converts this InitRuntimeResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for HeadersToSync + * Gets the default type url for InitRuntimeResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ParaHeadersToSync. */ - interface IParaHeadersToSync { + /** Properties of an Attestation. */ + interface IAttestation { + + /** Attestation version */ + version?: (number|null); + + /** Attestation provider */ + provider?: (string|null); + + /** Attestation payload */ + payload?: (pruntime_rpc.IAttestationReport|null); - /** ParaHeadersToSync encodedHeaders */ - encodedHeaders?: (Uint8Array|null); + /** Attestation encodedReport */ + encodedReport?: (Uint8Array|null); - /** ParaHeadersToSync proof */ - proof?: (Uint8Array[]|null); + /** Attestation timestamp */ + timestamp?: (number|Long|null); } - /** Represents a ParaHeadersToSync. */ - class ParaHeadersToSync implements IParaHeadersToSync { + /** Represents an Attestation. */ + class Attestation implements IAttestation { /** - * Constructs a new ParaHeadersToSync. + * Constructs a new Attestation. * @param [properties] Properties to set */ - constructor(properties?: pruntime_rpc.IParaHeadersToSync); + constructor(properties?: pruntime_rpc.IAttestation); + + /** Attestation version. */ + public version: number; - /** ParaHeadersToSync encodedHeaders. */ - public encodedHeaders: Uint8Array; + /** Attestation provider. */ + public provider: string; + + /** Attestation payload. */ + public payload?: (pruntime_rpc.IAttestationReport|null); + + /** Attestation encodedReport. */ + public encodedReport: Uint8Array; - /** ParaHeadersToSync proof. */ - public proof: Uint8Array[]; + /** Attestation timestamp. */ + public timestamp: (number|Long); /** - * Creates a new ParaHeadersToSync instance using the specified properties. + * Creates a new Attestation instance using the specified properties. * @param [properties] Properties to set - * @returns ParaHeadersToSync instance + * @returns Attestation instance */ - public static create(properties?: pruntime_rpc.IParaHeadersToSync): pruntime_rpc.ParaHeadersToSync; + public static create(properties?: pruntime_rpc.IAttestation): pruntime_rpc.Attestation; /** - * Encodes the specified ParaHeadersToSync message. Does not implicitly {@link pruntime_rpc.ParaHeadersToSync.verify|verify} messages. - * @param message ParaHeadersToSync message or plain object to encode + * Encodes the specified Attestation message. Does not implicitly {@link pruntime_rpc.Attestation.verify|verify} messages. + * @param message Attestation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: pruntime_rpc.IParaHeadersToSync, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: pruntime_rpc.IAttestation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ParaHeadersToSync message, length delimited. Does not implicitly {@link pruntime_rpc.ParaHeadersToSync.verify|verify} messages. - * @param message ParaHeadersToSync message or plain object to encode + * Encodes the specified Attestation message, length delimited. Does not implicitly {@link pruntime_rpc.Attestation.verify|verify} messages. + * @param message Attestation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: pruntime_rpc.IParaHeadersToSync, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: pruntime_rpc.IAttestation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ParaHeadersToSync message from the specified reader or buffer. + * Decodes an Attestation message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ParaHeadersToSync + * @returns Attestation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.ParaHeadersToSync; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.Attestation; /** - * Decodes a ParaHeadersToSync message from the specified reader or buffer, length delimited. + * Decodes an Attestation message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ParaHeadersToSync + * @returns Attestation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.ParaHeadersToSync; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.Attestation; /** - * Verifies a ParaHeadersToSync message. + * Verifies an Attestation message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ParaHeadersToSync message from a plain object. Also converts values to their respective internal types. + * Creates an Attestation message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ParaHeadersToSync + * @returns Attestation */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.ParaHeadersToSync; + public static fromObject(object: { [k: string]: any }): pruntime_rpc.Attestation; /** - * Creates a plain object from a ParaHeadersToSync message. Also converts values to other types if specified. - * @param message ParaHeadersToSync + * Creates a plain object from an Attestation message. Also converts values to other types if specified. + * @param message Attestation * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: pruntime_rpc.ParaHeadersToSync, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: pruntime_rpc.Attestation, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ParaHeadersToSync to JSON. + * Converts this Attestation to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ParaHeadersToSync + * Gets the default type url for Attestation * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CombinedHeadersToSync. */ - interface ICombinedHeadersToSync { - - /** CombinedHeadersToSync encodedRelaychainHeaders */ - encodedRelaychainHeaders?: (Uint8Array|null); + /** Properties of an AttestationReport. */ + interface IAttestationReport { - /** CombinedHeadersToSync authoritySetChange */ - authoritySetChange?: (Uint8Array|null); + /** AttestationReport report */ + report?: (string|null); - /** CombinedHeadersToSync encodedParachainHeaders */ - encodedParachainHeaders?: (Uint8Array|null); + /** AttestationReport signature */ + signature?: (Uint8Array|null); - /** CombinedHeadersToSync proof */ - proof?: (Uint8Array[]|null); + /** AttestationReport signingCert */ + signingCert?: (Uint8Array|null); } - /** Represents a CombinedHeadersToSync. */ - class CombinedHeadersToSync implements ICombinedHeadersToSync { + /** Represents an AttestationReport. */ + class AttestationReport implements IAttestationReport { /** - * Constructs a new CombinedHeadersToSync. + * Constructs a new AttestationReport. * @param [properties] Properties to set */ - constructor(properties?: pruntime_rpc.ICombinedHeadersToSync); - - /** CombinedHeadersToSync encodedRelaychainHeaders. */ - public encodedRelaychainHeaders: Uint8Array; - - /** CombinedHeadersToSync authoritySetChange. */ - public authoritySetChange?: (Uint8Array|null); + constructor(properties?: pruntime_rpc.IAttestationReport); - /** CombinedHeadersToSync encodedParachainHeaders. */ - public encodedParachainHeaders: Uint8Array; + /** AttestationReport report. */ + public report: string; - /** CombinedHeadersToSync proof. */ - public proof: Uint8Array[]; + /** AttestationReport signature. */ + public signature: Uint8Array; - /** CombinedHeadersToSync _authoritySetChange. */ - public _authoritySetChange?: "authoritySetChange"; + /** AttestationReport signingCert. */ + public signingCert: Uint8Array; /** - * Creates a new CombinedHeadersToSync instance using the specified properties. + * Creates a new AttestationReport instance using the specified properties. * @param [properties] Properties to set - * @returns CombinedHeadersToSync instance + * @returns AttestationReport instance */ - public static create(properties?: pruntime_rpc.ICombinedHeadersToSync): pruntime_rpc.CombinedHeadersToSync; + public static create(properties?: pruntime_rpc.IAttestationReport): pruntime_rpc.AttestationReport; /** - * Encodes the specified CombinedHeadersToSync message. Does not implicitly {@link pruntime_rpc.CombinedHeadersToSync.verify|verify} messages. - * @param message CombinedHeadersToSync message or plain object to encode + * Encodes the specified AttestationReport message. Does not implicitly {@link pruntime_rpc.AttestationReport.verify|verify} messages. + * @param message AttestationReport message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: pruntime_rpc.ICombinedHeadersToSync, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: pruntime_rpc.IAttestationReport, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CombinedHeadersToSync message, length delimited. Does not implicitly {@link pruntime_rpc.CombinedHeadersToSync.verify|verify} messages. - * @param message CombinedHeadersToSync message or plain object to encode + * Encodes the specified AttestationReport message, length delimited. Does not implicitly {@link pruntime_rpc.AttestationReport.verify|verify} messages. + * @param message AttestationReport message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: pruntime_rpc.ICombinedHeadersToSync, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: pruntime_rpc.IAttestationReport, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CombinedHeadersToSync message from the specified reader or buffer. + * Decodes an AttestationReport message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CombinedHeadersToSync + * @returns AttestationReport * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.CombinedHeadersToSync; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.AttestationReport; /** - * Decodes a CombinedHeadersToSync message from the specified reader or buffer, length delimited. + * Decodes an AttestationReport message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CombinedHeadersToSync + * @returns AttestationReport * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.CombinedHeadersToSync; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.AttestationReport; /** - * Verifies a CombinedHeadersToSync message. + * Verifies an AttestationReport message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CombinedHeadersToSync message from a plain object. Also converts values to their respective internal types. + * Creates an AttestationReport message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CombinedHeadersToSync + * @returns AttestationReport */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.CombinedHeadersToSync; + public static fromObject(object: { [k: string]: any }): pruntime_rpc.AttestationReport; /** - * Creates a plain object from a CombinedHeadersToSync message. Also converts values to other types if specified. - * @param message CombinedHeadersToSync + * Creates a plain object from an AttestationReport message. Also converts values to other types if specified. + * @param message AttestationReport * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: pruntime_rpc.CombinedHeadersToSync, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: pruntime_rpc.AttestationReport, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CombinedHeadersToSync to JSON. + * Converts this AttestationReport to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CombinedHeadersToSync + * Gets the default type url for AttestationReport * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a HeadersSyncedTo. */ - interface IHeadersSyncedTo { + /** Properties of a ContractQueryRequest. */ + interface IContractQueryRequest { - /** HeadersSyncedTo relaychainSyncedTo */ - relaychainSyncedTo?: (number|null); + /** ContractQueryRequest encodedEncryptedData */ + encodedEncryptedData?: (Uint8Array|null); - /** HeadersSyncedTo parachainSyncedTo */ - parachainSyncedTo?: (number|null); + /** ContractQueryRequest signature */ + signature?: (pruntime_rpc.ISignature|null); } - /** Represents a HeadersSyncedTo. */ - class HeadersSyncedTo implements IHeadersSyncedTo { + /** Represents a ContractQueryRequest. */ + class ContractQueryRequest implements IContractQueryRequest { /** - * Constructs a new HeadersSyncedTo. + * Constructs a new ContractQueryRequest. * @param [properties] Properties to set */ - constructor(properties?: pruntime_rpc.IHeadersSyncedTo); + constructor(properties?: pruntime_rpc.IContractQueryRequest); - /** HeadersSyncedTo relaychainSyncedTo. */ - public relaychainSyncedTo: number; + /** ContractQueryRequest encodedEncryptedData. */ + public encodedEncryptedData: Uint8Array; - /** HeadersSyncedTo parachainSyncedTo. */ - public parachainSyncedTo: number; + /** ContractQueryRequest signature. */ + public signature?: (pruntime_rpc.ISignature|null); /** - * Creates a new HeadersSyncedTo instance using the specified properties. + * Creates a new ContractQueryRequest instance using the specified properties. * @param [properties] Properties to set - * @returns HeadersSyncedTo instance + * @returns ContractQueryRequest instance */ - public static create(properties?: pruntime_rpc.IHeadersSyncedTo): pruntime_rpc.HeadersSyncedTo; + public static create(properties?: pruntime_rpc.IContractQueryRequest): pruntime_rpc.ContractQueryRequest; /** - * Encodes the specified HeadersSyncedTo message. Does not implicitly {@link pruntime_rpc.HeadersSyncedTo.verify|verify} messages. - * @param message HeadersSyncedTo message or plain object to encode + * Encodes the specified ContractQueryRequest message. Does not implicitly {@link pruntime_rpc.ContractQueryRequest.verify|verify} messages. + * @param message ContractQueryRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: pruntime_rpc.IHeadersSyncedTo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: pruntime_rpc.IContractQueryRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified HeadersSyncedTo message, length delimited. Does not implicitly {@link pruntime_rpc.HeadersSyncedTo.verify|verify} messages. - * @param message HeadersSyncedTo message or plain object to encode + * Encodes the specified ContractQueryRequest message, length delimited. Does not implicitly {@link pruntime_rpc.ContractQueryRequest.verify|verify} messages. + * @param message ContractQueryRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: pruntime_rpc.IHeadersSyncedTo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: pruntime_rpc.IContractQueryRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a HeadersSyncedTo message from the specified reader or buffer. + * Decodes a ContractQueryRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns HeadersSyncedTo + * @returns ContractQueryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.HeadersSyncedTo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.ContractQueryRequest; /** - * Decodes a HeadersSyncedTo message from the specified reader or buffer, length delimited. + * Decodes a ContractQueryRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns HeadersSyncedTo + * @returns ContractQueryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.HeadersSyncedTo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.ContractQueryRequest; /** - * Verifies a HeadersSyncedTo message. + * Verifies a ContractQueryRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a HeadersSyncedTo message from a plain object. Also converts values to their respective internal types. + * Creates a ContractQueryRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns HeadersSyncedTo + * @returns ContractQueryRequest */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.HeadersSyncedTo; + public static fromObject(object: { [k: string]: any }): pruntime_rpc.ContractQueryRequest; /** - * Creates a plain object from a HeadersSyncedTo message. Also converts values to other types if specified. - * @param message HeadersSyncedTo + * Creates a plain object from a ContractQueryRequest message. Also converts values to other types if specified. + * @param message ContractQueryRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: pruntime_rpc.HeadersSyncedTo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: pruntime_rpc.ContractQueryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this HeadersSyncedTo to JSON. + * Converts this ContractQueryRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for HeadersSyncedTo + * Gets the default type url for ContractQueryRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Blocks. */ - interface IBlocks { + /** Properties of a Signature. */ + interface ISignature { - /** Blocks encodedBlocks */ - encodedBlocks?: (Uint8Array|null); - } - - /** Represents a Blocks. */ - class Blocks implements IBlocks { - - /** - * Constructs a new Blocks. - * @param [properties] Properties to set - */ - constructor(properties?: pruntime_rpc.IBlocks); - - /** Blocks encodedBlocks. */ - public encodedBlocks: Uint8Array; - - /** - * Creates a new Blocks instance using the specified properties. - * @param [properties] Properties to set - * @returns Blocks instance - */ - public static create(properties?: pruntime_rpc.IBlocks): pruntime_rpc.Blocks; - - /** - * Encodes the specified Blocks message. Does not implicitly {@link pruntime_rpc.Blocks.verify|verify} messages. - * @param message Blocks message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pruntime_rpc.IBlocks, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Blocks message, length delimited. Does not implicitly {@link pruntime_rpc.Blocks.verify|verify} messages. - * @param message Blocks message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pruntime_rpc.IBlocks, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Blocks message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Blocks - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.Blocks; - - /** - * Decodes a Blocks message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Blocks - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.Blocks; - - /** - * Verifies a Blocks message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Blocks message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Blocks - */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.Blocks; - - /** - * Creates a plain object from a Blocks message. Also converts values to other types if specified. - * @param message Blocks - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pruntime_rpc.Blocks, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Blocks to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Blocks - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an InitRuntimeRequest. */ - interface IInitRuntimeRequest { - - /** InitRuntimeRequest skipRa */ - skipRa?: (boolean|null); - - /** InitRuntimeRequest encodedGenesisInfo */ - encodedGenesisInfo?: (Uint8Array|null); - - /** InitRuntimeRequest debugSetKey */ - debugSetKey?: (Uint8Array|null); - - /** InitRuntimeRequest encodedGenesisState */ - encodedGenesisState?: (Uint8Array|null); - - /** InitRuntimeRequest encodedOperator */ - encodedOperator?: (Uint8Array|null); - - /** InitRuntimeRequest isParachain */ - isParachain?: (boolean|null); - - /** InitRuntimeRequest attestationProvider */ - attestationProvider?: (Uint8Array|null); - } - - /** Represents an InitRuntimeRequest. */ - class InitRuntimeRequest implements IInitRuntimeRequest { - - /** - * Constructs a new InitRuntimeRequest. - * @param [properties] Properties to set - */ - constructor(properties?: pruntime_rpc.IInitRuntimeRequest); - - /** InitRuntimeRequest skipRa. */ - public skipRa: boolean; - - /** InitRuntimeRequest encodedGenesisInfo. */ - public encodedGenesisInfo: Uint8Array; - - /** InitRuntimeRequest debugSetKey. */ - public debugSetKey?: (Uint8Array|null); - - /** InitRuntimeRequest encodedGenesisState. */ - public encodedGenesisState: Uint8Array; - - /** InitRuntimeRequest encodedOperator. */ - public encodedOperator?: (Uint8Array|null); - - /** InitRuntimeRequest isParachain. */ - public isParachain: boolean; - - /** InitRuntimeRequest attestationProvider. */ - public attestationProvider?: (Uint8Array|null); - - /** InitRuntimeRequest _debugSetKey. */ - public _debugSetKey?: "debugSetKey"; - - /** InitRuntimeRequest _encodedOperator. */ - public _encodedOperator?: "encodedOperator"; - - /** InitRuntimeRequest _attestationProvider. */ - public _attestationProvider?: "attestationProvider"; - - /** - * Creates a new InitRuntimeRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns InitRuntimeRequest instance - */ - public static create(properties?: pruntime_rpc.IInitRuntimeRequest): pruntime_rpc.InitRuntimeRequest; - - /** - * Encodes the specified InitRuntimeRequest message. Does not implicitly {@link pruntime_rpc.InitRuntimeRequest.verify|verify} messages. - * @param message InitRuntimeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pruntime_rpc.IInitRuntimeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified InitRuntimeRequest message, length delimited. Does not implicitly {@link pruntime_rpc.InitRuntimeRequest.verify|verify} messages. - * @param message InitRuntimeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pruntime_rpc.IInitRuntimeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an InitRuntimeRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns InitRuntimeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.InitRuntimeRequest; - - /** - * Decodes an InitRuntimeRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns InitRuntimeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.InitRuntimeRequest; - - /** - * Verifies an InitRuntimeRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an InitRuntimeRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns InitRuntimeRequest - */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.InitRuntimeRequest; - - /** - * Creates a plain object from an InitRuntimeRequest message. Also converts values to other types if specified. - * @param message InitRuntimeRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pruntime_rpc.InitRuntimeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this InitRuntimeRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for InitRuntimeRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetRuntimeInfoRequest. */ - interface IGetRuntimeInfoRequest { - - /** GetRuntimeInfoRequest forceRefreshRa */ - forceRefreshRa?: (boolean|null); - - /** GetRuntimeInfoRequest encodedOperator */ - encodedOperator?: (Uint8Array|null); - } - - /** Represents a GetRuntimeInfoRequest. */ - class GetRuntimeInfoRequest implements IGetRuntimeInfoRequest { - - /** - * Constructs a new GetRuntimeInfoRequest. - * @param [properties] Properties to set - */ - constructor(properties?: pruntime_rpc.IGetRuntimeInfoRequest); - - /** GetRuntimeInfoRequest forceRefreshRa. */ - public forceRefreshRa: boolean; - - /** GetRuntimeInfoRequest encodedOperator. */ - public encodedOperator?: (Uint8Array|null); - - /** GetRuntimeInfoRequest _encodedOperator. */ - public _encodedOperator?: "encodedOperator"; - - /** - * Creates a new GetRuntimeInfoRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetRuntimeInfoRequest instance - */ - public static create(properties?: pruntime_rpc.IGetRuntimeInfoRequest): pruntime_rpc.GetRuntimeInfoRequest; - - /** - * Encodes the specified GetRuntimeInfoRequest message. Does not implicitly {@link pruntime_rpc.GetRuntimeInfoRequest.verify|verify} messages. - * @param message GetRuntimeInfoRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pruntime_rpc.IGetRuntimeInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetRuntimeInfoRequest message, length delimited. Does not implicitly {@link pruntime_rpc.GetRuntimeInfoRequest.verify|verify} messages. - * @param message GetRuntimeInfoRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pruntime_rpc.IGetRuntimeInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetRuntimeInfoRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetRuntimeInfoRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.GetRuntimeInfoRequest; - - /** - * Decodes a GetRuntimeInfoRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetRuntimeInfoRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.GetRuntimeInfoRequest; - - /** - * Verifies a GetRuntimeInfoRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetRuntimeInfoRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetRuntimeInfoRequest - */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.GetRuntimeInfoRequest; - - /** - * Creates a plain object from a GetRuntimeInfoRequest message. Also converts values to other types if specified. - * @param message GetRuntimeInfoRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pruntime_rpc.GetRuntimeInfoRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetRuntimeInfoRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetRuntimeInfoRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an InitRuntimeResponse. */ - interface IInitRuntimeResponse { - - /** InitRuntimeResponse encodedRuntimeInfo */ - encodedRuntimeInfo?: (Uint8Array|null); - - /** InitRuntimeResponse encodedGenesisBlockHash */ - encodedGenesisBlockHash?: (Uint8Array|null); - - /** InitRuntimeResponse encodedPublicKey */ - encodedPublicKey?: (Uint8Array|null); - - /** InitRuntimeResponse encodedEcdhPublicKey */ - encodedEcdhPublicKey?: (Uint8Array|null); - - /** InitRuntimeResponse attestation */ - attestation?: (pruntime_rpc.IAttestation|null); - } - - /** Represents an InitRuntimeResponse. */ - class InitRuntimeResponse implements IInitRuntimeResponse { - - /** - * Constructs a new InitRuntimeResponse. - * @param [properties] Properties to set - */ - constructor(properties?: pruntime_rpc.IInitRuntimeResponse); - - /** InitRuntimeResponse encodedRuntimeInfo. */ - public encodedRuntimeInfo: Uint8Array; - - /** InitRuntimeResponse encodedGenesisBlockHash. */ - public encodedGenesisBlockHash: Uint8Array; - - /** InitRuntimeResponse encodedPublicKey. */ - public encodedPublicKey: Uint8Array; - - /** InitRuntimeResponse encodedEcdhPublicKey. */ - public encodedEcdhPublicKey: Uint8Array; - - /** InitRuntimeResponse attestation. */ - public attestation?: (pruntime_rpc.IAttestation|null); - - /** InitRuntimeResponse _attestation. */ - public _attestation?: "attestation"; - - /** - * Creates a new InitRuntimeResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns InitRuntimeResponse instance - */ - public static create(properties?: pruntime_rpc.IInitRuntimeResponse): pruntime_rpc.InitRuntimeResponse; - - /** - * Encodes the specified InitRuntimeResponse message. Does not implicitly {@link pruntime_rpc.InitRuntimeResponse.verify|verify} messages. - * @param message InitRuntimeResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pruntime_rpc.IInitRuntimeResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified InitRuntimeResponse message, length delimited. Does not implicitly {@link pruntime_rpc.InitRuntimeResponse.verify|verify} messages. - * @param message InitRuntimeResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pruntime_rpc.IInitRuntimeResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an InitRuntimeResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns InitRuntimeResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.InitRuntimeResponse; - - /** - * Decodes an InitRuntimeResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns InitRuntimeResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.InitRuntimeResponse; - - /** - * Verifies an InitRuntimeResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an InitRuntimeResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns InitRuntimeResponse - */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.InitRuntimeResponse; - - /** - * Creates a plain object from an InitRuntimeResponse message. Also converts values to other types if specified. - * @param message InitRuntimeResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pruntime_rpc.InitRuntimeResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this InitRuntimeResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for InitRuntimeResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Attestation. */ - interface IAttestation { - - /** Attestation version */ - version?: (number|null); - - /** Attestation provider */ - provider?: (string|null); - - /** Attestation payload */ - payload?: (pruntime_rpc.IAttestationReport|null); - - /** Attestation encodedReport */ - encodedReport?: (Uint8Array|null); - - /** Attestation timestamp */ - timestamp?: (number|Long|null); - } - - /** Represents an Attestation. */ - class Attestation implements IAttestation { - - /** - * Constructs a new Attestation. - * @param [properties] Properties to set - */ - constructor(properties?: pruntime_rpc.IAttestation); - - /** Attestation version. */ - public version: number; - - /** Attestation provider. */ - public provider: string; - - /** Attestation payload. */ - public payload?: (pruntime_rpc.IAttestationReport|null); - - /** Attestation encodedReport. */ - public encodedReport: Uint8Array; - - /** Attestation timestamp. */ - public timestamp: (number|Long); - - /** - * Creates a new Attestation instance using the specified properties. - * @param [properties] Properties to set - * @returns Attestation instance - */ - public static create(properties?: pruntime_rpc.IAttestation): pruntime_rpc.Attestation; - - /** - * Encodes the specified Attestation message. Does not implicitly {@link pruntime_rpc.Attestation.verify|verify} messages. - * @param message Attestation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pruntime_rpc.IAttestation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Attestation message, length delimited. Does not implicitly {@link pruntime_rpc.Attestation.verify|verify} messages. - * @param message Attestation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pruntime_rpc.IAttestation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Attestation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Attestation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.Attestation; - - /** - * Decodes an Attestation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Attestation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.Attestation; - - /** - * Verifies an Attestation message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Attestation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Attestation - */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.Attestation; - - /** - * Creates a plain object from an Attestation message. Also converts values to other types if specified. - * @param message Attestation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pruntime_rpc.Attestation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Attestation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Attestation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AttestationReport. */ - interface IAttestationReport { - - /** AttestationReport report */ - report?: (string|null); - - /** AttestationReport signature */ - signature?: (Uint8Array|null); - - /** AttestationReport signingCert */ - signingCert?: (Uint8Array|null); - } - - /** Represents an AttestationReport. */ - class AttestationReport implements IAttestationReport { - - /** - * Constructs a new AttestationReport. - * @param [properties] Properties to set - */ - constructor(properties?: pruntime_rpc.IAttestationReport); - - /** AttestationReport report. */ - public report: string; - - /** AttestationReport signature. */ - public signature: Uint8Array; - - /** AttestationReport signingCert. */ - public signingCert: Uint8Array; - - /** - * Creates a new AttestationReport instance using the specified properties. - * @param [properties] Properties to set - * @returns AttestationReport instance - */ - public static create(properties?: pruntime_rpc.IAttestationReport): pruntime_rpc.AttestationReport; - - /** - * Encodes the specified AttestationReport message. Does not implicitly {@link pruntime_rpc.AttestationReport.verify|verify} messages. - * @param message AttestationReport message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pruntime_rpc.IAttestationReport, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AttestationReport message, length delimited. Does not implicitly {@link pruntime_rpc.AttestationReport.verify|verify} messages. - * @param message AttestationReport message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pruntime_rpc.IAttestationReport, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AttestationReport message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AttestationReport - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.AttestationReport; - - /** - * Decodes an AttestationReport message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AttestationReport - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.AttestationReport; - - /** - * Verifies an AttestationReport message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an AttestationReport message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AttestationReport - */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.AttestationReport; - - /** - * Creates a plain object from an AttestationReport message. Also converts values to other types if specified. - * @param message AttestationReport - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pruntime_rpc.AttestationReport, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AttestationReport to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AttestationReport - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetEgressMessagesResponse. */ - interface IGetEgressMessagesResponse { - - /** GetEgressMessagesResponse encodedMessages */ - encodedMessages?: (Uint8Array|null); - } - - /** Represents a GetEgressMessagesResponse. */ - class GetEgressMessagesResponse implements IGetEgressMessagesResponse { - - /** - * Constructs a new GetEgressMessagesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: pruntime_rpc.IGetEgressMessagesResponse); - - /** GetEgressMessagesResponse encodedMessages. */ - public encodedMessages: Uint8Array; - - /** - * Creates a new GetEgressMessagesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GetEgressMessagesResponse instance - */ - public static create(properties?: pruntime_rpc.IGetEgressMessagesResponse): pruntime_rpc.GetEgressMessagesResponse; - - /** - * Encodes the specified GetEgressMessagesResponse message. Does not implicitly {@link pruntime_rpc.GetEgressMessagesResponse.verify|verify} messages. - * @param message GetEgressMessagesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pruntime_rpc.IGetEgressMessagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetEgressMessagesResponse message, length delimited. Does not implicitly {@link pruntime_rpc.GetEgressMessagesResponse.verify|verify} messages. - * @param message GetEgressMessagesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pruntime_rpc.IGetEgressMessagesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetEgressMessagesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetEgressMessagesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.GetEgressMessagesResponse; - - /** - * Decodes a GetEgressMessagesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetEgressMessagesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.GetEgressMessagesResponse; - - /** - * Verifies a GetEgressMessagesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetEgressMessagesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetEgressMessagesResponse - */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.GetEgressMessagesResponse; - - /** - * Creates a plain object from a GetEgressMessagesResponse message. Also converts values to other types if specified. - * @param message GetEgressMessagesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pruntime_rpc.GetEgressMessagesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetEgressMessagesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetEgressMessagesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ContractQueryRequest. */ - interface IContractQueryRequest { - - /** ContractQueryRequest encodedEncryptedData */ - encodedEncryptedData?: (Uint8Array|null); - - /** ContractQueryRequest signature */ - signature?: (pruntime_rpc.ISignature|null); - } - - /** Represents a ContractQueryRequest. */ - class ContractQueryRequest implements IContractQueryRequest { - - /** - * Constructs a new ContractQueryRequest. - * @param [properties] Properties to set - */ - constructor(properties?: pruntime_rpc.IContractQueryRequest); - - /** ContractQueryRequest encodedEncryptedData. */ - public encodedEncryptedData: Uint8Array; - - /** ContractQueryRequest signature. */ - public signature?: (pruntime_rpc.ISignature|null); - - /** - * Creates a new ContractQueryRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ContractQueryRequest instance - */ - public static create(properties?: pruntime_rpc.IContractQueryRequest): pruntime_rpc.ContractQueryRequest; - - /** - * Encodes the specified ContractQueryRequest message. Does not implicitly {@link pruntime_rpc.ContractQueryRequest.verify|verify} messages. - * @param message ContractQueryRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pruntime_rpc.IContractQueryRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ContractQueryRequest message, length delimited. Does not implicitly {@link pruntime_rpc.ContractQueryRequest.verify|verify} messages. - * @param message ContractQueryRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pruntime_rpc.IContractQueryRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ContractQueryRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ContractQueryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.ContractQueryRequest; - - /** - * Decodes a ContractQueryRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ContractQueryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.ContractQueryRequest; - - /** - * Verifies a ContractQueryRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ContractQueryRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ContractQueryRequest - */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.ContractQueryRequest; - - /** - * Creates a plain object from a ContractQueryRequest message. Also converts values to other types if specified. - * @param message ContractQueryRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pruntime_rpc.ContractQueryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ContractQueryRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ContractQueryRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Signature. */ - interface ISignature { - - /** Signature signedBy */ - signedBy?: (pruntime_rpc.ICertificate|null); - - /** Signature signatureType */ - signatureType?: (pruntime_rpc.SignatureType|null); - - /** Signature signature */ - signature?: (Uint8Array|null); - } - - /** Represents a Signature. */ - class Signature implements ISignature { - - /** - * Constructs a new Signature. - * @param [properties] Properties to set - */ - constructor(properties?: pruntime_rpc.ISignature); - - /** Signature signedBy. */ - public signedBy?: (pruntime_rpc.ICertificate|null); - - /** Signature signatureType. */ - public signatureType: pruntime_rpc.SignatureType; - - /** Signature signature. */ - public signature: Uint8Array; - - /** - * Creates a new Signature instance using the specified properties. - * @param [properties] Properties to set - * @returns Signature instance - */ - public static create(properties?: pruntime_rpc.ISignature): pruntime_rpc.Signature; - - /** - * Encodes the specified Signature message. Does not implicitly {@link pruntime_rpc.Signature.verify|verify} messages. - * @param message Signature message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pruntime_rpc.ISignature, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Signature message, length delimited. Does not implicitly {@link pruntime_rpc.Signature.verify|verify} messages. - * @param message Signature message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pruntime_rpc.ISignature, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Signature message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Signature - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.Signature; - - /** - * Decodes a Signature message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Signature - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.Signature; - - /** - * Verifies a Signature message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Signature message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Signature - */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.Signature; - - /** - * Creates a plain object from a Signature message. Also converts values to other types if specified. - * @param message Signature - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pruntime_rpc.Signature, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Signature to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Signature - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Certificate. */ - interface ICertificate { - - /** Certificate encodedBody */ - encodedBody?: (Uint8Array|null); - - /** Certificate signature */ - signature?: (pruntime_rpc.ISignature|null); - } - - /** Represents a Certificate. */ - class Certificate implements ICertificate { - - /** - * Constructs a new Certificate. - * @param [properties] Properties to set - */ - constructor(properties?: pruntime_rpc.ICertificate); - - /** Certificate encodedBody. */ - public encodedBody: Uint8Array; - - /** Certificate signature. */ - public signature?: (pruntime_rpc.ISignature|null); - - /** - * Creates a new Certificate instance using the specified properties. - * @param [properties] Properties to set - * @returns Certificate instance - */ - public static create(properties?: pruntime_rpc.ICertificate): pruntime_rpc.Certificate; - - /** - * Encodes the specified Certificate message. Does not implicitly {@link pruntime_rpc.Certificate.verify|verify} messages. - * @param message Certificate message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pruntime_rpc.ICertificate, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Certificate message, length delimited. Does not implicitly {@link pruntime_rpc.Certificate.verify|verify} messages. - * @param message Certificate message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pruntime_rpc.ICertificate, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Certificate message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Certificate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.Certificate; - - /** - * Decodes a Certificate message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Certificate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.Certificate; - - /** - * Verifies a Certificate message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Certificate message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Certificate - */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.Certificate; - - /** - * Creates a plain object from a Certificate message. Also converts values to other types if specified. - * @param message Certificate - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pruntime_rpc.Certificate, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Certificate to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Certificate - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** SignatureType enum. */ - enum SignatureType { - Ed25519 = 0, - Sr25519 = 1, - Ecdsa = 2, - Ed25519WrapBytes = 3, - Sr25519WrapBytes = 4, - EcdsaWrapBytes = 5, - Eip712 = 6 - } - - /** Properties of a ContractQueryResponse. */ - interface IContractQueryResponse { - - /** ContractQueryResponse encodedEncryptedData */ - encodedEncryptedData?: (Uint8Array|null); - } - - /** Represents a ContractQueryResponse. */ - class ContractQueryResponse implements IContractQueryResponse { - - /** - * Constructs a new ContractQueryResponse. - * @param [properties] Properties to set - */ - constructor(properties?: pruntime_rpc.IContractQueryResponse); - - /** ContractQueryResponse encodedEncryptedData. */ - public encodedEncryptedData: Uint8Array; - - /** - * Creates a new ContractQueryResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ContractQueryResponse instance - */ - public static create(properties?: pruntime_rpc.IContractQueryResponse): pruntime_rpc.ContractQueryResponse; - - /** - * Encodes the specified ContractQueryResponse message. Does not implicitly {@link pruntime_rpc.ContractQueryResponse.verify|verify} messages. - * @param message ContractQueryResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pruntime_rpc.IContractQueryResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ContractQueryResponse message, length delimited. Does not implicitly {@link pruntime_rpc.ContractQueryResponse.verify|verify} messages. - * @param message ContractQueryResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pruntime_rpc.IContractQueryResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ContractQueryResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ContractQueryResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.ContractQueryResponse; - - /** - * Decodes a ContractQueryResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ContractQueryResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.ContractQueryResponse; - - /** - * Verifies a ContractQueryResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ContractQueryResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ContractQueryResponse - */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.ContractQueryResponse; - - /** - * Creates a plain object from a ContractQueryResponse message. Also converts values to other types if specified. - * @param message ContractQueryResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pruntime_rpc.ContractQueryResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ContractQueryResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ContractQueryResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetWorkerStateRequest. */ - interface IGetWorkerStateRequest { - - /** GetWorkerStateRequest publicKey */ - publicKey?: (Uint8Array|null); - } - - /** Represents a GetWorkerStateRequest. */ - class GetWorkerStateRequest implements IGetWorkerStateRequest { - - /** - * Constructs a new GetWorkerStateRequest. - * @param [properties] Properties to set - */ - constructor(properties?: pruntime_rpc.IGetWorkerStateRequest); - - /** GetWorkerStateRequest publicKey. */ - public publicKey: Uint8Array; - - /** - * Creates a new GetWorkerStateRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetWorkerStateRequest instance - */ - public static create(properties?: pruntime_rpc.IGetWorkerStateRequest): pruntime_rpc.GetWorkerStateRequest; - - /** - * Encodes the specified GetWorkerStateRequest message. Does not implicitly {@link pruntime_rpc.GetWorkerStateRequest.verify|verify} messages. - * @param message GetWorkerStateRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pruntime_rpc.IGetWorkerStateRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetWorkerStateRequest message, length delimited. Does not implicitly {@link pruntime_rpc.GetWorkerStateRequest.verify|verify} messages. - * @param message GetWorkerStateRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pruntime_rpc.IGetWorkerStateRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetWorkerStateRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetWorkerStateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.GetWorkerStateRequest; - - /** - * Decodes a GetWorkerStateRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetWorkerStateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.GetWorkerStateRequest; - - /** - * Verifies a GetWorkerStateRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetWorkerStateRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetWorkerStateRequest - */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.GetWorkerStateRequest; - - /** - * Creates a plain object from a GetWorkerStateRequest message. Also converts values to other types if specified. - * @param message GetWorkerStateRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pruntime_rpc.GetWorkerStateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetWorkerStateRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetWorkerStateRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WorkerStat. */ - interface IWorkerStat { - - /** WorkerStat lastHeartbeatForBlock */ - lastHeartbeatForBlock?: (number|null); - - /** WorkerStat lastHeartbeatAtBlock */ - lastHeartbeatAtBlock?: (number|null); - - /** WorkerStat lastGkResponsiveEvent */ - lastGkResponsiveEvent?: (pruntime_rpc.ResponsiveEvent|null); - - /** WorkerStat lastGkResponsiveEventAtBlock */ - lastGkResponsiveEventAtBlock?: (number|null); - } - - /** Represents a WorkerStat. */ - class WorkerStat implements IWorkerStat { - - /** - * Constructs a new WorkerStat. - * @param [properties] Properties to set - */ - constructor(properties?: pruntime_rpc.IWorkerStat); - - /** WorkerStat lastHeartbeatForBlock. */ - public lastHeartbeatForBlock: number; - - /** WorkerStat lastHeartbeatAtBlock. */ - public lastHeartbeatAtBlock: number; - - /** WorkerStat lastGkResponsiveEvent. */ - public lastGkResponsiveEvent: pruntime_rpc.ResponsiveEvent; - - /** WorkerStat lastGkResponsiveEventAtBlock. */ - public lastGkResponsiveEventAtBlock: number; - - /** - * Creates a new WorkerStat instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkerStat instance - */ - public static create(properties?: pruntime_rpc.IWorkerStat): pruntime_rpc.WorkerStat; - - /** - * Encodes the specified WorkerStat message. Does not implicitly {@link pruntime_rpc.WorkerStat.verify|verify} messages. - * @param message WorkerStat message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pruntime_rpc.IWorkerStat, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkerStat message, length delimited. Does not implicitly {@link pruntime_rpc.WorkerStat.verify|verify} messages. - * @param message WorkerStat message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pruntime_rpc.IWorkerStat, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkerStat message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkerStat - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.WorkerStat; - - /** - * Decodes a WorkerStat message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkerStat - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.WorkerStat; - - /** - * Verifies a WorkerStat message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a WorkerStat message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkerStat - */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.WorkerStat; - - /** - * Creates a plain object from a WorkerStat message. Also converts values to other types if specified. - * @param message WorkerStat - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pruntime_rpc.WorkerStat, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkerStat to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkerStat - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WorkerState. */ - interface IWorkerState { - - /** WorkerState registered */ - registered?: (boolean|null); - - /** WorkerState unresponsive */ - unresponsive?: (boolean|null); - - /** WorkerState benchState */ - benchState?: (pruntime_rpc.IBenchState|null); - - /** WorkerState workingState */ - workingState?: (pruntime_rpc.IWorkingState|null); - - /** WorkerState waitingHeartbeats */ - waitingHeartbeats?: (number[]|null); - - /** WorkerState tokenomicInfo */ - tokenomicInfo?: (pruntime_rpc.ITokenomicInfo|null); - - /** WorkerState stat */ - stat?: (pruntime_rpc.IWorkerStat|null); - } - - /** Represents a WorkerState. */ - class WorkerState implements IWorkerState { - - /** - * Constructs a new WorkerState. - * @param [properties] Properties to set - */ - constructor(properties?: pruntime_rpc.IWorkerState); - - /** WorkerState registered. */ - public registered: boolean; - - /** WorkerState unresponsive. */ - public unresponsive: boolean; - - /** WorkerState benchState. */ - public benchState?: (pruntime_rpc.IBenchState|null); - - /** WorkerState workingState. */ - public workingState?: (pruntime_rpc.IWorkingState|null); - - /** WorkerState waitingHeartbeats. */ - public waitingHeartbeats: number[]; - - /** WorkerState tokenomicInfo. */ - public tokenomicInfo?: (pruntime_rpc.ITokenomicInfo|null); - - /** WorkerState stat. */ - public stat?: (pruntime_rpc.IWorkerStat|null); - - /** - * Creates a new WorkerState instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkerState instance - */ - public static create(properties?: pruntime_rpc.IWorkerState): pruntime_rpc.WorkerState; - - /** - * Encodes the specified WorkerState message. Does not implicitly {@link pruntime_rpc.WorkerState.verify|verify} messages. - * @param message WorkerState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pruntime_rpc.IWorkerState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkerState message, length delimited. Does not implicitly {@link pruntime_rpc.WorkerState.verify|verify} messages. - * @param message WorkerState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pruntime_rpc.IWorkerState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkerState message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkerState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.WorkerState; - - /** - * Decodes a WorkerState message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkerState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.WorkerState; - - /** - * Verifies a WorkerState message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a WorkerState message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkerState - */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.WorkerState; - - /** - * Creates a plain object from a WorkerState message. Also converts values to other types if specified. - * @param message WorkerState - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pruntime_rpc.WorkerState, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkerState to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkerState - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a HandoverChallenge. */ - interface IHandoverChallenge { - - /** HandoverChallenge encodedChallenge */ - encodedChallenge?: (Uint8Array|null); - } - - /** Represents a HandoverChallenge. */ - class HandoverChallenge implements IHandoverChallenge { - - /** - * Constructs a new HandoverChallenge. - * @param [properties] Properties to set - */ - constructor(properties?: pruntime_rpc.IHandoverChallenge); - - /** HandoverChallenge encodedChallenge. */ - public encodedChallenge: Uint8Array; - - /** - * Creates a new HandoverChallenge instance using the specified properties. - * @param [properties] Properties to set - * @returns HandoverChallenge instance - */ - public static create(properties?: pruntime_rpc.IHandoverChallenge): pruntime_rpc.HandoverChallenge; - - /** - * Encodes the specified HandoverChallenge message. Does not implicitly {@link pruntime_rpc.HandoverChallenge.verify|verify} messages. - * @param message HandoverChallenge message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pruntime_rpc.IHandoverChallenge, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HandoverChallenge message, length delimited. Does not implicitly {@link pruntime_rpc.HandoverChallenge.verify|verify} messages. - * @param message HandoverChallenge message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pruntime_rpc.IHandoverChallenge, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HandoverChallenge message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HandoverChallenge - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.HandoverChallenge; - - /** - * Decodes a HandoverChallenge message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HandoverChallenge - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.HandoverChallenge; - - /** - * Verifies a HandoverChallenge message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a HandoverChallenge message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HandoverChallenge - */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.HandoverChallenge; - - /** - * Creates a plain object from a HandoverChallenge message. Also converts values to other types if specified. - * @param message HandoverChallenge - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pruntime_rpc.HandoverChallenge, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HandoverChallenge to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for HandoverChallenge - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a HandoverChallengeResponse. */ - interface IHandoverChallengeResponse { - - /** HandoverChallengeResponse encodedChallengeHandler */ - encodedChallengeHandler?: (Uint8Array|null); - - /** HandoverChallengeResponse attestation */ - attestation?: (pruntime_rpc.IAttestation|null); - } - - /** Represents a HandoverChallengeResponse. */ - class HandoverChallengeResponse implements IHandoverChallengeResponse { - - /** - * Constructs a new HandoverChallengeResponse. - * @param [properties] Properties to set - */ - constructor(properties?: pruntime_rpc.IHandoverChallengeResponse); - - /** HandoverChallengeResponse encodedChallengeHandler. */ - public encodedChallengeHandler: Uint8Array; - - /** HandoverChallengeResponse attestation. */ - public attestation?: (pruntime_rpc.IAttestation|null); - - /** - * Creates a new HandoverChallengeResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns HandoverChallengeResponse instance - */ - public static create(properties?: pruntime_rpc.IHandoverChallengeResponse): pruntime_rpc.HandoverChallengeResponse; - - /** - * Encodes the specified HandoverChallengeResponse message. Does not implicitly {@link pruntime_rpc.HandoverChallengeResponse.verify|verify} messages. - * @param message HandoverChallengeResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pruntime_rpc.IHandoverChallengeResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HandoverChallengeResponse message, length delimited. Does not implicitly {@link pruntime_rpc.HandoverChallengeResponse.verify|verify} messages. - * @param message HandoverChallengeResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pruntime_rpc.IHandoverChallengeResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HandoverChallengeResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HandoverChallengeResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.HandoverChallengeResponse; - - /** - * Decodes a HandoverChallengeResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HandoverChallengeResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.HandoverChallengeResponse; - - /** - * Verifies a HandoverChallengeResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a HandoverChallengeResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HandoverChallengeResponse - */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.HandoverChallengeResponse; - - /** - * Creates a plain object from a HandoverChallengeResponse message. Also converts values to other types if specified. - * @param message HandoverChallengeResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pruntime_rpc.HandoverChallengeResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HandoverChallengeResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for HandoverChallengeResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a HandoverWorkerKey. */ - interface IHandoverWorkerKey { - - /** HandoverWorkerKey encodedWorkerKey */ - encodedWorkerKey?: (Uint8Array|null); - - /** HandoverWorkerKey attestation */ - attestation?: (pruntime_rpc.IAttestation|null); - } - - /** Represents a HandoverWorkerKey. */ - class HandoverWorkerKey implements IHandoverWorkerKey { - - /** - * Constructs a new HandoverWorkerKey. - * @param [properties] Properties to set - */ - constructor(properties?: pruntime_rpc.IHandoverWorkerKey); - - /** HandoverWorkerKey encodedWorkerKey. */ - public encodedWorkerKey: Uint8Array; - - /** HandoverWorkerKey attestation. */ - public attestation?: (pruntime_rpc.IAttestation|null); - - /** - * Creates a new HandoverWorkerKey instance using the specified properties. - * @param [properties] Properties to set - * @returns HandoverWorkerKey instance - */ - public static create(properties?: pruntime_rpc.IHandoverWorkerKey): pruntime_rpc.HandoverWorkerKey; - - /** - * Encodes the specified HandoverWorkerKey message. Does not implicitly {@link pruntime_rpc.HandoverWorkerKey.verify|verify} messages. - * @param message HandoverWorkerKey message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pruntime_rpc.IHandoverWorkerKey, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HandoverWorkerKey message, length delimited. Does not implicitly {@link pruntime_rpc.HandoverWorkerKey.verify|verify} messages. - * @param message HandoverWorkerKey message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pruntime_rpc.IHandoverWorkerKey, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HandoverWorkerKey message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HandoverWorkerKey - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.HandoverWorkerKey; - - /** - * Decodes a HandoverWorkerKey message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HandoverWorkerKey - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.HandoverWorkerKey; - - /** - * Verifies a HandoverWorkerKey message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a HandoverWorkerKey message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HandoverWorkerKey - */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.HandoverWorkerKey; - - /** - * Creates a plain object from a HandoverWorkerKey message. Also converts values to other types if specified. - * @param message HandoverWorkerKey - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pruntime_rpc.HandoverWorkerKey, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HandoverWorkerKey to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for HandoverWorkerKey - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BenchState. */ - interface IBenchState { - - /** BenchState startBlock */ - startBlock?: (number|null); - - /** BenchState startTime */ - startTime?: (number|Long|null); - - /** BenchState duration */ - duration?: (number|null); - } - - /** Represents a BenchState. */ - class BenchState implements IBenchState { - - /** - * Constructs a new BenchState. - * @param [properties] Properties to set - */ - constructor(properties?: pruntime_rpc.IBenchState); - - /** BenchState startBlock. */ - public startBlock: number; - - /** BenchState startTime. */ - public startTime: (number|Long); - - /** BenchState duration. */ - public duration: number; - - /** - * Creates a new BenchState instance using the specified properties. - * @param [properties] Properties to set - * @returns BenchState instance - */ - public static create(properties?: pruntime_rpc.IBenchState): pruntime_rpc.BenchState; - - /** - * Encodes the specified BenchState message. Does not implicitly {@link pruntime_rpc.BenchState.verify|verify} messages. - * @param message BenchState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pruntime_rpc.IBenchState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BenchState message, length delimited. Does not implicitly {@link pruntime_rpc.BenchState.verify|verify} messages. - * @param message BenchState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pruntime_rpc.IBenchState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BenchState message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BenchState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.BenchState; - - /** - * Decodes a BenchState message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BenchState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.BenchState; - - /** - * Verifies a BenchState message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BenchState message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BenchState - */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.BenchState; - - /** - * Creates a plain object from a BenchState message. Also converts values to other types if specified. - * @param message BenchState - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pruntime_rpc.BenchState, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BenchState to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BenchState - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WorkingState. */ - interface IWorkingState { - - /** WorkingState sessionId */ - sessionId?: (number|null); - - /** WorkingState paused */ - paused?: (boolean|null); - - /** WorkingState startTime */ - startTime?: (number|Long|null); - } - - /** Represents a WorkingState. */ - class WorkingState implements IWorkingState { - - /** - * Constructs a new WorkingState. - * @param [properties] Properties to set - */ - constructor(properties?: pruntime_rpc.IWorkingState); - - /** WorkingState sessionId. */ - public sessionId: number; - - /** WorkingState paused. */ - public paused: boolean; - - /** WorkingState startTime. */ - public startTime: (number|Long); - - /** - * Creates a new WorkingState instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkingState instance - */ - public static create(properties?: pruntime_rpc.IWorkingState): pruntime_rpc.WorkingState; - - /** - * Encodes the specified WorkingState message. Does not implicitly {@link pruntime_rpc.WorkingState.verify|verify} messages. - * @param message WorkingState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pruntime_rpc.IWorkingState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkingState message, length delimited. Does not implicitly {@link pruntime_rpc.WorkingState.verify|verify} messages. - * @param message WorkingState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pruntime_rpc.IWorkingState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkingState message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkingState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.WorkingState; - - /** - * Decodes a WorkingState message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkingState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.WorkingState; - - /** - * Verifies a WorkingState message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a WorkingState message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkingState - */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.WorkingState; - - /** - * Creates a plain object from a WorkingState message. Also converts values to other types if specified. - * @param message WorkingState - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pruntime_rpc.WorkingState, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkingState to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkingState - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EchoMessage. */ - interface IEchoMessage { - - /** EchoMessage echoMsg */ - echoMsg?: (Uint8Array|null); - } - - /** Represents an EchoMessage. */ - class EchoMessage implements IEchoMessage { - - /** - * Constructs a new EchoMessage. - * @param [properties] Properties to set - */ - constructor(properties?: pruntime_rpc.IEchoMessage); - - /** EchoMessage echoMsg. */ - public echoMsg: Uint8Array; - - /** - * Creates a new EchoMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns EchoMessage instance - */ - public static create(properties?: pruntime_rpc.IEchoMessage): pruntime_rpc.EchoMessage; - - /** - * Encodes the specified EchoMessage message. Does not implicitly {@link pruntime_rpc.EchoMessage.verify|verify} messages. - * @param message EchoMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pruntime_rpc.IEchoMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EchoMessage message, length delimited. Does not implicitly {@link pruntime_rpc.EchoMessage.verify|verify} messages. - * @param message EchoMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pruntime_rpc.IEchoMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EchoMessage message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EchoMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.EchoMessage; - - /** - * Decodes an EchoMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EchoMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.EchoMessage; - - /** - * Verifies an EchoMessage message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EchoMessage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EchoMessage - */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.EchoMessage; - - /** - * Creates a plain object from an EchoMessage message. Also converts values to other types if specified. - * @param message EchoMessage - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pruntime_rpc.EchoMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EchoMessage to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EchoMessage - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** ResponsiveEvent enum. */ - enum ResponsiveEvent { - NoEvent = 0, - EnterUnresponsive = 1, - ExitUnresponsive = 2 - } - - /** Properties of an AddEndpointRequest. */ - interface IAddEndpointRequest { - - /** AddEndpointRequest encodedEndpointType */ - encodedEndpointType?: (Uint8Array|null); - - /** AddEndpointRequest endpoint */ - endpoint?: (string|null); - } - - /** Represents an AddEndpointRequest. */ - class AddEndpointRequest implements IAddEndpointRequest { - - /** - * Constructs a new AddEndpointRequest. - * @param [properties] Properties to set - */ - constructor(properties?: pruntime_rpc.IAddEndpointRequest); - - /** AddEndpointRequest encodedEndpointType. */ - public encodedEndpointType: Uint8Array; - - /** AddEndpointRequest endpoint. */ - public endpoint: string; - - /** - * Creates a new AddEndpointRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns AddEndpointRequest instance - */ - public static create(properties?: pruntime_rpc.IAddEndpointRequest): pruntime_rpc.AddEndpointRequest; - - /** - * Encodes the specified AddEndpointRequest message. Does not implicitly {@link pruntime_rpc.AddEndpointRequest.verify|verify} messages. - * @param message AddEndpointRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pruntime_rpc.IAddEndpointRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AddEndpointRequest message, length delimited. Does not implicitly {@link pruntime_rpc.AddEndpointRequest.verify|verify} messages. - * @param message AddEndpointRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pruntime_rpc.IAddEndpointRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AddEndpointRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AddEndpointRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.AddEndpointRequest; - - /** - * Decodes an AddEndpointRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AddEndpointRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.AddEndpointRequest; - - /** - * Verifies an AddEndpointRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an AddEndpointRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AddEndpointRequest - */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.AddEndpointRequest; - - /** - * Creates a plain object from an AddEndpointRequest message. Also converts values to other types if specified. - * @param message AddEndpointRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pruntime_rpc.AddEndpointRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AddEndpointRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AddEndpointRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetEndpointResponse. */ - interface IGetEndpointResponse { - - /** GetEndpointResponse encodedEndpointPayload */ - encodedEndpointPayload?: (Uint8Array|null); - - /** GetEndpointResponse signature */ - signature?: (Uint8Array|null); - } - - /** Represents a GetEndpointResponse. */ - class GetEndpointResponse implements IGetEndpointResponse { - - /** - * Constructs a new GetEndpointResponse. - * @param [properties] Properties to set - */ - constructor(properties?: pruntime_rpc.IGetEndpointResponse); - - /** GetEndpointResponse encodedEndpointPayload. */ - public encodedEndpointPayload?: (Uint8Array|null); - - /** GetEndpointResponse signature. */ - public signature?: (Uint8Array|null); - - /** GetEndpointResponse _encodedEndpointPayload. */ - public _encodedEndpointPayload?: "encodedEndpointPayload"; - - /** GetEndpointResponse _signature. */ - public _signature?: "signature"; - - /** - * Creates a new GetEndpointResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GetEndpointResponse instance - */ - public static create(properties?: pruntime_rpc.IGetEndpointResponse): pruntime_rpc.GetEndpointResponse; - - /** - * Encodes the specified GetEndpointResponse message. Does not implicitly {@link pruntime_rpc.GetEndpointResponse.verify|verify} messages. - * @param message GetEndpointResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pruntime_rpc.IGetEndpointResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetEndpointResponse message, length delimited. Does not implicitly {@link pruntime_rpc.GetEndpointResponse.verify|verify} messages. - * @param message GetEndpointResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pruntime_rpc.IGetEndpointResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetEndpointResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetEndpointResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.GetEndpointResponse; - - /** - * Decodes a GetEndpointResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetEndpointResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.GetEndpointResponse; - - /** - * Verifies a GetEndpointResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetEndpointResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetEndpointResponse - */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.GetEndpointResponse; - - /** - * Creates a plain object from a GetEndpointResponse message. Also converts values to other types if specified. - * @param message GetEndpointResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pruntime_rpc.GetEndpointResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetEndpointResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetEndpointResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SignEndpointsRequest. */ - interface ISignEndpointsRequest { - - /** SignEndpointsRequest encodedEndpoints */ - encodedEndpoints?: (Uint8Array|null); - } - - /** Represents a SignEndpointsRequest. */ - class SignEndpointsRequest implements ISignEndpointsRequest { - - /** - * Constructs a new SignEndpointsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: pruntime_rpc.ISignEndpointsRequest); - - /** SignEndpointsRequest encodedEndpoints. */ - public encodedEndpoints: Uint8Array; - - /** - * Creates a new SignEndpointsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SignEndpointsRequest instance - */ - public static create(properties?: pruntime_rpc.ISignEndpointsRequest): pruntime_rpc.SignEndpointsRequest; - - /** - * Encodes the specified SignEndpointsRequest message. Does not implicitly {@link pruntime_rpc.SignEndpointsRequest.verify|verify} messages. - * @param message SignEndpointsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pruntime_rpc.ISignEndpointsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SignEndpointsRequest message, length delimited. Does not implicitly {@link pruntime_rpc.SignEndpointsRequest.verify|verify} messages. - * @param message SignEndpointsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pruntime_rpc.ISignEndpointsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SignEndpointsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SignEndpointsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.SignEndpointsRequest; - - /** - * Decodes a SignEndpointsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SignEndpointsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.SignEndpointsRequest; - - /** - * Verifies a SignEndpointsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SignEndpointsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SignEndpointsRequest - */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.SignEndpointsRequest; - - /** - * Creates a plain object from a SignEndpointsRequest message. Also converts values to other types if specified. - * @param message SignEndpointsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pruntime_rpc.SignEndpointsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SignEndpointsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SignEndpointsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DerivePhalaI2pKeyResponse. */ - interface IDerivePhalaI2pKeyResponse { - - /** DerivePhalaI2pKeyResponse phalaI2pKey */ - phalaI2pKey?: (Uint8Array|null); - } - - /** Represents a DerivePhalaI2pKeyResponse. */ - class DerivePhalaI2pKeyResponse implements IDerivePhalaI2pKeyResponse { - - /** - * Constructs a new DerivePhalaI2pKeyResponse. - * @param [properties] Properties to set - */ - constructor(properties?: pruntime_rpc.IDerivePhalaI2pKeyResponse); - - /** DerivePhalaI2pKeyResponse phalaI2pKey. */ - public phalaI2pKey: Uint8Array; - - /** - * Creates a new DerivePhalaI2pKeyResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns DerivePhalaI2pKeyResponse instance - */ - public static create(properties?: pruntime_rpc.IDerivePhalaI2pKeyResponse): pruntime_rpc.DerivePhalaI2pKeyResponse; - - /** - * Encodes the specified DerivePhalaI2pKeyResponse message. Does not implicitly {@link pruntime_rpc.DerivePhalaI2pKeyResponse.verify|verify} messages. - * @param message DerivePhalaI2pKeyResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pruntime_rpc.IDerivePhalaI2pKeyResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DerivePhalaI2pKeyResponse message, length delimited. Does not implicitly {@link pruntime_rpc.DerivePhalaI2pKeyResponse.verify|verify} messages. - * @param message DerivePhalaI2pKeyResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pruntime_rpc.IDerivePhalaI2pKeyResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DerivePhalaI2pKeyResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DerivePhalaI2pKeyResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.DerivePhalaI2pKeyResponse; - - /** - * Decodes a DerivePhalaI2pKeyResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DerivePhalaI2pKeyResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.DerivePhalaI2pKeyResponse; - - /** - * Verifies a DerivePhalaI2pKeyResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DerivePhalaI2pKeyResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DerivePhalaI2pKeyResponse - */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.DerivePhalaI2pKeyResponse; - - /** - * Creates a plain object from a DerivePhalaI2pKeyResponse message. Also converts values to other types if specified. - * @param message DerivePhalaI2pKeyResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pruntime_rpc.DerivePhalaI2pKeyResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DerivePhalaI2pKeyResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DerivePhalaI2pKeyResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TokenomicStat. */ - interface ITokenomicStat { - - /** TokenomicStat lastPayout */ - lastPayout?: (string|null); - - /** TokenomicStat lastPayoutAtBlock */ - lastPayoutAtBlock?: (number|null); - - /** TokenomicStat totalPayout */ - totalPayout?: (string|null); - - /** TokenomicStat totalPayoutCount */ - totalPayoutCount?: (number|null); - - /** TokenomicStat lastSlash */ - lastSlash?: (string|null); - - /** TokenomicStat lastSlashAtBlock */ - lastSlashAtBlock?: (number|null); - - /** TokenomicStat totalSlash */ - totalSlash?: (string|null); - - /** TokenomicStat totalSlashCount */ - totalSlashCount?: (number|null); - } - - /** Represents a TokenomicStat. */ - class TokenomicStat implements ITokenomicStat { - - /** - * Constructs a new TokenomicStat. - * @param [properties] Properties to set - */ - constructor(properties?: pruntime_rpc.ITokenomicStat); - - /** TokenomicStat lastPayout. */ - public lastPayout: string; - - /** TokenomicStat lastPayoutAtBlock. */ - public lastPayoutAtBlock: number; - - /** TokenomicStat totalPayout. */ - public totalPayout: string; - - /** TokenomicStat totalPayoutCount. */ - public totalPayoutCount: number; - - /** TokenomicStat lastSlash. */ - public lastSlash: string; - - /** TokenomicStat lastSlashAtBlock. */ - public lastSlashAtBlock: number; - - /** TokenomicStat totalSlash. */ - public totalSlash: string; - - /** TokenomicStat totalSlashCount. */ - public totalSlashCount: number; - - /** - * Creates a new TokenomicStat instance using the specified properties. - * @param [properties] Properties to set - * @returns TokenomicStat instance - */ - public static create(properties?: pruntime_rpc.ITokenomicStat): pruntime_rpc.TokenomicStat; - - /** - * Encodes the specified TokenomicStat message. Does not implicitly {@link pruntime_rpc.TokenomicStat.verify|verify} messages. - * @param message TokenomicStat message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pruntime_rpc.ITokenomicStat, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TokenomicStat message, length delimited. Does not implicitly {@link pruntime_rpc.TokenomicStat.verify|verify} messages. - * @param message TokenomicStat message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pruntime_rpc.ITokenomicStat, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TokenomicStat message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TokenomicStat - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.TokenomicStat; - - /** - * Decodes a TokenomicStat message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TokenomicStat - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.TokenomicStat; - - /** - * Verifies a TokenomicStat message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TokenomicStat message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TokenomicStat - */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.TokenomicStat; - - /** - * Creates a plain object from a TokenomicStat message. Also converts values to other types if specified. - * @param message TokenomicStat - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pruntime_rpc.TokenomicStat, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TokenomicStat to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TokenomicStat - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TokenomicInfo. */ - interface ITokenomicInfo { - - /** TokenomicInfo v */ - v?: (string|null); - - /** TokenomicInfo vInit */ - vInit?: (string|null); - - /** TokenomicInfo vDeductible */ - vDeductible?: (string|null); - - /** TokenomicInfo share */ - share?: (string|null); - - /** TokenomicInfo vUpdateAt */ - vUpdateAt?: (number|Long|null); - - /** TokenomicInfo vUpdateBlock */ - vUpdateBlock?: (number|null); - - /** TokenomicInfo iterationLast */ - iterationLast?: (number|Long|null); - - /** TokenomicInfo challengeTimeLast */ - challengeTimeLast?: (number|Long|null); - - /** TokenomicInfo pBench */ - pBench?: (string|null); - - /** TokenomicInfo pInstant */ - pInstant?: (string|null); - - /** TokenomicInfo confidenceLevel */ - confidenceLevel?: (number|null); - - /** TokenomicInfo stat */ - stat?: (pruntime_rpc.ITokenomicStat|null); - } - - /** Represents a TokenomicInfo. */ - class TokenomicInfo implements ITokenomicInfo { - - /** - * Constructs a new TokenomicInfo. - * @param [properties] Properties to set - */ - constructor(properties?: pruntime_rpc.ITokenomicInfo); - - /** TokenomicInfo v. */ - public v: string; - - /** TokenomicInfo vInit. */ - public vInit: string; - - /** TokenomicInfo vDeductible. */ - public vDeductible: string; - - /** TokenomicInfo share. */ - public share: string; - - /** TokenomicInfo vUpdateAt. */ - public vUpdateAt: (number|Long); - - /** TokenomicInfo vUpdateBlock. */ - public vUpdateBlock: number; - - /** TokenomicInfo iterationLast. */ - public iterationLast: (number|Long); - - /** TokenomicInfo challengeTimeLast. */ - public challengeTimeLast: (number|Long); - - /** TokenomicInfo pBench. */ - public pBench: string; - - /** TokenomicInfo pInstant. */ - public pInstant: string; - - /** TokenomicInfo confidenceLevel. */ - public confidenceLevel: number; - - /** TokenomicInfo stat. */ - public stat?: (pruntime_rpc.ITokenomicStat|null); - - /** - * Creates a new TokenomicInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns TokenomicInfo instance - */ - public static create(properties?: pruntime_rpc.ITokenomicInfo): pruntime_rpc.TokenomicInfo; - - /** - * Encodes the specified TokenomicInfo message. Does not implicitly {@link pruntime_rpc.TokenomicInfo.verify|verify} messages. - * @param message TokenomicInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pruntime_rpc.ITokenomicInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TokenomicInfo message, length delimited. Does not implicitly {@link pruntime_rpc.TokenomicInfo.verify|verify} messages. - * @param message TokenomicInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pruntime_rpc.ITokenomicInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TokenomicInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TokenomicInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.TokenomicInfo; - - /** - * Decodes a TokenomicInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TokenomicInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.TokenomicInfo; - - /** - * Verifies a TokenomicInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TokenomicInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TokenomicInfo - */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.TokenomicInfo; - - /** - * Creates a plain object from a TokenomicInfo message. Also converts values to other types if specified. - * @param message TokenomicInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pruntime_rpc.TokenomicInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TokenomicInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TokenomicInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NetworkConfigResponse. */ - interface INetworkConfigResponse { - - /** NetworkConfigResponse publicRpcPort */ - publicRpcPort?: (number|null); - - /** NetworkConfigResponse config */ - config?: (pruntime_rpc.INetworkConfig|null); - } - - /** Represents a NetworkConfigResponse. */ - class NetworkConfigResponse implements INetworkConfigResponse { - - /** - * Constructs a new NetworkConfigResponse. - * @param [properties] Properties to set - */ - constructor(properties?: pruntime_rpc.INetworkConfigResponse); - - /** NetworkConfigResponse publicRpcPort. */ - public publicRpcPort?: (number|null); - - /** NetworkConfigResponse config. */ - public config?: (pruntime_rpc.INetworkConfig|null); - - /** NetworkConfigResponse _publicRpcPort. */ - public _publicRpcPort?: "publicRpcPort"; - - /** NetworkConfigResponse _config. */ - public _config?: "config"; - - /** - * Creates a new NetworkConfigResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns NetworkConfigResponse instance - */ - public static create(properties?: pruntime_rpc.INetworkConfigResponse): pruntime_rpc.NetworkConfigResponse; - - /** - * Encodes the specified NetworkConfigResponse message. Does not implicitly {@link pruntime_rpc.NetworkConfigResponse.verify|verify} messages. - * @param message NetworkConfigResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pruntime_rpc.INetworkConfigResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NetworkConfigResponse message, length delimited. Does not implicitly {@link pruntime_rpc.NetworkConfigResponse.verify|verify} messages. - * @param message NetworkConfigResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pruntime_rpc.INetworkConfigResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NetworkConfigResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NetworkConfigResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.NetworkConfigResponse; - - /** - * Decodes a NetworkConfigResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NetworkConfigResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.NetworkConfigResponse; - - /** - * Verifies a NetworkConfigResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NetworkConfigResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NetworkConfigResponse - */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.NetworkConfigResponse; - - /** - * Creates a plain object from a NetworkConfigResponse message. Also converts values to other types if specified. - * @param message NetworkConfigResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pruntime_rpc.NetworkConfigResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NetworkConfigResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NetworkConfigResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NetworkConfig. */ - interface INetworkConfig { - - /** NetworkConfig allProxy */ - allProxy?: (string|null); - - /** NetworkConfig i2pProxy */ - i2pProxy?: (string|null); - } - - /** Represents a NetworkConfig. */ - class NetworkConfig implements INetworkConfig { - - /** - * Constructs a new NetworkConfig. - * @param [properties] Properties to set - */ - constructor(properties?: pruntime_rpc.INetworkConfig); - - /** NetworkConfig allProxy. */ - public allProxy: string; - - /** NetworkConfig i2pProxy. */ - public i2pProxy: string; - - /** - * Creates a new NetworkConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns NetworkConfig instance - */ - public static create(properties?: pruntime_rpc.INetworkConfig): pruntime_rpc.NetworkConfig; - - /** - * Encodes the specified NetworkConfig message. Does not implicitly {@link pruntime_rpc.NetworkConfig.verify|verify} messages. - * @param message NetworkConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pruntime_rpc.INetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NetworkConfig message, length delimited. Does not implicitly {@link pruntime_rpc.NetworkConfig.verify|verify} messages. - * @param message NetworkConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pruntime_rpc.INetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NetworkConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NetworkConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.NetworkConfig; - - /** - * Decodes a NetworkConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NetworkConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.NetworkConfig; - - /** - * Verifies a NetworkConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NetworkConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NetworkConfig - */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.NetworkConfig; - - /** - * Creates a plain object from a NetworkConfig message. Also converts values to other types if specified. - * @param message NetworkConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pruntime_rpc.NetworkConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NetworkConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NetworkConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a HttpHeader. */ - interface IHttpHeader { - - /** HttpHeader name */ - name?: (string|null); - - /** HttpHeader value */ - value?: (string|null); - } - - /** Represents a HttpHeader. */ - class HttpHeader implements IHttpHeader { - - /** - * Constructs a new HttpHeader. - * @param [properties] Properties to set - */ - constructor(properties?: pruntime_rpc.IHttpHeader); - - /** HttpHeader name. */ - public name: string; - - /** HttpHeader value. */ - public value: string; - - /** - * Creates a new HttpHeader instance using the specified properties. - * @param [properties] Properties to set - * @returns HttpHeader instance - */ - public static create(properties?: pruntime_rpc.IHttpHeader): pruntime_rpc.HttpHeader; - - /** - * Encodes the specified HttpHeader message. Does not implicitly {@link pruntime_rpc.HttpHeader.verify|verify} messages. - * @param message HttpHeader message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pruntime_rpc.IHttpHeader, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HttpHeader message, length delimited. Does not implicitly {@link pruntime_rpc.HttpHeader.verify|verify} messages. - * @param message HttpHeader message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pruntime_rpc.IHttpHeader, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HttpHeader message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HttpHeader - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.HttpHeader; - - /** - * Decodes a HttpHeader message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HttpHeader - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.HttpHeader; - - /** - * Verifies a HttpHeader message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a HttpHeader message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HttpHeader - */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.HttpHeader; - - /** - * Creates a plain object from a HttpHeader message. Also converts values to other types if specified. - * @param message HttpHeader - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pruntime_rpc.HttpHeader, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HttpHeader to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for HttpHeader - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a HttpRequest. */ - interface IHttpRequest { - - /** HttpRequest url */ - url?: (string|null); - - /** HttpRequest method */ - method?: (string|null); - - /** HttpRequest headers */ - headers?: (pruntime_rpc.IHttpHeader[]|null); - - /** HttpRequest body */ - body?: (Uint8Array|null); - } - - /** Represents a HttpRequest. */ - class HttpRequest implements IHttpRequest { - - /** - * Constructs a new HttpRequest. - * @param [properties] Properties to set - */ - constructor(properties?: pruntime_rpc.IHttpRequest); - - /** HttpRequest url. */ - public url: string; - - /** HttpRequest method. */ - public method: string; - - /** HttpRequest headers. */ - public headers: pruntime_rpc.IHttpHeader[]; - - /** HttpRequest body. */ - public body: Uint8Array; - - /** - * Creates a new HttpRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns HttpRequest instance - */ - public static create(properties?: pruntime_rpc.IHttpRequest): pruntime_rpc.HttpRequest; - - /** - * Encodes the specified HttpRequest message. Does not implicitly {@link pruntime_rpc.HttpRequest.verify|verify} messages. - * @param message HttpRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pruntime_rpc.IHttpRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HttpRequest message, length delimited. Does not implicitly {@link pruntime_rpc.HttpRequest.verify|verify} messages. - * @param message HttpRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pruntime_rpc.IHttpRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HttpRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HttpRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.HttpRequest; - - /** - * Decodes a HttpRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HttpRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.HttpRequest; - - /** - * Verifies a HttpRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a HttpRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HttpRequest - */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.HttpRequest; - - /** - * Creates a plain object from a HttpRequest message. Also converts values to other types if specified. - * @param message HttpRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pruntime_rpc.HttpRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HttpRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for HttpRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a HttpResponse. */ - interface IHttpResponse { - - /** HttpResponse statusCode */ - statusCode?: (number|null); - - /** HttpResponse headers */ - headers?: (pruntime_rpc.IHttpHeader[]|null); - - /** HttpResponse body */ - body?: (Uint8Array|null); - } - - /** Represents a HttpResponse. */ - class HttpResponse implements IHttpResponse { - - /** - * Constructs a new HttpResponse. - * @param [properties] Properties to set - */ - constructor(properties?: pruntime_rpc.IHttpResponse); - - /** HttpResponse statusCode. */ - public statusCode: number; - - /** HttpResponse headers. */ - public headers: pruntime_rpc.IHttpHeader[]; - - /** HttpResponse body. */ - public body: Uint8Array; - - /** - * Creates a new HttpResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns HttpResponse instance - */ - public static create(properties?: pruntime_rpc.IHttpResponse): pruntime_rpc.HttpResponse; - - /** - * Encodes the specified HttpResponse message. Does not implicitly {@link pruntime_rpc.HttpResponse.verify|verify} messages. - * @param message HttpResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pruntime_rpc.IHttpResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HttpResponse message, length delimited. Does not implicitly {@link pruntime_rpc.HttpResponse.verify|verify} messages. - * @param message HttpResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pruntime_rpc.IHttpResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HttpResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HttpResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.HttpResponse; - - /** - * Decodes a HttpResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HttpResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.HttpResponse; - - /** - * Verifies a HttpResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a HttpResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HttpResponse - */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.HttpResponse; - - /** - * Creates a plain object from a HttpResponse message. Also converts values to other types if specified. - * @param message HttpResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pruntime_rpc.HttpResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HttpResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for HttpResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetContractInfoRequest. */ - interface IGetContractInfoRequest { - - /** GetContractInfoRequest contracts */ - contracts?: (string[]|null); - } - - /** Represents a GetContractInfoRequest. */ - class GetContractInfoRequest implements IGetContractInfoRequest { - - /** - * Constructs a new GetContractInfoRequest. - * @param [properties] Properties to set - */ - constructor(properties?: pruntime_rpc.IGetContractInfoRequest); - - /** GetContractInfoRequest contracts. */ - public contracts: string[]; - - /** - * Creates a new GetContractInfoRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetContractInfoRequest instance - */ - public static create(properties?: pruntime_rpc.IGetContractInfoRequest): pruntime_rpc.GetContractInfoRequest; - - /** - * Encodes the specified GetContractInfoRequest message. Does not implicitly {@link pruntime_rpc.GetContractInfoRequest.verify|verify} messages. - * @param message GetContractInfoRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pruntime_rpc.IGetContractInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetContractInfoRequest message, length delimited. Does not implicitly {@link pruntime_rpc.GetContractInfoRequest.verify|verify} messages. - * @param message GetContractInfoRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pruntime_rpc.IGetContractInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetContractInfoRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetContractInfoRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.GetContractInfoRequest; - - /** - * Decodes a GetContractInfoRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetContractInfoRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.GetContractInfoRequest; - - /** - * Verifies a GetContractInfoRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetContractInfoRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetContractInfoRequest - */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.GetContractInfoRequest; - - /** - * Creates a plain object from a GetContractInfoRequest message. Also converts values to other types if specified. - * @param message GetContractInfoRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pruntime_rpc.GetContractInfoRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetContractInfoRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetContractInfoRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetContractInfoResponse. */ - interface IGetContractInfoResponse { - - /** GetContractInfoResponse contracts */ - contracts?: (pruntime_rpc.IContractInfo[]|null); - } - - /** Represents a GetContractInfoResponse. */ - class GetContractInfoResponse implements IGetContractInfoResponse { - - /** - * Constructs a new GetContractInfoResponse. - * @param [properties] Properties to set - */ - constructor(properties?: pruntime_rpc.IGetContractInfoResponse); - - /** GetContractInfoResponse contracts. */ - public contracts: pruntime_rpc.IContractInfo[]; - - /** - * Creates a new GetContractInfoResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GetContractInfoResponse instance - */ - public static create(properties?: pruntime_rpc.IGetContractInfoResponse): pruntime_rpc.GetContractInfoResponse; - - /** - * Encodes the specified GetContractInfoResponse message. Does not implicitly {@link pruntime_rpc.GetContractInfoResponse.verify|verify} messages. - * @param message GetContractInfoResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pruntime_rpc.IGetContractInfoResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetContractInfoResponse message, length delimited. Does not implicitly {@link pruntime_rpc.GetContractInfoResponse.verify|verify} messages. - * @param message GetContractInfoResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pruntime_rpc.IGetContractInfoResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetContractInfoResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetContractInfoResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.GetContractInfoResponse; - - /** - * Decodes a GetContractInfoResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetContractInfoResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.GetContractInfoResponse; - - /** - * Verifies a GetContractInfoResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetContractInfoResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetContractInfoResponse - */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.GetContractInfoResponse; - - /** - * Creates a plain object from a GetContractInfoResponse message. Also converts values to other types if specified. - * @param message GetContractInfoResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pruntime_rpc.GetContractInfoResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetContractInfoResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetContractInfoResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ContractInfo. */ - interface IContractInfo { - - /** ContractInfo id */ - id?: (string|null); - - /** ContractInfo codeHash */ - codeHash?: (string|null); - - /** ContractInfo weight */ - weight?: (number|null); - - /** ContractInfo sidevm */ - sidevm?: (pruntime_rpc.ISidevmInfo|null); - } - - /** Represents a ContractInfo. */ - class ContractInfo implements IContractInfo { - - /** - * Constructs a new ContractInfo. - * @param [properties] Properties to set - */ - constructor(properties?: pruntime_rpc.IContractInfo); - - /** ContractInfo id. */ - public id: string; - - /** ContractInfo codeHash. */ - public codeHash: string; - - /** ContractInfo weight. */ - public weight: number; - - /** ContractInfo sidevm. */ - public sidevm?: (pruntime_rpc.ISidevmInfo|null); - - /** - * Creates a new ContractInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns ContractInfo instance - */ - public static create(properties?: pruntime_rpc.IContractInfo): pruntime_rpc.ContractInfo; - - /** - * Encodes the specified ContractInfo message. Does not implicitly {@link pruntime_rpc.ContractInfo.verify|verify} messages. - * @param message ContractInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pruntime_rpc.IContractInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ContractInfo message, length delimited. Does not implicitly {@link pruntime_rpc.ContractInfo.verify|verify} messages. - * @param message ContractInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pruntime_rpc.IContractInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ContractInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ContractInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.ContractInfo; - - /** - * Decodes a ContractInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ContractInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.ContractInfo; - - /** - * Verifies a ContractInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ContractInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ContractInfo - */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.ContractInfo; - - /** - * Creates a plain object from a ContractInfo message. Also converts values to other types if specified. - * @param message ContractInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pruntime_rpc.ContractInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ContractInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ContractInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SidevmInfo. */ - interface ISidevmInfo { - - /** SidevmInfo state */ - state?: (string|null); - - /** SidevmInfo codeHash */ - codeHash?: (string|null); - - /** SidevmInfo startTime */ - startTime?: (string|null); - - /** SidevmInfo stopReason */ - stopReason?: (string|null); - } - - /** Represents a SidevmInfo. */ - class SidevmInfo implements ISidevmInfo { - - /** - * Constructs a new SidevmInfo. - * @param [properties] Properties to set - */ - constructor(properties?: pruntime_rpc.ISidevmInfo); - - /** SidevmInfo state. */ - public state: string; - - /** SidevmInfo codeHash. */ - public codeHash: string; - - /** SidevmInfo startTime. */ - public startTime: string; - - /** SidevmInfo stopReason. */ - public stopReason: string; - - /** - * Creates a new SidevmInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns SidevmInfo instance - */ - public static create(properties?: pruntime_rpc.ISidevmInfo): pruntime_rpc.SidevmInfo; - - /** - * Encodes the specified SidevmInfo message. Does not implicitly {@link pruntime_rpc.SidevmInfo.verify|verify} messages. - * @param message SidevmInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pruntime_rpc.ISidevmInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SidevmInfo message, length delimited. Does not implicitly {@link pruntime_rpc.SidevmInfo.verify|verify} messages. - * @param message SidevmInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pruntime_rpc.ISidevmInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SidevmInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SidevmInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.SidevmInfo; - - /** - * Decodes a SidevmInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SidevmInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.SidevmInfo; - - /** - * Verifies a SidevmInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SidevmInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SidevmInfo - */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.SidevmInfo; - - /** - * Creates a plain object from a SidevmInfo message. Also converts values to other types if specified. - * @param message SidevmInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pruntime_rpc.SidevmInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SidevmInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SidevmInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetClusterInfoResponse. */ - interface IGetClusterInfoResponse { - - /** GetClusterInfoResponse info */ - info?: (pruntime_rpc.IClusterInfo|null); - } - - /** Represents a GetClusterInfoResponse. */ - class GetClusterInfoResponse implements IGetClusterInfoResponse { - - /** - * Constructs a new GetClusterInfoResponse. - * @param [properties] Properties to set - */ - constructor(properties?: pruntime_rpc.IGetClusterInfoResponse); - - /** GetClusterInfoResponse info. */ - public info?: (pruntime_rpc.IClusterInfo|null); - - /** - * Creates a new GetClusterInfoResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns GetClusterInfoResponse instance - */ - public static create(properties?: pruntime_rpc.IGetClusterInfoResponse): pruntime_rpc.GetClusterInfoResponse; - - /** - * Encodes the specified GetClusterInfoResponse message. Does not implicitly {@link pruntime_rpc.GetClusterInfoResponse.verify|verify} messages. - * @param message GetClusterInfoResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pruntime_rpc.IGetClusterInfoResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetClusterInfoResponse message, length delimited. Does not implicitly {@link pruntime_rpc.GetClusterInfoResponse.verify|verify} messages. - * @param message GetClusterInfoResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pruntime_rpc.IGetClusterInfoResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetClusterInfoResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetClusterInfoResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.GetClusterInfoResponse; - - /** - * Decodes a GetClusterInfoResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetClusterInfoResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.GetClusterInfoResponse; - - /** - * Verifies a GetClusterInfoResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetClusterInfoResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetClusterInfoResponse - */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.GetClusterInfoResponse; - - /** - * Creates a plain object from a GetClusterInfoResponse message. Also converts values to other types if specified. - * @param message GetClusterInfoResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pruntime_rpc.GetClusterInfoResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetClusterInfoResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetClusterInfoResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ClusterInfo. */ - interface IClusterInfo { - - /** ClusterInfo id */ - id?: (string|null); - - /** ClusterInfo runtimeVersion */ - runtimeVersion?: (string|null); - - /** ClusterInfo stateRoot */ - stateRoot?: (string|null); - - /** ClusterInfo contracts */ - contracts?: (string[]|null); - } - - /** Represents a ClusterInfo. */ - class ClusterInfo implements IClusterInfo { - - /** - * Constructs a new ClusterInfo. - * @param [properties] Properties to set - */ - constructor(properties?: pruntime_rpc.IClusterInfo); - - /** ClusterInfo id. */ - public id: string; - - /** ClusterInfo runtimeVersion. */ - public runtimeVersion: string; - - /** ClusterInfo stateRoot. */ - public stateRoot: string; - - /** ClusterInfo contracts. */ - public contracts: string[]; - - /** - * Creates a new ClusterInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns ClusterInfo instance - */ - public static create(properties?: pruntime_rpc.IClusterInfo): pruntime_rpc.ClusterInfo; - - /** - * Encodes the specified ClusterInfo message. Does not implicitly {@link pruntime_rpc.ClusterInfo.verify|verify} messages. - * @param message ClusterInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pruntime_rpc.IClusterInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ClusterInfo message, length delimited. Does not implicitly {@link pruntime_rpc.ClusterInfo.verify|verify} messages. - * @param message ClusterInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pruntime_rpc.IClusterInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ClusterInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ClusterInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.ClusterInfo; - - /** - * Decodes a ClusterInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ClusterInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.ClusterInfo; - - /** - * Verifies a ClusterInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ClusterInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ClusterInfo - */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.ClusterInfo; - - /** - * Creates a plain object from a ClusterInfo message. Also converts values to other types if specified. - * @param message ClusterInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pruntime_rpc.ClusterInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ClusterInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ClusterInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SidevmCode. */ - interface ISidevmCode { - - /** SidevmCode contract */ - contract?: (Uint8Array|null); - - /** SidevmCode code */ - code?: (Uint8Array|null); - } - - /** Represents a SidevmCode. */ - class SidevmCode implements ISidevmCode { - - /** - * Constructs a new SidevmCode. - * @param [properties] Properties to set - */ - constructor(properties?: pruntime_rpc.ISidevmCode); - - /** SidevmCode contract. */ - public contract: Uint8Array; - - /** SidevmCode code. */ - public code: Uint8Array; - - /** - * Creates a new SidevmCode instance using the specified properties. - * @param [properties] Properties to set - * @returns SidevmCode instance - */ - public static create(properties?: pruntime_rpc.ISidevmCode): pruntime_rpc.SidevmCode; - - /** - * Encodes the specified SidevmCode message. Does not implicitly {@link pruntime_rpc.SidevmCode.verify|verify} messages. - * @param message SidevmCode message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pruntime_rpc.ISidevmCode, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SidevmCode message, length delimited. Does not implicitly {@link pruntime_rpc.SidevmCode.verify|verify} messages. - * @param message SidevmCode message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pruntime_rpc.ISidevmCode, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SidevmCode message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SidevmCode - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.SidevmCode; - - /** - * Decodes a SidevmCode message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SidevmCode - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.SidevmCode; - - /** - * Verifies a SidevmCode message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SidevmCode message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SidevmCode - */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.SidevmCode; - - /** - * Creates a plain object from a SidevmCode message. Also converts values to other types if specified. - * @param message SidevmCode - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pruntime_rpc.SidevmCode, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SidevmCode to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SidevmCode - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ContractParameters. */ - interface IContractParameters { - - /** ContractParameters deployer */ - deployer?: (string|null); - - /** ContractParameters clusterId */ - clusterId?: (string|null); + /** Signature signedBy */ + signedBy?: (pruntime_rpc.ICertificate|null); - /** ContractParameters codeHash */ - codeHash?: (string|null); + /** Signature signatureType */ + signatureType?: (pruntime_rpc.SignatureType|null); - /** ContractParameters salt */ - salt?: (string|null); + /** Signature signature */ + signature?: (Uint8Array|null); } - /** Represents a ContractParameters. */ - class ContractParameters implements IContractParameters { - - /** - * Constructs a new ContractParameters. - * @param [properties] Properties to set - */ - constructor(properties?: pruntime_rpc.IContractParameters); - - /** ContractParameters deployer. */ - public deployer: string; - - /** ContractParameters clusterId. */ - public clusterId: string; - - /** ContractParameters codeHash. */ - public codeHash: string; - - /** ContractParameters salt. */ - public salt: string; + /** Represents a Signature. */ + class Signature implements ISignature { /** - * Creates a new ContractParameters instance using the specified properties. + * Constructs a new Signature. * @param [properties] Properties to set - * @returns ContractParameters instance - */ - public static create(properties?: pruntime_rpc.IContractParameters): pruntime_rpc.ContractParameters; - - /** - * Encodes the specified ContractParameters message. Does not implicitly {@link pruntime_rpc.ContractParameters.verify|verify} messages. - * @param message ContractParameters message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pruntime_rpc.IContractParameters, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ContractParameters message, length delimited. Does not implicitly {@link pruntime_rpc.ContractParameters.verify|verify} messages. - * @param message ContractParameters message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pruntime_rpc.IContractParameters, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ContractParameters message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ContractParameters - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.ContractParameters; - - /** - * Decodes a ContractParameters message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ContractParameters - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.ContractParameters; - - /** - * Verifies a ContractParameters message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ContractParameters message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ContractParameters - */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.ContractParameters; - - /** - * Creates a plain object from a ContractParameters message. Also converts values to other types if specified. - * @param message ContractParameters - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pruntime_rpc.ContractParameters, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ContractParameters to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ContractParameters - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ContractId. */ - interface IContractId { - - /** ContractId id */ - id?: (string|null); - } + constructor(properties?: pruntime_rpc.ISignature); - /** Represents a ContractId. */ - class ContractId implements IContractId { + /** Signature signedBy. */ + public signedBy?: (pruntime_rpc.ICertificate|null); - /** - * Constructs a new ContractId. - * @param [properties] Properties to set - */ - constructor(properties?: pruntime_rpc.IContractId); + /** Signature signatureType. */ + public signatureType: pruntime_rpc.SignatureType; - /** ContractId id. */ - public id: string; + /** Signature signature. */ + public signature: Uint8Array; /** - * Creates a new ContractId instance using the specified properties. + * Creates a new Signature instance using the specified properties. * @param [properties] Properties to set - * @returns ContractId instance + * @returns Signature instance */ - public static create(properties?: pruntime_rpc.IContractId): pruntime_rpc.ContractId; + public static create(properties?: pruntime_rpc.ISignature): pruntime_rpc.Signature; /** - * Encodes the specified ContractId message. Does not implicitly {@link pruntime_rpc.ContractId.verify|verify} messages. - * @param message ContractId message or plain object to encode + * Encodes the specified Signature message. Does not implicitly {@link pruntime_rpc.Signature.verify|verify} messages. + * @param message Signature message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: pruntime_rpc.IContractId, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: pruntime_rpc.ISignature, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ContractId message, length delimited. Does not implicitly {@link pruntime_rpc.ContractId.verify|verify} messages. - * @param message ContractId message or plain object to encode + * Encodes the specified Signature message, length delimited. Does not implicitly {@link pruntime_rpc.Signature.verify|verify} messages. + * @param message Signature message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: pruntime_rpc.IContractId, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: pruntime_rpc.ISignature, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ContractId message from the specified reader or buffer. + * Decodes a Signature message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ContractId + * @returns Signature * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.ContractId; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.Signature; /** - * Decodes a ContractId message from the specified reader or buffer, length delimited. + * Decodes a Signature message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ContractId + * @returns Signature * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.ContractId; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.Signature; /** - * Verifies a ContractId message. + * Verifies a Signature message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ContractId message from a plain object. Also converts values to their respective internal types. + * Creates a Signature message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ContractId + * @returns Signature */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.ContractId; + public static fromObject(object: { [k: string]: any }): pruntime_rpc.Signature; /** - * Creates a plain object from a ContractId message. Also converts values to other types if specified. - * @param message ContractId + * Creates a plain object from a Signature message. Also converts values to other types if specified. + * @param message Signature * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: pruntime_rpc.ContractId, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: pruntime_rpc.Signature, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ContractId to JSON. + * Converts this Signature to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ContractId + * Gets the default type url for Signature * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ChainState. */ - interface IChainState { + /** Properties of a Certificate. */ + interface ICertificate { - /** ChainState blockNumber */ - blockNumber?: (number|null); + /** Certificate encodedBody */ + encodedBody?: (Uint8Array|null); - /** ChainState encodedState */ - encodedState?: (Uint8Array|null); + /** Certificate signature */ + signature?: (pruntime_rpc.ISignature|null); } - /** Represents a ChainState. */ - class ChainState implements IChainState { + /** Represents a Certificate. */ + class Certificate implements ICertificate { /** - * Constructs a new ChainState. + * Constructs a new Certificate. * @param [properties] Properties to set */ - constructor(properties?: pruntime_rpc.IChainState); + constructor(properties?: pruntime_rpc.ICertificate); - /** ChainState blockNumber. */ - public blockNumber: number; + /** Certificate encodedBody. */ + public encodedBody: Uint8Array; - /** ChainState encodedState. */ - public encodedState: Uint8Array; + /** Certificate signature. */ + public signature?: (pruntime_rpc.ISignature|null); /** - * Creates a new ChainState instance using the specified properties. + * Creates a new Certificate instance using the specified properties. * @param [properties] Properties to set - * @returns ChainState instance + * @returns Certificate instance */ - public static create(properties?: pruntime_rpc.IChainState): pruntime_rpc.ChainState; + public static create(properties?: pruntime_rpc.ICertificate): pruntime_rpc.Certificate; /** - * Encodes the specified ChainState message. Does not implicitly {@link pruntime_rpc.ChainState.verify|verify} messages. - * @param message ChainState message or plain object to encode + * Encodes the specified Certificate message. Does not implicitly {@link pruntime_rpc.Certificate.verify|verify} messages. + * @param message Certificate message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: pruntime_rpc.IChainState, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: pruntime_rpc.ICertificate, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ChainState message, length delimited. Does not implicitly {@link pruntime_rpc.ChainState.verify|verify} messages. - * @param message ChainState message or plain object to encode + * Encodes the specified Certificate message, length delimited. Does not implicitly {@link pruntime_rpc.Certificate.verify|verify} messages. + * @param message Certificate message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: pruntime_rpc.IChainState, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: pruntime_rpc.ICertificate, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ChainState message from the specified reader or buffer. + * Decodes a Certificate message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ChainState + * @returns Certificate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.ChainState; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.Certificate; /** - * Decodes a ChainState message from the specified reader or buffer, length delimited. + * Decodes a Certificate message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ChainState + * @returns Certificate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.ChainState; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.Certificate; /** - * Verifies a ChainState message. + * Verifies a Certificate message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ChainState message from a plain object. Also converts values to their respective internal types. + * Creates a Certificate message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ChainState + * @returns Certificate */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.ChainState; + public static fromObject(object: { [k: string]: any }): pruntime_rpc.Certificate; /** - * Creates a plain object from a ChainState message. Also converts values to other types if specified. - * @param message ChainState + * Creates a plain object from a Certificate message. Also converts values to other types if specified. + * @param message Certificate * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: pruntime_rpc.ChainState, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: pruntime_rpc.Certificate, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ChainState to JSON. + * Converts this Certificate to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ChainState + * Gets the default type url for Certificate * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a StopOptions. */ - interface IStopOptions { + /** SignatureType enum. */ + enum SignatureType { + Ed25519 = 0, + Sr25519 = 1, + Ecdsa = 2, + Ed25519WrapBytes = 3, + Sr25519WrapBytes = 4, + EcdsaWrapBytes = 5, + Eip712 = 6 + } + + /** Properties of a ContractQueryResponse. */ + interface IContractQueryResponse { - /** StopOptions removeCheckpoints */ - removeCheckpoints?: (boolean|null); + /** ContractQueryResponse encodedEncryptedData */ + encodedEncryptedData?: (Uint8Array|null); } - /** Represents a StopOptions. */ - class StopOptions implements IStopOptions { + /** Represents a ContractQueryResponse. */ + class ContractQueryResponse implements IContractQueryResponse { /** - * Constructs a new StopOptions. + * Constructs a new ContractQueryResponse. * @param [properties] Properties to set */ - constructor(properties?: pruntime_rpc.IStopOptions); + constructor(properties?: pruntime_rpc.IContractQueryResponse); - /** StopOptions removeCheckpoints. */ - public removeCheckpoints: boolean; + /** ContractQueryResponse encodedEncryptedData. */ + public encodedEncryptedData: Uint8Array; /** - * Creates a new StopOptions instance using the specified properties. + * Creates a new ContractQueryResponse instance using the specified properties. * @param [properties] Properties to set - * @returns StopOptions instance + * @returns ContractQueryResponse instance */ - public static create(properties?: pruntime_rpc.IStopOptions): pruntime_rpc.StopOptions; + public static create(properties?: pruntime_rpc.IContractQueryResponse): pruntime_rpc.ContractQueryResponse; /** - * Encodes the specified StopOptions message. Does not implicitly {@link pruntime_rpc.StopOptions.verify|verify} messages. - * @param message StopOptions message or plain object to encode + * Encodes the specified ContractQueryResponse message. Does not implicitly {@link pruntime_rpc.ContractQueryResponse.verify|verify} messages. + * @param message ContractQueryResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: pruntime_rpc.IStopOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: pruntime_rpc.IContractQueryResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified StopOptions message, length delimited. Does not implicitly {@link pruntime_rpc.StopOptions.verify|verify} messages. - * @param message StopOptions message or plain object to encode + * Encodes the specified ContractQueryResponse message, length delimited. Does not implicitly {@link pruntime_rpc.ContractQueryResponse.verify|verify} messages. + * @param message ContractQueryResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: pruntime_rpc.IStopOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: pruntime_rpc.IContractQueryResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a StopOptions message from the specified reader or buffer. + * Decodes a ContractQueryResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns StopOptions + * @returns ContractQueryResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.StopOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.ContractQueryResponse; /** - * Decodes a StopOptions message from the specified reader or buffer, length delimited. + * Decodes a ContractQueryResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns StopOptions + * @returns ContractQueryResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.StopOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.ContractQueryResponse; /** - * Verifies a StopOptions message. + * Verifies a ContractQueryResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a StopOptions message from a plain object. Also converts values to their respective internal types. + * Creates a ContractQueryResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns StopOptions + * @returns ContractQueryResponse */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.StopOptions; + public static fromObject(object: { [k: string]: any }): pruntime_rpc.ContractQueryResponse; /** - * Creates a plain object from a StopOptions message. Also converts values to other types if specified. - * @param message StopOptions + * Creates a plain object from a ContractQueryResponse message. Also converts values to other types if specified. + * @param message ContractQueryResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: pruntime_rpc.StopOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: pruntime_rpc.ContractQueryResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this StopOptions to JSON. + * Converts this ContractQueryResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for StopOptions + * Gets the default type url for ContractQueryResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a StorageProof. */ - interface IStorageProof { + /** Properties of an AddEndpointRequest. */ + interface IAddEndpointRequest { + + /** AddEndpointRequest encodedEndpointType */ + encodedEndpointType?: (Uint8Array|null); - /** StorageProof proof */ - proof?: (Uint8Array[]|null); + /** AddEndpointRequest endpoint */ + endpoint?: (string|null); } - /** Represents a StorageProof. */ - class StorageProof implements IStorageProof { + /** Represents an AddEndpointRequest. */ + class AddEndpointRequest implements IAddEndpointRequest { /** - * Constructs a new StorageProof. + * Constructs a new AddEndpointRequest. * @param [properties] Properties to set */ - constructor(properties?: pruntime_rpc.IStorageProof); + constructor(properties?: pruntime_rpc.IAddEndpointRequest); + + /** AddEndpointRequest encodedEndpointType. */ + public encodedEndpointType: Uint8Array; - /** StorageProof proof. */ - public proof: Uint8Array[]; + /** AddEndpointRequest endpoint. */ + public endpoint: string; /** - * Creates a new StorageProof instance using the specified properties. + * Creates a new AddEndpointRequest instance using the specified properties. * @param [properties] Properties to set - * @returns StorageProof instance + * @returns AddEndpointRequest instance */ - public static create(properties?: pruntime_rpc.IStorageProof): pruntime_rpc.StorageProof; + public static create(properties?: pruntime_rpc.IAddEndpointRequest): pruntime_rpc.AddEndpointRequest; /** - * Encodes the specified StorageProof message. Does not implicitly {@link pruntime_rpc.StorageProof.verify|verify} messages. - * @param message StorageProof message or plain object to encode + * Encodes the specified AddEndpointRequest message. Does not implicitly {@link pruntime_rpc.AddEndpointRequest.verify|verify} messages. + * @param message AddEndpointRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: pruntime_rpc.IStorageProof, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: pruntime_rpc.IAddEndpointRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified StorageProof message, length delimited. Does not implicitly {@link pruntime_rpc.StorageProof.verify|verify} messages. - * @param message StorageProof message or plain object to encode + * Encodes the specified AddEndpointRequest message, length delimited. Does not implicitly {@link pruntime_rpc.AddEndpointRequest.verify|verify} messages. + * @param message AddEndpointRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: pruntime_rpc.IStorageProof, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: pruntime_rpc.IAddEndpointRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a StorageProof message from the specified reader or buffer. + * Decodes an AddEndpointRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns StorageProof + * @returns AddEndpointRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.StorageProof; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.AddEndpointRequest; /** - * Decodes a StorageProof message from the specified reader or buffer, length delimited. + * Decodes an AddEndpointRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns StorageProof + * @returns AddEndpointRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.StorageProof; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.AddEndpointRequest; /** - * Verifies a StorageProof message. + * Verifies an AddEndpointRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a StorageProof message from a plain object. Also converts values to their respective internal types. + * Creates an AddEndpointRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns StorageProof + * @returns AddEndpointRequest */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.StorageProof; + public static fromObject(object: { [k: string]: any }): pruntime_rpc.AddEndpointRequest; /** - * Creates a plain object from a StorageProof message. Also converts values to other types if specified. - * @param message StorageProof + * Creates a plain object from an AddEndpointRequest message. Also converts values to other types if specified. + * @param message AddEndpointRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: pruntime_rpc.StorageProof, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: pruntime_rpc.AddEndpointRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this StorageProof to JSON. + * Converts this AddEndpointRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for StorageProof + * Gets the default type url for AddEndpointRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a StatisticsReqeust. */ - interface IStatisticsReqeust { + /** Properties of a GetEndpointResponse. */ + interface IGetEndpointResponse { - /** StatisticsReqeust contracts */ - contracts?: (string[]|null); + /** GetEndpointResponse encodedEndpointPayload */ + encodedEndpointPayload?: (Uint8Array|null); - /** StatisticsReqeust all */ - all?: (boolean|null); + /** GetEndpointResponse signature */ + signature?: (Uint8Array|null); } - /** Represents a StatisticsReqeust. */ - class StatisticsReqeust implements IStatisticsReqeust { + /** Represents a GetEndpointResponse. */ + class GetEndpointResponse implements IGetEndpointResponse { /** - * Constructs a new StatisticsReqeust. + * Constructs a new GetEndpointResponse. * @param [properties] Properties to set */ - constructor(properties?: pruntime_rpc.IStatisticsReqeust); + constructor(properties?: pruntime_rpc.IGetEndpointResponse); - /** StatisticsReqeust contracts. */ - public contracts: string[]; + /** GetEndpointResponse encodedEndpointPayload. */ + public encodedEndpointPayload?: (Uint8Array|null); + + /** GetEndpointResponse signature. */ + public signature?: (Uint8Array|null); + + /** GetEndpointResponse _encodedEndpointPayload. */ + public _encodedEndpointPayload?: "encodedEndpointPayload"; - /** StatisticsReqeust all. */ - public all: boolean; + /** GetEndpointResponse _signature. */ + public _signature?: "signature"; /** - * Creates a new StatisticsReqeust instance using the specified properties. + * Creates a new GetEndpointResponse instance using the specified properties. * @param [properties] Properties to set - * @returns StatisticsReqeust instance + * @returns GetEndpointResponse instance */ - public static create(properties?: pruntime_rpc.IStatisticsReqeust): pruntime_rpc.StatisticsReqeust; + public static create(properties?: pruntime_rpc.IGetEndpointResponse): pruntime_rpc.GetEndpointResponse; /** - * Encodes the specified StatisticsReqeust message. Does not implicitly {@link pruntime_rpc.StatisticsReqeust.verify|verify} messages. - * @param message StatisticsReqeust message or plain object to encode + * Encodes the specified GetEndpointResponse message. Does not implicitly {@link pruntime_rpc.GetEndpointResponse.verify|verify} messages. + * @param message GetEndpointResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: pruntime_rpc.IStatisticsReqeust, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: pruntime_rpc.IGetEndpointResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified StatisticsReqeust message, length delimited. Does not implicitly {@link pruntime_rpc.StatisticsReqeust.verify|verify} messages. - * @param message StatisticsReqeust message or plain object to encode + * Encodes the specified GetEndpointResponse message, length delimited. Does not implicitly {@link pruntime_rpc.GetEndpointResponse.verify|verify} messages. + * @param message GetEndpointResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: pruntime_rpc.IStatisticsReqeust, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: pruntime_rpc.IGetEndpointResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a StatisticsReqeust message from the specified reader or buffer. + * Decodes a GetEndpointResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns StatisticsReqeust + * @returns GetEndpointResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.StatisticsReqeust; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.GetEndpointResponse; /** - * Decodes a StatisticsReqeust message from the specified reader or buffer, length delimited. + * Decodes a GetEndpointResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns StatisticsReqeust + * @returns GetEndpointResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.StatisticsReqeust; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.GetEndpointResponse; /** - * Verifies a StatisticsReqeust message. + * Verifies a GetEndpointResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a StatisticsReqeust message from a plain object. Also converts values to their respective internal types. + * Creates a GetEndpointResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns StatisticsReqeust + * @returns GetEndpointResponse */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.StatisticsReqeust; + public static fromObject(object: { [k: string]: any }): pruntime_rpc.GetEndpointResponse; /** - * Creates a plain object from a StatisticsReqeust message. Also converts values to other types if specified. - * @param message StatisticsReqeust + * Creates a plain object from a GetEndpointResponse message. Also converts values to other types if specified. + * @param message GetEndpointResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: pruntime_rpc.StatisticsReqeust, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: pruntime_rpc.GetEndpointResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this StatisticsReqeust to JSON. + * Converts this GetEndpointResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for StatisticsReqeust + * Gets the default type url for GetEndpointResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a StatisticsResponse. */ - interface IStatisticsResponse { - - /** StatisticsResponse uptime */ - uptime?: (number|Long|null); - - /** StatisticsResponse cores */ - cores?: (number|null); - - /** StatisticsResponse query */ - query?: (pruntime_rpc.IQueryStats|null); + /** Properties of a GetContractInfoRequest. */ + interface IGetContractInfoRequest { - /** StatisticsResponse httpEgress */ - httpEgress?: (pruntime_rpc.IHttpEgressStats|null); + /** GetContractInfoRequest contracts */ + contracts?: (string[]|null); } - /** Represents a StatisticsResponse. */ - class StatisticsResponse implements IStatisticsResponse { + /** Represents a GetContractInfoRequest. */ + class GetContractInfoRequest implements IGetContractInfoRequest { /** - * Constructs a new StatisticsResponse. + * Constructs a new GetContractInfoRequest. * @param [properties] Properties to set */ - constructor(properties?: pruntime_rpc.IStatisticsResponse); - - /** StatisticsResponse uptime. */ - public uptime: (number|Long); - - /** StatisticsResponse cores. */ - public cores: number; - - /** StatisticsResponse query. */ - public query?: (pruntime_rpc.IQueryStats|null); + constructor(properties?: pruntime_rpc.IGetContractInfoRequest); - /** StatisticsResponse httpEgress. */ - public httpEgress?: (pruntime_rpc.IHttpEgressStats|null); + /** GetContractInfoRequest contracts. */ + public contracts: string[]; /** - * Creates a new StatisticsResponse instance using the specified properties. + * Creates a new GetContractInfoRequest instance using the specified properties. * @param [properties] Properties to set - * @returns StatisticsResponse instance + * @returns GetContractInfoRequest instance */ - public static create(properties?: pruntime_rpc.IStatisticsResponse): pruntime_rpc.StatisticsResponse; + public static create(properties?: pruntime_rpc.IGetContractInfoRequest): pruntime_rpc.GetContractInfoRequest; /** - * Encodes the specified StatisticsResponse message. Does not implicitly {@link pruntime_rpc.StatisticsResponse.verify|verify} messages. - * @param message StatisticsResponse message or plain object to encode + * Encodes the specified GetContractInfoRequest message. Does not implicitly {@link pruntime_rpc.GetContractInfoRequest.verify|verify} messages. + * @param message GetContractInfoRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: pruntime_rpc.IStatisticsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: pruntime_rpc.IGetContractInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified StatisticsResponse message, length delimited. Does not implicitly {@link pruntime_rpc.StatisticsResponse.verify|verify} messages. - * @param message StatisticsResponse message or plain object to encode + * Encodes the specified GetContractInfoRequest message, length delimited. Does not implicitly {@link pruntime_rpc.GetContractInfoRequest.verify|verify} messages. + * @param message GetContractInfoRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: pruntime_rpc.IStatisticsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: pruntime_rpc.IGetContractInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a StatisticsResponse message from the specified reader or buffer. + * Decodes a GetContractInfoRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns StatisticsResponse + * @returns GetContractInfoRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.StatisticsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.GetContractInfoRequest; /** - * Decodes a StatisticsResponse message from the specified reader or buffer, length delimited. + * Decodes a GetContractInfoRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns StatisticsResponse + * @returns GetContractInfoRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.StatisticsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.GetContractInfoRequest; /** - * Verifies a StatisticsResponse message. + * Verifies a GetContractInfoRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a StatisticsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetContractInfoRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns StatisticsResponse + * @returns GetContractInfoRequest */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.StatisticsResponse; + public static fromObject(object: { [k: string]: any }): pruntime_rpc.GetContractInfoRequest; /** - * Creates a plain object from a StatisticsResponse message. Also converts values to other types if specified. - * @param message StatisticsResponse + * Creates a plain object from a GetContractInfoRequest message. Also converts values to other types if specified. + * @param message GetContractInfoRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: pruntime_rpc.StatisticsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: pruntime_rpc.GetContractInfoRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this StatisticsResponse to JSON. + * Converts this GetContractInfoRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for StatisticsResponse + * Gets the default type url for GetContractInfoRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a QueryStats. */ - interface IQueryStats { - - /** QueryStats global */ - global?: (pruntime_rpc.IQueryCounters|null); + /** Properties of a GetContractInfoResponse. */ + interface IGetContractInfoResponse { - /** QueryStats byContract */ - byContract?: ({ [k: string]: pruntime_rpc.IQueryCounters }|null); + /** GetContractInfoResponse contracts */ + contracts?: (pruntime_rpc.IContractInfo[]|null); } - /** Represents a QueryStats. */ - class QueryStats implements IQueryStats { + /** Represents a GetContractInfoResponse. */ + class GetContractInfoResponse implements IGetContractInfoResponse { /** - * Constructs a new QueryStats. + * Constructs a new GetContractInfoResponse. * @param [properties] Properties to set */ - constructor(properties?: pruntime_rpc.IQueryStats); - - /** QueryStats global. */ - public global?: (pruntime_rpc.IQueryCounters|null); + constructor(properties?: pruntime_rpc.IGetContractInfoResponse); - /** QueryStats byContract. */ - public byContract: { [k: string]: pruntime_rpc.IQueryCounters }; + /** GetContractInfoResponse contracts. */ + public contracts: pruntime_rpc.IContractInfo[]; /** - * Creates a new QueryStats instance using the specified properties. + * Creates a new GetContractInfoResponse instance using the specified properties. * @param [properties] Properties to set - * @returns QueryStats instance + * @returns GetContractInfoResponse instance */ - public static create(properties?: pruntime_rpc.IQueryStats): pruntime_rpc.QueryStats; + public static create(properties?: pruntime_rpc.IGetContractInfoResponse): pruntime_rpc.GetContractInfoResponse; /** - * Encodes the specified QueryStats message. Does not implicitly {@link pruntime_rpc.QueryStats.verify|verify} messages. - * @param message QueryStats message or plain object to encode + * Encodes the specified GetContractInfoResponse message. Does not implicitly {@link pruntime_rpc.GetContractInfoResponse.verify|verify} messages. + * @param message GetContractInfoResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: pruntime_rpc.IQueryStats, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: pruntime_rpc.IGetContractInfoResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified QueryStats message, length delimited. Does not implicitly {@link pruntime_rpc.QueryStats.verify|verify} messages. - * @param message QueryStats message or plain object to encode + * Encodes the specified GetContractInfoResponse message, length delimited. Does not implicitly {@link pruntime_rpc.GetContractInfoResponse.verify|verify} messages. + * @param message GetContractInfoResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: pruntime_rpc.IQueryStats, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: pruntime_rpc.IGetContractInfoResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a QueryStats message from the specified reader or buffer. + * Decodes a GetContractInfoResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns QueryStats + * @returns GetContractInfoResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.QueryStats; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.GetContractInfoResponse; /** - * Decodes a QueryStats message from the specified reader or buffer, length delimited. + * Decodes a GetContractInfoResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns QueryStats + * @returns GetContractInfoResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.QueryStats; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.GetContractInfoResponse; /** - * Verifies a QueryStats message. + * Verifies a GetContractInfoResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a QueryStats message from a plain object. Also converts values to their respective internal types. + * Creates a GetContractInfoResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns QueryStats + * @returns GetContractInfoResponse */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.QueryStats; + public static fromObject(object: { [k: string]: any }): pruntime_rpc.GetContractInfoResponse; /** - * Creates a plain object from a QueryStats message. Also converts values to other types if specified. - * @param message QueryStats + * Creates a plain object from a GetContractInfoResponse message. Also converts values to other types if specified. + * @param message GetContractInfoResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: pruntime_rpc.QueryStats, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: pruntime_rpc.GetContractInfoResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this QueryStats to JSON. + * Converts this GetContractInfoResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for QueryStats + * Gets the default type url for GetContractInfoResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a QueryCounters. */ - interface IQueryCounters { + /** Properties of a ContractInfo. */ + interface IContractInfo { + + /** ContractInfo id */ + id?: (string|null); - /** QueryCounters total */ - total?: (number|Long|null); + /** ContractInfo codeHash */ + codeHash?: (string|null); - /** QueryCounters dropped */ - dropped?: (number|Long|null); + /** ContractInfo weight */ + weight?: (number|null); - /** QueryCounters time */ - time?: (number|Long|null); + /** ContractInfo sidevm */ + sidevm?: (pruntime_rpc.ISidevmInfo|null); } - /** Represents a QueryCounters. */ - class QueryCounters implements IQueryCounters { + /** Represents a ContractInfo. */ + class ContractInfo implements IContractInfo { /** - * Constructs a new QueryCounters. + * Constructs a new ContractInfo. * @param [properties] Properties to set */ - constructor(properties?: pruntime_rpc.IQueryCounters); + constructor(properties?: pruntime_rpc.IContractInfo); + + /** ContractInfo id. */ + public id: string; - /** QueryCounters total. */ - public total: (number|Long); + /** ContractInfo codeHash. */ + public codeHash: string; - /** QueryCounters dropped. */ - public dropped: (number|Long); + /** ContractInfo weight. */ + public weight: number; - /** QueryCounters time. */ - public time: (number|Long); + /** ContractInfo sidevm. */ + public sidevm?: (pruntime_rpc.ISidevmInfo|null); /** - * Creates a new QueryCounters instance using the specified properties. + * Creates a new ContractInfo instance using the specified properties. * @param [properties] Properties to set - * @returns QueryCounters instance + * @returns ContractInfo instance */ - public static create(properties?: pruntime_rpc.IQueryCounters): pruntime_rpc.QueryCounters; + public static create(properties?: pruntime_rpc.IContractInfo): pruntime_rpc.ContractInfo; /** - * Encodes the specified QueryCounters message. Does not implicitly {@link pruntime_rpc.QueryCounters.verify|verify} messages. - * @param message QueryCounters message or plain object to encode + * Encodes the specified ContractInfo message. Does not implicitly {@link pruntime_rpc.ContractInfo.verify|verify} messages. + * @param message ContractInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: pruntime_rpc.IQueryCounters, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: pruntime_rpc.IContractInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified QueryCounters message, length delimited. Does not implicitly {@link pruntime_rpc.QueryCounters.verify|verify} messages. - * @param message QueryCounters message or plain object to encode + * Encodes the specified ContractInfo message, length delimited. Does not implicitly {@link pruntime_rpc.ContractInfo.verify|verify} messages. + * @param message ContractInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: pruntime_rpc.IQueryCounters, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: pruntime_rpc.IContractInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a QueryCounters message from the specified reader or buffer. + * Decodes a ContractInfo message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns QueryCounters + * @returns ContractInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.QueryCounters; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.ContractInfo; /** - * Decodes a QueryCounters message from the specified reader or buffer, length delimited. + * Decodes a ContractInfo message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns QueryCounters + * @returns ContractInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.QueryCounters; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.ContractInfo; /** - * Verifies a QueryCounters message. + * Verifies a ContractInfo message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a QueryCounters message from a plain object. Also converts values to their respective internal types. + * Creates a ContractInfo message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns QueryCounters + * @returns ContractInfo */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.QueryCounters; + public static fromObject(object: { [k: string]: any }): pruntime_rpc.ContractInfo; /** - * Creates a plain object from a QueryCounters message. Also converts values to other types if specified. - * @param message QueryCounters + * Creates a plain object from a ContractInfo message. Also converts values to other types if specified. + * @param message ContractInfo * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: pruntime_rpc.QueryCounters, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: pruntime_rpc.ContractInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this QueryCounters to JSON. + * Converts this ContractInfo to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for QueryCounters + * Gets the default type url for ContractInfo * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a HttpEgressStats. */ - interface IHttpEgressStats { + /** Properties of a SidevmInfo. */ + interface ISidevmInfo { + + /** SidevmInfo state */ + state?: (string|null); + + /** SidevmInfo codeHash */ + codeHash?: (string|null); - /** HttpEgressStats global */ - global?: (pruntime_rpc.IHttpCounters|null); + /** SidevmInfo startTime */ + startTime?: (string|null); - /** HttpEgressStats byContract */ - byContract?: ({ [k: string]: pruntime_rpc.IHttpCounters }|null); + /** SidevmInfo stopReason */ + stopReason?: (string|null); } - /** Represents a HttpEgressStats. */ - class HttpEgressStats implements IHttpEgressStats { + /** Represents a SidevmInfo. */ + class SidevmInfo implements ISidevmInfo { /** - * Constructs a new HttpEgressStats. + * Constructs a new SidevmInfo. * @param [properties] Properties to set */ - constructor(properties?: pruntime_rpc.IHttpEgressStats); + constructor(properties?: pruntime_rpc.ISidevmInfo); + + /** SidevmInfo state. */ + public state: string; + + /** SidevmInfo codeHash. */ + public codeHash: string; - /** HttpEgressStats global. */ - public global?: (pruntime_rpc.IHttpCounters|null); + /** SidevmInfo startTime. */ + public startTime: string; - /** HttpEgressStats byContract. */ - public byContract: { [k: string]: pruntime_rpc.IHttpCounters }; + /** SidevmInfo stopReason. */ + public stopReason: string; /** - * Creates a new HttpEgressStats instance using the specified properties. + * Creates a new SidevmInfo instance using the specified properties. * @param [properties] Properties to set - * @returns HttpEgressStats instance + * @returns SidevmInfo instance */ - public static create(properties?: pruntime_rpc.IHttpEgressStats): pruntime_rpc.HttpEgressStats; + public static create(properties?: pruntime_rpc.ISidevmInfo): pruntime_rpc.SidevmInfo; /** - * Encodes the specified HttpEgressStats message. Does not implicitly {@link pruntime_rpc.HttpEgressStats.verify|verify} messages. - * @param message HttpEgressStats message or plain object to encode + * Encodes the specified SidevmInfo message. Does not implicitly {@link pruntime_rpc.SidevmInfo.verify|verify} messages. + * @param message SidevmInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: pruntime_rpc.IHttpEgressStats, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: pruntime_rpc.ISidevmInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified HttpEgressStats message, length delimited. Does not implicitly {@link pruntime_rpc.HttpEgressStats.verify|verify} messages. - * @param message HttpEgressStats message or plain object to encode + * Encodes the specified SidevmInfo message, length delimited. Does not implicitly {@link pruntime_rpc.SidevmInfo.verify|verify} messages. + * @param message SidevmInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: pruntime_rpc.IHttpEgressStats, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: pruntime_rpc.ISidevmInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a HttpEgressStats message from the specified reader or buffer. + * Decodes a SidevmInfo message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns HttpEgressStats + * @returns SidevmInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.HttpEgressStats; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.SidevmInfo; /** - * Decodes a HttpEgressStats message from the specified reader or buffer, length delimited. + * Decodes a SidevmInfo message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns HttpEgressStats + * @returns SidevmInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.HttpEgressStats; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.SidevmInfo; /** - * Verifies a HttpEgressStats message. + * Verifies a SidevmInfo message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a HttpEgressStats message from a plain object. Also converts values to their respective internal types. + * Creates a SidevmInfo message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns HttpEgressStats + * @returns SidevmInfo */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.HttpEgressStats; + public static fromObject(object: { [k: string]: any }): pruntime_rpc.SidevmInfo; /** - * Creates a plain object from a HttpEgressStats message. Also converts values to other types if specified. - * @param message HttpEgressStats + * Creates a plain object from a SidevmInfo message. Also converts values to other types if specified. + * @param message SidevmInfo * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: pruntime_rpc.HttpEgressStats, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: pruntime_rpc.SidevmInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this HttpEgressStats to JSON. + * Converts this SidevmInfo to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for HttpEgressStats + * Gets the default type url for SidevmInfo * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a HttpCounters. */ - interface IHttpCounters { - - /** HttpCounters requests */ - requests?: (number|Long|null); + /** Properties of a SidevmCode. */ + interface ISidevmCode { - /** HttpCounters failures */ - failures?: (number|Long|null); + /** SidevmCode contract */ + contract?: (Uint8Array|null); - /** HttpCounters byStatusCode */ - byStatusCode?: ({ [k: string]: (number|Long) }|null); + /** SidevmCode code */ + code?: (Uint8Array|null); } - /** Represents a HttpCounters. */ - class HttpCounters implements IHttpCounters { + /** Represents a SidevmCode. */ + class SidevmCode implements ISidevmCode { /** - * Constructs a new HttpCounters. + * Constructs a new SidevmCode. * @param [properties] Properties to set */ - constructor(properties?: pruntime_rpc.IHttpCounters); - - /** HttpCounters requests. */ - public requests: (number|Long); + constructor(properties?: pruntime_rpc.ISidevmCode); - /** HttpCounters failures. */ - public failures: (number|Long); + /** SidevmCode contract. */ + public contract: Uint8Array; - /** HttpCounters byStatusCode. */ - public byStatusCode: { [k: string]: (number|Long) }; + /** SidevmCode code. */ + public code: Uint8Array; /** - * Creates a new HttpCounters instance using the specified properties. + * Creates a new SidevmCode instance using the specified properties. * @param [properties] Properties to set - * @returns HttpCounters instance + * @returns SidevmCode instance */ - public static create(properties?: pruntime_rpc.IHttpCounters): pruntime_rpc.HttpCounters; + public static create(properties?: pruntime_rpc.ISidevmCode): pruntime_rpc.SidevmCode; /** - * Encodes the specified HttpCounters message. Does not implicitly {@link pruntime_rpc.HttpCounters.verify|verify} messages. - * @param message HttpCounters message or plain object to encode + * Encodes the specified SidevmCode message. Does not implicitly {@link pruntime_rpc.SidevmCode.verify|verify} messages. + * @param message SidevmCode message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: pruntime_rpc.IHttpCounters, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: pruntime_rpc.ISidevmCode, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified HttpCounters message, length delimited. Does not implicitly {@link pruntime_rpc.HttpCounters.verify|verify} messages. - * @param message HttpCounters message or plain object to encode + * Encodes the specified SidevmCode message, length delimited. Does not implicitly {@link pruntime_rpc.SidevmCode.verify|verify} messages. + * @param message SidevmCode message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: pruntime_rpc.IHttpCounters, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: pruntime_rpc.ISidevmCode, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a HttpCounters message from the specified reader or buffer. + * Decodes a SidevmCode message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns HttpCounters + * @returns SidevmCode * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.HttpCounters; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.SidevmCode; /** - * Decodes a HttpCounters message from the specified reader or buffer, length delimited. + * Decodes a SidevmCode message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns HttpCounters + * @returns SidevmCode * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.HttpCounters; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.SidevmCode; /** - * Verifies a HttpCounters message. + * Verifies a SidevmCode message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a HttpCounters message from a plain object. Also converts values to their respective internal types. + * Creates a SidevmCode message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns HttpCounters + * @returns SidevmCode */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.HttpCounters; + public static fromObject(object: { [k: string]: any }): pruntime_rpc.SidevmCode; /** - * Creates a plain object from a HttpCounters message. Also converts values to other types if specified. - * @param message HttpCounters + * Creates a plain object from a SidevmCode message. Also converts values to other types if specified. + * @param message SidevmCode * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: pruntime_rpc.HttpCounters, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: pruntime_rpc.SidevmCode, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this HttpCounters to JSON. + * Converts this SidevmCode to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for HttpCounters + * Gets the default type url for SidevmCode * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SaveClusterStateArguments. */ - interface ISaveClusterStateArguments { + /** Properties of a ContractParameters. */ + interface IContractParameters { + + /** ContractParameters deployer */ + deployer?: (string|null); - /** SaveClusterStateArguments receiver */ - receiver?: (string|null); + /** ContractParameters clusterId */ + clusterId?: (string|null); - /** SaveClusterStateArguments minBlockNumber */ - minBlockNumber?: (number|null); + /** ContractParameters codeHash */ + codeHash?: (string|null); - /** SaveClusterStateArguments signature */ - signature?: (string|null); + /** ContractParameters salt */ + salt?: (string|null); } - /** Represents a SaveClusterStateArguments. */ - class SaveClusterStateArguments implements ISaveClusterStateArguments { + /** Represents a ContractParameters. */ + class ContractParameters implements IContractParameters { /** - * Constructs a new SaveClusterStateArguments. + * Constructs a new ContractParameters. * @param [properties] Properties to set */ - constructor(properties?: pruntime_rpc.ISaveClusterStateArguments); + constructor(properties?: pruntime_rpc.IContractParameters); + + /** ContractParameters deployer. */ + public deployer: string; - /** SaveClusterStateArguments receiver. */ - public receiver: string; + /** ContractParameters clusterId. */ + public clusterId: string; - /** SaveClusterStateArguments minBlockNumber. */ - public minBlockNumber: number; + /** ContractParameters codeHash. */ + public codeHash: string; - /** SaveClusterStateArguments signature. */ - public signature: string; + /** ContractParameters salt. */ + public salt: string; /** - * Creates a new SaveClusterStateArguments instance using the specified properties. + * Creates a new ContractParameters instance using the specified properties. * @param [properties] Properties to set - * @returns SaveClusterStateArguments instance + * @returns ContractParameters instance */ - public static create(properties?: pruntime_rpc.ISaveClusterStateArguments): pruntime_rpc.SaveClusterStateArguments; + public static create(properties?: pruntime_rpc.IContractParameters): pruntime_rpc.ContractParameters; /** - * Encodes the specified SaveClusterStateArguments message. Does not implicitly {@link pruntime_rpc.SaveClusterStateArguments.verify|verify} messages. - * @param message SaveClusterStateArguments message or plain object to encode + * Encodes the specified ContractParameters message. Does not implicitly {@link pruntime_rpc.ContractParameters.verify|verify} messages. + * @param message ContractParameters message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: pruntime_rpc.ISaveClusterStateArguments, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: pruntime_rpc.IContractParameters, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SaveClusterStateArguments message, length delimited. Does not implicitly {@link pruntime_rpc.SaveClusterStateArguments.verify|verify} messages. - * @param message SaveClusterStateArguments message or plain object to encode + * Encodes the specified ContractParameters message, length delimited. Does not implicitly {@link pruntime_rpc.ContractParameters.verify|verify} messages. + * @param message ContractParameters message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: pruntime_rpc.ISaveClusterStateArguments, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: pruntime_rpc.IContractParameters, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SaveClusterStateArguments message from the specified reader or buffer. + * Decodes a ContractParameters message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SaveClusterStateArguments + * @returns ContractParameters * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.SaveClusterStateArguments; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.ContractParameters; /** - * Decodes a SaveClusterStateArguments message from the specified reader or buffer, length delimited. + * Decodes a ContractParameters message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SaveClusterStateArguments + * @returns ContractParameters * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.SaveClusterStateArguments; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.ContractParameters; /** - * Verifies a SaveClusterStateArguments message. + * Verifies a ContractParameters message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SaveClusterStateArguments message from a plain object. Also converts values to their respective internal types. + * Creates a ContractParameters message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SaveClusterStateArguments + * @returns ContractParameters */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.SaveClusterStateArguments; + public static fromObject(object: { [k: string]: any }): pruntime_rpc.ContractParameters; /** - * Creates a plain object from a SaveClusterStateArguments message. Also converts values to other types if specified. - * @param message SaveClusterStateArguments + * Creates a plain object from a ContractParameters message. Also converts values to other types if specified. + * @param message ContractParameters * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: pruntime_rpc.SaveClusterStateArguments, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: pruntime_rpc.ContractParameters, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SaveClusterStateArguments to JSON. + * Converts this ContractParameters to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SaveClusterStateArguments + * Gets the default type url for ContractParameters * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SaveClusterStateResponse. */ - interface ISaveClusterStateResponse { - - /** SaveClusterStateResponse blockNumber */ - blockNumber?: (number|null); + /** Properties of a ContractId. */ + interface IContractId { - /** SaveClusterStateResponse filename */ - filename?: (string|null); + /** ContractId id */ + id?: (string|null); } - /** Represents a SaveClusterStateResponse. */ - class SaveClusterStateResponse implements ISaveClusterStateResponse { + /** Represents a ContractId. */ + class ContractId implements IContractId { /** - * Constructs a new SaveClusterStateResponse. + * Constructs a new ContractId. * @param [properties] Properties to set */ - constructor(properties?: pruntime_rpc.ISaveClusterStateResponse); - - /** SaveClusterStateResponse blockNumber. */ - public blockNumber: number; + constructor(properties?: pruntime_rpc.IContractId); - /** SaveClusterStateResponse filename. */ - public filename: string; + /** ContractId id. */ + public id: string; /** - * Creates a new SaveClusterStateResponse instance using the specified properties. + * Creates a new ContractId instance using the specified properties. * @param [properties] Properties to set - * @returns SaveClusterStateResponse instance + * @returns ContractId instance */ - public static create(properties?: pruntime_rpc.ISaveClusterStateResponse): pruntime_rpc.SaveClusterStateResponse; + public static create(properties?: pruntime_rpc.IContractId): pruntime_rpc.ContractId; /** - * Encodes the specified SaveClusterStateResponse message. Does not implicitly {@link pruntime_rpc.SaveClusterStateResponse.verify|verify} messages. - * @param message SaveClusterStateResponse message or plain object to encode + * Encodes the specified ContractId message. Does not implicitly {@link pruntime_rpc.ContractId.verify|verify} messages. + * @param message ContractId message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: pruntime_rpc.ISaveClusterStateResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: pruntime_rpc.IContractId, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SaveClusterStateResponse message, length delimited. Does not implicitly {@link pruntime_rpc.SaveClusterStateResponse.verify|verify} messages. - * @param message SaveClusterStateResponse message or plain object to encode + * Encodes the specified ContractId message, length delimited. Does not implicitly {@link pruntime_rpc.ContractId.verify|verify} messages. + * @param message ContractId message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: pruntime_rpc.ISaveClusterStateResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: pruntime_rpc.IContractId, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SaveClusterStateResponse message from the specified reader or buffer. + * Decodes a ContractId message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SaveClusterStateResponse + * @returns ContractId * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.SaveClusterStateResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pruntime_rpc.ContractId; /** - * Decodes a SaveClusterStateResponse message from the specified reader or buffer, length delimited. + * Decodes a ContractId message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SaveClusterStateResponse + * @returns ContractId * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.SaveClusterStateResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): pruntime_rpc.ContractId; /** - * Verifies a SaveClusterStateResponse message. + * Verifies a ContractId message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SaveClusterStateResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ContractId message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SaveClusterStateResponse + * @returns ContractId */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.SaveClusterStateResponse; + public static fromObject(object: { [k: string]: any }): pruntime_rpc.ContractId; /** - * Creates a plain object from a SaveClusterStateResponse message. Also converts values to other types if specified. - * @param message SaveClusterStateResponse + * Creates a plain object from a ContractId message. Also converts values to other types if specified. + * @param message ContractId * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: pruntime_rpc.SaveClusterStateResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: pruntime_rpc.ContractId, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SaveClusterStateResponse to JSON. + * Converts this ContractId to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SaveClusterStateResponse + * Gets the default type url for ContractId * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ diff --git a/frontend/packages/sdk/src/pruntime/proto/index.js b/frontend/packages/sdk/src/pruntime/proto/index.js index 100b5232a4..8333abb937 100644 --- a/frontend/packages/sdk/src/pruntime/proto/index.js +++ b/frontend/packages/sdk/src/pruntime/proto/index.js @@ -1420,6 +1420,39 @@ $root.pruntime_rpc = (function() { * @variation 2 */ + /** + * Callback as used by {@link pruntime_rpc.PhactoryAPI#tryUpgradePinkRuntime}. + * @memberof pruntime_rpc.PhactoryAPI + * @typedef TryUpgradePinkRuntimeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls TryUpgradePinkRuntime. + * @function tryUpgradePinkRuntime + * @memberof pruntime_rpc.PhactoryAPI + * @instance + * @param {pruntime_rpc.IPinkRuntimeVersion} request PinkRuntimeVersion message or plain object + * @param {pruntime_rpc.PhactoryAPI.TryUpgradePinkRuntimeCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(PhactoryAPI.prototype.tryUpgradePinkRuntime = function tryUpgradePinkRuntime(request, callback) { + return this.rpcCall(tryUpgradePinkRuntime, $root.pruntime_rpc.PinkRuntimeVersion, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "TryUpgradePinkRuntime" }); + + /** + * Calls TryUpgradePinkRuntime. + * @function tryUpgradePinkRuntime + * @memberof pruntime_rpc.PhactoryAPI + * @instance + * @param {pruntime_rpc.IPinkRuntimeVersion} request PinkRuntimeVersion message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + return PhactoryAPI; })(); @@ -3247,24 +3280,25 @@ $root.pruntime_rpc = (function() { return MemoryUsage; })(); - pruntime_rpc.SyncedTo = (function() { + pruntime_rpc.GetRuntimeInfoRequest = (function() { /** - * Properties of a SyncedTo. + * Properties of a GetRuntimeInfoRequest. * @memberof pruntime_rpc - * @interface ISyncedTo - * @property {number|null} [syncedTo] SyncedTo syncedTo + * @interface IGetRuntimeInfoRequest + * @property {boolean|null} [forceRefreshRa] GetRuntimeInfoRequest forceRefreshRa + * @property {Uint8Array|null} [encodedOperator] GetRuntimeInfoRequest encodedOperator */ /** - * Constructs a new SyncedTo. + * Constructs a new GetRuntimeInfoRequest. * @memberof pruntime_rpc - * @classdesc Represents a SyncedTo. - * @implements ISyncedTo + * @classdesc Represents a GetRuntimeInfoRequest. + * @implements IGetRuntimeInfoRequest * @constructor - * @param {pruntime_rpc.ISyncedTo=} [properties] Properties to set + * @param {pruntime_rpc.IGetRuntimeInfoRequest=} [properties] Properties to set */ - function SyncedTo(properties) { + function GetRuntimeInfoRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3272,75 +3306,103 @@ $root.pruntime_rpc = (function() { } /** - * SyncedTo syncedTo. - * @member {number} syncedTo - * @memberof pruntime_rpc.SyncedTo + * GetRuntimeInfoRequest forceRefreshRa. + * @member {boolean} forceRefreshRa + * @memberof pruntime_rpc.GetRuntimeInfoRequest + * @instance + */ + GetRuntimeInfoRequest.prototype.forceRefreshRa = false; + + /** + * GetRuntimeInfoRequest encodedOperator. + * @member {Uint8Array|null|undefined} encodedOperator + * @memberof pruntime_rpc.GetRuntimeInfoRequest + * @instance + */ + GetRuntimeInfoRequest.prototype.encodedOperator = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetRuntimeInfoRequest _encodedOperator. + * @member {"encodedOperator"|undefined} _encodedOperator + * @memberof pruntime_rpc.GetRuntimeInfoRequest * @instance */ - SyncedTo.prototype.syncedTo = 0; + Object.defineProperty(GetRuntimeInfoRequest.prototype, "_encodedOperator", { + get: $util.oneOfGetter($oneOfFields = ["encodedOperator"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new SyncedTo instance using the specified properties. + * Creates a new GetRuntimeInfoRequest instance using the specified properties. * @function create - * @memberof pruntime_rpc.SyncedTo + * @memberof pruntime_rpc.GetRuntimeInfoRequest * @static - * @param {pruntime_rpc.ISyncedTo=} [properties] Properties to set - * @returns {pruntime_rpc.SyncedTo} SyncedTo instance + * @param {pruntime_rpc.IGetRuntimeInfoRequest=} [properties] Properties to set + * @returns {pruntime_rpc.GetRuntimeInfoRequest} GetRuntimeInfoRequest instance */ - SyncedTo.create = function create(properties) { - return new SyncedTo(properties); + GetRuntimeInfoRequest.create = function create(properties) { + return new GetRuntimeInfoRequest(properties); }; /** - * Encodes the specified SyncedTo message. Does not implicitly {@link pruntime_rpc.SyncedTo.verify|verify} messages. + * Encodes the specified GetRuntimeInfoRequest message. Does not implicitly {@link pruntime_rpc.GetRuntimeInfoRequest.verify|verify} messages. * @function encode - * @memberof pruntime_rpc.SyncedTo + * @memberof pruntime_rpc.GetRuntimeInfoRequest * @static - * @param {pruntime_rpc.ISyncedTo} message SyncedTo message or plain object to encode + * @param {pruntime_rpc.IGetRuntimeInfoRequest} message GetRuntimeInfoRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SyncedTo.encode = function encode(message, writer) { + GetRuntimeInfoRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.syncedTo != null && Object.hasOwnProperty.call(message, "syncedTo")) - writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.syncedTo); + if (message.forceRefreshRa != null && Object.hasOwnProperty.call(message, "forceRefreshRa")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.forceRefreshRa); + if (message.encodedOperator != null && Object.hasOwnProperty.call(message, "encodedOperator")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.encodedOperator); return writer; }; /** - * Encodes the specified SyncedTo message, length delimited. Does not implicitly {@link pruntime_rpc.SyncedTo.verify|verify} messages. + * Encodes the specified GetRuntimeInfoRequest message, length delimited. Does not implicitly {@link pruntime_rpc.GetRuntimeInfoRequest.verify|verify} messages. * @function encodeDelimited - * @memberof pruntime_rpc.SyncedTo + * @memberof pruntime_rpc.GetRuntimeInfoRequest * @static - * @param {pruntime_rpc.ISyncedTo} message SyncedTo message or plain object to encode + * @param {pruntime_rpc.IGetRuntimeInfoRequest} message GetRuntimeInfoRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SyncedTo.encodeDelimited = function encodeDelimited(message, writer) { + GetRuntimeInfoRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SyncedTo message from the specified reader or buffer. + * Decodes a GetRuntimeInfoRequest message from the specified reader or buffer. * @function decode - * @memberof pruntime_rpc.SyncedTo + * @memberof pruntime_rpc.GetRuntimeInfoRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {pruntime_rpc.SyncedTo} SyncedTo + * @returns {pruntime_rpc.GetRuntimeInfoRequest} GetRuntimeInfoRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SyncedTo.decode = function decode(reader, length) { + GetRuntimeInfoRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.SyncedTo(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.GetRuntimeInfoRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.syncedTo = reader.uint32(); + message.forceRefreshRa = reader.bool(); + break; + } + case 2: { + message.encodedOperator = reader.bytes(); break; } default: @@ -3352,123 +3414,142 @@ $root.pruntime_rpc = (function() { }; /** - * Decodes a SyncedTo message from the specified reader or buffer, length delimited. + * Decodes a GetRuntimeInfoRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof pruntime_rpc.SyncedTo + * @memberof pruntime_rpc.GetRuntimeInfoRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.SyncedTo} SyncedTo + * @returns {pruntime_rpc.GetRuntimeInfoRequest} GetRuntimeInfoRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SyncedTo.decodeDelimited = function decodeDelimited(reader) { + GetRuntimeInfoRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SyncedTo message. + * Verifies a GetRuntimeInfoRequest message. * @function verify - * @memberof pruntime_rpc.SyncedTo + * @memberof pruntime_rpc.GetRuntimeInfoRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SyncedTo.verify = function verify(message) { + GetRuntimeInfoRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.syncedTo != null && message.hasOwnProperty("syncedTo")) - if (!$util.isInteger(message.syncedTo)) - return "syncedTo: integer expected"; + var properties = {}; + if (message.forceRefreshRa != null && message.hasOwnProperty("forceRefreshRa")) + if (typeof message.forceRefreshRa !== "boolean") + return "forceRefreshRa: boolean expected"; + if (message.encodedOperator != null && message.hasOwnProperty("encodedOperator")) { + properties._encodedOperator = 1; + if (!(message.encodedOperator && typeof message.encodedOperator.length === "number" || $util.isString(message.encodedOperator))) + return "encodedOperator: buffer expected"; + } return null; }; /** - * Creates a SyncedTo message from a plain object. Also converts values to their respective internal types. + * Creates a GetRuntimeInfoRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof pruntime_rpc.SyncedTo + * @memberof pruntime_rpc.GetRuntimeInfoRequest * @static * @param {Object.} object Plain object - * @returns {pruntime_rpc.SyncedTo} SyncedTo + * @returns {pruntime_rpc.GetRuntimeInfoRequest} GetRuntimeInfoRequest */ - SyncedTo.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.SyncedTo) + GetRuntimeInfoRequest.fromObject = function fromObject(object) { + if (object instanceof $root.pruntime_rpc.GetRuntimeInfoRequest) return object; - var message = new $root.pruntime_rpc.SyncedTo(); - if (object.syncedTo != null) - message.syncedTo = object.syncedTo >>> 0; + var message = new $root.pruntime_rpc.GetRuntimeInfoRequest(); + if (object.forceRefreshRa != null) + message.forceRefreshRa = Boolean(object.forceRefreshRa); + if (object.encodedOperator != null) + if (typeof object.encodedOperator === "string") + $util.base64.decode(object.encodedOperator, message.encodedOperator = $util.newBuffer($util.base64.length(object.encodedOperator)), 0); + else if (object.encodedOperator.length >= 0) + message.encodedOperator = object.encodedOperator; return message; }; /** - * Creates a plain object from a SyncedTo message. Also converts values to other types if specified. + * Creates a plain object from a GetRuntimeInfoRequest message. Also converts values to other types if specified. * @function toObject - * @memberof pruntime_rpc.SyncedTo + * @memberof pruntime_rpc.GetRuntimeInfoRequest * @static - * @param {pruntime_rpc.SyncedTo} message SyncedTo + * @param {pruntime_rpc.GetRuntimeInfoRequest} message GetRuntimeInfoRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SyncedTo.toObject = function toObject(message, options) { + GetRuntimeInfoRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.syncedTo = 0; - if (message.syncedTo != null && message.hasOwnProperty("syncedTo")) - object.syncedTo = message.syncedTo; + object.forceRefreshRa = false; + if (message.forceRefreshRa != null && message.hasOwnProperty("forceRefreshRa")) + object.forceRefreshRa = message.forceRefreshRa; + if (message.encodedOperator != null && message.hasOwnProperty("encodedOperator")) { + object.encodedOperator = options.bytes === String ? $util.base64.encode(message.encodedOperator, 0, message.encodedOperator.length) : options.bytes === Array ? Array.prototype.slice.call(message.encodedOperator) : message.encodedOperator; + if (options.oneofs) + object._encodedOperator = "encodedOperator"; + } return object; }; /** - * Converts this SyncedTo to JSON. + * Converts this GetRuntimeInfoRequest to JSON. * @function toJSON - * @memberof pruntime_rpc.SyncedTo + * @memberof pruntime_rpc.GetRuntimeInfoRequest * @instance * @returns {Object.} JSON object */ - SyncedTo.prototype.toJSON = function toJSON() { + GetRuntimeInfoRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SyncedTo + * Gets the default type url for GetRuntimeInfoRequest * @function getTypeUrl - * @memberof pruntime_rpc.SyncedTo + * @memberof pruntime_rpc.GetRuntimeInfoRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SyncedTo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetRuntimeInfoRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/pruntime_rpc.SyncedTo"; + return typeUrlPrefix + "/pruntime_rpc.GetRuntimeInfoRequest"; }; - return SyncedTo; + return GetRuntimeInfoRequest; })(); - pruntime_rpc.HeadersToSync = (function() { + pruntime_rpc.InitRuntimeResponse = (function() { /** - * Properties of a HeadersToSync. + * Properties of an InitRuntimeResponse. * @memberof pruntime_rpc - * @interface IHeadersToSync - * @property {Uint8Array|null} [encodedHeaders] HeadersToSync encodedHeaders - * @property {Uint8Array|null} [encodedAuthoritySetChange] HeadersToSync encodedAuthoritySetChange + * @interface IInitRuntimeResponse + * @property {Uint8Array|null} [encodedRuntimeInfo] InitRuntimeResponse encodedRuntimeInfo + * @property {Uint8Array|null} [encodedGenesisBlockHash] InitRuntimeResponse encodedGenesisBlockHash + * @property {Uint8Array|null} [encodedPublicKey] InitRuntimeResponse encodedPublicKey + * @property {Uint8Array|null} [encodedEcdhPublicKey] InitRuntimeResponse encodedEcdhPublicKey + * @property {pruntime_rpc.IAttestation|null} [attestation] InitRuntimeResponse attestation */ /** - * Constructs a new HeadersToSync. + * Constructs a new InitRuntimeResponse. * @memberof pruntime_rpc - * @classdesc Represents a HeadersToSync. - * @implements IHeadersToSync + * @classdesc Represents an InitRuntimeResponse. + * @implements IInitRuntimeResponse * @constructor - * @param {pruntime_rpc.IHeadersToSync=} [properties] Properties to set + * @param {pruntime_rpc.IInitRuntimeResponse=} [properties] Properties to set */ - function HeadersToSync(properties) { + function InitRuntimeResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3476,103 +3557,145 @@ $root.pruntime_rpc = (function() { } /** - * HeadersToSync encodedHeaders. - * @member {Uint8Array} encodedHeaders - * @memberof pruntime_rpc.HeadersToSync + * InitRuntimeResponse encodedRuntimeInfo. + * @member {Uint8Array} encodedRuntimeInfo + * @memberof pruntime_rpc.InitRuntimeResponse + * @instance + */ + InitRuntimeResponse.prototype.encodedRuntimeInfo = $util.newBuffer([]); + + /** + * InitRuntimeResponse encodedGenesisBlockHash. + * @member {Uint8Array} encodedGenesisBlockHash + * @memberof pruntime_rpc.InitRuntimeResponse + * @instance + */ + InitRuntimeResponse.prototype.encodedGenesisBlockHash = $util.newBuffer([]); + + /** + * InitRuntimeResponse encodedPublicKey. + * @member {Uint8Array} encodedPublicKey + * @memberof pruntime_rpc.InitRuntimeResponse + * @instance + */ + InitRuntimeResponse.prototype.encodedPublicKey = $util.newBuffer([]); + + /** + * InitRuntimeResponse encodedEcdhPublicKey. + * @member {Uint8Array} encodedEcdhPublicKey + * @memberof pruntime_rpc.InitRuntimeResponse * @instance */ - HeadersToSync.prototype.encodedHeaders = $util.newBuffer([]); + InitRuntimeResponse.prototype.encodedEcdhPublicKey = $util.newBuffer([]); /** - * HeadersToSync encodedAuthoritySetChange. - * @member {Uint8Array|null|undefined} encodedAuthoritySetChange - * @memberof pruntime_rpc.HeadersToSync + * InitRuntimeResponse attestation. + * @member {pruntime_rpc.IAttestation|null|undefined} attestation + * @memberof pruntime_rpc.InitRuntimeResponse * @instance */ - HeadersToSync.prototype.encodedAuthoritySetChange = null; + InitRuntimeResponse.prototype.attestation = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; /** - * HeadersToSync _encodedAuthoritySetChange. - * @member {"encodedAuthoritySetChange"|undefined} _encodedAuthoritySetChange - * @memberof pruntime_rpc.HeadersToSync + * InitRuntimeResponse _attestation. + * @member {"attestation"|undefined} _attestation + * @memberof pruntime_rpc.InitRuntimeResponse * @instance */ - Object.defineProperty(HeadersToSync.prototype, "_encodedAuthoritySetChange", { - get: $util.oneOfGetter($oneOfFields = ["encodedAuthoritySetChange"]), + Object.defineProperty(InitRuntimeResponse.prototype, "_attestation", { + get: $util.oneOfGetter($oneOfFields = ["attestation"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new HeadersToSync instance using the specified properties. + * Creates a new InitRuntimeResponse instance using the specified properties. * @function create - * @memberof pruntime_rpc.HeadersToSync + * @memberof pruntime_rpc.InitRuntimeResponse * @static - * @param {pruntime_rpc.IHeadersToSync=} [properties] Properties to set - * @returns {pruntime_rpc.HeadersToSync} HeadersToSync instance + * @param {pruntime_rpc.IInitRuntimeResponse=} [properties] Properties to set + * @returns {pruntime_rpc.InitRuntimeResponse} InitRuntimeResponse instance */ - HeadersToSync.create = function create(properties) { - return new HeadersToSync(properties); + InitRuntimeResponse.create = function create(properties) { + return new InitRuntimeResponse(properties); }; /** - * Encodes the specified HeadersToSync message. Does not implicitly {@link pruntime_rpc.HeadersToSync.verify|verify} messages. + * Encodes the specified InitRuntimeResponse message. Does not implicitly {@link pruntime_rpc.InitRuntimeResponse.verify|verify} messages. * @function encode - * @memberof pruntime_rpc.HeadersToSync + * @memberof pruntime_rpc.InitRuntimeResponse * @static - * @param {pruntime_rpc.IHeadersToSync} message HeadersToSync message or plain object to encode + * @param {pruntime_rpc.IInitRuntimeResponse} message InitRuntimeResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HeadersToSync.encode = function encode(message, writer) { + InitRuntimeResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.encodedHeaders != null && Object.hasOwnProperty.call(message, "encodedHeaders")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.encodedHeaders); - if (message.encodedAuthoritySetChange != null && Object.hasOwnProperty.call(message, "encodedAuthoritySetChange")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.encodedAuthoritySetChange); + if (message.encodedRuntimeInfo != null && Object.hasOwnProperty.call(message, "encodedRuntimeInfo")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.encodedRuntimeInfo); + if (message.encodedGenesisBlockHash != null && Object.hasOwnProperty.call(message, "encodedGenesisBlockHash")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.encodedGenesisBlockHash); + if (message.encodedPublicKey != null && Object.hasOwnProperty.call(message, "encodedPublicKey")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.encodedPublicKey); + if (message.encodedEcdhPublicKey != null && Object.hasOwnProperty.call(message, "encodedEcdhPublicKey")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.encodedEcdhPublicKey); + if (message.attestation != null && Object.hasOwnProperty.call(message, "attestation")) + $root.pruntime_rpc.Attestation.encode(message.attestation, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** - * Encodes the specified HeadersToSync message, length delimited. Does not implicitly {@link pruntime_rpc.HeadersToSync.verify|verify} messages. + * Encodes the specified InitRuntimeResponse message, length delimited. Does not implicitly {@link pruntime_rpc.InitRuntimeResponse.verify|verify} messages. * @function encodeDelimited - * @memberof pruntime_rpc.HeadersToSync + * @memberof pruntime_rpc.InitRuntimeResponse * @static - * @param {pruntime_rpc.IHeadersToSync} message HeadersToSync message or plain object to encode + * @param {pruntime_rpc.IInitRuntimeResponse} message InitRuntimeResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HeadersToSync.encodeDelimited = function encodeDelimited(message, writer) { + InitRuntimeResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a HeadersToSync message from the specified reader or buffer. + * Decodes an InitRuntimeResponse message from the specified reader or buffer. * @function decode - * @memberof pruntime_rpc.HeadersToSync + * @memberof pruntime_rpc.InitRuntimeResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {pruntime_rpc.HeadersToSync} HeadersToSync + * @returns {pruntime_rpc.InitRuntimeResponse} InitRuntimeResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HeadersToSync.decode = function decode(reader, length) { + InitRuntimeResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.HeadersToSync(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.InitRuntimeResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.encodedHeaders = reader.bytes(); + message.encodedRuntimeInfo = reader.bytes(); break; } case 2: { - message.encodedAuthoritySetChange = reader.bytes(); + message.encodedGenesisBlockHash = reader.bytes(); + break; + } + case 3: { + message.encodedPublicKey = reader.bytes(); + break; + } + case 4: { + message.encodedEcdhPublicKey = reader.bytes(); + break; + } + case 5: { + message.attestation = $root.pruntime_rpc.Attestation.decode(reader, reader.uint32()); break; } default: @@ -3584,149 +3707,206 @@ $root.pruntime_rpc = (function() { }; /** - * Decodes a HeadersToSync message from the specified reader or buffer, length delimited. + * Decodes an InitRuntimeResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof pruntime_rpc.HeadersToSync + * @memberof pruntime_rpc.InitRuntimeResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.HeadersToSync} HeadersToSync + * @returns {pruntime_rpc.InitRuntimeResponse} InitRuntimeResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HeadersToSync.decodeDelimited = function decodeDelimited(reader) { + InitRuntimeResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a HeadersToSync message. + * Verifies an InitRuntimeResponse message. * @function verify - * @memberof pruntime_rpc.HeadersToSync + * @memberof pruntime_rpc.InitRuntimeResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - HeadersToSync.verify = function verify(message) { + InitRuntimeResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.encodedHeaders != null && message.hasOwnProperty("encodedHeaders")) - if (!(message.encodedHeaders && typeof message.encodedHeaders.length === "number" || $util.isString(message.encodedHeaders))) - return "encodedHeaders: buffer expected"; - if (message.encodedAuthoritySetChange != null && message.hasOwnProperty("encodedAuthoritySetChange")) { - properties._encodedAuthoritySetChange = 1; - if (!(message.encodedAuthoritySetChange && typeof message.encodedAuthoritySetChange.length === "number" || $util.isString(message.encodedAuthoritySetChange))) - return "encodedAuthoritySetChange: buffer expected"; + if (message.encodedRuntimeInfo != null && message.hasOwnProperty("encodedRuntimeInfo")) + if (!(message.encodedRuntimeInfo && typeof message.encodedRuntimeInfo.length === "number" || $util.isString(message.encodedRuntimeInfo))) + return "encodedRuntimeInfo: buffer expected"; + if (message.encodedGenesisBlockHash != null && message.hasOwnProperty("encodedGenesisBlockHash")) + if (!(message.encodedGenesisBlockHash && typeof message.encodedGenesisBlockHash.length === "number" || $util.isString(message.encodedGenesisBlockHash))) + return "encodedGenesisBlockHash: buffer expected"; + if (message.encodedPublicKey != null && message.hasOwnProperty("encodedPublicKey")) + if (!(message.encodedPublicKey && typeof message.encodedPublicKey.length === "number" || $util.isString(message.encodedPublicKey))) + return "encodedPublicKey: buffer expected"; + if (message.encodedEcdhPublicKey != null && message.hasOwnProperty("encodedEcdhPublicKey")) + if (!(message.encodedEcdhPublicKey && typeof message.encodedEcdhPublicKey.length === "number" || $util.isString(message.encodedEcdhPublicKey))) + return "encodedEcdhPublicKey: buffer expected"; + if (message.attestation != null && message.hasOwnProperty("attestation")) { + properties._attestation = 1; + { + var error = $root.pruntime_rpc.Attestation.verify(message.attestation); + if (error) + return "attestation." + error; + } } return null; }; /** - * Creates a HeadersToSync message from a plain object. Also converts values to their respective internal types. + * Creates an InitRuntimeResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof pruntime_rpc.HeadersToSync + * @memberof pruntime_rpc.InitRuntimeResponse * @static * @param {Object.} object Plain object - * @returns {pruntime_rpc.HeadersToSync} HeadersToSync + * @returns {pruntime_rpc.InitRuntimeResponse} InitRuntimeResponse */ - HeadersToSync.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.HeadersToSync) + InitRuntimeResponse.fromObject = function fromObject(object) { + if (object instanceof $root.pruntime_rpc.InitRuntimeResponse) return object; - var message = new $root.pruntime_rpc.HeadersToSync(); - if (object.encodedHeaders != null) - if (typeof object.encodedHeaders === "string") - $util.base64.decode(object.encodedHeaders, message.encodedHeaders = $util.newBuffer($util.base64.length(object.encodedHeaders)), 0); - else if (object.encodedHeaders.length >= 0) - message.encodedHeaders = object.encodedHeaders; - if (object.encodedAuthoritySetChange != null) - if (typeof object.encodedAuthoritySetChange === "string") - $util.base64.decode(object.encodedAuthoritySetChange, message.encodedAuthoritySetChange = $util.newBuffer($util.base64.length(object.encodedAuthoritySetChange)), 0); - else if (object.encodedAuthoritySetChange.length >= 0) - message.encodedAuthoritySetChange = object.encodedAuthoritySetChange; + var message = new $root.pruntime_rpc.InitRuntimeResponse(); + if (object.encodedRuntimeInfo != null) + if (typeof object.encodedRuntimeInfo === "string") + $util.base64.decode(object.encodedRuntimeInfo, message.encodedRuntimeInfo = $util.newBuffer($util.base64.length(object.encodedRuntimeInfo)), 0); + else if (object.encodedRuntimeInfo.length >= 0) + message.encodedRuntimeInfo = object.encodedRuntimeInfo; + if (object.encodedGenesisBlockHash != null) + if (typeof object.encodedGenesisBlockHash === "string") + $util.base64.decode(object.encodedGenesisBlockHash, message.encodedGenesisBlockHash = $util.newBuffer($util.base64.length(object.encodedGenesisBlockHash)), 0); + else if (object.encodedGenesisBlockHash.length >= 0) + message.encodedGenesisBlockHash = object.encodedGenesisBlockHash; + if (object.encodedPublicKey != null) + if (typeof object.encodedPublicKey === "string") + $util.base64.decode(object.encodedPublicKey, message.encodedPublicKey = $util.newBuffer($util.base64.length(object.encodedPublicKey)), 0); + else if (object.encodedPublicKey.length >= 0) + message.encodedPublicKey = object.encodedPublicKey; + if (object.encodedEcdhPublicKey != null) + if (typeof object.encodedEcdhPublicKey === "string") + $util.base64.decode(object.encodedEcdhPublicKey, message.encodedEcdhPublicKey = $util.newBuffer($util.base64.length(object.encodedEcdhPublicKey)), 0); + else if (object.encodedEcdhPublicKey.length >= 0) + message.encodedEcdhPublicKey = object.encodedEcdhPublicKey; + if (object.attestation != null) { + if (typeof object.attestation !== "object") + throw TypeError(".pruntime_rpc.InitRuntimeResponse.attestation: object expected"); + message.attestation = $root.pruntime_rpc.Attestation.fromObject(object.attestation); + } return message; }; /** - * Creates a plain object from a HeadersToSync message. Also converts values to other types if specified. + * Creates a plain object from an InitRuntimeResponse message. Also converts values to other types if specified. * @function toObject - * @memberof pruntime_rpc.HeadersToSync + * @memberof pruntime_rpc.InitRuntimeResponse * @static - * @param {pruntime_rpc.HeadersToSync} message HeadersToSync + * @param {pruntime_rpc.InitRuntimeResponse} message InitRuntimeResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - HeadersToSync.toObject = function toObject(message, options) { + InitRuntimeResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { + if (options.bytes === String) + object.encodedRuntimeInfo = ""; + else { + object.encodedRuntimeInfo = []; + if (options.bytes !== Array) + object.encodedRuntimeInfo = $util.newBuffer(object.encodedRuntimeInfo); + } + if (options.bytes === String) + object.encodedGenesisBlockHash = ""; + else { + object.encodedGenesisBlockHash = []; + if (options.bytes !== Array) + object.encodedGenesisBlockHash = $util.newBuffer(object.encodedGenesisBlockHash); + } if (options.bytes === String) - object.encodedHeaders = ""; + object.encodedPublicKey = ""; + else { + object.encodedPublicKey = []; + if (options.bytes !== Array) + object.encodedPublicKey = $util.newBuffer(object.encodedPublicKey); + } + if (options.bytes === String) + object.encodedEcdhPublicKey = ""; else { - object.encodedHeaders = []; + object.encodedEcdhPublicKey = []; if (options.bytes !== Array) - object.encodedHeaders = $util.newBuffer(object.encodedHeaders); + object.encodedEcdhPublicKey = $util.newBuffer(object.encodedEcdhPublicKey); } - if (message.encodedHeaders != null && message.hasOwnProperty("encodedHeaders")) - object.encodedHeaders = options.bytes === String ? $util.base64.encode(message.encodedHeaders, 0, message.encodedHeaders.length) : options.bytes === Array ? Array.prototype.slice.call(message.encodedHeaders) : message.encodedHeaders; - if (message.encodedAuthoritySetChange != null && message.hasOwnProperty("encodedAuthoritySetChange")) { - object.encodedAuthoritySetChange = options.bytes === String ? $util.base64.encode(message.encodedAuthoritySetChange, 0, message.encodedAuthoritySetChange.length) : options.bytes === Array ? Array.prototype.slice.call(message.encodedAuthoritySetChange) : message.encodedAuthoritySetChange; + } + if (message.encodedRuntimeInfo != null && message.hasOwnProperty("encodedRuntimeInfo")) + object.encodedRuntimeInfo = options.bytes === String ? $util.base64.encode(message.encodedRuntimeInfo, 0, message.encodedRuntimeInfo.length) : options.bytes === Array ? Array.prototype.slice.call(message.encodedRuntimeInfo) : message.encodedRuntimeInfo; + if (message.encodedGenesisBlockHash != null && message.hasOwnProperty("encodedGenesisBlockHash")) + object.encodedGenesisBlockHash = options.bytes === String ? $util.base64.encode(message.encodedGenesisBlockHash, 0, message.encodedGenesisBlockHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.encodedGenesisBlockHash) : message.encodedGenesisBlockHash; + if (message.encodedPublicKey != null && message.hasOwnProperty("encodedPublicKey")) + object.encodedPublicKey = options.bytes === String ? $util.base64.encode(message.encodedPublicKey, 0, message.encodedPublicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.encodedPublicKey) : message.encodedPublicKey; + if (message.encodedEcdhPublicKey != null && message.hasOwnProperty("encodedEcdhPublicKey")) + object.encodedEcdhPublicKey = options.bytes === String ? $util.base64.encode(message.encodedEcdhPublicKey, 0, message.encodedEcdhPublicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.encodedEcdhPublicKey) : message.encodedEcdhPublicKey; + if (message.attestation != null && message.hasOwnProperty("attestation")) { + object.attestation = $root.pruntime_rpc.Attestation.toObject(message.attestation, options); if (options.oneofs) - object._encodedAuthoritySetChange = "encodedAuthoritySetChange"; + object._attestation = "attestation"; } return object; }; /** - * Converts this HeadersToSync to JSON. + * Converts this InitRuntimeResponse to JSON. * @function toJSON - * @memberof pruntime_rpc.HeadersToSync + * @memberof pruntime_rpc.InitRuntimeResponse * @instance * @returns {Object.} JSON object */ - HeadersToSync.prototype.toJSON = function toJSON() { + InitRuntimeResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for HeadersToSync + * Gets the default type url for InitRuntimeResponse * @function getTypeUrl - * @memberof pruntime_rpc.HeadersToSync + * @memberof pruntime_rpc.InitRuntimeResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - HeadersToSync.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + InitRuntimeResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/pruntime_rpc.HeadersToSync"; + return typeUrlPrefix + "/pruntime_rpc.InitRuntimeResponse"; }; - return HeadersToSync; + return InitRuntimeResponse; })(); - pruntime_rpc.ParaHeadersToSync = (function() { + pruntime_rpc.Attestation = (function() { /** - * Properties of a ParaHeadersToSync. + * Properties of an Attestation. * @memberof pruntime_rpc - * @interface IParaHeadersToSync - * @property {Uint8Array|null} [encodedHeaders] ParaHeadersToSync encodedHeaders - * @property {Array.|null} [proof] ParaHeadersToSync proof + * @interface IAttestation + * @property {number|null} [version] Attestation version + * @property {string|null} [provider] Attestation provider + * @property {pruntime_rpc.IAttestationReport|null} [payload] Attestation payload + * @property {Uint8Array|null} [encodedReport] Attestation encodedReport + * @property {number|Long|null} [timestamp] Attestation timestamp */ /** - * Constructs a new ParaHeadersToSync. + * Constructs a new Attestation. * @memberof pruntime_rpc - * @classdesc Represents a ParaHeadersToSync. - * @implements IParaHeadersToSync + * @classdesc Represents an Attestation. + * @implements IAttestation * @constructor - * @param {pruntime_rpc.IParaHeadersToSync=} [properties] Properties to set + * @param {pruntime_rpc.IAttestation=} [properties] Properties to set */ - function ParaHeadersToSync(properties) { - this.proof = []; + function Attestation(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3734,92 +3914,131 @@ $root.pruntime_rpc = (function() { } /** - * ParaHeadersToSync encodedHeaders. - * @member {Uint8Array} encodedHeaders - * @memberof pruntime_rpc.ParaHeadersToSync + * Attestation version. + * @member {number} version + * @memberof pruntime_rpc.Attestation + * @instance + */ + Attestation.prototype.version = 0; + + /** + * Attestation provider. + * @member {string} provider + * @memberof pruntime_rpc.Attestation + * @instance + */ + Attestation.prototype.provider = ""; + + /** + * Attestation payload. + * @member {pruntime_rpc.IAttestationReport|null|undefined} payload + * @memberof pruntime_rpc.Attestation + * @instance + */ + Attestation.prototype.payload = null; + + /** + * Attestation encodedReport. + * @member {Uint8Array} encodedReport + * @memberof pruntime_rpc.Attestation * @instance */ - ParaHeadersToSync.prototype.encodedHeaders = $util.newBuffer([]); + Attestation.prototype.encodedReport = $util.newBuffer([]); /** - * ParaHeadersToSync proof. - * @member {Array.} proof - * @memberof pruntime_rpc.ParaHeadersToSync + * Attestation timestamp. + * @member {number|Long} timestamp + * @memberof pruntime_rpc.Attestation * @instance */ - ParaHeadersToSync.prototype.proof = $util.emptyArray; + Attestation.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** - * Creates a new ParaHeadersToSync instance using the specified properties. + * Creates a new Attestation instance using the specified properties. * @function create - * @memberof pruntime_rpc.ParaHeadersToSync + * @memberof pruntime_rpc.Attestation * @static - * @param {pruntime_rpc.IParaHeadersToSync=} [properties] Properties to set - * @returns {pruntime_rpc.ParaHeadersToSync} ParaHeadersToSync instance + * @param {pruntime_rpc.IAttestation=} [properties] Properties to set + * @returns {pruntime_rpc.Attestation} Attestation instance */ - ParaHeadersToSync.create = function create(properties) { - return new ParaHeadersToSync(properties); + Attestation.create = function create(properties) { + return new Attestation(properties); }; /** - * Encodes the specified ParaHeadersToSync message. Does not implicitly {@link pruntime_rpc.ParaHeadersToSync.verify|verify} messages. + * Encodes the specified Attestation message. Does not implicitly {@link pruntime_rpc.Attestation.verify|verify} messages. * @function encode - * @memberof pruntime_rpc.ParaHeadersToSync + * @memberof pruntime_rpc.Attestation * @static - * @param {pruntime_rpc.IParaHeadersToSync} message ParaHeadersToSync message or plain object to encode + * @param {pruntime_rpc.IAttestation} message Attestation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ParaHeadersToSync.encode = function encode(message, writer) { + Attestation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.encodedHeaders != null && Object.hasOwnProperty.call(message, "encodedHeaders")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.encodedHeaders); - if (message.proof != null && message.proof.length) - for (var i = 0; i < message.proof.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.proof[i]); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.version); + if (message.provider != null && Object.hasOwnProperty.call(message, "provider")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.provider); + if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) + $root.pruntime_rpc.AttestationReport.encode(message.payload, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.timestamp); + if (message.encodedReport != null && Object.hasOwnProperty.call(message, "encodedReport")) + writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.encodedReport); return writer; }; /** - * Encodes the specified ParaHeadersToSync message, length delimited. Does not implicitly {@link pruntime_rpc.ParaHeadersToSync.verify|verify} messages. + * Encodes the specified Attestation message, length delimited. Does not implicitly {@link pruntime_rpc.Attestation.verify|verify} messages. * @function encodeDelimited - * @memberof pruntime_rpc.ParaHeadersToSync + * @memberof pruntime_rpc.Attestation * @static - * @param {pruntime_rpc.IParaHeadersToSync} message ParaHeadersToSync message or plain object to encode + * @param {pruntime_rpc.IAttestation} message Attestation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ParaHeadersToSync.encodeDelimited = function encodeDelimited(message, writer) { + Attestation.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ParaHeadersToSync message from the specified reader or buffer. + * Decodes an Attestation message from the specified reader or buffer. * @function decode - * @memberof pruntime_rpc.ParaHeadersToSync + * @memberof pruntime_rpc.Attestation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {pruntime_rpc.ParaHeadersToSync} ParaHeadersToSync + * @returns {pruntime_rpc.Attestation} Attestation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ParaHeadersToSync.decode = function decode(reader, length) { + Attestation.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.ParaHeadersToSync(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.Attestation(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.encodedHeaders = reader.bytes(); + message.version = reader.int32(); break; } case 2: { - if (!(message.proof && message.proof.length)) - message.proof = []; - message.proof.push(reader.bytes()); + message.provider = reader.string(); + break; + } + case 3: { + message.payload = $root.pruntime_rpc.AttestationReport.decode(reader, reader.uint32()); + break; + } + case 5: { + message.encodedReport = reader.bytes(); + break; + } + case 4: { + message.timestamp = reader.uint64(); break; } default: @@ -3831,159 +4050,185 @@ $root.pruntime_rpc = (function() { }; /** - * Decodes a ParaHeadersToSync message from the specified reader or buffer, length delimited. + * Decodes an Attestation message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof pruntime_rpc.ParaHeadersToSync + * @memberof pruntime_rpc.Attestation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.ParaHeadersToSync} ParaHeadersToSync + * @returns {pruntime_rpc.Attestation} Attestation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ParaHeadersToSync.decodeDelimited = function decodeDelimited(reader) { + Attestation.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ParaHeadersToSync message. + * Verifies an Attestation message. * @function verify - * @memberof pruntime_rpc.ParaHeadersToSync + * @memberof pruntime_rpc.Attestation * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ParaHeadersToSync.verify = function verify(message) { + Attestation.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.encodedHeaders != null && message.hasOwnProperty("encodedHeaders")) - if (!(message.encodedHeaders && typeof message.encodedHeaders.length === "number" || $util.isString(message.encodedHeaders))) - return "encodedHeaders: buffer expected"; - if (message.proof != null && message.hasOwnProperty("proof")) { - if (!Array.isArray(message.proof)) - return "proof: array expected"; - for (var i = 0; i < message.proof.length; ++i) - if (!(message.proof[i] && typeof message.proof[i].length === "number" || $util.isString(message.proof[i]))) - return "proof: buffer[] expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isInteger(message.version)) + return "version: integer expected"; + if (message.provider != null && message.hasOwnProperty("provider")) + if (!$util.isString(message.provider)) + return "provider: string expected"; + if (message.payload != null && message.hasOwnProperty("payload")) { + var error = $root.pruntime_rpc.AttestationReport.verify(message.payload); + if (error) + return "payload." + error; } + if (message.encodedReport != null && message.hasOwnProperty("encodedReport")) + if (!(message.encodedReport && typeof message.encodedReport.length === "number" || $util.isString(message.encodedReport))) + return "encodedReport: buffer expected"; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high))) + return "timestamp: integer|Long expected"; return null; }; /** - * Creates a ParaHeadersToSync message from a plain object. Also converts values to their respective internal types. + * Creates an Attestation message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof pruntime_rpc.ParaHeadersToSync + * @memberof pruntime_rpc.Attestation * @static * @param {Object.} object Plain object - * @returns {pruntime_rpc.ParaHeadersToSync} ParaHeadersToSync + * @returns {pruntime_rpc.Attestation} Attestation */ - ParaHeadersToSync.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.ParaHeadersToSync) + Attestation.fromObject = function fromObject(object) { + if (object instanceof $root.pruntime_rpc.Attestation) return object; - var message = new $root.pruntime_rpc.ParaHeadersToSync(); - if (object.encodedHeaders != null) - if (typeof object.encodedHeaders === "string") - $util.base64.decode(object.encodedHeaders, message.encodedHeaders = $util.newBuffer($util.base64.length(object.encodedHeaders)), 0); - else if (object.encodedHeaders.length >= 0) - message.encodedHeaders = object.encodedHeaders; - if (object.proof) { - if (!Array.isArray(object.proof)) - throw TypeError(".pruntime_rpc.ParaHeadersToSync.proof: array expected"); - message.proof = []; - for (var i = 0; i < object.proof.length; ++i) - if (typeof object.proof[i] === "string") - $util.base64.decode(object.proof[i], message.proof[i] = $util.newBuffer($util.base64.length(object.proof[i])), 0); - else if (object.proof[i].length >= 0) - message.proof[i] = object.proof[i]; + var message = new $root.pruntime_rpc.Attestation(); + if (object.version != null) + message.version = object.version | 0; + if (object.provider != null) + message.provider = String(object.provider); + if (object.payload != null) { + if (typeof object.payload !== "object") + throw TypeError(".pruntime_rpc.Attestation.payload: object expected"); + message.payload = $root.pruntime_rpc.AttestationReport.fromObject(object.payload); } + if (object.encodedReport != null) + if (typeof object.encodedReport === "string") + $util.base64.decode(object.encodedReport, message.encodedReport = $util.newBuffer($util.base64.length(object.encodedReport)), 0); + else if (object.encodedReport.length >= 0) + message.encodedReport = object.encodedReport; + if (object.timestamp != null) + if ($util.Long) + (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = true; + else if (typeof object.timestamp === "string") + message.timestamp = parseInt(object.timestamp, 10); + else if (typeof object.timestamp === "number") + message.timestamp = object.timestamp; + else if (typeof object.timestamp === "object") + message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(true); return message; }; /** - * Creates a plain object from a ParaHeadersToSync message. Also converts values to other types if specified. + * Creates a plain object from an Attestation message. Also converts values to other types if specified. * @function toObject - * @memberof pruntime_rpc.ParaHeadersToSync + * @memberof pruntime_rpc.Attestation * @static - * @param {pruntime_rpc.ParaHeadersToSync} message ParaHeadersToSync + * @param {pruntime_rpc.Attestation} message Attestation * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ParaHeadersToSync.toObject = function toObject(message, options) { + Attestation.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.proof = []; - if (options.defaults) + if (options.defaults) { + object.version = 0; + object.provider = ""; + object.payload = null; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.timestamp = options.longs === String ? "0" : 0; if (options.bytes === String) - object.encodedHeaders = ""; + object.encodedReport = ""; else { - object.encodedHeaders = []; + object.encodedReport = []; if (options.bytes !== Array) - object.encodedHeaders = $util.newBuffer(object.encodedHeaders); + object.encodedReport = $util.newBuffer(object.encodedReport); } - if (message.encodedHeaders != null && message.hasOwnProperty("encodedHeaders")) - object.encodedHeaders = options.bytes === String ? $util.base64.encode(message.encodedHeaders, 0, message.encodedHeaders.length) : options.bytes === Array ? Array.prototype.slice.call(message.encodedHeaders) : message.encodedHeaders; - if (message.proof && message.proof.length) { - object.proof = []; - for (var j = 0; j < message.proof.length; ++j) - object.proof[j] = options.bytes === String ? $util.base64.encode(message.proof[j], 0, message.proof[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.proof[j]) : message.proof[j]; } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.provider != null && message.hasOwnProperty("provider")) + object.provider = message.provider; + if (message.payload != null && message.hasOwnProperty("payload")) + object.payload = $root.pruntime_rpc.AttestationReport.toObject(message.payload, options); + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + if (typeof message.timestamp === "number") + object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp; + else + object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber(true) : message.timestamp; + if (message.encodedReport != null && message.hasOwnProperty("encodedReport")) + object.encodedReport = options.bytes === String ? $util.base64.encode(message.encodedReport, 0, message.encodedReport.length) : options.bytes === Array ? Array.prototype.slice.call(message.encodedReport) : message.encodedReport; return object; }; /** - * Converts this ParaHeadersToSync to JSON. + * Converts this Attestation to JSON. * @function toJSON - * @memberof pruntime_rpc.ParaHeadersToSync + * @memberof pruntime_rpc.Attestation * @instance * @returns {Object.} JSON object */ - ParaHeadersToSync.prototype.toJSON = function toJSON() { + Attestation.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ParaHeadersToSync + * Gets the default type url for Attestation * @function getTypeUrl - * @memberof pruntime_rpc.ParaHeadersToSync + * @memberof pruntime_rpc.Attestation * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ParaHeadersToSync.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Attestation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/pruntime_rpc.ParaHeadersToSync"; + return typeUrlPrefix + "/pruntime_rpc.Attestation"; }; - return ParaHeadersToSync; + return Attestation; })(); - pruntime_rpc.CombinedHeadersToSync = (function() { + pruntime_rpc.AttestationReport = (function() { /** - * Properties of a CombinedHeadersToSync. + * Properties of an AttestationReport. * @memberof pruntime_rpc - * @interface ICombinedHeadersToSync - * @property {Uint8Array|null} [encodedRelaychainHeaders] CombinedHeadersToSync encodedRelaychainHeaders - * @property {Uint8Array|null} [authoritySetChange] CombinedHeadersToSync authoritySetChange - * @property {Uint8Array|null} [encodedParachainHeaders] CombinedHeadersToSync encodedParachainHeaders - * @property {Array.|null} [proof] CombinedHeadersToSync proof + * @interface IAttestationReport + * @property {string|null} [report] AttestationReport report + * @property {Uint8Array|null} [signature] AttestationReport signature + * @property {Uint8Array|null} [signingCert] AttestationReport signingCert */ /** - * Constructs a new CombinedHeadersToSync. + * Constructs a new AttestationReport. * @memberof pruntime_rpc - * @classdesc Represents a CombinedHeadersToSync. - * @implements ICombinedHeadersToSync + * @classdesc Represents an AttestationReport. + * @implements IAttestationReport * @constructor - * @param {pruntime_rpc.ICombinedHeadersToSync=} [properties] Properties to set + * @param {pruntime_rpc.IAttestationReport=} [properties] Properties to set */ - function CombinedHeadersToSync(properties) { - this.proof = []; + function AttestationReport(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3991,134 +4236,103 @@ $root.pruntime_rpc = (function() { } /** - * CombinedHeadersToSync encodedRelaychainHeaders. - * @member {Uint8Array} encodedRelaychainHeaders - * @memberof pruntime_rpc.CombinedHeadersToSync - * @instance - */ - CombinedHeadersToSync.prototype.encodedRelaychainHeaders = $util.newBuffer([]); - - /** - * CombinedHeadersToSync authoritySetChange. - * @member {Uint8Array|null|undefined} authoritySetChange - * @memberof pruntime_rpc.CombinedHeadersToSync - * @instance - */ - CombinedHeadersToSync.prototype.authoritySetChange = null; - - /** - * CombinedHeadersToSync encodedParachainHeaders. - * @member {Uint8Array} encodedParachainHeaders - * @memberof pruntime_rpc.CombinedHeadersToSync + * AttestationReport report. + * @member {string} report + * @memberof pruntime_rpc.AttestationReport * @instance */ - CombinedHeadersToSync.prototype.encodedParachainHeaders = $util.newBuffer([]); + AttestationReport.prototype.report = ""; /** - * CombinedHeadersToSync proof. - * @member {Array.} proof - * @memberof pruntime_rpc.CombinedHeadersToSync + * AttestationReport signature. + * @member {Uint8Array} signature + * @memberof pruntime_rpc.AttestationReport * @instance */ - CombinedHeadersToSync.prototype.proof = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + AttestationReport.prototype.signature = $util.newBuffer([]); /** - * CombinedHeadersToSync _authoritySetChange. - * @member {"authoritySetChange"|undefined} _authoritySetChange - * @memberof pruntime_rpc.CombinedHeadersToSync + * AttestationReport signingCert. + * @member {Uint8Array} signingCert + * @memberof pruntime_rpc.AttestationReport * @instance */ - Object.defineProperty(CombinedHeadersToSync.prototype, "_authoritySetChange", { - get: $util.oneOfGetter($oneOfFields = ["authoritySetChange"]), - set: $util.oneOfSetter($oneOfFields) - }); + AttestationReport.prototype.signingCert = $util.newBuffer([]); /** - * Creates a new CombinedHeadersToSync instance using the specified properties. + * Creates a new AttestationReport instance using the specified properties. * @function create - * @memberof pruntime_rpc.CombinedHeadersToSync + * @memberof pruntime_rpc.AttestationReport * @static - * @param {pruntime_rpc.ICombinedHeadersToSync=} [properties] Properties to set - * @returns {pruntime_rpc.CombinedHeadersToSync} CombinedHeadersToSync instance + * @param {pruntime_rpc.IAttestationReport=} [properties] Properties to set + * @returns {pruntime_rpc.AttestationReport} AttestationReport instance */ - CombinedHeadersToSync.create = function create(properties) { - return new CombinedHeadersToSync(properties); + AttestationReport.create = function create(properties) { + return new AttestationReport(properties); }; /** - * Encodes the specified CombinedHeadersToSync message. Does not implicitly {@link pruntime_rpc.CombinedHeadersToSync.verify|verify} messages. + * Encodes the specified AttestationReport message. Does not implicitly {@link pruntime_rpc.AttestationReport.verify|verify} messages. * @function encode - * @memberof pruntime_rpc.CombinedHeadersToSync + * @memberof pruntime_rpc.AttestationReport * @static - * @param {pruntime_rpc.ICombinedHeadersToSync} message CombinedHeadersToSync message or plain object to encode + * @param {pruntime_rpc.IAttestationReport} message AttestationReport message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CombinedHeadersToSync.encode = function encode(message, writer) { + AttestationReport.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.encodedRelaychainHeaders != null && Object.hasOwnProperty.call(message, "encodedRelaychainHeaders")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.encodedRelaychainHeaders); - if (message.authoritySetChange != null && Object.hasOwnProperty.call(message, "authoritySetChange")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.authoritySetChange); - if (message.encodedParachainHeaders != null && Object.hasOwnProperty.call(message, "encodedParachainHeaders")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.encodedParachainHeaders); - if (message.proof != null && message.proof.length) - for (var i = 0; i < message.proof.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.proof[i]); + if (message.report != null && Object.hasOwnProperty.call(message, "report")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.report); + if (message.signature != null && Object.hasOwnProperty.call(message, "signature")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.signature); + if (message.signingCert != null && Object.hasOwnProperty.call(message, "signingCert")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.signingCert); return writer; }; /** - * Encodes the specified CombinedHeadersToSync message, length delimited. Does not implicitly {@link pruntime_rpc.CombinedHeadersToSync.verify|verify} messages. + * Encodes the specified AttestationReport message, length delimited. Does not implicitly {@link pruntime_rpc.AttestationReport.verify|verify} messages. * @function encodeDelimited - * @memberof pruntime_rpc.CombinedHeadersToSync + * @memberof pruntime_rpc.AttestationReport * @static - * @param {pruntime_rpc.ICombinedHeadersToSync} message CombinedHeadersToSync message or plain object to encode + * @param {pruntime_rpc.IAttestationReport} message AttestationReport message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CombinedHeadersToSync.encodeDelimited = function encodeDelimited(message, writer) { + AttestationReport.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CombinedHeadersToSync message from the specified reader or buffer. + * Decodes an AttestationReport message from the specified reader or buffer. * @function decode - * @memberof pruntime_rpc.CombinedHeadersToSync + * @memberof pruntime_rpc.AttestationReport * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {pruntime_rpc.CombinedHeadersToSync} CombinedHeadersToSync + * @returns {pruntime_rpc.AttestationReport} AttestationReport * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CombinedHeadersToSync.decode = function decode(reader, length) { + AttestationReport.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.CombinedHeadersToSync(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.AttestationReport(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.encodedRelaychainHeaders = reader.bytes(); + message.report = reader.string(); break; } case 2: { - message.authoritySetChange = reader.bytes(); + message.signature = reader.bytes(); break; } case 3: { - message.encodedParachainHeaders = reader.bytes(); - break; - } - case 4: { - if (!(message.proof && message.proof.length)) - message.proof = []; - message.proof.push(reader.bytes()); + message.signingCert = reader.bytes(); break; } default: @@ -4130,190 +4344,158 @@ $root.pruntime_rpc = (function() { }; /** - * Decodes a CombinedHeadersToSync message from the specified reader or buffer, length delimited. + * Decodes an AttestationReport message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof pruntime_rpc.CombinedHeadersToSync + * @memberof pruntime_rpc.AttestationReport * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.CombinedHeadersToSync} CombinedHeadersToSync + * @returns {pruntime_rpc.AttestationReport} AttestationReport * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CombinedHeadersToSync.decodeDelimited = function decodeDelimited(reader) { + AttestationReport.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CombinedHeadersToSync message. + * Verifies an AttestationReport message. * @function verify - * @memberof pruntime_rpc.CombinedHeadersToSync + * @memberof pruntime_rpc.AttestationReport * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CombinedHeadersToSync.verify = function verify(message) { + AttestationReport.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.encodedRelaychainHeaders != null && message.hasOwnProperty("encodedRelaychainHeaders")) - if (!(message.encodedRelaychainHeaders && typeof message.encodedRelaychainHeaders.length === "number" || $util.isString(message.encodedRelaychainHeaders))) - return "encodedRelaychainHeaders: buffer expected"; - if (message.authoritySetChange != null && message.hasOwnProperty("authoritySetChange")) { - properties._authoritySetChange = 1; - if (!(message.authoritySetChange && typeof message.authoritySetChange.length === "number" || $util.isString(message.authoritySetChange))) - return "authoritySetChange: buffer expected"; - } - if (message.encodedParachainHeaders != null && message.hasOwnProperty("encodedParachainHeaders")) - if (!(message.encodedParachainHeaders && typeof message.encodedParachainHeaders.length === "number" || $util.isString(message.encodedParachainHeaders))) - return "encodedParachainHeaders: buffer expected"; - if (message.proof != null && message.hasOwnProperty("proof")) { - if (!Array.isArray(message.proof)) - return "proof: array expected"; - for (var i = 0; i < message.proof.length; ++i) - if (!(message.proof[i] && typeof message.proof[i].length === "number" || $util.isString(message.proof[i]))) - return "proof: buffer[] expected"; - } + if (message.report != null && message.hasOwnProperty("report")) + if (!$util.isString(message.report)) + return "report: string expected"; + if (message.signature != null && message.hasOwnProperty("signature")) + if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature))) + return "signature: buffer expected"; + if (message.signingCert != null && message.hasOwnProperty("signingCert")) + if (!(message.signingCert && typeof message.signingCert.length === "number" || $util.isString(message.signingCert))) + return "signingCert: buffer expected"; return null; }; /** - * Creates a CombinedHeadersToSync message from a plain object. Also converts values to their respective internal types. + * Creates an AttestationReport message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof pruntime_rpc.CombinedHeadersToSync + * @memberof pruntime_rpc.AttestationReport * @static * @param {Object.} object Plain object - * @returns {pruntime_rpc.CombinedHeadersToSync} CombinedHeadersToSync + * @returns {pruntime_rpc.AttestationReport} AttestationReport */ - CombinedHeadersToSync.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.CombinedHeadersToSync) + AttestationReport.fromObject = function fromObject(object) { + if (object instanceof $root.pruntime_rpc.AttestationReport) return object; - var message = new $root.pruntime_rpc.CombinedHeadersToSync(); - if (object.encodedRelaychainHeaders != null) - if (typeof object.encodedRelaychainHeaders === "string") - $util.base64.decode(object.encodedRelaychainHeaders, message.encodedRelaychainHeaders = $util.newBuffer($util.base64.length(object.encodedRelaychainHeaders)), 0); - else if (object.encodedRelaychainHeaders.length >= 0) - message.encodedRelaychainHeaders = object.encodedRelaychainHeaders; - if (object.authoritySetChange != null) - if (typeof object.authoritySetChange === "string") - $util.base64.decode(object.authoritySetChange, message.authoritySetChange = $util.newBuffer($util.base64.length(object.authoritySetChange)), 0); - else if (object.authoritySetChange.length >= 0) - message.authoritySetChange = object.authoritySetChange; - if (object.encodedParachainHeaders != null) - if (typeof object.encodedParachainHeaders === "string") - $util.base64.decode(object.encodedParachainHeaders, message.encodedParachainHeaders = $util.newBuffer($util.base64.length(object.encodedParachainHeaders)), 0); - else if (object.encodedParachainHeaders.length >= 0) - message.encodedParachainHeaders = object.encodedParachainHeaders; - if (object.proof) { - if (!Array.isArray(object.proof)) - throw TypeError(".pruntime_rpc.CombinedHeadersToSync.proof: array expected"); - message.proof = []; - for (var i = 0; i < object.proof.length; ++i) - if (typeof object.proof[i] === "string") - $util.base64.decode(object.proof[i], message.proof[i] = $util.newBuffer($util.base64.length(object.proof[i])), 0); - else if (object.proof[i].length >= 0) - message.proof[i] = object.proof[i]; - } + var message = new $root.pruntime_rpc.AttestationReport(); + if (object.report != null) + message.report = String(object.report); + if (object.signature != null) + if (typeof object.signature === "string") + $util.base64.decode(object.signature, message.signature = $util.newBuffer($util.base64.length(object.signature)), 0); + else if (object.signature.length >= 0) + message.signature = object.signature; + if (object.signingCert != null) + if (typeof object.signingCert === "string") + $util.base64.decode(object.signingCert, message.signingCert = $util.newBuffer($util.base64.length(object.signingCert)), 0); + else if (object.signingCert.length >= 0) + message.signingCert = object.signingCert; return message; }; /** - * Creates a plain object from a CombinedHeadersToSync message. Also converts values to other types if specified. + * Creates a plain object from an AttestationReport message. Also converts values to other types if specified. * @function toObject - * @memberof pruntime_rpc.CombinedHeadersToSync + * @memberof pruntime_rpc.AttestationReport * @static - * @param {pruntime_rpc.CombinedHeadersToSync} message CombinedHeadersToSync + * @param {pruntime_rpc.AttestationReport} message AttestationReport * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CombinedHeadersToSync.toObject = function toObject(message, options) { + AttestationReport.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.proof = []; if (options.defaults) { + object.report = ""; if (options.bytes === String) - object.encodedRelaychainHeaders = ""; + object.signature = ""; else { - object.encodedRelaychainHeaders = []; + object.signature = []; if (options.bytes !== Array) - object.encodedRelaychainHeaders = $util.newBuffer(object.encodedRelaychainHeaders); + object.signature = $util.newBuffer(object.signature); } if (options.bytes === String) - object.encodedParachainHeaders = ""; + object.signingCert = ""; else { - object.encodedParachainHeaders = []; + object.signingCert = []; if (options.bytes !== Array) - object.encodedParachainHeaders = $util.newBuffer(object.encodedParachainHeaders); + object.signingCert = $util.newBuffer(object.signingCert); } } - if (message.encodedRelaychainHeaders != null && message.hasOwnProperty("encodedRelaychainHeaders")) - object.encodedRelaychainHeaders = options.bytes === String ? $util.base64.encode(message.encodedRelaychainHeaders, 0, message.encodedRelaychainHeaders.length) : options.bytes === Array ? Array.prototype.slice.call(message.encodedRelaychainHeaders) : message.encodedRelaychainHeaders; - if (message.authoritySetChange != null && message.hasOwnProperty("authoritySetChange")) { - object.authoritySetChange = options.bytes === String ? $util.base64.encode(message.authoritySetChange, 0, message.authoritySetChange.length) : options.bytes === Array ? Array.prototype.slice.call(message.authoritySetChange) : message.authoritySetChange; - if (options.oneofs) - object._authoritySetChange = "authoritySetChange"; - } - if (message.encodedParachainHeaders != null && message.hasOwnProperty("encodedParachainHeaders")) - object.encodedParachainHeaders = options.bytes === String ? $util.base64.encode(message.encodedParachainHeaders, 0, message.encodedParachainHeaders.length) : options.bytes === Array ? Array.prototype.slice.call(message.encodedParachainHeaders) : message.encodedParachainHeaders; - if (message.proof && message.proof.length) { - object.proof = []; - for (var j = 0; j < message.proof.length; ++j) - object.proof[j] = options.bytes === String ? $util.base64.encode(message.proof[j], 0, message.proof[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.proof[j]) : message.proof[j]; - } + if (message.report != null && message.hasOwnProperty("report")) + object.report = message.report; + if (message.signature != null && message.hasOwnProperty("signature")) + object.signature = options.bytes === String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature) : message.signature; + if (message.signingCert != null && message.hasOwnProperty("signingCert")) + object.signingCert = options.bytes === String ? $util.base64.encode(message.signingCert, 0, message.signingCert.length) : options.bytes === Array ? Array.prototype.slice.call(message.signingCert) : message.signingCert; return object; }; /** - * Converts this CombinedHeadersToSync to JSON. + * Converts this AttestationReport to JSON. * @function toJSON - * @memberof pruntime_rpc.CombinedHeadersToSync + * @memberof pruntime_rpc.AttestationReport * @instance * @returns {Object.} JSON object */ - CombinedHeadersToSync.prototype.toJSON = function toJSON() { + AttestationReport.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CombinedHeadersToSync + * Gets the default type url for AttestationReport * @function getTypeUrl - * @memberof pruntime_rpc.CombinedHeadersToSync + * @memberof pruntime_rpc.AttestationReport * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CombinedHeadersToSync.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AttestationReport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/pruntime_rpc.CombinedHeadersToSync"; + return typeUrlPrefix + "/pruntime_rpc.AttestationReport"; }; - return CombinedHeadersToSync; + return AttestationReport; })(); - pruntime_rpc.HeadersSyncedTo = (function() { + pruntime_rpc.ContractQueryRequest = (function() { /** - * Properties of a HeadersSyncedTo. + * Properties of a ContractQueryRequest. * @memberof pruntime_rpc - * @interface IHeadersSyncedTo - * @property {number|null} [relaychainSyncedTo] HeadersSyncedTo relaychainSyncedTo - * @property {number|null} [parachainSyncedTo] HeadersSyncedTo parachainSyncedTo + * @interface IContractQueryRequest + * @property {Uint8Array|null} [encodedEncryptedData] ContractQueryRequest encodedEncryptedData + * @property {pruntime_rpc.ISignature|null} [signature] ContractQueryRequest signature */ /** - * Constructs a new HeadersSyncedTo. + * Constructs a new ContractQueryRequest. * @memberof pruntime_rpc - * @classdesc Represents a HeadersSyncedTo. - * @implements IHeadersSyncedTo + * @classdesc Represents a ContractQueryRequest. + * @implements IContractQueryRequest * @constructor - * @param {pruntime_rpc.IHeadersSyncedTo=} [properties] Properties to set + * @param {pruntime_rpc.IContractQueryRequest=} [properties] Properties to set */ - function HeadersSyncedTo(properties) { + function ContractQueryRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4321,89 +4503,89 @@ $root.pruntime_rpc = (function() { } /** - * HeadersSyncedTo relaychainSyncedTo. - * @member {number} relaychainSyncedTo - * @memberof pruntime_rpc.HeadersSyncedTo + * ContractQueryRequest encodedEncryptedData. + * @member {Uint8Array} encodedEncryptedData + * @memberof pruntime_rpc.ContractQueryRequest * @instance */ - HeadersSyncedTo.prototype.relaychainSyncedTo = 0; + ContractQueryRequest.prototype.encodedEncryptedData = $util.newBuffer([]); /** - * HeadersSyncedTo parachainSyncedTo. - * @member {number} parachainSyncedTo - * @memberof pruntime_rpc.HeadersSyncedTo + * ContractQueryRequest signature. + * @member {pruntime_rpc.ISignature|null|undefined} signature + * @memberof pruntime_rpc.ContractQueryRequest * @instance */ - HeadersSyncedTo.prototype.parachainSyncedTo = 0; + ContractQueryRequest.prototype.signature = null; /** - * Creates a new HeadersSyncedTo instance using the specified properties. + * Creates a new ContractQueryRequest instance using the specified properties. * @function create - * @memberof pruntime_rpc.HeadersSyncedTo + * @memberof pruntime_rpc.ContractQueryRequest * @static - * @param {pruntime_rpc.IHeadersSyncedTo=} [properties] Properties to set - * @returns {pruntime_rpc.HeadersSyncedTo} HeadersSyncedTo instance + * @param {pruntime_rpc.IContractQueryRequest=} [properties] Properties to set + * @returns {pruntime_rpc.ContractQueryRequest} ContractQueryRequest instance */ - HeadersSyncedTo.create = function create(properties) { - return new HeadersSyncedTo(properties); + ContractQueryRequest.create = function create(properties) { + return new ContractQueryRequest(properties); }; /** - * Encodes the specified HeadersSyncedTo message. Does not implicitly {@link pruntime_rpc.HeadersSyncedTo.verify|verify} messages. + * Encodes the specified ContractQueryRequest message. Does not implicitly {@link pruntime_rpc.ContractQueryRequest.verify|verify} messages. * @function encode - * @memberof pruntime_rpc.HeadersSyncedTo + * @memberof pruntime_rpc.ContractQueryRequest * @static - * @param {pruntime_rpc.IHeadersSyncedTo} message HeadersSyncedTo message or plain object to encode + * @param {pruntime_rpc.IContractQueryRequest} message ContractQueryRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HeadersSyncedTo.encode = function encode(message, writer) { + ContractQueryRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.relaychainSyncedTo != null && Object.hasOwnProperty.call(message, "relaychainSyncedTo")) - writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.relaychainSyncedTo); - if (message.parachainSyncedTo != null && Object.hasOwnProperty.call(message, "parachainSyncedTo")) - writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.parachainSyncedTo); + if (message.encodedEncryptedData != null && Object.hasOwnProperty.call(message, "encodedEncryptedData")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.encodedEncryptedData); + if (message.signature != null && Object.hasOwnProperty.call(message, "signature")) + $root.pruntime_rpc.Signature.encode(message.signature, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified HeadersSyncedTo message, length delimited. Does not implicitly {@link pruntime_rpc.HeadersSyncedTo.verify|verify} messages. + * Encodes the specified ContractQueryRequest message, length delimited. Does not implicitly {@link pruntime_rpc.ContractQueryRequest.verify|verify} messages. * @function encodeDelimited - * @memberof pruntime_rpc.HeadersSyncedTo + * @memberof pruntime_rpc.ContractQueryRequest * @static - * @param {pruntime_rpc.IHeadersSyncedTo} message HeadersSyncedTo message or plain object to encode + * @param {pruntime_rpc.IContractQueryRequest} message ContractQueryRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HeadersSyncedTo.encodeDelimited = function encodeDelimited(message, writer) { + ContractQueryRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a HeadersSyncedTo message from the specified reader or buffer. + * Decodes a ContractQueryRequest message from the specified reader or buffer. * @function decode - * @memberof pruntime_rpc.HeadersSyncedTo + * @memberof pruntime_rpc.ContractQueryRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {pruntime_rpc.HeadersSyncedTo} HeadersSyncedTo + * @returns {pruntime_rpc.ContractQueryRequest} ContractQueryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HeadersSyncedTo.decode = function decode(reader, length) { + ContractQueryRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.HeadersSyncedTo(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.ContractQueryRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.relaychainSyncedTo = reader.uint32(); + message.encodedEncryptedData = reader.bytes(); break; } case 2: { - message.parachainSyncedTo = reader.uint32(); + message.signature = $root.pruntime_rpc.Signature.decode(reader, reader.uint32()); break; } default: @@ -4415,131 +4597,147 @@ $root.pruntime_rpc = (function() { }; /** - * Decodes a HeadersSyncedTo message from the specified reader or buffer, length delimited. + * Decodes a ContractQueryRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof pruntime_rpc.HeadersSyncedTo + * @memberof pruntime_rpc.ContractQueryRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.HeadersSyncedTo} HeadersSyncedTo + * @returns {pruntime_rpc.ContractQueryRequest} ContractQueryRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HeadersSyncedTo.decodeDelimited = function decodeDelimited(reader) { + ContractQueryRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a HeadersSyncedTo message. + * Verifies a ContractQueryRequest message. * @function verify - * @memberof pruntime_rpc.HeadersSyncedTo + * @memberof pruntime_rpc.ContractQueryRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - HeadersSyncedTo.verify = function verify(message) { + ContractQueryRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.relaychainSyncedTo != null && message.hasOwnProperty("relaychainSyncedTo")) - if (!$util.isInteger(message.relaychainSyncedTo)) - return "relaychainSyncedTo: integer expected"; - if (message.parachainSyncedTo != null && message.hasOwnProperty("parachainSyncedTo")) - if (!$util.isInteger(message.parachainSyncedTo)) - return "parachainSyncedTo: integer expected"; + if (message.encodedEncryptedData != null && message.hasOwnProperty("encodedEncryptedData")) + if (!(message.encodedEncryptedData && typeof message.encodedEncryptedData.length === "number" || $util.isString(message.encodedEncryptedData))) + return "encodedEncryptedData: buffer expected"; + if (message.signature != null && message.hasOwnProperty("signature")) { + var error = $root.pruntime_rpc.Signature.verify(message.signature); + if (error) + return "signature." + error; + } return null; }; /** - * Creates a HeadersSyncedTo message from a plain object. Also converts values to their respective internal types. + * Creates a ContractQueryRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof pruntime_rpc.HeadersSyncedTo + * @memberof pruntime_rpc.ContractQueryRequest * @static * @param {Object.} object Plain object - * @returns {pruntime_rpc.HeadersSyncedTo} HeadersSyncedTo + * @returns {pruntime_rpc.ContractQueryRequest} ContractQueryRequest */ - HeadersSyncedTo.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.HeadersSyncedTo) + ContractQueryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.pruntime_rpc.ContractQueryRequest) return object; - var message = new $root.pruntime_rpc.HeadersSyncedTo(); - if (object.relaychainSyncedTo != null) - message.relaychainSyncedTo = object.relaychainSyncedTo >>> 0; - if (object.parachainSyncedTo != null) - message.parachainSyncedTo = object.parachainSyncedTo >>> 0; + var message = new $root.pruntime_rpc.ContractQueryRequest(); + if (object.encodedEncryptedData != null) + if (typeof object.encodedEncryptedData === "string") + $util.base64.decode(object.encodedEncryptedData, message.encodedEncryptedData = $util.newBuffer($util.base64.length(object.encodedEncryptedData)), 0); + else if (object.encodedEncryptedData.length >= 0) + message.encodedEncryptedData = object.encodedEncryptedData; + if (object.signature != null) { + if (typeof object.signature !== "object") + throw TypeError(".pruntime_rpc.ContractQueryRequest.signature: object expected"); + message.signature = $root.pruntime_rpc.Signature.fromObject(object.signature); + } return message; }; /** - * Creates a plain object from a HeadersSyncedTo message. Also converts values to other types if specified. + * Creates a plain object from a ContractQueryRequest message. Also converts values to other types if specified. * @function toObject - * @memberof pruntime_rpc.HeadersSyncedTo + * @memberof pruntime_rpc.ContractQueryRequest * @static - * @param {pruntime_rpc.HeadersSyncedTo} message HeadersSyncedTo + * @param {pruntime_rpc.ContractQueryRequest} message ContractQueryRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - HeadersSyncedTo.toObject = function toObject(message, options) { + ContractQueryRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.relaychainSyncedTo = 0; - object.parachainSyncedTo = 0; + if (options.bytes === String) + object.encodedEncryptedData = ""; + else { + object.encodedEncryptedData = []; + if (options.bytes !== Array) + object.encodedEncryptedData = $util.newBuffer(object.encodedEncryptedData); + } + object.signature = null; } - if (message.relaychainSyncedTo != null && message.hasOwnProperty("relaychainSyncedTo")) - object.relaychainSyncedTo = message.relaychainSyncedTo; - if (message.parachainSyncedTo != null && message.hasOwnProperty("parachainSyncedTo")) - object.parachainSyncedTo = message.parachainSyncedTo; + if (message.encodedEncryptedData != null && message.hasOwnProperty("encodedEncryptedData")) + object.encodedEncryptedData = options.bytes === String ? $util.base64.encode(message.encodedEncryptedData, 0, message.encodedEncryptedData.length) : options.bytes === Array ? Array.prototype.slice.call(message.encodedEncryptedData) : message.encodedEncryptedData; + if (message.signature != null && message.hasOwnProperty("signature")) + object.signature = $root.pruntime_rpc.Signature.toObject(message.signature, options); return object; }; /** - * Converts this HeadersSyncedTo to JSON. + * Converts this ContractQueryRequest to JSON. * @function toJSON - * @memberof pruntime_rpc.HeadersSyncedTo + * @memberof pruntime_rpc.ContractQueryRequest * @instance * @returns {Object.} JSON object */ - HeadersSyncedTo.prototype.toJSON = function toJSON() { + ContractQueryRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for HeadersSyncedTo + * Gets the default type url for ContractQueryRequest * @function getTypeUrl - * @memberof pruntime_rpc.HeadersSyncedTo + * @memberof pruntime_rpc.ContractQueryRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - HeadersSyncedTo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ContractQueryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/pruntime_rpc.HeadersSyncedTo"; + return typeUrlPrefix + "/pruntime_rpc.ContractQueryRequest"; }; - return HeadersSyncedTo; + return ContractQueryRequest; })(); - pruntime_rpc.Blocks = (function() { + pruntime_rpc.Signature = (function() { /** - * Properties of a Blocks. + * Properties of a Signature. * @memberof pruntime_rpc - * @interface IBlocks - * @property {Uint8Array|null} [encodedBlocks] Blocks encodedBlocks + * @interface ISignature + * @property {pruntime_rpc.ICertificate|null} [signedBy] Signature signedBy + * @property {pruntime_rpc.SignatureType|null} [signatureType] Signature signatureType + * @property {Uint8Array|null} [signature] Signature signature */ /** - * Constructs a new Blocks. + * Constructs a new Signature. * @memberof pruntime_rpc - * @classdesc Represents a Blocks. - * @implements IBlocks + * @classdesc Represents a Signature. + * @implements ISignature * @constructor - * @param {pruntime_rpc.IBlocks=} [properties] Properties to set + * @param {pruntime_rpc.ISignature=} [properties] Properties to set */ - function Blocks(properties) { + function Signature(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4547,10594 +4745,103 @@ $root.pruntime_rpc = (function() { } /** - * Blocks encodedBlocks. - * @member {Uint8Array} encodedBlocks - * @memberof pruntime_rpc.Blocks + * Signature signedBy. + * @member {pruntime_rpc.ICertificate|null|undefined} signedBy + * @memberof pruntime_rpc.Signature * @instance */ - Blocks.prototype.encodedBlocks = $util.newBuffer([]); + Signature.prototype.signedBy = null; /** - * Creates a new Blocks instance using the specified properties. - * @function create - * @memberof pruntime_rpc.Blocks - * @static - * @param {pruntime_rpc.IBlocks=} [properties] Properties to set - * @returns {pruntime_rpc.Blocks} Blocks instance + * Signature signatureType. + * @member {pruntime_rpc.SignatureType} signatureType + * @memberof pruntime_rpc.Signature + * @instance */ - Blocks.create = function create(properties) { - return new Blocks(properties); - }; + Signature.prototype.signatureType = 0; /** - * Encodes the specified Blocks message. Does not implicitly {@link pruntime_rpc.Blocks.verify|verify} messages. - * @function encode - * @memberof pruntime_rpc.Blocks - * @static - * @param {pruntime_rpc.IBlocks} message Blocks message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Blocks.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.encodedBlocks != null && Object.hasOwnProperty.call(message, "encodedBlocks")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.encodedBlocks); - return writer; - }; - - /** - * Encodes the specified Blocks message, length delimited. Does not implicitly {@link pruntime_rpc.Blocks.verify|verify} messages. - * @function encodeDelimited - * @memberof pruntime_rpc.Blocks - * @static - * @param {pruntime_rpc.IBlocks} message Blocks message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Blocks.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Blocks message from the specified reader or buffer. - * @function decode - * @memberof pruntime_rpc.Blocks - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pruntime_rpc.Blocks} Blocks - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Blocks.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.Blocks(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.encodedBlocks = reader.bytes(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Blocks message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pruntime_rpc.Blocks - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.Blocks} Blocks - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Blocks.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Blocks message. - * @function verify - * @memberof pruntime_rpc.Blocks - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Blocks.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.encodedBlocks != null && message.hasOwnProperty("encodedBlocks")) - if (!(message.encodedBlocks && typeof message.encodedBlocks.length === "number" || $util.isString(message.encodedBlocks))) - return "encodedBlocks: buffer expected"; - return null; - }; - - /** - * Creates a Blocks message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pruntime_rpc.Blocks - * @static - * @param {Object.} object Plain object - * @returns {pruntime_rpc.Blocks} Blocks - */ - Blocks.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.Blocks) - return object; - var message = new $root.pruntime_rpc.Blocks(); - if (object.encodedBlocks != null) - if (typeof object.encodedBlocks === "string") - $util.base64.decode(object.encodedBlocks, message.encodedBlocks = $util.newBuffer($util.base64.length(object.encodedBlocks)), 0); - else if (object.encodedBlocks.length >= 0) - message.encodedBlocks = object.encodedBlocks; - return message; - }; - - /** - * Creates a plain object from a Blocks message. Also converts values to other types if specified. - * @function toObject - * @memberof pruntime_rpc.Blocks - * @static - * @param {pruntime_rpc.Blocks} message Blocks - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Blocks.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - if (options.bytes === String) - object.encodedBlocks = ""; - else { - object.encodedBlocks = []; - if (options.bytes !== Array) - object.encodedBlocks = $util.newBuffer(object.encodedBlocks); - } - if (message.encodedBlocks != null && message.hasOwnProperty("encodedBlocks")) - object.encodedBlocks = options.bytes === String ? $util.base64.encode(message.encodedBlocks, 0, message.encodedBlocks.length) : options.bytes === Array ? Array.prototype.slice.call(message.encodedBlocks) : message.encodedBlocks; - return object; - }; - - /** - * Converts this Blocks to JSON. - * @function toJSON - * @memberof pruntime_rpc.Blocks - * @instance - * @returns {Object.} JSON object - */ - Blocks.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Blocks - * @function getTypeUrl - * @memberof pruntime_rpc.Blocks - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Blocks.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pruntime_rpc.Blocks"; - }; - - return Blocks; - })(); - - pruntime_rpc.InitRuntimeRequest = (function() { - - /** - * Properties of an InitRuntimeRequest. - * @memberof pruntime_rpc - * @interface IInitRuntimeRequest - * @property {boolean|null} [skipRa] InitRuntimeRequest skipRa - * @property {Uint8Array|null} [encodedGenesisInfo] InitRuntimeRequest encodedGenesisInfo - * @property {Uint8Array|null} [debugSetKey] InitRuntimeRequest debugSetKey - * @property {Uint8Array|null} [encodedGenesisState] InitRuntimeRequest encodedGenesisState - * @property {Uint8Array|null} [encodedOperator] InitRuntimeRequest encodedOperator - * @property {boolean|null} [isParachain] InitRuntimeRequest isParachain - * @property {Uint8Array|null} [attestationProvider] InitRuntimeRequest attestationProvider - */ - - /** - * Constructs a new InitRuntimeRequest. - * @memberof pruntime_rpc - * @classdesc Represents an InitRuntimeRequest. - * @implements IInitRuntimeRequest - * @constructor - * @param {pruntime_rpc.IInitRuntimeRequest=} [properties] Properties to set - */ - function InitRuntimeRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * InitRuntimeRequest skipRa. - * @member {boolean} skipRa - * @memberof pruntime_rpc.InitRuntimeRequest - * @instance - */ - InitRuntimeRequest.prototype.skipRa = false; - - /** - * InitRuntimeRequest encodedGenesisInfo. - * @member {Uint8Array} encodedGenesisInfo - * @memberof pruntime_rpc.InitRuntimeRequest - * @instance - */ - InitRuntimeRequest.prototype.encodedGenesisInfo = $util.newBuffer([]); - - /** - * InitRuntimeRequest debugSetKey. - * @member {Uint8Array|null|undefined} debugSetKey - * @memberof pruntime_rpc.InitRuntimeRequest - * @instance - */ - InitRuntimeRequest.prototype.debugSetKey = null; - - /** - * InitRuntimeRequest encodedGenesisState. - * @member {Uint8Array} encodedGenesisState - * @memberof pruntime_rpc.InitRuntimeRequest - * @instance - */ - InitRuntimeRequest.prototype.encodedGenesisState = $util.newBuffer([]); - - /** - * InitRuntimeRequest encodedOperator. - * @member {Uint8Array|null|undefined} encodedOperator - * @memberof pruntime_rpc.InitRuntimeRequest - * @instance - */ - InitRuntimeRequest.prototype.encodedOperator = null; - - /** - * InitRuntimeRequest isParachain. - * @member {boolean} isParachain - * @memberof pruntime_rpc.InitRuntimeRequest - * @instance - */ - InitRuntimeRequest.prototype.isParachain = false; - - /** - * InitRuntimeRequest attestationProvider. - * @member {Uint8Array|null|undefined} attestationProvider - * @memberof pruntime_rpc.InitRuntimeRequest - * @instance - */ - InitRuntimeRequest.prototype.attestationProvider = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * InitRuntimeRequest _debugSetKey. - * @member {"debugSetKey"|undefined} _debugSetKey - * @memberof pruntime_rpc.InitRuntimeRequest - * @instance - */ - Object.defineProperty(InitRuntimeRequest.prototype, "_debugSetKey", { - get: $util.oneOfGetter($oneOfFields = ["debugSetKey"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * InitRuntimeRequest _encodedOperator. - * @member {"encodedOperator"|undefined} _encodedOperator - * @memberof pruntime_rpc.InitRuntimeRequest - * @instance - */ - Object.defineProperty(InitRuntimeRequest.prototype, "_encodedOperator", { - get: $util.oneOfGetter($oneOfFields = ["encodedOperator"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * InitRuntimeRequest _attestationProvider. - * @member {"attestationProvider"|undefined} _attestationProvider - * @memberof pruntime_rpc.InitRuntimeRequest - * @instance - */ - Object.defineProperty(InitRuntimeRequest.prototype, "_attestationProvider", { - get: $util.oneOfGetter($oneOfFields = ["attestationProvider"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new InitRuntimeRequest instance using the specified properties. - * @function create - * @memberof pruntime_rpc.InitRuntimeRequest - * @static - * @param {pruntime_rpc.IInitRuntimeRequest=} [properties] Properties to set - * @returns {pruntime_rpc.InitRuntimeRequest} InitRuntimeRequest instance - */ - InitRuntimeRequest.create = function create(properties) { - return new InitRuntimeRequest(properties); - }; - - /** - * Encodes the specified InitRuntimeRequest message. Does not implicitly {@link pruntime_rpc.InitRuntimeRequest.verify|verify} messages. - * @function encode - * @memberof pruntime_rpc.InitRuntimeRequest - * @static - * @param {pruntime_rpc.IInitRuntimeRequest} message InitRuntimeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InitRuntimeRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.skipRa != null && Object.hasOwnProperty.call(message, "skipRa")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.skipRa); - if (message.encodedGenesisInfo != null && Object.hasOwnProperty.call(message, "encodedGenesisInfo")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.encodedGenesisInfo); - if (message.debugSetKey != null && Object.hasOwnProperty.call(message, "debugSetKey")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.debugSetKey); - if (message.encodedGenesisState != null && Object.hasOwnProperty.call(message, "encodedGenesisState")) - writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.encodedGenesisState); - if (message.encodedOperator != null && Object.hasOwnProperty.call(message, "encodedOperator")) - writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.encodedOperator); - if (message.isParachain != null && Object.hasOwnProperty.call(message, "isParachain")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.isParachain); - if (message.attestationProvider != null && Object.hasOwnProperty.call(message, "attestationProvider")) - writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.attestationProvider); - return writer; - }; - - /** - * Encodes the specified InitRuntimeRequest message, length delimited. Does not implicitly {@link pruntime_rpc.InitRuntimeRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof pruntime_rpc.InitRuntimeRequest - * @static - * @param {pruntime_rpc.IInitRuntimeRequest} message InitRuntimeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InitRuntimeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an InitRuntimeRequest message from the specified reader or buffer. - * @function decode - * @memberof pruntime_rpc.InitRuntimeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pruntime_rpc.InitRuntimeRequest} InitRuntimeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InitRuntimeRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.InitRuntimeRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.skipRa = reader.bool(); - break; - } - case 2: { - message.encodedGenesisInfo = reader.bytes(); - break; - } - case 3: { - message.debugSetKey = reader.bytes(); - break; - } - case 4: { - message.encodedGenesisState = reader.bytes(); - break; - } - case 5: { - message.encodedOperator = reader.bytes(); - break; - } - case 6: { - message.isParachain = reader.bool(); - break; - } - case 7: { - message.attestationProvider = reader.bytes(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an InitRuntimeRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pruntime_rpc.InitRuntimeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.InitRuntimeRequest} InitRuntimeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InitRuntimeRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an InitRuntimeRequest message. - * @function verify - * @memberof pruntime_rpc.InitRuntimeRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InitRuntimeRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.skipRa != null && message.hasOwnProperty("skipRa")) - if (typeof message.skipRa !== "boolean") - return "skipRa: boolean expected"; - if (message.encodedGenesisInfo != null && message.hasOwnProperty("encodedGenesisInfo")) - if (!(message.encodedGenesisInfo && typeof message.encodedGenesisInfo.length === "number" || $util.isString(message.encodedGenesisInfo))) - return "encodedGenesisInfo: buffer expected"; - if (message.debugSetKey != null && message.hasOwnProperty("debugSetKey")) { - properties._debugSetKey = 1; - if (!(message.debugSetKey && typeof message.debugSetKey.length === "number" || $util.isString(message.debugSetKey))) - return "debugSetKey: buffer expected"; - } - if (message.encodedGenesisState != null && message.hasOwnProperty("encodedGenesisState")) - if (!(message.encodedGenesisState && typeof message.encodedGenesisState.length === "number" || $util.isString(message.encodedGenesisState))) - return "encodedGenesisState: buffer expected"; - if (message.encodedOperator != null && message.hasOwnProperty("encodedOperator")) { - properties._encodedOperator = 1; - if (!(message.encodedOperator && typeof message.encodedOperator.length === "number" || $util.isString(message.encodedOperator))) - return "encodedOperator: buffer expected"; - } - if (message.isParachain != null && message.hasOwnProperty("isParachain")) - if (typeof message.isParachain !== "boolean") - return "isParachain: boolean expected"; - if (message.attestationProvider != null && message.hasOwnProperty("attestationProvider")) { - properties._attestationProvider = 1; - if (!(message.attestationProvider && typeof message.attestationProvider.length === "number" || $util.isString(message.attestationProvider))) - return "attestationProvider: buffer expected"; - } - return null; - }; - - /** - * Creates an InitRuntimeRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pruntime_rpc.InitRuntimeRequest - * @static - * @param {Object.} object Plain object - * @returns {pruntime_rpc.InitRuntimeRequest} InitRuntimeRequest - */ - InitRuntimeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.InitRuntimeRequest) - return object; - var message = new $root.pruntime_rpc.InitRuntimeRequest(); - if (object.skipRa != null) - message.skipRa = Boolean(object.skipRa); - if (object.encodedGenesisInfo != null) - if (typeof object.encodedGenesisInfo === "string") - $util.base64.decode(object.encodedGenesisInfo, message.encodedGenesisInfo = $util.newBuffer($util.base64.length(object.encodedGenesisInfo)), 0); - else if (object.encodedGenesisInfo.length >= 0) - message.encodedGenesisInfo = object.encodedGenesisInfo; - if (object.debugSetKey != null) - if (typeof object.debugSetKey === "string") - $util.base64.decode(object.debugSetKey, message.debugSetKey = $util.newBuffer($util.base64.length(object.debugSetKey)), 0); - else if (object.debugSetKey.length >= 0) - message.debugSetKey = object.debugSetKey; - if (object.encodedGenesisState != null) - if (typeof object.encodedGenesisState === "string") - $util.base64.decode(object.encodedGenesisState, message.encodedGenesisState = $util.newBuffer($util.base64.length(object.encodedGenesisState)), 0); - else if (object.encodedGenesisState.length >= 0) - message.encodedGenesisState = object.encodedGenesisState; - if (object.encodedOperator != null) - if (typeof object.encodedOperator === "string") - $util.base64.decode(object.encodedOperator, message.encodedOperator = $util.newBuffer($util.base64.length(object.encodedOperator)), 0); - else if (object.encodedOperator.length >= 0) - message.encodedOperator = object.encodedOperator; - if (object.isParachain != null) - message.isParachain = Boolean(object.isParachain); - if (object.attestationProvider != null) - if (typeof object.attestationProvider === "string") - $util.base64.decode(object.attestationProvider, message.attestationProvider = $util.newBuffer($util.base64.length(object.attestationProvider)), 0); - else if (object.attestationProvider.length >= 0) - message.attestationProvider = object.attestationProvider; - return message; - }; - - /** - * Creates a plain object from an InitRuntimeRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof pruntime_rpc.InitRuntimeRequest - * @static - * @param {pruntime_rpc.InitRuntimeRequest} message InitRuntimeRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InitRuntimeRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.skipRa = false; - if (options.bytes === String) - object.encodedGenesisInfo = ""; - else { - object.encodedGenesisInfo = []; - if (options.bytes !== Array) - object.encodedGenesisInfo = $util.newBuffer(object.encodedGenesisInfo); - } - if (options.bytes === String) - object.encodedGenesisState = ""; - else { - object.encodedGenesisState = []; - if (options.bytes !== Array) - object.encodedGenesisState = $util.newBuffer(object.encodedGenesisState); - } - object.isParachain = false; - } - if (message.skipRa != null && message.hasOwnProperty("skipRa")) - object.skipRa = message.skipRa; - if (message.encodedGenesisInfo != null && message.hasOwnProperty("encodedGenesisInfo")) - object.encodedGenesisInfo = options.bytes === String ? $util.base64.encode(message.encodedGenesisInfo, 0, message.encodedGenesisInfo.length) : options.bytes === Array ? Array.prototype.slice.call(message.encodedGenesisInfo) : message.encodedGenesisInfo; - if (message.debugSetKey != null && message.hasOwnProperty("debugSetKey")) { - object.debugSetKey = options.bytes === String ? $util.base64.encode(message.debugSetKey, 0, message.debugSetKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.debugSetKey) : message.debugSetKey; - if (options.oneofs) - object._debugSetKey = "debugSetKey"; - } - if (message.encodedGenesisState != null && message.hasOwnProperty("encodedGenesisState")) - object.encodedGenesisState = options.bytes === String ? $util.base64.encode(message.encodedGenesisState, 0, message.encodedGenesisState.length) : options.bytes === Array ? Array.prototype.slice.call(message.encodedGenesisState) : message.encodedGenesisState; - if (message.encodedOperator != null && message.hasOwnProperty("encodedOperator")) { - object.encodedOperator = options.bytes === String ? $util.base64.encode(message.encodedOperator, 0, message.encodedOperator.length) : options.bytes === Array ? Array.prototype.slice.call(message.encodedOperator) : message.encodedOperator; - if (options.oneofs) - object._encodedOperator = "encodedOperator"; - } - if (message.isParachain != null && message.hasOwnProperty("isParachain")) - object.isParachain = message.isParachain; - if (message.attestationProvider != null && message.hasOwnProperty("attestationProvider")) { - object.attestationProvider = options.bytes === String ? $util.base64.encode(message.attestationProvider, 0, message.attestationProvider.length) : options.bytes === Array ? Array.prototype.slice.call(message.attestationProvider) : message.attestationProvider; - if (options.oneofs) - object._attestationProvider = "attestationProvider"; - } - return object; - }; - - /** - * Converts this InitRuntimeRequest to JSON. - * @function toJSON - * @memberof pruntime_rpc.InitRuntimeRequest - * @instance - * @returns {Object.} JSON object - */ - InitRuntimeRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for InitRuntimeRequest - * @function getTypeUrl - * @memberof pruntime_rpc.InitRuntimeRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - InitRuntimeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pruntime_rpc.InitRuntimeRequest"; - }; - - return InitRuntimeRequest; - })(); - - pruntime_rpc.GetRuntimeInfoRequest = (function() { - - /** - * Properties of a GetRuntimeInfoRequest. - * @memberof pruntime_rpc - * @interface IGetRuntimeInfoRequest - * @property {boolean|null} [forceRefreshRa] GetRuntimeInfoRequest forceRefreshRa - * @property {Uint8Array|null} [encodedOperator] GetRuntimeInfoRequest encodedOperator - */ - - /** - * Constructs a new GetRuntimeInfoRequest. - * @memberof pruntime_rpc - * @classdesc Represents a GetRuntimeInfoRequest. - * @implements IGetRuntimeInfoRequest - * @constructor - * @param {pruntime_rpc.IGetRuntimeInfoRequest=} [properties] Properties to set - */ - function GetRuntimeInfoRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetRuntimeInfoRequest forceRefreshRa. - * @member {boolean} forceRefreshRa - * @memberof pruntime_rpc.GetRuntimeInfoRequest - * @instance - */ - GetRuntimeInfoRequest.prototype.forceRefreshRa = false; - - /** - * GetRuntimeInfoRequest encodedOperator. - * @member {Uint8Array|null|undefined} encodedOperator - * @memberof pruntime_rpc.GetRuntimeInfoRequest - * @instance - */ - GetRuntimeInfoRequest.prototype.encodedOperator = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * GetRuntimeInfoRequest _encodedOperator. - * @member {"encodedOperator"|undefined} _encodedOperator - * @memberof pruntime_rpc.GetRuntimeInfoRequest - * @instance - */ - Object.defineProperty(GetRuntimeInfoRequest.prototype, "_encodedOperator", { - get: $util.oneOfGetter($oneOfFields = ["encodedOperator"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new GetRuntimeInfoRequest instance using the specified properties. - * @function create - * @memberof pruntime_rpc.GetRuntimeInfoRequest - * @static - * @param {pruntime_rpc.IGetRuntimeInfoRequest=} [properties] Properties to set - * @returns {pruntime_rpc.GetRuntimeInfoRequest} GetRuntimeInfoRequest instance - */ - GetRuntimeInfoRequest.create = function create(properties) { - return new GetRuntimeInfoRequest(properties); - }; - - /** - * Encodes the specified GetRuntimeInfoRequest message. Does not implicitly {@link pruntime_rpc.GetRuntimeInfoRequest.verify|verify} messages. - * @function encode - * @memberof pruntime_rpc.GetRuntimeInfoRequest - * @static - * @param {pruntime_rpc.IGetRuntimeInfoRequest} message GetRuntimeInfoRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetRuntimeInfoRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.forceRefreshRa != null && Object.hasOwnProperty.call(message, "forceRefreshRa")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.forceRefreshRa); - if (message.encodedOperator != null && Object.hasOwnProperty.call(message, "encodedOperator")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.encodedOperator); - return writer; - }; - - /** - * Encodes the specified GetRuntimeInfoRequest message, length delimited. Does not implicitly {@link pruntime_rpc.GetRuntimeInfoRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof pruntime_rpc.GetRuntimeInfoRequest - * @static - * @param {pruntime_rpc.IGetRuntimeInfoRequest} message GetRuntimeInfoRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetRuntimeInfoRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetRuntimeInfoRequest message from the specified reader or buffer. - * @function decode - * @memberof pruntime_rpc.GetRuntimeInfoRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pruntime_rpc.GetRuntimeInfoRequest} GetRuntimeInfoRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetRuntimeInfoRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.GetRuntimeInfoRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.forceRefreshRa = reader.bool(); - break; - } - case 2: { - message.encodedOperator = reader.bytes(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetRuntimeInfoRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pruntime_rpc.GetRuntimeInfoRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.GetRuntimeInfoRequest} GetRuntimeInfoRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetRuntimeInfoRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetRuntimeInfoRequest message. - * @function verify - * @memberof pruntime_rpc.GetRuntimeInfoRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetRuntimeInfoRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.forceRefreshRa != null && message.hasOwnProperty("forceRefreshRa")) - if (typeof message.forceRefreshRa !== "boolean") - return "forceRefreshRa: boolean expected"; - if (message.encodedOperator != null && message.hasOwnProperty("encodedOperator")) { - properties._encodedOperator = 1; - if (!(message.encodedOperator && typeof message.encodedOperator.length === "number" || $util.isString(message.encodedOperator))) - return "encodedOperator: buffer expected"; - } - return null; - }; - - /** - * Creates a GetRuntimeInfoRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pruntime_rpc.GetRuntimeInfoRequest - * @static - * @param {Object.} object Plain object - * @returns {pruntime_rpc.GetRuntimeInfoRequest} GetRuntimeInfoRequest - */ - GetRuntimeInfoRequest.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.GetRuntimeInfoRequest) - return object; - var message = new $root.pruntime_rpc.GetRuntimeInfoRequest(); - if (object.forceRefreshRa != null) - message.forceRefreshRa = Boolean(object.forceRefreshRa); - if (object.encodedOperator != null) - if (typeof object.encodedOperator === "string") - $util.base64.decode(object.encodedOperator, message.encodedOperator = $util.newBuffer($util.base64.length(object.encodedOperator)), 0); - else if (object.encodedOperator.length >= 0) - message.encodedOperator = object.encodedOperator; - return message; - }; - - /** - * Creates a plain object from a GetRuntimeInfoRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof pruntime_rpc.GetRuntimeInfoRequest - * @static - * @param {pruntime_rpc.GetRuntimeInfoRequest} message GetRuntimeInfoRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetRuntimeInfoRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.forceRefreshRa = false; - if (message.forceRefreshRa != null && message.hasOwnProperty("forceRefreshRa")) - object.forceRefreshRa = message.forceRefreshRa; - if (message.encodedOperator != null && message.hasOwnProperty("encodedOperator")) { - object.encodedOperator = options.bytes === String ? $util.base64.encode(message.encodedOperator, 0, message.encodedOperator.length) : options.bytes === Array ? Array.prototype.slice.call(message.encodedOperator) : message.encodedOperator; - if (options.oneofs) - object._encodedOperator = "encodedOperator"; - } - return object; - }; - - /** - * Converts this GetRuntimeInfoRequest to JSON. - * @function toJSON - * @memberof pruntime_rpc.GetRuntimeInfoRequest - * @instance - * @returns {Object.} JSON object - */ - GetRuntimeInfoRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetRuntimeInfoRequest - * @function getTypeUrl - * @memberof pruntime_rpc.GetRuntimeInfoRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetRuntimeInfoRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pruntime_rpc.GetRuntimeInfoRequest"; - }; - - return GetRuntimeInfoRequest; - })(); - - pruntime_rpc.InitRuntimeResponse = (function() { - - /** - * Properties of an InitRuntimeResponse. - * @memberof pruntime_rpc - * @interface IInitRuntimeResponse - * @property {Uint8Array|null} [encodedRuntimeInfo] InitRuntimeResponse encodedRuntimeInfo - * @property {Uint8Array|null} [encodedGenesisBlockHash] InitRuntimeResponse encodedGenesisBlockHash - * @property {Uint8Array|null} [encodedPublicKey] InitRuntimeResponse encodedPublicKey - * @property {Uint8Array|null} [encodedEcdhPublicKey] InitRuntimeResponse encodedEcdhPublicKey - * @property {pruntime_rpc.IAttestation|null} [attestation] InitRuntimeResponse attestation - */ - - /** - * Constructs a new InitRuntimeResponse. - * @memberof pruntime_rpc - * @classdesc Represents an InitRuntimeResponse. - * @implements IInitRuntimeResponse - * @constructor - * @param {pruntime_rpc.IInitRuntimeResponse=} [properties] Properties to set - */ - function InitRuntimeResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * InitRuntimeResponse encodedRuntimeInfo. - * @member {Uint8Array} encodedRuntimeInfo - * @memberof pruntime_rpc.InitRuntimeResponse - * @instance - */ - InitRuntimeResponse.prototype.encodedRuntimeInfo = $util.newBuffer([]); - - /** - * InitRuntimeResponse encodedGenesisBlockHash. - * @member {Uint8Array} encodedGenesisBlockHash - * @memberof pruntime_rpc.InitRuntimeResponse - * @instance - */ - InitRuntimeResponse.prototype.encodedGenesisBlockHash = $util.newBuffer([]); - - /** - * InitRuntimeResponse encodedPublicKey. - * @member {Uint8Array} encodedPublicKey - * @memberof pruntime_rpc.InitRuntimeResponse - * @instance - */ - InitRuntimeResponse.prototype.encodedPublicKey = $util.newBuffer([]); - - /** - * InitRuntimeResponse encodedEcdhPublicKey. - * @member {Uint8Array} encodedEcdhPublicKey - * @memberof pruntime_rpc.InitRuntimeResponse - * @instance - */ - InitRuntimeResponse.prototype.encodedEcdhPublicKey = $util.newBuffer([]); - - /** - * InitRuntimeResponse attestation. - * @member {pruntime_rpc.IAttestation|null|undefined} attestation - * @memberof pruntime_rpc.InitRuntimeResponse - * @instance - */ - InitRuntimeResponse.prototype.attestation = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * InitRuntimeResponse _attestation. - * @member {"attestation"|undefined} _attestation - * @memberof pruntime_rpc.InitRuntimeResponse - * @instance - */ - Object.defineProperty(InitRuntimeResponse.prototype, "_attestation", { - get: $util.oneOfGetter($oneOfFields = ["attestation"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new InitRuntimeResponse instance using the specified properties. - * @function create - * @memberof pruntime_rpc.InitRuntimeResponse - * @static - * @param {pruntime_rpc.IInitRuntimeResponse=} [properties] Properties to set - * @returns {pruntime_rpc.InitRuntimeResponse} InitRuntimeResponse instance - */ - InitRuntimeResponse.create = function create(properties) { - return new InitRuntimeResponse(properties); - }; - - /** - * Encodes the specified InitRuntimeResponse message. Does not implicitly {@link pruntime_rpc.InitRuntimeResponse.verify|verify} messages. - * @function encode - * @memberof pruntime_rpc.InitRuntimeResponse - * @static - * @param {pruntime_rpc.IInitRuntimeResponse} message InitRuntimeResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InitRuntimeResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.encodedRuntimeInfo != null && Object.hasOwnProperty.call(message, "encodedRuntimeInfo")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.encodedRuntimeInfo); - if (message.encodedGenesisBlockHash != null && Object.hasOwnProperty.call(message, "encodedGenesisBlockHash")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.encodedGenesisBlockHash); - if (message.encodedPublicKey != null && Object.hasOwnProperty.call(message, "encodedPublicKey")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.encodedPublicKey); - if (message.encodedEcdhPublicKey != null && Object.hasOwnProperty.call(message, "encodedEcdhPublicKey")) - writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.encodedEcdhPublicKey); - if (message.attestation != null && Object.hasOwnProperty.call(message, "attestation")) - $root.pruntime_rpc.Attestation.encode(message.attestation, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified InitRuntimeResponse message, length delimited. Does not implicitly {@link pruntime_rpc.InitRuntimeResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof pruntime_rpc.InitRuntimeResponse - * @static - * @param {pruntime_rpc.IInitRuntimeResponse} message InitRuntimeResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InitRuntimeResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an InitRuntimeResponse message from the specified reader or buffer. - * @function decode - * @memberof pruntime_rpc.InitRuntimeResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pruntime_rpc.InitRuntimeResponse} InitRuntimeResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InitRuntimeResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.InitRuntimeResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.encodedRuntimeInfo = reader.bytes(); - break; - } - case 2: { - message.encodedGenesisBlockHash = reader.bytes(); - break; - } - case 3: { - message.encodedPublicKey = reader.bytes(); - break; - } - case 4: { - message.encodedEcdhPublicKey = reader.bytes(); - break; - } - case 5: { - message.attestation = $root.pruntime_rpc.Attestation.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an InitRuntimeResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pruntime_rpc.InitRuntimeResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.InitRuntimeResponse} InitRuntimeResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InitRuntimeResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an InitRuntimeResponse message. - * @function verify - * @memberof pruntime_rpc.InitRuntimeResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InitRuntimeResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.encodedRuntimeInfo != null && message.hasOwnProperty("encodedRuntimeInfo")) - if (!(message.encodedRuntimeInfo && typeof message.encodedRuntimeInfo.length === "number" || $util.isString(message.encodedRuntimeInfo))) - return "encodedRuntimeInfo: buffer expected"; - if (message.encodedGenesisBlockHash != null && message.hasOwnProperty("encodedGenesisBlockHash")) - if (!(message.encodedGenesisBlockHash && typeof message.encodedGenesisBlockHash.length === "number" || $util.isString(message.encodedGenesisBlockHash))) - return "encodedGenesisBlockHash: buffer expected"; - if (message.encodedPublicKey != null && message.hasOwnProperty("encodedPublicKey")) - if (!(message.encodedPublicKey && typeof message.encodedPublicKey.length === "number" || $util.isString(message.encodedPublicKey))) - return "encodedPublicKey: buffer expected"; - if (message.encodedEcdhPublicKey != null && message.hasOwnProperty("encodedEcdhPublicKey")) - if (!(message.encodedEcdhPublicKey && typeof message.encodedEcdhPublicKey.length === "number" || $util.isString(message.encodedEcdhPublicKey))) - return "encodedEcdhPublicKey: buffer expected"; - if (message.attestation != null && message.hasOwnProperty("attestation")) { - properties._attestation = 1; - { - var error = $root.pruntime_rpc.Attestation.verify(message.attestation); - if (error) - return "attestation." + error; - } - } - return null; - }; - - /** - * Creates an InitRuntimeResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pruntime_rpc.InitRuntimeResponse - * @static - * @param {Object.} object Plain object - * @returns {pruntime_rpc.InitRuntimeResponse} InitRuntimeResponse - */ - InitRuntimeResponse.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.InitRuntimeResponse) - return object; - var message = new $root.pruntime_rpc.InitRuntimeResponse(); - if (object.encodedRuntimeInfo != null) - if (typeof object.encodedRuntimeInfo === "string") - $util.base64.decode(object.encodedRuntimeInfo, message.encodedRuntimeInfo = $util.newBuffer($util.base64.length(object.encodedRuntimeInfo)), 0); - else if (object.encodedRuntimeInfo.length >= 0) - message.encodedRuntimeInfo = object.encodedRuntimeInfo; - if (object.encodedGenesisBlockHash != null) - if (typeof object.encodedGenesisBlockHash === "string") - $util.base64.decode(object.encodedGenesisBlockHash, message.encodedGenesisBlockHash = $util.newBuffer($util.base64.length(object.encodedGenesisBlockHash)), 0); - else if (object.encodedGenesisBlockHash.length >= 0) - message.encodedGenesisBlockHash = object.encodedGenesisBlockHash; - if (object.encodedPublicKey != null) - if (typeof object.encodedPublicKey === "string") - $util.base64.decode(object.encodedPublicKey, message.encodedPublicKey = $util.newBuffer($util.base64.length(object.encodedPublicKey)), 0); - else if (object.encodedPublicKey.length >= 0) - message.encodedPublicKey = object.encodedPublicKey; - if (object.encodedEcdhPublicKey != null) - if (typeof object.encodedEcdhPublicKey === "string") - $util.base64.decode(object.encodedEcdhPublicKey, message.encodedEcdhPublicKey = $util.newBuffer($util.base64.length(object.encodedEcdhPublicKey)), 0); - else if (object.encodedEcdhPublicKey.length >= 0) - message.encodedEcdhPublicKey = object.encodedEcdhPublicKey; - if (object.attestation != null) { - if (typeof object.attestation !== "object") - throw TypeError(".pruntime_rpc.InitRuntimeResponse.attestation: object expected"); - message.attestation = $root.pruntime_rpc.Attestation.fromObject(object.attestation); - } - return message; - }; - - /** - * Creates a plain object from an InitRuntimeResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof pruntime_rpc.InitRuntimeResponse - * @static - * @param {pruntime_rpc.InitRuntimeResponse} message InitRuntimeResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InitRuntimeResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.encodedRuntimeInfo = ""; - else { - object.encodedRuntimeInfo = []; - if (options.bytes !== Array) - object.encodedRuntimeInfo = $util.newBuffer(object.encodedRuntimeInfo); - } - if (options.bytes === String) - object.encodedGenesisBlockHash = ""; - else { - object.encodedGenesisBlockHash = []; - if (options.bytes !== Array) - object.encodedGenesisBlockHash = $util.newBuffer(object.encodedGenesisBlockHash); - } - if (options.bytes === String) - object.encodedPublicKey = ""; - else { - object.encodedPublicKey = []; - if (options.bytes !== Array) - object.encodedPublicKey = $util.newBuffer(object.encodedPublicKey); - } - if (options.bytes === String) - object.encodedEcdhPublicKey = ""; - else { - object.encodedEcdhPublicKey = []; - if (options.bytes !== Array) - object.encodedEcdhPublicKey = $util.newBuffer(object.encodedEcdhPublicKey); - } - } - if (message.encodedRuntimeInfo != null && message.hasOwnProperty("encodedRuntimeInfo")) - object.encodedRuntimeInfo = options.bytes === String ? $util.base64.encode(message.encodedRuntimeInfo, 0, message.encodedRuntimeInfo.length) : options.bytes === Array ? Array.prototype.slice.call(message.encodedRuntimeInfo) : message.encodedRuntimeInfo; - if (message.encodedGenesisBlockHash != null && message.hasOwnProperty("encodedGenesisBlockHash")) - object.encodedGenesisBlockHash = options.bytes === String ? $util.base64.encode(message.encodedGenesisBlockHash, 0, message.encodedGenesisBlockHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.encodedGenesisBlockHash) : message.encodedGenesisBlockHash; - if (message.encodedPublicKey != null && message.hasOwnProperty("encodedPublicKey")) - object.encodedPublicKey = options.bytes === String ? $util.base64.encode(message.encodedPublicKey, 0, message.encodedPublicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.encodedPublicKey) : message.encodedPublicKey; - if (message.encodedEcdhPublicKey != null && message.hasOwnProperty("encodedEcdhPublicKey")) - object.encodedEcdhPublicKey = options.bytes === String ? $util.base64.encode(message.encodedEcdhPublicKey, 0, message.encodedEcdhPublicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.encodedEcdhPublicKey) : message.encodedEcdhPublicKey; - if (message.attestation != null && message.hasOwnProperty("attestation")) { - object.attestation = $root.pruntime_rpc.Attestation.toObject(message.attestation, options); - if (options.oneofs) - object._attestation = "attestation"; - } - return object; - }; - - /** - * Converts this InitRuntimeResponse to JSON. - * @function toJSON - * @memberof pruntime_rpc.InitRuntimeResponse - * @instance - * @returns {Object.} JSON object - */ - InitRuntimeResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for InitRuntimeResponse - * @function getTypeUrl - * @memberof pruntime_rpc.InitRuntimeResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - InitRuntimeResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pruntime_rpc.InitRuntimeResponse"; - }; - - return InitRuntimeResponse; - })(); - - pruntime_rpc.Attestation = (function() { - - /** - * Properties of an Attestation. - * @memberof pruntime_rpc - * @interface IAttestation - * @property {number|null} [version] Attestation version - * @property {string|null} [provider] Attestation provider - * @property {pruntime_rpc.IAttestationReport|null} [payload] Attestation payload - * @property {Uint8Array|null} [encodedReport] Attestation encodedReport - * @property {number|Long|null} [timestamp] Attestation timestamp - */ - - /** - * Constructs a new Attestation. - * @memberof pruntime_rpc - * @classdesc Represents an Attestation. - * @implements IAttestation - * @constructor - * @param {pruntime_rpc.IAttestation=} [properties] Properties to set - */ - function Attestation(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Attestation version. - * @member {number} version - * @memberof pruntime_rpc.Attestation - * @instance - */ - Attestation.prototype.version = 0; - - /** - * Attestation provider. - * @member {string} provider - * @memberof pruntime_rpc.Attestation - * @instance - */ - Attestation.prototype.provider = ""; - - /** - * Attestation payload. - * @member {pruntime_rpc.IAttestationReport|null|undefined} payload - * @memberof pruntime_rpc.Attestation - * @instance - */ - Attestation.prototype.payload = null; - - /** - * Attestation encodedReport. - * @member {Uint8Array} encodedReport - * @memberof pruntime_rpc.Attestation - * @instance - */ - Attestation.prototype.encodedReport = $util.newBuffer([]); - - /** - * Attestation timestamp. - * @member {number|Long} timestamp - * @memberof pruntime_rpc.Attestation - * @instance - */ - Attestation.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Creates a new Attestation instance using the specified properties. - * @function create - * @memberof pruntime_rpc.Attestation - * @static - * @param {pruntime_rpc.IAttestation=} [properties] Properties to set - * @returns {pruntime_rpc.Attestation} Attestation instance - */ - Attestation.create = function create(properties) { - return new Attestation(properties); - }; - - /** - * Encodes the specified Attestation message. Does not implicitly {@link pruntime_rpc.Attestation.verify|verify} messages. - * @function encode - * @memberof pruntime_rpc.Attestation - * @static - * @param {pruntime_rpc.IAttestation} message Attestation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Attestation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.version); - if (message.provider != null && Object.hasOwnProperty.call(message, "provider")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.provider); - if (message.payload != null && Object.hasOwnProperty.call(message, "payload")) - $root.pruntime_rpc.AttestationReport.encode(message.payload, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.timestamp); - if (message.encodedReport != null && Object.hasOwnProperty.call(message, "encodedReport")) - writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.encodedReport); - return writer; - }; - - /** - * Encodes the specified Attestation message, length delimited. Does not implicitly {@link pruntime_rpc.Attestation.verify|verify} messages. - * @function encodeDelimited - * @memberof pruntime_rpc.Attestation - * @static - * @param {pruntime_rpc.IAttestation} message Attestation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Attestation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Attestation message from the specified reader or buffer. - * @function decode - * @memberof pruntime_rpc.Attestation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pruntime_rpc.Attestation} Attestation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Attestation.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.Attestation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.version = reader.int32(); - break; - } - case 2: { - message.provider = reader.string(); - break; - } - case 3: { - message.payload = $root.pruntime_rpc.AttestationReport.decode(reader, reader.uint32()); - break; - } - case 5: { - message.encodedReport = reader.bytes(); - break; - } - case 4: { - message.timestamp = reader.uint64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Attestation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pruntime_rpc.Attestation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.Attestation} Attestation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Attestation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Attestation message. - * @function verify - * @memberof pruntime_rpc.Attestation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Attestation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isInteger(message.version)) - return "version: integer expected"; - if (message.provider != null && message.hasOwnProperty("provider")) - if (!$util.isString(message.provider)) - return "provider: string expected"; - if (message.payload != null && message.hasOwnProperty("payload")) { - var error = $root.pruntime_rpc.AttestationReport.verify(message.payload); - if (error) - return "payload." + error; - } - if (message.encodedReport != null && message.hasOwnProperty("encodedReport")) - if (!(message.encodedReport && typeof message.encodedReport.length === "number" || $util.isString(message.encodedReport))) - return "encodedReport: buffer expected"; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high))) - return "timestamp: integer|Long expected"; - return null; - }; - - /** - * Creates an Attestation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pruntime_rpc.Attestation - * @static - * @param {Object.} object Plain object - * @returns {pruntime_rpc.Attestation} Attestation - */ - Attestation.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.Attestation) - return object; - var message = new $root.pruntime_rpc.Attestation(); - if (object.version != null) - message.version = object.version | 0; - if (object.provider != null) - message.provider = String(object.provider); - if (object.payload != null) { - if (typeof object.payload !== "object") - throw TypeError(".pruntime_rpc.Attestation.payload: object expected"); - message.payload = $root.pruntime_rpc.AttestationReport.fromObject(object.payload); - } - if (object.encodedReport != null) - if (typeof object.encodedReport === "string") - $util.base64.decode(object.encodedReport, message.encodedReport = $util.newBuffer($util.base64.length(object.encodedReport)), 0); - else if (object.encodedReport.length >= 0) - message.encodedReport = object.encodedReport; - if (object.timestamp != null) - if ($util.Long) - (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = true; - else if (typeof object.timestamp === "string") - message.timestamp = parseInt(object.timestamp, 10); - else if (typeof object.timestamp === "number") - message.timestamp = object.timestamp; - else if (typeof object.timestamp === "object") - message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from an Attestation message. Also converts values to other types if specified. - * @function toObject - * @memberof pruntime_rpc.Attestation - * @static - * @param {pruntime_rpc.Attestation} message Attestation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Attestation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.version = 0; - object.provider = ""; - object.payload = null; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.timestamp = options.longs === String ? "0" : 0; - if (options.bytes === String) - object.encodedReport = ""; - else { - object.encodedReport = []; - if (options.bytes !== Array) - object.encodedReport = $util.newBuffer(object.encodedReport); - } - } - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.provider != null && message.hasOwnProperty("provider")) - object.provider = message.provider; - if (message.payload != null && message.hasOwnProperty("payload")) - object.payload = $root.pruntime_rpc.AttestationReport.toObject(message.payload, options); - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - if (typeof message.timestamp === "number") - object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp; - else - object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber(true) : message.timestamp; - if (message.encodedReport != null && message.hasOwnProperty("encodedReport")) - object.encodedReport = options.bytes === String ? $util.base64.encode(message.encodedReport, 0, message.encodedReport.length) : options.bytes === Array ? Array.prototype.slice.call(message.encodedReport) : message.encodedReport; - return object; - }; - - /** - * Converts this Attestation to JSON. - * @function toJSON - * @memberof pruntime_rpc.Attestation - * @instance - * @returns {Object.} JSON object - */ - Attestation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Attestation - * @function getTypeUrl - * @memberof pruntime_rpc.Attestation - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Attestation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pruntime_rpc.Attestation"; - }; - - return Attestation; - })(); - - pruntime_rpc.AttestationReport = (function() { - - /** - * Properties of an AttestationReport. - * @memberof pruntime_rpc - * @interface IAttestationReport - * @property {string|null} [report] AttestationReport report - * @property {Uint8Array|null} [signature] AttestationReport signature - * @property {Uint8Array|null} [signingCert] AttestationReport signingCert - */ - - /** - * Constructs a new AttestationReport. - * @memberof pruntime_rpc - * @classdesc Represents an AttestationReport. - * @implements IAttestationReport - * @constructor - * @param {pruntime_rpc.IAttestationReport=} [properties] Properties to set - */ - function AttestationReport(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AttestationReport report. - * @member {string} report - * @memberof pruntime_rpc.AttestationReport - * @instance - */ - AttestationReport.prototype.report = ""; - - /** - * AttestationReport signature. - * @member {Uint8Array} signature - * @memberof pruntime_rpc.AttestationReport - * @instance - */ - AttestationReport.prototype.signature = $util.newBuffer([]); - - /** - * AttestationReport signingCert. - * @member {Uint8Array} signingCert - * @memberof pruntime_rpc.AttestationReport - * @instance - */ - AttestationReport.prototype.signingCert = $util.newBuffer([]); - - /** - * Creates a new AttestationReport instance using the specified properties. - * @function create - * @memberof pruntime_rpc.AttestationReport - * @static - * @param {pruntime_rpc.IAttestationReport=} [properties] Properties to set - * @returns {pruntime_rpc.AttestationReport} AttestationReport instance - */ - AttestationReport.create = function create(properties) { - return new AttestationReport(properties); - }; - - /** - * Encodes the specified AttestationReport message. Does not implicitly {@link pruntime_rpc.AttestationReport.verify|verify} messages. - * @function encode - * @memberof pruntime_rpc.AttestationReport - * @static - * @param {pruntime_rpc.IAttestationReport} message AttestationReport message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AttestationReport.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.report != null && Object.hasOwnProperty.call(message, "report")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.report); - if (message.signature != null && Object.hasOwnProperty.call(message, "signature")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.signature); - if (message.signingCert != null && Object.hasOwnProperty.call(message, "signingCert")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.signingCert); - return writer; - }; - - /** - * Encodes the specified AttestationReport message, length delimited. Does not implicitly {@link pruntime_rpc.AttestationReport.verify|verify} messages. - * @function encodeDelimited - * @memberof pruntime_rpc.AttestationReport - * @static - * @param {pruntime_rpc.IAttestationReport} message AttestationReport message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AttestationReport.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AttestationReport message from the specified reader or buffer. - * @function decode - * @memberof pruntime_rpc.AttestationReport - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pruntime_rpc.AttestationReport} AttestationReport - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AttestationReport.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.AttestationReport(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.report = reader.string(); - break; - } - case 2: { - message.signature = reader.bytes(); - break; - } - case 3: { - message.signingCert = reader.bytes(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AttestationReport message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pruntime_rpc.AttestationReport - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.AttestationReport} AttestationReport - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AttestationReport.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AttestationReport message. - * @function verify - * @memberof pruntime_rpc.AttestationReport - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AttestationReport.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.report != null && message.hasOwnProperty("report")) - if (!$util.isString(message.report)) - return "report: string expected"; - if (message.signature != null && message.hasOwnProperty("signature")) - if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature))) - return "signature: buffer expected"; - if (message.signingCert != null && message.hasOwnProperty("signingCert")) - if (!(message.signingCert && typeof message.signingCert.length === "number" || $util.isString(message.signingCert))) - return "signingCert: buffer expected"; - return null; - }; - - /** - * Creates an AttestationReport message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pruntime_rpc.AttestationReport - * @static - * @param {Object.} object Plain object - * @returns {pruntime_rpc.AttestationReport} AttestationReport - */ - AttestationReport.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.AttestationReport) - return object; - var message = new $root.pruntime_rpc.AttestationReport(); - if (object.report != null) - message.report = String(object.report); - if (object.signature != null) - if (typeof object.signature === "string") - $util.base64.decode(object.signature, message.signature = $util.newBuffer($util.base64.length(object.signature)), 0); - else if (object.signature.length >= 0) - message.signature = object.signature; - if (object.signingCert != null) - if (typeof object.signingCert === "string") - $util.base64.decode(object.signingCert, message.signingCert = $util.newBuffer($util.base64.length(object.signingCert)), 0); - else if (object.signingCert.length >= 0) - message.signingCert = object.signingCert; - return message; - }; - - /** - * Creates a plain object from an AttestationReport message. Also converts values to other types if specified. - * @function toObject - * @memberof pruntime_rpc.AttestationReport - * @static - * @param {pruntime_rpc.AttestationReport} message AttestationReport - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AttestationReport.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.report = ""; - if (options.bytes === String) - object.signature = ""; - else { - object.signature = []; - if (options.bytes !== Array) - object.signature = $util.newBuffer(object.signature); - } - if (options.bytes === String) - object.signingCert = ""; - else { - object.signingCert = []; - if (options.bytes !== Array) - object.signingCert = $util.newBuffer(object.signingCert); - } - } - if (message.report != null && message.hasOwnProperty("report")) - object.report = message.report; - if (message.signature != null && message.hasOwnProperty("signature")) - object.signature = options.bytes === String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature) : message.signature; - if (message.signingCert != null && message.hasOwnProperty("signingCert")) - object.signingCert = options.bytes === String ? $util.base64.encode(message.signingCert, 0, message.signingCert.length) : options.bytes === Array ? Array.prototype.slice.call(message.signingCert) : message.signingCert; - return object; - }; - - /** - * Converts this AttestationReport to JSON. - * @function toJSON - * @memberof pruntime_rpc.AttestationReport - * @instance - * @returns {Object.} JSON object - */ - AttestationReport.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AttestationReport - * @function getTypeUrl - * @memberof pruntime_rpc.AttestationReport - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AttestationReport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pruntime_rpc.AttestationReport"; - }; - - return AttestationReport; - })(); - - pruntime_rpc.GetEgressMessagesResponse = (function() { - - /** - * Properties of a GetEgressMessagesResponse. - * @memberof pruntime_rpc - * @interface IGetEgressMessagesResponse - * @property {Uint8Array|null} [encodedMessages] GetEgressMessagesResponse encodedMessages - */ - - /** - * Constructs a new GetEgressMessagesResponse. - * @memberof pruntime_rpc - * @classdesc Represents a GetEgressMessagesResponse. - * @implements IGetEgressMessagesResponse - * @constructor - * @param {pruntime_rpc.IGetEgressMessagesResponse=} [properties] Properties to set - */ - function GetEgressMessagesResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetEgressMessagesResponse encodedMessages. - * @member {Uint8Array} encodedMessages - * @memberof pruntime_rpc.GetEgressMessagesResponse - * @instance - */ - GetEgressMessagesResponse.prototype.encodedMessages = $util.newBuffer([]); - - /** - * Creates a new GetEgressMessagesResponse instance using the specified properties. - * @function create - * @memberof pruntime_rpc.GetEgressMessagesResponse - * @static - * @param {pruntime_rpc.IGetEgressMessagesResponse=} [properties] Properties to set - * @returns {pruntime_rpc.GetEgressMessagesResponse} GetEgressMessagesResponse instance - */ - GetEgressMessagesResponse.create = function create(properties) { - return new GetEgressMessagesResponse(properties); - }; - - /** - * Encodes the specified GetEgressMessagesResponse message. Does not implicitly {@link pruntime_rpc.GetEgressMessagesResponse.verify|verify} messages. - * @function encode - * @memberof pruntime_rpc.GetEgressMessagesResponse - * @static - * @param {pruntime_rpc.IGetEgressMessagesResponse} message GetEgressMessagesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetEgressMessagesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.encodedMessages != null && Object.hasOwnProperty.call(message, "encodedMessages")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.encodedMessages); - return writer; - }; - - /** - * Encodes the specified GetEgressMessagesResponse message, length delimited. Does not implicitly {@link pruntime_rpc.GetEgressMessagesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof pruntime_rpc.GetEgressMessagesResponse - * @static - * @param {pruntime_rpc.IGetEgressMessagesResponse} message GetEgressMessagesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetEgressMessagesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetEgressMessagesResponse message from the specified reader or buffer. - * @function decode - * @memberof pruntime_rpc.GetEgressMessagesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pruntime_rpc.GetEgressMessagesResponse} GetEgressMessagesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetEgressMessagesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.GetEgressMessagesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.encodedMessages = reader.bytes(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetEgressMessagesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pruntime_rpc.GetEgressMessagesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.GetEgressMessagesResponse} GetEgressMessagesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetEgressMessagesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetEgressMessagesResponse message. - * @function verify - * @memberof pruntime_rpc.GetEgressMessagesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetEgressMessagesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.encodedMessages != null && message.hasOwnProperty("encodedMessages")) - if (!(message.encodedMessages && typeof message.encodedMessages.length === "number" || $util.isString(message.encodedMessages))) - return "encodedMessages: buffer expected"; - return null; - }; - - /** - * Creates a GetEgressMessagesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pruntime_rpc.GetEgressMessagesResponse - * @static - * @param {Object.} object Plain object - * @returns {pruntime_rpc.GetEgressMessagesResponse} GetEgressMessagesResponse - */ - GetEgressMessagesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.GetEgressMessagesResponse) - return object; - var message = new $root.pruntime_rpc.GetEgressMessagesResponse(); - if (object.encodedMessages != null) - if (typeof object.encodedMessages === "string") - $util.base64.decode(object.encodedMessages, message.encodedMessages = $util.newBuffer($util.base64.length(object.encodedMessages)), 0); - else if (object.encodedMessages.length >= 0) - message.encodedMessages = object.encodedMessages; - return message; - }; - - /** - * Creates a plain object from a GetEgressMessagesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof pruntime_rpc.GetEgressMessagesResponse - * @static - * @param {pruntime_rpc.GetEgressMessagesResponse} message GetEgressMessagesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetEgressMessagesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - if (options.bytes === String) - object.encodedMessages = ""; - else { - object.encodedMessages = []; - if (options.bytes !== Array) - object.encodedMessages = $util.newBuffer(object.encodedMessages); - } - if (message.encodedMessages != null && message.hasOwnProperty("encodedMessages")) - object.encodedMessages = options.bytes === String ? $util.base64.encode(message.encodedMessages, 0, message.encodedMessages.length) : options.bytes === Array ? Array.prototype.slice.call(message.encodedMessages) : message.encodedMessages; - return object; - }; - - /** - * Converts this GetEgressMessagesResponse to JSON. - * @function toJSON - * @memberof pruntime_rpc.GetEgressMessagesResponse - * @instance - * @returns {Object.} JSON object - */ - GetEgressMessagesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetEgressMessagesResponse - * @function getTypeUrl - * @memberof pruntime_rpc.GetEgressMessagesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetEgressMessagesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pruntime_rpc.GetEgressMessagesResponse"; - }; - - return GetEgressMessagesResponse; - })(); - - pruntime_rpc.ContractQueryRequest = (function() { - - /** - * Properties of a ContractQueryRequest. - * @memberof pruntime_rpc - * @interface IContractQueryRequest - * @property {Uint8Array|null} [encodedEncryptedData] ContractQueryRequest encodedEncryptedData - * @property {pruntime_rpc.ISignature|null} [signature] ContractQueryRequest signature - */ - - /** - * Constructs a new ContractQueryRequest. - * @memberof pruntime_rpc - * @classdesc Represents a ContractQueryRequest. - * @implements IContractQueryRequest - * @constructor - * @param {pruntime_rpc.IContractQueryRequest=} [properties] Properties to set - */ - function ContractQueryRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ContractQueryRequest encodedEncryptedData. - * @member {Uint8Array} encodedEncryptedData - * @memberof pruntime_rpc.ContractQueryRequest - * @instance - */ - ContractQueryRequest.prototype.encodedEncryptedData = $util.newBuffer([]); - - /** - * ContractQueryRequest signature. - * @member {pruntime_rpc.ISignature|null|undefined} signature - * @memberof pruntime_rpc.ContractQueryRequest - * @instance - */ - ContractQueryRequest.prototype.signature = null; - - /** - * Creates a new ContractQueryRequest instance using the specified properties. - * @function create - * @memberof pruntime_rpc.ContractQueryRequest - * @static - * @param {pruntime_rpc.IContractQueryRequest=} [properties] Properties to set - * @returns {pruntime_rpc.ContractQueryRequest} ContractQueryRequest instance - */ - ContractQueryRequest.create = function create(properties) { - return new ContractQueryRequest(properties); - }; - - /** - * Encodes the specified ContractQueryRequest message. Does not implicitly {@link pruntime_rpc.ContractQueryRequest.verify|verify} messages. - * @function encode - * @memberof pruntime_rpc.ContractQueryRequest - * @static - * @param {pruntime_rpc.IContractQueryRequest} message ContractQueryRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ContractQueryRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.encodedEncryptedData != null && Object.hasOwnProperty.call(message, "encodedEncryptedData")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.encodedEncryptedData); - if (message.signature != null && Object.hasOwnProperty.call(message, "signature")) - $root.pruntime_rpc.Signature.encode(message.signature, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ContractQueryRequest message, length delimited. Does not implicitly {@link pruntime_rpc.ContractQueryRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof pruntime_rpc.ContractQueryRequest - * @static - * @param {pruntime_rpc.IContractQueryRequest} message ContractQueryRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ContractQueryRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ContractQueryRequest message from the specified reader or buffer. - * @function decode - * @memberof pruntime_rpc.ContractQueryRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pruntime_rpc.ContractQueryRequest} ContractQueryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ContractQueryRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.ContractQueryRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.encodedEncryptedData = reader.bytes(); - break; - } - case 2: { - message.signature = $root.pruntime_rpc.Signature.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ContractQueryRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pruntime_rpc.ContractQueryRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.ContractQueryRequest} ContractQueryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ContractQueryRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ContractQueryRequest message. - * @function verify - * @memberof pruntime_rpc.ContractQueryRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ContractQueryRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.encodedEncryptedData != null && message.hasOwnProperty("encodedEncryptedData")) - if (!(message.encodedEncryptedData && typeof message.encodedEncryptedData.length === "number" || $util.isString(message.encodedEncryptedData))) - return "encodedEncryptedData: buffer expected"; - if (message.signature != null && message.hasOwnProperty("signature")) { - var error = $root.pruntime_rpc.Signature.verify(message.signature); - if (error) - return "signature." + error; - } - return null; - }; - - /** - * Creates a ContractQueryRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pruntime_rpc.ContractQueryRequest - * @static - * @param {Object.} object Plain object - * @returns {pruntime_rpc.ContractQueryRequest} ContractQueryRequest - */ - ContractQueryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.ContractQueryRequest) - return object; - var message = new $root.pruntime_rpc.ContractQueryRequest(); - if (object.encodedEncryptedData != null) - if (typeof object.encodedEncryptedData === "string") - $util.base64.decode(object.encodedEncryptedData, message.encodedEncryptedData = $util.newBuffer($util.base64.length(object.encodedEncryptedData)), 0); - else if (object.encodedEncryptedData.length >= 0) - message.encodedEncryptedData = object.encodedEncryptedData; - if (object.signature != null) { - if (typeof object.signature !== "object") - throw TypeError(".pruntime_rpc.ContractQueryRequest.signature: object expected"); - message.signature = $root.pruntime_rpc.Signature.fromObject(object.signature); - } - return message; - }; - - /** - * Creates a plain object from a ContractQueryRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof pruntime_rpc.ContractQueryRequest - * @static - * @param {pruntime_rpc.ContractQueryRequest} message ContractQueryRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ContractQueryRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.encodedEncryptedData = ""; - else { - object.encodedEncryptedData = []; - if (options.bytes !== Array) - object.encodedEncryptedData = $util.newBuffer(object.encodedEncryptedData); - } - object.signature = null; - } - if (message.encodedEncryptedData != null && message.hasOwnProperty("encodedEncryptedData")) - object.encodedEncryptedData = options.bytes === String ? $util.base64.encode(message.encodedEncryptedData, 0, message.encodedEncryptedData.length) : options.bytes === Array ? Array.prototype.slice.call(message.encodedEncryptedData) : message.encodedEncryptedData; - if (message.signature != null && message.hasOwnProperty("signature")) - object.signature = $root.pruntime_rpc.Signature.toObject(message.signature, options); - return object; - }; - - /** - * Converts this ContractQueryRequest to JSON. - * @function toJSON - * @memberof pruntime_rpc.ContractQueryRequest - * @instance - * @returns {Object.} JSON object - */ - ContractQueryRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ContractQueryRequest - * @function getTypeUrl - * @memberof pruntime_rpc.ContractQueryRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ContractQueryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pruntime_rpc.ContractQueryRequest"; - }; - - return ContractQueryRequest; - })(); - - pruntime_rpc.Signature = (function() { - - /** - * Properties of a Signature. - * @memberof pruntime_rpc - * @interface ISignature - * @property {pruntime_rpc.ICertificate|null} [signedBy] Signature signedBy - * @property {pruntime_rpc.SignatureType|null} [signatureType] Signature signatureType - * @property {Uint8Array|null} [signature] Signature signature - */ - - /** - * Constructs a new Signature. - * @memberof pruntime_rpc - * @classdesc Represents a Signature. - * @implements ISignature - * @constructor - * @param {pruntime_rpc.ISignature=} [properties] Properties to set - */ - function Signature(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Signature signedBy. - * @member {pruntime_rpc.ICertificate|null|undefined} signedBy - * @memberof pruntime_rpc.Signature - * @instance - */ - Signature.prototype.signedBy = null; - - /** - * Signature signatureType. - * @member {pruntime_rpc.SignatureType} signatureType - * @memberof pruntime_rpc.Signature - * @instance - */ - Signature.prototype.signatureType = 0; - - /** - * Signature signature. - * @member {Uint8Array} signature - * @memberof pruntime_rpc.Signature - * @instance - */ - Signature.prototype.signature = $util.newBuffer([]); - - /** - * Creates a new Signature instance using the specified properties. - * @function create - * @memberof pruntime_rpc.Signature - * @static - * @param {pruntime_rpc.ISignature=} [properties] Properties to set - * @returns {pruntime_rpc.Signature} Signature instance - */ - Signature.create = function create(properties) { - return new Signature(properties); - }; - - /** - * Encodes the specified Signature message. Does not implicitly {@link pruntime_rpc.Signature.verify|verify} messages. - * @function encode - * @memberof pruntime_rpc.Signature - * @static - * @param {pruntime_rpc.ISignature} message Signature message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Signature.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.signedBy != null && Object.hasOwnProperty.call(message, "signedBy")) - $root.pruntime_rpc.Certificate.encode(message.signedBy, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.signatureType != null && Object.hasOwnProperty.call(message, "signatureType")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.signatureType); - if (message.signature != null && Object.hasOwnProperty.call(message, "signature")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.signature); - return writer; - }; - - /** - * Encodes the specified Signature message, length delimited. Does not implicitly {@link pruntime_rpc.Signature.verify|verify} messages. - * @function encodeDelimited - * @memberof pruntime_rpc.Signature - * @static - * @param {pruntime_rpc.ISignature} message Signature message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Signature.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Signature message from the specified reader or buffer. - * @function decode - * @memberof pruntime_rpc.Signature - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pruntime_rpc.Signature} Signature - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Signature.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.Signature(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.signedBy = $root.pruntime_rpc.Certificate.decode(reader, reader.uint32()); - break; - } - case 2: { - message.signatureType = reader.int32(); - break; - } - case 3: { - message.signature = reader.bytes(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Signature message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pruntime_rpc.Signature - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.Signature} Signature - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Signature.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Signature message. - * @function verify - * @memberof pruntime_rpc.Signature - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Signature.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.signedBy != null && message.hasOwnProperty("signedBy")) { - var error = $root.pruntime_rpc.Certificate.verify(message.signedBy); - if (error) - return "signedBy." + error; - } - if (message.signatureType != null && message.hasOwnProperty("signatureType")) - switch (message.signatureType) { - default: - return "signatureType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - break; - } - if (message.signature != null && message.hasOwnProperty("signature")) - if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature))) - return "signature: buffer expected"; - return null; - }; - - /** - * Creates a Signature message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pruntime_rpc.Signature - * @static - * @param {Object.} object Plain object - * @returns {pruntime_rpc.Signature} Signature - */ - Signature.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.Signature) - return object; - var message = new $root.pruntime_rpc.Signature(); - if (object.signedBy != null) { - if (typeof object.signedBy !== "object") - throw TypeError(".pruntime_rpc.Signature.signedBy: object expected"); - message.signedBy = $root.pruntime_rpc.Certificate.fromObject(object.signedBy); - } - switch (object.signatureType) { - default: - if (typeof object.signatureType === "number") { - message.signatureType = object.signatureType; - break; - } - break; - case "Ed25519": - case 0: - message.signatureType = 0; - break; - case "Sr25519": - case 1: - message.signatureType = 1; - break; - case "Ecdsa": - case 2: - message.signatureType = 2; - break; - case "Ed25519WrapBytes": - case 3: - message.signatureType = 3; - break; - case "Sr25519WrapBytes": - case 4: - message.signatureType = 4; - break; - case "EcdsaWrapBytes": - case 5: - message.signatureType = 5; - break; - case "Eip712": - case 6: - message.signatureType = 6; - break; - } - if (object.signature != null) - if (typeof object.signature === "string") - $util.base64.decode(object.signature, message.signature = $util.newBuffer($util.base64.length(object.signature)), 0); - else if (object.signature.length >= 0) - message.signature = object.signature; - return message; - }; - - /** - * Creates a plain object from a Signature message. Also converts values to other types if specified. - * @function toObject - * @memberof pruntime_rpc.Signature - * @static - * @param {pruntime_rpc.Signature} message Signature - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Signature.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.signedBy = null; - object.signatureType = options.enums === String ? "Ed25519" : 0; - if (options.bytes === String) - object.signature = ""; - else { - object.signature = []; - if (options.bytes !== Array) - object.signature = $util.newBuffer(object.signature); - } - } - if (message.signedBy != null && message.hasOwnProperty("signedBy")) - object.signedBy = $root.pruntime_rpc.Certificate.toObject(message.signedBy, options); - if (message.signatureType != null && message.hasOwnProperty("signatureType")) - object.signatureType = options.enums === String ? $root.pruntime_rpc.SignatureType[message.signatureType] === undefined ? message.signatureType : $root.pruntime_rpc.SignatureType[message.signatureType] : message.signatureType; - if (message.signature != null && message.hasOwnProperty("signature")) - object.signature = options.bytes === String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature) : message.signature; - return object; - }; - - /** - * Converts this Signature to JSON. - * @function toJSON - * @memberof pruntime_rpc.Signature - * @instance - * @returns {Object.} JSON object - */ - Signature.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Signature - * @function getTypeUrl - * @memberof pruntime_rpc.Signature - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Signature.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pruntime_rpc.Signature"; - }; - - return Signature; - })(); - - pruntime_rpc.Certificate = (function() { - - /** - * Properties of a Certificate. - * @memberof pruntime_rpc - * @interface ICertificate - * @property {Uint8Array|null} [encodedBody] Certificate encodedBody - * @property {pruntime_rpc.ISignature|null} [signature] Certificate signature - */ - - /** - * Constructs a new Certificate. - * @memberof pruntime_rpc - * @classdesc Represents a Certificate. - * @implements ICertificate - * @constructor - * @param {pruntime_rpc.ICertificate=} [properties] Properties to set - */ - function Certificate(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Certificate encodedBody. - * @member {Uint8Array} encodedBody - * @memberof pruntime_rpc.Certificate - * @instance - */ - Certificate.prototype.encodedBody = $util.newBuffer([]); - - /** - * Certificate signature. - * @member {pruntime_rpc.ISignature|null|undefined} signature - * @memberof pruntime_rpc.Certificate - * @instance - */ - Certificate.prototype.signature = null; - - /** - * Creates a new Certificate instance using the specified properties. - * @function create - * @memberof pruntime_rpc.Certificate - * @static - * @param {pruntime_rpc.ICertificate=} [properties] Properties to set - * @returns {pruntime_rpc.Certificate} Certificate instance - */ - Certificate.create = function create(properties) { - return new Certificate(properties); - }; - - /** - * Encodes the specified Certificate message. Does not implicitly {@link pruntime_rpc.Certificate.verify|verify} messages. - * @function encode - * @memberof pruntime_rpc.Certificate - * @static - * @param {pruntime_rpc.ICertificate} message Certificate message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Certificate.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.encodedBody != null && Object.hasOwnProperty.call(message, "encodedBody")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.encodedBody); - if (message.signature != null && Object.hasOwnProperty.call(message, "signature")) - $root.pruntime_rpc.Signature.encode(message.signature, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Certificate message, length delimited. Does not implicitly {@link pruntime_rpc.Certificate.verify|verify} messages. - * @function encodeDelimited - * @memberof pruntime_rpc.Certificate - * @static - * @param {pruntime_rpc.ICertificate} message Certificate message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Certificate.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Certificate message from the specified reader or buffer. - * @function decode - * @memberof pruntime_rpc.Certificate - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pruntime_rpc.Certificate} Certificate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Certificate.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.Certificate(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.encodedBody = reader.bytes(); - break; - } - case 2: { - message.signature = $root.pruntime_rpc.Signature.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Certificate message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pruntime_rpc.Certificate - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.Certificate} Certificate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Certificate.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Certificate message. - * @function verify - * @memberof pruntime_rpc.Certificate - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Certificate.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.encodedBody != null && message.hasOwnProperty("encodedBody")) - if (!(message.encodedBody && typeof message.encodedBody.length === "number" || $util.isString(message.encodedBody))) - return "encodedBody: buffer expected"; - if (message.signature != null && message.hasOwnProperty("signature")) { - var error = $root.pruntime_rpc.Signature.verify(message.signature); - if (error) - return "signature." + error; - } - return null; - }; - - /** - * Creates a Certificate message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pruntime_rpc.Certificate - * @static - * @param {Object.} object Plain object - * @returns {pruntime_rpc.Certificate} Certificate - */ - Certificate.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.Certificate) - return object; - var message = new $root.pruntime_rpc.Certificate(); - if (object.encodedBody != null) - if (typeof object.encodedBody === "string") - $util.base64.decode(object.encodedBody, message.encodedBody = $util.newBuffer($util.base64.length(object.encodedBody)), 0); - else if (object.encodedBody.length >= 0) - message.encodedBody = object.encodedBody; - if (object.signature != null) { - if (typeof object.signature !== "object") - throw TypeError(".pruntime_rpc.Certificate.signature: object expected"); - message.signature = $root.pruntime_rpc.Signature.fromObject(object.signature); - } - return message; - }; - - /** - * Creates a plain object from a Certificate message. Also converts values to other types if specified. - * @function toObject - * @memberof pruntime_rpc.Certificate - * @static - * @param {pruntime_rpc.Certificate} message Certificate - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Certificate.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.encodedBody = ""; - else { - object.encodedBody = []; - if (options.bytes !== Array) - object.encodedBody = $util.newBuffer(object.encodedBody); - } - object.signature = null; - } - if (message.encodedBody != null && message.hasOwnProperty("encodedBody")) - object.encodedBody = options.bytes === String ? $util.base64.encode(message.encodedBody, 0, message.encodedBody.length) : options.bytes === Array ? Array.prototype.slice.call(message.encodedBody) : message.encodedBody; - if (message.signature != null && message.hasOwnProperty("signature")) - object.signature = $root.pruntime_rpc.Signature.toObject(message.signature, options); - return object; - }; - - /** - * Converts this Certificate to JSON. - * @function toJSON - * @memberof pruntime_rpc.Certificate - * @instance - * @returns {Object.} JSON object - */ - Certificate.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Certificate - * @function getTypeUrl - * @memberof pruntime_rpc.Certificate - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Certificate.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pruntime_rpc.Certificate"; - }; - - return Certificate; - })(); - - /** - * SignatureType enum. - * @name pruntime_rpc.SignatureType - * @enum {number} - * @property {number} Ed25519=0 Ed25519 value - * @property {number} Sr25519=1 Sr25519 value - * @property {number} Ecdsa=2 Ecdsa value - * @property {number} Ed25519WrapBytes=3 Ed25519WrapBytes value - * @property {number} Sr25519WrapBytes=4 Sr25519WrapBytes value - * @property {number} EcdsaWrapBytes=5 EcdsaWrapBytes value - * @property {number} Eip712=6 Eip712 value - */ - pruntime_rpc.SignatureType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "Ed25519"] = 0; - values[valuesById[1] = "Sr25519"] = 1; - values[valuesById[2] = "Ecdsa"] = 2; - values[valuesById[3] = "Ed25519WrapBytes"] = 3; - values[valuesById[4] = "Sr25519WrapBytes"] = 4; - values[valuesById[5] = "EcdsaWrapBytes"] = 5; - values[valuesById[6] = "Eip712"] = 6; - return values; - })(); - - pruntime_rpc.ContractQueryResponse = (function() { - - /** - * Properties of a ContractQueryResponse. - * @memberof pruntime_rpc - * @interface IContractQueryResponse - * @property {Uint8Array|null} [encodedEncryptedData] ContractQueryResponse encodedEncryptedData - */ - - /** - * Constructs a new ContractQueryResponse. - * @memberof pruntime_rpc - * @classdesc Represents a ContractQueryResponse. - * @implements IContractQueryResponse - * @constructor - * @param {pruntime_rpc.IContractQueryResponse=} [properties] Properties to set - */ - function ContractQueryResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ContractQueryResponse encodedEncryptedData. - * @member {Uint8Array} encodedEncryptedData - * @memberof pruntime_rpc.ContractQueryResponse - * @instance - */ - ContractQueryResponse.prototype.encodedEncryptedData = $util.newBuffer([]); - - /** - * Creates a new ContractQueryResponse instance using the specified properties. - * @function create - * @memberof pruntime_rpc.ContractQueryResponse - * @static - * @param {pruntime_rpc.IContractQueryResponse=} [properties] Properties to set - * @returns {pruntime_rpc.ContractQueryResponse} ContractQueryResponse instance - */ - ContractQueryResponse.create = function create(properties) { - return new ContractQueryResponse(properties); - }; - - /** - * Encodes the specified ContractQueryResponse message. Does not implicitly {@link pruntime_rpc.ContractQueryResponse.verify|verify} messages. - * @function encode - * @memberof pruntime_rpc.ContractQueryResponse - * @static - * @param {pruntime_rpc.IContractQueryResponse} message ContractQueryResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ContractQueryResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.encodedEncryptedData != null && Object.hasOwnProperty.call(message, "encodedEncryptedData")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.encodedEncryptedData); - return writer; - }; - - /** - * Encodes the specified ContractQueryResponse message, length delimited. Does not implicitly {@link pruntime_rpc.ContractQueryResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof pruntime_rpc.ContractQueryResponse - * @static - * @param {pruntime_rpc.IContractQueryResponse} message ContractQueryResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ContractQueryResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ContractQueryResponse message from the specified reader or buffer. - * @function decode - * @memberof pruntime_rpc.ContractQueryResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pruntime_rpc.ContractQueryResponse} ContractQueryResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ContractQueryResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.ContractQueryResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.encodedEncryptedData = reader.bytes(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ContractQueryResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pruntime_rpc.ContractQueryResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.ContractQueryResponse} ContractQueryResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ContractQueryResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ContractQueryResponse message. - * @function verify - * @memberof pruntime_rpc.ContractQueryResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ContractQueryResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.encodedEncryptedData != null && message.hasOwnProperty("encodedEncryptedData")) - if (!(message.encodedEncryptedData && typeof message.encodedEncryptedData.length === "number" || $util.isString(message.encodedEncryptedData))) - return "encodedEncryptedData: buffer expected"; - return null; - }; - - /** - * Creates a ContractQueryResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pruntime_rpc.ContractQueryResponse - * @static - * @param {Object.} object Plain object - * @returns {pruntime_rpc.ContractQueryResponse} ContractQueryResponse - */ - ContractQueryResponse.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.ContractQueryResponse) - return object; - var message = new $root.pruntime_rpc.ContractQueryResponse(); - if (object.encodedEncryptedData != null) - if (typeof object.encodedEncryptedData === "string") - $util.base64.decode(object.encodedEncryptedData, message.encodedEncryptedData = $util.newBuffer($util.base64.length(object.encodedEncryptedData)), 0); - else if (object.encodedEncryptedData.length >= 0) - message.encodedEncryptedData = object.encodedEncryptedData; - return message; - }; - - /** - * Creates a plain object from a ContractQueryResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof pruntime_rpc.ContractQueryResponse - * @static - * @param {pruntime_rpc.ContractQueryResponse} message ContractQueryResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ContractQueryResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - if (options.bytes === String) - object.encodedEncryptedData = ""; - else { - object.encodedEncryptedData = []; - if (options.bytes !== Array) - object.encodedEncryptedData = $util.newBuffer(object.encodedEncryptedData); - } - if (message.encodedEncryptedData != null && message.hasOwnProperty("encodedEncryptedData")) - object.encodedEncryptedData = options.bytes === String ? $util.base64.encode(message.encodedEncryptedData, 0, message.encodedEncryptedData.length) : options.bytes === Array ? Array.prototype.slice.call(message.encodedEncryptedData) : message.encodedEncryptedData; - return object; - }; - - /** - * Converts this ContractQueryResponse to JSON. - * @function toJSON - * @memberof pruntime_rpc.ContractQueryResponse - * @instance - * @returns {Object.} JSON object - */ - ContractQueryResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ContractQueryResponse - * @function getTypeUrl - * @memberof pruntime_rpc.ContractQueryResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ContractQueryResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pruntime_rpc.ContractQueryResponse"; - }; - - return ContractQueryResponse; - })(); - - pruntime_rpc.GetWorkerStateRequest = (function() { - - /** - * Properties of a GetWorkerStateRequest. - * @memberof pruntime_rpc - * @interface IGetWorkerStateRequest - * @property {Uint8Array|null} [publicKey] GetWorkerStateRequest publicKey - */ - - /** - * Constructs a new GetWorkerStateRequest. - * @memberof pruntime_rpc - * @classdesc Represents a GetWorkerStateRequest. - * @implements IGetWorkerStateRequest - * @constructor - * @param {pruntime_rpc.IGetWorkerStateRequest=} [properties] Properties to set - */ - function GetWorkerStateRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetWorkerStateRequest publicKey. - * @member {Uint8Array} publicKey - * @memberof pruntime_rpc.GetWorkerStateRequest - * @instance - */ - GetWorkerStateRequest.prototype.publicKey = $util.newBuffer([]); - - /** - * Creates a new GetWorkerStateRequest instance using the specified properties. - * @function create - * @memberof pruntime_rpc.GetWorkerStateRequest - * @static - * @param {pruntime_rpc.IGetWorkerStateRequest=} [properties] Properties to set - * @returns {pruntime_rpc.GetWorkerStateRequest} GetWorkerStateRequest instance - */ - GetWorkerStateRequest.create = function create(properties) { - return new GetWorkerStateRequest(properties); - }; - - /** - * Encodes the specified GetWorkerStateRequest message. Does not implicitly {@link pruntime_rpc.GetWorkerStateRequest.verify|verify} messages. - * @function encode - * @memberof pruntime_rpc.GetWorkerStateRequest - * @static - * @param {pruntime_rpc.IGetWorkerStateRequest} message GetWorkerStateRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetWorkerStateRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.publicKey != null && Object.hasOwnProperty.call(message, "publicKey")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.publicKey); - return writer; - }; - - /** - * Encodes the specified GetWorkerStateRequest message, length delimited. Does not implicitly {@link pruntime_rpc.GetWorkerStateRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof pruntime_rpc.GetWorkerStateRequest - * @static - * @param {pruntime_rpc.IGetWorkerStateRequest} message GetWorkerStateRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetWorkerStateRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetWorkerStateRequest message from the specified reader or buffer. - * @function decode - * @memberof pruntime_rpc.GetWorkerStateRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pruntime_rpc.GetWorkerStateRequest} GetWorkerStateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetWorkerStateRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.GetWorkerStateRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.publicKey = reader.bytes(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetWorkerStateRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pruntime_rpc.GetWorkerStateRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.GetWorkerStateRequest} GetWorkerStateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetWorkerStateRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetWorkerStateRequest message. - * @function verify - * @memberof pruntime_rpc.GetWorkerStateRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetWorkerStateRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.publicKey != null && message.hasOwnProperty("publicKey")) - if (!(message.publicKey && typeof message.publicKey.length === "number" || $util.isString(message.publicKey))) - return "publicKey: buffer expected"; - return null; - }; - - /** - * Creates a GetWorkerStateRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pruntime_rpc.GetWorkerStateRequest - * @static - * @param {Object.} object Plain object - * @returns {pruntime_rpc.GetWorkerStateRequest} GetWorkerStateRequest - */ - GetWorkerStateRequest.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.GetWorkerStateRequest) - return object; - var message = new $root.pruntime_rpc.GetWorkerStateRequest(); - if (object.publicKey != null) - if (typeof object.publicKey === "string") - $util.base64.decode(object.publicKey, message.publicKey = $util.newBuffer($util.base64.length(object.publicKey)), 0); - else if (object.publicKey.length >= 0) - message.publicKey = object.publicKey; - return message; - }; - - /** - * Creates a plain object from a GetWorkerStateRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof pruntime_rpc.GetWorkerStateRequest - * @static - * @param {pruntime_rpc.GetWorkerStateRequest} message GetWorkerStateRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetWorkerStateRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - if (options.bytes === String) - object.publicKey = ""; - else { - object.publicKey = []; - if (options.bytes !== Array) - object.publicKey = $util.newBuffer(object.publicKey); - } - if (message.publicKey != null && message.hasOwnProperty("publicKey")) - object.publicKey = options.bytes === String ? $util.base64.encode(message.publicKey, 0, message.publicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.publicKey) : message.publicKey; - return object; - }; - - /** - * Converts this GetWorkerStateRequest to JSON. - * @function toJSON - * @memberof pruntime_rpc.GetWorkerStateRequest - * @instance - * @returns {Object.} JSON object - */ - GetWorkerStateRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetWorkerStateRequest - * @function getTypeUrl - * @memberof pruntime_rpc.GetWorkerStateRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetWorkerStateRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pruntime_rpc.GetWorkerStateRequest"; - }; - - return GetWorkerStateRequest; - })(); - - pruntime_rpc.WorkerStat = (function() { - - /** - * Properties of a WorkerStat. - * @memberof pruntime_rpc - * @interface IWorkerStat - * @property {number|null} [lastHeartbeatForBlock] WorkerStat lastHeartbeatForBlock - * @property {number|null} [lastHeartbeatAtBlock] WorkerStat lastHeartbeatAtBlock - * @property {pruntime_rpc.ResponsiveEvent|null} [lastGkResponsiveEvent] WorkerStat lastGkResponsiveEvent - * @property {number|null} [lastGkResponsiveEventAtBlock] WorkerStat lastGkResponsiveEventAtBlock - */ - - /** - * Constructs a new WorkerStat. - * @memberof pruntime_rpc - * @classdesc Represents a WorkerStat. - * @implements IWorkerStat - * @constructor - * @param {pruntime_rpc.IWorkerStat=} [properties] Properties to set - */ - function WorkerStat(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * WorkerStat lastHeartbeatForBlock. - * @member {number} lastHeartbeatForBlock - * @memberof pruntime_rpc.WorkerStat - * @instance - */ - WorkerStat.prototype.lastHeartbeatForBlock = 0; - - /** - * WorkerStat lastHeartbeatAtBlock. - * @member {number} lastHeartbeatAtBlock - * @memberof pruntime_rpc.WorkerStat - * @instance - */ - WorkerStat.prototype.lastHeartbeatAtBlock = 0; - - /** - * WorkerStat lastGkResponsiveEvent. - * @member {pruntime_rpc.ResponsiveEvent} lastGkResponsiveEvent - * @memberof pruntime_rpc.WorkerStat - * @instance - */ - WorkerStat.prototype.lastGkResponsiveEvent = 0; - - /** - * WorkerStat lastGkResponsiveEventAtBlock. - * @member {number} lastGkResponsiveEventAtBlock - * @memberof pruntime_rpc.WorkerStat - * @instance - */ - WorkerStat.prototype.lastGkResponsiveEventAtBlock = 0; - - /** - * Creates a new WorkerStat instance using the specified properties. - * @function create - * @memberof pruntime_rpc.WorkerStat - * @static - * @param {pruntime_rpc.IWorkerStat=} [properties] Properties to set - * @returns {pruntime_rpc.WorkerStat} WorkerStat instance - */ - WorkerStat.create = function create(properties) { - return new WorkerStat(properties); - }; - - /** - * Encodes the specified WorkerStat message. Does not implicitly {@link pruntime_rpc.WorkerStat.verify|verify} messages. - * @function encode - * @memberof pruntime_rpc.WorkerStat - * @static - * @param {pruntime_rpc.IWorkerStat} message WorkerStat message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WorkerStat.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.lastHeartbeatForBlock != null && Object.hasOwnProperty.call(message, "lastHeartbeatForBlock")) - writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.lastHeartbeatForBlock); - if (message.lastHeartbeatAtBlock != null && Object.hasOwnProperty.call(message, "lastHeartbeatAtBlock")) - writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.lastHeartbeatAtBlock); - if (message.lastGkResponsiveEvent != null && Object.hasOwnProperty.call(message, "lastGkResponsiveEvent")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.lastGkResponsiveEvent); - if (message.lastGkResponsiveEventAtBlock != null && Object.hasOwnProperty.call(message, "lastGkResponsiveEventAtBlock")) - writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.lastGkResponsiveEventAtBlock); - return writer; - }; - - /** - * Encodes the specified WorkerStat message, length delimited. Does not implicitly {@link pruntime_rpc.WorkerStat.verify|verify} messages. - * @function encodeDelimited - * @memberof pruntime_rpc.WorkerStat - * @static - * @param {pruntime_rpc.IWorkerStat} message WorkerStat message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WorkerStat.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WorkerStat message from the specified reader or buffer. - * @function decode - * @memberof pruntime_rpc.WorkerStat - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pruntime_rpc.WorkerStat} WorkerStat - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WorkerStat.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.WorkerStat(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.lastHeartbeatForBlock = reader.uint32(); - break; - } - case 2: { - message.lastHeartbeatAtBlock = reader.uint32(); - break; - } - case 3: { - message.lastGkResponsiveEvent = reader.int32(); - break; - } - case 4: { - message.lastGkResponsiveEventAtBlock = reader.uint32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WorkerStat message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pruntime_rpc.WorkerStat - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.WorkerStat} WorkerStat - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WorkerStat.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WorkerStat message. - * @function verify - * @memberof pruntime_rpc.WorkerStat - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WorkerStat.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.lastHeartbeatForBlock != null && message.hasOwnProperty("lastHeartbeatForBlock")) - if (!$util.isInteger(message.lastHeartbeatForBlock)) - return "lastHeartbeatForBlock: integer expected"; - if (message.lastHeartbeatAtBlock != null && message.hasOwnProperty("lastHeartbeatAtBlock")) - if (!$util.isInteger(message.lastHeartbeatAtBlock)) - return "lastHeartbeatAtBlock: integer expected"; - if (message.lastGkResponsiveEvent != null && message.hasOwnProperty("lastGkResponsiveEvent")) - switch (message.lastGkResponsiveEvent) { - default: - return "lastGkResponsiveEvent: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.lastGkResponsiveEventAtBlock != null && message.hasOwnProperty("lastGkResponsiveEventAtBlock")) - if (!$util.isInteger(message.lastGkResponsiveEventAtBlock)) - return "lastGkResponsiveEventAtBlock: integer expected"; - return null; - }; - - /** - * Creates a WorkerStat message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pruntime_rpc.WorkerStat - * @static - * @param {Object.} object Plain object - * @returns {pruntime_rpc.WorkerStat} WorkerStat - */ - WorkerStat.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.WorkerStat) - return object; - var message = new $root.pruntime_rpc.WorkerStat(); - if (object.lastHeartbeatForBlock != null) - message.lastHeartbeatForBlock = object.lastHeartbeatForBlock >>> 0; - if (object.lastHeartbeatAtBlock != null) - message.lastHeartbeatAtBlock = object.lastHeartbeatAtBlock >>> 0; - switch (object.lastGkResponsiveEvent) { - default: - if (typeof object.lastGkResponsiveEvent === "number") { - message.lastGkResponsiveEvent = object.lastGkResponsiveEvent; - break; - } - break; - case "NoEvent": - case 0: - message.lastGkResponsiveEvent = 0; - break; - case "EnterUnresponsive": - case 1: - message.lastGkResponsiveEvent = 1; - break; - case "ExitUnresponsive": - case 2: - message.lastGkResponsiveEvent = 2; - break; - } - if (object.lastGkResponsiveEventAtBlock != null) - message.lastGkResponsiveEventAtBlock = object.lastGkResponsiveEventAtBlock >>> 0; - return message; - }; - - /** - * Creates a plain object from a WorkerStat message. Also converts values to other types if specified. - * @function toObject - * @memberof pruntime_rpc.WorkerStat - * @static - * @param {pruntime_rpc.WorkerStat} message WorkerStat - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WorkerStat.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.lastHeartbeatForBlock = 0; - object.lastHeartbeatAtBlock = 0; - object.lastGkResponsiveEvent = options.enums === String ? "NoEvent" : 0; - object.lastGkResponsiveEventAtBlock = 0; - } - if (message.lastHeartbeatForBlock != null && message.hasOwnProperty("lastHeartbeatForBlock")) - object.lastHeartbeatForBlock = message.lastHeartbeatForBlock; - if (message.lastHeartbeatAtBlock != null && message.hasOwnProperty("lastHeartbeatAtBlock")) - object.lastHeartbeatAtBlock = message.lastHeartbeatAtBlock; - if (message.lastGkResponsiveEvent != null && message.hasOwnProperty("lastGkResponsiveEvent")) - object.lastGkResponsiveEvent = options.enums === String ? $root.pruntime_rpc.ResponsiveEvent[message.lastGkResponsiveEvent] === undefined ? message.lastGkResponsiveEvent : $root.pruntime_rpc.ResponsiveEvent[message.lastGkResponsiveEvent] : message.lastGkResponsiveEvent; - if (message.lastGkResponsiveEventAtBlock != null && message.hasOwnProperty("lastGkResponsiveEventAtBlock")) - object.lastGkResponsiveEventAtBlock = message.lastGkResponsiveEventAtBlock; - return object; - }; - - /** - * Converts this WorkerStat to JSON. - * @function toJSON - * @memberof pruntime_rpc.WorkerStat - * @instance - * @returns {Object.} JSON object - */ - WorkerStat.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for WorkerStat - * @function getTypeUrl - * @memberof pruntime_rpc.WorkerStat - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - WorkerStat.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pruntime_rpc.WorkerStat"; - }; - - return WorkerStat; - })(); - - pruntime_rpc.WorkerState = (function() { - - /** - * Properties of a WorkerState. - * @memberof pruntime_rpc - * @interface IWorkerState - * @property {boolean|null} [registered] WorkerState registered - * @property {boolean|null} [unresponsive] WorkerState unresponsive - * @property {pruntime_rpc.IBenchState|null} [benchState] WorkerState benchState - * @property {pruntime_rpc.IWorkingState|null} [workingState] WorkerState workingState - * @property {Array.|null} [waitingHeartbeats] WorkerState waitingHeartbeats - * @property {pruntime_rpc.ITokenomicInfo|null} [tokenomicInfo] WorkerState tokenomicInfo - * @property {pruntime_rpc.IWorkerStat|null} [stat] WorkerState stat - */ - - /** - * Constructs a new WorkerState. - * @memberof pruntime_rpc - * @classdesc Represents a WorkerState. - * @implements IWorkerState - * @constructor - * @param {pruntime_rpc.IWorkerState=} [properties] Properties to set - */ - function WorkerState(properties) { - this.waitingHeartbeats = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * WorkerState registered. - * @member {boolean} registered - * @memberof pruntime_rpc.WorkerState - * @instance - */ - WorkerState.prototype.registered = false; - - /** - * WorkerState unresponsive. - * @member {boolean} unresponsive - * @memberof pruntime_rpc.WorkerState - * @instance - */ - WorkerState.prototype.unresponsive = false; - - /** - * WorkerState benchState. - * @member {pruntime_rpc.IBenchState|null|undefined} benchState - * @memberof pruntime_rpc.WorkerState - * @instance - */ - WorkerState.prototype.benchState = null; - - /** - * WorkerState workingState. - * @member {pruntime_rpc.IWorkingState|null|undefined} workingState - * @memberof pruntime_rpc.WorkerState - * @instance - */ - WorkerState.prototype.workingState = null; - - /** - * WorkerState waitingHeartbeats. - * @member {Array.} waitingHeartbeats - * @memberof pruntime_rpc.WorkerState - * @instance - */ - WorkerState.prototype.waitingHeartbeats = $util.emptyArray; - - /** - * WorkerState tokenomicInfo. - * @member {pruntime_rpc.ITokenomicInfo|null|undefined} tokenomicInfo - * @memberof pruntime_rpc.WorkerState - * @instance - */ - WorkerState.prototype.tokenomicInfo = null; - - /** - * WorkerState stat. - * @member {pruntime_rpc.IWorkerStat|null|undefined} stat - * @memberof pruntime_rpc.WorkerState - * @instance - */ - WorkerState.prototype.stat = null; - - /** - * Creates a new WorkerState instance using the specified properties. - * @function create - * @memberof pruntime_rpc.WorkerState - * @static - * @param {pruntime_rpc.IWorkerState=} [properties] Properties to set - * @returns {pruntime_rpc.WorkerState} WorkerState instance - */ - WorkerState.create = function create(properties) { - return new WorkerState(properties); - }; - - /** - * Encodes the specified WorkerState message. Does not implicitly {@link pruntime_rpc.WorkerState.verify|verify} messages. - * @function encode - * @memberof pruntime_rpc.WorkerState - * @static - * @param {pruntime_rpc.IWorkerState} message WorkerState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WorkerState.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.registered != null && Object.hasOwnProperty.call(message, "registered")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.registered); - if (message.unresponsive != null && Object.hasOwnProperty.call(message, "unresponsive")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.unresponsive); - if (message.benchState != null && Object.hasOwnProperty.call(message, "benchState")) - $root.pruntime_rpc.BenchState.encode(message.benchState, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.workingState != null && Object.hasOwnProperty.call(message, "workingState")) - $root.pruntime_rpc.WorkingState.encode(message.workingState, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.waitingHeartbeats != null && message.waitingHeartbeats.length) { - writer.uint32(/* id 5, wireType 2 =*/42).fork(); - for (var i = 0; i < message.waitingHeartbeats.length; ++i) - writer.uint32(message.waitingHeartbeats[i]); - writer.ldelim(); - } - if (message.tokenomicInfo != null && Object.hasOwnProperty.call(message, "tokenomicInfo")) - $root.pruntime_rpc.TokenomicInfo.encode(message.tokenomicInfo, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.stat != null && Object.hasOwnProperty.call(message, "stat")) - $root.pruntime_rpc.WorkerStat.encode(message.stat, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified WorkerState message, length delimited. Does not implicitly {@link pruntime_rpc.WorkerState.verify|verify} messages. - * @function encodeDelimited - * @memberof pruntime_rpc.WorkerState - * @static - * @param {pruntime_rpc.IWorkerState} message WorkerState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WorkerState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WorkerState message from the specified reader or buffer. - * @function decode - * @memberof pruntime_rpc.WorkerState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pruntime_rpc.WorkerState} WorkerState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WorkerState.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.WorkerState(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.registered = reader.bool(); - break; - } - case 2: { - message.unresponsive = reader.bool(); - break; - } - case 3: { - message.benchState = $root.pruntime_rpc.BenchState.decode(reader, reader.uint32()); - break; - } - case 4: { - message.workingState = $root.pruntime_rpc.WorkingState.decode(reader, reader.uint32()); - break; - } - case 5: { - if (!(message.waitingHeartbeats && message.waitingHeartbeats.length)) - message.waitingHeartbeats = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.waitingHeartbeats.push(reader.uint32()); - } else - message.waitingHeartbeats.push(reader.uint32()); - break; - } - case 10: { - message.tokenomicInfo = $root.pruntime_rpc.TokenomicInfo.decode(reader, reader.uint32()); - break; - } - case 11: { - message.stat = $root.pruntime_rpc.WorkerStat.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WorkerState message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pruntime_rpc.WorkerState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.WorkerState} WorkerState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WorkerState.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WorkerState message. - * @function verify - * @memberof pruntime_rpc.WorkerState - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WorkerState.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.registered != null && message.hasOwnProperty("registered")) - if (typeof message.registered !== "boolean") - return "registered: boolean expected"; - if (message.unresponsive != null && message.hasOwnProperty("unresponsive")) - if (typeof message.unresponsive !== "boolean") - return "unresponsive: boolean expected"; - if (message.benchState != null && message.hasOwnProperty("benchState")) { - var error = $root.pruntime_rpc.BenchState.verify(message.benchState); - if (error) - return "benchState." + error; - } - if (message.workingState != null && message.hasOwnProperty("workingState")) { - var error = $root.pruntime_rpc.WorkingState.verify(message.workingState); - if (error) - return "workingState." + error; - } - if (message.waitingHeartbeats != null && message.hasOwnProperty("waitingHeartbeats")) { - if (!Array.isArray(message.waitingHeartbeats)) - return "waitingHeartbeats: array expected"; - for (var i = 0; i < message.waitingHeartbeats.length; ++i) - if (!$util.isInteger(message.waitingHeartbeats[i])) - return "waitingHeartbeats: integer[] expected"; - } - if (message.tokenomicInfo != null && message.hasOwnProperty("tokenomicInfo")) { - var error = $root.pruntime_rpc.TokenomicInfo.verify(message.tokenomicInfo); - if (error) - return "tokenomicInfo." + error; - } - if (message.stat != null && message.hasOwnProperty("stat")) { - var error = $root.pruntime_rpc.WorkerStat.verify(message.stat); - if (error) - return "stat." + error; - } - return null; - }; - - /** - * Creates a WorkerState message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pruntime_rpc.WorkerState - * @static - * @param {Object.} object Plain object - * @returns {pruntime_rpc.WorkerState} WorkerState - */ - WorkerState.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.WorkerState) - return object; - var message = new $root.pruntime_rpc.WorkerState(); - if (object.registered != null) - message.registered = Boolean(object.registered); - if (object.unresponsive != null) - message.unresponsive = Boolean(object.unresponsive); - if (object.benchState != null) { - if (typeof object.benchState !== "object") - throw TypeError(".pruntime_rpc.WorkerState.benchState: object expected"); - message.benchState = $root.pruntime_rpc.BenchState.fromObject(object.benchState); - } - if (object.workingState != null) { - if (typeof object.workingState !== "object") - throw TypeError(".pruntime_rpc.WorkerState.workingState: object expected"); - message.workingState = $root.pruntime_rpc.WorkingState.fromObject(object.workingState); - } - if (object.waitingHeartbeats) { - if (!Array.isArray(object.waitingHeartbeats)) - throw TypeError(".pruntime_rpc.WorkerState.waitingHeartbeats: array expected"); - message.waitingHeartbeats = []; - for (var i = 0; i < object.waitingHeartbeats.length; ++i) - message.waitingHeartbeats[i] = object.waitingHeartbeats[i] >>> 0; - } - if (object.tokenomicInfo != null) { - if (typeof object.tokenomicInfo !== "object") - throw TypeError(".pruntime_rpc.WorkerState.tokenomicInfo: object expected"); - message.tokenomicInfo = $root.pruntime_rpc.TokenomicInfo.fromObject(object.tokenomicInfo); - } - if (object.stat != null) { - if (typeof object.stat !== "object") - throw TypeError(".pruntime_rpc.WorkerState.stat: object expected"); - message.stat = $root.pruntime_rpc.WorkerStat.fromObject(object.stat); - } - return message; - }; - - /** - * Creates a plain object from a WorkerState message. Also converts values to other types if specified. - * @function toObject - * @memberof pruntime_rpc.WorkerState - * @static - * @param {pruntime_rpc.WorkerState} message WorkerState - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WorkerState.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.waitingHeartbeats = []; - if (options.defaults) { - object.registered = false; - object.unresponsive = false; - object.benchState = null; - object.workingState = null; - object.tokenomicInfo = null; - object.stat = null; - } - if (message.registered != null && message.hasOwnProperty("registered")) - object.registered = message.registered; - if (message.unresponsive != null && message.hasOwnProperty("unresponsive")) - object.unresponsive = message.unresponsive; - if (message.benchState != null && message.hasOwnProperty("benchState")) - object.benchState = $root.pruntime_rpc.BenchState.toObject(message.benchState, options); - if (message.workingState != null && message.hasOwnProperty("workingState")) - object.workingState = $root.pruntime_rpc.WorkingState.toObject(message.workingState, options); - if (message.waitingHeartbeats && message.waitingHeartbeats.length) { - object.waitingHeartbeats = []; - for (var j = 0; j < message.waitingHeartbeats.length; ++j) - object.waitingHeartbeats[j] = message.waitingHeartbeats[j]; - } - if (message.tokenomicInfo != null && message.hasOwnProperty("tokenomicInfo")) - object.tokenomicInfo = $root.pruntime_rpc.TokenomicInfo.toObject(message.tokenomicInfo, options); - if (message.stat != null && message.hasOwnProperty("stat")) - object.stat = $root.pruntime_rpc.WorkerStat.toObject(message.stat, options); - return object; - }; - - /** - * Converts this WorkerState to JSON. - * @function toJSON - * @memberof pruntime_rpc.WorkerState - * @instance - * @returns {Object.} JSON object - */ - WorkerState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for WorkerState - * @function getTypeUrl - * @memberof pruntime_rpc.WorkerState - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - WorkerState.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pruntime_rpc.WorkerState"; - }; - - return WorkerState; - })(); - - pruntime_rpc.HandoverChallenge = (function() { - - /** - * Properties of a HandoverChallenge. - * @memberof pruntime_rpc - * @interface IHandoverChallenge - * @property {Uint8Array|null} [encodedChallenge] HandoverChallenge encodedChallenge - */ - - /** - * Constructs a new HandoverChallenge. - * @memberof pruntime_rpc - * @classdesc Represents a HandoverChallenge. - * @implements IHandoverChallenge - * @constructor - * @param {pruntime_rpc.IHandoverChallenge=} [properties] Properties to set - */ - function HandoverChallenge(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * HandoverChallenge encodedChallenge. - * @member {Uint8Array} encodedChallenge - * @memberof pruntime_rpc.HandoverChallenge - * @instance - */ - HandoverChallenge.prototype.encodedChallenge = $util.newBuffer([]); - - /** - * Creates a new HandoverChallenge instance using the specified properties. - * @function create - * @memberof pruntime_rpc.HandoverChallenge - * @static - * @param {pruntime_rpc.IHandoverChallenge=} [properties] Properties to set - * @returns {pruntime_rpc.HandoverChallenge} HandoverChallenge instance - */ - HandoverChallenge.create = function create(properties) { - return new HandoverChallenge(properties); - }; - - /** - * Encodes the specified HandoverChallenge message. Does not implicitly {@link pruntime_rpc.HandoverChallenge.verify|verify} messages. - * @function encode - * @memberof pruntime_rpc.HandoverChallenge - * @static - * @param {pruntime_rpc.IHandoverChallenge} message HandoverChallenge message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HandoverChallenge.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.encodedChallenge != null && Object.hasOwnProperty.call(message, "encodedChallenge")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.encodedChallenge); - return writer; - }; - - /** - * Encodes the specified HandoverChallenge message, length delimited. Does not implicitly {@link pruntime_rpc.HandoverChallenge.verify|verify} messages. - * @function encodeDelimited - * @memberof pruntime_rpc.HandoverChallenge - * @static - * @param {pruntime_rpc.IHandoverChallenge} message HandoverChallenge message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HandoverChallenge.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HandoverChallenge message from the specified reader or buffer. - * @function decode - * @memberof pruntime_rpc.HandoverChallenge - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pruntime_rpc.HandoverChallenge} HandoverChallenge - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HandoverChallenge.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.HandoverChallenge(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.encodedChallenge = reader.bytes(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HandoverChallenge message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pruntime_rpc.HandoverChallenge - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.HandoverChallenge} HandoverChallenge - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HandoverChallenge.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HandoverChallenge message. - * @function verify - * @memberof pruntime_rpc.HandoverChallenge - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HandoverChallenge.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.encodedChallenge != null && message.hasOwnProperty("encodedChallenge")) - if (!(message.encodedChallenge && typeof message.encodedChallenge.length === "number" || $util.isString(message.encodedChallenge))) - return "encodedChallenge: buffer expected"; - return null; - }; - - /** - * Creates a HandoverChallenge message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pruntime_rpc.HandoverChallenge - * @static - * @param {Object.} object Plain object - * @returns {pruntime_rpc.HandoverChallenge} HandoverChallenge - */ - HandoverChallenge.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.HandoverChallenge) - return object; - var message = new $root.pruntime_rpc.HandoverChallenge(); - if (object.encodedChallenge != null) - if (typeof object.encodedChallenge === "string") - $util.base64.decode(object.encodedChallenge, message.encodedChallenge = $util.newBuffer($util.base64.length(object.encodedChallenge)), 0); - else if (object.encodedChallenge.length >= 0) - message.encodedChallenge = object.encodedChallenge; - return message; - }; - - /** - * Creates a plain object from a HandoverChallenge message. Also converts values to other types if specified. - * @function toObject - * @memberof pruntime_rpc.HandoverChallenge - * @static - * @param {pruntime_rpc.HandoverChallenge} message HandoverChallenge - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HandoverChallenge.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - if (options.bytes === String) - object.encodedChallenge = ""; - else { - object.encodedChallenge = []; - if (options.bytes !== Array) - object.encodedChallenge = $util.newBuffer(object.encodedChallenge); - } - if (message.encodedChallenge != null && message.hasOwnProperty("encodedChallenge")) - object.encodedChallenge = options.bytes === String ? $util.base64.encode(message.encodedChallenge, 0, message.encodedChallenge.length) : options.bytes === Array ? Array.prototype.slice.call(message.encodedChallenge) : message.encodedChallenge; - return object; - }; - - /** - * Converts this HandoverChallenge to JSON. - * @function toJSON - * @memberof pruntime_rpc.HandoverChallenge - * @instance - * @returns {Object.} JSON object - */ - HandoverChallenge.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for HandoverChallenge - * @function getTypeUrl - * @memberof pruntime_rpc.HandoverChallenge - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - HandoverChallenge.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pruntime_rpc.HandoverChallenge"; - }; - - return HandoverChallenge; - })(); - - pruntime_rpc.HandoverChallengeResponse = (function() { - - /** - * Properties of a HandoverChallengeResponse. - * @memberof pruntime_rpc - * @interface IHandoverChallengeResponse - * @property {Uint8Array|null} [encodedChallengeHandler] HandoverChallengeResponse encodedChallengeHandler - * @property {pruntime_rpc.IAttestation|null} [attestation] HandoverChallengeResponse attestation - */ - - /** - * Constructs a new HandoverChallengeResponse. - * @memberof pruntime_rpc - * @classdesc Represents a HandoverChallengeResponse. - * @implements IHandoverChallengeResponse - * @constructor - * @param {pruntime_rpc.IHandoverChallengeResponse=} [properties] Properties to set - */ - function HandoverChallengeResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * HandoverChallengeResponse encodedChallengeHandler. - * @member {Uint8Array} encodedChallengeHandler - * @memberof pruntime_rpc.HandoverChallengeResponse - * @instance - */ - HandoverChallengeResponse.prototype.encodedChallengeHandler = $util.newBuffer([]); - - /** - * HandoverChallengeResponse attestation. - * @member {pruntime_rpc.IAttestation|null|undefined} attestation - * @memberof pruntime_rpc.HandoverChallengeResponse - * @instance - */ - HandoverChallengeResponse.prototype.attestation = null; - - /** - * Creates a new HandoverChallengeResponse instance using the specified properties. - * @function create - * @memberof pruntime_rpc.HandoverChallengeResponse - * @static - * @param {pruntime_rpc.IHandoverChallengeResponse=} [properties] Properties to set - * @returns {pruntime_rpc.HandoverChallengeResponse} HandoverChallengeResponse instance - */ - HandoverChallengeResponse.create = function create(properties) { - return new HandoverChallengeResponse(properties); - }; - - /** - * Encodes the specified HandoverChallengeResponse message. Does not implicitly {@link pruntime_rpc.HandoverChallengeResponse.verify|verify} messages. - * @function encode - * @memberof pruntime_rpc.HandoverChallengeResponse - * @static - * @param {pruntime_rpc.IHandoverChallengeResponse} message HandoverChallengeResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HandoverChallengeResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.encodedChallengeHandler != null && Object.hasOwnProperty.call(message, "encodedChallengeHandler")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.encodedChallengeHandler); - if (message.attestation != null && Object.hasOwnProperty.call(message, "attestation")) - $root.pruntime_rpc.Attestation.encode(message.attestation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified HandoverChallengeResponse message, length delimited. Does not implicitly {@link pruntime_rpc.HandoverChallengeResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof pruntime_rpc.HandoverChallengeResponse - * @static - * @param {pruntime_rpc.IHandoverChallengeResponse} message HandoverChallengeResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HandoverChallengeResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HandoverChallengeResponse message from the specified reader or buffer. - * @function decode - * @memberof pruntime_rpc.HandoverChallengeResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pruntime_rpc.HandoverChallengeResponse} HandoverChallengeResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HandoverChallengeResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.HandoverChallengeResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.encodedChallengeHandler = reader.bytes(); - break; - } - case 2: { - message.attestation = $root.pruntime_rpc.Attestation.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HandoverChallengeResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pruntime_rpc.HandoverChallengeResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.HandoverChallengeResponse} HandoverChallengeResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HandoverChallengeResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HandoverChallengeResponse message. - * @function verify - * @memberof pruntime_rpc.HandoverChallengeResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HandoverChallengeResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.encodedChallengeHandler != null && message.hasOwnProperty("encodedChallengeHandler")) - if (!(message.encodedChallengeHandler && typeof message.encodedChallengeHandler.length === "number" || $util.isString(message.encodedChallengeHandler))) - return "encodedChallengeHandler: buffer expected"; - if (message.attestation != null && message.hasOwnProperty("attestation")) { - var error = $root.pruntime_rpc.Attestation.verify(message.attestation); - if (error) - return "attestation." + error; - } - return null; - }; - - /** - * Creates a HandoverChallengeResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pruntime_rpc.HandoverChallengeResponse - * @static - * @param {Object.} object Plain object - * @returns {pruntime_rpc.HandoverChallengeResponse} HandoverChallengeResponse - */ - HandoverChallengeResponse.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.HandoverChallengeResponse) - return object; - var message = new $root.pruntime_rpc.HandoverChallengeResponse(); - if (object.encodedChallengeHandler != null) - if (typeof object.encodedChallengeHandler === "string") - $util.base64.decode(object.encodedChallengeHandler, message.encodedChallengeHandler = $util.newBuffer($util.base64.length(object.encodedChallengeHandler)), 0); - else if (object.encodedChallengeHandler.length >= 0) - message.encodedChallengeHandler = object.encodedChallengeHandler; - if (object.attestation != null) { - if (typeof object.attestation !== "object") - throw TypeError(".pruntime_rpc.HandoverChallengeResponse.attestation: object expected"); - message.attestation = $root.pruntime_rpc.Attestation.fromObject(object.attestation); - } - return message; - }; - - /** - * Creates a plain object from a HandoverChallengeResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof pruntime_rpc.HandoverChallengeResponse - * @static - * @param {pruntime_rpc.HandoverChallengeResponse} message HandoverChallengeResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HandoverChallengeResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.encodedChallengeHandler = ""; - else { - object.encodedChallengeHandler = []; - if (options.bytes !== Array) - object.encodedChallengeHandler = $util.newBuffer(object.encodedChallengeHandler); - } - object.attestation = null; - } - if (message.encodedChallengeHandler != null && message.hasOwnProperty("encodedChallengeHandler")) - object.encodedChallengeHandler = options.bytes === String ? $util.base64.encode(message.encodedChallengeHandler, 0, message.encodedChallengeHandler.length) : options.bytes === Array ? Array.prototype.slice.call(message.encodedChallengeHandler) : message.encodedChallengeHandler; - if (message.attestation != null && message.hasOwnProperty("attestation")) - object.attestation = $root.pruntime_rpc.Attestation.toObject(message.attestation, options); - return object; - }; - - /** - * Converts this HandoverChallengeResponse to JSON. - * @function toJSON - * @memberof pruntime_rpc.HandoverChallengeResponse - * @instance - * @returns {Object.} JSON object - */ - HandoverChallengeResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for HandoverChallengeResponse - * @function getTypeUrl - * @memberof pruntime_rpc.HandoverChallengeResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - HandoverChallengeResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pruntime_rpc.HandoverChallengeResponse"; - }; - - return HandoverChallengeResponse; - })(); - - pruntime_rpc.HandoverWorkerKey = (function() { - - /** - * Properties of a HandoverWorkerKey. - * @memberof pruntime_rpc - * @interface IHandoverWorkerKey - * @property {Uint8Array|null} [encodedWorkerKey] HandoverWorkerKey encodedWorkerKey - * @property {pruntime_rpc.IAttestation|null} [attestation] HandoverWorkerKey attestation - */ - - /** - * Constructs a new HandoverWorkerKey. - * @memberof pruntime_rpc - * @classdesc Represents a HandoverWorkerKey. - * @implements IHandoverWorkerKey - * @constructor - * @param {pruntime_rpc.IHandoverWorkerKey=} [properties] Properties to set - */ - function HandoverWorkerKey(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * HandoverWorkerKey encodedWorkerKey. - * @member {Uint8Array} encodedWorkerKey - * @memberof pruntime_rpc.HandoverWorkerKey - * @instance - */ - HandoverWorkerKey.prototype.encodedWorkerKey = $util.newBuffer([]); - - /** - * HandoverWorkerKey attestation. - * @member {pruntime_rpc.IAttestation|null|undefined} attestation - * @memberof pruntime_rpc.HandoverWorkerKey - * @instance - */ - HandoverWorkerKey.prototype.attestation = null; - - /** - * Creates a new HandoverWorkerKey instance using the specified properties. - * @function create - * @memberof pruntime_rpc.HandoverWorkerKey - * @static - * @param {pruntime_rpc.IHandoverWorkerKey=} [properties] Properties to set - * @returns {pruntime_rpc.HandoverWorkerKey} HandoverWorkerKey instance - */ - HandoverWorkerKey.create = function create(properties) { - return new HandoverWorkerKey(properties); - }; - - /** - * Encodes the specified HandoverWorkerKey message. Does not implicitly {@link pruntime_rpc.HandoverWorkerKey.verify|verify} messages. - * @function encode - * @memberof pruntime_rpc.HandoverWorkerKey - * @static - * @param {pruntime_rpc.IHandoverWorkerKey} message HandoverWorkerKey message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HandoverWorkerKey.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.encodedWorkerKey != null && Object.hasOwnProperty.call(message, "encodedWorkerKey")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.encodedWorkerKey); - if (message.attestation != null && Object.hasOwnProperty.call(message, "attestation")) - $root.pruntime_rpc.Attestation.encode(message.attestation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified HandoverWorkerKey message, length delimited. Does not implicitly {@link pruntime_rpc.HandoverWorkerKey.verify|verify} messages. - * @function encodeDelimited - * @memberof pruntime_rpc.HandoverWorkerKey - * @static - * @param {pruntime_rpc.IHandoverWorkerKey} message HandoverWorkerKey message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HandoverWorkerKey.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HandoverWorkerKey message from the specified reader or buffer. - * @function decode - * @memberof pruntime_rpc.HandoverWorkerKey - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pruntime_rpc.HandoverWorkerKey} HandoverWorkerKey - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HandoverWorkerKey.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.HandoverWorkerKey(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.encodedWorkerKey = reader.bytes(); - break; - } - case 2: { - message.attestation = $root.pruntime_rpc.Attestation.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HandoverWorkerKey message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pruntime_rpc.HandoverWorkerKey - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.HandoverWorkerKey} HandoverWorkerKey - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HandoverWorkerKey.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HandoverWorkerKey message. - * @function verify - * @memberof pruntime_rpc.HandoverWorkerKey - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HandoverWorkerKey.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.encodedWorkerKey != null && message.hasOwnProperty("encodedWorkerKey")) - if (!(message.encodedWorkerKey && typeof message.encodedWorkerKey.length === "number" || $util.isString(message.encodedWorkerKey))) - return "encodedWorkerKey: buffer expected"; - if (message.attestation != null && message.hasOwnProperty("attestation")) { - var error = $root.pruntime_rpc.Attestation.verify(message.attestation); - if (error) - return "attestation." + error; - } - return null; - }; - - /** - * Creates a HandoverWorkerKey message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pruntime_rpc.HandoverWorkerKey - * @static - * @param {Object.} object Plain object - * @returns {pruntime_rpc.HandoverWorkerKey} HandoverWorkerKey - */ - HandoverWorkerKey.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.HandoverWorkerKey) - return object; - var message = new $root.pruntime_rpc.HandoverWorkerKey(); - if (object.encodedWorkerKey != null) - if (typeof object.encodedWorkerKey === "string") - $util.base64.decode(object.encodedWorkerKey, message.encodedWorkerKey = $util.newBuffer($util.base64.length(object.encodedWorkerKey)), 0); - else if (object.encodedWorkerKey.length >= 0) - message.encodedWorkerKey = object.encodedWorkerKey; - if (object.attestation != null) { - if (typeof object.attestation !== "object") - throw TypeError(".pruntime_rpc.HandoverWorkerKey.attestation: object expected"); - message.attestation = $root.pruntime_rpc.Attestation.fromObject(object.attestation); - } - return message; - }; - - /** - * Creates a plain object from a HandoverWorkerKey message. Also converts values to other types if specified. - * @function toObject - * @memberof pruntime_rpc.HandoverWorkerKey - * @static - * @param {pruntime_rpc.HandoverWorkerKey} message HandoverWorkerKey - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HandoverWorkerKey.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.encodedWorkerKey = ""; - else { - object.encodedWorkerKey = []; - if (options.bytes !== Array) - object.encodedWorkerKey = $util.newBuffer(object.encodedWorkerKey); - } - object.attestation = null; - } - if (message.encodedWorkerKey != null && message.hasOwnProperty("encodedWorkerKey")) - object.encodedWorkerKey = options.bytes === String ? $util.base64.encode(message.encodedWorkerKey, 0, message.encodedWorkerKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.encodedWorkerKey) : message.encodedWorkerKey; - if (message.attestation != null && message.hasOwnProperty("attestation")) - object.attestation = $root.pruntime_rpc.Attestation.toObject(message.attestation, options); - return object; - }; - - /** - * Converts this HandoverWorkerKey to JSON. - * @function toJSON - * @memberof pruntime_rpc.HandoverWorkerKey - * @instance - * @returns {Object.} JSON object - */ - HandoverWorkerKey.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for HandoverWorkerKey - * @function getTypeUrl - * @memberof pruntime_rpc.HandoverWorkerKey - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - HandoverWorkerKey.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pruntime_rpc.HandoverWorkerKey"; - }; - - return HandoverWorkerKey; - })(); - - pruntime_rpc.BenchState = (function() { - - /** - * Properties of a BenchState. - * @memberof pruntime_rpc - * @interface IBenchState - * @property {number|null} [startBlock] BenchState startBlock - * @property {number|Long|null} [startTime] BenchState startTime - * @property {number|null} [duration] BenchState duration - */ - - /** - * Constructs a new BenchState. - * @memberof pruntime_rpc - * @classdesc Represents a BenchState. - * @implements IBenchState - * @constructor - * @param {pruntime_rpc.IBenchState=} [properties] Properties to set - */ - function BenchState(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BenchState startBlock. - * @member {number} startBlock - * @memberof pruntime_rpc.BenchState - * @instance - */ - BenchState.prototype.startBlock = 0; - - /** - * BenchState startTime. - * @member {number|Long} startTime - * @memberof pruntime_rpc.BenchState - * @instance - */ - BenchState.prototype.startTime = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * BenchState duration. - * @member {number} duration - * @memberof pruntime_rpc.BenchState - * @instance - */ - BenchState.prototype.duration = 0; - - /** - * Creates a new BenchState instance using the specified properties. - * @function create - * @memberof pruntime_rpc.BenchState - * @static - * @param {pruntime_rpc.IBenchState=} [properties] Properties to set - * @returns {pruntime_rpc.BenchState} BenchState instance - */ - BenchState.create = function create(properties) { - return new BenchState(properties); - }; - - /** - * Encodes the specified BenchState message. Does not implicitly {@link pruntime_rpc.BenchState.verify|verify} messages. - * @function encode - * @memberof pruntime_rpc.BenchState - * @static - * @param {pruntime_rpc.IBenchState} message BenchState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BenchState.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.startBlock != null && Object.hasOwnProperty.call(message, "startBlock")) - writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.startBlock); - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.startTime); - if (message.duration != null && Object.hasOwnProperty.call(message, "duration")) - writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.duration); - return writer; - }; - - /** - * Encodes the specified BenchState message, length delimited. Does not implicitly {@link pruntime_rpc.BenchState.verify|verify} messages. - * @function encodeDelimited - * @memberof pruntime_rpc.BenchState - * @static - * @param {pruntime_rpc.IBenchState} message BenchState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BenchState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BenchState message from the specified reader or buffer. - * @function decode - * @memberof pruntime_rpc.BenchState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pruntime_rpc.BenchState} BenchState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BenchState.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.BenchState(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.startBlock = reader.uint32(); - break; - } - case 2: { - message.startTime = reader.uint64(); - break; - } - case 4: { - message.duration = reader.uint32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BenchState message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pruntime_rpc.BenchState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.BenchState} BenchState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BenchState.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BenchState message. - * @function verify - * @memberof pruntime_rpc.BenchState - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BenchState.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.startBlock != null && message.hasOwnProperty("startBlock")) - if (!$util.isInteger(message.startBlock)) - return "startBlock: integer expected"; - if (message.startTime != null && message.hasOwnProperty("startTime")) - if (!$util.isInteger(message.startTime) && !(message.startTime && $util.isInteger(message.startTime.low) && $util.isInteger(message.startTime.high))) - return "startTime: integer|Long expected"; - if (message.duration != null && message.hasOwnProperty("duration")) - if (!$util.isInteger(message.duration)) - return "duration: integer expected"; - return null; - }; - - /** - * Creates a BenchState message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pruntime_rpc.BenchState - * @static - * @param {Object.} object Plain object - * @returns {pruntime_rpc.BenchState} BenchState - */ - BenchState.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.BenchState) - return object; - var message = new $root.pruntime_rpc.BenchState(); - if (object.startBlock != null) - message.startBlock = object.startBlock >>> 0; - if (object.startTime != null) - if ($util.Long) - (message.startTime = $util.Long.fromValue(object.startTime)).unsigned = true; - else if (typeof object.startTime === "string") - message.startTime = parseInt(object.startTime, 10); - else if (typeof object.startTime === "number") - message.startTime = object.startTime; - else if (typeof object.startTime === "object") - message.startTime = new $util.LongBits(object.startTime.low >>> 0, object.startTime.high >>> 0).toNumber(true); - if (object.duration != null) - message.duration = object.duration >>> 0; - return message; - }; - - /** - * Creates a plain object from a BenchState message. Also converts values to other types if specified. - * @function toObject - * @memberof pruntime_rpc.BenchState - * @static - * @param {pruntime_rpc.BenchState} message BenchState - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BenchState.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.startBlock = 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.startTime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.startTime = options.longs === String ? "0" : 0; - object.duration = 0; - } - if (message.startBlock != null && message.hasOwnProperty("startBlock")) - object.startBlock = message.startBlock; - if (message.startTime != null && message.hasOwnProperty("startTime")) - if (typeof message.startTime === "number") - object.startTime = options.longs === String ? String(message.startTime) : message.startTime; - else - object.startTime = options.longs === String ? $util.Long.prototype.toString.call(message.startTime) : options.longs === Number ? new $util.LongBits(message.startTime.low >>> 0, message.startTime.high >>> 0).toNumber(true) : message.startTime; - if (message.duration != null && message.hasOwnProperty("duration")) - object.duration = message.duration; - return object; - }; - - /** - * Converts this BenchState to JSON. - * @function toJSON - * @memberof pruntime_rpc.BenchState - * @instance - * @returns {Object.} JSON object - */ - BenchState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BenchState - * @function getTypeUrl - * @memberof pruntime_rpc.BenchState - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BenchState.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pruntime_rpc.BenchState"; - }; - - return BenchState; - })(); - - pruntime_rpc.WorkingState = (function() { - - /** - * Properties of a WorkingState. - * @memberof pruntime_rpc - * @interface IWorkingState - * @property {number|null} [sessionId] WorkingState sessionId - * @property {boolean|null} [paused] WorkingState paused - * @property {number|Long|null} [startTime] WorkingState startTime - */ - - /** - * Constructs a new WorkingState. - * @memberof pruntime_rpc - * @classdesc Represents a WorkingState. - * @implements IWorkingState - * @constructor - * @param {pruntime_rpc.IWorkingState=} [properties] Properties to set - */ - function WorkingState(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * WorkingState sessionId. - * @member {number} sessionId - * @memberof pruntime_rpc.WorkingState - * @instance - */ - WorkingState.prototype.sessionId = 0; - - /** - * WorkingState paused. - * @member {boolean} paused - * @memberof pruntime_rpc.WorkingState - * @instance - */ - WorkingState.prototype.paused = false; - - /** - * WorkingState startTime. - * @member {number|Long} startTime - * @memberof pruntime_rpc.WorkingState - * @instance - */ - WorkingState.prototype.startTime = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Creates a new WorkingState instance using the specified properties. - * @function create - * @memberof pruntime_rpc.WorkingState - * @static - * @param {pruntime_rpc.IWorkingState=} [properties] Properties to set - * @returns {pruntime_rpc.WorkingState} WorkingState instance - */ - WorkingState.create = function create(properties) { - return new WorkingState(properties); - }; - - /** - * Encodes the specified WorkingState message. Does not implicitly {@link pruntime_rpc.WorkingState.verify|verify} messages. - * @function encode - * @memberof pruntime_rpc.WorkingState - * @static - * @param {pruntime_rpc.IWorkingState} message WorkingState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WorkingState.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.sessionId != null && Object.hasOwnProperty.call(message, "sessionId")) - writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.sessionId); - if (message.paused != null && Object.hasOwnProperty.call(message, "paused")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.paused); - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.startTime); - return writer; - }; - - /** - * Encodes the specified WorkingState message, length delimited. Does not implicitly {@link pruntime_rpc.WorkingState.verify|verify} messages. - * @function encodeDelimited - * @memberof pruntime_rpc.WorkingState - * @static - * @param {pruntime_rpc.IWorkingState} message WorkingState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WorkingState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WorkingState message from the specified reader or buffer. - * @function decode - * @memberof pruntime_rpc.WorkingState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pruntime_rpc.WorkingState} WorkingState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WorkingState.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.WorkingState(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.sessionId = reader.uint32(); - break; - } - case 2: { - message.paused = reader.bool(); - break; - } - case 3: { - message.startTime = reader.uint64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WorkingState message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pruntime_rpc.WorkingState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.WorkingState} WorkingState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WorkingState.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WorkingState message. - * @function verify - * @memberof pruntime_rpc.WorkingState - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WorkingState.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.sessionId != null && message.hasOwnProperty("sessionId")) - if (!$util.isInteger(message.sessionId)) - return "sessionId: integer expected"; - if (message.paused != null && message.hasOwnProperty("paused")) - if (typeof message.paused !== "boolean") - return "paused: boolean expected"; - if (message.startTime != null && message.hasOwnProperty("startTime")) - if (!$util.isInteger(message.startTime) && !(message.startTime && $util.isInteger(message.startTime.low) && $util.isInteger(message.startTime.high))) - return "startTime: integer|Long expected"; - return null; - }; - - /** - * Creates a WorkingState message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pruntime_rpc.WorkingState - * @static - * @param {Object.} object Plain object - * @returns {pruntime_rpc.WorkingState} WorkingState - */ - WorkingState.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.WorkingState) - return object; - var message = new $root.pruntime_rpc.WorkingState(); - if (object.sessionId != null) - message.sessionId = object.sessionId >>> 0; - if (object.paused != null) - message.paused = Boolean(object.paused); - if (object.startTime != null) - if ($util.Long) - (message.startTime = $util.Long.fromValue(object.startTime)).unsigned = true; - else if (typeof object.startTime === "string") - message.startTime = parseInt(object.startTime, 10); - else if (typeof object.startTime === "number") - message.startTime = object.startTime; - else if (typeof object.startTime === "object") - message.startTime = new $util.LongBits(object.startTime.low >>> 0, object.startTime.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a WorkingState message. Also converts values to other types if specified. - * @function toObject - * @memberof pruntime_rpc.WorkingState - * @static - * @param {pruntime_rpc.WorkingState} message WorkingState - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WorkingState.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.sessionId = 0; - object.paused = false; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.startTime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.startTime = options.longs === String ? "0" : 0; - } - if (message.sessionId != null && message.hasOwnProperty("sessionId")) - object.sessionId = message.sessionId; - if (message.paused != null && message.hasOwnProperty("paused")) - object.paused = message.paused; - if (message.startTime != null && message.hasOwnProperty("startTime")) - if (typeof message.startTime === "number") - object.startTime = options.longs === String ? String(message.startTime) : message.startTime; - else - object.startTime = options.longs === String ? $util.Long.prototype.toString.call(message.startTime) : options.longs === Number ? new $util.LongBits(message.startTime.low >>> 0, message.startTime.high >>> 0).toNumber(true) : message.startTime; - return object; - }; - - /** - * Converts this WorkingState to JSON. - * @function toJSON - * @memberof pruntime_rpc.WorkingState - * @instance - * @returns {Object.} JSON object - */ - WorkingState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for WorkingState - * @function getTypeUrl - * @memberof pruntime_rpc.WorkingState - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - WorkingState.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pruntime_rpc.WorkingState"; - }; - - return WorkingState; - })(); - - pruntime_rpc.EchoMessage = (function() { - - /** - * Properties of an EchoMessage. - * @memberof pruntime_rpc - * @interface IEchoMessage - * @property {Uint8Array|null} [echoMsg] EchoMessage echoMsg - */ - - /** - * Constructs a new EchoMessage. - * @memberof pruntime_rpc - * @classdesc Represents an EchoMessage. - * @implements IEchoMessage - * @constructor - * @param {pruntime_rpc.IEchoMessage=} [properties] Properties to set - */ - function EchoMessage(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EchoMessage echoMsg. - * @member {Uint8Array} echoMsg - * @memberof pruntime_rpc.EchoMessage - * @instance - */ - EchoMessage.prototype.echoMsg = $util.newBuffer([]); - - /** - * Creates a new EchoMessage instance using the specified properties. - * @function create - * @memberof pruntime_rpc.EchoMessage - * @static - * @param {pruntime_rpc.IEchoMessage=} [properties] Properties to set - * @returns {pruntime_rpc.EchoMessage} EchoMessage instance - */ - EchoMessage.create = function create(properties) { - return new EchoMessage(properties); - }; - - /** - * Encodes the specified EchoMessage message. Does not implicitly {@link pruntime_rpc.EchoMessage.verify|verify} messages. - * @function encode - * @memberof pruntime_rpc.EchoMessage - * @static - * @param {pruntime_rpc.IEchoMessage} message EchoMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EchoMessage.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.echoMsg != null && Object.hasOwnProperty.call(message, "echoMsg")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.echoMsg); - return writer; - }; - - /** - * Encodes the specified EchoMessage message, length delimited. Does not implicitly {@link pruntime_rpc.EchoMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof pruntime_rpc.EchoMessage - * @static - * @param {pruntime_rpc.IEchoMessage} message EchoMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EchoMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EchoMessage message from the specified reader or buffer. - * @function decode - * @memberof pruntime_rpc.EchoMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pruntime_rpc.EchoMessage} EchoMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EchoMessage.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.EchoMessage(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.echoMsg = reader.bytes(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EchoMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pruntime_rpc.EchoMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.EchoMessage} EchoMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EchoMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EchoMessage message. - * @function verify - * @memberof pruntime_rpc.EchoMessage - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EchoMessage.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.echoMsg != null && message.hasOwnProperty("echoMsg")) - if (!(message.echoMsg && typeof message.echoMsg.length === "number" || $util.isString(message.echoMsg))) - return "echoMsg: buffer expected"; - return null; - }; - - /** - * Creates an EchoMessage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pruntime_rpc.EchoMessage - * @static - * @param {Object.} object Plain object - * @returns {pruntime_rpc.EchoMessage} EchoMessage - */ - EchoMessage.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.EchoMessage) - return object; - var message = new $root.pruntime_rpc.EchoMessage(); - if (object.echoMsg != null) - if (typeof object.echoMsg === "string") - $util.base64.decode(object.echoMsg, message.echoMsg = $util.newBuffer($util.base64.length(object.echoMsg)), 0); - else if (object.echoMsg.length >= 0) - message.echoMsg = object.echoMsg; - return message; - }; - - /** - * Creates a plain object from an EchoMessage message. Also converts values to other types if specified. - * @function toObject - * @memberof pruntime_rpc.EchoMessage - * @static - * @param {pruntime_rpc.EchoMessage} message EchoMessage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EchoMessage.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - if (options.bytes === String) - object.echoMsg = ""; - else { - object.echoMsg = []; - if (options.bytes !== Array) - object.echoMsg = $util.newBuffer(object.echoMsg); - } - if (message.echoMsg != null && message.hasOwnProperty("echoMsg")) - object.echoMsg = options.bytes === String ? $util.base64.encode(message.echoMsg, 0, message.echoMsg.length) : options.bytes === Array ? Array.prototype.slice.call(message.echoMsg) : message.echoMsg; - return object; - }; - - /** - * Converts this EchoMessage to JSON. - * @function toJSON - * @memberof pruntime_rpc.EchoMessage - * @instance - * @returns {Object.} JSON object - */ - EchoMessage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EchoMessage - * @function getTypeUrl - * @memberof pruntime_rpc.EchoMessage - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EchoMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pruntime_rpc.EchoMessage"; - }; - - return EchoMessage; - })(); - - /** - * ResponsiveEvent enum. - * @name pruntime_rpc.ResponsiveEvent - * @enum {number} - * @property {number} NoEvent=0 NoEvent value - * @property {number} EnterUnresponsive=1 EnterUnresponsive value - * @property {number} ExitUnresponsive=2 ExitUnresponsive value - */ - pruntime_rpc.ResponsiveEvent = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NoEvent"] = 0; - values[valuesById[1] = "EnterUnresponsive"] = 1; - values[valuesById[2] = "ExitUnresponsive"] = 2; - return values; - })(); - - pruntime_rpc.AddEndpointRequest = (function() { - - /** - * Properties of an AddEndpointRequest. - * @memberof pruntime_rpc - * @interface IAddEndpointRequest - * @property {Uint8Array|null} [encodedEndpointType] AddEndpointRequest encodedEndpointType - * @property {string|null} [endpoint] AddEndpointRequest endpoint - */ - - /** - * Constructs a new AddEndpointRequest. - * @memberof pruntime_rpc - * @classdesc Represents an AddEndpointRequest. - * @implements IAddEndpointRequest - * @constructor - * @param {pruntime_rpc.IAddEndpointRequest=} [properties] Properties to set - */ - function AddEndpointRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AddEndpointRequest encodedEndpointType. - * @member {Uint8Array} encodedEndpointType - * @memberof pruntime_rpc.AddEndpointRequest - * @instance - */ - AddEndpointRequest.prototype.encodedEndpointType = $util.newBuffer([]); - - /** - * AddEndpointRequest endpoint. - * @member {string} endpoint - * @memberof pruntime_rpc.AddEndpointRequest - * @instance - */ - AddEndpointRequest.prototype.endpoint = ""; - - /** - * Creates a new AddEndpointRequest instance using the specified properties. - * @function create - * @memberof pruntime_rpc.AddEndpointRequest - * @static - * @param {pruntime_rpc.IAddEndpointRequest=} [properties] Properties to set - * @returns {pruntime_rpc.AddEndpointRequest} AddEndpointRequest instance - */ - AddEndpointRequest.create = function create(properties) { - return new AddEndpointRequest(properties); - }; - - /** - * Encodes the specified AddEndpointRequest message. Does not implicitly {@link pruntime_rpc.AddEndpointRequest.verify|verify} messages. - * @function encode - * @memberof pruntime_rpc.AddEndpointRequest - * @static - * @param {pruntime_rpc.IAddEndpointRequest} message AddEndpointRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AddEndpointRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.encodedEndpointType != null && Object.hasOwnProperty.call(message, "encodedEndpointType")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.encodedEndpointType); - if (message.endpoint != null && Object.hasOwnProperty.call(message, "endpoint")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.endpoint); - return writer; - }; - - /** - * Encodes the specified AddEndpointRequest message, length delimited. Does not implicitly {@link pruntime_rpc.AddEndpointRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof pruntime_rpc.AddEndpointRequest - * @static - * @param {pruntime_rpc.IAddEndpointRequest} message AddEndpointRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AddEndpointRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AddEndpointRequest message from the specified reader or buffer. - * @function decode - * @memberof pruntime_rpc.AddEndpointRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pruntime_rpc.AddEndpointRequest} AddEndpointRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AddEndpointRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.AddEndpointRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.encodedEndpointType = reader.bytes(); - break; - } - case 2: { - message.endpoint = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AddEndpointRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pruntime_rpc.AddEndpointRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.AddEndpointRequest} AddEndpointRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AddEndpointRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AddEndpointRequest message. - * @function verify - * @memberof pruntime_rpc.AddEndpointRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AddEndpointRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.encodedEndpointType != null && message.hasOwnProperty("encodedEndpointType")) - if (!(message.encodedEndpointType && typeof message.encodedEndpointType.length === "number" || $util.isString(message.encodedEndpointType))) - return "encodedEndpointType: buffer expected"; - if (message.endpoint != null && message.hasOwnProperty("endpoint")) - if (!$util.isString(message.endpoint)) - return "endpoint: string expected"; - return null; - }; - - /** - * Creates an AddEndpointRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pruntime_rpc.AddEndpointRequest - * @static - * @param {Object.} object Plain object - * @returns {pruntime_rpc.AddEndpointRequest} AddEndpointRequest - */ - AddEndpointRequest.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.AddEndpointRequest) - return object; - var message = new $root.pruntime_rpc.AddEndpointRequest(); - if (object.encodedEndpointType != null) - if (typeof object.encodedEndpointType === "string") - $util.base64.decode(object.encodedEndpointType, message.encodedEndpointType = $util.newBuffer($util.base64.length(object.encodedEndpointType)), 0); - else if (object.encodedEndpointType.length >= 0) - message.encodedEndpointType = object.encodedEndpointType; - if (object.endpoint != null) - message.endpoint = String(object.endpoint); - return message; - }; - - /** - * Creates a plain object from an AddEndpointRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof pruntime_rpc.AddEndpointRequest - * @static - * @param {pruntime_rpc.AddEndpointRequest} message AddEndpointRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AddEndpointRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.encodedEndpointType = ""; - else { - object.encodedEndpointType = []; - if (options.bytes !== Array) - object.encodedEndpointType = $util.newBuffer(object.encodedEndpointType); - } - object.endpoint = ""; - } - if (message.encodedEndpointType != null && message.hasOwnProperty("encodedEndpointType")) - object.encodedEndpointType = options.bytes === String ? $util.base64.encode(message.encodedEndpointType, 0, message.encodedEndpointType.length) : options.bytes === Array ? Array.prototype.slice.call(message.encodedEndpointType) : message.encodedEndpointType; - if (message.endpoint != null && message.hasOwnProperty("endpoint")) - object.endpoint = message.endpoint; - return object; - }; - - /** - * Converts this AddEndpointRequest to JSON. - * @function toJSON - * @memberof pruntime_rpc.AddEndpointRequest - * @instance - * @returns {Object.} JSON object - */ - AddEndpointRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AddEndpointRequest - * @function getTypeUrl - * @memberof pruntime_rpc.AddEndpointRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AddEndpointRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pruntime_rpc.AddEndpointRequest"; - }; - - return AddEndpointRequest; - })(); - - pruntime_rpc.GetEndpointResponse = (function() { - - /** - * Properties of a GetEndpointResponse. - * @memberof pruntime_rpc - * @interface IGetEndpointResponse - * @property {Uint8Array|null} [encodedEndpointPayload] GetEndpointResponse encodedEndpointPayload - * @property {Uint8Array|null} [signature] GetEndpointResponse signature - */ - - /** - * Constructs a new GetEndpointResponse. - * @memberof pruntime_rpc - * @classdesc Represents a GetEndpointResponse. - * @implements IGetEndpointResponse - * @constructor - * @param {pruntime_rpc.IGetEndpointResponse=} [properties] Properties to set - */ - function GetEndpointResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetEndpointResponse encodedEndpointPayload. - * @member {Uint8Array|null|undefined} encodedEndpointPayload - * @memberof pruntime_rpc.GetEndpointResponse - * @instance - */ - GetEndpointResponse.prototype.encodedEndpointPayload = null; - - /** - * GetEndpointResponse signature. - * @member {Uint8Array|null|undefined} signature - * @memberof pruntime_rpc.GetEndpointResponse - * @instance - */ - GetEndpointResponse.prototype.signature = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * GetEndpointResponse _encodedEndpointPayload. - * @member {"encodedEndpointPayload"|undefined} _encodedEndpointPayload - * @memberof pruntime_rpc.GetEndpointResponse - * @instance - */ - Object.defineProperty(GetEndpointResponse.prototype, "_encodedEndpointPayload", { - get: $util.oneOfGetter($oneOfFields = ["encodedEndpointPayload"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * GetEndpointResponse _signature. - * @member {"signature"|undefined} _signature - * @memberof pruntime_rpc.GetEndpointResponse - * @instance - */ - Object.defineProperty(GetEndpointResponse.prototype, "_signature", { - get: $util.oneOfGetter($oneOfFields = ["signature"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new GetEndpointResponse instance using the specified properties. - * @function create - * @memberof pruntime_rpc.GetEndpointResponse - * @static - * @param {pruntime_rpc.IGetEndpointResponse=} [properties] Properties to set - * @returns {pruntime_rpc.GetEndpointResponse} GetEndpointResponse instance - */ - GetEndpointResponse.create = function create(properties) { - return new GetEndpointResponse(properties); - }; - - /** - * Encodes the specified GetEndpointResponse message. Does not implicitly {@link pruntime_rpc.GetEndpointResponse.verify|verify} messages. - * @function encode - * @memberof pruntime_rpc.GetEndpointResponse - * @static - * @param {pruntime_rpc.IGetEndpointResponse} message GetEndpointResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetEndpointResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.encodedEndpointPayload != null && Object.hasOwnProperty.call(message, "encodedEndpointPayload")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.encodedEndpointPayload); - if (message.signature != null && Object.hasOwnProperty.call(message, "signature")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.signature); - return writer; - }; - - /** - * Encodes the specified GetEndpointResponse message, length delimited. Does not implicitly {@link pruntime_rpc.GetEndpointResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof pruntime_rpc.GetEndpointResponse - * @static - * @param {pruntime_rpc.IGetEndpointResponse} message GetEndpointResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetEndpointResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetEndpointResponse message from the specified reader or buffer. - * @function decode - * @memberof pruntime_rpc.GetEndpointResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pruntime_rpc.GetEndpointResponse} GetEndpointResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetEndpointResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.GetEndpointResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.encodedEndpointPayload = reader.bytes(); - break; - } - case 2: { - message.signature = reader.bytes(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetEndpointResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pruntime_rpc.GetEndpointResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.GetEndpointResponse} GetEndpointResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetEndpointResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetEndpointResponse message. - * @function verify - * @memberof pruntime_rpc.GetEndpointResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetEndpointResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.encodedEndpointPayload != null && message.hasOwnProperty("encodedEndpointPayload")) { - properties._encodedEndpointPayload = 1; - if (!(message.encodedEndpointPayload && typeof message.encodedEndpointPayload.length === "number" || $util.isString(message.encodedEndpointPayload))) - return "encodedEndpointPayload: buffer expected"; - } - if (message.signature != null && message.hasOwnProperty("signature")) { - properties._signature = 1; - if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature))) - return "signature: buffer expected"; - } - return null; - }; - - /** - * Creates a GetEndpointResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pruntime_rpc.GetEndpointResponse - * @static - * @param {Object.} object Plain object - * @returns {pruntime_rpc.GetEndpointResponse} GetEndpointResponse - */ - GetEndpointResponse.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.GetEndpointResponse) - return object; - var message = new $root.pruntime_rpc.GetEndpointResponse(); - if (object.encodedEndpointPayload != null) - if (typeof object.encodedEndpointPayload === "string") - $util.base64.decode(object.encodedEndpointPayload, message.encodedEndpointPayload = $util.newBuffer($util.base64.length(object.encodedEndpointPayload)), 0); - else if (object.encodedEndpointPayload.length >= 0) - message.encodedEndpointPayload = object.encodedEndpointPayload; - if (object.signature != null) - if (typeof object.signature === "string") - $util.base64.decode(object.signature, message.signature = $util.newBuffer($util.base64.length(object.signature)), 0); - else if (object.signature.length >= 0) - message.signature = object.signature; - return message; - }; - - /** - * Creates a plain object from a GetEndpointResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof pruntime_rpc.GetEndpointResponse - * @static - * @param {pruntime_rpc.GetEndpointResponse} message GetEndpointResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetEndpointResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.encodedEndpointPayload != null && message.hasOwnProperty("encodedEndpointPayload")) { - object.encodedEndpointPayload = options.bytes === String ? $util.base64.encode(message.encodedEndpointPayload, 0, message.encodedEndpointPayload.length) : options.bytes === Array ? Array.prototype.slice.call(message.encodedEndpointPayload) : message.encodedEndpointPayload; - if (options.oneofs) - object._encodedEndpointPayload = "encodedEndpointPayload"; - } - if (message.signature != null && message.hasOwnProperty("signature")) { - object.signature = options.bytes === String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature) : message.signature; - if (options.oneofs) - object._signature = "signature"; - } - return object; - }; - - /** - * Converts this GetEndpointResponse to JSON. - * @function toJSON - * @memberof pruntime_rpc.GetEndpointResponse - * @instance - * @returns {Object.} JSON object - */ - GetEndpointResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetEndpointResponse - * @function getTypeUrl - * @memberof pruntime_rpc.GetEndpointResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetEndpointResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pruntime_rpc.GetEndpointResponse"; - }; - - return GetEndpointResponse; - })(); - - pruntime_rpc.SignEndpointsRequest = (function() { - - /** - * Properties of a SignEndpointsRequest. - * @memberof pruntime_rpc - * @interface ISignEndpointsRequest - * @property {Uint8Array|null} [encodedEndpoints] SignEndpointsRequest encodedEndpoints - */ - - /** - * Constructs a new SignEndpointsRequest. - * @memberof pruntime_rpc - * @classdesc Represents a SignEndpointsRequest. - * @implements ISignEndpointsRequest - * @constructor - * @param {pruntime_rpc.ISignEndpointsRequest=} [properties] Properties to set - */ - function SignEndpointsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SignEndpointsRequest encodedEndpoints. - * @member {Uint8Array} encodedEndpoints - * @memberof pruntime_rpc.SignEndpointsRequest - * @instance - */ - SignEndpointsRequest.prototype.encodedEndpoints = $util.newBuffer([]); - - /** - * Creates a new SignEndpointsRequest instance using the specified properties. - * @function create - * @memberof pruntime_rpc.SignEndpointsRequest - * @static - * @param {pruntime_rpc.ISignEndpointsRequest=} [properties] Properties to set - * @returns {pruntime_rpc.SignEndpointsRequest} SignEndpointsRequest instance - */ - SignEndpointsRequest.create = function create(properties) { - return new SignEndpointsRequest(properties); - }; - - /** - * Encodes the specified SignEndpointsRequest message. Does not implicitly {@link pruntime_rpc.SignEndpointsRequest.verify|verify} messages. - * @function encode - * @memberof pruntime_rpc.SignEndpointsRequest - * @static - * @param {pruntime_rpc.ISignEndpointsRequest} message SignEndpointsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SignEndpointsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.encodedEndpoints != null && Object.hasOwnProperty.call(message, "encodedEndpoints")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.encodedEndpoints); - return writer; - }; - - /** - * Encodes the specified SignEndpointsRequest message, length delimited. Does not implicitly {@link pruntime_rpc.SignEndpointsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof pruntime_rpc.SignEndpointsRequest - * @static - * @param {pruntime_rpc.ISignEndpointsRequest} message SignEndpointsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SignEndpointsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SignEndpointsRequest message from the specified reader or buffer. - * @function decode - * @memberof pruntime_rpc.SignEndpointsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pruntime_rpc.SignEndpointsRequest} SignEndpointsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SignEndpointsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.SignEndpointsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.encodedEndpoints = reader.bytes(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SignEndpointsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pruntime_rpc.SignEndpointsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.SignEndpointsRequest} SignEndpointsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SignEndpointsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SignEndpointsRequest message. - * @function verify - * @memberof pruntime_rpc.SignEndpointsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SignEndpointsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.encodedEndpoints != null && message.hasOwnProperty("encodedEndpoints")) - if (!(message.encodedEndpoints && typeof message.encodedEndpoints.length === "number" || $util.isString(message.encodedEndpoints))) - return "encodedEndpoints: buffer expected"; - return null; - }; - - /** - * Creates a SignEndpointsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pruntime_rpc.SignEndpointsRequest - * @static - * @param {Object.} object Plain object - * @returns {pruntime_rpc.SignEndpointsRequest} SignEndpointsRequest - */ - SignEndpointsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.SignEndpointsRequest) - return object; - var message = new $root.pruntime_rpc.SignEndpointsRequest(); - if (object.encodedEndpoints != null) - if (typeof object.encodedEndpoints === "string") - $util.base64.decode(object.encodedEndpoints, message.encodedEndpoints = $util.newBuffer($util.base64.length(object.encodedEndpoints)), 0); - else if (object.encodedEndpoints.length >= 0) - message.encodedEndpoints = object.encodedEndpoints; - return message; - }; - - /** - * Creates a plain object from a SignEndpointsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof pruntime_rpc.SignEndpointsRequest - * @static - * @param {pruntime_rpc.SignEndpointsRequest} message SignEndpointsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SignEndpointsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - if (options.bytes === String) - object.encodedEndpoints = ""; - else { - object.encodedEndpoints = []; - if (options.bytes !== Array) - object.encodedEndpoints = $util.newBuffer(object.encodedEndpoints); - } - if (message.encodedEndpoints != null && message.hasOwnProperty("encodedEndpoints")) - object.encodedEndpoints = options.bytes === String ? $util.base64.encode(message.encodedEndpoints, 0, message.encodedEndpoints.length) : options.bytes === Array ? Array.prototype.slice.call(message.encodedEndpoints) : message.encodedEndpoints; - return object; - }; - - /** - * Converts this SignEndpointsRequest to JSON. - * @function toJSON - * @memberof pruntime_rpc.SignEndpointsRequest - * @instance - * @returns {Object.} JSON object - */ - SignEndpointsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SignEndpointsRequest - * @function getTypeUrl - * @memberof pruntime_rpc.SignEndpointsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SignEndpointsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pruntime_rpc.SignEndpointsRequest"; - }; - - return SignEndpointsRequest; - })(); - - pruntime_rpc.DerivePhalaI2pKeyResponse = (function() { - - /** - * Properties of a DerivePhalaI2pKeyResponse. - * @memberof pruntime_rpc - * @interface IDerivePhalaI2pKeyResponse - * @property {Uint8Array|null} [phalaI2pKey] DerivePhalaI2pKeyResponse phalaI2pKey - */ - - /** - * Constructs a new DerivePhalaI2pKeyResponse. - * @memberof pruntime_rpc - * @classdesc Represents a DerivePhalaI2pKeyResponse. - * @implements IDerivePhalaI2pKeyResponse - * @constructor - * @param {pruntime_rpc.IDerivePhalaI2pKeyResponse=} [properties] Properties to set - */ - function DerivePhalaI2pKeyResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DerivePhalaI2pKeyResponse phalaI2pKey. - * @member {Uint8Array} phalaI2pKey - * @memberof pruntime_rpc.DerivePhalaI2pKeyResponse - * @instance - */ - DerivePhalaI2pKeyResponse.prototype.phalaI2pKey = $util.newBuffer([]); - - /** - * Creates a new DerivePhalaI2pKeyResponse instance using the specified properties. - * @function create - * @memberof pruntime_rpc.DerivePhalaI2pKeyResponse - * @static - * @param {pruntime_rpc.IDerivePhalaI2pKeyResponse=} [properties] Properties to set - * @returns {pruntime_rpc.DerivePhalaI2pKeyResponse} DerivePhalaI2pKeyResponse instance - */ - DerivePhalaI2pKeyResponse.create = function create(properties) { - return new DerivePhalaI2pKeyResponse(properties); - }; - - /** - * Encodes the specified DerivePhalaI2pKeyResponse message. Does not implicitly {@link pruntime_rpc.DerivePhalaI2pKeyResponse.verify|verify} messages. - * @function encode - * @memberof pruntime_rpc.DerivePhalaI2pKeyResponse - * @static - * @param {pruntime_rpc.IDerivePhalaI2pKeyResponse} message DerivePhalaI2pKeyResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DerivePhalaI2pKeyResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.phalaI2pKey != null && Object.hasOwnProperty.call(message, "phalaI2pKey")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.phalaI2pKey); - return writer; - }; - - /** - * Encodes the specified DerivePhalaI2pKeyResponse message, length delimited. Does not implicitly {@link pruntime_rpc.DerivePhalaI2pKeyResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof pruntime_rpc.DerivePhalaI2pKeyResponse - * @static - * @param {pruntime_rpc.IDerivePhalaI2pKeyResponse} message DerivePhalaI2pKeyResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DerivePhalaI2pKeyResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DerivePhalaI2pKeyResponse message from the specified reader or buffer. - * @function decode - * @memberof pruntime_rpc.DerivePhalaI2pKeyResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pruntime_rpc.DerivePhalaI2pKeyResponse} DerivePhalaI2pKeyResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DerivePhalaI2pKeyResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.DerivePhalaI2pKeyResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.phalaI2pKey = reader.bytes(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DerivePhalaI2pKeyResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pruntime_rpc.DerivePhalaI2pKeyResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.DerivePhalaI2pKeyResponse} DerivePhalaI2pKeyResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DerivePhalaI2pKeyResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DerivePhalaI2pKeyResponse message. - * @function verify - * @memberof pruntime_rpc.DerivePhalaI2pKeyResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DerivePhalaI2pKeyResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.phalaI2pKey != null && message.hasOwnProperty("phalaI2pKey")) - if (!(message.phalaI2pKey && typeof message.phalaI2pKey.length === "number" || $util.isString(message.phalaI2pKey))) - return "phalaI2pKey: buffer expected"; - return null; - }; - - /** - * Creates a DerivePhalaI2pKeyResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pruntime_rpc.DerivePhalaI2pKeyResponse - * @static - * @param {Object.} object Plain object - * @returns {pruntime_rpc.DerivePhalaI2pKeyResponse} DerivePhalaI2pKeyResponse - */ - DerivePhalaI2pKeyResponse.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.DerivePhalaI2pKeyResponse) - return object; - var message = new $root.pruntime_rpc.DerivePhalaI2pKeyResponse(); - if (object.phalaI2pKey != null) - if (typeof object.phalaI2pKey === "string") - $util.base64.decode(object.phalaI2pKey, message.phalaI2pKey = $util.newBuffer($util.base64.length(object.phalaI2pKey)), 0); - else if (object.phalaI2pKey.length >= 0) - message.phalaI2pKey = object.phalaI2pKey; - return message; - }; - - /** - * Creates a plain object from a DerivePhalaI2pKeyResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof pruntime_rpc.DerivePhalaI2pKeyResponse - * @static - * @param {pruntime_rpc.DerivePhalaI2pKeyResponse} message DerivePhalaI2pKeyResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DerivePhalaI2pKeyResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - if (options.bytes === String) - object.phalaI2pKey = ""; - else { - object.phalaI2pKey = []; - if (options.bytes !== Array) - object.phalaI2pKey = $util.newBuffer(object.phalaI2pKey); - } - if (message.phalaI2pKey != null && message.hasOwnProperty("phalaI2pKey")) - object.phalaI2pKey = options.bytes === String ? $util.base64.encode(message.phalaI2pKey, 0, message.phalaI2pKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.phalaI2pKey) : message.phalaI2pKey; - return object; - }; - - /** - * Converts this DerivePhalaI2pKeyResponse to JSON. - * @function toJSON - * @memberof pruntime_rpc.DerivePhalaI2pKeyResponse - * @instance - * @returns {Object.} JSON object - */ - DerivePhalaI2pKeyResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DerivePhalaI2pKeyResponse - * @function getTypeUrl - * @memberof pruntime_rpc.DerivePhalaI2pKeyResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DerivePhalaI2pKeyResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pruntime_rpc.DerivePhalaI2pKeyResponse"; - }; - - return DerivePhalaI2pKeyResponse; - })(); - - pruntime_rpc.TokenomicStat = (function() { - - /** - * Properties of a TokenomicStat. - * @memberof pruntime_rpc - * @interface ITokenomicStat - * @property {string|null} [lastPayout] TokenomicStat lastPayout - * @property {number|null} [lastPayoutAtBlock] TokenomicStat lastPayoutAtBlock - * @property {string|null} [totalPayout] TokenomicStat totalPayout - * @property {number|null} [totalPayoutCount] TokenomicStat totalPayoutCount - * @property {string|null} [lastSlash] TokenomicStat lastSlash - * @property {number|null} [lastSlashAtBlock] TokenomicStat lastSlashAtBlock - * @property {string|null} [totalSlash] TokenomicStat totalSlash - * @property {number|null} [totalSlashCount] TokenomicStat totalSlashCount - */ - - /** - * Constructs a new TokenomicStat. - * @memberof pruntime_rpc - * @classdesc Represents a TokenomicStat. - * @implements ITokenomicStat - * @constructor - * @param {pruntime_rpc.ITokenomicStat=} [properties] Properties to set - */ - function TokenomicStat(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TokenomicStat lastPayout. - * @member {string} lastPayout - * @memberof pruntime_rpc.TokenomicStat - * @instance - */ - TokenomicStat.prototype.lastPayout = ""; - - /** - * TokenomicStat lastPayoutAtBlock. - * @member {number} lastPayoutAtBlock - * @memberof pruntime_rpc.TokenomicStat - * @instance - */ - TokenomicStat.prototype.lastPayoutAtBlock = 0; - - /** - * TokenomicStat totalPayout. - * @member {string} totalPayout - * @memberof pruntime_rpc.TokenomicStat - * @instance - */ - TokenomicStat.prototype.totalPayout = ""; - - /** - * TokenomicStat totalPayoutCount. - * @member {number} totalPayoutCount - * @memberof pruntime_rpc.TokenomicStat - * @instance - */ - TokenomicStat.prototype.totalPayoutCount = 0; - - /** - * TokenomicStat lastSlash. - * @member {string} lastSlash - * @memberof pruntime_rpc.TokenomicStat - * @instance - */ - TokenomicStat.prototype.lastSlash = ""; - - /** - * TokenomicStat lastSlashAtBlock. - * @member {number} lastSlashAtBlock - * @memberof pruntime_rpc.TokenomicStat - * @instance - */ - TokenomicStat.prototype.lastSlashAtBlock = 0; - - /** - * TokenomicStat totalSlash. - * @member {string} totalSlash - * @memberof pruntime_rpc.TokenomicStat - * @instance - */ - TokenomicStat.prototype.totalSlash = ""; - - /** - * TokenomicStat totalSlashCount. - * @member {number} totalSlashCount - * @memberof pruntime_rpc.TokenomicStat - * @instance - */ - TokenomicStat.prototype.totalSlashCount = 0; - - /** - * Creates a new TokenomicStat instance using the specified properties. - * @function create - * @memberof pruntime_rpc.TokenomicStat - * @static - * @param {pruntime_rpc.ITokenomicStat=} [properties] Properties to set - * @returns {pruntime_rpc.TokenomicStat} TokenomicStat instance - */ - TokenomicStat.create = function create(properties) { - return new TokenomicStat(properties); - }; - - /** - * Encodes the specified TokenomicStat message. Does not implicitly {@link pruntime_rpc.TokenomicStat.verify|verify} messages. - * @function encode - * @memberof pruntime_rpc.TokenomicStat - * @static - * @param {pruntime_rpc.ITokenomicStat} message TokenomicStat message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TokenomicStat.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.lastPayout != null && Object.hasOwnProperty.call(message, "lastPayout")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.lastPayout); - if (message.lastPayoutAtBlock != null && Object.hasOwnProperty.call(message, "lastPayoutAtBlock")) - writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.lastPayoutAtBlock); - if (message.totalPayout != null && Object.hasOwnProperty.call(message, "totalPayout")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.totalPayout); - if (message.totalPayoutCount != null && Object.hasOwnProperty.call(message, "totalPayoutCount")) - writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.totalPayoutCount); - if (message.lastSlash != null && Object.hasOwnProperty.call(message, "lastSlash")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.lastSlash); - if (message.lastSlashAtBlock != null && Object.hasOwnProperty.call(message, "lastSlashAtBlock")) - writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.lastSlashAtBlock); - if (message.totalSlash != null && Object.hasOwnProperty.call(message, "totalSlash")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.totalSlash); - if (message.totalSlashCount != null && Object.hasOwnProperty.call(message, "totalSlashCount")) - writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.totalSlashCount); - return writer; - }; - - /** - * Encodes the specified TokenomicStat message, length delimited. Does not implicitly {@link pruntime_rpc.TokenomicStat.verify|verify} messages. - * @function encodeDelimited - * @memberof pruntime_rpc.TokenomicStat - * @static - * @param {pruntime_rpc.ITokenomicStat} message TokenomicStat message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TokenomicStat.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TokenomicStat message from the specified reader or buffer. - * @function decode - * @memberof pruntime_rpc.TokenomicStat - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pruntime_rpc.TokenomicStat} TokenomicStat - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TokenomicStat.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.TokenomicStat(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.lastPayout = reader.string(); - break; - } - case 2: { - message.lastPayoutAtBlock = reader.uint32(); - break; - } - case 3: { - message.totalPayout = reader.string(); - break; - } - case 4: { - message.totalPayoutCount = reader.uint32(); - break; - } - case 5: { - message.lastSlash = reader.string(); - break; - } - case 6: { - message.lastSlashAtBlock = reader.uint32(); - break; - } - case 7: { - message.totalSlash = reader.string(); - break; - } - case 8: { - message.totalSlashCount = reader.uint32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TokenomicStat message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pruntime_rpc.TokenomicStat - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.TokenomicStat} TokenomicStat - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TokenomicStat.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TokenomicStat message. - * @function verify - * @memberof pruntime_rpc.TokenomicStat - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TokenomicStat.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.lastPayout != null && message.hasOwnProperty("lastPayout")) - if (!$util.isString(message.lastPayout)) - return "lastPayout: string expected"; - if (message.lastPayoutAtBlock != null && message.hasOwnProperty("lastPayoutAtBlock")) - if (!$util.isInteger(message.lastPayoutAtBlock)) - return "lastPayoutAtBlock: integer expected"; - if (message.totalPayout != null && message.hasOwnProperty("totalPayout")) - if (!$util.isString(message.totalPayout)) - return "totalPayout: string expected"; - if (message.totalPayoutCount != null && message.hasOwnProperty("totalPayoutCount")) - if (!$util.isInteger(message.totalPayoutCount)) - return "totalPayoutCount: integer expected"; - if (message.lastSlash != null && message.hasOwnProperty("lastSlash")) - if (!$util.isString(message.lastSlash)) - return "lastSlash: string expected"; - if (message.lastSlashAtBlock != null && message.hasOwnProperty("lastSlashAtBlock")) - if (!$util.isInteger(message.lastSlashAtBlock)) - return "lastSlashAtBlock: integer expected"; - if (message.totalSlash != null && message.hasOwnProperty("totalSlash")) - if (!$util.isString(message.totalSlash)) - return "totalSlash: string expected"; - if (message.totalSlashCount != null && message.hasOwnProperty("totalSlashCount")) - if (!$util.isInteger(message.totalSlashCount)) - return "totalSlashCount: integer expected"; - return null; - }; - - /** - * Creates a TokenomicStat message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pruntime_rpc.TokenomicStat - * @static - * @param {Object.} object Plain object - * @returns {pruntime_rpc.TokenomicStat} TokenomicStat - */ - TokenomicStat.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.TokenomicStat) - return object; - var message = new $root.pruntime_rpc.TokenomicStat(); - if (object.lastPayout != null) - message.lastPayout = String(object.lastPayout); - if (object.lastPayoutAtBlock != null) - message.lastPayoutAtBlock = object.lastPayoutAtBlock >>> 0; - if (object.totalPayout != null) - message.totalPayout = String(object.totalPayout); - if (object.totalPayoutCount != null) - message.totalPayoutCount = object.totalPayoutCount >>> 0; - if (object.lastSlash != null) - message.lastSlash = String(object.lastSlash); - if (object.lastSlashAtBlock != null) - message.lastSlashAtBlock = object.lastSlashAtBlock >>> 0; - if (object.totalSlash != null) - message.totalSlash = String(object.totalSlash); - if (object.totalSlashCount != null) - message.totalSlashCount = object.totalSlashCount >>> 0; - return message; - }; - - /** - * Creates a plain object from a TokenomicStat message. Also converts values to other types if specified. - * @function toObject - * @memberof pruntime_rpc.TokenomicStat - * @static - * @param {pruntime_rpc.TokenomicStat} message TokenomicStat - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TokenomicStat.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.lastPayout = ""; - object.lastPayoutAtBlock = 0; - object.totalPayout = ""; - object.totalPayoutCount = 0; - object.lastSlash = ""; - object.lastSlashAtBlock = 0; - object.totalSlash = ""; - object.totalSlashCount = 0; - } - if (message.lastPayout != null && message.hasOwnProperty("lastPayout")) - object.lastPayout = message.lastPayout; - if (message.lastPayoutAtBlock != null && message.hasOwnProperty("lastPayoutAtBlock")) - object.lastPayoutAtBlock = message.lastPayoutAtBlock; - if (message.totalPayout != null && message.hasOwnProperty("totalPayout")) - object.totalPayout = message.totalPayout; - if (message.totalPayoutCount != null && message.hasOwnProperty("totalPayoutCount")) - object.totalPayoutCount = message.totalPayoutCount; - if (message.lastSlash != null && message.hasOwnProperty("lastSlash")) - object.lastSlash = message.lastSlash; - if (message.lastSlashAtBlock != null && message.hasOwnProperty("lastSlashAtBlock")) - object.lastSlashAtBlock = message.lastSlashAtBlock; - if (message.totalSlash != null && message.hasOwnProperty("totalSlash")) - object.totalSlash = message.totalSlash; - if (message.totalSlashCount != null && message.hasOwnProperty("totalSlashCount")) - object.totalSlashCount = message.totalSlashCount; - return object; - }; - - /** - * Converts this TokenomicStat to JSON. - * @function toJSON - * @memberof pruntime_rpc.TokenomicStat - * @instance - * @returns {Object.} JSON object - */ - TokenomicStat.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TokenomicStat - * @function getTypeUrl - * @memberof pruntime_rpc.TokenomicStat - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TokenomicStat.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pruntime_rpc.TokenomicStat"; - }; - - return TokenomicStat; - })(); - - pruntime_rpc.TokenomicInfo = (function() { - - /** - * Properties of a TokenomicInfo. - * @memberof pruntime_rpc - * @interface ITokenomicInfo - * @property {string|null} [v] TokenomicInfo v - * @property {string|null} [vInit] TokenomicInfo vInit - * @property {string|null} [vDeductible] TokenomicInfo vDeductible - * @property {string|null} [share] TokenomicInfo share - * @property {number|Long|null} [vUpdateAt] TokenomicInfo vUpdateAt - * @property {number|null} [vUpdateBlock] TokenomicInfo vUpdateBlock - * @property {number|Long|null} [iterationLast] TokenomicInfo iterationLast - * @property {number|Long|null} [challengeTimeLast] TokenomicInfo challengeTimeLast - * @property {string|null} [pBench] TokenomicInfo pBench - * @property {string|null} [pInstant] TokenomicInfo pInstant - * @property {number|null} [confidenceLevel] TokenomicInfo confidenceLevel - * @property {pruntime_rpc.ITokenomicStat|null} [stat] TokenomicInfo stat - */ - - /** - * Constructs a new TokenomicInfo. - * @memberof pruntime_rpc - * @classdesc Represents a TokenomicInfo. - * @implements ITokenomicInfo - * @constructor - * @param {pruntime_rpc.ITokenomicInfo=} [properties] Properties to set - */ - function TokenomicInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TokenomicInfo v. - * @member {string} v - * @memberof pruntime_rpc.TokenomicInfo - * @instance - */ - TokenomicInfo.prototype.v = ""; - - /** - * TokenomicInfo vInit. - * @member {string} vInit - * @memberof pruntime_rpc.TokenomicInfo - * @instance - */ - TokenomicInfo.prototype.vInit = ""; - - /** - * TokenomicInfo vDeductible. - * @member {string} vDeductible - * @memberof pruntime_rpc.TokenomicInfo - * @instance - */ - TokenomicInfo.prototype.vDeductible = ""; - - /** - * TokenomicInfo share. - * @member {string} share - * @memberof pruntime_rpc.TokenomicInfo - * @instance - */ - TokenomicInfo.prototype.share = ""; - - /** - * TokenomicInfo vUpdateAt. - * @member {number|Long} vUpdateAt - * @memberof pruntime_rpc.TokenomicInfo - * @instance - */ - TokenomicInfo.prototype.vUpdateAt = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * TokenomicInfo vUpdateBlock. - * @member {number} vUpdateBlock - * @memberof pruntime_rpc.TokenomicInfo - * @instance - */ - TokenomicInfo.prototype.vUpdateBlock = 0; - - /** - * TokenomicInfo iterationLast. - * @member {number|Long} iterationLast - * @memberof pruntime_rpc.TokenomicInfo - * @instance - */ - TokenomicInfo.prototype.iterationLast = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * TokenomicInfo challengeTimeLast. - * @member {number|Long} challengeTimeLast - * @memberof pruntime_rpc.TokenomicInfo - * @instance - */ - TokenomicInfo.prototype.challengeTimeLast = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * TokenomicInfo pBench. - * @member {string} pBench - * @memberof pruntime_rpc.TokenomicInfo - * @instance - */ - TokenomicInfo.prototype.pBench = ""; - - /** - * TokenomicInfo pInstant. - * @member {string} pInstant - * @memberof pruntime_rpc.TokenomicInfo - * @instance - */ - TokenomicInfo.prototype.pInstant = ""; - - /** - * TokenomicInfo confidenceLevel. - * @member {number} confidenceLevel - * @memberof pruntime_rpc.TokenomicInfo - * @instance - */ - TokenomicInfo.prototype.confidenceLevel = 0; - - /** - * TokenomicInfo stat. - * @member {pruntime_rpc.ITokenomicStat|null|undefined} stat - * @memberof pruntime_rpc.TokenomicInfo - * @instance - */ - TokenomicInfo.prototype.stat = null; - - /** - * Creates a new TokenomicInfo instance using the specified properties. - * @function create - * @memberof pruntime_rpc.TokenomicInfo - * @static - * @param {pruntime_rpc.ITokenomicInfo=} [properties] Properties to set - * @returns {pruntime_rpc.TokenomicInfo} TokenomicInfo instance - */ - TokenomicInfo.create = function create(properties) { - return new TokenomicInfo(properties); - }; - - /** - * Encodes the specified TokenomicInfo message. Does not implicitly {@link pruntime_rpc.TokenomicInfo.verify|verify} messages. - * @function encode - * @memberof pruntime_rpc.TokenomicInfo - * @static - * @param {pruntime_rpc.ITokenomicInfo} message TokenomicInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TokenomicInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.v != null && Object.hasOwnProperty.call(message, "v")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.v); - if (message.vInit != null && Object.hasOwnProperty.call(message, "vInit")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.vInit); - if (message.vUpdateAt != null && Object.hasOwnProperty.call(message, "vUpdateAt")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.vUpdateAt); - if (message.vUpdateBlock != null && Object.hasOwnProperty.call(message, "vUpdateBlock")) - writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.vUpdateBlock); - if (message.iterationLast != null && Object.hasOwnProperty.call(message, "iterationLast")) - writer.uint32(/* id 6, wireType 0 =*/48).uint64(message.iterationLast); - if (message.challengeTimeLast != null && Object.hasOwnProperty.call(message, "challengeTimeLast")) - writer.uint32(/* id 7, wireType 0 =*/56).uint64(message.challengeTimeLast); - if (message.pBench != null && Object.hasOwnProperty.call(message, "pBench")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.pBench); - if (message.pInstant != null && Object.hasOwnProperty.call(message, "pInstant")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.pInstant); - if (message.confidenceLevel != null && Object.hasOwnProperty.call(message, "confidenceLevel")) - writer.uint32(/* id 10, wireType 0 =*/80).uint32(message.confidenceLevel); - if (message.vDeductible != null && Object.hasOwnProperty.call(message, "vDeductible")) - writer.uint32(/* id 19, wireType 2 =*/154).string(message.vDeductible); - if (message.share != null && Object.hasOwnProperty.call(message, "share")) - writer.uint32(/* id 20, wireType 2 =*/162).string(message.share); - if (message.stat != null && Object.hasOwnProperty.call(message, "stat")) - $root.pruntime_rpc.TokenomicStat.encode(message.stat, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified TokenomicInfo message, length delimited. Does not implicitly {@link pruntime_rpc.TokenomicInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof pruntime_rpc.TokenomicInfo - * @static - * @param {pruntime_rpc.ITokenomicInfo} message TokenomicInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TokenomicInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TokenomicInfo message from the specified reader or buffer. - * @function decode - * @memberof pruntime_rpc.TokenomicInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pruntime_rpc.TokenomicInfo} TokenomicInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TokenomicInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.TokenomicInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.v = reader.string(); - break; - } - case 2: { - message.vInit = reader.string(); - break; - } - case 19: { - message.vDeductible = reader.string(); - break; - } - case 20: { - message.share = reader.string(); - break; - } - case 4: { - message.vUpdateAt = reader.uint64(); - break; - } - case 5: { - message.vUpdateBlock = reader.uint32(); - break; - } - case 6: { - message.iterationLast = reader.uint64(); - break; - } - case 7: { - message.challengeTimeLast = reader.uint64(); - break; - } - case 8: { - message.pBench = reader.string(); - break; - } - case 9: { - message.pInstant = reader.string(); - break; - } - case 10: { - message.confidenceLevel = reader.uint32(); - break; - } - case 21: { - message.stat = $root.pruntime_rpc.TokenomicStat.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TokenomicInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pruntime_rpc.TokenomicInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.TokenomicInfo} TokenomicInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TokenomicInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TokenomicInfo message. - * @function verify - * @memberof pruntime_rpc.TokenomicInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TokenomicInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.v != null && message.hasOwnProperty("v")) - if (!$util.isString(message.v)) - return "v: string expected"; - if (message.vInit != null && message.hasOwnProperty("vInit")) - if (!$util.isString(message.vInit)) - return "vInit: string expected"; - if (message.vDeductible != null && message.hasOwnProperty("vDeductible")) - if (!$util.isString(message.vDeductible)) - return "vDeductible: string expected"; - if (message.share != null && message.hasOwnProperty("share")) - if (!$util.isString(message.share)) - return "share: string expected"; - if (message.vUpdateAt != null && message.hasOwnProperty("vUpdateAt")) - if (!$util.isInteger(message.vUpdateAt) && !(message.vUpdateAt && $util.isInteger(message.vUpdateAt.low) && $util.isInteger(message.vUpdateAt.high))) - return "vUpdateAt: integer|Long expected"; - if (message.vUpdateBlock != null && message.hasOwnProperty("vUpdateBlock")) - if (!$util.isInteger(message.vUpdateBlock)) - return "vUpdateBlock: integer expected"; - if (message.iterationLast != null && message.hasOwnProperty("iterationLast")) - if (!$util.isInteger(message.iterationLast) && !(message.iterationLast && $util.isInteger(message.iterationLast.low) && $util.isInteger(message.iterationLast.high))) - return "iterationLast: integer|Long expected"; - if (message.challengeTimeLast != null && message.hasOwnProperty("challengeTimeLast")) - if (!$util.isInteger(message.challengeTimeLast) && !(message.challengeTimeLast && $util.isInteger(message.challengeTimeLast.low) && $util.isInteger(message.challengeTimeLast.high))) - return "challengeTimeLast: integer|Long expected"; - if (message.pBench != null && message.hasOwnProperty("pBench")) - if (!$util.isString(message.pBench)) - return "pBench: string expected"; - if (message.pInstant != null && message.hasOwnProperty("pInstant")) - if (!$util.isString(message.pInstant)) - return "pInstant: string expected"; - if (message.confidenceLevel != null && message.hasOwnProperty("confidenceLevel")) - if (!$util.isInteger(message.confidenceLevel)) - return "confidenceLevel: integer expected"; - if (message.stat != null && message.hasOwnProperty("stat")) { - var error = $root.pruntime_rpc.TokenomicStat.verify(message.stat); - if (error) - return "stat." + error; - } - return null; - }; - - /** - * Creates a TokenomicInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pruntime_rpc.TokenomicInfo - * @static - * @param {Object.} object Plain object - * @returns {pruntime_rpc.TokenomicInfo} TokenomicInfo - */ - TokenomicInfo.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.TokenomicInfo) - return object; - var message = new $root.pruntime_rpc.TokenomicInfo(); - if (object.v != null) - message.v = String(object.v); - if (object.vInit != null) - message.vInit = String(object.vInit); - if (object.vDeductible != null) - message.vDeductible = String(object.vDeductible); - if (object.share != null) - message.share = String(object.share); - if (object.vUpdateAt != null) - if ($util.Long) - (message.vUpdateAt = $util.Long.fromValue(object.vUpdateAt)).unsigned = true; - else if (typeof object.vUpdateAt === "string") - message.vUpdateAt = parseInt(object.vUpdateAt, 10); - else if (typeof object.vUpdateAt === "number") - message.vUpdateAt = object.vUpdateAt; - else if (typeof object.vUpdateAt === "object") - message.vUpdateAt = new $util.LongBits(object.vUpdateAt.low >>> 0, object.vUpdateAt.high >>> 0).toNumber(true); - if (object.vUpdateBlock != null) - message.vUpdateBlock = object.vUpdateBlock >>> 0; - if (object.iterationLast != null) - if ($util.Long) - (message.iterationLast = $util.Long.fromValue(object.iterationLast)).unsigned = true; - else if (typeof object.iterationLast === "string") - message.iterationLast = parseInt(object.iterationLast, 10); - else if (typeof object.iterationLast === "number") - message.iterationLast = object.iterationLast; - else if (typeof object.iterationLast === "object") - message.iterationLast = new $util.LongBits(object.iterationLast.low >>> 0, object.iterationLast.high >>> 0).toNumber(true); - if (object.challengeTimeLast != null) - if ($util.Long) - (message.challengeTimeLast = $util.Long.fromValue(object.challengeTimeLast)).unsigned = true; - else if (typeof object.challengeTimeLast === "string") - message.challengeTimeLast = parseInt(object.challengeTimeLast, 10); - else if (typeof object.challengeTimeLast === "number") - message.challengeTimeLast = object.challengeTimeLast; - else if (typeof object.challengeTimeLast === "object") - message.challengeTimeLast = new $util.LongBits(object.challengeTimeLast.low >>> 0, object.challengeTimeLast.high >>> 0).toNumber(true); - if (object.pBench != null) - message.pBench = String(object.pBench); - if (object.pInstant != null) - message.pInstant = String(object.pInstant); - if (object.confidenceLevel != null) - message.confidenceLevel = object.confidenceLevel >>> 0; - if (object.stat != null) { - if (typeof object.stat !== "object") - throw TypeError(".pruntime_rpc.TokenomicInfo.stat: object expected"); - message.stat = $root.pruntime_rpc.TokenomicStat.fromObject(object.stat); - } - return message; - }; - - /** - * Creates a plain object from a TokenomicInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof pruntime_rpc.TokenomicInfo - * @static - * @param {pruntime_rpc.TokenomicInfo} message TokenomicInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TokenomicInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.v = ""; - object.vInit = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.vUpdateAt = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.vUpdateAt = options.longs === String ? "0" : 0; - object.vUpdateBlock = 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.iterationLast = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.iterationLast = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.challengeTimeLast = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.challengeTimeLast = options.longs === String ? "0" : 0; - object.pBench = ""; - object.pInstant = ""; - object.confidenceLevel = 0; - object.vDeductible = ""; - object.share = ""; - object.stat = null; - } - if (message.v != null && message.hasOwnProperty("v")) - object.v = message.v; - if (message.vInit != null && message.hasOwnProperty("vInit")) - object.vInit = message.vInit; - if (message.vUpdateAt != null && message.hasOwnProperty("vUpdateAt")) - if (typeof message.vUpdateAt === "number") - object.vUpdateAt = options.longs === String ? String(message.vUpdateAt) : message.vUpdateAt; - else - object.vUpdateAt = options.longs === String ? $util.Long.prototype.toString.call(message.vUpdateAt) : options.longs === Number ? new $util.LongBits(message.vUpdateAt.low >>> 0, message.vUpdateAt.high >>> 0).toNumber(true) : message.vUpdateAt; - if (message.vUpdateBlock != null && message.hasOwnProperty("vUpdateBlock")) - object.vUpdateBlock = message.vUpdateBlock; - if (message.iterationLast != null && message.hasOwnProperty("iterationLast")) - if (typeof message.iterationLast === "number") - object.iterationLast = options.longs === String ? String(message.iterationLast) : message.iterationLast; - else - object.iterationLast = options.longs === String ? $util.Long.prototype.toString.call(message.iterationLast) : options.longs === Number ? new $util.LongBits(message.iterationLast.low >>> 0, message.iterationLast.high >>> 0).toNumber(true) : message.iterationLast; - if (message.challengeTimeLast != null && message.hasOwnProperty("challengeTimeLast")) - if (typeof message.challengeTimeLast === "number") - object.challengeTimeLast = options.longs === String ? String(message.challengeTimeLast) : message.challengeTimeLast; - else - object.challengeTimeLast = options.longs === String ? $util.Long.prototype.toString.call(message.challengeTimeLast) : options.longs === Number ? new $util.LongBits(message.challengeTimeLast.low >>> 0, message.challengeTimeLast.high >>> 0).toNumber(true) : message.challengeTimeLast; - if (message.pBench != null && message.hasOwnProperty("pBench")) - object.pBench = message.pBench; - if (message.pInstant != null && message.hasOwnProperty("pInstant")) - object.pInstant = message.pInstant; - if (message.confidenceLevel != null && message.hasOwnProperty("confidenceLevel")) - object.confidenceLevel = message.confidenceLevel; - if (message.vDeductible != null && message.hasOwnProperty("vDeductible")) - object.vDeductible = message.vDeductible; - if (message.share != null && message.hasOwnProperty("share")) - object.share = message.share; - if (message.stat != null && message.hasOwnProperty("stat")) - object.stat = $root.pruntime_rpc.TokenomicStat.toObject(message.stat, options); - return object; - }; - - /** - * Converts this TokenomicInfo to JSON. - * @function toJSON - * @memberof pruntime_rpc.TokenomicInfo - * @instance - * @returns {Object.} JSON object - */ - TokenomicInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TokenomicInfo - * @function getTypeUrl - * @memberof pruntime_rpc.TokenomicInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TokenomicInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pruntime_rpc.TokenomicInfo"; - }; - - return TokenomicInfo; - })(); - - pruntime_rpc.NetworkConfigResponse = (function() { - - /** - * Properties of a NetworkConfigResponse. - * @memberof pruntime_rpc - * @interface INetworkConfigResponse - * @property {number|null} [publicRpcPort] NetworkConfigResponse publicRpcPort - * @property {pruntime_rpc.INetworkConfig|null} [config] NetworkConfigResponse config - */ - - /** - * Constructs a new NetworkConfigResponse. - * @memberof pruntime_rpc - * @classdesc Represents a NetworkConfigResponse. - * @implements INetworkConfigResponse - * @constructor - * @param {pruntime_rpc.INetworkConfigResponse=} [properties] Properties to set - */ - function NetworkConfigResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NetworkConfigResponse publicRpcPort. - * @member {number|null|undefined} publicRpcPort - * @memberof pruntime_rpc.NetworkConfigResponse - * @instance - */ - NetworkConfigResponse.prototype.publicRpcPort = null; - - /** - * NetworkConfigResponse config. - * @member {pruntime_rpc.INetworkConfig|null|undefined} config - * @memberof pruntime_rpc.NetworkConfigResponse - * @instance - */ - NetworkConfigResponse.prototype.config = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * NetworkConfigResponse _publicRpcPort. - * @member {"publicRpcPort"|undefined} _publicRpcPort - * @memberof pruntime_rpc.NetworkConfigResponse - * @instance - */ - Object.defineProperty(NetworkConfigResponse.prototype, "_publicRpcPort", { - get: $util.oneOfGetter($oneOfFields = ["publicRpcPort"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * NetworkConfigResponse _config. - * @member {"config"|undefined} _config - * @memberof pruntime_rpc.NetworkConfigResponse - * @instance - */ - Object.defineProperty(NetworkConfigResponse.prototype, "_config", { - get: $util.oneOfGetter($oneOfFields = ["config"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new NetworkConfigResponse instance using the specified properties. - * @function create - * @memberof pruntime_rpc.NetworkConfigResponse - * @static - * @param {pruntime_rpc.INetworkConfigResponse=} [properties] Properties to set - * @returns {pruntime_rpc.NetworkConfigResponse} NetworkConfigResponse instance - */ - NetworkConfigResponse.create = function create(properties) { - return new NetworkConfigResponse(properties); - }; - - /** - * Encodes the specified NetworkConfigResponse message. Does not implicitly {@link pruntime_rpc.NetworkConfigResponse.verify|verify} messages. - * @function encode - * @memberof pruntime_rpc.NetworkConfigResponse - * @static - * @param {pruntime_rpc.INetworkConfigResponse} message NetworkConfigResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NetworkConfigResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.publicRpcPort != null && Object.hasOwnProperty.call(message, "publicRpcPort")) - writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.publicRpcPort); - if (message.config != null && Object.hasOwnProperty.call(message, "config")) - $root.pruntime_rpc.NetworkConfig.encode(message.config, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified NetworkConfigResponse message, length delimited. Does not implicitly {@link pruntime_rpc.NetworkConfigResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof pruntime_rpc.NetworkConfigResponse - * @static - * @param {pruntime_rpc.INetworkConfigResponse} message NetworkConfigResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NetworkConfigResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NetworkConfigResponse message from the specified reader or buffer. - * @function decode - * @memberof pruntime_rpc.NetworkConfigResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pruntime_rpc.NetworkConfigResponse} NetworkConfigResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NetworkConfigResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.NetworkConfigResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.publicRpcPort = reader.uint32(); - break; - } - case 2: { - message.config = $root.pruntime_rpc.NetworkConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NetworkConfigResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pruntime_rpc.NetworkConfigResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.NetworkConfigResponse} NetworkConfigResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NetworkConfigResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NetworkConfigResponse message. - * @function verify - * @memberof pruntime_rpc.NetworkConfigResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NetworkConfigResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.publicRpcPort != null && message.hasOwnProperty("publicRpcPort")) { - properties._publicRpcPort = 1; - if (!$util.isInteger(message.publicRpcPort)) - return "publicRpcPort: integer expected"; - } - if (message.config != null && message.hasOwnProperty("config")) { - properties._config = 1; - { - var error = $root.pruntime_rpc.NetworkConfig.verify(message.config); - if (error) - return "config." + error; - } - } - return null; - }; - - /** - * Creates a NetworkConfigResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pruntime_rpc.NetworkConfigResponse - * @static - * @param {Object.} object Plain object - * @returns {pruntime_rpc.NetworkConfigResponse} NetworkConfigResponse - */ - NetworkConfigResponse.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.NetworkConfigResponse) - return object; - var message = new $root.pruntime_rpc.NetworkConfigResponse(); - if (object.publicRpcPort != null) - message.publicRpcPort = object.publicRpcPort >>> 0; - if (object.config != null) { - if (typeof object.config !== "object") - throw TypeError(".pruntime_rpc.NetworkConfigResponse.config: object expected"); - message.config = $root.pruntime_rpc.NetworkConfig.fromObject(object.config); - } - return message; - }; - - /** - * Creates a plain object from a NetworkConfigResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof pruntime_rpc.NetworkConfigResponse - * @static - * @param {pruntime_rpc.NetworkConfigResponse} message NetworkConfigResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NetworkConfigResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.publicRpcPort != null && message.hasOwnProperty("publicRpcPort")) { - object.publicRpcPort = message.publicRpcPort; - if (options.oneofs) - object._publicRpcPort = "publicRpcPort"; - } - if (message.config != null && message.hasOwnProperty("config")) { - object.config = $root.pruntime_rpc.NetworkConfig.toObject(message.config, options); - if (options.oneofs) - object._config = "config"; - } - return object; - }; - - /** - * Converts this NetworkConfigResponse to JSON. - * @function toJSON - * @memberof pruntime_rpc.NetworkConfigResponse - * @instance - * @returns {Object.} JSON object - */ - NetworkConfigResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NetworkConfigResponse - * @function getTypeUrl - * @memberof pruntime_rpc.NetworkConfigResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NetworkConfigResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pruntime_rpc.NetworkConfigResponse"; - }; - - return NetworkConfigResponse; - })(); - - pruntime_rpc.NetworkConfig = (function() { - - /** - * Properties of a NetworkConfig. - * @memberof pruntime_rpc - * @interface INetworkConfig - * @property {string|null} [allProxy] NetworkConfig allProxy - * @property {string|null} [i2pProxy] NetworkConfig i2pProxy - */ - - /** - * Constructs a new NetworkConfig. - * @memberof pruntime_rpc - * @classdesc Represents a NetworkConfig. - * @implements INetworkConfig - * @constructor - * @param {pruntime_rpc.INetworkConfig=} [properties] Properties to set - */ - function NetworkConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NetworkConfig allProxy. - * @member {string} allProxy - * @memberof pruntime_rpc.NetworkConfig - * @instance - */ - NetworkConfig.prototype.allProxy = ""; - - /** - * NetworkConfig i2pProxy. - * @member {string} i2pProxy - * @memberof pruntime_rpc.NetworkConfig - * @instance - */ - NetworkConfig.prototype.i2pProxy = ""; - - /** - * Creates a new NetworkConfig instance using the specified properties. - * @function create - * @memberof pruntime_rpc.NetworkConfig - * @static - * @param {pruntime_rpc.INetworkConfig=} [properties] Properties to set - * @returns {pruntime_rpc.NetworkConfig} NetworkConfig instance - */ - NetworkConfig.create = function create(properties) { - return new NetworkConfig(properties); - }; - - /** - * Encodes the specified NetworkConfig message. Does not implicitly {@link pruntime_rpc.NetworkConfig.verify|verify} messages. - * @function encode - * @memberof pruntime_rpc.NetworkConfig - * @static - * @param {pruntime_rpc.INetworkConfig} message NetworkConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NetworkConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.allProxy != null && Object.hasOwnProperty.call(message, "allProxy")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.allProxy); - if (message.i2pProxy != null && Object.hasOwnProperty.call(message, "i2pProxy")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.i2pProxy); - return writer; - }; - - /** - * Encodes the specified NetworkConfig message, length delimited. Does not implicitly {@link pruntime_rpc.NetworkConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof pruntime_rpc.NetworkConfig - * @static - * @param {pruntime_rpc.INetworkConfig} message NetworkConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NetworkConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NetworkConfig message from the specified reader or buffer. - * @function decode - * @memberof pruntime_rpc.NetworkConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pruntime_rpc.NetworkConfig} NetworkConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NetworkConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.NetworkConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - message.allProxy = reader.string(); - break; - } - case 3: { - message.i2pProxy = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NetworkConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pruntime_rpc.NetworkConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.NetworkConfig} NetworkConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NetworkConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NetworkConfig message. - * @function verify - * @memberof pruntime_rpc.NetworkConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NetworkConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.allProxy != null && message.hasOwnProperty("allProxy")) - if (!$util.isString(message.allProxy)) - return "allProxy: string expected"; - if (message.i2pProxy != null && message.hasOwnProperty("i2pProxy")) - if (!$util.isString(message.i2pProxy)) - return "i2pProxy: string expected"; - return null; - }; - - /** - * Creates a NetworkConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pruntime_rpc.NetworkConfig - * @static - * @param {Object.} object Plain object - * @returns {pruntime_rpc.NetworkConfig} NetworkConfig - */ - NetworkConfig.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.NetworkConfig) - return object; - var message = new $root.pruntime_rpc.NetworkConfig(); - if (object.allProxy != null) - message.allProxy = String(object.allProxy); - if (object.i2pProxy != null) - message.i2pProxy = String(object.i2pProxy); - return message; - }; - - /** - * Creates a plain object from a NetworkConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof pruntime_rpc.NetworkConfig - * @static - * @param {pruntime_rpc.NetworkConfig} message NetworkConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NetworkConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.allProxy = ""; - object.i2pProxy = ""; - } - if (message.allProxy != null && message.hasOwnProperty("allProxy")) - object.allProxy = message.allProxy; - if (message.i2pProxy != null && message.hasOwnProperty("i2pProxy")) - object.i2pProxy = message.i2pProxy; - return object; - }; - - /** - * Converts this NetworkConfig to JSON. - * @function toJSON - * @memberof pruntime_rpc.NetworkConfig - * @instance - * @returns {Object.} JSON object - */ - NetworkConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NetworkConfig - * @function getTypeUrl - * @memberof pruntime_rpc.NetworkConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NetworkConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pruntime_rpc.NetworkConfig"; - }; - - return NetworkConfig; - })(); - - pruntime_rpc.HttpHeader = (function() { - - /** - * Properties of a HttpHeader. - * @memberof pruntime_rpc - * @interface IHttpHeader - * @property {string|null} [name] HttpHeader name - * @property {string|null} [value] HttpHeader value - */ - - /** - * Constructs a new HttpHeader. - * @memberof pruntime_rpc - * @classdesc Represents a HttpHeader. - * @implements IHttpHeader - * @constructor - * @param {pruntime_rpc.IHttpHeader=} [properties] Properties to set - */ - function HttpHeader(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * HttpHeader name. - * @member {string} name - * @memberof pruntime_rpc.HttpHeader - * @instance - */ - HttpHeader.prototype.name = ""; - - /** - * HttpHeader value. - * @member {string} value - * @memberof pruntime_rpc.HttpHeader - * @instance - */ - HttpHeader.prototype.value = ""; - - /** - * Creates a new HttpHeader instance using the specified properties. - * @function create - * @memberof pruntime_rpc.HttpHeader - * @static - * @param {pruntime_rpc.IHttpHeader=} [properties] Properties to set - * @returns {pruntime_rpc.HttpHeader} HttpHeader instance - */ - HttpHeader.create = function create(properties) { - return new HttpHeader(properties); - }; - - /** - * Encodes the specified HttpHeader message. Does not implicitly {@link pruntime_rpc.HttpHeader.verify|verify} messages. - * @function encode - * @memberof pruntime_rpc.HttpHeader - * @static - * @param {pruntime_rpc.IHttpHeader} message HttpHeader message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpHeader.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); - return writer; - }; - - /** - * Encodes the specified HttpHeader message, length delimited. Does not implicitly {@link pruntime_rpc.HttpHeader.verify|verify} messages. - * @function encodeDelimited - * @memberof pruntime_rpc.HttpHeader - * @static - * @param {pruntime_rpc.IHttpHeader} message HttpHeader message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpHeader.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HttpHeader message from the specified reader or buffer. - * @function decode - * @memberof pruntime_rpc.HttpHeader - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pruntime_rpc.HttpHeader} HttpHeader - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpHeader.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.HttpHeader(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.value = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HttpHeader message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pruntime_rpc.HttpHeader - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.HttpHeader} HttpHeader - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpHeader.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HttpHeader message. - * @function verify - * @memberof pruntime_rpc.HttpHeader - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HttpHeader.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isString(message.value)) - return "value: string expected"; - return null; - }; - - /** - * Creates a HttpHeader message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pruntime_rpc.HttpHeader - * @static - * @param {Object.} object Plain object - * @returns {pruntime_rpc.HttpHeader} HttpHeader - */ - HttpHeader.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.HttpHeader) - return object; - var message = new $root.pruntime_rpc.HttpHeader(); - if (object.name != null) - message.name = String(object.name); - if (object.value != null) - message.value = String(object.value); - return message; - }; - - /** - * Creates a plain object from a HttpHeader message. Also converts values to other types if specified. - * @function toObject - * @memberof pruntime_rpc.HttpHeader - * @static - * @param {pruntime_rpc.HttpHeader} message HttpHeader - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HttpHeader.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.value = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - return object; - }; - - /** - * Converts this HttpHeader to JSON. - * @function toJSON - * @memberof pruntime_rpc.HttpHeader - * @instance - * @returns {Object.} JSON object - */ - HttpHeader.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for HttpHeader - * @function getTypeUrl - * @memberof pruntime_rpc.HttpHeader - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - HttpHeader.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pruntime_rpc.HttpHeader"; - }; - - return HttpHeader; - })(); - - pruntime_rpc.HttpRequest = (function() { - - /** - * Properties of a HttpRequest. - * @memberof pruntime_rpc - * @interface IHttpRequest - * @property {string|null} [url] HttpRequest url - * @property {string|null} [method] HttpRequest method - * @property {Array.|null} [headers] HttpRequest headers - * @property {Uint8Array|null} [body] HttpRequest body - */ - - /** - * Constructs a new HttpRequest. - * @memberof pruntime_rpc - * @classdesc Represents a HttpRequest. - * @implements IHttpRequest - * @constructor - * @param {pruntime_rpc.IHttpRequest=} [properties] Properties to set - */ - function HttpRequest(properties) { - this.headers = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * HttpRequest url. - * @member {string} url - * @memberof pruntime_rpc.HttpRequest - * @instance - */ - HttpRequest.prototype.url = ""; - - /** - * HttpRequest method. - * @member {string} method - * @memberof pruntime_rpc.HttpRequest - * @instance - */ - HttpRequest.prototype.method = ""; - - /** - * HttpRequest headers. - * @member {Array.} headers - * @memberof pruntime_rpc.HttpRequest - * @instance - */ - HttpRequest.prototype.headers = $util.emptyArray; - - /** - * HttpRequest body. - * @member {Uint8Array} body - * @memberof pruntime_rpc.HttpRequest - * @instance - */ - HttpRequest.prototype.body = $util.newBuffer([]); - - /** - * Creates a new HttpRequest instance using the specified properties. - * @function create - * @memberof pruntime_rpc.HttpRequest - * @static - * @param {pruntime_rpc.IHttpRequest=} [properties] Properties to set - * @returns {pruntime_rpc.HttpRequest} HttpRequest instance - */ - HttpRequest.create = function create(properties) { - return new HttpRequest(properties); - }; - - /** - * Encodes the specified HttpRequest message. Does not implicitly {@link pruntime_rpc.HttpRequest.verify|verify} messages. - * @function encode - * @memberof pruntime_rpc.HttpRequest - * @static - * @param {pruntime_rpc.IHttpRequest} message HttpRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.url != null && Object.hasOwnProperty.call(message, "url")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.url); - if (message.method != null && Object.hasOwnProperty.call(message, "method")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.method); - if (message.headers != null && message.headers.length) - for (var i = 0; i < message.headers.length; ++i) - $root.pruntime_rpc.HttpHeader.encode(message.headers[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) - writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.body); - return writer; - }; - - /** - * Encodes the specified HttpRequest message, length delimited. Does not implicitly {@link pruntime_rpc.HttpRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof pruntime_rpc.HttpRequest - * @static - * @param {pruntime_rpc.IHttpRequest} message HttpRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HttpRequest message from the specified reader or buffer. - * @function decode - * @memberof pruntime_rpc.HttpRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pruntime_rpc.HttpRequest} HttpRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.HttpRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.url = reader.string(); - break; - } - case 2: { - message.method = reader.string(); - break; - } - case 3: { - if (!(message.headers && message.headers.length)) - message.headers = []; - message.headers.push($root.pruntime_rpc.HttpHeader.decode(reader, reader.uint32())); - break; - } - case 4: { - message.body = reader.bytes(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HttpRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pruntime_rpc.HttpRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.HttpRequest} HttpRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HttpRequest message. - * @function verify - * @memberof pruntime_rpc.HttpRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HttpRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.url != null && message.hasOwnProperty("url")) - if (!$util.isString(message.url)) - return "url: string expected"; - if (message.method != null && message.hasOwnProperty("method")) - if (!$util.isString(message.method)) - return "method: string expected"; - if (message.headers != null && message.hasOwnProperty("headers")) { - if (!Array.isArray(message.headers)) - return "headers: array expected"; - for (var i = 0; i < message.headers.length; ++i) { - var error = $root.pruntime_rpc.HttpHeader.verify(message.headers[i]); - if (error) - return "headers." + error; - } - } - if (message.body != null && message.hasOwnProperty("body")) - if (!(message.body && typeof message.body.length === "number" || $util.isString(message.body))) - return "body: buffer expected"; - return null; - }; - - /** - * Creates a HttpRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pruntime_rpc.HttpRequest - * @static - * @param {Object.} object Plain object - * @returns {pruntime_rpc.HttpRequest} HttpRequest - */ - HttpRequest.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.HttpRequest) - return object; - var message = new $root.pruntime_rpc.HttpRequest(); - if (object.url != null) - message.url = String(object.url); - if (object.method != null) - message.method = String(object.method); - if (object.headers) { - if (!Array.isArray(object.headers)) - throw TypeError(".pruntime_rpc.HttpRequest.headers: array expected"); - message.headers = []; - for (var i = 0; i < object.headers.length; ++i) { - if (typeof object.headers[i] !== "object") - throw TypeError(".pruntime_rpc.HttpRequest.headers: object expected"); - message.headers[i] = $root.pruntime_rpc.HttpHeader.fromObject(object.headers[i]); - } - } - if (object.body != null) - if (typeof object.body === "string") - $util.base64.decode(object.body, message.body = $util.newBuffer($util.base64.length(object.body)), 0); - else if (object.body.length >= 0) - message.body = object.body; - return message; - }; - - /** - * Creates a plain object from a HttpRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof pruntime_rpc.HttpRequest - * @static - * @param {pruntime_rpc.HttpRequest} message HttpRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HttpRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.headers = []; - if (options.defaults) { - object.url = ""; - object.method = ""; - if (options.bytes === String) - object.body = ""; - else { - object.body = []; - if (options.bytes !== Array) - object.body = $util.newBuffer(object.body); - } - } - if (message.url != null && message.hasOwnProperty("url")) - object.url = message.url; - if (message.method != null && message.hasOwnProperty("method")) - object.method = message.method; - if (message.headers && message.headers.length) { - object.headers = []; - for (var j = 0; j < message.headers.length; ++j) - object.headers[j] = $root.pruntime_rpc.HttpHeader.toObject(message.headers[j], options); - } - if (message.body != null && message.hasOwnProperty("body")) - object.body = options.bytes === String ? $util.base64.encode(message.body, 0, message.body.length) : options.bytes === Array ? Array.prototype.slice.call(message.body) : message.body; - return object; - }; - - /** - * Converts this HttpRequest to JSON. - * @function toJSON - * @memberof pruntime_rpc.HttpRequest - * @instance - * @returns {Object.} JSON object - */ - HttpRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for HttpRequest - * @function getTypeUrl - * @memberof pruntime_rpc.HttpRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - HttpRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pruntime_rpc.HttpRequest"; - }; - - return HttpRequest; - })(); - - pruntime_rpc.HttpResponse = (function() { - - /** - * Properties of a HttpResponse. - * @memberof pruntime_rpc - * @interface IHttpResponse - * @property {number|null} [statusCode] HttpResponse statusCode - * @property {Array.|null} [headers] HttpResponse headers - * @property {Uint8Array|null} [body] HttpResponse body - */ - - /** - * Constructs a new HttpResponse. - * @memberof pruntime_rpc - * @classdesc Represents a HttpResponse. - * @implements IHttpResponse - * @constructor - * @param {pruntime_rpc.IHttpResponse=} [properties] Properties to set - */ - function HttpResponse(properties) { - this.headers = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * HttpResponse statusCode. - * @member {number} statusCode - * @memberof pruntime_rpc.HttpResponse - * @instance - */ - HttpResponse.prototype.statusCode = 0; - - /** - * HttpResponse headers. - * @member {Array.} headers - * @memberof pruntime_rpc.HttpResponse - * @instance - */ - HttpResponse.prototype.headers = $util.emptyArray; - - /** - * HttpResponse body. - * @member {Uint8Array} body - * @memberof pruntime_rpc.HttpResponse - * @instance - */ - HttpResponse.prototype.body = $util.newBuffer([]); - - /** - * Creates a new HttpResponse instance using the specified properties. - * @function create - * @memberof pruntime_rpc.HttpResponse - * @static - * @param {pruntime_rpc.IHttpResponse=} [properties] Properties to set - * @returns {pruntime_rpc.HttpResponse} HttpResponse instance - */ - HttpResponse.create = function create(properties) { - return new HttpResponse(properties); - }; - - /** - * Encodes the specified HttpResponse message. Does not implicitly {@link pruntime_rpc.HttpResponse.verify|verify} messages. - * @function encode - * @memberof pruntime_rpc.HttpResponse - * @static - * @param {pruntime_rpc.IHttpResponse} message HttpResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.statusCode != null && Object.hasOwnProperty.call(message, "statusCode")) - writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.statusCode); - if (message.headers != null && message.headers.length) - for (var i = 0; i < message.headers.length; ++i) - $root.pruntime_rpc.HttpHeader.encode(message.headers[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.body); - return writer; - }; - - /** - * Encodes the specified HttpResponse message, length delimited. Does not implicitly {@link pruntime_rpc.HttpResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof pruntime_rpc.HttpResponse - * @static - * @param {pruntime_rpc.IHttpResponse} message HttpResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HttpResponse message from the specified reader or buffer. - * @function decode - * @memberof pruntime_rpc.HttpResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pruntime_rpc.HttpResponse} HttpResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.HttpResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.statusCode = reader.uint32(); - break; - } - case 2: { - if (!(message.headers && message.headers.length)) - message.headers = []; - message.headers.push($root.pruntime_rpc.HttpHeader.decode(reader, reader.uint32())); - break; - } - case 3: { - message.body = reader.bytes(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HttpResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pruntime_rpc.HttpResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.HttpResponse} HttpResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HttpResponse message. - * @function verify - * @memberof pruntime_rpc.HttpResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HttpResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.statusCode != null && message.hasOwnProperty("statusCode")) - if (!$util.isInteger(message.statusCode)) - return "statusCode: integer expected"; - if (message.headers != null && message.hasOwnProperty("headers")) { - if (!Array.isArray(message.headers)) - return "headers: array expected"; - for (var i = 0; i < message.headers.length; ++i) { - var error = $root.pruntime_rpc.HttpHeader.verify(message.headers[i]); - if (error) - return "headers." + error; - } - } - if (message.body != null && message.hasOwnProperty("body")) - if (!(message.body && typeof message.body.length === "number" || $util.isString(message.body))) - return "body: buffer expected"; - return null; - }; - - /** - * Creates a HttpResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pruntime_rpc.HttpResponse - * @static - * @param {Object.} object Plain object - * @returns {pruntime_rpc.HttpResponse} HttpResponse - */ - HttpResponse.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.HttpResponse) - return object; - var message = new $root.pruntime_rpc.HttpResponse(); - if (object.statusCode != null) - message.statusCode = object.statusCode >>> 0; - if (object.headers) { - if (!Array.isArray(object.headers)) - throw TypeError(".pruntime_rpc.HttpResponse.headers: array expected"); - message.headers = []; - for (var i = 0; i < object.headers.length; ++i) { - if (typeof object.headers[i] !== "object") - throw TypeError(".pruntime_rpc.HttpResponse.headers: object expected"); - message.headers[i] = $root.pruntime_rpc.HttpHeader.fromObject(object.headers[i]); - } - } - if (object.body != null) - if (typeof object.body === "string") - $util.base64.decode(object.body, message.body = $util.newBuffer($util.base64.length(object.body)), 0); - else if (object.body.length >= 0) - message.body = object.body; - return message; - }; - - /** - * Creates a plain object from a HttpResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof pruntime_rpc.HttpResponse - * @static - * @param {pruntime_rpc.HttpResponse} message HttpResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HttpResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.headers = []; - if (options.defaults) { - object.statusCode = 0; - if (options.bytes === String) - object.body = ""; - else { - object.body = []; - if (options.bytes !== Array) - object.body = $util.newBuffer(object.body); - } - } - if (message.statusCode != null && message.hasOwnProperty("statusCode")) - object.statusCode = message.statusCode; - if (message.headers && message.headers.length) { - object.headers = []; - for (var j = 0; j < message.headers.length; ++j) - object.headers[j] = $root.pruntime_rpc.HttpHeader.toObject(message.headers[j], options); - } - if (message.body != null && message.hasOwnProperty("body")) - object.body = options.bytes === String ? $util.base64.encode(message.body, 0, message.body.length) : options.bytes === Array ? Array.prototype.slice.call(message.body) : message.body; - return object; - }; - - /** - * Converts this HttpResponse to JSON. - * @function toJSON - * @memberof pruntime_rpc.HttpResponse - * @instance - * @returns {Object.} JSON object - */ - HttpResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for HttpResponse - * @function getTypeUrl - * @memberof pruntime_rpc.HttpResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - HttpResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pruntime_rpc.HttpResponse"; - }; - - return HttpResponse; - })(); - - pruntime_rpc.GetContractInfoRequest = (function() { - - /** - * Properties of a GetContractInfoRequest. - * @memberof pruntime_rpc - * @interface IGetContractInfoRequest - * @property {Array.|null} [contracts] GetContractInfoRequest contracts - */ - - /** - * Constructs a new GetContractInfoRequest. - * @memberof pruntime_rpc - * @classdesc Represents a GetContractInfoRequest. - * @implements IGetContractInfoRequest - * @constructor - * @param {pruntime_rpc.IGetContractInfoRequest=} [properties] Properties to set - */ - function GetContractInfoRequest(properties) { - this.contracts = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetContractInfoRequest contracts. - * @member {Array.} contracts - * @memberof pruntime_rpc.GetContractInfoRequest - * @instance - */ - GetContractInfoRequest.prototype.contracts = $util.emptyArray; - - /** - * Creates a new GetContractInfoRequest instance using the specified properties. - * @function create - * @memberof pruntime_rpc.GetContractInfoRequest - * @static - * @param {pruntime_rpc.IGetContractInfoRequest=} [properties] Properties to set - * @returns {pruntime_rpc.GetContractInfoRequest} GetContractInfoRequest instance - */ - GetContractInfoRequest.create = function create(properties) { - return new GetContractInfoRequest(properties); - }; - - /** - * Encodes the specified GetContractInfoRequest message. Does not implicitly {@link pruntime_rpc.GetContractInfoRequest.verify|verify} messages. - * @function encode - * @memberof pruntime_rpc.GetContractInfoRequest - * @static - * @param {pruntime_rpc.IGetContractInfoRequest} message GetContractInfoRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetContractInfoRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.contracts != null && message.contracts.length) - for (var i = 0; i < message.contracts.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.contracts[i]); - return writer; - }; - - /** - * Encodes the specified GetContractInfoRequest message, length delimited. Does not implicitly {@link pruntime_rpc.GetContractInfoRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof pruntime_rpc.GetContractInfoRequest - * @static - * @param {pruntime_rpc.IGetContractInfoRequest} message GetContractInfoRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetContractInfoRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetContractInfoRequest message from the specified reader or buffer. - * @function decode - * @memberof pruntime_rpc.GetContractInfoRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pruntime_rpc.GetContractInfoRequest} GetContractInfoRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetContractInfoRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.GetContractInfoRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.contracts && message.contracts.length)) - message.contracts = []; - message.contracts.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetContractInfoRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pruntime_rpc.GetContractInfoRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.GetContractInfoRequest} GetContractInfoRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetContractInfoRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetContractInfoRequest message. - * @function verify - * @memberof pruntime_rpc.GetContractInfoRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetContractInfoRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.contracts != null && message.hasOwnProperty("contracts")) { - if (!Array.isArray(message.contracts)) - return "contracts: array expected"; - for (var i = 0; i < message.contracts.length; ++i) - if (!$util.isString(message.contracts[i])) - return "contracts: string[] expected"; - } - return null; - }; - - /** - * Creates a GetContractInfoRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pruntime_rpc.GetContractInfoRequest - * @static - * @param {Object.} object Plain object - * @returns {pruntime_rpc.GetContractInfoRequest} GetContractInfoRequest - */ - GetContractInfoRequest.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.GetContractInfoRequest) - return object; - var message = new $root.pruntime_rpc.GetContractInfoRequest(); - if (object.contracts) { - if (!Array.isArray(object.contracts)) - throw TypeError(".pruntime_rpc.GetContractInfoRequest.contracts: array expected"); - message.contracts = []; - for (var i = 0; i < object.contracts.length; ++i) - message.contracts[i] = String(object.contracts[i]); - } - return message; - }; - - /** - * Creates a plain object from a GetContractInfoRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof pruntime_rpc.GetContractInfoRequest - * @static - * @param {pruntime_rpc.GetContractInfoRequest} message GetContractInfoRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetContractInfoRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.contracts = []; - if (message.contracts && message.contracts.length) { - object.contracts = []; - for (var j = 0; j < message.contracts.length; ++j) - object.contracts[j] = message.contracts[j]; - } - return object; - }; - - /** - * Converts this GetContractInfoRequest to JSON. - * @function toJSON - * @memberof pruntime_rpc.GetContractInfoRequest - * @instance - * @returns {Object.} JSON object - */ - GetContractInfoRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetContractInfoRequest - * @function getTypeUrl - * @memberof pruntime_rpc.GetContractInfoRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetContractInfoRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pruntime_rpc.GetContractInfoRequest"; - }; - - return GetContractInfoRequest; - })(); - - pruntime_rpc.GetContractInfoResponse = (function() { - - /** - * Properties of a GetContractInfoResponse. - * @memberof pruntime_rpc - * @interface IGetContractInfoResponse - * @property {Array.|null} [contracts] GetContractInfoResponse contracts - */ - - /** - * Constructs a new GetContractInfoResponse. - * @memberof pruntime_rpc - * @classdesc Represents a GetContractInfoResponse. - * @implements IGetContractInfoResponse - * @constructor - * @param {pruntime_rpc.IGetContractInfoResponse=} [properties] Properties to set - */ - function GetContractInfoResponse(properties) { - this.contracts = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetContractInfoResponse contracts. - * @member {Array.} contracts - * @memberof pruntime_rpc.GetContractInfoResponse - * @instance - */ - GetContractInfoResponse.prototype.contracts = $util.emptyArray; - - /** - * Creates a new GetContractInfoResponse instance using the specified properties. - * @function create - * @memberof pruntime_rpc.GetContractInfoResponse - * @static - * @param {pruntime_rpc.IGetContractInfoResponse=} [properties] Properties to set - * @returns {pruntime_rpc.GetContractInfoResponse} GetContractInfoResponse instance - */ - GetContractInfoResponse.create = function create(properties) { - return new GetContractInfoResponse(properties); - }; - - /** - * Encodes the specified GetContractInfoResponse message. Does not implicitly {@link pruntime_rpc.GetContractInfoResponse.verify|verify} messages. - * @function encode - * @memberof pruntime_rpc.GetContractInfoResponse - * @static - * @param {pruntime_rpc.IGetContractInfoResponse} message GetContractInfoResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetContractInfoResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.contracts != null && message.contracts.length) - for (var i = 0; i < message.contracts.length; ++i) - $root.pruntime_rpc.ContractInfo.encode(message.contracts[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GetContractInfoResponse message, length delimited. Does not implicitly {@link pruntime_rpc.GetContractInfoResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof pruntime_rpc.GetContractInfoResponse - * @static - * @param {pruntime_rpc.IGetContractInfoResponse} message GetContractInfoResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetContractInfoResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetContractInfoResponse message from the specified reader or buffer. - * @function decode - * @memberof pruntime_rpc.GetContractInfoResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pruntime_rpc.GetContractInfoResponse} GetContractInfoResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetContractInfoResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.GetContractInfoResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.contracts && message.contracts.length)) - message.contracts = []; - message.contracts.push($root.pruntime_rpc.ContractInfo.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetContractInfoResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pruntime_rpc.GetContractInfoResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.GetContractInfoResponse} GetContractInfoResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetContractInfoResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetContractInfoResponse message. - * @function verify - * @memberof pruntime_rpc.GetContractInfoResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetContractInfoResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.contracts != null && message.hasOwnProperty("contracts")) { - if (!Array.isArray(message.contracts)) - return "contracts: array expected"; - for (var i = 0; i < message.contracts.length; ++i) { - var error = $root.pruntime_rpc.ContractInfo.verify(message.contracts[i]); - if (error) - return "contracts." + error; - } - } - return null; - }; - - /** - * Creates a GetContractInfoResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pruntime_rpc.GetContractInfoResponse - * @static - * @param {Object.} object Plain object - * @returns {pruntime_rpc.GetContractInfoResponse} GetContractInfoResponse - */ - GetContractInfoResponse.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.GetContractInfoResponse) - return object; - var message = new $root.pruntime_rpc.GetContractInfoResponse(); - if (object.contracts) { - if (!Array.isArray(object.contracts)) - throw TypeError(".pruntime_rpc.GetContractInfoResponse.contracts: array expected"); - message.contracts = []; - for (var i = 0; i < object.contracts.length; ++i) { - if (typeof object.contracts[i] !== "object") - throw TypeError(".pruntime_rpc.GetContractInfoResponse.contracts: object expected"); - message.contracts[i] = $root.pruntime_rpc.ContractInfo.fromObject(object.contracts[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a GetContractInfoResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof pruntime_rpc.GetContractInfoResponse - * @static - * @param {pruntime_rpc.GetContractInfoResponse} message GetContractInfoResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetContractInfoResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.contracts = []; - if (message.contracts && message.contracts.length) { - object.contracts = []; - for (var j = 0; j < message.contracts.length; ++j) - object.contracts[j] = $root.pruntime_rpc.ContractInfo.toObject(message.contracts[j], options); - } - return object; - }; - - /** - * Converts this GetContractInfoResponse to JSON. - * @function toJSON - * @memberof pruntime_rpc.GetContractInfoResponse - * @instance - * @returns {Object.} JSON object - */ - GetContractInfoResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetContractInfoResponse - * @function getTypeUrl - * @memberof pruntime_rpc.GetContractInfoResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetContractInfoResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pruntime_rpc.GetContractInfoResponse"; - }; - - return GetContractInfoResponse; - })(); - - pruntime_rpc.ContractInfo = (function() { - - /** - * Properties of a ContractInfo. - * @memberof pruntime_rpc - * @interface IContractInfo - * @property {string|null} [id] ContractInfo id - * @property {string|null} [codeHash] ContractInfo codeHash - * @property {number|null} [weight] ContractInfo weight - * @property {pruntime_rpc.ISidevmInfo|null} [sidevm] ContractInfo sidevm - */ - - /** - * Constructs a new ContractInfo. - * @memberof pruntime_rpc - * @classdesc Represents a ContractInfo. - * @implements IContractInfo - * @constructor - * @param {pruntime_rpc.IContractInfo=} [properties] Properties to set - */ - function ContractInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ContractInfo id. - * @member {string} id - * @memberof pruntime_rpc.ContractInfo - * @instance - */ - ContractInfo.prototype.id = ""; - - /** - * ContractInfo codeHash. - * @member {string} codeHash - * @memberof pruntime_rpc.ContractInfo - * @instance - */ - ContractInfo.prototype.codeHash = ""; - - /** - * ContractInfo weight. - * @member {number} weight - * @memberof pruntime_rpc.ContractInfo - * @instance - */ - ContractInfo.prototype.weight = 0; - - /** - * ContractInfo sidevm. - * @member {pruntime_rpc.ISidevmInfo|null|undefined} sidevm - * @memberof pruntime_rpc.ContractInfo - * @instance - */ - ContractInfo.prototype.sidevm = null; - - /** - * Creates a new ContractInfo instance using the specified properties. - * @function create - * @memberof pruntime_rpc.ContractInfo - * @static - * @param {pruntime_rpc.IContractInfo=} [properties] Properties to set - * @returns {pruntime_rpc.ContractInfo} ContractInfo instance - */ - ContractInfo.create = function create(properties) { - return new ContractInfo(properties); - }; - - /** - * Encodes the specified ContractInfo message. Does not implicitly {@link pruntime_rpc.ContractInfo.verify|verify} messages. - * @function encode - * @memberof pruntime_rpc.ContractInfo - * @static - * @param {pruntime_rpc.IContractInfo} message ContractInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ContractInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); - if (message.codeHash != null && Object.hasOwnProperty.call(message, "codeHash")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.codeHash); - if (message.weight != null && Object.hasOwnProperty.call(message, "weight")) - writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.weight); - if (message.sidevm != null && Object.hasOwnProperty.call(message, "sidevm")) - $root.pruntime_rpc.SidevmInfo.encode(message.sidevm, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ContractInfo message, length delimited. Does not implicitly {@link pruntime_rpc.ContractInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof pruntime_rpc.ContractInfo - * @static - * @param {pruntime_rpc.IContractInfo} message ContractInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ContractInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ContractInfo message from the specified reader or buffer. - * @function decode - * @memberof pruntime_rpc.ContractInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pruntime_rpc.ContractInfo} ContractInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ContractInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.ContractInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.id = reader.string(); - break; - } - case 2: { - message.codeHash = reader.string(); - break; - } - case 3: { - message.weight = reader.uint32(); - break; - } - case 4: { - message.sidevm = $root.pruntime_rpc.SidevmInfo.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ContractInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pruntime_rpc.ContractInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.ContractInfo} ContractInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ContractInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ContractInfo message. - * @function verify - * @memberof pruntime_rpc.ContractInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ContractInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - if (message.codeHash != null && message.hasOwnProperty("codeHash")) - if (!$util.isString(message.codeHash)) - return "codeHash: string expected"; - if (message.weight != null && message.hasOwnProperty("weight")) - if (!$util.isInteger(message.weight)) - return "weight: integer expected"; - if (message.sidevm != null && message.hasOwnProperty("sidevm")) { - var error = $root.pruntime_rpc.SidevmInfo.verify(message.sidevm); - if (error) - return "sidevm." + error; - } - return null; - }; - - /** - * Creates a ContractInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pruntime_rpc.ContractInfo - * @static - * @param {Object.} object Plain object - * @returns {pruntime_rpc.ContractInfo} ContractInfo - */ - ContractInfo.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.ContractInfo) - return object; - var message = new $root.pruntime_rpc.ContractInfo(); - if (object.id != null) - message.id = String(object.id); - if (object.codeHash != null) - message.codeHash = String(object.codeHash); - if (object.weight != null) - message.weight = object.weight >>> 0; - if (object.sidevm != null) { - if (typeof object.sidevm !== "object") - throw TypeError(".pruntime_rpc.ContractInfo.sidevm: object expected"); - message.sidevm = $root.pruntime_rpc.SidevmInfo.fromObject(object.sidevm); - } - return message; - }; - - /** - * Creates a plain object from a ContractInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof pruntime_rpc.ContractInfo - * @static - * @param {pruntime_rpc.ContractInfo} message ContractInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ContractInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.id = ""; - object.codeHash = ""; - object.weight = 0; - object.sidevm = null; - } - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.codeHash != null && message.hasOwnProperty("codeHash")) - object.codeHash = message.codeHash; - if (message.weight != null && message.hasOwnProperty("weight")) - object.weight = message.weight; - if (message.sidevm != null && message.hasOwnProperty("sidevm")) - object.sidevm = $root.pruntime_rpc.SidevmInfo.toObject(message.sidevm, options); - return object; - }; - - /** - * Converts this ContractInfo to JSON. - * @function toJSON - * @memberof pruntime_rpc.ContractInfo - * @instance - * @returns {Object.} JSON object - */ - ContractInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ContractInfo - * @function getTypeUrl - * @memberof pruntime_rpc.ContractInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ContractInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pruntime_rpc.ContractInfo"; - }; - - return ContractInfo; - })(); - - pruntime_rpc.SidevmInfo = (function() { - - /** - * Properties of a SidevmInfo. - * @memberof pruntime_rpc - * @interface ISidevmInfo - * @property {string|null} [state] SidevmInfo state - * @property {string|null} [codeHash] SidevmInfo codeHash - * @property {string|null} [startTime] SidevmInfo startTime - * @property {string|null} [stopReason] SidevmInfo stopReason - */ - - /** - * Constructs a new SidevmInfo. - * @memberof pruntime_rpc - * @classdesc Represents a SidevmInfo. - * @implements ISidevmInfo - * @constructor - * @param {pruntime_rpc.ISidevmInfo=} [properties] Properties to set - */ - function SidevmInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SidevmInfo state. - * @member {string} state - * @memberof pruntime_rpc.SidevmInfo - * @instance - */ - SidevmInfo.prototype.state = ""; - - /** - * SidevmInfo codeHash. - * @member {string} codeHash - * @memberof pruntime_rpc.SidevmInfo - * @instance - */ - SidevmInfo.prototype.codeHash = ""; - - /** - * SidevmInfo startTime. - * @member {string} startTime - * @memberof pruntime_rpc.SidevmInfo - * @instance - */ - SidevmInfo.prototype.startTime = ""; - - /** - * SidevmInfo stopReason. - * @member {string} stopReason - * @memberof pruntime_rpc.SidevmInfo - * @instance - */ - SidevmInfo.prototype.stopReason = ""; - - /** - * Creates a new SidevmInfo instance using the specified properties. - * @function create - * @memberof pruntime_rpc.SidevmInfo - * @static - * @param {pruntime_rpc.ISidevmInfo=} [properties] Properties to set - * @returns {pruntime_rpc.SidevmInfo} SidevmInfo instance - */ - SidevmInfo.create = function create(properties) { - return new SidevmInfo(properties); - }; - - /** - * Encodes the specified SidevmInfo message. Does not implicitly {@link pruntime_rpc.SidevmInfo.verify|verify} messages. - * @function encode - * @memberof pruntime_rpc.SidevmInfo - * @static - * @param {pruntime_rpc.ISidevmInfo} message SidevmInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SidevmInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.state); - if (message.codeHash != null && Object.hasOwnProperty.call(message, "codeHash")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.codeHash); - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.startTime); - if (message.stopReason != null && Object.hasOwnProperty.call(message, "stopReason")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.stopReason); - return writer; - }; - - /** - * Encodes the specified SidevmInfo message, length delimited. Does not implicitly {@link pruntime_rpc.SidevmInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof pruntime_rpc.SidevmInfo - * @static - * @param {pruntime_rpc.ISidevmInfo} message SidevmInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SidevmInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SidevmInfo message from the specified reader or buffer. - * @function decode - * @memberof pruntime_rpc.SidevmInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pruntime_rpc.SidevmInfo} SidevmInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SidevmInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.SidevmInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.state = reader.string(); - break; - } - case 2: { - message.codeHash = reader.string(); - break; - } - case 3: { - message.startTime = reader.string(); - break; - } - case 4: { - message.stopReason = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SidevmInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pruntime_rpc.SidevmInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.SidevmInfo} SidevmInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SidevmInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SidevmInfo message. - * @function verify - * @memberof pruntime_rpc.SidevmInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SidevmInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.state != null && message.hasOwnProperty("state")) - if (!$util.isString(message.state)) - return "state: string expected"; - if (message.codeHash != null && message.hasOwnProperty("codeHash")) - if (!$util.isString(message.codeHash)) - return "codeHash: string expected"; - if (message.startTime != null && message.hasOwnProperty("startTime")) - if (!$util.isString(message.startTime)) - return "startTime: string expected"; - if (message.stopReason != null && message.hasOwnProperty("stopReason")) - if (!$util.isString(message.stopReason)) - return "stopReason: string expected"; - return null; - }; - - /** - * Creates a SidevmInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pruntime_rpc.SidevmInfo - * @static - * @param {Object.} object Plain object - * @returns {pruntime_rpc.SidevmInfo} SidevmInfo - */ - SidevmInfo.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.SidevmInfo) - return object; - var message = new $root.pruntime_rpc.SidevmInfo(); - if (object.state != null) - message.state = String(object.state); - if (object.codeHash != null) - message.codeHash = String(object.codeHash); - if (object.startTime != null) - message.startTime = String(object.startTime); - if (object.stopReason != null) - message.stopReason = String(object.stopReason); - return message; - }; - - /** - * Creates a plain object from a SidevmInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof pruntime_rpc.SidevmInfo - * @static - * @param {pruntime_rpc.SidevmInfo} message SidevmInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SidevmInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.state = ""; - object.codeHash = ""; - object.startTime = ""; - object.stopReason = ""; - } - if (message.state != null && message.hasOwnProperty("state")) - object.state = message.state; - if (message.codeHash != null && message.hasOwnProperty("codeHash")) - object.codeHash = message.codeHash; - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = message.startTime; - if (message.stopReason != null && message.hasOwnProperty("stopReason")) - object.stopReason = message.stopReason; - return object; - }; - - /** - * Converts this SidevmInfo to JSON. - * @function toJSON - * @memberof pruntime_rpc.SidevmInfo - * @instance - * @returns {Object.} JSON object - */ - SidevmInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SidevmInfo - * @function getTypeUrl - * @memberof pruntime_rpc.SidevmInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SidevmInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pruntime_rpc.SidevmInfo"; - }; - - return SidevmInfo; - })(); - - pruntime_rpc.GetClusterInfoResponse = (function() { - - /** - * Properties of a GetClusterInfoResponse. - * @memberof pruntime_rpc - * @interface IGetClusterInfoResponse - * @property {pruntime_rpc.IClusterInfo|null} [info] GetClusterInfoResponse info - */ - - /** - * Constructs a new GetClusterInfoResponse. - * @memberof pruntime_rpc - * @classdesc Represents a GetClusterInfoResponse. - * @implements IGetClusterInfoResponse - * @constructor - * @param {pruntime_rpc.IGetClusterInfoResponse=} [properties] Properties to set - */ - function GetClusterInfoResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetClusterInfoResponse info. - * @member {pruntime_rpc.IClusterInfo|null|undefined} info - * @memberof pruntime_rpc.GetClusterInfoResponse - * @instance - */ - GetClusterInfoResponse.prototype.info = null; - - /** - * Creates a new GetClusterInfoResponse instance using the specified properties. - * @function create - * @memberof pruntime_rpc.GetClusterInfoResponse - * @static - * @param {pruntime_rpc.IGetClusterInfoResponse=} [properties] Properties to set - * @returns {pruntime_rpc.GetClusterInfoResponse} GetClusterInfoResponse instance - */ - GetClusterInfoResponse.create = function create(properties) { - return new GetClusterInfoResponse(properties); - }; - - /** - * Encodes the specified GetClusterInfoResponse message. Does not implicitly {@link pruntime_rpc.GetClusterInfoResponse.verify|verify} messages. - * @function encode - * @memberof pruntime_rpc.GetClusterInfoResponse - * @static - * @param {pruntime_rpc.IGetClusterInfoResponse} message GetClusterInfoResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetClusterInfoResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.info != null && Object.hasOwnProperty.call(message, "info")) - $root.pruntime_rpc.ClusterInfo.encode(message.info, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GetClusterInfoResponse message, length delimited. Does not implicitly {@link pruntime_rpc.GetClusterInfoResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof pruntime_rpc.GetClusterInfoResponse - * @static - * @param {pruntime_rpc.IGetClusterInfoResponse} message GetClusterInfoResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetClusterInfoResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetClusterInfoResponse message from the specified reader or buffer. - * @function decode - * @memberof pruntime_rpc.GetClusterInfoResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pruntime_rpc.GetClusterInfoResponse} GetClusterInfoResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetClusterInfoResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.GetClusterInfoResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.info = $root.pruntime_rpc.ClusterInfo.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetClusterInfoResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pruntime_rpc.GetClusterInfoResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.GetClusterInfoResponse} GetClusterInfoResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetClusterInfoResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetClusterInfoResponse message. - * @function verify - * @memberof pruntime_rpc.GetClusterInfoResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetClusterInfoResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.info != null && message.hasOwnProperty("info")) { - var error = $root.pruntime_rpc.ClusterInfo.verify(message.info); - if (error) - return "info." + error; - } - return null; - }; - - /** - * Creates a GetClusterInfoResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pruntime_rpc.GetClusterInfoResponse - * @static - * @param {Object.} object Plain object - * @returns {pruntime_rpc.GetClusterInfoResponse} GetClusterInfoResponse - */ - GetClusterInfoResponse.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.GetClusterInfoResponse) - return object; - var message = new $root.pruntime_rpc.GetClusterInfoResponse(); - if (object.info != null) { - if (typeof object.info !== "object") - throw TypeError(".pruntime_rpc.GetClusterInfoResponse.info: object expected"); - message.info = $root.pruntime_rpc.ClusterInfo.fromObject(object.info); - } - return message; - }; - - /** - * Creates a plain object from a GetClusterInfoResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof pruntime_rpc.GetClusterInfoResponse - * @static - * @param {pruntime_rpc.GetClusterInfoResponse} message GetClusterInfoResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetClusterInfoResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.info = null; - if (message.info != null && message.hasOwnProperty("info")) - object.info = $root.pruntime_rpc.ClusterInfo.toObject(message.info, options); - return object; - }; - - /** - * Converts this GetClusterInfoResponse to JSON. - * @function toJSON - * @memberof pruntime_rpc.GetClusterInfoResponse - * @instance - * @returns {Object.} JSON object - */ - GetClusterInfoResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetClusterInfoResponse - * @function getTypeUrl - * @memberof pruntime_rpc.GetClusterInfoResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetClusterInfoResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pruntime_rpc.GetClusterInfoResponse"; - }; - - return GetClusterInfoResponse; - })(); - - pruntime_rpc.ClusterInfo = (function() { - - /** - * Properties of a ClusterInfo. - * @memberof pruntime_rpc - * @interface IClusterInfo - * @property {string|null} [id] ClusterInfo id - * @property {string|null} [runtimeVersion] ClusterInfo runtimeVersion - * @property {string|null} [stateRoot] ClusterInfo stateRoot - * @property {Array.|null} [contracts] ClusterInfo contracts - */ - - /** - * Constructs a new ClusterInfo. - * @memberof pruntime_rpc - * @classdesc Represents a ClusterInfo. - * @implements IClusterInfo - * @constructor - * @param {pruntime_rpc.IClusterInfo=} [properties] Properties to set - */ - function ClusterInfo(properties) { - this.contracts = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ClusterInfo id. - * @member {string} id - * @memberof pruntime_rpc.ClusterInfo - * @instance - */ - ClusterInfo.prototype.id = ""; - - /** - * ClusterInfo runtimeVersion. - * @member {string} runtimeVersion - * @memberof pruntime_rpc.ClusterInfo - * @instance - */ - ClusterInfo.prototype.runtimeVersion = ""; - - /** - * ClusterInfo stateRoot. - * @member {string} stateRoot - * @memberof pruntime_rpc.ClusterInfo - * @instance - */ - ClusterInfo.prototype.stateRoot = ""; - - /** - * ClusterInfo contracts. - * @member {Array.} contracts - * @memberof pruntime_rpc.ClusterInfo - * @instance - */ - ClusterInfo.prototype.contracts = $util.emptyArray; - - /** - * Creates a new ClusterInfo instance using the specified properties. - * @function create - * @memberof pruntime_rpc.ClusterInfo - * @static - * @param {pruntime_rpc.IClusterInfo=} [properties] Properties to set - * @returns {pruntime_rpc.ClusterInfo} ClusterInfo instance - */ - ClusterInfo.create = function create(properties) { - return new ClusterInfo(properties); - }; - - /** - * Encodes the specified ClusterInfo message. Does not implicitly {@link pruntime_rpc.ClusterInfo.verify|verify} messages. - * @function encode - * @memberof pruntime_rpc.ClusterInfo - * @static - * @param {pruntime_rpc.IClusterInfo} message ClusterInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClusterInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); - if (message.runtimeVersion != null && Object.hasOwnProperty.call(message, "runtimeVersion")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.runtimeVersion); - if (message.stateRoot != null && Object.hasOwnProperty.call(message, "stateRoot")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.stateRoot); - if (message.contracts != null && message.contracts.length) - for (var i = 0; i < message.contracts.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.contracts[i]); - return writer; - }; - - /** - * Encodes the specified ClusterInfo message, length delimited. Does not implicitly {@link pruntime_rpc.ClusterInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof pruntime_rpc.ClusterInfo - * @static - * @param {pruntime_rpc.IClusterInfo} message ClusterInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClusterInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ClusterInfo message from the specified reader or buffer. - * @function decode - * @memberof pruntime_rpc.ClusterInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pruntime_rpc.ClusterInfo} ClusterInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClusterInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.ClusterInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.id = reader.string(); - break; - } - case 2: { - message.runtimeVersion = reader.string(); - break; - } - case 3: { - message.stateRoot = reader.string(); - break; - } - case 4: { - if (!(message.contracts && message.contracts.length)) - message.contracts = []; - message.contracts.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ClusterInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pruntime_rpc.ClusterInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.ClusterInfo} ClusterInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClusterInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ClusterInfo message. - * @function verify - * @memberof pruntime_rpc.ClusterInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ClusterInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - if (message.runtimeVersion != null && message.hasOwnProperty("runtimeVersion")) - if (!$util.isString(message.runtimeVersion)) - return "runtimeVersion: string expected"; - if (message.stateRoot != null && message.hasOwnProperty("stateRoot")) - if (!$util.isString(message.stateRoot)) - return "stateRoot: string expected"; - if (message.contracts != null && message.hasOwnProperty("contracts")) { - if (!Array.isArray(message.contracts)) - return "contracts: array expected"; - for (var i = 0; i < message.contracts.length; ++i) - if (!$util.isString(message.contracts[i])) - return "contracts: string[] expected"; - } - return null; - }; - - /** - * Creates a ClusterInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pruntime_rpc.ClusterInfo - * @static - * @param {Object.} object Plain object - * @returns {pruntime_rpc.ClusterInfo} ClusterInfo - */ - ClusterInfo.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.ClusterInfo) - return object; - var message = new $root.pruntime_rpc.ClusterInfo(); - if (object.id != null) - message.id = String(object.id); - if (object.runtimeVersion != null) - message.runtimeVersion = String(object.runtimeVersion); - if (object.stateRoot != null) - message.stateRoot = String(object.stateRoot); - if (object.contracts) { - if (!Array.isArray(object.contracts)) - throw TypeError(".pruntime_rpc.ClusterInfo.contracts: array expected"); - message.contracts = []; - for (var i = 0; i < object.contracts.length; ++i) - message.contracts[i] = String(object.contracts[i]); - } - return message; - }; - - /** - * Creates a plain object from a ClusterInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof pruntime_rpc.ClusterInfo - * @static - * @param {pruntime_rpc.ClusterInfo} message ClusterInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ClusterInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.contracts = []; - if (options.defaults) { - object.id = ""; - object.runtimeVersion = ""; - object.stateRoot = ""; - } - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.runtimeVersion != null && message.hasOwnProperty("runtimeVersion")) - object.runtimeVersion = message.runtimeVersion; - if (message.stateRoot != null && message.hasOwnProperty("stateRoot")) - object.stateRoot = message.stateRoot; - if (message.contracts && message.contracts.length) { - object.contracts = []; - for (var j = 0; j < message.contracts.length; ++j) - object.contracts[j] = message.contracts[j]; - } - return object; - }; - - /** - * Converts this ClusterInfo to JSON. - * @function toJSON - * @memberof pruntime_rpc.ClusterInfo - * @instance - * @returns {Object.} JSON object - */ - ClusterInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ClusterInfo - * @function getTypeUrl - * @memberof pruntime_rpc.ClusterInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ClusterInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pruntime_rpc.ClusterInfo"; - }; - - return ClusterInfo; - })(); - - pruntime_rpc.SidevmCode = (function() { - - /** - * Properties of a SidevmCode. - * @memberof pruntime_rpc - * @interface ISidevmCode - * @property {Uint8Array|null} [contract] SidevmCode contract - * @property {Uint8Array|null} [code] SidevmCode code - */ - - /** - * Constructs a new SidevmCode. - * @memberof pruntime_rpc - * @classdesc Represents a SidevmCode. - * @implements ISidevmCode - * @constructor - * @param {pruntime_rpc.ISidevmCode=} [properties] Properties to set - */ - function SidevmCode(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SidevmCode contract. - * @member {Uint8Array} contract - * @memberof pruntime_rpc.SidevmCode - * @instance - */ - SidevmCode.prototype.contract = $util.newBuffer([]); - - /** - * SidevmCode code. - * @member {Uint8Array} code - * @memberof pruntime_rpc.SidevmCode - * @instance - */ - SidevmCode.prototype.code = $util.newBuffer([]); - - /** - * Creates a new SidevmCode instance using the specified properties. - * @function create - * @memberof pruntime_rpc.SidevmCode - * @static - * @param {pruntime_rpc.ISidevmCode=} [properties] Properties to set - * @returns {pruntime_rpc.SidevmCode} SidevmCode instance - */ - SidevmCode.create = function create(properties) { - return new SidevmCode(properties); - }; - - /** - * Encodes the specified SidevmCode message. Does not implicitly {@link pruntime_rpc.SidevmCode.verify|verify} messages. - * @function encode - * @memberof pruntime_rpc.SidevmCode - * @static - * @param {pruntime_rpc.ISidevmCode} message SidevmCode message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SidevmCode.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.contract != null && Object.hasOwnProperty.call(message, "contract")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.contract); - if (message.code != null && Object.hasOwnProperty.call(message, "code")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.code); - return writer; - }; - - /** - * Encodes the specified SidevmCode message, length delimited. Does not implicitly {@link pruntime_rpc.SidevmCode.verify|verify} messages. - * @function encodeDelimited - * @memberof pruntime_rpc.SidevmCode - * @static - * @param {pruntime_rpc.ISidevmCode} message SidevmCode message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SidevmCode.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SidevmCode message from the specified reader or buffer. - * @function decode - * @memberof pruntime_rpc.SidevmCode - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pruntime_rpc.SidevmCode} SidevmCode - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SidevmCode.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.SidevmCode(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.contract = reader.bytes(); - break; - } - case 2: { - message.code = reader.bytes(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SidevmCode message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pruntime_rpc.SidevmCode - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.SidevmCode} SidevmCode - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SidevmCode.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SidevmCode message. - * @function verify - * @memberof pruntime_rpc.SidevmCode - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SidevmCode.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.contract != null && message.hasOwnProperty("contract")) - if (!(message.contract && typeof message.contract.length === "number" || $util.isString(message.contract))) - return "contract: buffer expected"; - if (message.code != null && message.hasOwnProperty("code")) - if (!(message.code && typeof message.code.length === "number" || $util.isString(message.code))) - return "code: buffer expected"; - return null; - }; - - /** - * Creates a SidevmCode message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pruntime_rpc.SidevmCode - * @static - * @param {Object.} object Plain object - * @returns {pruntime_rpc.SidevmCode} SidevmCode - */ - SidevmCode.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.SidevmCode) - return object; - var message = new $root.pruntime_rpc.SidevmCode(); - if (object.contract != null) - if (typeof object.contract === "string") - $util.base64.decode(object.contract, message.contract = $util.newBuffer($util.base64.length(object.contract)), 0); - else if (object.contract.length >= 0) - message.contract = object.contract; - if (object.code != null) - if (typeof object.code === "string") - $util.base64.decode(object.code, message.code = $util.newBuffer($util.base64.length(object.code)), 0); - else if (object.code.length >= 0) - message.code = object.code; - return message; - }; - - /** - * Creates a plain object from a SidevmCode message. Also converts values to other types if specified. - * @function toObject - * @memberof pruntime_rpc.SidevmCode - * @static - * @param {pruntime_rpc.SidevmCode} message SidevmCode - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SidevmCode.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.contract = ""; - else { - object.contract = []; - if (options.bytes !== Array) - object.contract = $util.newBuffer(object.contract); - } - if (options.bytes === String) - object.code = ""; - else { - object.code = []; - if (options.bytes !== Array) - object.code = $util.newBuffer(object.code); - } - } - if (message.contract != null && message.hasOwnProperty("contract")) - object.contract = options.bytes === String ? $util.base64.encode(message.contract, 0, message.contract.length) : options.bytes === Array ? Array.prototype.slice.call(message.contract) : message.contract; - if (message.code != null && message.hasOwnProperty("code")) - object.code = options.bytes === String ? $util.base64.encode(message.code, 0, message.code.length) : options.bytes === Array ? Array.prototype.slice.call(message.code) : message.code; - return object; - }; - - /** - * Converts this SidevmCode to JSON. - * @function toJSON - * @memberof pruntime_rpc.SidevmCode - * @instance - * @returns {Object.} JSON object - */ - SidevmCode.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SidevmCode - * @function getTypeUrl - * @memberof pruntime_rpc.SidevmCode - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SidevmCode.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pruntime_rpc.SidevmCode"; - }; - - return SidevmCode; - })(); - - pruntime_rpc.ContractParameters = (function() { - - /** - * Properties of a ContractParameters. - * @memberof pruntime_rpc - * @interface IContractParameters - * @property {string|null} [deployer] ContractParameters deployer - * @property {string|null} [clusterId] ContractParameters clusterId - * @property {string|null} [codeHash] ContractParameters codeHash - * @property {string|null} [salt] ContractParameters salt - */ - - /** - * Constructs a new ContractParameters. - * @memberof pruntime_rpc - * @classdesc Represents a ContractParameters. - * @implements IContractParameters - * @constructor - * @param {pruntime_rpc.IContractParameters=} [properties] Properties to set - */ - function ContractParameters(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ContractParameters deployer. - * @member {string} deployer - * @memberof pruntime_rpc.ContractParameters - * @instance - */ - ContractParameters.prototype.deployer = ""; - - /** - * ContractParameters clusterId. - * @member {string} clusterId - * @memberof pruntime_rpc.ContractParameters - * @instance - */ - ContractParameters.prototype.clusterId = ""; - - /** - * ContractParameters codeHash. - * @member {string} codeHash - * @memberof pruntime_rpc.ContractParameters - * @instance - */ - ContractParameters.prototype.codeHash = ""; - - /** - * ContractParameters salt. - * @member {string} salt - * @memberof pruntime_rpc.ContractParameters - * @instance - */ - ContractParameters.prototype.salt = ""; - - /** - * Creates a new ContractParameters instance using the specified properties. - * @function create - * @memberof pruntime_rpc.ContractParameters - * @static - * @param {pruntime_rpc.IContractParameters=} [properties] Properties to set - * @returns {pruntime_rpc.ContractParameters} ContractParameters instance - */ - ContractParameters.create = function create(properties) { - return new ContractParameters(properties); - }; - - /** - * Encodes the specified ContractParameters message. Does not implicitly {@link pruntime_rpc.ContractParameters.verify|verify} messages. - * @function encode - * @memberof pruntime_rpc.ContractParameters - * @static - * @param {pruntime_rpc.IContractParameters} message ContractParameters message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ContractParameters.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.deployer != null && Object.hasOwnProperty.call(message, "deployer")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.deployer); - if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.clusterId); - if (message.codeHash != null && Object.hasOwnProperty.call(message, "codeHash")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.codeHash); - if (message.salt != null && Object.hasOwnProperty.call(message, "salt")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.salt); - return writer; - }; - - /** - * Encodes the specified ContractParameters message, length delimited. Does not implicitly {@link pruntime_rpc.ContractParameters.verify|verify} messages. - * @function encodeDelimited - * @memberof pruntime_rpc.ContractParameters - * @static - * @param {pruntime_rpc.IContractParameters} message ContractParameters message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ContractParameters.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ContractParameters message from the specified reader or buffer. - * @function decode - * @memberof pruntime_rpc.ContractParameters - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pruntime_rpc.ContractParameters} ContractParameters - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ContractParameters.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.ContractParameters(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.deployer = reader.string(); - break; - } - case 2: { - message.clusterId = reader.string(); - break; - } - case 3: { - message.codeHash = reader.string(); - break; - } - case 4: { - message.salt = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ContractParameters message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pruntime_rpc.ContractParameters - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.ContractParameters} ContractParameters - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ContractParameters.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ContractParameters message. - * @function verify - * @memberof pruntime_rpc.ContractParameters - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ContractParameters.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.deployer != null && message.hasOwnProperty("deployer")) - if (!$util.isString(message.deployer)) - return "deployer: string expected"; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - if (!$util.isString(message.clusterId)) - return "clusterId: string expected"; - if (message.codeHash != null && message.hasOwnProperty("codeHash")) - if (!$util.isString(message.codeHash)) - return "codeHash: string expected"; - if (message.salt != null && message.hasOwnProperty("salt")) - if (!$util.isString(message.salt)) - return "salt: string expected"; - return null; - }; - - /** - * Creates a ContractParameters message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pruntime_rpc.ContractParameters - * @static - * @param {Object.} object Plain object - * @returns {pruntime_rpc.ContractParameters} ContractParameters - */ - ContractParameters.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.ContractParameters) - return object; - var message = new $root.pruntime_rpc.ContractParameters(); - if (object.deployer != null) - message.deployer = String(object.deployer); - if (object.clusterId != null) - message.clusterId = String(object.clusterId); - if (object.codeHash != null) - message.codeHash = String(object.codeHash); - if (object.salt != null) - message.salt = String(object.salt); - return message; - }; - - /** - * Creates a plain object from a ContractParameters message. Also converts values to other types if specified. - * @function toObject - * @memberof pruntime_rpc.ContractParameters - * @static - * @param {pruntime_rpc.ContractParameters} message ContractParameters - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ContractParameters.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.deployer = ""; - object.clusterId = ""; - object.codeHash = ""; - object.salt = ""; - } - if (message.deployer != null && message.hasOwnProperty("deployer")) - object.deployer = message.deployer; - if (message.clusterId != null && message.hasOwnProperty("clusterId")) - object.clusterId = message.clusterId; - if (message.codeHash != null && message.hasOwnProperty("codeHash")) - object.codeHash = message.codeHash; - if (message.salt != null && message.hasOwnProperty("salt")) - object.salt = message.salt; - return object; - }; - - /** - * Converts this ContractParameters to JSON. - * @function toJSON - * @memberof pruntime_rpc.ContractParameters - * @instance - * @returns {Object.} JSON object - */ - ContractParameters.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ContractParameters - * @function getTypeUrl - * @memberof pruntime_rpc.ContractParameters - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ContractParameters.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pruntime_rpc.ContractParameters"; - }; - - return ContractParameters; - })(); - - pruntime_rpc.ContractId = (function() { - - /** - * Properties of a ContractId. - * @memberof pruntime_rpc - * @interface IContractId - * @property {string|null} [id] ContractId id - */ - - /** - * Constructs a new ContractId. - * @memberof pruntime_rpc - * @classdesc Represents a ContractId. - * @implements IContractId - * @constructor - * @param {pruntime_rpc.IContractId=} [properties] Properties to set - */ - function ContractId(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ContractId id. - * @member {string} id - * @memberof pruntime_rpc.ContractId + * Signature signature. + * @member {Uint8Array} signature + * @memberof pruntime_rpc.Signature * @instance */ - ContractId.prototype.id = ""; + Signature.prototype.signature = $util.newBuffer([]); /** - * Creates a new ContractId instance using the specified properties. + * Creates a new Signature instance using the specified properties. * @function create - * @memberof pruntime_rpc.ContractId + * @memberof pruntime_rpc.Signature * @static - * @param {pruntime_rpc.IContractId=} [properties] Properties to set - * @returns {pruntime_rpc.ContractId} ContractId instance + * @param {pruntime_rpc.ISignature=} [properties] Properties to set + * @returns {pruntime_rpc.Signature} Signature instance */ - ContractId.create = function create(properties) { - return new ContractId(properties); + Signature.create = function create(properties) { + return new Signature(properties); }; /** - * Encodes the specified ContractId message. Does not implicitly {@link pruntime_rpc.ContractId.verify|verify} messages. + * Encodes the specified Signature message. Does not implicitly {@link pruntime_rpc.Signature.verify|verify} messages. * @function encode - * @memberof pruntime_rpc.ContractId + * @memberof pruntime_rpc.Signature * @static - * @param {pruntime_rpc.IContractId} message ContractId message or plain object to encode + * @param {pruntime_rpc.ISignature} message Signature message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ContractId.encode = function encode(message, writer) { + Signature.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.signedBy != null && Object.hasOwnProperty.call(message, "signedBy")) + $root.pruntime_rpc.Certificate.encode(message.signedBy, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.signatureType != null && Object.hasOwnProperty.call(message, "signatureType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.signatureType); + if (message.signature != null && Object.hasOwnProperty.call(message, "signature")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.signature); return writer; }; /** - * Encodes the specified ContractId message, length delimited. Does not implicitly {@link pruntime_rpc.ContractId.verify|verify} messages. + * Encodes the specified Signature message, length delimited. Does not implicitly {@link pruntime_rpc.Signature.verify|verify} messages. * @function encodeDelimited - * @memberof pruntime_rpc.ContractId + * @memberof pruntime_rpc.Signature * @static - * @param {pruntime_rpc.IContractId} message ContractId message or plain object to encode + * @param {pruntime_rpc.ISignature} message Signature message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ContractId.encodeDelimited = function encodeDelimited(message, writer) { + Signature.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ContractId message from the specified reader or buffer. + * Decodes a Signature message from the specified reader or buffer. * @function decode - * @memberof pruntime_rpc.ContractId + * @memberof pruntime_rpc.Signature * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {pruntime_rpc.ContractId} ContractId + * @returns {pruntime_rpc.Signature} Signature * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ContractId.decode = function decode(reader, length) { + Signature.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.ContractId(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.Signature(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.id = reader.string(); + message.signedBy = $root.pruntime_rpc.Certificate.decode(reader, reader.uint32()); + break; + } + case 2: { + message.signatureType = reader.int32(); + break; + } + case 3: { + message.signature = reader.bytes(); break; } default: @@ -15146,123 +4853,198 @@ $root.pruntime_rpc = (function() { }; /** - * Decodes a ContractId message from the specified reader or buffer, length delimited. + * Decodes a Signature message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof pruntime_rpc.ContractId + * @memberof pruntime_rpc.Signature * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.ContractId} ContractId + * @returns {pruntime_rpc.Signature} Signature * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ContractId.decodeDelimited = function decodeDelimited(reader) { + Signature.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ContractId message. + * Verifies a Signature message. * @function verify - * @memberof pruntime_rpc.ContractId + * @memberof pruntime_rpc.Signature * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ContractId.verify = function verify(message) { + Signature.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; + if (message.signedBy != null && message.hasOwnProperty("signedBy")) { + var error = $root.pruntime_rpc.Certificate.verify(message.signedBy); + if (error) + return "signedBy." + error; + } + if (message.signatureType != null && message.hasOwnProperty("signatureType")) + switch (message.signatureType) { + default: + return "signatureType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.signature != null && message.hasOwnProperty("signature")) + if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature))) + return "signature: buffer expected"; return null; }; /** - * Creates a ContractId message from a plain object. Also converts values to their respective internal types. + * Creates a Signature message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof pruntime_rpc.ContractId + * @memberof pruntime_rpc.Signature * @static * @param {Object.} object Plain object - * @returns {pruntime_rpc.ContractId} ContractId + * @returns {pruntime_rpc.Signature} Signature */ - ContractId.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.ContractId) + Signature.fromObject = function fromObject(object) { + if (object instanceof $root.pruntime_rpc.Signature) return object; - var message = new $root.pruntime_rpc.ContractId(); - if (object.id != null) - message.id = String(object.id); + var message = new $root.pruntime_rpc.Signature(); + if (object.signedBy != null) { + if (typeof object.signedBy !== "object") + throw TypeError(".pruntime_rpc.Signature.signedBy: object expected"); + message.signedBy = $root.pruntime_rpc.Certificate.fromObject(object.signedBy); + } + switch (object.signatureType) { + default: + if (typeof object.signatureType === "number") { + message.signatureType = object.signatureType; + break; + } + break; + case "Ed25519": + case 0: + message.signatureType = 0; + break; + case "Sr25519": + case 1: + message.signatureType = 1; + break; + case "Ecdsa": + case 2: + message.signatureType = 2; + break; + case "Ed25519WrapBytes": + case 3: + message.signatureType = 3; + break; + case "Sr25519WrapBytes": + case 4: + message.signatureType = 4; + break; + case "EcdsaWrapBytes": + case 5: + message.signatureType = 5; + break; + case "Eip712": + case 6: + message.signatureType = 6; + break; + } + if (object.signature != null) + if (typeof object.signature === "string") + $util.base64.decode(object.signature, message.signature = $util.newBuffer($util.base64.length(object.signature)), 0); + else if (object.signature.length >= 0) + message.signature = object.signature; return message; }; /** - * Creates a plain object from a ContractId message. Also converts values to other types if specified. + * Creates a plain object from a Signature message. Also converts values to other types if specified. * @function toObject - * @memberof pruntime_rpc.ContractId + * @memberof pruntime_rpc.Signature * @static - * @param {pruntime_rpc.ContractId} message ContractId + * @param {pruntime_rpc.Signature} message Signature * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ContractId.toObject = function toObject(message, options) { + Signature.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.id = ""; - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; + if (options.defaults) { + object.signedBy = null; + object.signatureType = options.enums === String ? "Ed25519" : 0; + if (options.bytes === String) + object.signature = ""; + else { + object.signature = []; + if (options.bytes !== Array) + object.signature = $util.newBuffer(object.signature); + } + } + if (message.signedBy != null && message.hasOwnProperty("signedBy")) + object.signedBy = $root.pruntime_rpc.Certificate.toObject(message.signedBy, options); + if (message.signatureType != null && message.hasOwnProperty("signatureType")) + object.signatureType = options.enums === String ? $root.pruntime_rpc.SignatureType[message.signatureType] === undefined ? message.signatureType : $root.pruntime_rpc.SignatureType[message.signatureType] : message.signatureType; + if (message.signature != null && message.hasOwnProperty("signature")) + object.signature = options.bytes === String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature) : message.signature; return object; }; /** - * Converts this ContractId to JSON. + * Converts this Signature to JSON. * @function toJSON - * @memberof pruntime_rpc.ContractId + * @memberof pruntime_rpc.Signature * @instance * @returns {Object.} JSON object */ - ContractId.prototype.toJSON = function toJSON() { + Signature.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ContractId + * Gets the default type url for Signature * @function getTypeUrl - * @memberof pruntime_rpc.ContractId + * @memberof pruntime_rpc.Signature * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ContractId.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Signature.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/pruntime_rpc.ContractId"; + return typeUrlPrefix + "/pruntime_rpc.Signature"; }; - return ContractId; + return Signature; })(); - pruntime_rpc.ChainState = (function() { + pruntime_rpc.Certificate = (function() { /** - * Properties of a ChainState. + * Properties of a Certificate. * @memberof pruntime_rpc - * @interface IChainState - * @property {number|null} [blockNumber] ChainState blockNumber - * @property {Uint8Array|null} [encodedState] ChainState encodedState + * @interface ICertificate + * @property {Uint8Array|null} [encodedBody] Certificate encodedBody + * @property {pruntime_rpc.ISignature|null} [signature] Certificate signature */ /** - * Constructs a new ChainState. + * Constructs a new Certificate. * @memberof pruntime_rpc - * @classdesc Represents a ChainState. - * @implements IChainState + * @classdesc Represents a Certificate. + * @implements ICertificate * @constructor - * @param {pruntime_rpc.IChainState=} [properties] Properties to set + * @param {pruntime_rpc.ICertificate=} [properties] Properties to set */ - function ChainState(properties) { + function Certificate(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15270,89 +5052,89 @@ $root.pruntime_rpc = (function() { } /** - * ChainState blockNumber. - * @member {number} blockNumber - * @memberof pruntime_rpc.ChainState + * Certificate encodedBody. + * @member {Uint8Array} encodedBody + * @memberof pruntime_rpc.Certificate * @instance */ - ChainState.prototype.blockNumber = 0; + Certificate.prototype.encodedBody = $util.newBuffer([]); /** - * ChainState encodedState. - * @member {Uint8Array} encodedState - * @memberof pruntime_rpc.ChainState + * Certificate signature. + * @member {pruntime_rpc.ISignature|null|undefined} signature + * @memberof pruntime_rpc.Certificate * @instance */ - ChainState.prototype.encodedState = $util.newBuffer([]); + Certificate.prototype.signature = null; /** - * Creates a new ChainState instance using the specified properties. + * Creates a new Certificate instance using the specified properties. * @function create - * @memberof pruntime_rpc.ChainState + * @memberof pruntime_rpc.Certificate * @static - * @param {pruntime_rpc.IChainState=} [properties] Properties to set - * @returns {pruntime_rpc.ChainState} ChainState instance + * @param {pruntime_rpc.ICertificate=} [properties] Properties to set + * @returns {pruntime_rpc.Certificate} Certificate instance */ - ChainState.create = function create(properties) { - return new ChainState(properties); + Certificate.create = function create(properties) { + return new Certificate(properties); }; /** - * Encodes the specified ChainState message. Does not implicitly {@link pruntime_rpc.ChainState.verify|verify} messages. + * Encodes the specified Certificate message. Does not implicitly {@link pruntime_rpc.Certificate.verify|verify} messages. * @function encode - * @memberof pruntime_rpc.ChainState + * @memberof pruntime_rpc.Certificate * @static - * @param {pruntime_rpc.IChainState} message ChainState message or plain object to encode + * @param {pruntime_rpc.ICertificate} message Certificate message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ChainState.encode = function encode(message, writer) { + Certificate.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.blockNumber != null && Object.hasOwnProperty.call(message, "blockNumber")) - writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.blockNumber); - if (message.encodedState != null && Object.hasOwnProperty.call(message, "encodedState")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.encodedState); + if (message.encodedBody != null && Object.hasOwnProperty.call(message, "encodedBody")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.encodedBody); + if (message.signature != null && Object.hasOwnProperty.call(message, "signature")) + $root.pruntime_rpc.Signature.encode(message.signature, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified ChainState message, length delimited. Does not implicitly {@link pruntime_rpc.ChainState.verify|verify} messages. + * Encodes the specified Certificate message, length delimited. Does not implicitly {@link pruntime_rpc.Certificate.verify|verify} messages. * @function encodeDelimited - * @memberof pruntime_rpc.ChainState + * @memberof pruntime_rpc.Certificate * @static - * @param {pruntime_rpc.IChainState} message ChainState message or plain object to encode + * @param {pruntime_rpc.ICertificate} message Certificate message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ChainState.encodeDelimited = function encodeDelimited(message, writer) { + Certificate.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ChainState message from the specified reader or buffer. + * Decodes a Certificate message from the specified reader or buffer. * @function decode - * @memberof pruntime_rpc.ChainState + * @memberof pruntime_rpc.Certificate * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {pruntime_rpc.ChainState} ChainState + * @returns {pruntime_rpc.Certificate} Certificate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ChainState.decode = function decode(reader, length) { + Certificate.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.ChainState(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.Certificate(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.blockNumber = reader.uint32(); + message.encodedBody = reader.bytes(); break; } case 2: { - message.encodedState = reader.bytes(); + message.signature = $root.pruntime_rpc.Signature.decode(reader, reader.uint32()); break; } default: @@ -15364,140 +5146,169 @@ $root.pruntime_rpc = (function() { }; /** - * Decodes a ChainState message from the specified reader or buffer, length delimited. + * Decodes a Certificate message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof pruntime_rpc.ChainState + * @memberof pruntime_rpc.Certificate * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.ChainState} ChainState + * @returns {pruntime_rpc.Certificate} Certificate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ChainState.decodeDelimited = function decodeDelimited(reader) { + Certificate.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ChainState message. + * Verifies a Certificate message. * @function verify - * @memberof pruntime_rpc.ChainState + * @memberof pruntime_rpc.Certificate * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ChainState.verify = function verify(message) { + Certificate.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.blockNumber != null && message.hasOwnProperty("blockNumber")) - if (!$util.isInteger(message.blockNumber)) - return "blockNumber: integer expected"; - if (message.encodedState != null && message.hasOwnProperty("encodedState")) - if (!(message.encodedState && typeof message.encodedState.length === "number" || $util.isString(message.encodedState))) - return "encodedState: buffer expected"; + if (message.encodedBody != null && message.hasOwnProperty("encodedBody")) + if (!(message.encodedBody && typeof message.encodedBody.length === "number" || $util.isString(message.encodedBody))) + return "encodedBody: buffer expected"; + if (message.signature != null && message.hasOwnProperty("signature")) { + var error = $root.pruntime_rpc.Signature.verify(message.signature); + if (error) + return "signature." + error; + } return null; }; /** - * Creates a ChainState message from a plain object. Also converts values to their respective internal types. + * Creates a Certificate message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof pruntime_rpc.ChainState + * @memberof pruntime_rpc.Certificate * @static * @param {Object.} object Plain object - * @returns {pruntime_rpc.ChainState} ChainState + * @returns {pruntime_rpc.Certificate} Certificate */ - ChainState.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.ChainState) + Certificate.fromObject = function fromObject(object) { + if (object instanceof $root.pruntime_rpc.Certificate) return object; - var message = new $root.pruntime_rpc.ChainState(); - if (object.blockNumber != null) - message.blockNumber = object.blockNumber >>> 0; - if (object.encodedState != null) - if (typeof object.encodedState === "string") - $util.base64.decode(object.encodedState, message.encodedState = $util.newBuffer($util.base64.length(object.encodedState)), 0); - else if (object.encodedState.length >= 0) - message.encodedState = object.encodedState; + var message = new $root.pruntime_rpc.Certificate(); + if (object.encodedBody != null) + if (typeof object.encodedBody === "string") + $util.base64.decode(object.encodedBody, message.encodedBody = $util.newBuffer($util.base64.length(object.encodedBody)), 0); + else if (object.encodedBody.length >= 0) + message.encodedBody = object.encodedBody; + if (object.signature != null) { + if (typeof object.signature !== "object") + throw TypeError(".pruntime_rpc.Certificate.signature: object expected"); + message.signature = $root.pruntime_rpc.Signature.fromObject(object.signature); + } return message; }; /** - * Creates a plain object from a ChainState message. Also converts values to other types if specified. + * Creates a plain object from a Certificate message. Also converts values to other types if specified. * @function toObject - * @memberof pruntime_rpc.ChainState + * @memberof pruntime_rpc.Certificate * @static - * @param {pruntime_rpc.ChainState} message ChainState + * @param {pruntime_rpc.Certificate} message Certificate * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ChainState.toObject = function toObject(message, options) { + Certificate.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.blockNumber = 0; if (options.bytes === String) - object.encodedState = ""; + object.encodedBody = ""; else { - object.encodedState = []; + object.encodedBody = []; if (options.bytes !== Array) - object.encodedState = $util.newBuffer(object.encodedState); + object.encodedBody = $util.newBuffer(object.encodedBody); } + object.signature = null; } - if (message.blockNumber != null && message.hasOwnProperty("blockNumber")) - object.blockNumber = message.blockNumber; - if (message.encodedState != null && message.hasOwnProperty("encodedState")) - object.encodedState = options.bytes === String ? $util.base64.encode(message.encodedState, 0, message.encodedState.length) : options.bytes === Array ? Array.prototype.slice.call(message.encodedState) : message.encodedState; + if (message.encodedBody != null && message.hasOwnProperty("encodedBody")) + object.encodedBody = options.bytes === String ? $util.base64.encode(message.encodedBody, 0, message.encodedBody.length) : options.bytes === Array ? Array.prototype.slice.call(message.encodedBody) : message.encodedBody; + if (message.signature != null && message.hasOwnProperty("signature")) + object.signature = $root.pruntime_rpc.Signature.toObject(message.signature, options); return object; }; /** - * Converts this ChainState to JSON. + * Converts this Certificate to JSON. * @function toJSON - * @memberof pruntime_rpc.ChainState + * @memberof pruntime_rpc.Certificate * @instance * @returns {Object.} JSON object */ - ChainState.prototype.toJSON = function toJSON() { + Certificate.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ChainState + * Gets the default type url for Certificate * @function getTypeUrl - * @memberof pruntime_rpc.ChainState + * @memberof pruntime_rpc.Certificate * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ChainState.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Certificate.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/pruntime_rpc.ChainState"; + return typeUrlPrefix + "/pruntime_rpc.Certificate"; }; - return ChainState; + return Certificate; + })(); + + /** + * SignatureType enum. + * @name pruntime_rpc.SignatureType + * @enum {number} + * @property {number} Ed25519=0 Ed25519 value + * @property {number} Sr25519=1 Sr25519 value + * @property {number} Ecdsa=2 Ecdsa value + * @property {number} Ed25519WrapBytes=3 Ed25519WrapBytes value + * @property {number} Sr25519WrapBytes=4 Sr25519WrapBytes value + * @property {number} EcdsaWrapBytes=5 EcdsaWrapBytes value + * @property {number} Eip712=6 Eip712 value + */ + pruntime_rpc.SignatureType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "Ed25519"] = 0; + values[valuesById[1] = "Sr25519"] = 1; + values[valuesById[2] = "Ecdsa"] = 2; + values[valuesById[3] = "Ed25519WrapBytes"] = 3; + values[valuesById[4] = "Sr25519WrapBytes"] = 4; + values[valuesById[5] = "EcdsaWrapBytes"] = 5; + values[valuesById[6] = "Eip712"] = 6; + return values; })(); - pruntime_rpc.StopOptions = (function() { + pruntime_rpc.ContractQueryResponse = (function() { /** - * Properties of a StopOptions. + * Properties of a ContractQueryResponse. * @memberof pruntime_rpc - * @interface IStopOptions - * @property {boolean|null} [removeCheckpoints] StopOptions removeCheckpoints + * @interface IContractQueryResponse + * @property {Uint8Array|null} [encodedEncryptedData] ContractQueryResponse encodedEncryptedData */ /** - * Constructs a new StopOptions. + * Constructs a new ContractQueryResponse. * @memberof pruntime_rpc - * @classdesc Represents a StopOptions. - * @implements IStopOptions + * @classdesc Represents a ContractQueryResponse. + * @implements IContractQueryResponse * @constructor - * @param {pruntime_rpc.IStopOptions=} [properties] Properties to set + * @param {pruntime_rpc.IContractQueryResponse=} [properties] Properties to set */ - function StopOptions(properties) { + function ContractQueryResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15505,75 +5316,75 @@ $root.pruntime_rpc = (function() { } /** - * StopOptions removeCheckpoints. - * @member {boolean} removeCheckpoints - * @memberof pruntime_rpc.StopOptions + * ContractQueryResponse encodedEncryptedData. + * @member {Uint8Array} encodedEncryptedData + * @memberof pruntime_rpc.ContractQueryResponse * @instance */ - StopOptions.prototype.removeCheckpoints = false; + ContractQueryResponse.prototype.encodedEncryptedData = $util.newBuffer([]); /** - * Creates a new StopOptions instance using the specified properties. + * Creates a new ContractQueryResponse instance using the specified properties. * @function create - * @memberof pruntime_rpc.StopOptions + * @memberof pruntime_rpc.ContractQueryResponse * @static - * @param {pruntime_rpc.IStopOptions=} [properties] Properties to set - * @returns {pruntime_rpc.StopOptions} StopOptions instance + * @param {pruntime_rpc.IContractQueryResponse=} [properties] Properties to set + * @returns {pruntime_rpc.ContractQueryResponse} ContractQueryResponse instance */ - StopOptions.create = function create(properties) { - return new StopOptions(properties); + ContractQueryResponse.create = function create(properties) { + return new ContractQueryResponse(properties); }; /** - * Encodes the specified StopOptions message. Does not implicitly {@link pruntime_rpc.StopOptions.verify|verify} messages. + * Encodes the specified ContractQueryResponse message. Does not implicitly {@link pruntime_rpc.ContractQueryResponse.verify|verify} messages. * @function encode - * @memberof pruntime_rpc.StopOptions + * @memberof pruntime_rpc.ContractQueryResponse * @static - * @param {pruntime_rpc.IStopOptions} message StopOptions message or plain object to encode + * @param {pruntime_rpc.IContractQueryResponse} message ContractQueryResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StopOptions.encode = function encode(message, writer) { + ContractQueryResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.removeCheckpoints != null && Object.hasOwnProperty.call(message, "removeCheckpoints")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.removeCheckpoints); + if (message.encodedEncryptedData != null && Object.hasOwnProperty.call(message, "encodedEncryptedData")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.encodedEncryptedData); return writer; }; /** - * Encodes the specified StopOptions message, length delimited. Does not implicitly {@link pruntime_rpc.StopOptions.verify|verify} messages. + * Encodes the specified ContractQueryResponse message, length delimited. Does not implicitly {@link pruntime_rpc.ContractQueryResponse.verify|verify} messages. * @function encodeDelimited - * @memberof pruntime_rpc.StopOptions + * @memberof pruntime_rpc.ContractQueryResponse * @static - * @param {pruntime_rpc.IStopOptions} message StopOptions message or plain object to encode + * @param {pruntime_rpc.IContractQueryResponse} message ContractQueryResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StopOptions.encodeDelimited = function encodeDelimited(message, writer) { + ContractQueryResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a StopOptions message from the specified reader or buffer. + * Decodes a ContractQueryResponse message from the specified reader or buffer. * @function decode - * @memberof pruntime_rpc.StopOptions + * @memberof pruntime_rpc.ContractQueryResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {pruntime_rpc.StopOptions} StopOptions + * @returns {pruntime_rpc.ContractQueryResponse} ContractQueryResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StopOptions.decode = function decode(reader, length) { + ContractQueryResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.StopOptions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.ContractQueryResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.removeCheckpoints = reader.bool(); + message.encodedEncryptedData = reader.bytes(); break; } default: @@ -15585,123 +5396,132 @@ $root.pruntime_rpc = (function() { }; /** - * Decodes a StopOptions message from the specified reader or buffer, length delimited. + * Decodes a ContractQueryResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof pruntime_rpc.StopOptions + * @memberof pruntime_rpc.ContractQueryResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.StopOptions} StopOptions + * @returns {pruntime_rpc.ContractQueryResponse} ContractQueryResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StopOptions.decodeDelimited = function decodeDelimited(reader) { + ContractQueryResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a StopOptions message. + * Verifies a ContractQueryResponse message. * @function verify - * @memberof pruntime_rpc.StopOptions + * @memberof pruntime_rpc.ContractQueryResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - StopOptions.verify = function verify(message) { + ContractQueryResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.removeCheckpoints != null && message.hasOwnProperty("removeCheckpoints")) - if (typeof message.removeCheckpoints !== "boolean") - return "removeCheckpoints: boolean expected"; + if (message.encodedEncryptedData != null && message.hasOwnProperty("encodedEncryptedData")) + if (!(message.encodedEncryptedData && typeof message.encodedEncryptedData.length === "number" || $util.isString(message.encodedEncryptedData))) + return "encodedEncryptedData: buffer expected"; return null; }; /** - * Creates a StopOptions message from a plain object. Also converts values to their respective internal types. + * Creates a ContractQueryResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof pruntime_rpc.StopOptions + * @memberof pruntime_rpc.ContractQueryResponse * @static * @param {Object.} object Plain object - * @returns {pruntime_rpc.StopOptions} StopOptions + * @returns {pruntime_rpc.ContractQueryResponse} ContractQueryResponse */ - StopOptions.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.StopOptions) + ContractQueryResponse.fromObject = function fromObject(object) { + if (object instanceof $root.pruntime_rpc.ContractQueryResponse) return object; - var message = new $root.pruntime_rpc.StopOptions(); - if (object.removeCheckpoints != null) - message.removeCheckpoints = Boolean(object.removeCheckpoints); + var message = new $root.pruntime_rpc.ContractQueryResponse(); + if (object.encodedEncryptedData != null) + if (typeof object.encodedEncryptedData === "string") + $util.base64.decode(object.encodedEncryptedData, message.encodedEncryptedData = $util.newBuffer($util.base64.length(object.encodedEncryptedData)), 0); + else if (object.encodedEncryptedData.length >= 0) + message.encodedEncryptedData = object.encodedEncryptedData; return message; }; /** - * Creates a plain object from a StopOptions message. Also converts values to other types if specified. + * Creates a plain object from a ContractQueryResponse message. Also converts values to other types if specified. * @function toObject - * @memberof pruntime_rpc.StopOptions + * @memberof pruntime_rpc.ContractQueryResponse * @static - * @param {pruntime_rpc.StopOptions} message StopOptions + * @param {pruntime_rpc.ContractQueryResponse} message ContractQueryResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StopOptions.toObject = function toObject(message, options) { + ContractQueryResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.removeCheckpoints = false; - if (message.removeCheckpoints != null && message.hasOwnProperty("removeCheckpoints")) - object.removeCheckpoints = message.removeCheckpoints; + if (options.bytes === String) + object.encodedEncryptedData = ""; + else { + object.encodedEncryptedData = []; + if (options.bytes !== Array) + object.encodedEncryptedData = $util.newBuffer(object.encodedEncryptedData); + } + if (message.encodedEncryptedData != null && message.hasOwnProperty("encodedEncryptedData")) + object.encodedEncryptedData = options.bytes === String ? $util.base64.encode(message.encodedEncryptedData, 0, message.encodedEncryptedData.length) : options.bytes === Array ? Array.prototype.slice.call(message.encodedEncryptedData) : message.encodedEncryptedData; return object; }; /** - * Converts this StopOptions to JSON. + * Converts this ContractQueryResponse to JSON. * @function toJSON - * @memberof pruntime_rpc.StopOptions + * @memberof pruntime_rpc.ContractQueryResponse * @instance * @returns {Object.} JSON object */ - StopOptions.prototype.toJSON = function toJSON() { + ContractQueryResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for StopOptions + * Gets the default type url for ContractQueryResponse * @function getTypeUrl - * @memberof pruntime_rpc.StopOptions + * @memberof pruntime_rpc.ContractQueryResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - StopOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ContractQueryResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/pruntime_rpc.StopOptions"; + return typeUrlPrefix + "/pruntime_rpc.ContractQueryResponse"; }; - return StopOptions; + return ContractQueryResponse; })(); - pruntime_rpc.StorageProof = (function() { + pruntime_rpc.AddEndpointRequest = (function() { /** - * Properties of a StorageProof. + * Properties of an AddEndpointRequest. * @memberof pruntime_rpc - * @interface IStorageProof - * @property {Array.|null} [proof] StorageProof proof + * @interface IAddEndpointRequest + * @property {Uint8Array|null} [encodedEndpointType] AddEndpointRequest encodedEndpointType + * @property {string|null} [endpoint] AddEndpointRequest endpoint */ /** - * Constructs a new StorageProof. + * Constructs a new AddEndpointRequest. * @memberof pruntime_rpc - * @classdesc Represents a StorageProof. - * @implements IStorageProof + * @classdesc Represents an AddEndpointRequest. + * @implements IAddEndpointRequest * @constructor - * @param {pruntime_rpc.IStorageProof=} [properties] Properties to set + * @param {pruntime_rpc.IAddEndpointRequest=} [properties] Properties to set */ - function StorageProof(properties) { - this.proof = []; + function AddEndpointRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15709,78 +5529,89 @@ $root.pruntime_rpc = (function() { } /** - * StorageProof proof. - * @member {Array.} proof - * @memberof pruntime_rpc.StorageProof + * AddEndpointRequest encodedEndpointType. + * @member {Uint8Array} encodedEndpointType + * @memberof pruntime_rpc.AddEndpointRequest + * @instance + */ + AddEndpointRequest.prototype.encodedEndpointType = $util.newBuffer([]); + + /** + * AddEndpointRequest endpoint. + * @member {string} endpoint + * @memberof pruntime_rpc.AddEndpointRequest * @instance */ - StorageProof.prototype.proof = $util.emptyArray; + AddEndpointRequest.prototype.endpoint = ""; /** - * Creates a new StorageProof instance using the specified properties. + * Creates a new AddEndpointRequest instance using the specified properties. * @function create - * @memberof pruntime_rpc.StorageProof + * @memberof pruntime_rpc.AddEndpointRequest * @static - * @param {pruntime_rpc.IStorageProof=} [properties] Properties to set - * @returns {pruntime_rpc.StorageProof} StorageProof instance + * @param {pruntime_rpc.IAddEndpointRequest=} [properties] Properties to set + * @returns {pruntime_rpc.AddEndpointRequest} AddEndpointRequest instance */ - StorageProof.create = function create(properties) { - return new StorageProof(properties); + AddEndpointRequest.create = function create(properties) { + return new AddEndpointRequest(properties); }; /** - * Encodes the specified StorageProof message. Does not implicitly {@link pruntime_rpc.StorageProof.verify|verify} messages. + * Encodes the specified AddEndpointRequest message. Does not implicitly {@link pruntime_rpc.AddEndpointRequest.verify|verify} messages. * @function encode - * @memberof pruntime_rpc.StorageProof + * @memberof pruntime_rpc.AddEndpointRequest * @static - * @param {pruntime_rpc.IStorageProof} message StorageProof message or plain object to encode + * @param {pruntime_rpc.IAddEndpointRequest} message AddEndpointRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StorageProof.encode = function encode(message, writer) { + AddEndpointRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.proof != null && message.proof.length) - for (var i = 0; i < message.proof.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.proof[i]); + if (message.encodedEndpointType != null && Object.hasOwnProperty.call(message, "encodedEndpointType")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.encodedEndpointType); + if (message.endpoint != null && Object.hasOwnProperty.call(message, "endpoint")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.endpoint); return writer; }; /** - * Encodes the specified StorageProof message, length delimited. Does not implicitly {@link pruntime_rpc.StorageProof.verify|verify} messages. + * Encodes the specified AddEndpointRequest message, length delimited. Does not implicitly {@link pruntime_rpc.AddEndpointRequest.verify|verify} messages. * @function encodeDelimited - * @memberof pruntime_rpc.StorageProof + * @memberof pruntime_rpc.AddEndpointRequest * @static - * @param {pruntime_rpc.IStorageProof} message StorageProof message or plain object to encode + * @param {pruntime_rpc.IAddEndpointRequest} message AddEndpointRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StorageProof.encodeDelimited = function encodeDelimited(message, writer) { + AddEndpointRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a StorageProof message from the specified reader or buffer. + * Decodes an AddEndpointRequest message from the specified reader or buffer. * @function decode - * @memberof pruntime_rpc.StorageProof + * @memberof pruntime_rpc.AddEndpointRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {pruntime_rpc.StorageProof} StorageProof + * @returns {pruntime_rpc.AddEndpointRequest} AddEndpointRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StorageProof.decode = function decode(reader, length) { + AddEndpointRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.StorageProof(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.AddEndpointRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.proof && message.proof.length)) - message.proof = []; - message.proof.push(reader.bytes()); + message.encodedEndpointType = reader.bytes(); + break; + } + case 2: { + message.endpoint = reader.string(); break; } default: @@ -15792,139 +5623,141 @@ $root.pruntime_rpc = (function() { }; /** - * Decodes a StorageProof message from the specified reader or buffer, length delimited. + * Decodes an AddEndpointRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof pruntime_rpc.StorageProof + * @memberof pruntime_rpc.AddEndpointRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.StorageProof} StorageProof + * @returns {pruntime_rpc.AddEndpointRequest} AddEndpointRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StorageProof.decodeDelimited = function decodeDelimited(reader) { + AddEndpointRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a StorageProof message. + * Verifies an AddEndpointRequest message. * @function verify - * @memberof pruntime_rpc.StorageProof + * @memberof pruntime_rpc.AddEndpointRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - StorageProof.verify = function verify(message) { + AddEndpointRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.proof != null && message.hasOwnProperty("proof")) { - if (!Array.isArray(message.proof)) - return "proof: array expected"; - for (var i = 0; i < message.proof.length; ++i) - if (!(message.proof[i] && typeof message.proof[i].length === "number" || $util.isString(message.proof[i]))) - return "proof: buffer[] expected"; - } + if (message.encodedEndpointType != null && message.hasOwnProperty("encodedEndpointType")) + if (!(message.encodedEndpointType && typeof message.encodedEndpointType.length === "number" || $util.isString(message.encodedEndpointType))) + return "encodedEndpointType: buffer expected"; + if (message.endpoint != null && message.hasOwnProperty("endpoint")) + if (!$util.isString(message.endpoint)) + return "endpoint: string expected"; return null; }; /** - * Creates a StorageProof message from a plain object. Also converts values to their respective internal types. + * Creates an AddEndpointRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof pruntime_rpc.StorageProof + * @memberof pruntime_rpc.AddEndpointRequest * @static * @param {Object.} object Plain object - * @returns {pruntime_rpc.StorageProof} StorageProof + * @returns {pruntime_rpc.AddEndpointRequest} AddEndpointRequest */ - StorageProof.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.StorageProof) + AddEndpointRequest.fromObject = function fromObject(object) { + if (object instanceof $root.pruntime_rpc.AddEndpointRequest) return object; - var message = new $root.pruntime_rpc.StorageProof(); - if (object.proof) { - if (!Array.isArray(object.proof)) - throw TypeError(".pruntime_rpc.StorageProof.proof: array expected"); - message.proof = []; - for (var i = 0; i < object.proof.length; ++i) - if (typeof object.proof[i] === "string") - $util.base64.decode(object.proof[i], message.proof[i] = $util.newBuffer($util.base64.length(object.proof[i])), 0); - else if (object.proof[i].length >= 0) - message.proof[i] = object.proof[i]; - } + var message = new $root.pruntime_rpc.AddEndpointRequest(); + if (object.encodedEndpointType != null) + if (typeof object.encodedEndpointType === "string") + $util.base64.decode(object.encodedEndpointType, message.encodedEndpointType = $util.newBuffer($util.base64.length(object.encodedEndpointType)), 0); + else if (object.encodedEndpointType.length >= 0) + message.encodedEndpointType = object.encodedEndpointType; + if (object.endpoint != null) + message.endpoint = String(object.endpoint); return message; }; /** - * Creates a plain object from a StorageProof message. Also converts values to other types if specified. + * Creates a plain object from an AddEndpointRequest message. Also converts values to other types if specified. * @function toObject - * @memberof pruntime_rpc.StorageProof + * @memberof pruntime_rpc.AddEndpointRequest * @static - * @param {pruntime_rpc.StorageProof} message StorageProof + * @param {pruntime_rpc.AddEndpointRequest} message AddEndpointRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StorageProof.toObject = function toObject(message, options) { + AddEndpointRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.proof = []; - if (message.proof && message.proof.length) { - object.proof = []; - for (var j = 0; j < message.proof.length; ++j) - object.proof[j] = options.bytes === String ? $util.base64.encode(message.proof[j], 0, message.proof[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.proof[j]) : message.proof[j]; + if (options.defaults) { + if (options.bytes === String) + object.encodedEndpointType = ""; + else { + object.encodedEndpointType = []; + if (options.bytes !== Array) + object.encodedEndpointType = $util.newBuffer(object.encodedEndpointType); + } + object.endpoint = ""; } + if (message.encodedEndpointType != null && message.hasOwnProperty("encodedEndpointType")) + object.encodedEndpointType = options.bytes === String ? $util.base64.encode(message.encodedEndpointType, 0, message.encodedEndpointType.length) : options.bytes === Array ? Array.prototype.slice.call(message.encodedEndpointType) : message.encodedEndpointType; + if (message.endpoint != null && message.hasOwnProperty("endpoint")) + object.endpoint = message.endpoint; return object; }; /** - * Converts this StorageProof to JSON. + * Converts this AddEndpointRequest to JSON. * @function toJSON - * @memberof pruntime_rpc.StorageProof + * @memberof pruntime_rpc.AddEndpointRequest * @instance * @returns {Object.} JSON object */ - StorageProof.prototype.toJSON = function toJSON() { + AddEndpointRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for StorageProof + * Gets the default type url for AddEndpointRequest * @function getTypeUrl - * @memberof pruntime_rpc.StorageProof + * @memberof pruntime_rpc.AddEndpointRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - StorageProof.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AddEndpointRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/pruntime_rpc.StorageProof"; + return typeUrlPrefix + "/pruntime_rpc.AddEndpointRequest"; }; - return StorageProof; + return AddEndpointRequest; })(); - pruntime_rpc.StatisticsReqeust = (function() { + pruntime_rpc.GetEndpointResponse = (function() { /** - * Properties of a StatisticsReqeust. + * Properties of a GetEndpointResponse. * @memberof pruntime_rpc - * @interface IStatisticsReqeust - * @property {Array.|null} [contracts] StatisticsReqeust contracts - * @property {boolean|null} [all] StatisticsReqeust all + * @interface IGetEndpointResponse + * @property {Uint8Array|null} [encodedEndpointPayload] GetEndpointResponse encodedEndpointPayload + * @property {Uint8Array|null} [signature] GetEndpointResponse signature */ /** - * Constructs a new StatisticsReqeust. + * Constructs a new GetEndpointResponse. * @memberof pruntime_rpc - * @classdesc Represents a StatisticsReqeust. - * @implements IStatisticsReqeust + * @classdesc Represents a GetEndpointResponse. + * @implements IGetEndpointResponse * @constructor - * @param {pruntime_rpc.IStatisticsReqeust=} [properties] Properties to set + * @param {pruntime_rpc.IGetEndpointResponse=} [properties] Properties to set */ - function StatisticsReqeust(properties) { - this.contracts = []; + function GetEndpointResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15932,92 +5765,114 @@ $root.pruntime_rpc = (function() { } /** - * StatisticsReqeust contracts. - * @member {Array.} contracts - * @memberof pruntime_rpc.StatisticsReqeust + * GetEndpointResponse encodedEndpointPayload. + * @member {Uint8Array|null|undefined} encodedEndpointPayload + * @memberof pruntime_rpc.GetEndpointResponse + * @instance + */ + GetEndpointResponse.prototype.encodedEndpointPayload = null; + + /** + * GetEndpointResponse signature. + * @member {Uint8Array|null|undefined} signature + * @memberof pruntime_rpc.GetEndpointResponse + * @instance + */ + GetEndpointResponse.prototype.signature = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetEndpointResponse _encodedEndpointPayload. + * @member {"encodedEndpointPayload"|undefined} _encodedEndpointPayload + * @memberof pruntime_rpc.GetEndpointResponse * @instance */ - StatisticsReqeust.prototype.contracts = $util.emptyArray; + Object.defineProperty(GetEndpointResponse.prototype, "_encodedEndpointPayload", { + get: $util.oneOfGetter($oneOfFields = ["encodedEndpointPayload"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * StatisticsReqeust all. - * @member {boolean} all - * @memberof pruntime_rpc.StatisticsReqeust + * GetEndpointResponse _signature. + * @member {"signature"|undefined} _signature + * @memberof pruntime_rpc.GetEndpointResponse * @instance */ - StatisticsReqeust.prototype.all = false; + Object.defineProperty(GetEndpointResponse.prototype, "_signature", { + get: $util.oneOfGetter($oneOfFields = ["signature"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new StatisticsReqeust instance using the specified properties. + * Creates a new GetEndpointResponse instance using the specified properties. * @function create - * @memberof pruntime_rpc.StatisticsReqeust + * @memberof pruntime_rpc.GetEndpointResponse * @static - * @param {pruntime_rpc.IStatisticsReqeust=} [properties] Properties to set - * @returns {pruntime_rpc.StatisticsReqeust} StatisticsReqeust instance + * @param {pruntime_rpc.IGetEndpointResponse=} [properties] Properties to set + * @returns {pruntime_rpc.GetEndpointResponse} GetEndpointResponse instance */ - StatisticsReqeust.create = function create(properties) { - return new StatisticsReqeust(properties); + GetEndpointResponse.create = function create(properties) { + return new GetEndpointResponse(properties); }; /** - * Encodes the specified StatisticsReqeust message. Does not implicitly {@link pruntime_rpc.StatisticsReqeust.verify|verify} messages. + * Encodes the specified GetEndpointResponse message. Does not implicitly {@link pruntime_rpc.GetEndpointResponse.verify|verify} messages. * @function encode - * @memberof pruntime_rpc.StatisticsReqeust + * @memberof pruntime_rpc.GetEndpointResponse * @static - * @param {pruntime_rpc.IStatisticsReqeust} message StatisticsReqeust message or plain object to encode + * @param {pruntime_rpc.IGetEndpointResponse} message GetEndpointResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StatisticsReqeust.encode = function encode(message, writer) { + GetEndpointResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.contracts != null && message.contracts.length) - for (var i = 0; i < message.contracts.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.contracts[i]); - if (message.all != null && Object.hasOwnProperty.call(message, "all")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.all); + if (message.encodedEndpointPayload != null && Object.hasOwnProperty.call(message, "encodedEndpointPayload")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.encodedEndpointPayload); + if (message.signature != null && Object.hasOwnProperty.call(message, "signature")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.signature); return writer; }; /** - * Encodes the specified StatisticsReqeust message, length delimited. Does not implicitly {@link pruntime_rpc.StatisticsReqeust.verify|verify} messages. + * Encodes the specified GetEndpointResponse message, length delimited. Does not implicitly {@link pruntime_rpc.GetEndpointResponse.verify|verify} messages. * @function encodeDelimited - * @memberof pruntime_rpc.StatisticsReqeust + * @memberof pruntime_rpc.GetEndpointResponse * @static - * @param {pruntime_rpc.IStatisticsReqeust} message StatisticsReqeust message or plain object to encode + * @param {pruntime_rpc.IGetEndpointResponse} message GetEndpointResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StatisticsReqeust.encodeDelimited = function encodeDelimited(message, writer) { + GetEndpointResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a StatisticsReqeust message from the specified reader or buffer. + * Decodes a GetEndpointResponse message from the specified reader or buffer. * @function decode - * @memberof pruntime_rpc.StatisticsReqeust + * @memberof pruntime_rpc.GetEndpointResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {pruntime_rpc.StatisticsReqeust} StatisticsReqeust + * @returns {pruntime_rpc.GetEndpointResponse} GetEndpointResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StatisticsReqeust.decode = function decode(reader, length) { + GetEndpointResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.StatisticsReqeust(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.GetEndpointResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.contracts && message.contracts.length)) - message.contracts = []; - message.contracts.push(reader.string()); + message.encodedEndpointPayload = reader.bytes(); break; } case 2: { - message.all = reader.bool(); + message.signature = reader.bytes(); break; } default: @@ -16029,146 +5884,145 @@ $root.pruntime_rpc = (function() { }; /** - * Decodes a StatisticsReqeust message from the specified reader or buffer, length delimited. + * Decodes a GetEndpointResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof pruntime_rpc.StatisticsReqeust + * @memberof pruntime_rpc.GetEndpointResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.StatisticsReqeust} StatisticsReqeust + * @returns {pruntime_rpc.GetEndpointResponse} GetEndpointResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StatisticsReqeust.decodeDelimited = function decodeDelimited(reader) { + GetEndpointResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a StatisticsReqeust message. + * Verifies a GetEndpointResponse message. * @function verify - * @memberof pruntime_rpc.StatisticsReqeust + * @memberof pruntime_rpc.GetEndpointResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - StatisticsReqeust.verify = function verify(message) { + GetEndpointResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.contracts != null && message.hasOwnProperty("contracts")) { - if (!Array.isArray(message.contracts)) - return "contracts: array expected"; - for (var i = 0; i < message.contracts.length; ++i) - if (!$util.isString(message.contracts[i])) - return "contracts: string[] expected"; + var properties = {}; + if (message.encodedEndpointPayload != null && message.hasOwnProperty("encodedEndpointPayload")) { + properties._encodedEndpointPayload = 1; + if (!(message.encodedEndpointPayload && typeof message.encodedEndpointPayload.length === "number" || $util.isString(message.encodedEndpointPayload))) + return "encodedEndpointPayload: buffer expected"; + } + if (message.signature != null && message.hasOwnProperty("signature")) { + properties._signature = 1; + if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature))) + return "signature: buffer expected"; } - if (message.all != null && message.hasOwnProperty("all")) - if (typeof message.all !== "boolean") - return "all: boolean expected"; return null; }; /** - * Creates a StatisticsReqeust message from a plain object. Also converts values to their respective internal types. + * Creates a GetEndpointResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof pruntime_rpc.StatisticsReqeust + * @memberof pruntime_rpc.GetEndpointResponse * @static * @param {Object.} object Plain object - * @returns {pruntime_rpc.StatisticsReqeust} StatisticsReqeust + * @returns {pruntime_rpc.GetEndpointResponse} GetEndpointResponse */ - StatisticsReqeust.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.StatisticsReqeust) + GetEndpointResponse.fromObject = function fromObject(object) { + if (object instanceof $root.pruntime_rpc.GetEndpointResponse) return object; - var message = new $root.pruntime_rpc.StatisticsReqeust(); - if (object.contracts) { - if (!Array.isArray(object.contracts)) - throw TypeError(".pruntime_rpc.StatisticsReqeust.contracts: array expected"); - message.contracts = []; - for (var i = 0; i < object.contracts.length; ++i) - message.contracts[i] = String(object.contracts[i]); - } - if (object.all != null) - message.all = Boolean(object.all); + var message = new $root.pruntime_rpc.GetEndpointResponse(); + if (object.encodedEndpointPayload != null) + if (typeof object.encodedEndpointPayload === "string") + $util.base64.decode(object.encodedEndpointPayload, message.encodedEndpointPayload = $util.newBuffer($util.base64.length(object.encodedEndpointPayload)), 0); + else if (object.encodedEndpointPayload.length >= 0) + message.encodedEndpointPayload = object.encodedEndpointPayload; + if (object.signature != null) + if (typeof object.signature === "string") + $util.base64.decode(object.signature, message.signature = $util.newBuffer($util.base64.length(object.signature)), 0); + else if (object.signature.length >= 0) + message.signature = object.signature; return message; }; /** - * Creates a plain object from a StatisticsReqeust message. Also converts values to other types if specified. + * Creates a plain object from a GetEndpointResponse message. Also converts values to other types if specified. * @function toObject - * @memberof pruntime_rpc.StatisticsReqeust + * @memberof pruntime_rpc.GetEndpointResponse * @static - * @param {pruntime_rpc.StatisticsReqeust} message StatisticsReqeust + * @param {pruntime_rpc.GetEndpointResponse} message GetEndpointResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StatisticsReqeust.toObject = function toObject(message, options) { + GetEndpointResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.contracts = []; - if (options.defaults) - object.all = false; - if (message.contracts && message.contracts.length) { - object.contracts = []; - for (var j = 0; j < message.contracts.length; ++j) - object.contracts[j] = message.contracts[j]; + if (message.encodedEndpointPayload != null && message.hasOwnProperty("encodedEndpointPayload")) { + object.encodedEndpointPayload = options.bytes === String ? $util.base64.encode(message.encodedEndpointPayload, 0, message.encodedEndpointPayload.length) : options.bytes === Array ? Array.prototype.slice.call(message.encodedEndpointPayload) : message.encodedEndpointPayload; + if (options.oneofs) + object._encodedEndpointPayload = "encodedEndpointPayload"; + } + if (message.signature != null && message.hasOwnProperty("signature")) { + object.signature = options.bytes === String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature) : message.signature; + if (options.oneofs) + object._signature = "signature"; } - if (message.all != null && message.hasOwnProperty("all")) - object.all = message.all; return object; }; /** - * Converts this StatisticsReqeust to JSON. + * Converts this GetEndpointResponse to JSON. * @function toJSON - * @memberof pruntime_rpc.StatisticsReqeust + * @memberof pruntime_rpc.GetEndpointResponse * @instance * @returns {Object.} JSON object */ - StatisticsReqeust.prototype.toJSON = function toJSON() { + GetEndpointResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for StatisticsReqeust + * Gets the default type url for GetEndpointResponse * @function getTypeUrl - * @memberof pruntime_rpc.StatisticsReqeust + * @memberof pruntime_rpc.GetEndpointResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - StatisticsReqeust.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetEndpointResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/pruntime_rpc.StatisticsReqeust"; + return typeUrlPrefix + "/pruntime_rpc.GetEndpointResponse"; }; - return StatisticsReqeust; + return GetEndpointResponse; })(); - pruntime_rpc.StatisticsResponse = (function() { + pruntime_rpc.GetContractInfoRequest = (function() { /** - * Properties of a StatisticsResponse. + * Properties of a GetContractInfoRequest. * @memberof pruntime_rpc - * @interface IStatisticsResponse - * @property {number|Long|null} [uptime] StatisticsResponse uptime - * @property {number|null} [cores] StatisticsResponse cores - * @property {pruntime_rpc.IQueryStats|null} [query] StatisticsResponse query - * @property {pruntime_rpc.IHttpEgressStats|null} [httpEgress] StatisticsResponse httpEgress + * @interface IGetContractInfoRequest + * @property {Array.|null} [contracts] GetContractInfoRequest contracts */ /** - * Constructs a new StatisticsResponse. + * Constructs a new GetContractInfoRequest. * @memberof pruntime_rpc - * @classdesc Represents a StatisticsResponse. - * @implements IStatisticsResponse + * @classdesc Represents a GetContractInfoRequest. + * @implements IGetContractInfoRequest * @constructor - * @param {pruntime_rpc.IStatisticsResponse=} [properties] Properties to set + * @param {pruntime_rpc.IGetContractInfoRequest=} [properties] Properties to set */ - function StatisticsResponse(properties) { + function GetContractInfoRequest(properties) { + this.contracts = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16176,117 +6030,78 @@ $root.pruntime_rpc = (function() { } /** - * StatisticsResponse uptime. - * @member {number|Long} uptime - * @memberof pruntime_rpc.StatisticsResponse - * @instance - */ - StatisticsResponse.prototype.uptime = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * StatisticsResponse cores. - * @member {number} cores - * @memberof pruntime_rpc.StatisticsResponse - * @instance - */ - StatisticsResponse.prototype.cores = 0; - - /** - * StatisticsResponse query. - * @member {pruntime_rpc.IQueryStats|null|undefined} query - * @memberof pruntime_rpc.StatisticsResponse - * @instance - */ - StatisticsResponse.prototype.query = null; - - /** - * StatisticsResponse httpEgress. - * @member {pruntime_rpc.IHttpEgressStats|null|undefined} httpEgress - * @memberof pruntime_rpc.StatisticsResponse + * GetContractInfoRequest contracts. + * @member {Array.} contracts + * @memberof pruntime_rpc.GetContractInfoRequest * @instance */ - StatisticsResponse.prototype.httpEgress = null; + GetContractInfoRequest.prototype.contracts = $util.emptyArray; /** - * Creates a new StatisticsResponse instance using the specified properties. + * Creates a new GetContractInfoRequest instance using the specified properties. * @function create - * @memberof pruntime_rpc.StatisticsResponse + * @memberof pruntime_rpc.GetContractInfoRequest * @static - * @param {pruntime_rpc.IStatisticsResponse=} [properties] Properties to set - * @returns {pruntime_rpc.StatisticsResponse} StatisticsResponse instance + * @param {pruntime_rpc.IGetContractInfoRequest=} [properties] Properties to set + * @returns {pruntime_rpc.GetContractInfoRequest} GetContractInfoRequest instance */ - StatisticsResponse.create = function create(properties) { - return new StatisticsResponse(properties); + GetContractInfoRequest.create = function create(properties) { + return new GetContractInfoRequest(properties); }; /** - * Encodes the specified StatisticsResponse message. Does not implicitly {@link pruntime_rpc.StatisticsResponse.verify|verify} messages. + * Encodes the specified GetContractInfoRequest message. Does not implicitly {@link pruntime_rpc.GetContractInfoRequest.verify|verify} messages. * @function encode - * @memberof pruntime_rpc.StatisticsResponse + * @memberof pruntime_rpc.GetContractInfoRequest * @static - * @param {pruntime_rpc.IStatisticsResponse} message StatisticsResponse message or plain object to encode + * @param {pruntime_rpc.IGetContractInfoRequest} message GetContractInfoRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StatisticsResponse.encode = function encode(message, writer) { + GetContractInfoRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.uptime != null && Object.hasOwnProperty.call(message, "uptime")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.uptime); - if (message.cores != null && Object.hasOwnProperty.call(message, "cores")) - writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.cores); - if (message.query != null && Object.hasOwnProperty.call(message, "query")) - $root.pruntime_rpc.QueryStats.encode(message.query, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.httpEgress != null && Object.hasOwnProperty.call(message, "httpEgress")) - $root.pruntime_rpc.HttpEgressStats.encode(message.httpEgress, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.contracts != null && message.contracts.length) + for (var i = 0; i < message.contracts.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.contracts[i]); return writer; }; /** - * Encodes the specified StatisticsResponse message, length delimited. Does not implicitly {@link pruntime_rpc.StatisticsResponse.verify|verify} messages. + * Encodes the specified GetContractInfoRequest message, length delimited. Does not implicitly {@link pruntime_rpc.GetContractInfoRequest.verify|verify} messages. * @function encodeDelimited - * @memberof pruntime_rpc.StatisticsResponse + * @memberof pruntime_rpc.GetContractInfoRequest * @static - * @param {pruntime_rpc.IStatisticsResponse} message StatisticsResponse message or plain object to encode + * @param {pruntime_rpc.IGetContractInfoRequest} message GetContractInfoRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StatisticsResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetContractInfoRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a StatisticsResponse message from the specified reader or buffer. + * Decodes a GetContractInfoRequest message from the specified reader or buffer. * @function decode - * @memberof pruntime_rpc.StatisticsResponse + * @memberof pruntime_rpc.GetContractInfoRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {pruntime_rpc.StatisticsResponse} StatisticsResponse + * @returns {pruntime_rpc.GetContractInfoRequest} GetContractInfoRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StatisticsResponse.decode = function decode(reader, length) { + GetContractInfoRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.StatisticsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.GetContractInfoRequest(); while (reader.pos < end) { var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.uptime = reader.uint64(); - break; - } - case 2: { - message.cores = reader.uint32(); - break; - } - case 3: { - message.query = $root.pruntime_rpc.QueryStats.decode(reader, reader.uint32()); - break; - } - case 4: { - message.httpEgress = $root.pruntime_rpc.HttpEgressStats.decode(reader, reader.uint32()); + switch (tag >>> 3) { + case 1: { + if (!(message.contracts && message.contracts.length)) + message.contracts = []; + message.contracts.push(reader.string()); break; } default: @@ -16298,173 +6113,135 @@ $root.pruntime_rpc = (function() { }; /** - * Decodes a StatisticsResponse message from the specified reader or buffer, length delimited. + * Decodes a GetContractInfoRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof pruntime_rpc.StatisticsResponse + * @memberof pruntime_rpc.GetContractInfoRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.StatisticsResponse} StatisticsResponse + * @returns {pruntime_rpc.GetContractInfoRequest} GetContractInfoRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - StatisticsResponse.decodeDelimited = function decodeDelimited(reader) { + GetContractInfoRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a StatisticsResponse message. + * Verifies a GetContractInfoRequest message. * @function verify - * @memberof pruntime_rpc.StatisticsResponse + * @memberof pruntime_rpc.GetContractInfoRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - StatisticsResponse.verify = function verify(message) { + GetContractInfoRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.uptime != null && message.hasOwnProperty("uptime")) - if (!$util.isInteger(message.uptime) && !(message.uptime && $util.isInteger(message.uptime.low) && $util.isInteger(message.uptime.high))) - return "uptime: integer|Long expected"; - if (message.cores != null && message.hasOwnProperty("cores")) - if (!$util.isInteger(message.cores)) - return "cores: integer expected"; - if (message.query != null && message.hasOwnProperty("query")) { - var error = $root.pruntime_rpc.QueryStats.verify(message.query); - if (error) - return "query." + error; - } - if (message.httpEgress != null && message.hasOwnProperty("httpEgress")) { - var error = $root.pruntime_rpc.HttpEgressStats.verify(message.httpEgress); - if (error) - return "httpEgress." + error; + if (message.contracts != null && message.hasOwnProperty("contracts")) { + if (!Array.isArray(message.contracts)) + return "contracts: array expected"; + for (var i = 0; i < message.contracts.length; ++i) + if (!$util.isString(message.contracts[i])) + return "contracts: string[] expected"; } return null; }; /** - * Creates a StatisticsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetContractInfoRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof pruntime_rpc.StatisticsResponse + * @memberof pruntime_rpc.GetContractInfoRequest * @static * @param {Object.} object Plain object - * @returns {pruntime_rpc.StatisticsResponse} StatisticsResponse + * @returns {pruntime_rpc.GetContractInfoRequest} GetContractInfoRequest */ - StatisticsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.StatisticsResponse) + GetContractInfoRequest.fromObject = function fromObject(object) { + if (object instanceof $root.pruntime_rpc.GetContractInfoRequest) return object; - var message = new $root.pruntime_rpc.StatisticsResponse(); - if (object.uptime != null) - if ($util.Long) - (message.uptime = $util.Long.fromValue(object.uptime)).unsigned = true; - else if (typeof object.uptime === "string") - message.uptime = parseInt(object.uptime, 10); - else if (typeof object.uptime === "number") - message.uptime = object.uptime; - else if (typeof object.uptime === "object") - message.uptime = new $util.LongBits(object.uptime.low >>> 0, object.uptime.high >>> 0).toNumber(true); - if (object.cores != null) - message.cores = object.cores >>> 0; - if (object.query != null) { - if (typeof object.query !== "object") - throw TypeError(".pruntime_rpc.StatisticsResponse.query: object expected"); - message.query = $root.pruntime_rpc.QueryStats.fromObject(object.query); - } - if (object.httpEgress != null) { - if (typeof object.httpEgress !== "object") - throw TypeError(".pruntime_rpc.StatisticsResponse.httpEgress: object expected"); - message.httpEgress = $root.pruntime_rpc.HttpEgressStats.fromObject(object.httpEgress); + var message = new $root.pruntime_rpc.GetContractInfoRequest(); + if (object.contracts) { + if (!Array.isArray(object.contracts)) + throw TypeError(".pruntime_rpc.GetContractInfoRequest.contracts: array expected"); + message.contracts = []; + for (var i = 0; i < object.contracts.length; ++i) + message.contracts[i] = String(object.contracts[i]); } return message; }; /** - * Creates a plain object from a StatisticsResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetContractInfoRequest message. Also converts values to other types if specified. * @function toObject - * @memberof pruntime_rpc.StatisticsResponse + * @memberof pruntime_rpc.GetContractInfoRequest * @static - * @param {pruntime_rpc.StatisticsResponse} message StatisticsResponse + * @param {pruntime_rpc.GetContractInfoRequest} message GetContractInfoRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StatisticsResponse.toObject = function toObject(message, options) { + GetContractInfoRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.uptime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.uptime = options.longs === String ? "0" : 0; - object.cores = 0; - object.query = null; - object.httpEgress = null; + if (options.arrays || options.defaults) + object.contracts = []; + if (message.contracts && message.contracts.length) { + object.contracts = []; + for (var j = 0; j < message.contracts.length; ++j) + object.contracts[j] = message.contracts[j]; } - if (message.uptime != null && message.hasOwnProperty("uptime")) - if (typeof message.uptime === "number") - object.uptime = options.longs === String ? String(message.uptime) : message.uptime; - else - object.uptime = options.longs === String ? $util.Long.prototype.toString.call(message.uptime) : options.longs === Number ? new $util.LongBits(message.uptime.low >>> 0, message.uptime.high >>> 0).toNumber(true) : message.uptime; - if (message.cores != null && message.hasOwnProperty("cores")) - object.cores = message.cores; - if (message.query != null && message.hasOwnProperty("query")) - object.query = $root.pruntime_rpc.QueryStats.toObject(message.query, options); - if (message.httpEgress != null && message.hasOwnProperty("httpEgress")) - object.httpEgress = $root.pruntime_rpc.HttpEgressStats.toObject(message.httpEgress, options); return object; }; /** - * Converts this StatisticsResponse to JSON. + * Converts this GetContractInfoRequest to JSON. * @function toJSON - * @memberof pruntime_rpc.StatisticsResponse + * @memberof pruntime_rpc.GetContractInfoRequest * @instance * @returns {Object.} JSON object */ - StatisticsResponse.prototype.toJSON = function toJSON() { + GetContractInfoRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for StatisticsResponse + * Gets the default type url for GetContractInfoRequest * @function getTypeUrl - * @memberof pruntime_rpc.StatisticsResponse + * @memberof pruntime_rpc.GetContractInfoRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - StatisticsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetContractInfoRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/pruntime_rpc.StatisticsResponse"; + return typeUrlPrefix + "/pruntime_rpc.GetContractInfoRequest"; }; - return StatisticsResponse; + return GetContractInfoRequest; })(); - pruntime_rpc.QueryStats = (function() { + pruntime_rpc.GetContractInfoResponse = (function() { /** - * Properties of a QueryStats. + * Properties of a GetContractInfoResponse. * @memberof pruntime_rpc - * @interface IQueryStats - * @property {pruntime_rpc.IQueryCounters|null} [global] QueryStats global - * @property {Object.|null} [byContract] QueryStats byContract + * @interface IGetContractInfoResponse + * @property {Array.|null} [contracts] GetContractInfoResponse contracts */ /** - * Constructs a new QueryStats. + * Constructs a new GetContractInfoResponse. * @memberof pruntime_rpc - * @classdesc Represents a QueryStats. - * @implements IQueryStats + * @classdesc Represents a GetContractInfoResponse. + * @implements IGetContractInfoResponse * @constructor - * @param {pruntime_rpc.IQueryStats=} [properties] Properties to set + * @param {pruntime_rpc.IGetContractInfoResponse=} [properties] Properties to set */ - function QueryStats(properties) { - this.byContract = {}; + function GetContractInfoResponse(properties) { + this.contracts = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16472,111 +6249,78 @@ $root.pruntime_rpc = (function() { } /** - * QueryStats global. - * @member {pruntime_rpc.IQueryCounters|null|undefined} global - * @memberof pruntime_rpc.QueryStats - * @instance - */ - QueryStats.prototype.global = null; - - /** - * QueryStats byContract. - * @member {Object.} byContract - * @memberof pruntime_rpc.QueryStats + * GetContractInfoResponse contracts. + * @member {Array.} contracts + * @memberof pruntime_rpc.GetContractInfoResponse * @instance */ - QueryStats.prototype.byContract = $util.emptyObject; + GetContractInfoResponse.prototype.contracts = $util.emptyArray; /** - * Creates a new QueryStats instance using the specified properties. + * Creates a new GetContractInfoResponse instance using the specified properties. * @function create - * @memberof pruntime_rpc.QueryStats + * @memberof pruntime_rpc.GetContractInfoResponse * @static - * @param {pruntime_rpc.IQueryStats=} [properties] Properties to set - * @returns {pruntime_rpc.QueryStats} QueryStats instance + * @param {pruntime_rpc.IGetContractInfoResponse=} [properties] Properties to set + * @returns {pruntime_rpc.GetContractInfoResponse} GetContractInfoResponse instance */ - QueryStats.create = function create(properties) { - return new QueryStats(properties); + GetContractInfoResponse.create = function create(properties) { + return new GetContractInfoResponse(properties); }; /** - * Encodes the specified QueryStats message. Does not implicitly {@link pruntime_rpc.QueryStats.verify|verify} messages. + * Encodes the specified GetContractInfoResponse message. Does not implicitly {@link pruntime_rpc.GetContractInfoResponse.verify|verify} messages. * @function encode - * @memberof pruntime_rpc.QueryStats + * @memberof pruntime_rpc.GetContractInfoResponse * @static - * @param {pruntime_rpc.IQueryStats} message QueryStats message or plain object to encode + * @param {pruntime_rpc.IGetContractInfoResponse} message GetContractInfoResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QueryStats.encode = function encode(message, writer) { + GetContractInfoResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.global != null && Object.hasOwnProperty.call(message, "global")) - $root.pruntime_rpc.QueryCounters.encode(message.global, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.byContract != null && Object.hasOwnProperty.call(message, "byContract")) - for (var keys = Object.keys(message.byContract), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.pruntime_rpc.QueryCounters.encode(message.byContract[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } + if (message.contracts != null && message.contracts.length) + for (var i = 0; i < message.contracts.length; ++i) + $root.pruntime_rpc.ContractInfo.encode(message.contracts[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified QueryStats message, length delimited. Does not implicitly {@link pruntime_rpc.QueryStats.verify|verify} messages. + * Encodes the specified GetContractInfoResponse message, length delimited. Does not implicitly {@link pruntime_rpc.GetContractInfoResponse.verify|verify} messages. * @function encodeDelimited - * @memberof pruntime_rpc.QueryStats + * @memberof pruntime_rpc.GetContractInfoResponse * @static - * @param {pruntime_rpc.IQueryStats} message QueryStats message or plain object to encode + * @param {pruntime_rpc.IGetContractInfoResponse} message GetContractInfoResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QueryStats.encodeDelimited = function encodeDelimited(message, writer) { + GetContractInfoResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a QueryStats message from the specified reader or buffer. + * Decodes a GetContractInfoResponse message from the specified reader or buffer. * @function decode - * @memberof pruntime_rpc.QueryStats + * @memberof pruntime_rpc.GetContractInfoResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {pruntime_rpc.QueryStats} QueryStats + * @returns {pruntime_rpc.GetContractInfoResponse} GetContractInfoResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QueryStats.decode = function decode(reader, length) { + GetContractInfoResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.QueryStats(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.GetContractInfoResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.global = $root.pruntime_rpc.QueryCounters.decode(reader, reader.uint32()); - break; - } - case 2: { - if (message.byContract === $util.emptyObject) - message.byContract = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.pruntime_rpc.QueryCounters.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.byContract[key] = value; + if (!(message.contracts && message.contracts.length)) + message.contracts = []; + message.contracts.push($root.pruntime_rpc.ContractInfo.decode(reader, reader.uint32())); break; } default: @@ -16588,157 +6332,142 @@ $root.pruntime_rpc = (function() { }; /** - * Decodes a QueryStats message from the specified reader or buffer, length delimited. + * Decodes a GetContractInfoResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof pruntime_rpc.QueryStats + * @memberof pruntime_rpc.GetContractInfoResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.QueryStats} QueryStats + * @returns {pruntime_rpc.GetContractInfoResponse} GetContractInfoResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QueryStats.decodeDelimited = function decodeDelimited(reader) { + GetContractInfoResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a QueryStats message. + * Verifies a GetContractInfoResponse message. * @function verify - * @memberof pruntime_rpc.QueryStats + * @memberof pruntime_rpc.GetContractInfoResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - QueryStats.verify = function verify(message) { + GetContractInfoResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.global != null && message.hasOwnProperty("global")) { - var error = $root.pruntime_rpc.QueryCounters.verify(message.global); - if (error) - return "global." + error; - } - if (message.byContract != null && message.hasOwnProperty("byContract")) { - if (!$util.isObject(message.byContract)) - return "byContract: object expected"; - var key = Object.keys(message.byContract); - for (var i = 0; i < key.length; ++i) { - var error = $root.pruntime_rpc.QueryCounters.verify(message.byContract[key[i]]); + if (message.contracts != null && message.hasOwnProperty("contracts")) { + if (!Array.isArray(message.contracts)) + return "contracts: array expected"; + for (var i = 0; i < message.contracts.length; ++i) { + var error = $root.pruntime_rpc.ContractInfo.verify(message.contracts[i]); if (error) - return "byContract." + error; + return "contracts." + error; } } return null; }; /** - * Creates a QueryStats message from a plain object. Also converts values to their respective internal types. + * Creates a GetContractInfoResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof pruntime_rpc.QueryStats + * @memberof pruntime_rpc.GetContractInfoResponse * @static * @param {Object.} object Plain object - * @returns {pruntime_rpc.QueryStats} QueryStats + * @returns {pruntime_rpc.GetContractInfoResponse} GetContractInfoResponse */ - QueryStats.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.QueryStats) + GetContractInfoResponse.fromObject = function fromObject(object) { + if (object instanceof $root.pruntime_rpc.GetContractInfoResponse) return object; - var message = new $root.pruntime_rpc.QueryStats(); - if (object.global != null) { - if (typeof object.global !== "object") - throw TypeError(".pruntime_rpc.QueryStats.global: object expected"); - message.global = $root.pruntime_rpc.QueryCounters.fromObject(object.global); - } - if (object.byContract) { - if (typeof object.byContract !== "object") - throw TypeError(".pruntime_rpc.QueryStats.byContract: object expected"); - message.byContract = {}; - for (var keys = Object.keys(object.byContract), i = 0; i < keys.length; ++i) { - if (typeof object.byContract[keys[i]] !== "object") - throw TypeError(".pruntime_rpc.QueryStats.byContract: object expected"); - message.byContract[keys[i]] = $root.pruntime_rpc.QueryCounters.fromObject(object.byContract[keys[i]]); + var message = new $root.pruntime_rpc.GetContractInfoResponse(); + if (object.contracts) { + if (!Array.isArray(object.contracts)) + throw TypeError(".pruntime_rpc.GetContractInfoResponse.contracts: array expected"); + message.contracts = []; + for (var i = 0; i < object.contracts.length; ++i) { + if (typeof object.contracts[i] !== "object") + throw TypeError(".pruntime_rpc.GetContractInfoResponse.contracts: object expected"); + message.contracts[i] = $root.pruntime_rpc.ContractInfo.fromObject(object.contracts[i]); } } return message; }; /** - * Creates a plain object from a QueryStats message. Also converts values to other types if specified. + * Creates a plain object from a GetContractInfoResponse message. Also converts values to other types if specified. * @function toObject - * @memberof pruntime_rpc.QueryStats + * @memberof pruntime_rpc.GetContractInfoResponse * @static - * @param {pruntime_rpc.QueryStats} message QueryStats + * @param {pruntime_rpc.GetContractInfoResponse} message GetContractInfoResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - QueryStats.toObject = function toObject(message, options) { + GetContractInfoResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.byContract = {}; - if (options.defaults) - object.global = null; - if (message.global != null && message.hasOwnProperty("global")) - object.global = $root.pruntime_rpc.QueryCounters.toObject(message.global, options); - var keys2; - if (message.byContract && (keys2 = Object.keys(message.byContract)).length) { - object.byContract = {}; - for (var j = 0; j < keys2.length; ++j) - object.byContract[keys2[j]] = $root.pruntime_rpc.QueryCounters.toObject(message.byContract[keys2[j]], options); + if (options.arrays || options.defaults) + object.contracts = []; + if (message.contracts && message.contracts.length) { + object.contracts = []; + for (var j = 0; j < message.contracts.length; ++j) + object.contracts[j] = $root.pruntime_rpc.ContractInfo.toObject(message.contracts[j], options); } return object; }; /** - * Converts this QueryStats to JSON. + * Converts this GetContractInfoResponse to JSON. * @function toJSON - * @memberof pruntime_rpc.QueryStats + * @memberof pruntime_rpc.GetContractInfoResponse * @instance * @returns {Object.} JSON object */ - QueryStats.prototype.toJSON = function toJSON() { + GetContractInfoResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for QueryStats + * Gets the default type url for GetContractInfoResponse * @function getTypeUrl - * @memberof pruntime_rpc.QueryStats + * @memberof pruntime_rpc.GetContractInfoResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - QueryStats.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetContractInfoResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/pruntime_rpc.QueryStats"; + return typeUrlPrefix + "/pruntime_rpc.GetContractInfoResponse"; }; - return QueryStats; + return GetContractInfoResponse; })(); - pruntime_rpc.QueryCounters = (function() { + pruntime_rpc.ContractInfo = (function() { /** - * Properties of a QueryCounters. + * Properties of a ContractInfo. * @memberof pruntime_rpc - * @interface IQueryCounters - * @property {number|Long|null} [total] QueryCounters total - * @property {number|Long|null} [dropped] QueryCounters dropped - * @property {number|Long|null} [time] QueryCounters time + * @interface IContractInfo + * @property {string|null} [id] ContractInfo id + * @property {string|null} [codeHash] ContractInfo codeHash + * @property {number|null} [weight] ContractInfo weight + * @property {pruntime_rpc.ISidevmInfo|null} [sidevm] ContractInfo sidevm */ /** - * Constructs a new QueryCounters. + * Constructs a new ContractInfo. * @memberof pruntime_rpc - * @classdesc Represents a QueryCounters. - * @implements IQueryCounters + * @classdesc Represents a ContractInfo. + * @implements IContractInfo * @constructor - * @param {pruntime_rpc.IQueryCounters=} [properties] Properties to set + * @param {pruntime_rpc.IContractInfo=} [properties] Properties to set */ - function QueryCounters(properties) { + function ContractInfo(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16746,103 +6475,117 @@ $root.pruntime_rpc = (function() { } /** - * QueryCounters total. - * @member {number|Long} total - * @memberof pruntime_rpc.QueryCounters + * ContractInfo id. + * @member {string} id + * @memberof pruntime_rpc.ContractInfo + * @instance + */ + ContractInfo.prototype.id = ""; + + /** + * ContractInfo codeHash. + * @member {string} codeHash + * @memberof pruntime_rpc.ContractInfo * @instance */ - QueryCounters.prototype.total = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + ContractInfo.prototype.codeHash = ""; /** - * QueryCounters dropped. - * @member {number|Long} dropped - * @memberof pruntime_rpc.QueryCounters + * ContractInfo weight. + * @member {number} weight + * @memberof pruntime_rpc.ContractInfo * @instance */ - QueryCounters.prototype.dropped = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + ContractInfo.prototype.weight = 0; /** - * QueryCounters time. - * @member {number|Long} time - * @memberof pruntime_rpc.QueryCounters + * ContractInfo sidevm. + * @member {pruntime_rpc.ISidevmInfo|null|undefined} sidevm + * @memberof pruntime_rpc.ContractInfo * @instance */ - QueryCounters.prototype.time = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + ContractInfo.prototype.sidevm = null; /** - * Creates a new QueryCounters instance using the specified properties. + * Creates a new ContractInfo instance using the specified properties. * @function create - * @memberof pruntime_rpc.QueryCounters + * @memberof pruntime_rpc.ContractInfo * @static - * @param {pruntime_rpc.IQueryCounters=} [properties] Properties to set - * @returns {pruntime_rpc.QueryCounters} QueryCounters instance + * @param {pruntime_rpc.IContractInfo=} [properties] Properties to set + * @returns {pruntime_rpc.ContractInfo} ContractInfo instance */ - QueryCounters.create = function create(properties) { - return new QueryCounters(properties); + ContractInfo.create = function create(properties) { + return new ContractInfo(properties); }; /** - * Encodes the specified QueryCounters message. Does not implicitly {@link pruntime_rpc.QueryCounters.verify|verify} messages. + * Encodes the specified ContractInfo message. Does not implicitly {@link pruntime_rpc.ContractInfo.verify|verify} messages. * @function encode - * @memberof pruntime_rpc.QueryCounters + * @memberof pruntime_rpc.ContractInfo * @static - * @param {pruntime_rpc.IQueryCounters} message QueryCounters message or plain object to encode + * @param {pruntime_rpc.IContractInfo} message ContractInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QueryCounters.encode = function encode(message, writer) { + ContractInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.total != null && Object.hasOwnProperty.call(message, "total")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.total); - if (message.dropped != null && Object.hasOwnProperty.call(message, "dropped")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.dropped); - if (message.time != null && Object.hasOwnProperty.call(message, "time")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.time); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.codeHash != null && Object.hasOwnProperty.call(message, "codeHash")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.codeHash); + if (message.weight != null && Object.hasOwnProperty.call(message, "weight")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.weight); + if (message.sidevm != null && Object.hasOwnProperty.call(message, "sidevm")) + $root.pruntime_rpc.SidevmInfo.encode(message.sidevm, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified QueryCounters message, length delimited. Does not implicitly {@link pruntime_rpc.QueryCounters.verify|verify} messages. + * Encodes the specified ContractInfo message, length delimited. Does not implicitly {@link pruntime_rpc.ContractInfo.verify|verify} messages. * @function encodeDelimited - * @memberof pruntime_rpc.QueryCounters + * @memberof pruntime_rpc.ContractInfo * @static - * @param {pruntime_rpc.IQueryCounters} message QueryCounters message or plain object to encode + * @param {pruntime_rpc.IContractInfo} message ContractInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QueryCounters.encodeDelimited = function encodeDelimited(message, writer) { + ContractInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a QueryCounters message from the specified reader or buffer. + * Decodes a ContractInfo message from the specified reader or buffer. * @function decode - * @memberof pruntime_rpc.QueryCounters + * @memberof pruntime_rpc.ContractInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {pruntime_rpc.QueryCounters} QueryCounters + * @returns {pruntime_rpc.ContractInfo} ContractInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QueryCounters.decode = function decode(reader, length) { + ContractInfo.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.QueryCounters(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.ContractInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.total = reader.uint64(); + message.id = reader.string(); break; } case 2: { - message.dropped = reader.uint64(); + message.codeHash = reader.string(); break; } case 3: { - message.time = reader.uint64(); + message.weight = reader.uint32(); + break; + } + case 4: { + message.sidevm = $root.pruntime_rpc.SidevmInfo.decode(reader, reader.uint32()); break; } default: @@ -16854,183 +6597,155 @@ $root.pruntime_rpc = (function() { }; /** - * Decodes a QueryCounters message from the specified reader or buffer, length delimited. + * Decodes a ContractInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof pruntime_rpc.QueryCounters + * @memberof pruntime_rpc.ContractInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.QueryCounters} QueryCounters + * @returns {pruntime_rpc.ContractInfo} ContractInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QueryCounters.decodeDelimited = function decodeDelimited(reader) { + ContractInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a QueryCounters message. + * Verifies a ContractInfo message. * @function verify - * @memberof pruntime_rpc.QueryCounters + * @memberof pruntime_rpc.ContractInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - QueryCounters.verify = function verify(message) { + ContractInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.total != null && message.hasOwnProperty("total")) - if (!$util.isInteger(message.total) && !(message.total && $util.isInteger(message.total.low) && $util.isInteger(message.total.high))) - return "total: integer|Long expected"; - if (message.dropped != null && message.hasOwnProperty("dropped")) - if (!$util.isInteger(message.dropped) && !(message.dropped && $util.isInteger(message.dropped.low) && $util.isInteger(message.dropped.high))) - return "dropped: integer|Long expected"; - if (message.time != null && message.hasOwnProperty("time")) - if (!$util.isInteger(message.time) && !(message.time && $util.isInteger(message.time.low) && $util.isInteger(message.time.high))) - return "time: integer|Long expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.codeHash != null && message.hasOwnProperty("codeHash")) + if (!$util.isString(message.codeHash)) + return "codeHash: string expected"; + if (message.weight != null && message.hasOwnProperty("weight")) + if (!$util.isInteger(message.weight)) + return "weight: integer expected"; + if (message.sidevm != null && message.hasOwnProperty("sidevm")) { + var error = $root.pruntime_rpc.SidevmInfo.verify(message.sidevm); + if (error) + return "sidevm." + error; + } return null; }; /** - * Creates a QueryCounters message from a plain object. Also converts values to their respective internal types. + * Creates a ContractInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof pruntime_rpc.QueryCounters + * @memberof pruntime_rpc.ContractInfo * @static * @param {Object.} object Plain object - * @returns {pruntime_rpc.QueryCounters} QueryCounters + * @returns {pruntime_rpc.ContractInfo} ContractInfo */ - QueryCounters.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.QueryCounters) + ContractInfo.fromObject = function fromObject(object) { + if (object instanceof $root.pruntime_rpc.ContractInfo) return object; - var message = new $root.pruntime_rpc.QueryCounters(); - if (object.total != null) - if ($util.Long) - (message.total = $util.Long.fromValue(object.total)).unsigned = true; - else if (typeof object.total === "string") - message.total = parseInt(object.total, 10); - else if (typeof object.total === "number") - message.total = object.total; - else if (typeof object.total === "object") - message.total = new $util.LongBits(object.total.low >>> 0, object.total.high >>> 0).toNumber(true); - if (object.dropped != null) - if ($util.Long) - (message.dropped = $util.Long.fromValue(object.dropped)).unsigned = true; - else if (typeof object.dropped === "string") - message.dropped = parseInt(object.dropped, 10); - else if (typeof object.dropped === "number") - message.dropped = object.dropped; - else if (typeof object.dropped === "object") - message.dropped = new $util.LongBits(object.dropped.low >>> 0, object.dropped.high >>> 0).toNumber(true); - if (object.time != null) - if ($util.Long) - (message.time = $util.Long.fromValue(object.time)).unsigned = true; - else if (typeof object.time === "string") - message.time = parseInt(object.time, 10); - else if (typeof object.time === "number") - message.time = object.time; - else if (typeof object.time === "object") - message.time = new $util.LongBits(object.time.low >>> 0, object.time.high >>> 0).toNumber(true); + var message = new $root.pruntime_rpc.ContractInfo(); + if (object.id != null) + message.id = String(object.id); + if (object.codeHash != null) + message.codeHash = String(object.codeHash); + if (object.weight != null) + message.weight = object.weight >>> 0; + if (object.sidevm != null) { + if (typeof object.sidevm !== "object") + throw TypeError(".pruntime_rpc.ContractInfo.sidevm: object expected"); + message.sidevm = $root.pruntime_rpc.SidevmInfo.fromObject(object.sidevm); + } return message; }; /** - * Creates a plain object from a QueryCounters message. Also converts values to other types if specified. + * Creates a plain object from a ContractInfo message. Also converts values to other types if specified. * @function toObject - * @memberof pruntime_rpc.QueryCounters + * @memberof pruntime_rpc.ContractInfo * @static - * @param {pruntime_rpc.QueryCounters} message QueryCounters + * @param {pruntime_rpc.ContractInfo} message ContractInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - QueryCounters.toObject = function toObject(message, options) { + ContractInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.total = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.total = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.dropped = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.dropped = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.time = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.time = options.longs === String ? "0" : 0; + object.id = ""; + object.codeHash = ""; + object.weight = 0; + object.sidevm = null; } - if (message.total != null && message.hasOwnProperty("total")) - if (typeof message.total === "number") - object.total = options.longs === String ? String(message.total) : message.total; - else - object.total = options.longs === String ? $util.Long.prototype.toString.call(message.total) : options.longs === Number ? new $util.LongBits(message.total.low >>> 0, message.total.high >>> 0).toNumber(true) : message.total; - if (message.dropped != null && message.hasOwnProperty("dropped")) - if (typeof message.dropped === "number") - object.dropped = options.longs === String ? String(message.dropped) : message.dropped; - else - object.dropped = options.longs === String ? $util.Long.prototype.toString.call(message.dropped) : options.longs === Number ? new $util.LongBits(message.dropped.low >>> 0, message.dropped.high >>> 0).toNumber(true) : message.dropped; - if (message.time != null && message.hasOwnProperty("time")) - if (typeof message.time === "number") - object.time = options.longs === String ? String(message.time) : message.time; - else - object.time = options.longs === String ? $util.Long.prototype.toString.call(message.time) : options.longs === Number ? new $util.LongBits(message.time.low >>> 0, message.time.high >>> 0).toNumber(true) : message.time; + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.codeHash != null && message.hasOwnProperty("codeHash")) + object.codeHash = message.codeHash; + if (message.weight != null && message.hasOwnProperty("weight")) + object.weight = message.weight; + if (message.sidevm != null && message.hasOwnProperty("sidevm")) + object.sidevm = $root.pruntime_rpc.SidevmInfo.toObject(message.sidevm, options); return object; }; /** - * Converts this QueryCounters to JSON. + * Converts this ContractInfo to JSON. * @function toJSON - * @memberof pruntime_rpc.QueryCounters + * @memberof pruntime_rpc.ContractInfo * @instance * @returns {Object.} JSON object */ - QueryCounters.prototype.toJSON = function toJSON() { + ContractInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for QueryCounters + * Gets the default type url for ContractInfo * @function getTypeUrl - * @memberof pruntime_rpc.QueryCounters + * @memberof pruntime_rpc.ContractInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - QueryCounters.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ContractInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/pruntime_rpc.QueryCounters"; + return typeUrlPrefix + "/pruntime_rpc.ContractInfo"; }; - return QueryCounters; + return ContractInfo; })(); - pruntime_rpc.HttpEgressStats = (function() { + pruntime_rpc.SidevmInfo = (function() { /** - * Properties of a HttpEgressStats. + * Properties of a SidevmInfo. * @memberof pruntime_rpc - * @interface IHttpEgressStats - * @property {pruntime_rpc.IHttpCounters|null} [global] HttpEgressStats global - * @property {Object.|null} [byContract] HttpEgressStats byContract + * @interface ISidevmInfo + * @property {string|null} [state] SidevmInfo state + * @property {string|null} [codeHash] SidevmInfo codeHash + * @property {string|null} [startTime] SidevmInfo startTime + * @property {string|null} [stopReason] SidevmInfo stopReason */ /** - * Constructs a new HttpEgressStats. + * Constructs a new SidevmInfo. * @memberof pruntime_rpc - * @classdesc Represents a HttpEgressStats. - * @implements IHttpEgressStats + * @classdesc Represents a SidevmInfo. + * @implements ISidevmInfo * @constructor - * @param {pruntime_rpc.IHttpEgressStats=} [properties] Properties to set + * @param {pruntime_rpc.ISidevmInfo=} [properties] Properties to set */ - function HttpEgressStats(properties) { - this.byContract = {}; + function SidevmInfo(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17038,111 +6753,117 @@ $root.pruntime_rpc = (function() { } /** - * HttpEgressStats global. - * @member {pruntime_rpc.IHttpCounters|null|undefined} global - * @memberof pruntime_rpc.HttpEgressStats + * SidevmInfo state. + * @member {string} state + * @memberof pruntime_rpc.SidevmInfo + * @instance + */ + SidevmInfo.prototype.state = ""; + + /** + * SidevmInfo codeHash. + * @member {string} codeHash + * @memberof pruntime_rpc.SidevmInfo + * @instance + */ + SidevmInfo.prototype.codeHash = ""; + + /** + * SidevmInfo startTime. + * @member {string} startTime + * @memberof pruntime_rpc.SidevmInfo * @instance */ - HttpEgressStats.prototype.global = null; + SidevmInfo.prototype.startTime = ""; /** - * HttpEgressStats byContract. - * @member {Object.} byContract - * @memberof pruntime_rpc.HttpEgressStats + * SidevmInfo stopReason. + * @member {string} stopReason + * @memberof pruntime_rpc.SidevmInfo * @instance */ - HttpEgressStats.prototype.byContract = $util.emptyObject; + SidevmInfo.prototype.stopReason = ""; /** - * Creates a new HttpEgressStats instance using the specified properties. + * Creates a new SidevmInfo instance using the specified properties. * @function create - * @memberof pruntime_rpc.HttpEgressStats + * @memberof pruntime_rpc.SidevmInfo * @static - * @param {pruntime_rpc.IHttpEgressStats=} [properties] Properties to set - * @returns {pruntime_rpc.HttpEgressStats} HttpEgressStats instance + * @param {pruntime_rpc.ISidevmInfo=} [properties] Properties to set + * @returns {pruntime_rpc.SidevmInfo} SidevmInfo instance */ - HttpEgressStats.create = function create(properties) { - return new HttpEgressStats(properties); + SidevmInfo.create = function create(properties) { + return new SidevmInfo(properties); }; /** - * Encodes the specified HttpEgressStats message. Does not implicitly {@link pruntime_rpc.HttpEgressStats.verify|verify} messages. + * Encodes the specified SidevmInfo message. Does not implicitly {@link pruntime_rpc.SidevmInfo.verify|verify} messages. * @function encode - * @memberof pruntime_rpc.HttpEgressStats + * @memberof pruntime_rpc.SidevmInfo * @static - * @param {pruntime_rpc.IHttpEgressStats} message HttpEgressStats message or plain object to encode + * @param {pruntime_rpc.ISidevmInfo} message SidevmInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HttpEgressStats.encode = function encode(message, writer) { + SidevmInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.global != null && Object.hasOwnProperty.call(message, "global")) - $root.pruntime_rpc.HttpCounters.encode(message.global, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.byContract != null && Object.hasOwnProperty.call(message, "byContract")) - for (var keys = Object.keys(message.byContract), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.pruntime_rpc.HttpCounters.encode(message.byContract[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.state); + if (message.codeHash != null && Object.hasOwnProperty.call(message, "codeHash")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.codeHash); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.startTime); + if (message.stopReason != null && Object.hasOwnProperty.call(message, "stopReason")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.stopReason); return writer; }; /** - * Encodes the specified HttpEgressStats message, length delimited. Does not implicitly {@link pruntime_rpc.HttpEgressStats.verify|verify} messages. + * Encodes the specified SidevmInfo message, length delimited. Does not implicitly {@link pruntime_rpc.SidevmInfo.verify|verify} messages. * @function encodeDelimited - * @memberof pruntime_rpc.HttpEgressStats + * @memberof pruntime_rpc.SidevmInfo * @static - * @param {pruntime_rpc.IHttpEgressStats} message HttpEgressStats message or plain object to encode + * @param {pruntime_rpc.ISidevmInfo} message SidevmInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HttpEgressStats.encodeDelimited = function encodeDelimited(message, writer) { + SidevmInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a HttpEgressStats message from the specified reader or buffer. + * Decodes a SidevmInfo message from the specified reader or buffer. * @function decode - * @memberof pruntime_rpc.HttpEgressStats + * @memberof pruntime_rpc.SidevmInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {pruntime_rpc.HttpEgressStats} HttpEgressStats + * @returns {pruntime_rpc.SidevmInfo} SidevmInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HttpEgressStats.decode = function decode(reader, length) { + SidevmInfo.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.HttpEgressStats(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.SidevmInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.global = $root.pruntime_rpc.HttpCounters.decode(reader, reader.uint32()); + message.state = reader.string(); break; } case 2: { - if (message.byContract === $util.emptyObject) - message.byContract = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.pruntime_rpc.HttpCounters.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.byContract[key] = value; + message.codeHash = reader.string(); + break; + } + case 3: { + message.startTime = reader.string(); + break; + } + case 4: { + message.stopReason = reader.string(); break; } default: @@ -17154,158 +6875,148 @@ $root.pruntime_rpc = (function() { }; /** - * Decodes a HttpEgressStats message from the specified reader or buffer, length delimited. + * Decodes a SidevmInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof pruntime_rpc.HttpEgressStats + * @memberof pruntime_rpc.SidevmInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.HttpEgressStats} HttpEgressStats + * @returns {pruntime_rpc.SidevmInfo} SidevmInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HttpEgressStats.decodeDelimited = function decodeDelimited(reader) { + SidevmInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a HttpEgressStats message. + * Verifies a SidevmInfo message. * @function verify - * @memberof pruntime_rpc.HttpEgressStats + * @memberof pruntime_rpc.SidevmInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - HttpEgressStats.verify = function verify(message) { + SidevmInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.global != null && message.hasOwnProperty("global")) { - var error = $root.pruntime_rpc.HttpCounters.verify(message.global); - if (error) - return "global." + error; - } - if (message.byContract != null && message.hasOwnProperty("byContract")) { - if (!$util.isObject(message.byContract)) - return "byContract: object expected"; - var key = Object.keys(message.byContract); - for (var i = 0; i < key.length; ++i) { - var error = $root.pruntime_rpc.HttpCounters.verify(message.byContract[key[i]]); - if (error) - return "byContract." + error; - } - } + if (message.state != null && message.hasOwnProperty("state")) + if (!$util.isString(message.state)) + return "state: string expected"; + if (message.codeHash != null && message.hasOwnProperty("codeHash")) + if (!$util.isString(message.codeHash)) + return "codeHash: string expected"; + if (message.startTime != null && message.hasOwnProperty("startTime")) + if (!$util.isString(message.startTime)) + return "startTime: string expected"; + if (message.stopReason != null && message.hasOwnProperty("stopReason")) + if (!$util.isString(message.stopReason)) + return "stopReason: string expected"; return null; }; /** - * Creates a HttpEgressStats message from a plain object. Also converts values to their respective internal types. + * Creates a SidevmInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof pruntime_rpc.HttpEgressStats + * @memberof pruntime_rpc.SidevmInfo * @static * @param {Object.} object Plain object - * @returns {pruntime_rpc.HttpEgressStats} HttpEgressStats + * @returns {pruntime_rpc.SidevmInfo} SidevmInfo */ - HttpEgressStats.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.HttpEgressStats) + SidevmInfo.fromObject = function fromObject(object) { + if (object instanceof $root.pruntime_rpc.SidevmInfo) return object; - var message = new $root.pruntime_rpc.HttpEgressStats(); - if (object.global != null) { - if (typeof object.global !== "object") - throw TypeError(".pruntime_rpc.HttpEgressStats.global: object expected"); - message.global = $root.pruntime_rpc.HttpCounters.fromObject(object.global); - } - if (object.byContract) { - if (typeof object.byContract !== "object") - throw TypeError(".pruntime_rpc.HttpEgressStats.byContract: object expected"); - message.byContract = {}; - for (var keys = Object.keys(object.byContract), i = 0; i < keys.length; ++i) { - if (typeof object.byContract[keys[i]] !== "object") - throw TypeError(".pruntime_rpc.HttpEgressStats.byContract: object expected"); - message.byContract[keys[i]] = $root.pruntime_rpc.HttpCounters.fromObject(object.byContract[keys[i]]); - } - } + var message = new $root.pruntime_rpc.SidevmInfo(); + if (object.state != null) + message.state = String(object.state); + if (object.codeHash != null) + message.codeHash = String(object.codeHash); + if (object.startTime != null) + message.startTime = String(object.startTime); + if (object.stopReason != null) + message.stopReason = String(object.stopReason); return message; }; /** - * Creates a plain object from a HttpEgressStats message. Also converts values to other types if specified. + * Creates a plain object from a SidevmInfo message. Also converts values to other types if specified. * @function toObject - * @memberof pruntime_rpc.HttpEgressStats + * @memberof pruntime_rpc.SidevmInfo * @static - * @param {pruntime_rpc.HttpEgressStats} message HttpEgressStats + * @param {pruntime_rpc.SidevmInfo} message SidevmInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - HttpEgressStats.toObject = function toObject(message, options) { + SidevmInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.byContract = {}; - if (options.defaults) - object.global = null; - if (message.global != null && message.hasOwnProperty("global")) - object.global = $root.pruntime_rpc.HttpCounters.toObject(message.global, options); - var keys2; - if (message.byContract && (keys2 = Object.keys(message.byContract)).length) { - object.byContract = {}; - for (var j = 0; j < keys2.length; ++j) - object.byContract[keys2[j]] = $root.pruntime_rpc.HttpCounters.toObject(message.byContract[keys2[j]], options); + if (options.defaults) { + object.state = ""; + object.codeHash = ""; + object.startTime = ""; + object.stopReason = ""; } + if (message.state != null && message.hasOwnProperty("state")) + object.state = message.state; + if (message.codeHash != null && message.hasOwnProperty("codeHash")) + object.codeHash = message.codeHash; + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = message.startTime; + if (message.stopReason != null && message.hasOwnProperty("stopReason")) + object.stopReason = message.stopReason; return object; }; /** - * Converts this HttpEgressStats to JSON. + * Converts this SidevmInfo to JSON. * @function toJSON - * @memberof pruntime_rpc.HttpEgressStats + * @memberof pruntime_rpc.SidevmInfo * @instance * @returns {Object.} JSON object */ - HttpEgressStats.prototype.toJSON = function toJSON() { + SidevmInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for HttpEgressStats + * Gets the default type url for SidevmInfo * @function getTypeUrl - * @memberof pruntime_rpc.HttpEgressStats + * @memberof pruntime_rpc.SidevmInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - HttpEgressStats.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SidevmInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/pruntime_rpc.HttpEgressStats"; + return typeUrlPrefix + "/pruntime_rpc.SidevmInfo"; }; - return HttpEgressStats; + return SidevmInfo; })(); - pruntime_rpc.HttpCounters = (function() { + pruntime_rpc.SidevmCode = (function() { /** - * Properties of a HttpCounters. + * Properties of a SidevmCode. * @memberof pruntime_rpc - * @interface IHttpCounters - * @property {number|Long|null} [requests] HttpCounters requests - * @property {number|Long|null} [failures] HttpCounters failures - * @property {Object.|null} [byStatusCode] HttpCounters byStatusCode + * @interface ISidevmCode + * @property {Uint8Array|null} [contract] SidevmCode contract + * @property {Uint8Array|null} [code] SidevmCode code */ /** - * Constructs a new HttpCounters. + * Constructs a new SidevmCode. * @memberof pruntime_rpc - * @classdesc Represents a HttpCounters. - * @implements IHttpCounters + * @classdesc Represents a SidevmCode. + * @implements ISidevmCode * @constructor - * @param {pruntime_rpc.IHttpCounters=} [properties] Properties to set + * @param {pruntime_rpc.ISidevmCode=} [properties] Properties to set */ - function HttpCounters(properties) { - this.byStatusCode = {}; + function SidevmCode(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17313,123 +7024,89 @@ $root.pruntime_rpc = (function() { } /** - * HttpCounters requests. - * @member {number|Long} requests - * @memberof pruntime_rpc.HttpCounters - * @instance - */ - HttpCounters.prototype.requests = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * HttpCounters failures. - * @member {number|Long} failures - * @memberof pruntime_rpc.HttpCounters + * SidevmCode contract. + * @member {Uint8Array} contract + * @memberof pruntime_rpc.SidevmCode * @instance */ - HttpCounters.prototype.failures = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + SidevmCode.prototype.contract = $util.newBuffer([]); /** - * HttpCounters byStatusCode. - * @member {Object.} byStatusCode - * @memberof pruntime_rpc.HttpCounters + * SidevmCode code. + * @member {Uint8Array} code + * @memberof pruntime_rpc.SidevmCode * @instance */ - HttpCounters.prototype.byStatusCode = $util.emptyObject; + SidevmCode.prototype.code = $util.newBuffer([]); /** - * Creates a new HttpCounters instance using the specified properties. + * Creates a new SidevmCode instance using the specified properties. * @function create - * @memberof pruntime_rpc.HttpCounters + * @memberof pruntime_rpc.SidevmCode * @static - * @param {pruntime_rpc.IHttpCounters=} [properties] Properties to set - * @returns {pruntime_rpc.HttpCounters} HttpCounters instance + * @param {pruntime_rpc.ISidevmCode=} [properties] Properties to set + * @returns {pruntime_rpc.SidevmCode} SidevmCode instance */ - HttpCounters.create = function create(properties) { - return new HttpCounters(properties); + SidevmCode.create = function create(properties) { + return new SidevmCode(properties); }; /** - * Encodes the specified HttpCounters message. Does not implicitly {@link pruntime_rpc.HttpCounters.verify|verify} messages. + * Encodes the specified SidevmCode message. Does not implicitly {@link pruntime_rpc.SidevmCode.verify|verify} messages. * @function encode - * @memberof pruntime_rpc.HttpCounters + * @memberof pruntime_rpc.SidevmCode * @static - * @param {pruntime_rpc.IHttpCounters} message HttpCounters message or plain object to encode + * @param {pruntime_rpc.ISidevmCode} message SidevmCode message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HttpCounters.encode = function encode(message, writer) { + SidevmCode.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.requests != null && Object.hasOwnProperty.call(message, "requests")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.requests); - if (message.failures != null && Object.hasOwnProperty.call(message, "failures")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.failures); - if (message.byStatusCode != null && Object.hasOwnProperty.call(message, "byStatusCode")) - for (var keys = Object.keys(message.byStatusCode), i = 0; i < keys.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 0 =*/8).uint32(keys[i]).uint32(/* id 2, wireType 0 =*/16).uint64(message.byStatusCode[keys[i]]).ldelim(); + if (message.contract != null && Object.hasOwnProperty.call(message, "contract")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.contract); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.code); return writer; }; /** - * Encodes the specified HttpCounters message, length delimited. Does not implicitly {@link pruntime_rpc.HttpCounters.verify|verify} messages. + * Encodes the specified SidevmCode message, length delimited. Does not implicitly {@link pruntime_rpc.SidevmCode.verify|verify} messages. * @function encodeDelimited - * @memberof pruntime_rpc.HttpCounters + * @memberof pruntime_rpc.SidevmCode * @static - * @param {pruntime_rpc.IHttpCounters} message HttpCounters message or plain object to encode + * @param {pruntime_rpc.ISidevmCode} message SidevmCode message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HttpCounters.encodeDelimited = function encodeDelimited(message, writer) { + SidevmCode.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a HttpCounters message from the specified reader or buffer. + * Decodes a SidevmCode message from the specified reader or buffer. * @function decode - * @memberof pruntime_rpc.HttpCounters + * @memberof pruntime_rpc.SidevmCode * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {pruntime_rpc.HttpCounters} HttpCounters + * @returns {pruntime_rpc.SidevmCode} SidevmCode * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HttpCounters.decode = function decode(reader, length) { + SidevmCode.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.HttpCounters(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.SidevmCode(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.requests = reader.uint64(); + message.contract = reader.bytes(); break; } case 2: { - message.failures = reader.uint64(); - break; - } - case 3: { - if (message.byStatusCode === $util.emptyObject) - message.byStatusCode = {}; - var end2 = reader.uint32() + reader.pos; - key = 0; - value = 0; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.uint32(); - break; - case 2: - value = reader.uint64(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.byStatusCode[key] = value; + message.code = reader.bytes(); break; } default: @@ -17441,197 +7118,152 @@ $root.pruntime_rpc = (function() { }; /** - * Decodes a HttpCounters message from the specified reader or buffer, length delimited. + * Decodes a SidevmCode message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof pruntime_rpc.HttpCounters + * @memberof pruntime_rpc.SidevmCode * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.HttpCounters} HttpCounters + * @returns {pruntime_rpc.SidevmCode} SidevmCode * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HttpCounters.decodeDelimited = function decodeDelimited(reader) { + SidevmCode.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a HttpCounters message. + * Verifies a SidevmCode message. * @function verify - * @memberof pruntime_rpc.HttpCounters + * @memberof pruntime_rpc.SidevmCode * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - HttpCounters.verify = function verify(message) { + SidevmCode.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.requests != null && message.hasOwnProperty("requests")) - if (!$util.isInteger(message.requests) && !(message.requests && $util.isInteger(message.requests.low) && $util.isInteger(message.requests.high))) - return "requests: integer|Long expected"; - if (message.failures != null && message.hasOwnProperty("failures")) - if (!$util.isInteger(message.failures) && !(message.failures && $util.isInteger(message.failures.low) && $util.isInteger(message.failures.high))) - return "failures: integer|Long expected"; - if (message.byStatusCode != null && message.hasOwnProperty("byStatusCode")) { - if (!$util.isObject(message.byStatusCode)) - return "byStatusCode: object expected"; - var key = Object.keys(message.byStatusCode); - for (var i = 0; i < key.length; ++i) { - if (!$util.key32Re.test(key[i])) - return "byStatusCode: integer key{k:uint32} expected"; - if (!$util.isInteger(message.byStatusCode[key[i]]) && !(message.byStatusCode[key[i]] && $util.isInteger(message.byStatusCode[key[i]].low) && $util.isInteger(message.byStatusCode[key[i]].high))) - return "byStatusCode: integer|Long{k:uint32} expected"; - } - } + if (message.contract != null && message.hasOwnProperty("contract")) + if (!(message.contract && typeof message.contract.length === "number" || $util.isString(message.contract))) + return "contract: buffer expected"; + if (message.code != null && message.hasOwnProperty("code")) + if (!(message.code && typeof message.code.length === "number" || $util.isString(message.code))) + return "code: buffer expected"; return null; }; /** - * Creates a HttpCounters message from a plain object. Also converts values to their respective internal types. + * Creates a SidevmCode message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof pruntime_rpc.HttpCounters + * @memberof pruntime_rpc.SidevmCode * @static * @param {Object.} object Plain object - * @returns {pruntime_rpc.HttpCounters} HttpCounters + * @returns {pruntime_rpc.SidevmCode} SidevmCode */ - HttpCounters.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.HttpCounters) - return object; - var message = new $root.pruntime_rpc.HttpCounters(); - if (object.requests != null) - if ($util.Long) - (message.requests = $util.Long.fromValue(object.requests)).unsigned = true; - else if (typeof object.requests === "string") - message.requests = parseInt(object.requests, 10); - else if (typeof object.requests === "number") - message.requests = object.requests; - else if (typeof object.requests === "object") - message.requests = new $util.LongBits(object.requests.low >>> 0, object.requests.high >>> 0).toNumber(true); - if (object.failures != null) - if ($util.Long) - (message.failures = $util.Long.fromValue(object.failures)).unsigned = true; - else if (typeof object.failures === "string") - message.failures = parseInt(object.failures, 10); - else if (typeof object.failures === "number") - message.failures = object.failures; - else if (typeof object.failures === "object") - message.failures = new $util.LongBits(object.failures.low >>> 0, object.failures.high >>> 0).toNumber(true); - if (object.byStatusCode) { - if (typeof object.byStatusCode !== "object") - throw TypeError(".pruntime_rpc.HttpCounters.byStatusCode: object expected"); - message.byStatusCode = {}; - for (var keys = Object.keys(object.byStatusCode), i = 0; i < keys.length; ++i) - if ($util.Long) - (message.byStatusCode[keys[i]] = $util.Long.fromValue(object.byStatusCode[keys[i]])).unsigned = true; - else if (typeof object.byStatusCode[keys[i]] === "string") - message.byStatusCode[keys[i]] = parseInt(object.byStatusCode[keys[i]], 10); - else if (typeof object.byStatusCode[keys[i]] === "number") - message.byStatusCode[keys[i]] = object.byStatusCode[keys[i]]; - else if (typeof object.byStatusCode[keys[i]] === "object") - message.byStatusCode[keys[i]] = new $util.LongBits(object.byStatusCode[keys[i]].low >>> 0, object.byStatusCode[keys[i]].high >>> 0).toNumber(true); - } + SidevmCode.fromObject = function fromObject(object) { + if (object instanceof $root.pruntime_rpc.SidevmCode) + return object; + var message = new $root.pruntime_rpc.SidevmCode(); + if (object.contract != null) + if (typeof object.contract === "string") + $util.base64.decode(object.contract, message.contract = $util.newBuffer($util.base64.length(object.contract)), 0); + else if (object.contract.length >= 0) + message.contract = object.contract; + if (object.code != null) + if (typeof object.code === "string") + $util.base64.decode(object.code, message.code = $util.newBuffer($util.base64.length(object.code)), 0); + else if (object.code.length >= 0) + message.code = object.code; return message; }; /** - * Creates a plain object from a HttpCounters message. Also converts values to other types if specified. + * Creates a plain object from a SidevmCode message. Also converts values to other types if specified. * @function toObject - * @memberof pruntime_rpc.HttpCounters + * @memberof pruntime_rpc.SidevmCode * @static - * @param {pruntime_rpc.HttpCounters} message HttpCounters + * @param {pruntime_rpc.SidevmCode} message SidevmCode * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - HttpCounters.toObject = function toObject(message, options) { + SidevmCode.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.byStatusCode = {}; if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.requests = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.requests = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.failures = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.failures = options.longs === String ? "0" : 0; - } - if (message.requests != null && message.hasOwnProperty("requests")) - if (typeof message.requests === "number") - object.requests = options.longs === String ? String(message.requests) : message.requests; - else - object.requests = options.longs === String ? $util.Long.prototype.toString.call(message.requests) : options.longs === Number ? new $util.LongBits(message.requests.low >>> 0, message.requests.high >>> 0).toNumber(true) : message.requests; - if (message.failures != null && message.hasOwnProperty("failures")) - if (typeof message.failures === "number") - object.failures = options.longs === String ? String(message.failures) : message.failures; - else - object.failures = options.longs === String ? $util.Long.prototype.toString.call(message.failures) : options.longs === Number ? new $util.LongBits(message.failures.low >>> 0, message.failures.high >>> 0).toNumber(true) : message.failures; - var keys2; - if (message.byStatusCode && (keys2 = Object.keys(message.byStatusCode)).length) { - object.byStatusCode = {}; - for (var j = 0; j < keys2.length; ++j) - if (typeof message.byStatusCode[keys2[j]] === "number") - object.byStatusCode[keys2[j]] = options.longs === String ? String(message.byStatusCode[keys2[j]]) : message.byStatusCode[keys2[j]]; - else - object.byStatusCode[keys2[j]] = options.longs === String ? $util.Long.prototype.toString.call(message.byStatusCode[keys2[j]]) : options.longs === Number ? new $util.LongBits(message.byStatusCode[keys2[j]].low >>> 0, message.byStatusCode[keys2[j]].high >>> 0).toNumber(true) : message.byStatusCode[keys2[j]]; + if (options.bytes === String) + object.contract = ""; + else { + object.contract = []; + if (options.bytes !== Array) + object.contract = $util.newBuffer(object.contract); + } + if (options.bytes === String) + object.code = ""; + else { + object.code = []; + if (options.bytes !== Array) + object.code = $util.newBuffer(object.code); + } } + if (message.contract != null && message.hasOwnProperty("contract")) + object.contract = options.bytes === String ? $util.base64.encode(message.contract, 0, message.contract.length) : options.bytes === Array ? Array.prototype.slice.call(message.contract) : message.contract; + if (message.code != null && message.hasOwnProperty("code")) + object.code = options.bytes === String ? $util.base64.encode(message.code, 0, message.code.length) : options.bytes === Array ? Array.prototype.slice.call(message.code) : message.code; return object; }; /** - * Converts this HttpCounters to JSON. + * Converts this SidevmCode to JSON. * @function toJSON - * @memberof pruntime_rpc.HttpCounters + * @memberof pruntime_rpc.SidevmCode * @instance * @returns {Object.} JSON object */ - HttpCounters.prototype.toJSON = function toJSON() { + SidevmCode.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for HttpCounters + * Gets the default type url for SidevmCode * @function getTypeUrl - * @memberof pruntime_rpc.HttpCounters + * @memberof pruntime_rpc.SidevmCode * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - HttpCounters.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SidevmCode.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/pruntime_rpc.HttpCounters"; + return typeUrlPrefix + "/pruntime_rpc.SidevmCode"; }; - return HttpCounters; + return SidevmCode; })(); - pruntime_rpc.SaveClusterStateArguments = (function() { + pruntime_rpc.ContractParameters = (function() { /** - * Properties of a SaveClusterStateArguments. + * Properties of a ContractParameters. * @memberof pruntime_rpc - * @interface ISaveClusterStateArguments - * @property {string|null} [receiver] SaveClusterStateArguments receiver - * @property {number|null} [minBlockNumber] SaveClusterStateArguments minBlockNumber - * @property {string|null} [signature] SaveClusterStateArguments signature + * @interface IContractParameters + * @property {string|null} [deployer] ContractParameters deployer + * @property {string|null} [clusterId] ContractParameters clusterId + * @property {string|null} [codeHash] ContractParameters codeHash + * @property {string|null} [salt] ContractParameters salt */ /** - * Constructs a new SaveClusterStateArguments. + * Constructs a new ContractParameters. * @memberof pruntime_rpc - * @classdesc Represents a SaveClusterStateArguments. - * @implements ISaveClusterStateArguments + * @classdesc Represents a ContractParameters. + * @implements IContractParameters * @constructor - * @param {pruntime_rpc.ISaveClusterStateArguments=} [properties] Properties to set + * @param {pruntime_rpc.IContractParameters=} [properties] Properties to set */ - function SaveClusterStateArguments(properties) { + function ContractParameters(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17639,103 +7271,117 @@ $root.pruntime_rpc = (function() { } /** - * SaveClusterStateArguments receiver. - * @member {string} receiver - * @memberof pruntime_rpc.SaveClusterStateArguments + * ContractParameters deployer. + * @member {string} deployer + * @memberof pruntime_rpc.ContractParameters + * @instance + */ + ContractParameters.prototype.deployer = ""; + + /** + * ContractParameters clusterId. + * @member {string} clusterId + * @memberof pruntime_rpc.ContractParameters * @instance */ - SaveClusterStateArguments.prototype.receiver = ""; + ContractParameters.prototype.clusterId = ""; /** - * SaveClusterStateArguments minBlockNumber. - * @member {number} minBlockNumber - * @memberof pruntime_rpc.SaveClusterStateArguments + * ContractParameters codeHash. + * @member {string} codeHash + * @memberof pruntime_rpc.ContractParameters * @instance */ - SaveClusterStateArguments.prototype.minBlockNumber = 0; + ContractParameters.prototype.codeHash = ""; /** - * SaveClusterStateArguments signature. - * @member {string} signature - * @memberof pruntime_rpc.SaveClusterStateArguments + * ContractParameters salt. + * @member {string} salt + * @memberof pruntime_rpc.ContractParameters * @instance */ - SaveClusterStateArguments.prototype.signature = ""; + ContractParameters.prototype.salt = ""; /** - * Creates a new SaveClusterStateArguments instance using the specified properties. + * Creates a new ContractParameters instance using the specified properties. * @function create - * @memberof pruntime_rpc.SaveClusterStateArguments + * @memberof pruntime_rpc.ContractParameters * @static - * @param {pruntime_rpc.ISaveClusterStateArguments=} [properties] Properties to set - * @returns {pruntime_rpc.SaveClusterStateArguments} SaveClusterStateArguments instance + * @param {pruntime_rpc.IContractParameters=} [properties] Properties to set + * @returns {pruntime_rpc.ContractParameters} ContractParameters instance */ - SaveClusterStateArguments.create = function create(properties) { - return new SaveClusterStateArguments(properties); + ContractParameters.create = function create(properties) { + return new ContractParameters(properties); }; /** - * Encodes the specified SaveClusterStateArguments message. Does not implicitly {@link pruntime_rpc.SaveClusterStateArguments.verify|verify} messages. + * Encodes the specified ContractParameters message. Does not implicitly {@link pruntime_rpc.ContractParameters.verify|verify} messages. * @function encode - * @memberof pruntime_rpc.SaveClusterStateArguments + * @memberof pruntime_rpc.ContractParameters * @static - * @param {pruntime_rpc.ISaveClusterStateArguments} message SaveClusterStateArguments message or plain object to encode + * @param {pruntime_rpc.IContractParameters} message ContractParameters message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SaveClusterStateArguments.encode = function encode(message, writer) { + ContractParameters.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.receiver != null && Object.hasOwnProperty.call(message, "receiver")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.receiver); - if (message.minBlockNumber != null && Object.hasOwnProperty.call(message, "minBlockNumber")) - writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.minBlockNumber); - if (message.signature != null && Object.hasOwnProperty.call(message, "signature")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.signature); + if (message.deployer != null && Object.hasOwnProperty.call(message, "deployer")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.deployer); + if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.clusterId); + if (message.codeHash != null && Object.hasOwnProperty.call(message, "codeHash")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.codeHash); + if (message.salt != null && Object.hasOwnProperty.call(message, "salt")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.salt); return writer; }; /** - * Encodes the specified SaveClusterStateArguments message, length delimited. Does not implicitly {@link pruntime_rpc.SaveClusterStateArguments.verify|verify} messages. + * Encodes the specified ContractParameters message, length delimited. Does not implicitly {@link pruntime_rpc.ContractParameters.verify|verify} messages. * @function encodeDelimited - * @memberof pruntime_rpc.SaveClusterStateArguments + * @memberof pruntime_rpc.ContractParameters * @static - * @param {pruntime_rpc.ISaveClusterStateArguments} message SaveClusterStateArguments message or plain object to encode + * @param {pruntime_rpc.IContractParameters} message ContractParameters message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SaveClusterStateArguments.encodeDelimited = function encodeDelimited(message, writer) { + ContractParameters.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SaveClusterStateArguments message from the specified reader or buffer. + * Decodes a ContractParameters message from the specified reader or buffer. * @function decode - * @memberof pruntime_rpc.SaveClusterStateArguments + * @memberof pruntime_rpc.ContractParameters * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {pruntime_rpc.SaveClusterStateArguments} SaveClusterStateArguments + * @returns {pruntime_rpc.ContractParameters} ContractParameters * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SaveClusterStateArguments.decode = function decode(reader, length) { + ContractParameters.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.SaveClusterStateArguments(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.ContractParameters(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.receiver = reader.string(); + message.deployer = reader.string(); break; } case 2: { - message.minBlockNumber = reader.uint32(); + message.clusterId = reader.string(); break; } case 3: { - message.signature = reader.string(); + message.codeHash = reader.string(); + break; + } + case 4: { + message.salt = reader.string(); break; } default: @@ -17747,140 +7393,147 @@ $root.pruntime_rpc = (function() { }; /** - * Decodes a SaveClusterStateArguments message from the specified reader or buffer, length delimited. + * Decodes a ContractParameters message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof pruntime_rpc.SaveClusterStateArguments + * @memberof pruntime_rpc.ContractParameters * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.SaveClusterStateArguments} SaveClusterStateArguments + * @returns {pruntime_rpc.ContractParameters} ContractParameters * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SaveClusterStateArguments.decodeDelimited = function decodeDelimited(reader) { + ContractParameters.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SaveClusterStateArguments message. + * Verifies a ContractParameters message. * @function verify - * @memberof pruntime_rpc.SaveClusterStateArguments + * @memberof pruntime_rpc.ContractParameters * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SaveClusterStateArguments.verify = function verify(message) { + ContractParameters.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.receiver != null && message.hasOwnProperty("receiver")) - if (!$util.isString(message.receiver)) - return "receiver: string expected"; - if (message.minBlockNumber != null && message.hasOwnProperty("minBlockNumber")) - if (!$util.isInteger(message.minBlockNumber)) - return "minBlockNumber: integer expected"; - if (message.signature != null && message.hasOwnProperty("signature")) - if (!$util.isString(message.signature)) - return "signature: string expected"; + if (message.deployer != null && message.hasOwnProperty("deployer")) + if (!$util.isString(message.deployer)) + return "deployer: string expected"; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + if (!$util.isString(message.clusterId)) + return "clusterId: string expected"; + if (message.codeHash != null && message.hasOwnProperty("codeHash")) + if (!$util.isString(message.codeHash)) + return "codeHash: string expected"; + if (message.salt != null && message.hasOwnProperty("salt")) + if (!$util.isString(message.salt)) + return "salt: string expected"; return null; }; /** - * Creates a SaveClusterStateArguments message from a plain object. Also converts values to their respective internal types. + * Creates a ContractParameters message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof pruntime_rpc.SaveClusterStateArguments + * @memberof pruntime_rpc.ContractParameters * @static * @param {Object.} object Plain object - * @returns {pruntime_rpc.SaveClusterStateArguments} SaveClusterStateArguments + * @returns {pruntime_rpc.ContractParameters} ContractParameters */ - SaveClusterStateArguments.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.SaveClusterStateArguments) + ContractParameters.fromObject = function fromObject(object) { + if (object instanceof $root.pruntime_rpc.ContractParameters) return object; - var message = new $root.pruntime_rpc.SaveClusterStateArguments(); - if (object.receiver != null) - message.receiver = String(object.receiver); - if (object.minBlockNumber != null) - message.minBlockNumber = object.minBlockNumber >>> 0; - if (object.signature != null) - message.signature = String(object.signature); + var message = new $root.pruntime_rpc.ContractParameters(); + if (object.deployer != null) + message.deployer = String(object.deployer); + if (object.clusterId != null) + message.clusterId = String(object.clusterId); + if (object.codeHash != null) + message.codeHash = String(object.codeHash); + if (object.salt != null) + message.salt = String(object.salt); return message; }; /** - * Creates a plain object from a SaveClusterStateArguments message. Also converts values to other types if specified. + * Creates a plain object from a ContractParameters message. Also converts values to other types if specified. * @function toObject - * @memberof pruntime_rpc.SaveClusterStateArguments + * @memberof pruntime_rpc.ContractParameters * @static - * @param {pruntime_rpc.SaveClusterStateArguments} message SaveClusterStateArguments + * @param {pruntime_rpc.ContractParameters} message ContractParameters * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SaveClusterStateArguments.toObject = function toObject(message, options) { + ContractParameters.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.receiver = ""; - object.minBlockNumber = 0; - object.signature = ""; + object.deployer = ""; + object.clusterId = ""; + object.codeHash = ""; + object.salt = ""; } - if (message.receiver != null && message.hasOwnProperty("receiver")) - object.receiver = message.receiver; - if (message.minBlockNumber != null && message.hasOwnProperty("minBlockNumber")) - object.minBlockNumber = message.minBlockNumber; - if (message.signature != null && message.hasOwnProperty("signature")) - object.signature = message.signature; + if (message.deployer != null && message.hasOwnProperty("deployer")) + object.deployer = message.deployer; + if (message.clusterId != null && message.hasOwnProperty("clusterId")) + object.clusterId = message.clusterId; + if (message.codeHash != null && message.hasOwnProperty("codeHash")) + object.codeHash = message.codeHash; + if (message.salt != null && message.hasOwnProperty("salt")) + object.salt = message.salt; return object; }; /** - * Converts this SaveClusterStateArguments to JSON. + * Converts this ContractParameters to JSON. * @function toJSON - * @memberof pruntime_rpc.SaveClusterStateArguments + * @memberof pruntime_rpc.ContractParameters * @instance * @returns {Object.} JSON object */ - SaveClusterStateArguments.prototype.toJSON = function toJSON() { + ContractParameters.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SaveClusterStateArguments + * Gets the default type url for ContractParameters * @function getTypeUrl - * @memberof pruntime_rpc.SaveClusterStateArguments + * @memberof pruntime_rpc.ContractParameters * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SaveClusterStateArguments.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ContractParameters.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/pruntime_rpc.SaveClusterStateArguments"; + return typeUrlPrefix + "/pruntime_rpc.ContractParameters"; }; - return SaveClusterStateArguments; + return ContractParameters; })(); - pruntime_rpc.SaveClusterStateResponse = (function() { + pruntime_rpc.ContractId = (function() { /** - * Properties of a SaveClusterStateResponse. + * Properties of a ContractId. * @memberof pruntime_rpc - * @interface ISaveClusterStateResponse - * @property {number|null} [blockNumber] SaveClusterStateResponse blockNumber - * @property {string|null} [filename] SaveClusterStateResponse filename + * @interface IContractId + * @property {string|null} [id] ContractId id */ /** - * Constructs a new SaveClusterStateResponse. + * Constructs a new ContractId. * @memberof pruntime_rpc - * @classdesc Represents a SaveClusterStateResponse. - * @implements ISaveClusterStateResponse + * @classdesc Represents a ContractId. + * @implements IContractId * @constructor - * @param {pruntime_rpc.ISaveClusterStateResponse=} [properties] Properties to set + * @param {pruntime_rpc.IContractId=} [properties] Properties to set */ - function SaveClusterStateResponse(properties) { + function ContractId(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17888,89 +7541,75 @@ $root.pruntime_rpc = (function() { } /** - * SaveClusterStateResponse blockNumber. - * @member {number} blockNumber - * @memberof pruntime_rpc.SaveClusterStateResponse - * @instance - */ - SaveClusterStateResponse.prototype.blockNumber = 0; - - /** - * SaveClusterStateResponse filename. - * @member {string} filename - * @memberof pruntime_rpc.SaveClusterStateResponse + * ContractId id. + * @member {string} id + * @memberof pruntime_rpc.ContractId * @instance */ - SaveClusterStateResponse.prototype.filename = ""; + ContractId.prototype.id = ""; /** - * Creates a new SaveClusterStateResponse instance using the specified properties. + * Creates a new ContractId instance using the specified properties. * @function create - * @memberof pruntime_rpc.SaveClusterStateResponse + * @memberof pruntime_rpc.ContractId * @static - * @param {pruntime_rpc.ISaveClusterStateResponse=} [properties] Properties to set - * @returns {pruntime_rpc.SaveClusterStateResponse} SaveClusterStateResponse instance + * @param {pruntime_rpc.IContractId=} [properties] Properties to set + * @returns {pruntime_rpc.ContractId} ContractId instance */ - SaveClusterStateResponse.create = function create(properties) { - return new SaveClusterStateResponse(properties); + ContractId.create = function create(properties) { + return new ContractId(properties); }; /** - * Encodes the specified SaveClusterStateResponse message. Does not implicitly {@link pruntime_rpc.SaveClusterStateResponse.verify|verify} messages. + * Encodes the specified ContractId message. Does not implicitly {@link pruntime_rpc.ContractId.verify|verify} messages. * @function encode - * @memberof pruntime_rpc.SaveClusterStateResponse + * @memberof pruntime_rpc.ContractId * @static - * @param {pruntime_rpc.ISaveClusterStateResponse} message SaveClusterStateResponse message or plain object to encode + * @param {pruntime_rpc.IContractId} message ContractId message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SaveClusterStateResponse.encode = function encode(message, writer) { + ContractId.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.blockNumber != null && Object.hasOwnProperty.call(message, "blockNumber")) - writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.blockNumber); - if (message.filename != null && Object.hasOwnProperty.call(message, "filename")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.filename); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); return writer; }; /** - * Encodes the specified SaveClusterStateResponse message, length delimited. Does not implicitly {@link pruntime_rpc.SaveClusterStateResponse.verify|verify} messages. + * Encodes the specified ContractId message, length delimited. Does not implicitly {@link pruntime_rpc.ContractId.verify|verify} messages. * @function encodeDelimited - * @memberof pruntime_rpc.SaveClusterStateResponse + * @memberof pruntime_rpc.ContractId * @static - * @param {pruntime_rpc.ISaveClusterStateResponse} message SaveClusterStateResponse message or plain object to encode + * @param {pruntime_rpc.IContractId} message ContractId message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SaveClusterStateResponse.encodeDelimited = function encodeDelimited(message, writer) { + ContractId.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SaveClusterStateResponse message from the specified reader or buffer. + * Decodes a ContractId message from the specified reader or buffer. * @function decode - * @memberof pruntime_rpc.SaveClusterStateResponse + * @memberof pruntime_rpc.ContractId * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {pruntime_rpc.SaveClusterStateResponse} SaveClusterStateResponse + * @returns {pruntime_rpc.ContractId} ContractId * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SaveClusterStateResponse.decode = function decode(reader, length) { + ContractId.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.SaveClusterStateResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.ContractId(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.blockNumber = reader.uint32(); - break; - } - case 2: { - message.filename = reader.string(); + message.id = reader.string(); break; } default: @@ -17982,111 +7621,102 @@ $root.pruntime_rpc = (function() { }; /** - * Decodes a SaveClusterStateResponse message from the specified reader or buffer, length delimited. + * Decodes a ContractId message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof pruntime_rpc.SaveClusterStateResponse + * @memberof pruntime_rpc.ContractId * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.SaveClusterStateResponse} SaveClusterStateResponse + * @returns {pruntime_rpc.ContractId} ContractId * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SaveClusterStateResponse.decodeDelimited = function decodeDelimited(reader) { + ContractId.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SaveClusterStateResponse message. + * Verifies a ContractId message. * @function verify - * @memberof pruntime_rpc.SaveClusterStateResponse + * @memberof pruntime_rpc.ContractId * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SaveClusterStateResponse.verify = function verify(message) { + ContractId.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.blockNumber != null && message.hasOwnProperty("blockNumber")) - if (!$util.isInteger(message.blockNumber)) - return "blockNumber: integer expected"; - if (message.filename != null && message.hasOwnProperty("filename")) - if (!$util.isString(message.filename)) - return "filename: string expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; return null; }; /** - * Creates a SaveClusterStateResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ContractId message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof pruntime_rpc.SaveClusterStateResponse + * @memberof pruntime_rpc.ContractId * @static * @param {Object.} object Plain object - * @returns {pruntime_rpc.SaveClusterStateResponse} SaveClusterStateResponse + * @returns {pruntime_rpc.ContractId} ContractId */ - SaveClusterStateResponse.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.SaveClusterStateResponse) + ContractId.fromObject = function fromObject(object) { + if (object instanceof $root.pruntime_rpc.ContractId) return object; - var message = new $root.pruntime_rpc.SaveClusterStateResponse(); - if (object.blockNumber != null) - message.blockNumber = object.blockNumber >>> 0; - if (object.filename != null) - message.filename = String(object.filename); + var message = new $root.pruntime_rpc.ContractId(); + if (object.id != null) + message.id = String(object.id); return message; }; /** - * Creates a plain object from a SaveClusterStateResponse message. Also converts values to other types if specified. + * Creates a plain object from a ContractId message. Also converts values to other types if specified. * @function toObject - * @memberof pruntime_rpc.SaveClusterStateResponse + * @memberof pruntime_rpc.ContractId * @static - * @param {pruntime_rpc.SaveClusterStateResponse} message SaveClusterStateResponse + * @param {pruntime_rpc.ContractId} message ContractId * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SaveClusterStateResponse.toObject = function toObject(message, options) { + ContractId.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.blockNumber = 0; - object.filename = ""; - } - if (message.blockNumber != null && message.hasOwnProperty("blockNumber")) - object.blockNumber = message.blockNumber; - if (message.filename != null && message.hasOwnProperty("filename")) - object.filename = message.filename; + if (options.defaults) + object.id = ""; + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; return object; }; /** - * Converts this SaveClusterStateResponse to JSON. + * Converts this ContractId to JSON. * @function toJSON - * @memberof pruntime_rpc.SaveClusterStateResponse + * @memberof pruntime_rpc.ContractId * @instance * @returns {Object.} JSON object */ - SaveClusterStateResponse.prototype.toJSON = function toJSON() { + ContractId.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SaveClusterStateResponse + * Gets the default type url for ContractId * @function getTypeUrl - * @memberof pruntime_rpc.SaveClusterStateResponse + * @memberof pruntime_rpc.ContractId * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SaveClusterStateResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ContractId.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/pruntime_rpc.SaveClusterStateResponse"; + return typeUrlPrefix + "/pruntime_rpc.ContractId"; }; - return SaveClusterStateResponse; + return ContractId; })(); return pruntime_rpc; diff --git a/frontend/packages/sdk/tsup.browser.ts b/frontend/packages/sdk/tsup.browser.ts index 93f4ca90bb..1626e6c335 100644 --- a/frontend/packages/sdk/tsup.browser.ts +++ b/frontend/packages/sdk/tsup.browser.ts @@ -52,5 +52,5 @@ export default defineConfig({ clean: true, platform: 'browser', noExternal: ['crypto-browserify', 'protobufjs', 'randomBytes'], - metafile: true + metafile: true, }) diff --git a/frontend/packages/sdk/tsup.node.ts b/frontend/packages/sdk/tsup.node.ts index 75e3c29901..2b6650be94 100644 --- a/frontend/packages/sdk/tsup.node.ts +++ b/frontend/packages/sdk/tsup.node.ts @@ -9,5 +9,5 @@ export default defineConfig({ target: 'node16', clean: true, noExternal: ['protobufjs'], - metafile: true + metafile: true, }) From 36092394ce958982586dc4c828d9759c9201176b Mon Sep 17 00:00:00 2001 From: Leechael Yim Date: Fri, 20 Oct 2023 07:55:05 +0800 Subject: [PATCH 6/9] imp(jssdk): reduce the bundle size by deconstruct crypto-browserify --- frontend/packages/sdk/package.json | 7 +- frontend/packages/sdk/src/global.d.ts | 8 +- .../packages/sdk/src/utils/aes-256-gcm.ts | 2 +- frontend/packages/sdk/src/utils/hex.ts | 2 +- frontend/packages/sdk/tsup.browser.ts | 36 +--- frontend/packages/sdk/yarn.lock | 197 +----------------- 6 files changed, 22 insertions(+), 230 deletions(-) diff --git a/frontend/packages/sdk/package.json b/frontend/packages/sdk/package.json index a2a0c1dd97..71e14a3d41 100644 --- a/frontend/packages/sdk/package.json +++ b/frontend/packages/sdk/package.json @@ -52,11 +52,12 @@ "@polkadot/types-augment": "^10.9.1", "@polkadot/util": "^12.3.2", "@polkadot/util-crypto": "^12.3.2", + "browserify-cipher": "^1.0.1", "cross-fetch": "^4.0.0", - "crypto-browserify": "^3.12.0", "protobufjs": "^7.2.4", - "viem": "^1.5.0", - "rxjs": "^7.8.1" + "randombytes": "^2.1.0", + "rxjs": "^7.8.1", + "viem": "^1.5.0" }, "devDependencies": { "@esbuild-plugins/node-globals-polyfill": "^0.2.3", diff --git a/frontend/packages/sdk/src/global.d.ts b/frontend/packages/sdk/src/global.d.ts index c6cf475ce6..1daf56ca2e 100644 --- a/frontend/packages/sdk/src/global.d.ts +++ b/frontend/packages/sdk/src/global.d.ts @@ -1,3 +1,7 @@ -declare module 'crypto-browserify' { - export * from 'crypto' +declare module 'browserify-cipher' { + export { createCipheriv, createDecipheriv } from 'crypto' +} + +declare module 'randombytes' { + export { randombytes as default } from 'crypto' } diff --git a/frontend/packages/sdk/src/utils/aes-256-gcm.ts b/frontend/packages/sdk/src/utils/aes-256-gcm.ts index 64bca6b5db..b63c7b1df4 100644 --- a/frontend/packages/sdk/src/utils/aes-256-gcm.ts +++ b/frontend/packages/sdk/src/utils/aes-256-gcm.ts @@ -1,6 +1,6 @@ import { Buffer } from 'buffer' import { hexAddPrefix, hexStripPrefix, hexToU8a } from '@polkadot/util' -import { createCipheriv, createDecipheriv } from 'crypto-browserify' +import { createCipheriv, createDecipheriv } from 'browserify-cipher' const ALGO = 'aes-256-gcm' const AUTH_TAG_LENGTH = 32 diff --git a/frontend/packages/sdk/src/utils/hex.ts b/frontend/packages/sdk/src/utils/hex.ts index ccea58d60d..0e175858cd 100644 --- a/frontend/packages/sdk/src/utils/hex.ts +++ b/frontend/packages/sdk/src/utils/hex.ts @@ -1,3 +1,3 @@ -import { randomBytes } from 'crypto-browserify' +import randomBytes from 'randombytes' export const randomHex = (size = 12): string => randomBytes(size).toString('hex') diff --git a/frontend/packages/sdk/tsup.browser.ts b/frontend/packages/sdk/tsup.browser.ts index 1626e6c335..c3f1e153ff 100644 --- a/frontend/packages/sdk/tsup.browser.ts +++ b/frontend/packages/sdk/tsup.browser.ts @@ -1,41 +1,7 @@ import { NodeGlobalsPolyfillPlugin } from '@esbuild-plugins/node-globals-polyfill' import { NodeModulesPolyfillPlugin } from '@esbuild-plugins/node-modules-polyfill' -// import nodePolyfills from 'rollup-plugin-node-polyfills'; -import { Loader, Plugin } from 'esbuild' import { defineConfig } from 'tsup' -const ReplaceModulesPlugin = ( - modules: { - name: string - contents: string - loader?: Loader - }[] -): Plugin => { - return { - name: 'replaceModules', - setup(build) { - modules.forEach((moduleItem) => { - const { name, contents, loader = 'js' } = moduleItem - const filter = new RegExp(`^${name}\\/?(.+)?`) - - build.onResolve({ filter }, (args) => { - return { - path: args.path, - namespace: name, - } - }) - - build.onLoad({ filter, namespace: name }, () => { - return { - contents, - loader, - } - }) - }) - }, - } -} - export default defineConfig({ esbuildPlugins: [ NodeModulesPolyfillPlugin(), @@ -51,6 +17,6 @@ export default defineConfig({ target: 'node16', clean: true, platform: 'browser', - noExternal: ['crypto-browserify', 'protobufjs', 'randomBytes'], + noExternal: ['randombytes', 'browserify-cipher', 'protobufjs'], metafile: true, }) diff --git a/frontend/packages/sdk/yarn.lock b/frontend/packages/sdk/yarn.lock index eedde4cb23..9b1549fdf2 100644 --- a/frontend/packages/sdk/yarn.lock +++ b/frontend/packages/sdk/yarn.lock @@ -1519,16 +1519,6 @@ arraybuffer.prototype.slice@^1.0.2: is-array-buffer "^3.0.2" is-shared-array-buffer "^1.0.2" -asn1.js@^5.2.0: - version "5.4.1" - resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-5.4.1.tgz#11a980b84ebb91781ce35b0fdc2ee294e3783f07" - integrity sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA== - dependencies: - bn.js "^4.0.0" - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - safer-buffer "^2.1.0" - assertion-error@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" @@ -1566,12 +1556,7 @@ bluebird@^3.7.2: resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== -bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.11.9: - version "4.12.0" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" - integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== - -bn.js@^5.0.0, bn.js@^5.1.1, bn.js@^5.2.1: +bn.js@^5.2.1: version "5.2.1" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== @@ -1605,12 +1590,7 @@ braces@^3.0.2, braces@~3.0.2: dependencies: fill-range "^7.0.1" -brorand@^1.0.1, brorand@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" - integrity sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w== - -browserify-aes@^1.0.0, browserify-aes@^1.0.4: +browserify-aes@^1.0.4: version "1.2.0" resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== @@ -1622,7 +1602,7 @@ browserify-aes@^1.0.0, browserify-aes@^1.0.4: inherits "^2.0.1" safe-buffer "^5.0.1" -browserify-cipher@^1.0.0: +browserify-cipher@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.1.tgz#8d6474c1b870bfdabcd3bcfcc1934a10e94f15f0" integrity sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w== @@ -1641,29 +1621,6 @@ browserify-des@^1.0.0: inherits "^2.0.1" safe-buffer "^5.1.2" -browserify-rsa@^4.0.0, browserify-rsa@^4.0.1: - version "4.1.0" - resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.1.0.tgz#b2fd06b5b75ae297f7ce2dc651f918f5be158c8d" - integrity sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog== - dependencies: - bn.js "^5.0.0" - randombytes "^2.0.1" - -browserify-sign@^4.0.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.2.1.tgz#eaf4add46dd54be3bb3b36c0cf15abbeba7956c3" - integrity sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg== - dependencies: - bn.js "^5.1.1" - browserify-rsa "^4.0.1" - create-hash "^1.2.0" - create-hmac "^1.1.7" - elliptic "^6.5.3" - inherits "^2.0.4" - parse-asn1 "^5.1.5" - readable-stream "^3.6.0" - safe-buffer "^5.2.0" - buffer-xor@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" @@ -1749,7 +1706,7 @@ chokidar@^3.5.1: optionalDependencies: fsevents "~2.3.2" -cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: +cipher-base@^1.0.0, cipher-base@^1.0.1: version "1.0.4" resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== @@ -1808,15 +1765,7 @@ convert-source-map@^1.6.0: resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.9.0.tgz#7faae62353fb4213366d0ca98358d22e8368b05f" integrity sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A== -create-ecdh@^4.0.0: - version "4.0.4" - resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.4.tgz#d6e7f4bffa66736085a0762fd3a632684dabcc4e" - integrity sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A== - dependencies: - bn.js "^4.1.0" - elliptic "^6.5.3" - -create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: +create-hash@^1.1.0: version "1.2.0" resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== @@ -1827,18 +1776,6 @@ create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: ripemd160 "^2.0.1" sha.js "^2.4.0" -create-hmac@^1.1.0, create-hmac@^1.1.4, create-hmac@^1.1.7: - version "1.1.7" - resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" - integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== - dependencies: - cipher-base "^1.0.3" - create-hash "^1.1.0" - inherits "^2.0.1" - ripemd160 "^2.0.0" - safe-buffer "^5.0.1" - sha.js "^2.4.8" - create-require@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" @@ -1860,23 +1797,6 @@ cross-spawn@^7.0.2, cross-spawn@^7.0.3: shebang-command "^2.0.0" which "^2.0.1" -crypto-browserify@^3.12.0: - version "3.12.0" - resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" - integrity sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg== - dependencies: - browserify-cipher "^1.0.0" - browserify-sign "^4.0.0" - create-ecdh "^4.0.0" - create-hash "^1.1.0" - create-hmac "^1.1.0" - diffie-hellman "^5.0.0" - inherits "^2.0.1" - pbkdf2 "^3.0.3" - public-encrypt "^4.0.0" - randombytes "^2.0.0" - randomfill "^1.0.3" - data-uri-to-buffer@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz#d8feb2b2881e6a4f58c2e08acfd0e2834e26222e" @@ -1974,15 +1894,6 @@ diff@^4.0.1: resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== -diffie-hellman@^5.0.0: - version "5.0.3" - resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" - integrity sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg== - dependencies: - bn.js "^4.1.0" - miller-rabin "^4.0.0" - randombytes "^2.0.0" - dir-glob@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" @@ -2004,19 +1915,6 @@ doctrine@^3.0.0: dependencies: esutils "^2.0.2" -elliptic@^6.5.3: - version "6.5.4" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" - integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== - dependencies: - bn.js "^4.11.9" - brorand "^1.1.0" - hash.js "^1.0.0" - hmac-drbg "^1.0.1" - inherits "^2.0.4" - minimalistic-assert "^1.0.1" - minimalistic-crypto-utils "^1.0.1" - emoji-regex@^8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" @@ -2779,23 +2677,6 @@ hash-base@^3.0.0: readable-stream "^3.6.0" safe-buffer "^5.2.0" -hash.js@^1.0.0, hash.js@^1.0.3: - version "1.1.7" - resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" - integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== - dependencies: - inherits "^2.0.3" - minimalistic-assert "^1.0.1" - -hmac-drbg@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" - integrity sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg== - dependencies: - hash.js "^1.0.3" - minimalistic-assert "^1.0.0" - minimalistic-crypto-utils "^1.0.1" - html-escaper@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" @@ -3382,14 +3263,6 @@ micromatch@^4.0.4: braces "^3.0.2" picomatch "^2.3.1" -miller-rabin@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d" - integrity sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA== - dependencies: - bn.js "^4.0.0" - brorand "^1.0.1" - mimic-fn@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" @@ -3400,16 +3273,11 @@ mimic-fn@^4.0.0: resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-4.0.0.tgz#60a90550d5cb0b239cca65d893b1a53b29871ecc" integrity sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw== -minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: +minimalistic-assert@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== -minimalistic-crypto-utils@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" - integrity sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg== - minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" @@ -3701,17 +3569,6 @@ parent-module@^1.0.0: dependencies: callsites "^3.0.0" -parse-asn1@^5.0.0, parse-asn1@^5.1.5: - version "5.1.6" - resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.6.tgz#385080a3ec13cb62a62d39409cb3e88844cdaed4" - integrity sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw== - dependencies: - asn1.js "^5.2.0" - browserify-aes "^1.0.0" - evp_bytestokey "^1.0.0" - pbkdf2 "^3.0.3" - safe-buffer "^5.1.1" - path-exists@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" @@ -3752,17 +3609,6 @@ pathval@^1.1.1: resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== -pbkdf2@^3.0.3: - version "3.1.2" - resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.1.2.tgz#dd822aa0887580e52f1a039dc3eda108efae3075" - integrity sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA== - dependencies: - create-hash "^1.1.2" - create-hmac "^1.1.4" - ripemd160 "^2.0.1" - safe-buffer "^5.0.1" - sha.js "^2.4.8" - picocolors@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" @@ -3883,18 +3729,6 @@ protobufjs@^7.2.4: "@types/node" ">=13.7.0" long "^5.0.0" -public-encrypt@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.3.tgz#4fcc9d77a07e48ba7527e7cbe0de33d0701331e0" - integrity sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q== - dependencies: - bn.js "^4.1.0" - browserify-rsa "^4.0.0" - create-hash "^1.1.0" - parse-asn1 "^5.0.0" - randombytes "^2.0.1" - safe-buffer "^5.1.2" - punycode@^2.1.0: version "2.3.0" resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.0.tgz#f67fa67c94da8f4d0cfff981aee4118064199b8f" @@ -3905,21 +3739,13 @@ queue-microtask@^1.2.2: resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== -randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5: +randombytes@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== dependencies: safe-buffer "^5.1.0" -randomfill@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/randomfill/-/randomfill-1.0.4.tgz#c92196fc86ab42be983f1bf31778224931d61458" - integrity sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw== - dependencies: - randombytes "^2.0.5" - safe-buffer "^5.1.0" - react-is@^16.13.1: version "16.13.1" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" @@ -4040,7 +3866,7 @@ rimraf@^3.0.0, rimraf@^3.0.2: dependencies: glob "^7.1.3" -ripemd160@^2.0.0, ripemd160@^2.0.1: +ripemd160@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" integrity sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== @@ -4130,11 +3956,6 @@ safe-regex-test@^1.0.0: get-intrinsic "^1.1.3" is-regex "^1.1.4" -safer-buffer@^2.1.0: - version "2.1.2" - resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" - integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== - semver@^6.3.1: version "6.3.1" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" @@ -4156,7 +3977,7 @@ set-function-name@^2.0.0, set-function-name@^2.0.1: functions-have-names "^1.2.3" has-property-descriptors "^1.0.0" -sha.js@^2.4.0, sha.js@^2.4.8: +sha.js@^2.4.0: version "2.4.11" resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== From 91fe3e69831727eb7981838464c04aa826c25f4f Mon Sep 17 00:00:00 2001 From: Leechael Yim Date: Fri, 20 Oct 2023 08:40:16 +0800 Subject: [PATCH 7/9] chore(jssdk): update package.json metadata --- frontend/packages/sdk/package.json | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/frontend/packages/sdk/package.json b/frontend/packages/sdk/package.json index 71e14a3d41..c0f322b387 100644 --- a/frontend/packages/sdk/package.json +++ b/frontend/packages/sdk/package.json @@ -3,14 +3,25 @@ "version": "0.5.3-nightly-20231013", "description": "Phala Phat Contract JS SDK", "license": "Apache-2.0", - "homepage": "https://github.com/Phala-Network/js-sdk/tree/main/packages/sdk#readme", + "author": [ + "Leechael Yim " + ], + "homepage": "https://github.com/Phala-Network/phala-blockchain/tree/master/frontend/packages/sdk#readme", "repository": { "type": "git", - "url": "https://github.com/Phala-Network/js-sdk.git", - "directory": "packages/sdk" + "url": "https://github.com/Phala-Network/phala-blockchain.git", + "directory": "frontend/packages/sdk" + }, + "bugs": { + "url": "https://github.com/Phala-Network/phala-blockchain/issues" }, "main": "dist/node/index", "browser": "dist/browser/index", + "keywords": [ + "phala", + "phala-network", + "phat-contract" + ], "exports": { ".": { "import": { From bb539e13ec45d7798bb9b76f2c932257ed0c795d Mon Sep 17 00:00:00 2001 From: Leechael Yim Date: Fri, 20 Oct 2023 09:11:18 +0800 Subject: [PATCH 8/9] build(jssdk): fix command test:ci & update vitest --- frontend/packages/sdk/package.json | 5 +- frontend/packages/sdk/yarn.lock | 960 +++++++++++------------------ 2 files changed, 375 insertions(+), 590 deletions(-) diff --git a/frontend/packages/sdk/package.json b/frontend/packages/sdk/package.json index c0f322b387..c29a6dfbd6 100644 --- a/frontend/packages/sdk/package.json +++ b/frontend/packages/sdk/package.json @@ -52,10 +52,9 @@ "eslint": "eslint --fix --no-eslintrc --c .eslintrc '*.{js,json,ts}' '{src,tests,benchmarks}/**/*.{ts,tsx}'", "eslint:ci": "eslint --no-eslintrc --c .eslintrc '*.{js,json,ts}' '{src,tests}/**/*.{ts,tsx}'", "test": "vitest --ui --coverage", - "test:ci": "vitest" + "test:ci": "vitest --run" }, "dependencies": { - "@phala/typedefs": "^0.2.33", "@polkadot/api": "^10.9.1", "@polkadot/api-contract": "^10.9.1", "@polkadot/keyring": "^12.3.2", @@ -94,7 +93,7 @@ "ts-node": "^10.9.1", "tsup": "^7.1.0", "typescript": "^5.1.6", - "vitest": "^0.33.0" + "vitest": "^0.34.6" }, "engines": { "node": ">=16" diff --git a/frontend/packages/sdk/yarn.lock b/frontend/packages/sdk/yarn.lock index 9b1549fdf2..edbd55656c 100644 --- a/frontend/packages/sdk/yarn.lock +++ b/frontend/packages/sdk/yarn.lock @@ -57,226 +57,226 @@ escape-string-regexp "^4.0.0" rollup-plugin-node-polyfills "^0.2.1" -"@esbuild/android-arm64@0.17.19": - version "0.17.19" - resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.17.19.tgz#bafb75234a5d3d1b690e7c2956a599345e84a2fd" - integrity sha512-KBMWvEZooR7+kzY0BtbTQn0OAYY7CsiydT63pVEaPtVYF0hXbUaOyZog37DKxK7NF3XacBJOpYT4adIJh+avxA== - "@esbuild/android-arm64@0.18.11": version "0.18.11" resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.18.11.tgz#fa6f0cc7105367cb79cc0a8bf32bf50cb1673e45" integrity sha512-snieiq75Z1z5LJX9cduSAjUr7vEI1OdlzFPMw0HH5YI7qQHDd3qs+WZoMrWYDsfRJSq36lIA6mfZBkvL46KoIw== -"@esbuild/android-arm@0.17.19": - version "0.17.19" - resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.17.19.tgz#5898f7832c2298bc7d0ab53701c57beb74d78b4d" - integrity sha512-rIKddzqhmav7MSmoFCmDIb6e2W57geRsM94gV2l38fzhXMwq7hZoClug9USI2pFRGL06f4IOPHHpFNOkWieR8A== +"@esbuild/android-arm64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz#984b4f9c8d0377443cc2dfcef266d02244593622" + integrity sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ== "@esbuild/android-arm@0.18.11": version "0.18.11" resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.18.11.tgz#ae84a410696c9f549a15be94eaececb860bacacb" integrity sha512-q4qlUf5ucwbUJZXF5tEQ8LF7y0Nk4P58hOsGk3ucY0oCwgQqAnqXVbUuahCddVHfrxmpyewRpiTHwVHIETYu7Q== -"@esbuild/android-x64@0.17.19": - version "0.17.19" - resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.17.19.tgz#658368ef92067866d95fb268719f98f363d13ae1" - integrity sha512-uUTTc4xGNDT7YSArp/zbtmbhO0uEEK9/ETW29Wk1thYUJBz3IVnvgEiEwEa9IeLyvnpKrWK64Utw2bgUmDveww== +"@esbuild/android-arm@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.18.20.tgz#fedb265bc3a589c84cc11f810804f234947c3682" + integrity sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw== "@esbuild/android-x64@0.18.11": version "0.18.11" resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.18.11.tgz#0e58360bbc789ad0d68174d32ba20e678c2a16b6" integrity sha512-iPuoxQEV34+hTF6FT7om+Qwziv1U519lEOvekXO9zaMMlT9+XneAhKL32DW3H7okrCOBQ44BMihE8dclbZtTuw== -"@esbuild/darwin-arm64@0.17.19": - version "0.17.19" - resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.17.19.tgz#584c34c5991b95d4d48d333300b1a4e2ff7be276" - integrity sha512-80wEoCfF/hFKM6WE1FyBHc9SfUblloAWx6FJkFWTWiCoht9Mc0ARGEM47e67W9rI09YoUxJL68WHfDRYEAvOhg== +"@esbuild/android-x64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.18.20.tgz#35cf419c4cfc8babe8893d296cd990e9e9f756f2" + integrity sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg== "@esbuild/darwin-arm64@0.18.11": version "0.18.11" resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.18.11.tgz#fcdcd2ef76ca656540208afdd84f284072f0d1f9" integrity sha512-Gm0QkI3k402OpfMKyQEEMG0RuW2LQsSmI6OeO4El2ojJMoF5NLYb3qMIjvbG/lbMeLOGiW6ooU8xqc+S0fgz2w== -"@esbuild/darwin-x64@0.17.19": - version "0.17.19" - resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.17.19.tgz#7751d236dfe6ce136cce343dce69f52d76b7f6cb" - integrity sha512-IJM4JJsLhRYr9xdtLytPLSH9k/oxR3boaUIYiHkAawtwNOXKE8KoU8tMvryogdcT8AU+Bflmh81Xn6Q0vTZbQw== +"@esbuild/darwin-arm64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz#08172cbeccf95fbc383399a7f39cfbddaeb0d7c1" + integrity sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA== "@esbuild/darwin-x64@0.18.11": version "0.18.11" resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.18.11.tgz#c5ac602ec0504a8ff81e876bc8a9811e94d69d37" integrity sha512-N15Vzy0YNHu6cfyDOjiyfJlRJCB/ngKOAvoBf1qybG3eOq0SL2Lutzz9N7DYUbb7Q23XtHPn6lMDF6uWbGv9Fw== -"@esbuild/freebsd-arm64@0.17.19": - version "0.17.19" - resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.19.tgz#cacd171665dd1d500f45c167d50c6b7e539d5fd2" - integrity sha512-pBwbc7DufluUeGdjSU5Si+P3SoMF5DQ/F/UmTSb8HXO80ZEAJmrykPyzo1IfNbAoaqw48YRpv8shwd1NoI0jcQ== +"@esbuild/darwin-x64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz#d70d5790d8bf475556b67d0f8b7c5bdff053d85d" + integrity sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ== "@esbuild/freebsd-arm64@0.18.11": version "0.18.11" resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.11.tgz#7012fb06ee3e6e0d5560664a65f3fefbcc46db2e" integrity sha512-atEyuq6a3omEY5qAh5jIORWk8MzFnCpSTUruBgeyN9jZq1K/QI9uke0ATi3MHu4L8c59CnIi4+1jDKMuqmR71A== -"@esbuild/freebsd-x64@0.17.19": - version "0.17.19" - resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.17.19.tgz#0769456eee2a08b8d925d7c00b79e861cb3162e4" - integrity sha512-4lu+n8Wk0XlajEhbEffdy2xy53dpR06SlzvhGByyg36qJw6Kpfk7cp45DR/62aPH9mtJRmIyrXAS5UWBrJT6TQ== +"@esbuild/freebsd-arm64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz#98755cd12707f93f210e2494d6a4b51b96977f54" + integrity sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw== "@esbuild/freebsd-x64@0.18.11": version "0.18.11" resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.18.11.tgz#c5de1199f70e1f97d5c8fca51afa9bf9a2af5969" integrity sha512-XtuPrEfBj/YYYnAAB7KcorzzpGTvOr/dTtXPGesRfmflqhA4LMF0Gh/n5+a9JBzPuJ+CGk17CA++Hmr1F/gI0Q== -"@esbuild/linux-arm64@0.17.19": - version "0.17.19" - resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.17.19.tgz#38e162ecb723862c6be1c27d6389f48960b68edb" - integrity sha512-ct1Tg3WGwd3P+oZYqic+YZF4snNl2bsnMKRkb3ozHmnM0dGWuxcPTTntAF6bOP0Sp4x0PjSF+4uHQ1xvxfRKqg== +"@esbuild/freebsd-x64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz#c1eb2bff03915f87c29cece4c1a7fa1f423b066e" + integrity sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ== "@esbuild/linux-arm64@0.18.11": version "0.18.11" resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.18.11.tgz#2a6d3a74e0b8b5f294e22b4515b29f76ebd42660" integrity sha512-c6Vh2WS9VFKxKZ2TvJdA7gdy0n6eSy+yunBvv4aqNCEhSWVor1TU43wNRp2YLO9Vng2G+W94aRz+ILDSwAiYog== -"@esbuild/linux-arm@0.17.19": - version "0.17.19" - resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.17.19.tgz#1a2cd399c50040184a805174a6d89097d9d1559a" - integrity sha512-cdmT3KxjlOQ/gZ2cjfrQOtmhG4HJs6hhvm3mWSRDPtZ/lP5oe8FWceS10JaSJC13GBd4eH/haHnqf7hhGNLerA== +"@esbuild/linux-arm64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz#bad4238bd8f4fc25b5a021280c770ab5fc3a02a0" + integrity sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA== "@esbuild/linux-arm@0.18.11": version "0.18.11" resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.18.11.tgz#5175bd61b793b436e4aece6328aa0d9be07751e1" integrity sha512-Idipz+Taso/toi2ETugShXjQ3S59b6m62KmLHkJlSq/cBejixmIydqrtM2XTvNCywFl3VC7SreSf6NV0i6sRyg== -"@esbuild/linux-ia32@0.17.19": - version "0.17.19" - resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.17.19.tgz#e28c25266b036ce1cabca3c30155222841dc035a" - integrity sha512-w4IRhSy1VbsNxHRQpeGCHEmibqdTUx61Vc38APcsRbuVgK0OPEnQ0YD39Brymn96mOx48Y2laBQGqgZ0j9w6SQ== +"@esbuild/linux-arm@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz#3e617c61f33508a27150ee417543c8ab5acc73b0" + integrity sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg== "@esbuild/linux-ia32@0.18.11": version "0.18.11" resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.18.11.tgz#20ee6cfd65a398875f321a485e7b2278e5f6f67b" integrity sha512-S3hkIF6KUqRh9n1Q0dSyYcWmcVa9Cg+mSoZEfFuzoYXXsk6196qndrM+ZiHNwpZKi3XOXpShZZ+9dfN5ykqjjw== -"@esbuild/linux-loong64@0.17.19": - version "0.17.19" - resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.17.19.tgz#0f887b8bb3f90658d1a0117283e55dbd4c9dcf72" - integrity sha512-2iAngUbBPMq439a+z//gE+9WBldoMp1s5GWsUSgqHLzLJ9WoZLZhpwWuym0u0u/4XmZ3gpHmzV84PonE+9IIdQ== +"@esbuild/linux-ia32@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz#699391cccba9aee6019b7f9892eb99219f1570a7" + integrity sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA== "@esbuild/linux-loong64@0.18.11": version "0.18.11" resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.18.11.tgz#8e7b251dede75083bf44508dab5edce3f49d052b" integrity sha512-MRESANOoObQINBA+RMZW+Z0TJWpibtE7cPFnahzyQHDCA9X9LOmGh68MVimZlM9J8n5Ia8lU773te6O3ILW8kw== -"@esbuild/linux-mips64el@0.17.19": - version "0.17.19" - resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.17.19.tgz#f5d2a0b8047ea9a5d9f592a178ea054053a70289" - integrity sha512-LKJltc4LVdMKHsrFe4MGNPp0hqDFA1Wpt3jE1gEyM3nKUvOiO//9PheZZHfYRfYl6AwdTH4aTcXSqBerX0ml4A== +"@esbuild/linux-loong64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz#e6fccb7aac178dd2ffb9860465ac89d7f23b977d" + integrity sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg== "@esbuild/linux-mips64el@0.18.11": version "0.18.11" resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.18.11.tgz#a3125eb48538ac4932a9d05089b157f94e443165" integrity sha512-qVyPIZrXNMOLYegtD1u8EBccCrBVshxMrn5MkuFc3mEVsw7CCQHaqZ4jm9hbn4gWY95XFnb7i4SsT3eflxZsUg== -"@esbuild/linux-ppc64@0.17.19": - version "0.17.19" - resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.17.19.tgz#876590e3acbd9fa7f57a2c7d86f83717dbbac8c7" - integrity sha512-/c/DGybs95WXNS8y3Ti/ytqETiW7EU44MEKuCAcpPto3YjQbyK3IQVKfF6nbghD7EcLUGl0NbiL5Rt5DMhn5tg== +"@esbuild/linux-mips64el@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz#eeff3a937de9c2310de30622a957ad1bd9183231" + integrity sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ== "@esbuild/linux-ppc64@0.18.11": version "0.18.11" resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.18.11.tgz#842abadb7a0995bd539adee2be4d681b68279499" integrity sha512-T3yd8vJXfPirZaUOoA9D2ZjxZX4Gr3QuC3GztBJA6PklLotc/7sXTOuuRkhE9W/5JvJP/K9b99ayPNAD+R+4qQ== -"@esbuild/linux-riscv64@0.17.19": - version "0.17.19" - resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.17.19.tgz#7f49373df463cd9f41dc34f9b2262d771688bf09" - integrity sha512-FC3nUAWhvFoutlhAkgHf8f5HwFWUL6bYdvLc/TTuxKlvLi3+pPzdZiFKSWz/PF30TB1K19SuCxDTI5KcqASJqA== +"@esbuild/linux-ppc64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz#2f7156bde20b01527993e6881435ad79ba9599fb" + integrity sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA== "@esbuild/linux-riscv64@0.18.11": version "0.18.11" resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.18.11.tgz#7ce6e6cee1c72d5b4d2f4f8b6fcccf4a9bea0e28" integrity sha512-evUoRPWiwuFk++snjH9e2cAjF5VVSTj+Dnf+rkO/Q20tRqv+644279TZlPK8nUGunjPAtQRCj1jQkDAvL6rm2w== -"@esbuild/linux-s390x@0.17.19": - version "0.17.19" - resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.17.19.tgz#e2afd1afcaf63afe2c7d9ceacd28ec57c77f8829" - integrity sha512-IbFsFbxMWLuKEbH+7sTkKzL6NJmG2vRyy6K7JJo55w+8xDk7RElYn6xvXtDW8HCfoKBFK69f3pgBJSUSQPr+4Q== +"@esbuild/linux-riscv64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz#6628389f210123d8b4743045af8caa7d4ddfc7a6" + integrity sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A== "@esbuild/linux-s390x@0.18.11": version "0.18.11" resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.18.11.tgz#98fbc794363d02ded07d300df2e535650b297b96" integrity sha512-/SlRJ15XR6i93gRWquRxYCfhTeC5PdqEapKoLbX63PLCmAkXZHY2uQm2l9bN0oPHBsOw2IswRZctMYS0MijFcg== -"@esbuild/linux-x64@0.17.19": - version "0.17.19" - resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.17.19.tgz#8a0e9738b1635f0c53389e515ae83826dec22aa4" - integrity sha512-68ngA9lg2H6zkZcyp22tsVt38mlhWde8l3eJLWkyLrp4HwMUr3c1s/M2t7+kHIhvMjglIBrFpncX1SzMckomGw== +"@esbuild/linux-s390x@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz#255e81fb289b101026131858ab99fba63dcf0071" + integrity sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ== "@esbuild/linux-x64@0.18.11": version "0.18.11" resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.18.11.tgz#f8458ec8cf74c8274e4cacd00744d8446cac52eb" integrity sha512-xcncej+wF16WEmIwPtCHi0qmx1FweBqgsRtEL1mSHLFR6/mb3GEZfLQnx+pUDfRDEM4DQF8dpXIW7eDOZl1IbA== -"@esbuild/netbsd-x64@0.17.19": - version "0.17.19" - resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.17.19.tgz#c29fb2453c6b7ddef9a35e2c18b37bda1ae5c462" - integrity sha512-CwFq42rXCR8TYIjIfpXCbRX0rp1jo6cPIUPSaWwzbVI4aOfX96OXY8M6KNmtPcg7QjYeDmN+DD0Wp3LaBOLf4Q== +"@esbuild/linux-x64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz#c7690b3417af318a9b6f96df3031a8865176d338" + integrity sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w== "@esbuild/netbsd-x64@0.18.11": version "0.18.11" resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.18.11.tgz#a7b2f991b8293748a7be42eac1c4325faf0c7cca" integrity sha512-aSjMHj/F7BuS1CptSXNg6S3M4F3bLp5wfFPIJM+Km2NfIVfFKhdmfHF9frhiCLIGVzDziggqWll0B+9AUbud/Q== -"@esbuild/openbsd-x64@0.17.19": - version "0.17.19" - resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.17.19.tgz#95e75a391403cb10297280d524d66ce04c920691" - integrity sha512-cnq5brJYrSZ2CF6c35eCmviIN3k3RczmHz8eYaVlNasVqsNY+JKohZU5MKmaOI+KkllCdzOKKdPs762VCPC20g== +"@esbuild/netbsd-x64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz#30e8cd8a3dded63975e2df2438ca109601ebe0d1" + integrity sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A== "@esbuild/openbsd-x64@0.18.11": version "0.18.11" resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.18.11.tgz#3e50923de84c54008f834221130fd23646072b2f" integrity sha512-tNBq+6XIBZtht0xJGv7IBB5XaSyvYPCm1PxJ33zLQONdZoLVM0bgGqUrXnJyiEguD9LU4AHiu+GCXy/Hm9LsdQ== -"@esbuild/sunos-x64@0.17.19": - version "0.17.19" - resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.17.19.tgz#722eaf057b83c2575937d3ffe5aeb16540da7273" - integrity sha512-vCRT7yP3zX+bKWFeP/zdS6SqdWB8OIpaRq/mbXQxTGHnIxspRtigpkUcDMlSCOejlHowLqII7K2JKevwyRP2rg== +"@esbuild/openbsd-x64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz#7812af31b205055874c8082ea9cf9ab0da6217ae" + integrity sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg== "@esbuild/sunos-x64@0.18.11": version "0.18.11" resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.18.11.tgz#ae47a550b0cd395de03606ecfba03cc96c7c19e2" integrity sha512-kxfbDOrH4dHuAAOhr7D7EqaYf+W45LsAOOhAet99EyuxxQmjbk8M9N4ezHcEiCYPaiW8Dj3K26Z2V17Gt6p3ng== -"@esbuild/win32-arm64@0.17.19": - version "0.17.19" - resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.17.19.tgz#9aa9dc074399288bdcdd283443e9aeb6b9552b6f" - integrity sha512-yYx+8jwowUstVdorcMdNlzklLYhPxjniHWFKgRqH7IFlUEa0Umu3KuYplf1HUZZ422e3NU9F4LGb+4O0Kdcaag== +"@esbuild/sunos-x64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz#d5c275c3b4e73c9b0ecd38d1ca62c020f887ab9d" + integrity sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ== "@esbuild/win32-arm64@0.18.11": version "0.18.11" resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.18.11.tgz#05d364582b7862d7fbf4698ef43644f7346dcfcc" integrity sha512-Sh0dDRyk1Xi348idbal7lZyfSkjhJsdFeuC13zqdipsvMetlGiFQNdO+Yfp6f6B4FbyQm7qsk16yaZk25LChzg== -"@esbuild/win32-ia32@0.17.19": - version "0.17.19" - resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.17.19.tgz#95ad43c62ad62485e210f6299c7b2571e48d2b03" - integrity sha512-eggDKanJszUtCdlVs0RB+h35wNlb5v4TWEkq4vZcmVt5u/HiDZrTXe2bWFQUez3RgNHwx/x4sk5++4NSSicKkw== +"@esbuild/win32-arm64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz#73bc7f5a9f8a77805f357fab97f290d0e4820ac9" + integrity sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg== "@esbuild/win32-ia32@0.18.11": version "0.18.11" resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.18.11.tgz#a3372095a4a1939da672156a3c104f8ce85ee616" integrity sha512-o9JUIKF1j0rqJTFbIoF4bXj6rvrTZYOrfRcGyL0Vm5uJ/j5CkBD/51tpdxe9lXEDouhRgdr/BYzUrDOvrWwJpg== -"@esbuild/win32-x64@0.17.19": - version "0.17.19" - resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.17.19.tgz#8cfaf2ff603e9aabb910e9c0558c26cf32744061" - integrity sha512-lAhycmKnVOuRYNtRtatQR1LPQf2oYCkRGkSFnseDAKPl8lu5SOsK/e1sXe5a0Pc5kHIHe6P2I/ilntNv2xf3cA== +"@esbuild/win32-ia32@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz#ec93cbf0ef1085cc12e71e0d661d20569ff42102" + integrity sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g== "@esbuild/win32-x64@0.18.11": version "0.18.11" resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.18.11.tgz#6526c7e1b40d5b9f0a222c6b767c22f6fb97aa57" integrity sha512-rQI4cjLHd2hGsM1LqgDI7oOCYbQ6IBOVsX9ejuRMSze0GqXUG2ekwiKkiBU1pRGSeCqFFHxTrcEydB2Hyoz9CA== +"@esbuild/win32-x64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz#786c5f41f043b07afb1af37683d7c33668858f6d" + integrity sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ== + "@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0": version "4.4.0" resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59" @@ -404,13 +404,6 @@ dependencies: "@noble/hashes" "1.3.0" -"@noble/curves@1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.1.0.tgz#f13fc667c89184bc04cccb9b11e8e7bae27d8c3d" - integrity sha512-091oBExgENk/kGj3AZmtBDMpxQPDtxQABR2B9lb1JbVTs6ytdzZNwvhxQ4MWasRNEzlbEH8jCWFCwhF/Obj5AA== - dependencies: - "@noble/hashes" "1.3.1" - "@noble/curves@^1.2.0": version "1.2.0" resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.2.0.tgz#92d7e12e4e49b23105a2555c6984d41733d65c35" @@ -423,16 +416,16 @@ resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.0.tgz#085fd70f6d7d9d109671090ccae1d3bec62554a1" integrity sha512-ilHEACi9DwqJB0pw7kv+Apvh50jiiSyR/cQ3y4W7lOR5mhvn/50FLUfsnfJz0BDZtl/RR16kXvptiv6q1msYZg== -"@noble/hashes@1.3.1", "@noble/hashes@~1.3.0": - version "1.3.1" - resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.1.tgz#8831ef002114670c603c458ab8b11328406953a9" - integrity sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA== - "@noble/hashes@1.3.2", "@noble/hashes@^1.3.2": version "1.3.2" resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.2.tgz#6f26dbc8fbc7205873ce3cee2f690eba0d421b39" integrity sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ== +"@noble/hashes@~1.3.0": + version "1.3.1" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.1.tgz#8831ef002114670c603c458ab8b11328406953a9" + integrity sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA== + "@nodelib/fs.scandir@2.1.5": version "2.1.5" resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" @@ -454,11 +447,6 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@phala/typedefs@^0.2.33": - version "0.2.33" - resolved "https://registry.yarnpkg.com/@phala/typedefs/-/typedefs-0.2.33.tgz#6f18d73b5104db6a594d08be571954385b3e509b" - integrity sha512-CaRzIGfU6CUIKLPswYtOw/xbtTttqmJZpr3fhkxLvkBQMXIH14iISD763OFXtWui7DrAMBKo/bHawvFNgWGKTg== - "@pkgr/utils@^2.3.1": version "2.4.2" resolved "https://registry.yarnpkg.com/@pkgr/utils/-/utils-2.4.2.tgz#9e638bbe9a6a6f165580dc943f138fd3309a2cbc" @@ -476,94 +464,85 @@ resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.23.tgz#498e41218ab3b6a1419c735e5c6ae2c5ed609b6c" integrity sha512-C16M+IYz0rgRhWZdCmK+h58JMv8vijAA61gmz2rspCSwKwzBebpdcsiUmwrtJRdphuY30i6BSLEOP8ppbNLyLg== -"@polkadot/api-augment@10.9.1": - version "10.9.1" - resolved "https://registry.yarnpkg.com/@polkadot/api-augment/-/api-augment-10.9.1.tgz#9fc81b81903229bb23b0b16783e97ec52a5d4f1b" - integrity sha512-kRZZvCFVcN4hAH4dJ+Qzfdy27/4EEq3oLDf3ihj0LTVrAezSWcKPGE3EVFy+Mn6Lo4SUc7RVyoKvIUhSk2l4Dg== - dependencies: - "@polkadot/api-base" "10.9.1" - "@polkadot/rpc-augment" "10.9.1" - "@polkadot/types" "10.9.1" - "@polkadot/types-augment" "10.9.1" - "@polkadot/types-codec" "10.9.1" - "@polkadot/util" "^12.3.1" - tslib "^2.5.3" - -"@polkadot/api-base@10.9.1": - version "10.9.1" - resolved "https://registry.yarnpkg.com/@polkadot/api-base/-/api-base-10.9.1.tgz#27f63c4950814c2f10535f794121fa1384dc2207" - integrity sha512-Q3m2KzlceMK2kX8bhnUZWk3RT6emmijeeFZZQgCePpEcrSeNjnqG4qjuTPgkveaOkUT8MAoDc5Avuzcc2jlW9g== +"@polkadot/api-augment@10.10.1": + version "10.10.1" + resolved "https://registry.yarnpkg.com/@polkadot/api-augment/-/api-augment-10.10.1.tgz#d3d296c923b0ff915c8d4f163e9b3bad70b89b9b" + integrity sha512-J0r1DT1M5y75iO1iwcpUBokKD3q6b22kWlPfiHEDNFydVw5vm7OTRBk9Njjl8rOnlSzcW/Ya8qWfV/wkrqHxUQ== + dependencies: + "@polkadot/api-base" "10.10.1" + "@polkadot/rpc-augment" "10.10.1" + "@polkadot/types" "10.10.1" + "@polkadot/types-augment" "10.10.1" + "@polkadot/types-codec" "10.10.1" + "@polkadot/util" "^12.5.1" + tslib "^2.6.2" + +"@polkadot/api-base@10.10.1": + version "10.10.1" + resolved "https://registry.yarnpkg.com/@polkadot/api-base/-/api-base-10.10.1.tgz#2d02f96960cbdd9d0ab61fe016587585902d1ee8" + integrity sha512-joH2Ywxnn+AStkw+JWAdF3i3WJy4NcBYp0SWJM/WqGafWR/FuHnati2pcj/MHzkHT8JkBippmSSJFvsqRhlwcQ== dependencies: - "@polkadot/rpc-core" "10.9.1" - "@polkadot/types" "10.9.1" - "@polkadot/util" "^12.3.1" + "@polkadot/rpc-core" "10.10.1" + "@polkadot/types" "10.10.1" + "@polkadot/util" "^12.5.1" rxjs "^7.8.1" - tslib "^2.5.3" + tslib "^2.6.2" "@polkadot/api-contract@^10.9.1": - version "10.9.1" - resolved "https://registry.yarnpkg.com/@polkadot/api-contract/-/api-contract-10.9.1.tgz#6820836df2d0efa10d08d58fd85e3513a5d4c537" - integrity sha512-BJjFYSFtsUlClC3mgvPNQ5h/7LZd5gVfexwl+mDgLd/6SN4dUBQjIXhlIL5a1cGYjq3EROuu7t0agG2DIaiZMQ== - dependencies: - "@polkadot/api" "10.9.1" - "@polkadot/api-augment" "10.9.1" - "@polkadot/types" "10.9.1" - "@polkadot/types-codec" "10.9.1" - "@polkadot/types-create" "10.9.1" - "@polkadot/util" "^12.3.1" - "@polkadot/util-crypto" "^12.3.1" + version "10.10.1" + resolved "https://registry.yarnpkg.com/@polkadot/api-contract/-/api-contract-10.10.1.tgz#a8f559eb3540e109270e5d053a05533b3e2c9499" + integrity sha512-3BexkvrAb5cRnOlvvnZLyfmTP1FPFs4qICxF1gBvFXBnWrPGIFzJvbd+SWnR2QCJPCEKugIGR/zAJByT9Cum8g== + dependencies: + "@polkadot/api" "10.10.1" + "@polkadot/api-augment" "10.10.1" + "@polkadot/types" "10.10.1" + "@polkadot/types-codec" "10.10.1" + "@polkadot/types-create" "10.10.1" + "@polkadot/util" "^12.5.1" + "@polkadot/util-crypto" "^12.5.1" rxjs "^7.8.1" - tslib "^2.5.3" + tslib "^2.6.2" -"@polkadot/api-derive@10.9.1": - version "10.9.1" - resolved "https://registry.yarnpkg.com/@polkadot/api-derive/-/api-derive-10.9.1.tgz#04a4ca3285fd215c4cd50cfb3f4791d38dd90050" - integrity sha512-mRud1UZCFIc4Z63qAoGSIHh/foyUYADfy1RQYCmPpeFKfIdCIrHpd7xFdJXTOMYOS0BwlM6u4qli/ZT4XigezQ== - dependencies: - "@polkadot/api" "10.9.1" - "@polkadot/api-augment" "10.9.1" - "@polkadot/api-base" "10.9.1" - "@polkadot/rpc-core" "10.9.1" - "@polkadot/types" "10.9.1" - "@polkadot/types-codec" "10.9.1" - "@polkadot/util" "^12.3.1" - "@polkadot/util-crypto" "^12.3.1" +"@polkadot/api-derive@10.10.1": + version "10.10.1" + resolved "https://registry.yarnpkg.com/@polkadot/api-derive/-/api-derive-10.10.1.tgz#555d755c393f57c8855b9fc28062148a3723e333" + integrity sha512-Q9Ibs4eRPqdV8qnRzFPD3dlWNbLHxRqMqNTNPmNQwKPo5m6fcQbZ0UZy3yJ+PI9S4AQHGhsWtfoi5qW8006GHQ== + dependencies: + "@polkadot/api" "10.10.1" + "@polkadot/api-augment" "10.10.1" + "@polkadot/api-base" "10.10.1" + "@polkadot/rpc-core" "10.10.1" + "@polkadot/types" "10.10.1" + "@polkadot/types-codec" "10.10.1" + "@polkadot/util" "^12.5.1" + "@polkadot/util-crypto" "^12.5.1" rxjs "^7.8.1" - tslib "^2.5.3" + tslib "^2.6.2" -"@polkadot/api@10.9.1", "@polkadot/api@^10.9.1": - version "10.9.1" - resolved "https://registry.yarnpkg.com/@polkadot/api/-/api-10.9.1.tgz#156b3436f45ef18218960804988c1f552d2c4e46" - integrity sha512-ND/2UqZBWvtt4PfV03OStTKg0mxmPk4UpMAgJKutdgsz/wP9CYJ1KbjwFgPNekL9JnzbKQsWyQNPVrcw7kQk8A== - dependencies: - "@polkadot/api-augment" "10.9.1" - "@polkadot/api-base" "10.9.1" - "@polkadot/api-derive" "10.9.1" - "@polkadot/keyring" "^12.3.1" - "@polkadot/rpc-augment" "10.9.1" - "@polkadot/rpc-core" "10.9.1" - "@polkadot/rpc-provider" "10.9.1" - "@polkadot/types" "10.9.1" - "@polkadot/types-augment" "10.9.1" - "@polkadot/types-codec" "10.9.1" - "@polkadot/types-create" "10.9.1" - "@polkadot/types-known" "10.9.1" - "@polkadot/util" "^12.3.1" - "@polkadot/util-crypto" "^12.3.1" +"@polkadot/api@10.10.1", "@polkadot/api@^10.9.1": + version "10.10.1" + resolved "https://registry.yarnpkg.com/@polkadot/api/-/api-10.10.1.tgz#06fcbdcc8e17d2312d4b4093733d506f15ff62ad" + integrity sha512-YHVkmNvjGF4Eg3thAbVhj9UX3SXx+Yxk6yVuzsEcckEudIRHzL2ikIWGCfUprfzSeFNpUCKdJIi1tsxVHtA7Tg== + dependencies: + "@polkadot/api-augment" "10.10.1" + "@polkadot/api-base" "10.10.1" + "@polkadot/api-derive" "10.10.1" + "@polkadot/keyring" "^12.5.1" + "@polkadot/rpc-augment" "10.10.1" + "@polkadot/rpc-core" "10.10.1" + "@polkadot/rpc-provider" "10.10.1" + "@polkadot/types" "10.10.1" + "@polkadot/types-augment" "10.10.1" + "@polkadot/types-codec" "10.10.1" + "@polkadot/types-create" "10.10.1" + "@polkadot/types-known" "10.10.1" + "@polkadot/util" "^12.5.1" + "@polkadot/util-crypto" "^12.5.1" eventemitter3 "^5.0.1" rxjs "^7.8.1" - tslib "^2.5.3" - -"@polkadot/keyring@^12.3.1", "@polkadot/keyring@^12.3.2": - version "12.3.2" - resolved "https://registry.yarnpkg.com/@polkadot/keyring/-/keyring-12.3.2.tgz#112a0c28816a1f47edad6260dc94222c29465a54" - integrity sha512-NTdtDeI0DP9l/45hXynNABeP5VB8piw5YR+CbUxK2e36xpJWVXwbcOepzslg5ghE9rs8UKJb30Z/HqTU4sBY0Q== - dependencies: - "@polkadot/util" "12.3.2" - "@polkadot/util-crypto" "12.3.2" - tslib "^2.5.3" + tslib "^2.6.2" -"@polkadot/keyring@^12.5.1": +"@polkadot/keyring@^12.3.2", "@polkadot/keyring@^12.5.1": version "12.5.1" resolved "https://registry.yarnpkg.com/@polkadot/keyring/-/keyring-12.5.1.tgz#2f38504aa915f54bbd265f3793a6be55010eb1f5" integrity sha512-u6b+Q7wI6WY/vwmJS9uUHy/5hKZ226nTlVNmxjkj9GvrRsQvUSwS94163yHPJwiZJiIv5xK5m0rwCMyoYu+wjA== @@ -572,16 +551,7 @@ "@polkadot/util-crypto" "12.5.1" tslib "^2.6.2" -"@polkadot/networks@12.3.2", "@polkadot/networks@^12.3.1": - version "12.3.2" - resolved "https://registry.yarnpkg.com/@polkadot/networks/-/networks-12.3.2.tgz#131b0439c481add159814dd2cf0286c6c3fe5b3b" - integrity sha512-uCkyybKoeEm1daKr0uT/9oNDHDDzCy2/ZdVl346hQqfdR1Ct3BaxMjxqvdmb5N8aCw0cBWSfgsxAYtw8ESmllQ== - dependencies: - "@polkadot/util" "12.3.2" - "@substrate/ss58-registry" "^1.40.0" - tslib "^2.5.3" - -"@polkadot/networks@12.5.1": +"@polkadot/networks@12.5.1", "@polkadot/networks@^12.5.1": version "12.5.1" resolved "https://registry.yarnpkg.com/@polkadot/networks/-/networks-12.5.1.tgz#685c69d24d78a64f4e750609af22678d57fe1192" integrity sha512-PP6UUdzz6iHHZH4q96cUEhTcydHj16+61sqeaYEJSF6Q9iY+5WVWQ26+rdjmre/EBdrMQkSS/CKy73mO5z/JkQ== @@ -590,48 +560,48 @@ "@substrate/ss58-registry" "^1.43.0" tslib "^2.6.2" -"@polkadot/rpc-augment@10.9.1": - version "10.9.1" - resolved "https://registry.yarnpkg.com/@polkadot/rpc-augment/-/rpc-augment-10.9.1.tgz#214ec3ee145d20caa61ea204041a3aadb89c6b0f" - integrity sha512-MaLHkNlyqN20ZRYr6uNd1BZr1OsrnX9qLAmsl0mcrri1vPGRH6VHjfFH1RBLkikpWD82v17g0l2hLwdV1ZHMcw== +"@polkadot/rpc-augment@10.10.1": + version "10.10.1" + resolved "https://registry.yarnpkg.com/@polkadot/rpc-augment/-/rpc-augment-10.10.1.tgz#c25ec45687631ea649e2d5c7f7f9b0813ac4ca9f" + integrity sha512-PcvsX8DNV8BNDXXnY2K8F4mE7cWz7fKg8ykXNZTN8XUN6MrI4k/ohv7itYic7X5LaP25ZmQt5UiGyjKDGIELow== dependencies: - "@polkadot/rpc-core" "10.9.1" - "@polkadot/types" "10.9.1" - "@polkadot/types-codec" "10.9.1" - "@polkadot/util" "^12.3.1" - tslib "^2.5.3" + "@polkadot/rpc-core" "10.10.1" + "@polkadot/types" "10.10.1" + "@polkadot/types-codec" "10.10.1" + "@polkadot/util" "^12.5.1" + tslib "^2.6.2" -"@polkadot/rpc-core@10.9.1": - version "10.9.1" - resolved "https://registry.yarnpkg.com/@polkadot/rpc-core/-/rpc-core-10.9.1.tgz#798c514dbed6f6c2e43098a494c9f51fb144dc31" - integrity sha512-ZtA8B8SfXSAwVkBlCcKRHw0eSM7ec/sbiNOM5GasXPeRujUgT7lOwSH2GbUZSqe9RfRDMp6DvO9c2JoGc3LLWw== +"@polkadot/rpc-core@10.10.1": + version "10.10.1" + resolved "https://registry.yarnpkg.com/@polkadot/rpc-core/-/rpc-core-10.10.1.tgz#5837e9ce635d5804cad897c6336771b61f3ef61a" + integrity sha512-awfFfJYsVF6W4DrqTj5RP00SSDRNB770FIoe1QE1Op4NcSrfeLpwh54HUJS716f4l5mOSYuvMp+zCbKzt8zKow== dependencies: - "@polkadot/rpc-augment" "10.9.1" - "@polkadot/rpc-provider" "10.9.1" - "@polkadot/types" "10.9.1" - "@polkadot/util" "^12.3.1" + "@polkadot/rpc-augment" "10.10.1" + "@polkadot/rpc-provider" "10.10.1" + "@polkadot/types" "10.10.1" + "@polkadot/util" "^12.5.1" rxjs "^7.8.1" - tslib "^2.5.3" + tslib "^2.6.2" -"@polkadot/rpc-provider@10.9.1": - version "10.9.1" - resolved "https://registry.yarnpkg.com/@polkadot/rpc-provider/-/rpc-provider-10.9.1.tgz#de3a474bbcd26d28d9cd3134acdb3b5ce92b680b" - integrity sha512-4QzT2QzD+320+eT6b79sGAA85Tt3Bb8fQvse4r5Mom2iiBd2SO81vOhxSAOaIe4GUsw25VzFJmsbe7+OObItdg== - dependencies: - "@polkadot/keyring" "^12.3.1" - "@polkadot/types" "10.9.1" - "@polkadot/types-support" "10.9.1" - "@polkadot/util" "^12.3.1" - "@polkadot/util-crypto" "^12.3.1" - "@polkadot/x-fetch" "^12.3.1" - "@polkadot/x-global" "^12.3.1" - "@polkadot/x-ws" "^12.3.1" +"@polkadot/rpc-provider@10.10.1": + version "10.10.1" + resolved "https://registry.yarnpkg.com/@polkadot/rpc-provider/-/rpc-provider-10.10.1.tgz#387b1a915fa7b40d5f48a408c7b0ee5980f7ce07" + integrity sha512-VMDWoJgx6/mPHAOT66Sq+Jf2lJABfV/ZUIXtT2k8HjOndbm6oKrFqGEOSSLvB2q4olDee3FkFFxkyW1s6k4JaQ== + dependencies: + "@polkadot/keyring" "^12.5.1" + "@polkadot/types" "10.10.1" + "@polkadot/types-support" "10.10.1" + "@polkadot/util" "^12.5.1" + "@polkadot/util-crypto" "^12.5.1" + "@polkadot/x-fetch" "^12.5.1" + "@polkadot/x-global" "^12.5.1" + "@polkadot/x-ws" "^12.5.1" eventemitter3 "^5.0.1" - mock-socket "^9.2.1" - nock "^13.3.1" - tslib "^2.5.3" + mock-socket "^9.3.1" + nock "^13.3.4" + tslib "^2.6.2" optionalDependencies: - "@substrate/connect" "0.7.26" + "@substrate/connect" "0.7.33" "@polkadot/types-augment@10.10.1", "@polkadot/types-augment@^10.9.1": version "10.10.1" @@ -643,16 +613,6 @@ "@polkadot/util" "^12.5.1" tslib "^2.6.2" -"@polkadot/types-augment@10.9.1": - version "10.9.1" - resolved "https://registry.yarnpkg.com/@polkadot/types-augment/-/types-augment-10.9.1.tgz#5f1c1225c04ffbfe243629a46087c9c9de25a6b3" - integrity sha512-OY9/jTMFRFqYdkUnfcGwqMLC64A0Q25bjvCuVQCVjsPFKE3wl0Kt5rNT01eV2UmLXrR6fY0xWbR2w80bLA7CIQ== - dependencies: - "@polkadot/types" "10.9.1" - "@polkadot/types-codec" "10.9.1" - "@polkadot/util" "^12.3.1" - tslib "^2.5.3" - "@polkadot/types-codec@10.10.1": version "10.10.1" resolved "https://registry.yarnpkg.com/@polkadot/types-codec/-/types-codec-10.10.1.tgz#61d28a461493bfb72606b4399078460969a049c8" @@ -662,15 +622,6 @@ "@polkadot/x-bigint" "^12.5.1" tslib "^2.6.2" -"@polkadot/types-codec@10.9.1": - version "10.9.1" - resolved "https://registry.yarnpkg.com/@polkadot/types-codec/-/types-codec-10.9.1.tgz#f30026d3dfeaa69c07c45fa66d1c39318fd232cc" - integrity sha512-mJ5OegKGraY1FLvEa8FopRCr3pQrhDkcn5RNOjmgJQozENVeRaxhk0NwxYz7IojFvSDnKnc6lNQfKaaSe5pLHg== - dependencies: - "@polkadot/util" "^12.3.1" - "@polkadot/x-bigint" "^12.3.1" - tslib "^2.5.3" - "@polkadot/types-create@10.10.1": version "10.10.1" resolved "https://registry.yarnpkg.com/@polkadot/types-create/-/types-create-10.10.1.tgz#76f1729ef3f4699d99e708801312e43825368827" @@ -680,36 +631,27 @@ "@polkadot/util" "^12.5.1" tslib "^2.6.2" -"@polkadot/types-create@10.9.1": - version "10.9.1" - resolved "https://registry.yarnpkg.com/@polkadot/types-create/-/types-create-10.9.1.tgz#087d7e2af51cce558b67e3859613b932a3bdc0a3" - integrity sha512-OVz50MGTTuiuVnRP/zAx4CTuLioc0hsiwNwqN2lNhmIJGtnQ4Vy/7mQRsIWehiYz6g0Vzzm5B3qWkTXO1NSN5w== - dependencies: - "@polkadot/types-codec" "10.9.1" - "@polkadot/util" "^12.3.1" - tslib "^2.5.3" - -"@polkadot/types-known@10.9.1": - version "10.9.1" - resolved "https://registry.yarnpkg.com/@polkadot/types-known/-/types-known-10.9.1.tgz#fe0c7e55191aa843119edcaf9abb5d2471463a7d" - integrity sha512-zCMVWc4pJtkbMFPu72bD4IhvV/gkHXPX3C5uu92WdmCfnn0vEIEsMKWlVXVVvQQZKAqvs/awpqIfrUtEViOGEA== +"@polkadot/types-known@10.10.1": + version "10.10.1" + resolved "https://registry.yarnpkg.com/@polkadot/types-known/-/types-known-10.10.1.tgz#ccaa1364ea1073a95c5cb0d73258e154de5103d2" + integrity sha512-yRa1lbDRqg3V/zoa0vSwdGOiYTIWktILW8OfkaLDExTu0GZBSbVHZlLAta52XVpA9Zww7mrUUC9+iernOwk//w== dependencies: - "@polkadot/networks" "^12.3.1" - "@polkadot/types" "10.9.1" - "@polkadot/types-codec" "10.9.1" - "@polkadot/types-create" "10.9.1" - "@polkadot/util" "^12.3.1" - tslib "^2.5.3" + "@polkadot/networks" "^12.5.1" + "@polkadot/types" "10.10.1" + "@polkadot/types-codec" "10.10.1" + "@polkadot/types-create" "10.10.1" + "@polkadot/util" "^12.5.1" + tslib "^2.6.2" -"@polkadot/types-support@10.9.1": - version "10.9.1" - resolved "https://registry.yarnpkg.com/@polkadot/types-support/-/types-support-10.9.1.tgz#17a861aab8e5a225a4e20cefa2d16076ddd51baf" - integrity sha512-XsieuLDsszvMZQlleacQBfx07i/JkwQV/UxH9q8Hz7Okmaz9pEVEW1h3ka2/cPuC7a4l32JhaORBUYshBZNdJg== +"@polkadot/types-support@10.10.1": + version "10.10.1" + resolved "https://registry.yarnpkg.com/@polkadot/types-support/-/types-support-10.10.1.tgz#a22d319d4ba795e386000ddf6fdc8c55f9d81a9c" + integrity sha512-Cd2mwk9RG6LlX8X3H0bRY7wCTbZPqU3z38CMFhvNkFDAyjqKjtn8hpS4n8mMrZK2EwCs/MjQH1wb7rtFkaWmJw== dependencies: - "@polkadot/util" "^12.3.1" - tslib "^2.5.3" + "@polkadot/util" "^12.5.1" + tslib "^2.6.2" -"@polkadot/types@10.10.1": +"@polkadot/types@10.10.1", "@polkadot/types@^10.9.1": version "10.10.1" resolved "https://registry.yarnpkg.com/@polkadot/types/-/types-10.10.1.tgz#4a55909ff35b0b568c0b1539ae923a259b0dba6a" integrity sha512-Ben62P1tjYEhKag34GBGcLX6NqcFR1VD5nNbWaxgr+t36Jl/tlHs6P9DlbFqQP7Tt9FmGrAYY0m3oTkhjG1NzA== @@ -723,37 +665,7 @@ rxjs "^7.8.1" tslib "^2.6.2" -"@polkadot/types@10.9.1", "@polkadot/types@^10.9.1": - version "10.9.1" - resolved "https://registry.yarnpkg.com/@polkadot/types/-/types-10.9.1.tgz#f111d00f7278ad3be95deba3d701fafefe080cb2" - integrity sha512-AG33i2ZGGfq7u+5rkAdGrXAQHHl844/Yv+junH5ZzX69xiCoWO1bH/yzDUNBdpki2GlACWvF9nLYh3F2tVF93w== - dependencies: - "@polkadot/keyring" "^12.3.1" - "@polkadot/types-augment" "10.9.1" - "@polkadot/types-codec" "10.9.1" - "@polkadot/types-create" "10.9.1" - "@polkadot/util" "^12.3.1" - "@polkadot/util-crypto" "^12.3.1" - rxjs "^7.8.1" - tslib "^2.5.3" - -"@polkadot/util-crypto@12.3.2", "@polkadot/util-crypto@^12.3.1", "@polkadot/util-crypto@^12.3.2": - version "12.3.2" - resolved "https://registry.yarnpkg.com/@polkadot/util-crypto/-/util-crypto-12.3.2.tgz#42d810886904e06fa6e5db254c15f6ef80f4ab72" - integrity sha512-pTpx+YxolY0BDT4RcGmgeKbHHD/dI6Ll9xRsqmVdIjpcVVY20uDNTyXs81ZNtfKgyod1y9JQkfNv2Dz9iEpTkQ== - dependencies: - "@noble/curves" "1.1.0" - "@noble/hashes" "1.3.1" - "@polkadot/networks" "12.3.2" - "@polkadot/util" "12.3.2" - "@polkadot/wasm-crypto" "^7.2.1" - "@polkadot/wasm-util" "^7.2.1" - "@polkadot/x-bigint" "12.3.2" - "@polkadot/x-randomvalues" "12.3.2" - "@scure/base" "1.1.1" - tslib "^2.5.3" - -"@polkadot/util-crypto@12.5.1", "@polkadot/util-crypto@^12.5.1": +"@polkadot/util-crypto@12.5.1", "@polkadot/util-crypto@^12.3.2", "@polkadot/util-crypto@^12.5.1": version "12.5.1" resolved "https://registry.yarnpkg.com/@polkadot/util-crypto/-/util-crypto-12.5.1.tgz#1753b23abfb9d72db950399ef65b0cbe5bef9f2f" integrity sha512-Y8ORbMcsM/VOqSG3DgqutRGQ8XXK+X9M3C8oOEI2Tji65ZsXbh9Yh+ryPLM0oBp/9vqOXjkLgZJbbVuQceOw0A== @@ -769,20 +681,7 @@ "@scure/base" "^1.1.3" tslib "^2.6.2" -"@polkadot/util@12.3.2", "@polkadot/util@^12.3.1", "@polkadot/util@^12.3.2": - version "12.3.2" - resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-12.3.2.tgz#f46e147b0e6a426da5ba59df4ce65de1a3effe4a" - integrity sha512-y/JShcGyOamCUiSIg++XZuLHt1ktSKBaSH2K5Nw5NXlgP0+7am+GZzqPB8fQ4qhYLruEOv+YRiz0GC1Zr9S+wg== - dependencies: - "@polkadot/x-bigint" "12.3.2" - "@polkadot/x-global" "12.3.2" - "@polkadot/x-textdecoder" "12.3.2" - "@polkadot/x-textencoder" "12.3.2" - "@types/bn.js" "^5.1.1" - bn.js "^5.2.1" - tslib "^2.5.3" - -"@polkadot/util@12.5.1", "@polkadot/util@^12.5.1": +"@polkadot/util@12.5.1", "@polkadot/util@^12.3.2", "@polkadot/util@^12.5.1": version "12.5.1" resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-12.5.1.tgz#f4e7415600b013d3b69527aa88904acf085be3f5" integrity sha512-fDBZL7D4/baMG09Qowseo884m3QBzErGkRWNBId1UjWR99kyex+cIY9fOSzmuQxo6nLdJlLHw1Nz2caN3+Bq0A== @@ -795,14 +694,6 @@ bn.js "^5.2.1" tslib "^2.6.2" -"@polkadot/wasm-bridge@7.2.1": - version "7.2.1" - resolved "https://registry.yarnpkg.com/@polkadot/wasm-bridge/-/wasm-bridge-7.2.1.tgz#8464a96552207d2b49c6f32137b24132534b91ee" - integrity sha512-uV/LHREDBGBbHrrv7HTki+Klw0PYZzFomagFWII4lp6Toj/VCvRh5WMzooVC+g/XsBGosAwrvBhoModabyHx+A== - dependencies: - "@polkadot/wasm-util" "7.2.1" - tslib "^2.5.0" - "@polkadot/wasm-bridge@7.2.2": version "7.2.2" resolved "https://registry.yarnpkg.com/@polkadot/wasm-bridge/-/wasm-bridge-7.2.2.tgz#957b82b17927fe080729e8930b5b5c554f77b8df" @@ -811,13 +702,6 @@ "@polkadot/wasm-util" "7.2.2" tslib "^2.6.1" -"@polkadot/wasm-crypto-asmjs@7.2.1": - version "7.2.1" - resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto-asmjs/-/wasm-crypto-asmjs-7.2.1.tgz#3e7a91e2905ab7354bc37b82f3e151a62bb024db" - integrity sha512-z/d21bmxyVfkzGsKef/FWswKX02x5lK97f4NPBZ9XBeiFkmzlXhdSnu58/+b1sKsRAGdW/Rn/rTNRDhW0GqCAg== - dependencies: - tslib "^2.5.0" - "@polkadot/wasm-crypto-asmjs@7.2.2": version "7.2.2" resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto-asmjs/-/wasm-crypto-asmjs-7.2.2.tgz#25243a4d5d8d997761141b616623cacff4329f13" @@ -825,17 +709,6 @@ dependencies: tslib "^2.6.1" -"@polkadot/wasm-crypto-init@7.2.1": - version "7.2.1" - resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto-init/-/wasm-crypto-init-7.2.1.tgz#9dbba41ed7d382575240f1483cf5a139ff2787bd" - integrity sha512-GcEXtwN9LcSf32V9zSaYjHImFw16hCyo2Xzg4GLLDPPeaAAfbFr2oQMgwyDbvBrBjLKHVHjsPZyGhXae831amw== - dependencies: - "@polkadot/wasm-bridge" "7.2.1" - "@polkadot/wasm-crypto-asmjs" "7.2.1" - "@polkadot/wasm-crypto-wasm" "7.2.1" - "@polkadot/wasm-util" "7.2.1" - tslib "^2.5.0" - "@polkadot/wasm-crypto-init@7.2.2": version "7.2.2" resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto-init/-/wasm-crypto-init-7.2.2.tgz#ffd105b87fc1b679c06c85c0848183c27bc539e3" @@ -847,14 +720,6 @@ "@polkadot/wasm-util" "7.2.2" tslib "^2.6.1" -"@polkadot/wasm-crypto-wasm@7.2.1": - version "7.2.1" - resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto-wasm/-/wasm-crypto-wasm-7.2.1.tgz#d2486322c725f6e5d2cc2d6abcb77ecbbaedc738" - integrity sha512-DqyXE4rSD0CVlLIw88B58+HHNyrvm+JAnYyuEDYZwCvzUWOCNos/DDg9wi/K39VAIsCCKDmwKqkkfIofuOj/lA== - dependencies: - "@polkadot/wasm-util" "7.2.1" - tslib "^2.5.0" - "@polkadot/wasm-crypto-wasm@7.2.2": version "7.2.2" resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto-wasm/-/wasm-crypto-wasm-7.2.2.tgz#9e49a1565bda2bc830708693b491b37ad8a2144d" @@ -863,18 +728,6 @@ "@polkadot/wasm-util" "7.2.2" tslib "^2.6.1" -"@polkadot/wasm-crypto@^7.2.1": - version "7.2.1" - resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto/-/wasm-crypto-7.2.1.tgz#db671dcb73f1646dc13478b5ffc3be18c64babe1" - integrity sha512-SA2+33S9TAwGhniKgztVN6pxUKpGfN4Tre/eUZGUfpgRkT92wIUT2GpGWQE+fCCqGQgADrNiBcwt6XwdPqMQ4Q== - dependencies: - "@polkadot/wasm-bridge" "7.2.1" - "@polkadot/wasm-crypto-asmjs" "7.2.1" - "@polkadot/wasm-crypto-init" "7.2.1" - "@polkadot/wasm-crypto-wasm" "7.2.1" - "@polkadot/wasm-util" "7.2.1" - tslib "^2.5.0" - "@polkadot/wasm-crypto@^7.2.2": version "7.2.2" resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto/-/wasm-crypto-7.2.2.tgz#3c4b300c0997f4f7e2ddcdf8101d97fa1f5d1a7f" @@ -887,13 +740,6 @@ "@polkadot/wasm-util" "7.2.2" tslib "^2.6.1" -"@polkadot/wasm-util@7.2.1", "@polkadot/wasm-util@^7.2.1": - version "7.2.1" - resolved "https://registry.yarnpkg.com/@polkadot/wasm-util/-/wasm-util-7.2.1.tgz#fda233120ec02f77f0d14e4d3c7ad9ce06535fb8" - integrity sha512-FBSn/3aYJzhN0sYAYhHB8y9JL8mVgxLy4M1kUXYbyo+8GLRQEN5rns8Vcb8TAlIzBWgVTOOptYBvxo0oj0h7Og== - dependencies: - tslib "^2.5.0" - "@polkadot/wasm-util@7.2.2", "@polkadot/wasm-util@^7.2.2": version "7.2.2" resolved "https://registry.yarnpkg.com/@polkadot/wasm-util/-/wasm-util-7.2.2.tgz#f8aa62eba9a35466aa23f3c5634f3e8dbd398bbf" @@ -901,14 +747,6 @@ dependencies: tslib "^2.6.1" -"@polkadot/x-bigint@12.3.2", "@polkadot/x-bigint@^12.3.1": - version "12.3.2" - resolved "https://registry.yarnpkg.com/@polkadot/x-bigint/-/x-bigint-12.3.2.tgz#0e99489cc7938bed40762aaaed58ded6850ab54b" - integrity sha512-JLqLgfGXe/x+hZJETd5ZqfpVsbwyMsH5Nn1Q20ineMMjXN/ig+kVR8Mc15LXBMuw4g7LldFW6UUrotWnuMI8Yw== - dependencies: - "@polkadot/x-global" "12.3.2" - tslib "^2.5.3" - "@polkadot/x-bigint@12.5.1", "@polkadot/x-bigint@^12.5.1": version "12.5.1" resolved "https://registry.yarnpkg.com/@polkadot/x-bigint/-/x-bigint-12.5.1.tgz#0a6a3a34fae51468e7b02b42e0ff0747fd88a80a" @@ -917,37 +755,22 @@ "@polkadot/x-global" "12.5.1" tslib "^2.6.2" -"@polkadot/x-fetch@^12.3.1": - version "12.3.2" - resolved "https://registry.yarnpkg.com/@polkadot/x-fetch/-/x-fetch-12.3.2.tgz#7e8d2113268e792dd5d1b259ef13839c6aa77996" - integrity sha512-3IEuZ5S+RI/t33NsdPLIIa5COfDCfpUW2sbaByEczn75aD1jLqJZSEDwiBniJ2osyNd4uUxBf6e5jw7LAZeZJg== - dependencies: - "@polkadot/x-global" "12.3.2" - node-fetch "^3.3.1" - tslib "^2.5.3" - -"@polkadot/x-global@12.3.2", "@polkadot/x-global@^12.3.1": - version "12.3.2" - resolved "https://registry.yarnpkg.com/@polkadot/x-global/-/x-global-12.3.2.tgz#04ac0b0e559a35107f0b95ff7889fcade3796aa3" - integrity sha512-yVZq6oIegjlyh5rUZiTklgu+fL+W/DG1ypEa02683tUCB3avV5cA3PAHKptMSlb6FpweHu37lKKrqfAWrraDxg== +"@polkadot/x-fetch@^12.5.1": + version "12.5.1" + resolved "https://registry.yarnpkg.com/@polkadot/x-fetch/-/x-fetch-12.5.1.tgz#41532d1324cef56a28c31490ac81062d487b16fb" + integrity sha512-Bc019lOKCoQJrthiS+H3LwCahGtl5tNnb2HK7xe3DBQIUx9r2HsF/uEngNfMRUFkUYg5TPCLFbEWU8NIREBS1A== dependencies: - tslib "^2.5.3" + "@polkadot/x-global" "12.5.1" + node-fetch "^3.3.2" + tslib "^2.6.2" -"@polkadot/x-global@12.5.1": +"@polkadot/x-global@12.5.1", "@polkadot/x-global@^12.5.1": version "12.5.1" resolved "https://registry.yarnpkg.com/@polkadot/x-global/-/x-global-12.5.1.tgz#947bb90e0c46c853ffe216dd6dcb6847d5c18a98" integrity sha512-6K0YtWEg0eXInDOihU5aSzeb1t9TiDdX9ZuRly+58ALSqw5kPZYmQLbzE1d8HWzyXRXK+YH65GtLzfMGqfYHmw== dependencies: tslib "^2.6.2" -"@polkadot/x-randomvalues@12.3.2": - version "12.3.2" - resolved "https://registry.yarnpkg.com/@polkadot/x-randomvalues/-/x-randomvalues-12.3.2.tgz#43ac489a998098bdd40b3f82f28adb5b542db2a5" - integrity sha512-ywjIs8CWpvOGmq+3cGCNPOHxAjPHdBUiXyDccftx5BRVdmtbt36gK/V84bKr6Xs73FGu0jprUAOSRRsLZX/3dg== - dependencies: - "@polkadot/x-global" "12.3.2" - tslib "^2.5.3" - "@polkadot/x-randomvalues@12.5.1": version "12.5.1" resolved "https://registry.yarnpkg.com/@polkadot/x-randomvalues/-/x-randomvalues-12.5.1.tgz#b30c6fa8749f5776f1d8a78b6edddb9b0f9c2853" @@ -956,14 +779,6 @@ "@polkadot/x-global" "12.5.1" tslib "^2.6.2" -"@polkadot/x-textdecoder@12.3.2": - version "12.3.2" - resolved "https://registry.yarnpkg.com/@polkadot/x-textdecoder/-/x-textdecoder-12.3.2.tgz#bbd5682744f3552ce5d4d792ff48a3ca525eafcf" - integrity sha512-lY5bfA5xArJRWEJlYOlQQMJeTjWD8s0yMhchirVgf5xj8Id9vPGeUoneH+VFDEwgXxrqBvDFJ4smN4T/r6a/fg== - dependencies: - "@polkadot/x-global" "12.3.2" - tslib "^2.5.3" - "@polkadot/x-textdecoder@12.5.1": version "12.5.1" resolved "https://registry.yarnpkg.com/@polkadot/x-textdecoder/-/x-textdecoder-12.5.1.tgz#8d89d2b5efbffb2550a48f8afb4a834e1d8d4f6e" @@ -972,14 +787,6 @@ "@polkadot/x-global" "12.5.1" tslib "^2.6.2" -"@polkadot/x-textencoder@12.3.2": - version "12.3.2" - resolved "https://registry.yarnpkg.com/@polkadot/x-textencoder/-/x-textencoder-12.3.2.tgz#223e6f6dd78e2d81c6dcc6f244c76ceae7b08e32" - integrity sha512-iP3qEBiHzBckQ9zeY7ZHRWuu7mCEg5SMpOugs6UODRk8sx6KHzGQYlghBbWLit0uppPDVE0ifEwZ2n73djJHWQ== - dependencies: - "@polkadot/x-global" "12.3.2" - tslib "^2.5.3" - "@polkadot/x-textencoder@12.5.1": version "12.5.1" resolved "https://registry.yarnpkg.com/@polkadot/x-textencoder/-/x-textencoder-12.5.1.tgz#9104e37a60068df2fbf57c81a7ce48669430c76c" @@ -988,14 +795,14 @@ "@polkadot/x-global" "12.5.1" tslib "^2.6.2" -"@polkadot/x-ws@^12.3.1": - version "12.3.2" - resolved "https://registry.yarnpkg.com/@polkadot/x-ws/-/x-ws-12.3.2.tgz#422559dfbdaac4c965d5e1b406b6cc4529214f94" - integrity sha512-yM9Z64pLNlHpJE43+Xtr+iUXmYpFFY5u5hrke2PJt13O48H8f9Vb9cRaIh94appLyICoS0aekGhDkGH+MCspBA== +"@polkadot/x-ws@^12.5.1": + version "12.5.1" + resolved "https://registry.yarnpkg.com/@polkadot/x-ws/-/x-ws-12.5.1.tgz#ff9fc78ef701e18d765443779ab95296a406138c" + integrity sha512-efNMhB3Lh6pW2iTipMkqwrjpuUtb3EwR/jYZftiIGo5tDPB7rqoMOp9s6KRFJEIUfZkLnMUtbkZ5fHzUJaCjmQ== dependencies: - "@polkadot/x-global" "12.3.2" - tslib "^2.5.3" - ws "^8.13.0" + "@polkadot/x-global" "12.5.1" + tslib "^2.6.2" + ws "^8.14.1" "@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2": version "1.1.2" @@ -1050,16 +857,16 @@ resolved "https://registry.yarnpkg.com/@protobufjs/utf8/-/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570" integrity sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw== -"@scure/base@1.1.1", "@scure/base@~1.1.0": - version "1.1.1" - resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.1.tgz#ebb651ee52ff84f420097055f4bf46cfba403938" - integrity sha512-ZxOhsSyxYwLJj3pLZCefNitxsj093tb2vq90mp2txoYeBqbcjDjqFhyM8eUjq/uFm6zJ+mUuqxlS2FkuSY1MTA== - "@scure/base@^1.1.3": version "1.1.3" resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.3.tgz#8584115565228290a6c6c4961973e0903bb3df2f" integrity sha512-/+SgoRjLq7Xlf0CWuLHq2LUZeL/w65kfzAPG5NH9pcmBhs+nunQTn4gvdwgMTIXnt9b2C/1SeL2XiysZEyIC9Q== +"@scure/base@~1.1.0": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.1.tgz#ebb651ee52ff84f420097055f4bf46cfba403938" + integrity sha512-ZxOhsSyxYwLJj3pLZCefNitxsj093tb2vq90mp2txoYeBqbcjDjqFhyM8eUjq/uFm6zJ+mUuqxlS2FkuSY1MTA== + "@scure/bip32@1.3.0": version "1.3.0" resolved "https://registry.yarnpkg.com/@scure/bip32/-/bip32-1.3.0.tgz#6c8d980ef3f290987736acd0ee2e0f0d50068d87" @@ -1087,19 +894,13 @@ resolved "https://registry.yarnpkg.com/@substrate/connect-extension-protocol/-/connect-extension-protocol-1.0.1.tgz#fa5738039586c648013caa6a0c95c43265dbe77d" integrity sha512-161JhCC1csjH3GE5mPLEd7HbWtwNSPJBg3p1Ksz9SFlTzj/bgEwudiRN2y5i0MoLGCIJRYKyKGMxVnd29PzNjg== -"@substrate/connect@0.7.26": - version "0.7.26" - resolved "https://registry.yarnpkg.com/@substrate/connect/-/connect-0.7.26.tgz#a0ee5180c9cb2f29250d1219a32f7b7e7dea1196" - integrity sha512-uuGSiroGuKWj1+38n1kY5HReer5iL9bRwPCzuoLtqAOmI1fGI0hsSI2LlNQMAbfRgr7VRHXOk5MTuQf5ulsFRw== +"@substrate/connect@0.7.33": + version "0.7.33" + resolved "https://registry.yarnpkg.com/@substrate/connect/-/connect-0.7.33.tgz#6fa309557b5b45cb918f5f4fe25a356384de9808" + integrity sha512-1B984/bmXVQvTT9oV3c3b7215lvWmulP9rfP3T3Ri+OU3uIsyCzYw0A+XG6J8/jgO2FnroeNIBWlgoLaUM1uzw== dependencies: "@substrate/connect-extension-protocol" "^1.0.1" - eventemitter3 "^4.0.7" - smoldot "1.0.4" - -"@substrate/ss58-registry@^1.40.0": - version "1.40.0" - resolved "https://registry.yarnpkg.com/@substrate/ss58-registry/-/ss58-registry-1.40.0.tgz#2223409c496271df786c1ca8496898896595441e" - integrity sha512-QuU2nBql3J4KCnOWtWDw4n1K4JU0T79j54ZZvm/9nhsX6AIar13FyhsaBfs6QkJ2ixTQAnd7TocJIoJRWbqMZA== + smoldot "2.0.1" "@substrate/ss58-registry@^1.43.0": version "1.43.0" @@ -1127,9 +928,9 @@ integrity sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ== "@types/bn.js@^5.1.1": - version "5.1.1" - resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-5.1.1.tgz#b51e1b55920a4ca26e9285ff79936bbdec910682" - integrity sha512-qNrYbZqMx0uJAfKnKclPh+dTwK33KfLHYqtyODwd5HnXOjnkhc4qgn3BrK6RWyGZm5+sIFE7Q7Vz6QQtJB7w7g== + version "5.1.3" + resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-5.1.3.tgz#0857f00da3bf888a26a44b4a477c7819b17dacc5" + integrity sha512-wT1B4iIO82ecXkdN6waCK8Ou7E71WU+mP1osDA5Q8c6Ur+ozU2vIKUIhSpUr6uE5L2YHocKS1Z2jG2fBC1YVeg== dependencies: "@types/node" "*" @@ -1295,37 +1096,37 @@ test-exclude "^6.0.0" v8-to-istanbul "^9.1.0" -"@vitest/expect@0.33.0": - version "0.33.0" - resolved "https://registry.yarnpkg.com/@vitest/expect/-/expect-0.33.0.tgz#f48652591f3573ad6c2db828ad358d5c078845d3" - integrity sha512-sVNf+Gla3mhTCxNJx+wJLDPp/WcstOe0Ksqz4Vec51MmgMth/ia0MGFEkIZmVGeTL5HtjYR4Wl/ZxBxBXZJTzQ== +"@vitest/expect@0.34.6": + version "0.34.6" + resolved "https://registry.yarnpkg.com/@vitest/expect/-/expect-0.34.6.tgz#608a7b7a9aa3de0919db99b4cc087340a03ea77e" + integrity sha512-QUzKpUQRc1qC7qdGo7rMK3AkETI7w18gTCUrsNnyjjJKYiuUB9+TQK3QnR1unhCnWRC0AbKv2omLGQDF/mIjOw== dependencies: - "@vitest/spy" "0.33.0" - "@vitest/utils" "0.33.0" - chai "^4.3.7" + "@vitest/spy" "0.34.6" + "@vitest/utils" "0.34.6" + chai "^4.3.10" -"@vitest/runner@0.33.0": - version "0.33.0" - resolved "https://registry.yarnpkg.com/@vitest/runner/-/runner-0.33.0.tgz#0b1a4d04ff8bc5cdad73920eac019d99550edf9d" - integrity sha512-UPfACnmCB6HKRHTlcgCoBh6ppl6fDn+J/xR8dTufWiKt/74Y9bHci5CKB8tESSV82zKYtkBJo9whU3mNvfaisg== +"@vitest/runner@0.34.6": + version "0.34.6" + resolved "https://registry.yarnpkg.com/@vitest/runner/-/runner-0.34.6.tgz#6f43ca241fc96b2edf230db58bcde5b974b8dcaf" + integrity sha512-1CUQgtJSLF47NnhN+F9X2ycxUP0kLHQ/JWvNHbeBfwW8CzEGgeskzNnHDyv1ieKTltuR6sdIHV+nmR6kPxQqzQ== dependencies: - "@vitest/utils" "0.33.0" + "@vitest/utils" "0.34.6" p-limit "^4.0.0" pathe "^1.1.1" -"@vitest/snapshot@0.33.0": - version "0.33.0" - resolved "https://registry.yarnpkg.com/@vitest/snapshot/-/snapshot-0.33.0.tgz#4400a90c48907808122b573053a2112a832b3698" - integrity sha512-tJjrl//qAHbyHajpFvr8Wsk8DIOODEebTu7pgBrP07iOepR5jYkLFiqLq2Ltxv+r0uptUb4izv1J8XBOwKkVYA== +"@vitest/snapshot@0.34.6": + version "0.34.6" + resolved "https://registry.yarnpkg.com/@vitest/snapshot/-/snapshot-0.34.6.tgz#b4528cf683b60a3e8071cacbcb97d18b9d5e1d8b" + integrity sha512-B3OZqYn6k4VaN011D+ve+AA4whM4QkcwcrwaKwAbyyvS/NB1hCWjFIBQxAQQSQir9/RtyAAGuq+4RJmbn2dH4w== dependencies: magic-string "^0.30.1" pathe "^1.1.1" pretty-format "^29.5.0" -"@vitest/spy@0.33.0": - version "0.33.0" - resolved "https://registry.yarnpkg.com/@vitest/spy/-/spy-0.33.0.tgz#366074d3cf9cf1ed8aeaa76e50e78c799fb242eb" - integrity sha512-Kv+yZ4hnH1WdiAkPUQTpRxW8kGtH8VRTnus7ZTGovFYM1ZezJpvGtb9nPIjPnptHbsyIAxYZsEpVPYgtpjGnrg== +"@vitest/spy@0.34.6": + version "0.34.6" + resolved "https://registry.yarnpkg.com/@vitest/spy/-/spy-0.34.6.tgz#b5e8642a84aad12896c915bce9b3cc8cdaf821df" + integrity sha512-xaCvneSaeBw/cz8ySmF7ZwGvL0lBjfvqc1LpQ/vcdHEvpLn3Ff1vAvjw+CoGn0802l++5L/pxb7whwcWAw+DUQ== dependencies: tinyspy "^2.1.1" @@ -1342,19 +1143,19 @@ picocolors "^1.0.0" sirv "^2.0.3" -"@vitest/utils@0.33.0": - version "0.33.0" - resolved "https://registry.yarnpkg.com/@vitest/utils/-/utils-0.33.0.tgz#6b9820cb8f128d649da6f78ecaa9b73d6222b277" - integrity sha512-pF1w22ic965sv+EN6uoePkAOTkAPWM03Ri/jXNyMIKBb/XHLDPfhLvf/Fa9g0YECevAIz56oVYXhodLvLQ/awA== +"@vitest/utils@0.34.4": + version "0.34.4" + resolved "https://registry.yarnpkg.com/@vitest/utils/-/utils-0.34.4.tgz#0b6bf5fe07223ebb6ec24cd1edc0137cb301ecfd" + integrity sha512-yR2+5CHhp/K4ySY0Qtd+CAL9f5Yh1aXrKfAT42bq6CtlGPh92jIDDDSg7ydlRow1CP+dys4TrOrbELOyNInHSg== dependencies: diff-sequences "^29.4.3" loupe "^2.3.6" pretty-format "^29.5.0" -"@vitest/utils@0.34.4": - version "0.34.4" - resolved "https://registry.yarnpkg.com/@vitest/utils/-/utils-0.34.4.tgz#0b6bf5fe07223ebb6ec24cd1edc0137cb301ecfd" - integrity sha512-yR2+5CHhp/K4ySY0Qtd+CAL9f5Yh1aXrKfAT42bq6CtlGPh92jIDDDSg7ydlRow1CP+dys4TrOrbELOyNInHSg== +"@vitest/utils@0.34.6": + version "0.34.6" + resolved "https://registry.yarnpkg.com/@vitest/utils/-/utils-0.34.6.tgz#38a0a7eedddb8e7291af09a2409cb8a189516968" + integrity sha512-IG5aDD8S6zlvloDsnzHw0Ut5xczlF+kv2BOTo+iXfPr54Yhi5qbVOgGB1hZaVq4iJ4C/MZ2J0y15IlsV/ZcI0A== dependencies: diff-sequences "^29.4.3" loupe "^2.3.6" @@ -1665,18 +1466,18 @@ catharsis@^0.9.0: dependencies: lodash "^4.17.15" -chai@^4.3.7: - version "4.3.7" - resolved "https://registry.yarnpkg.com/chai/-/chai-4.3.7.tgz#ec63f6df01829088e8bf55fca839bcd464a8ec51" - integrity sha512-HLnAzZ2iupm25PlN0xFreAlBA5zaBSv3og0DdeGA4Ar6h6rJ3A0rolRUKJhSF2V10GZKDgWF/VmAEsNWjCRB+A== +chai@^4.3.10: + version "4.3.10" + resolved "https://registry.yarnpkg.com/chai/-/chai-4.3.10.tgz#d784cec635e3b7e2ffb66446a63b4e33bd390384" + integrity sha512-0UXG04VuVbruMUYbJ6JctvH0YnC/4q3/AkT18q4NaITo91CUm0liMS9VqzT9vZhVQ/1eqPanMWjBM+Juhfb/9g== dependencies: assertion-error "^1.1.0" - check-error "^1.0.2" - deep-eql "^4.1.2" - get-func-name "^2.0.0" - loupe "^2.3.1" + check-error "^1.0.3" + deep-eql "^4.1.3" + get-func-name "^2.0.2" + loupe "^2.3.6" pathval "^1.1.1" - type-detect "^4.0.5" + type-detect "^4.0.8" chalk@^4.0.0, chalk@^4.1.2: version "4.1.2" @@ -1686,10 +1487,12 @@ chalk@^4.0.0, chalk@^4.1.2: ansi-styles "^4.1.0" supports-color "^7.1.0" -check-error@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" - integrity sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA== +check-error@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.3.tgz#a6502e4312a7ee969f646e83bb3ddd56281bd694" + integrity sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg== + dependencies: + get-func-name "^2.0.2" chokidar@^3.5.1: version "3.5.3" @@ -1823,7 +1626,7 @@ debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4: dependencies: ms "2.1.2" -deep-eql@^4.1.2: +deep-eql@^4.1.3: version "4.1.3" resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-4.1.3.tgz#7c7775513092f7df98d8df9996dd085eb668cc6d" integrity sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw== @@ -2015,33 +1818,33 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" -esbuild@^0.17.5: - version "0.17.19" - resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.17.19.tgz#087a727e98299f0462a3d0bcdd9cd7ff100bd955" - integrity sha512-XQ0jAPFkK/u3LcVRcvVHQcTIqD6E2H1fvZMA5dQPSOWb3suUbWbfbRf94pjc0bNzRYLfIrDRQXr7X+LHIm5oHw== +esbuild@^0.18.10: + version "0.18.20" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.18.20.tgz#4709f5a34801b43b799ab7d6d82f7284a9b7a7a6" + integrity sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA== optionalDependencies: - "@esbuild/android-arm" "0.17.19" - "@esbuild/android-arm64" "0.17.19" - "@esbuild/android-x64" "0.17.19" - "@esbuild/darwin-arm64" "0.17.19" - "@esbuild/darwin-x64" "0.17.19" - "@esbuild/freebsd-arm64" "0.17.19" - "@esbuild/freebsd-x64" "0.17.19" - "@esbuild/linux-arm" "0.17.19" - "@esbuild/linux-arm64" "0.17.19" - "@esbuild/linux-ia32" "0.17.19" - "@esbuild/linux-loong64" "0.17.19" - "@esbuild/linux-mips64el" "0.17.19" - "@esbuild/linux-ppc64" "0.17.19" - "@esbuild/linux-riscv64" "0.17.19" - "@esbuild/linux-s390x" "0.17.19" - "@esbuild/linux-x64" "0.17.19" - "@esbuild/netbsd-x64" "0.17.19" - "@esbuild/openbsd-x64" "0.17.19" - "@esbuild/sunos-x64" "0.17.19" - "@esbuild/win32-arm64" "0.17.19" - "@esbuild/win32-ia32" "0.17.19" - "@esbuild/win32-x64" "0.17.19" + "@esbuild/android-arm" "0.18.20" + "@esbuild/android-arm64" "0.18.20" + "@esbuild/android-x64" "0.18.20" + "@esbuild/darwin-arm64" "0.18.20" + "@esbuild/darwin-x64" "0.18.20" + "@esbuild/freebsd-arm64" "0.18.20" + "@esbuild/freebsd-x64" "0.18.20" + "@esbuild/linux-arm" "0.18.20" + "@esbuild/linux-arm64" "0.18.20" + "@esbuild/linux-ia32" "0.18.20" + "@esbuild/linux-loong64" "0.18.20" + "@esbuild/linux-mips64el" "0.18.20" + "@esbuild/linux-ppc64" "0.18.20" + "@esbuild/linux-riscv64" "0.18.20" + "@esbuild/linux-s390x" "0.18.20" + "@esbuild/linux-x64" "0.18.20" + "@esbuild/netbsd-x64" "0.18.20" + "@esbuild/openbsd-x64" "0.18.20" + "@esbuild/sunos-x64" "0.18.20" + "@esbuild/win32-arm64" "0.18.20" + "@esbuild/win32-ia32" "0.18.20" + "@esbuild/win32-x64" "0.18.20" esbuild@^0.18.11, esbuild@^0.18.2: version "0.18.11" @@ -2313,11 +2116,6 @@ esutils@^2.0.2: resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== -eventemitter3@^4.0.7: - version "4.0.7" - resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" - integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== - eventemitter3@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-5.0.1.tgz#53f5ffd0a492ac800721bb42c66b841de96423c4" @@ -2507,7 +2305,7 @@ get-caller-file@^2.0.5: resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== -get-func-name@^2.0.0: +get-func-name@^2.0.0, get-func-name@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.2.tgz#0d7cf20cd13fda808669ffa88f4ffc7a3943fc41" integrity sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ== @@ -3170,7 +2968,7 @@ loose-envify@^1.4.0: dependencies: js-tokens "^3.0.0 || ^4.0.0" -loupe@^2.3.1, loupe@^2.3.6: +loupe@^2.3.6: version "2.3.6" resolved "https://registry.yarnpkg.com/loupe/-/loupe-2.3.6.tgz#76e4af498103c532d1ecc9be102036a21f787b53" integrity sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA== @@ -3322,10 +3120,10 @@ mlly@^1.4.0: pkg-types "^1.0.3" ufo "^1.1.2" -mock-socket@^9.2.1: - version "9.2.1" - resolved "https://registry.yarnpkg.com/mock-socket/-/mock-socket-9.2.1.tgz#cc9c0810aa4d0afe02d721dcb2b7e657c00e2282" - integrity sha512-aw9F9T9G2zpGipLLhSNh6ZpgUyUl4frcVmRN08uE1NWPWg43Wx6+sGPDbQ7E5iFZZDJW5b5bypMeAEHqTbIFag== +mock-socket@^9.3.1: + version "9.3.1" + resolved "https://registry.yarnpkg.com/mock-socket/-/mock-socket-9.3.1.tgz#24fb00c2f573c84812aa4a24181bb025de80cc8e" + integrity sha512-qxBgB7Qa2sEQgHFjj0dSigq7fX4k6Saisd5Nelwp2q8mlbAFh5dHV9JTTlF8viYJLSSWgMCZFUom8PJcMNBoJw== mrmime@^1.0.0: version "1.0.1" @@ -3361,14 +3159,13 @@ natural-compare@^1.4.0: resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== -nock@^13.3.1: - version "13.3.1" - resolved "https://registry.yarnpkg.com/nock/-/nock-13.3.1.tgz#f22d4d661f7a05ebd9368edae1b5dc0a62d758fc" - integrity sha512-vHnopocZuI93p2ccivFyGuUfzjq2fxNyNurp7816mlT5V5HF4SzXu8lvLrVzBbNqzs+ODooZ6OksuSUNM7Njkw== +nock@^13.3.4: + version "13.3.6" + resolved "https://registry.yarnpkg.com/nock/-/nock-13.3.6.tgz#b279968ec8d076c2393810a6c9bf2d4d5b3a1071" + integrity sha512-lT6YuktKroUFM+27mubf2uqQZVy2Jf+pfGzuh9N6VwdHlFoZqvi4zyxFTVR1w/ChPqGY6yxGehHp6C3wqCASCw== dependencies: debug "^4.1.0" json-stringify-safe "^5.0.1" - lodash "^4.17.21" propagate "^2.0.0" node-domexception@^1.0.0: @@ -3383,10 +3180,10 @@ node-fetch@^2.6.12: dependencies: whatwg-url "^5.0.0" -node-fetch@^3.3.1: - version "3.3.1" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-3.3.1.tgz#b3eea7b54b3a48020e46f4f88b9c5a7430d20b2e" - integrity sha512-cRVc/kyto/7E5shrWca1Wsea4y6tL9iYJE5FBCius3JQfb/4P4I295PfhgbJQBLTx6lATE4z+wK0rPM4VS2uow== +node-fetch@^3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-3.3.2.tgz#d1e889bacdf733b4ff3b2b243eb7a12866a0b78b" + integrity sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA== dependencies: data-uri-to-buffer "^4.0.0" fetch-blob "^3.1.4" @@ -3557,11 +3354,6 @@ p-locate@^5.0.0: dependencies: p-limit "^3.0.2" -pako@^2.0.4: - version "2.1.0" - resolved "https://registry.yarnpkg.com/pako/-/pako-2.1.0.tgz#266cc37f98c7d883545d11335c00fbd4062c9a86" - integrity sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug== - parent-module@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" @@ -3641,7 +3433,7 @@ postcss-load-config@^4.0.1: lilconfig "^2.0.5" yaml "^2.1.1" -postcss@^8.4.23: +postcss@^8.4.27: version "8.4.31" resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.31.tgz#92b451050a9f914da6755af352bdc0192508656d" integrity sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ== @@ -3904,10 +3696,10 @@ rollup@^3.2.5: optionalDependencies: fsevents "~2.3.2" -rollup@^3.21.0: - version "3.25.1" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-3.25.1.tgz#9fff79d22ff1a904b2b595a2fb9bc3793cb987d8" - integrity sha512-tywOR+rwIt5m2ZAWSe5AIJcTat8vGlnPFAv15ycCrw33t6iFsXZ6mzHVFh2psSjxQPmI+xgzMZZizUAukBI4aQ== +rollup@^3.27.1: + version "3.29.4" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-3.29.4.tgz#4d70c0f9834146df8705bfb69a9a19c9e1109981" + integrity sha512-oWzmBZwvYrU0iJHtDmhsm662rC15FRXmcjCk1xD771dFDx5jJ02ufAQQTn0etB2emNk4J9EZg/yWKpsn9BWGRw== optionalDependencies: fsevents "~2.3.2" @@ -4052,12 +3844,11 @@ slash@^3.0.0: resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== -smoldot@1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/smoldot/-/smoldot-1.0.4.tgz#e4c38cedad68d699a11b5b9ce72bb75c891bfd98" - integrity sha512-N3TazI1C4GGrseFH/piWyZCCCRJTRx2QhDfrUKRT4SzILlW5m8ayZ3QTKICcz1C/536T9cbHHJyP7afxI6Mi1A== +smoldot@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/smoldot/-/smoldot-2.0.1.tgz#c899cbb0827a010d3ca7944034f081786f533a4d" + integrity sha512-Wqw2fL/sELQByLSeeTX1Z/d0H4McmphPMx8vh6UZS/bIIDx81oU7s/drmx2iL/ME36uk++YxpRuJey8/MOyfOA== dependencies: - pako "^2.0.4" ws "^8.8.1" source-map-js@^1.0.2: @@ -4261,10 +4052,10 @@ tinybench@^2.5.0: resolved "https://registry.yarnpkg.com/tinybench/-/tinybench-2.5.0.tgz#4711c99bbf6f3e986f67eb722fed9cddb3a68ba5" integrity sha512-kRwSG8Zx4tjF9ZiyH4bhaebu+EDz1BOx9hOigYHlUW4xxI/wKIUQUqo018UlU4ar6ATPBsaMrdbKZ+tmPdohFA== -tinypool@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/tinypool/-/tinypool-0.6.0.tgz#c3640b851940abe2168497bb6e43b49fafb3ba7b" - integrity sha512-FdswUUo5SxRizcBc6b1GSuLpLjisa8N8qMyYoP3rl+bym+QauhtJP5bvZY1ytt8krKGmMLYIRl36HBZfeAoqhQ== +tinypool@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/tinypool/-/tinypool-0.7.0.tgz#88053cc99b4a594382af23190c609d93fddf8021" + integrity sha512-zSYNUlYSMhJ6Zdou4cJwo/p7w5nmAH17GRfU/ui3ctvjXFErXXkruT4MWW6poDeXgCaIBlGLrfU6TbTXxyGMww== tinyspy@^2.1.1: version "2.1.1" @@ -4356,11 +4147,6 @@ tslib@^2.1.0, tslib@^2.5.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.0.tgz#42bfed86f5787aeb41d031866c8f402429e0fddf" integrity sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg== -tslib@^2.5.3: - version "2.6.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.0.tgz#b295854684dbda164e181d259a22cd779dcd7bc3" - integrity sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA== - tslib@^2.6.0, tslib@^2.6.1, tslib@^2.6.2: version "2.6.2" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" @@ -4400,7 +4186,7 @@ type-check@~0.3.2: dependencies: prelude-ls "~1.1.2" -type-detect@^4.0.0, type-detect@^4.0.5: +type-detect@^4.0.0, type-detect@^4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== @@ -4535,46 +4321,46 @@ viem@^1.5.0: isomorphic-ws "5.0.0" ws "8.12.0" -vite-node@0.33.0: - version "0.33.0" - resolved "https://registry.yarnpkg.com/vite-node/-/vite-node-0.33.0.tgz#c6a3a527e0b8090da7436241bc875760ae0eef28" - integrity sha512-19FpHYbwWWxDr73ruNahC+vtEdza52kA90Qb3La98yZ0xULqV8A5JLNPUff0f5zID4984tW7l3DH2przTJUZSw== +vite-node@0.34.6: + version "0.34.6" + resolved "https://registry.yarnpkg.com/vite-node/-/vite-node-0.34.6.tgz#34d19795de1498562bf21541a58edcd106328a17" + integrity sha512-nlBMJ9x6n7/Amaz6F3zJ97EBwR2FkzhBRxF5e+jE6LA3yi6Wtc2lyTij1OnDMIr34v5g/tVQtsVAzhT0jc5ygA== dependencies: cac "^6.7.14" debug "^4.3.4" mlly "^1.4.0" pathe "^1.1.1" picocolors "^1.0.0" - vite "^3.0.0 || ^4.0.0" + vite "^3.0.0 || ^4.0.0 || ^5.0.0-0" -"vite@^3.0.0 || ^4.0.0": - version "4.3.9" - resolved "https://registry.yarnpkg.com/vite/-/vite-4.3.9.tgz#db896200c0b1aa13b37cdc35c9e99ee2fdd5f96d" - integrity sha512-qsTNZjO9NoJNW7KnOrgYwczm0WctJ8m/yqYAMAK9Lxt4SoySUfS5S8ia9K7JHpa3KEeMfyF8LoJ3c5NeBJy6pg== +"vite@^3.0.0 || ^4.0.0 || ^5.0.0-0", "vite@^3.1.0 || ^4.0.0 || ^5.0.0-0": + version "4.5.0" + resolved "https://registry.yarnpkg.com/vite/-/vite-4.5.0.tgz#ec406295b4167ac3bc23e26f9c8ff559287cff26" + integrity sha512-ulr8rNLA6rkyFAlVWw2q5YJ91v098AFQ2R0PRFwPzREXOUJQPtFUG0t+/ZikhaOCDqFoDhN6/v8Sq0o4araFAw== dependencies: - esbuild "^0.17.5" - postcss "^8.4.23" - rollup "^3.21.0" + esbuild "^0.18.10" + postcss "^8.4.27" + rollup "^3.27.1" optionalDependencies: fsevents "~2.3.2" -vitest@^0.33.0: - version "0.33.0" - resolved "https://registry.yarnpkg.com/vitest/-/vitest-0.33.0.tgz#e2be6153aec1d30e3460ac6d64265bf72da2551c" - integrity sha512-1CxaugJ50xskkQ0e969R/hW47za4YXDUfWJDxip1hwbnhUjYolpfUn2AMOulqG/Dtd9WYAtkHmM/m3yKVrEejQ== +vitest@^0.34.6: + version "0.34.6" + resolved "https://registry.yarnpkg.com/vitest/-/vitest-0.34.6.tgz#44880feeeef493c04b7f795ed268f24a543250d7" + integrity sha512-+5CALsOvbNKnS+ZHMXtuUC7nL8/7F1F2DnHGjSsszX8zCjWSSviphCb/NuS9Nzf4Q03KyyDRBAXhF/8lffME4Q== dependencies: "@types/chai" "^4.3.5" "@types/chai-subset" "^1.3.3" "@types/node" "*" - "@vitest/expect" "0.33.0" - "@vitest/runner" "0.33.0" - "@vitest/snapshot" "0.33.0" - "@vitest/spy" "0.33.0" - "@vitest/utils" "0.33.0" + "@vitest/expect" "0.34.6" + "@vitest/runner" "0.34.6" + "@vitest/snapshot" "0.34.6" + "@vitest/spy" "0.34.6" + "@vitest/utils" "0.34.6" acorn "^8.9.0" acorn-walk "^8.2.0" cac "^6.7.14" - chai "^4.3.7" + chai "^4.3.10" debug "^4.3.4" local-pkg "^0.4.3" magic-string "^0.30.1" @@ -4583,9 +4369,9 @@ vitest@^0.33.0: std-env "^3.3.3" strip-literal "^1.0.1" tinybench "^2.5.0" - tinypool "^0.6.0" - vite "^3.0.0 || ^4.0.0" - vite-node "0.33.0" + tinypool "^0.7.0" + vite "^3.1.0 || ^4.0.0 || ^5.0.0-0" + vite-node "0.34.6" why-is-node-running "^2.2.2" web-streams-polyfill@^3.0.3: @@ -4704,15 +4490,15 @@ wrappy@1: resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== -ws@8.12.0, ws@^8.8.1: +ws@8.12.0: version "8.12.0" resolved "https://registry.yarnpkg.com/ws/-/ws-8.12.0.tgz#485074cc392689da78e1828a9ff23585e06cddd8" integrity sha512-kU62emKIdKVeEIOIKVegvqpXMSTAMLJozpHZaJNDYqBjzlSYXQGviYwN1osDLJ9av68qHd4a2oSjd7yD4pacig== -ws@^8.13.0: - version "8.13.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.13.0.tgz#9a9fb92f93cf41512a0735c8f4dd09b8a1211cd0" - integrity sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA== +ws@^8.14.1, ws@^8.8.1: + version "8.14.2" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.14.2.tgz#6c249a806eb2db7a20d26d51e7709eab7b2e6c7f" + integrity sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g== xmlcreate@^2.0.4: version "2.0.4" From 82e5e614d3489d64c3024a41c47f5364fcf894ff Mon Sep 17 00:00:00 2001 From: Leechael Yim Date: Fri, 20 Oct 2023 09:14:13 +0800 Subject: [PATCH 9/9] chore(jssdk): bump beta version to 0.5.4-nightly-20231020 --- frontend/packages/sdk/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/packages/sdk/package.json b/frontend/packages/sdk/package.json index c29a6dfbd6..716e96f78c 100644 --- a/frontend/packages/sdk/package.json +++ b/frontend/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@phala/sdk", - "version": "0.5.3-nightly-20231013", + "version": "0.5.4-nightly-20231020", "description": "Phala Phat Contract JS SDK", "license": "Apache-2.0", "author": [