diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 98a27a3..cd6905d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,16 +13,16 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 with: - node-version: '16' - registry-url: 'https://registry.npmjs.org' - cache: 'yarn' + node-version: "16" + registry-url: "https://registry.npmjs.org" + cache: "yarn" - run: yarn - run: yarn test - run: yarn lint - run: yarn build - uses: actions/upload-artifact@v2 with: - name: 'phala-js-sdk' + name: "phala-js-sdk" path: | packages/sdk/dist/ packages/sdk/package.json diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index f59e096..c22fdfa 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -9,11 +9,11 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 with: - node-version: '16' - registry-url: 'https://registry.npmjs.org' - cache: 'yarn' + node-version: "16" + registry-url: "https://registry.npmjs.org" + cache: "yarn" - run: yarn - run: yarn workspace @phala/sdk build - - run: yarn workspace @phala/sdk publish + - run: yarn workspace @phala/sdk auto-publish env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.gitignore b/.gitignore index 665cc77..87785cd 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ dist tsconfig.tsbuildinfo .npmrc .eslintcache +browser diff --git a/.prettierrc b/.prettierrc index 653c512..27e719e 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,5 +1,4 @@ { - "semi": false, - "singleQuote": true, - "bracketSpacing": false + "proseWrap": "never", + "quoteProps": "consistent" } diff --git a/.vscode/settings.json b/.vscode/settings.json index a615589..a9df0ac 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -4,7 +4,7 @@ "source.fixAll.eslint": true, "source.sortImports": true }, - "eslint.workingDirectories": [{"pattern": "./packages/*/"}], + "eslint.workingDirectories": [{ "pattern": "./packages/*/" }], "cSpell.ignoreWords": [ "polkadot", "jotai", diff --git a/jest.config.cjs b/jest.config.cjs index b827c39..9d7be93 100644 --- a/jest.config.cjs +++ b/jest.config.cjs @@ -1,4 +1,4 @@ /** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */ module.exports = { - preset: 'ts-jest', -} + preset: "ts-jest", +}; diff --git a/package.json b/package.json index 2c76d17..9ee7890 100644 --- a/package.json +++ b/package.json @@ -22,5 +22,8 @@ "ts-node": "^10.9.1", "typescript": "^4.8.4" }, - "packageManager": "yarn@3.2.3" + "packageManager": "yarn@3.2.3", + "dependencies": { + "@polkadot/util": "^10.2.3" + } } diff --git a/packages/example/.eslintrc b/packages/example/.eslintrc index be5724a..5f29d73 100644 --- a/packages/example/.eslintrc +++ b/packages/example/.eslintrc @@ -7,6 +7,7 @@ ], "parser": "@typescript-eslint/parser", "rules": { - "no-console": "error" + "no-console": "error", + "@typescript-eslint/no-explicit-any": 0 } } diff --git a/packages/example/atoms/account.ts b/packages/example/atoms/account.ts index c918c7b..270019e 100644 --- a/packages/example/atoms/account.ts +++ b/packages/example/atoms/account.ts @@ -1,9 +1,9 @@ -import {atomWithStorage} from 'jotai/utils' -import type {InjectedAccountWithMeta} from '@polkadot/extension-inject/types' +import { atomWithStorage } from "jotai/utils"; +import type { InjectedAccountWithMeta } from "@polkadot/extension-inject/types"; const accountAtom = atomWithStorage<InjectedAccountWithMeta | null>( - 'atom:account', + "atom:account", null -) +); -export default accountAtom +export default accountAtom; diff --git a/packages/example/components/AccountSelect.tsx b/packages/example/components/AccountSelect.tsx index 0321bf4..ab650b7 100644 --- a/packages/example/components/AccountSelect.tsx +++ b/packages/example/components/AccountSelect.tsx @@ -1,56 +1,56 @@ -import {useState, useEffect} from 'react' -import type {InjectedAccountWithMeta} from '@polkadot/extension-inject/types' -import {useAtom} from 'jotai' -import {Select} from 'baseui/select' -import {LabelSmall, MonoParagraphXSmall} from 'baseui/typography' -import {Block} from 'baseui/block' -import {FormControl} from 'baseui/form-control' -import accountAtom from '../atoms/account' -import {enablePolkadotExtension} from '../lib/polkadotExtension' +import { useState, useEffect } from "react"; +import type { InjectedAccountWithMeta } from "@polkadot/extension-inject/types"; +import { useAtom } from "jotai"; +import { Select } from "baseui/select"; +import { LabelSmall, MonoParagraphXSmall } from "baseui/typography"; +import { Block } from "baseui/block"; +import { FormControl } from "baseui/form-control"; +import accountAtom from "../atoms/account"; +import { enablePolkadotExtension } from "../lib/polkadotExtension"; const trimAddress = (address: string) => - `${address.slice(0, 6)}…${address.slice(-6)}` + `${address.slice(0, 6)}…${address.slice(-6)}`; const AccountSelect = (): JSX.Element => { - const [error, setError] = useState(false) - const [account, setAccount] = useAtom(accountAtom) - const [options, setOptions] = useState<InjectedAccountWithMeta[]>([]) + const [error, setError] = useState(false); + const [account, setAccount] = useAtom(accountAtom); + const [options, setOptions] = useState<InjectedAccountWithMeta[]>([]); useEffect(() => { - let unsubscribe: () => void + let unsubscribe: () => void; const subscribeAccounts = async () => { - await enablePolkadotExtension() + await enablePolkadotExtension(); const handleAccounts = (accounts: InjectedAccountWithMeta[]): void => { - setOptions(accounts) - } - const {web3Accounts, web3AccountsSubscribe} = await import( - '@polkadot/extension-dapp' - ) - const accounts = await web3Accounts() - handleAccounts(accounts) - unsubscribe = await web3AccountsSubscribe(handleAccounts) - } + setOptions(accounts); + }; + const { web3Accounts, web3AccountsSubscribe } = await import( + "@polkadot/extension-dapp" + ); + const accounts = await web3Accounts(); + handleAccounts(accounts); + unsubscribe = await web3AccountsSubscribe(handleAccounts); + }; try { - subscribeAccounts() + subscribeAccounts(); } catch (err) { - setError(true) - throw err + setError(true); + throw err; } - return () => unsubscribe?.() - }, []) + return () => unsubscribe?.(); + }, []); useEffect(() => { if ( account && options.length && - !options.find(({address}) => address === account.address) + !options.find(({ address }) => address === account.address) ) { - setAccount(null) + setAccount(null); } - }, [options, account, setAccount]) + }, [options, account, setAccount]); return ( <Block padding="0 20px" flex="0"> @@ -63,23 +63,23 @@ const AccountSelect = (): JSX.Element => { }, }, }} - {...(error && {error: 'Polkadot{.js} extension error'})} + {...(error && { error: "Polkadot{.js} extension error" })} > <Select size="compact" placeholder="Select Account" options={options} - getOptionLabel={({option}) => + getOptionLabel={({ option }) => option && ( <> - <LabelSmall>{option.meta.name || 'Unknown'}</LabelSmall> + <LabelSmall>{option.meta.name || "Unknown"}</LabelSmall> <MonoParagraphXSmall as="div"> {trimAddress(option.address)} </MonoParagraphXSmall> </> ) } - getValueLabel={({option}) => ( + getValueLabel={({ option }) => ( <> <LabelSmall>{option.meta.name}</LabelSmall> <MonoParagraphXSmall as="div"> @@ -90,14 +90,14 @@ const AccountSelect = (): JSX.Element => { searchable={false} valueKey="address" value={account ? [account] : []} - onChange={({value}) => + onChange={({ value }) => setAccount((value[0] as InjectedAccountWithMeta) || null) } - overrides={{Root: {style: {width: '200px'}}}} + overrides={{ Root: { style: { width: "200px" } } }} ></Select> </FormControl> </Block> - ) -} + ); +}; -export default AccountSelect +export default AccountSelect; diff --git a/packages/example/components/ContractLoader.tsx b/packages/example/components/ContractLoader.tsx index c5eb527..f449879 100644 --- a/packages/example/components/ContractLoader.tsx +++ b/packages/example/components/ContractLoader.tsx @@ -1,59 +1,59 @@ -import {create} from '@phala/sdk' -import type {ApiPromise} from '@polkadot/api' -import {ContractPromise} from '@polkadot/api-contract' -import {Button} from 'baseui/button' -import {FormControl} from 'baseui/form-control' -import {Input} from 'baseui/input' -import {Textarea} from 'baseui/textarea' -import {toaster} from 'baseui/toast' -import {useAtom} from 'jotai' -import {focusAtom} from 'jotai/optics' -import {atomWithStorage} from 'jotai/utils' -import {useRef, VFC} from 'react' -import useIsClient from '../hooks/useIsClient' -import {createApi} from '../lib/polkadotApi' +import { create } from "@phala/sdk"; +import type { ApiPromise } from "@polkadot/api"; +import { ContractPromise } from "@polkadot/api-contract"; +import { Button } from "baseui/button"; +import { FormControl } from "baseui/form-control"; +import { Input } from "baseui/input"; +import { Textarea } from "baseui/textarea"; +import { toaster } from "baseui/toast"; +import { useAtom } from "jotai"; +import { focusAtom } from "jotai/optics"; +import { atomWithStorage } from "jotai/utils"; +import { useRef, VFC } from "react"; +import useIsClient from "../hooks/useIsClient"; +import { createApi } from "../lib/polkadotApi"; const endpointAtom = atomWithStorage<string>( - 'atom:endpoint', - 'ws://localhost:9944' -) + "atom:endpoint", + "ws://localhost:9944" +); const pruntimeURLAtom = atomWithStorage<string>( - 'atom:pruntime_url', - 'http://localhost:8000' -) + "atom:pruntime_url", + "http://localhost:8000" +); const contractsAtom = atomWithStorage< - Record<string, {contractId: string; metadata: string}> ->('atom:contracts', {}) + Record<string, { contractId: string; metadata: string }> +>("atom:contracts", {}); const ContractLoader: VFC<{ - name: string - onLoad: (res: {api: ApiPromise; contract: ContractPromise}) => void -}> = ({name, onLoad}) => { + name: string; + onLoad: (res: { api: ApiPromise; contract: ContractPromise }) => void; +}> = ({ name, onLoad }) => { const contractInfoAtom = useRef( focusAtom(contractsAtom, (optic) => optic.prop(name)) - ) - const [contractInfo, setContractInfo] = useAtom(contractInfoAtom.current) - const [endpoint, setEndpoint] = useAtom(endpointAtom) - const [pruntimeURL, setPruntimeURL] = useAtom(pruntimeURLAtom) - const {contractId = '', metadata = ''} = contractInfo || {} - const isClient = useIsClient() - if (!isClient) return null + ); + const [contractInfo, setContractInfo] = useAtom(contractInfoAtom.current); + const [endpoint, setEndpoint] = useAtom(endpointAtom); + const [pruntimeURL, setPruntimeURL] = useAtom(pruntimeURLAtom); + const { contractId = "", metadata = "" } = contractInfo || {}; + const isClient = useIsClient(); + if (!isClient) return null; const loadContract = async () => { try { - const api = await createApi(endpoint) + const api = await createApi(endpoint); const contract = new ContractPromise( - (await create({api, baseURL: pruntimeURL, contractId})).api, + (await create({ api, baseURL: pruntimeURL, contractId })).api, JSON.parse(metadata), contractId - ) - onLoad({api, contract}) - toaster.positive('Contract loaded successfully', {}) + ); + onLoad({ api, contract }); + toaster.positive("Contract loaded successfully", {}); } catch (err) { - toaster.negative((err as Error).message, {}) - throw err + toaster.negative((err as Error).message, {}); + throw err; } - } + }; return ( <> @@ -63,7 +63,7 @@ const ContractLoader: VFC<{ overrides={{ Input: { style: { - fontFamily: 'monospace', + fontFamily: "monospace", }, }, }} @@ -77,7 +77,7 @@ const ContractLoader: VFC<{ overrides={{ Input: { style: { - fontFamily: 'monospace', + fontFamily: "monospace", }, }, }} @@ -90,7 +90,7 @@ const ContractLoader: VFC<{ overrides={{ Input: { style: { - fontFamily: 'monospace', + fontFamily: "monospace", }, }, }} @@ -108,8 +108,8 @@ const ContractLoader: VFC<{ overrides={{ Input: { style: { - fontFamily: 'monospace', - height: '600px', + fontFamily: "monospace", + height: "600px", }, }, }} @@ -127,7 +127,7 @@ const ContractLoader: VFC<{ Load Contract </Button> </> - ) -} + ); +}; -export default ContractLoader +export default ContractLoader; diff --git a/packages/example/components/Layout.tsx b/packages/example/components/Layout.tsx index 5a800fa..02d5991 100644 --- a/packages/example/components/Layout.tsx +++ b/packages/example/components/Layout.tsx @@ -1,18 +1,18 @@ -import {FC} from 'react' -import Head from 'next/head' -import {useRouter} from 'next/router' -import {HeadingXLarge} from 'baseui/typography' -import {ToasterContainer} from 'baseui/toast' -import {Block} from 'baseui/block' -import {ChevronLeft} from 'baseui/icon' -import AccountSelect from './AccountSelect' -import Link from 'next/link' -import useIsClient from '../hooks/useIsClient' +import { FC } from "react"; +import Head from "next/head"; +import { useRouter } from "next/router"; +import { HeadingXLarge } from "baseui/typography"; +import { ToasterContainer } from "baseui/toast"; +import { Block } from "baseui/block"; +import { ChevronLeft } from "baseui/icon"; +import AccountSelect from "./AccountSelect"; +import Link from "next/link"; +import useIsClient from "../hooks/useIsClient"; -const Layout: FC<{title?: string}> = ({title, children}) => { - const {pathname} = useRouter() - const isClient = useIsClient() - const displayTitle = title || 'Phala SDK Example' +const Layout: FC<{ title?: string }> = ({ title, children }) => { + const { pathname } = useRouter(); + const isClient = useIsClient(); + const displayTitle = title || "Phala SDK Example"; return ( <Block width="100%" maxWidth="768px" margin="0 auto" padding="0 16px 24px"> @@ -28,14 +28,14 @@ const Layout: FC<{title?: string}> = ({title, children}) => { justifyContent="space-between" > <Block display="flex" alignItems="center"> - {pathname !== '/' && ( + {pathname !== "/" && ( <Link href="/"> <ChevronLeft size={36} overrides={{ Svg: { style: { - marginLeft: '-12px', + marginLeft: "-12px", }, }, }} @@ -52,10 +52,10 @@ const Layout: FC<{title?: string}> = ({title, children}) => { <ToasterContainer placement="topRight" autoHideDuration={3000} - overrides={{ToastBody: {style: {wordBreak: 'break-all'}}}} + overrides={{ ToastBody: { style: { wordBreak: "break-all" } } }} /> </Block> - ) -} + ); +}; -export default Layout +export default Layout; diff --git a/packages/example/global.d.ts b/packages/example/global.d.ts index 2612ffc..8af43c0 100644 --- a/packages/example/global.d.ts +++ b/packages/example/global.d.ts @@ -1,5 +1,5 @@ -import {NextPage} from 'next' +import { NextPage } from "next"; declare global { - type Page = NextPage & {title?: string} + type Page = NextPage & { title?: string }; } diff --git a/packages/example/hooks/useInterval.ts b/packages/example/hooks/useInterval.ts index 789899b..ffa2b5f 100644 --- a/packages/example/hooks/useInterval.ts +++ b/packages/example/hooks/useInterval.ts @@ -1,25 +1,25 @@ -import {useEffect, useLayoutEffect, useRef} from 'react' +import { useEffect, useLayoutEffect, useRef } from "react"; function useInterval(callback: () => void, delay: number | null) { - const savedCallback = useRef(callback) + const savedCallback = useRef(callback); // Remember the latest callback if it changes. useLayoutEffect(() => { - savedCallback.current = callback - }, [callback]) + savedCallback.current = callback; + }, [callback]); // Set up the interval. useEffect(() => { // Don't schedule if no delay is specified. // Note: 0 is a valid value for delay. if (!delay && delay !== 0) { - return + return; } - const id = setInterval(() => savedCallback.current(), delay) + const id = setInterval(() => savedCallback.current(), delay); - return () => clearInterval(id) - }, [delay]) + return () => clearInterval(id); + }, [delay]); } -export default useInterval +export default useInterval; diff --git a/packages/example/hooks/useIsClient.ts b/packages/example/hooks/useIsClient.ts index e4cb4f7..fb4a210 100644 --- a/packages/example/hooks/useIsClient.ts +++ b/packages/example/hooks/useIsClient.ts @@ -1,12 +1,12 @@ -import {useEffect, useState} from 'react' +import { useEffect, useState } from "react"; const useIsClient = (): boolean => { - const [mounted, setMounted] = useState(false) + const [mounted, setMounted] = useState(false); useEffect(() => { - setMounted(true) - }, []) + setMounted(true); + }, []); - return mounted -} + return mounted; +}; -export default useIsClient +export default useIsClient; diff --git a/packages/example/lib/copy.ts b/packages/example/lib/copy.ts index ef6e117..08a6771 100644 --- a/packages/example/lib/copy.ts +++ b/packages/example/lib/copy.ts @@ -1,7 +1,7 @@ -import {toaster} from 'baseui/toast' +import { toaster } from "baseui/toast"; export const copy = async (text: string) => { - await navigator.clipboard.writeText(text) + await navigator.clipboard.writeText(text); - toaster.positive('Copied to Clipboard', {}) -} + toaster.positive("Copied to Clipboard", {}); +}; diff --git a/packages/example/lib/polkadotApi.ts b/packages/example/lib/polkadotApi.ts index e375c50..cc0e5cc 100644 --- a/packages/example/lib/polkadotApi.ts +++ b/packages/example/lib/polkadotApi.ts @@ -1,9 +1,9 @@ -import {khalaDev} from '@phala/typedefs' -import {ApiPromise, WsProvider} from '@polkadot/api' -import {types as phalaSDKTypes} from '@phala/sdk' +import { khalaDev } from "@phala/typedefs"; +import { ApiPromise, WsProvider } from "@polkadot/api"; +import { types as phalaSDKTypes } from "@phala/sdk"; export const createApi = async (endpoint: string): Promise<ApiPromise> => { - const wsProvider = new WsProvider(endpoint) + const wsProvider = new WsProvider(endpoint); const api = await ApiPromise.create({ provider: wsProvider, @@ -11,7 +11,7 @@ export const createApi = async (endpoint: string): Promise<ApiPromise> => { ...khalaDev, ...phalaSDKTypes, }, - }) + }); - return api -} + return api; +}; diff --git a/packages/example/lib/polkadotExtension.ts b/packages/example/lib/polkadotExtension.ts index 2217956..3a4026e 100644 --- a/packages/example/lib/polkadotExtension.ts +++ b/packages/example/lib/polkadotExtension.ts @@ -1,31 +1,31 @@ -import type {InjectedAccountWithMeta} from '@polkadot/extension-inject/types' -import {Signer} from '@polkadot/types/types' +import type { InjectedAccountWithMeta } from "@polkadot/extension-inject/types"; +import { Signer } from "@polkadot/types/types"; -let enablePolkadotExtensionCache: Promise<void> +let enablePolkadotExtensionCache: Promise<void>; export const enablePolkadotExtension = async (): Promise<void> => { - if (enablePolkadotExtensionCache) return enablePolkadotExtensionCache + if (enablePolkadotExtensionCache) return enablePolkadotExtensionCache; enablePolkadotExtensionCache = (async () => { - const {web3Enable} = await import('@polkadot/extension-dapp') - const extensions = await web3Enable('Phala SDK Example') + const { web3Enable } = await import("@polkadot/extension-dapp"); + const extensions = await web3Enable("Phala SDK Example"); if (extensions.length === 0) { throw new Error( - 'No extension installed, or the user did not accept the authorization' - ) + "No extension installed, or the user did not accept the authorization" + ); } - })() + })(); - return enablePolkadotExtensionCache -} + return enablePolkadotExtensionCache; +}; export const getSigner = async ( account: InjectedAccountWithMeta ): Promise<Signer> => { - await enablePolkadotExtension() - const {web3FromSource} = await import('@polkadot/extension-dapp') - const injector = await web3FromSource(account.meta.source) - const signer = injector.signer + await enablePolkadotExtension(); + const { web3FromSource } = await import("@polkadot/extension-dapp"); + const injector = await web3FromSource(account.meta.source); + const signer = injector.signer; - return signer -} + return signer; +}; diff --git a/packages/example/next.config.mjs b/packages/example/next.config.mjs index d54ff92..1222e3b 100644 --- a/packages/example/next.config.mjs +++ b/packages/example/next.config.mjs @@ -2,10 +2,10 @@ const nextConfig = { reactStrictMode: true, webpack: function (config) { - config.externals = config.externals || {} - config.externals['styletron-server'] = 'styletron-server' - return config + config.externals = config.externals || {}; + config.externals["styletron-server"] = "styletron-server"; + return config; }, -} +}; -export default nextConfig +export default nextConfig; diff --git a/packages/example/pages/_app.tsx b/packages/example/pages/_app.tsx index 3ecdbe1..8ffe075 100644 --- a/packages/example/pages/_app.tsx +++ b/packages/example/pages/_app.tsx @@ -1,11 +1,11 @@ -import '../styles/globals.css' -import type {AppProps} from 'next/app' -import {Provider as StyletronProvider} from 'styletron-react' -import {LightTheme, BaseProvider} from 'baseui' -import Layout from '../components/Layout' -import {styletron} from '../styletron' +import "../styles/globals.css"; +import type { AppProps } from "next/app"; +import { Provider as StyletronProvider } from "styletron-react"; +import { LightTheme, BaseProvider } from "baseui"; +import Layout from "../components/Layout"; +import { styletron } from "../styletron"; -function MyApp({Component, pageProps}: AppProps & {Component: Page}) { +function MyApp({ Component, pageProps }: AppProps & { Component: Page }) { return ( <StyletronProvider value={styletron}> <BaseProvider theme={LightTheme}> @@ -14,6 +14,6 @@ function MyApp({Component, pageProps}: AppProps & {Component: Page}) { </Layout> </BaseProvider> </StyletronProvider> - ) + ); } -export default MyApp +export default MyApp; diff --git a/packages/example/pages/_document.tsx b/packages/example/pages/_document.tsx index d325779..857c51a 100644 --- a/packages/example/pages/_document.tsx +++ b/packages/example/pages/_document.tsx @@ -4,13 +4,13 @@ import Document, { Html, Main, NextScript, -} from 'next/document' -import {Server} from 'styletron-engine-atomic' -import {Provider as StyletronProvider} from 'styletron-react' -import {styletron} from '../styletron' +} from "next/document"; +import { Server } from "styletron-engine-atomic"; +import { Provider as StyletronProvider } from "styletron-react"; +import { styletron } from "../styletron"; // https://github.com/vercel/next.js/blob/canary/examples/with-styletron/pages/_document.js -class MyDocument extends Document<{stylesheets: any[]}> { +class MyDocument extends Document<{ stylesheets: any[] }> { static async getInitialProps(ctx: DocumentContext) { const renderPage = () => ctx.renderPage({ @@ -21,13 +21,13 @@ class MyDocument extends Document<{stylesheets: any[]}> { <App {...props} /> </StyletronProvider> ), - }) + }); const initialProps = await Document.getInitialProps({ ...ctx, renderPage, - }) - const stylesheets = (styletron as Server).getStylesheets() || [] - return {...initialProps, stylesheets} + }); + const stylesheets = (styletron as Server).getStylesheets() || []; + return { ...initialProps, stylesheets }; } render() { @@ -37,9 +37,9 @@ class MyDocument extends Document<{stylesheets: any[]}> { {this.props.stylesheets.map((sheet, i) => ( <style className="_styletron_hydrate_" - dangerouslySetInnerHTML={{__html: sheet.css}} + dangerouslySetInnerHTML={{ __html: sheet.css }} media={sheet.attrs.media} - data-hydrate={sheet.attrs['data-hydrate']} + data-hydrate={sheet.attrs["data-hydrate"]} key={i} /> ))} @@ -51,8 +51,8 @@ class MyDocument extends Document<{stylesheets: any[]}> { <NextScript /> </body> </Html> - ) + ); } } -export default MyDocument +export default MyDocument; diff --git a/packages/example/pages/api/flipper.ts b/packages/example/pages/api/flipper.ts index ac9df7a..7c3996f 100644 --- a/packages/example/pages/api/flipper.ts +++ b/packages/example/pages/api/flipper.ts @@ -1,41 +1,41 @@ -import {create, signCertificate} from '@phala/sdk' -import {Keyring} from '@polkadot/api' -import {ContractPromise} from '@polkadot/api-contract' -import {NextApiHandler} from 'next' -import metadata from '../../lib/flipperMetadata.json' -import {createApi} from '../../lib/polkadotApi' +import { create, signCertificate } from "@phala/sdk"; +import { Keyring } from "@polkadot/api"; +import { ContractPromise } from "@polkadot/api-contract"; +import { NextApiHandler } from "next"; +import metadata from "../../lib/flipperMetadata.json"; +import { createApi } from "../../lib/polkadotApi"; -const endpoint = 'ws://localhost:19944' -const baseURL = 'http://localhost:8000' +const endpoint = "ws://localhost:19944"; +const baseURL = "http://localhost:8000"; const contractId = - '0x0cd0a63ff934fb7a0ca0d4ff84b94fda97d9c5007c07b74147337f1d144c8e4f' + "0x0cd0a63ff934fb7a0ca0d4ff84b94fda97d9c5007c07b74147337f1d144c8e4f"; const flipper: NextApiHandler = async (req, res) => { - const api = await createApi(endpoint) + const api = await createApi(endpoint); const contract = new ContractPromise( - (await create({api, baseURL, contractId})).api, + (await create({ api, baseURL, contractId })).api, metadata, contractId - ) - const keyring = new Keyring({type: 'sr25519'}) - const alice = keyring.addFromUri('//Alice') + ); + const keyring = new Keyring({ type: "sr25519" }); + const alice = keyring.addFromUri("//Alice"); - if (req.method === 'GET') { + if (req.method === "GET") { const certificateData = await signCertificate({ api, pair: alice, - }) + }); - const {output} = await contract.query.get(certificateData as any, {}) - await api.disconnect() - return res.status(200).json(output?.toJSON()) + const { output } = await contract.query.get(certificateData as any, {}); + await api.disconnect(); + return res.status(200).json(output?.toJSON()); } - if (req.method === 'POST') { - const hash = await contract.tx.flip({}).signAndSend(alice) - await api.disconnect() - return res.status(200).json(hash) + if (req.method === "POST") { + const hash = await contract.tx.flip({}).signAndSend(alice); + await api.disconnect(); + return res.status(200).json(hash); } -} +}; -export default flipper +export default flipper; diff --git a/packages/example/pages/flipper.tsx b/packages/example/pages/flipper.tsx index e45718c..a2495b9 100644 --- a/packages/example/pages/flipper.tsx +++ b/packages/example/pages/flipper.tsx @@ -1,36 +1,36 @@ -import { CertificateData, signCertificate } from '@phala/sdk' -import type { ApiPromise } from '@polkadot/api' -import { ContractPromise } from '@polkadot/api-contract' -import { Button } from 'baseui/button' -import { ButtonGroup } from 'baseui/button-group' -import { toaster } from 'baseui/toast' -import { useAtom } from 'jotai' -import { useEffect, useState } from 'react' -import { default as account, default as accountAtom } from '../atoms/account' -import ContractLoader from '../components/ContractLoader' -import { getSigner } from '../lib/polkadotExtension' +import { CertificateData, signCertificate } from "@phala/sdk"; +import type { ApiPromise } from "@polkadot/api"; +import { ContractPromise } from "@polkadot/api-contract"; +import { Button } from "baseui/button"; +import { ButtonGroup } from "baseui/button-group"; +import { toaster } from "baseui/toast"; +import { useAtom } from "jotai"; +import { useEffect, useState } from "react"; +import { default as accountAtom } from "../atoms/account"; +import ContractLoader from "../components/ContractLoader"; +import { getSigner } from "../lib/polkadotExtension"; const Flipper: Page = () => { - const [account] = useAtom(accountAtom) - const [certificateData, setCertificateData] = useState<CertificateData>() - const [api, setApi] = useState<ApiPromise>() - const [contract, setContract] = useState<ContractPromise>() + const [account] = useAtom(accountAtom); + const [certificateData, setCertificateData] = useState<CertificateData>(); + const [api, setApi] = useState<ApiPromise>(); + const [contract, setContract] = useState<ContractPromise>(); useEffect( () => () => { - api?.disconnect() + api?.disconnect(); }, [api] - ) + ); useEffect(() => { - setCertificateData(undefined) - }, [account]) + setCertificateData(undefined); + }, [account]); const onSignCertificate = async () => { if (account && api) { try { - const signer = await getSigner(account) + const signer = await getSigner(account); // Save certificate data to state, or anywhere else you want like local storage setCertificateData( @@ -39,44 +39,49 @@ const Flipper: Page = () => { account, signer, }) - ) - toaster.positive('Certificate signed', {}) + ); + toaster.positive("Certificate signed", {}); } catch (err) { - toaster.negative((err as Error).message, {}) + toaster.negative((err as Error).message, {}); } } - } + }; const onQuery = async () => { - if (!certificateData || !contract) return - const {output} = await contract.query.get(certificateData as any, {}) + if (!certificateData || !contract) return; + const { output } = await contract.query.get(certificateData as any, {}); // eslint-disable-next-line no-console - console.log(output?.toHuman()) - toaster.info(JSON.stringify(output?.toHuman()), {}) - } + toaster.info(JSON.stringify(output?.toHuman()), {}); + }; const onCommand = async () => { - if (!contract || !account || !certificateData) return - const signer = await getSigner(account) + if (!contract || !account || !certificateData) return; + const signer = await getSigner(account); + + const { gasRequired, storageDeposit } = await contract.query.flip( + certificateData as any, + {} + ); - const { gasRequired, storageDeposit } = await contract.query.flip(certificateData as any, {}); - const options = { // value: 0, gasLimit: (gasRequired as any).refTime, - storageDepositLimit: storageDeposit.isCharge ? storageDeposit.asCharge : null - } + storageDepositLimit: storageDeposit.isCharge + ? storageDeposit.asCharge + : null, + }; - contract.tx.flip(options).signAndSend(account.address, {signer}, (status) => { - console.log('status', status) - if (status.isInBlock) { - toaster.positive('In Block', {}) - } - if (status.isCompleted) { - toaster.positive('Completed', {}) - } - }) - } + contract.tx + .flip(options) + .signAndSend(account.address, { signer }, (status) => { + if (status.isInBlock) { + toaster.positive("In Block", {}); + } + if (status.isCompleted) { + toaster.positive("Completed", {}); + } + }); + }; return contract ? ( <> @@ -95,14 +100,14 @@ const Flipper: Page = () => { ) : ( <ContractLoader name="flipper" - onLoad={({api, contract}) => { - setApi(api) - setContract(contract) + onLoad={({ api, contract }) => { + setApi(api); + setContract(contract); }} /> - ) -} + ); +}; -Flipper.title = 'Flipper' +Flipper.title = "Flipper"; -export default Flipper +export default Flipper; diff --git a/packages/example/pages/get-ip.tsx b/packages/example/pages/get-ip.tsx index f3ba981..60e78d2 100644 --- a/packages/example/pages/get-ip.tsx +++ b/packages/example/pages/get-ip.tsx @@ -1,36 +1,36 @@ -import type {ApiPromise} from '@polkadot/api' -import {ContractPromise} from '@polkadot/api-contract' -import {useEffect, useState} from 'react' -import {signCertificate, CertificateData} from '@phala/sdk' -import {Button} from 'baseui/button' -import {ButtonGroup} from 'baseui/button-group' -import {toaster} from 'baseui/toast' -import {useAtom} from 'jotai' -import accountAtom from '../atoms/account' -import {getSigner} from '../lib/polkadotExtension' -import ContractLoader from '../components/ContractLoader' +import type { ApiPromise } from "@polkadot/api"; +import { ContractPromise } from "@polkadot/api-contract"; +import { useEffect, useState } from "react"; +import { signCertificate, CertificateData } from "@phala/sdk"; +import { Button } from "baseui/button"; +import { ButtonGroup } from "baseui/button-group"; +import { toaster } from "baseui/toast"; +import { useAtom } from "jotai"; +import accountAtom from "../atoms/account"; +import { getSigner } from "../lib/polkadotExtension"; +import ContractLoader from "../components/ContractLoader"; const GetIP: Page = () => { - const [account] = useAtom(accountAtom) - const [certificateData, setCertificateData] = useState<CertificateData>() - const [api, setApi] = useState<ApiPromise>() - const [contract, setContract] = useState<ContractPromise>() + const [account] = useAtom(accountAtom); + const [certificateData, setCertificateData] = useState<CertificateData>(); + const [api, setApi] = useState<ApiPromise>(); + const [contract, setContract] = useState<ContractPromise>(); useEffect( () => () => { - api?.disconnect() + api?.disconnect(); }, [api] - ) + ); useEffect(() => { - setCertificateData(undefined) - }, [account]) + setCertificateData(undefined); + }, [account]); const onSignCertificate = async () => { if (account && api) { try { - const signer = await getSigner(account) + const signer = await getSigner(account); // Save certificate data to state, or anywhere else you want like local storage setCertificateData( @@ -39,21 +39,21 @@ const GetIP: Page = () => { account, signer, }) - ) - toaster.positive('Certificate signed', {}) + ); + toaster.positive("Certificate signed", {}); } catch (err) { - toaster.negative((err as Error).message, {}) + toaster.negative((err as Error).message, {}); } } - } + }; const onQuery = async () => { - if (!certificateData || !contract) return - const {output} = await contract.query.getIp(certificateData as any, {}) + if (!certificateData || !contract) return; + const { output } = await contract.query.getIp(certificateData as any, {}); // eslint-disable-next-line no-console - console.log(output?.toHuman()) - toaster.info(JSON.stringify(output?.toHuman()), {}) - } + console.log(output?.toHuman()); + toaster.info(JSON.stringify(output?.toHuman()), {}); + }; return contract ? ( <> @@ -69,14 +69,14 @@ const GetIP: Page = () => { ) : ( <ContractLoader name="getIP" - onLoad={({api, contract}) => { - setApi(api) - setContract(contract) + onLoad={({ api, contract }) => { + setApi(api); + setContract(contract); }} /> - ) -} + ); +}; -GetIP.title = 'Get IP' +GetIP.title = "Get IP"; -export default GetIP +export default GetIP; diff --git a/packages/example/pages/index.tsx b/packages/example/pages/index.tsx index b24719e..35dc49a 100644 --- a/packages/example/pages/index.tsx +++ b/packages/example/pages/index.tsx @@ -1,14 +1,14 @@ -import type {NextPage} from 'next' -import Head from 'next/head' -import Link from 'next/link' -import {ListItem, ListItemLabel} from 'baseui/list' -import {StyledLink} from 'baseui/link' +import type { NextPage } from "next"; +import Head from "next/head"; +import Link from "next/link"; +import { ListItem, ListItemLabel } from "baseui/list"; +import { StyledLink } from "baseui/link"; const LINKS: [string, string][] = [ - ['/flipper', 'Flipper'], - ['/get-ip', 'Get IP'], - ['/redeem-poap', 'Redeem POAP'], -] + ["/flipper", "Flipper"], + ["/get-ip", "Get IP"], + ["/redeem-poap", "Redeem POAP"], +]; const Home: NextPage = () => { return ( @@ -29,7 +29,7 @@ const Home: NextPage = () => { ))} </ol> </div> - ) -} + ); +}; -export default Home +export default Home; diff --git a/packages/example/pages/redeem-poap.tsx b/packages/example/pages/redeem-poap.tsx index bdb4603..b2aa9aa 100644 --- a/packages/example/pages/redeem-poap.tsx +++ b/packages/example/pages/redeem-poap.tsx @@ -1,99 +1,99 @@ -import {CertificateData, signCertificate} from '@phala/sdk' -import {ApiPromise, Keyring} from '@polkadot/api' -import {ContractPromise} from '@polkadot/api-contract' -import {u8aToHex} from '@polkadot/util' -import type {Theme} from 'baseui' -import {StatefulPanel} from 'baseui/accordion' -import {Block} from 'baseui/block' -import {Button} from 'baseui/button' -import {Input} from 'baseui/input' -import {StyledLink} from 'baseui/link' -import {Textarea} from 'baseui/textarea' -import {toaster} from 'baseui/toast' -import {HeadingMedium, ParagraphSmall} from 'baseui/typography' -import {useAtom} from 'jotai' -import {Key, useEffect, useRef, useState} from 'react' -import accountAtom from '../atoms/account' -import ContractLoader from '../components/ContractLoader' -import useInterval from '../hooks/useInterval' -import {copy} from '../lib/copy' -import {getSigner} from '../lib/polkadotExtension' +import { CertificateData, signCertificate } from "@phala/sdk"; +import { ApiPromise, Keyring } from "@polkadot/api"; +import { ContractPromise } from "@polkadot/api-contract"; +import { u8aToHex } from "@polkadot/util"; +import type { Theme } from "baseui"; +import { StatefulPanel } from "baseui/accordion"; +import { Block } from "baseui/block"; +import { Button } from "baseui/button"; +import { Input } from "baseui/input"; +import { StyledLink } from "baseui/link"; +import { Textarea } from "baseui/textarea"; +import { toaster } from "baseui/toast"; +import { HeadingMedium, ParagraphSmall } from "baseui/typography"; +import { useAtom } from "jotai"; +import { Key, useEffect, useRef, useState } from "react"; +import accountAtom from "../atoms/account"; +import ContractLoader from "../components/ContractLoader"; +import useInterval from "../hooks/useInterval"; +import { copy } from "../lib/copy"; +import { getSigner } from "../lib/polkadotExtension"; const RedeemPOAP: Page = () => { // Basic states for contract interaction - const [account] = useAtom(accountAtom) - const [certificateData, setCertificateData] = useState<CertificateData>() - const [api, setApi] = useState<ApiPromise>() - const [contract, setContract] = useState<ContractPromise>() + const [account] = useAtom(accountAtom); + const [certificateData, setCertificateData] = useState<CertificateData>(); + const [api, setApi] = useState<ApiPromise>(); + const [contract, setContract] = useState<ContractPromise>(); // UI-related states - const [gist, setGist] = useState('') - const [gistURL, setGistURL] = useState('') - const [redemptionCode, setRedemptionCode] = useState('') - const [verified, setVerified] = useState(false) - const [devParam, setDevParam] = useState('') - const redemptionCodeToastKey = useRef<Key>() + const [gist, setGist] = useState(""); + const [gistURL, setGistURL] = useState(""); + const [redemptionCode, setRedemptionCode] = useState(""); + const [verified, setVerified] = useState(false); + const [devParam, setDevParam] = useState(""); + const redemptionCodeToastKey = useRef<Key>(); useEffect( () => () => { - api?.disconnect() + api?.disconnect(); }, [api] - ) + ); // Reset the UI when the selected account is changed useEffect(() => { if (account) { - const keyring = new Keyring() + const keyring = new Keyring(); setGist( `This gist is owned by address: ${u8aToHex( keyring.decodeAddress(account.address) )}` - ) + ); } else { - setGist('') + setGist(""); } - setVerified(false) - setGistURL('') - setRedemptionCode('') - setCertificateData(undefined) - }, [account]) + setVerified(false); + setGistURL(""); + setRedemptionCode(""); + setCertificateData(undefined); + }, [account]); // Try to read the POAP code from the Fat Contract const getRedemptionCode = async () => { - if (!certificateData || !contract) return + if (!certificateData || !contract) return; if (!redemptionCodeToastKey.current) { redemptionCodeToastKey.current = toaster.info( - 'Requesting POAP redemption code...', + "Requesting POAP redemption code...", { autoHideDuration: 0, } - ) + ); } // Send a query to the POAP contract (`FatSample::my_poap()`) - const {output} = await contract.query.myPoap(certificateData as any, {}) - const code = output?.toString() + const { output } = await contract.query.myPoap(certificateData as any, {}); + const code = output?.toString(); if (code) { - toaster.clear(redemptionCodeToastKey.current) - setRedemptionCode(code) + toaster.clear(redemptionCodeToastKey.current); + setRedemptionCode(code); } - } + }; // Once the Gist is attested, we start to refresh the redemption code every 2s useInterval( () => { - getRedemptionCode() + getRedemptionCode(); }, verified && !redemptionCode ? 2000 : null - ) + ); const onSignCertificate = async () => { if (account && api) { try { - const signer = await getSigner(account) + const signer = await getSigner(account); // Save certificate data to state, or anywhere else you want like local storage setCertificateData( @@ -102,72 +102,72 @@ const RedeemPOAP: Page = () => { account, signer, }) - ) - toaster.positive('Certificate signed', {}) + ); + toaster.positive("Certificate signed", {}); } catch (err) { - toaster.negative((err as Error).message, {}) + toaster.negative((err as Error).message, {}); } } - } + }; // Logic of the Verify button const onVerify = async () => { - if (!certificateData || !contract || !account) return - setVerified(false) + if (!certificateData || !contract || !account) return; + setVerified(false); // Send a query to attest the gist from the given url. - const {output} = await contract.query.attestGist( + const { output } = await contract.query.attestGist( certificateData as any, {}, gistURL - ) + ); // outputJson is a `Result<SignedAttestation>` - const outputJson = output?.toJSON() as any + const outputJson = output?.toJSON() as any; if (outputJson.ok) { - toaster.positive('Gist verified successfully', {}) + toaster.positive("Gist verified successfully", {}); // We have received the attestation from the worker. Now send a command to redeem the POAP // with the attestation. - const toastKey = toaster.info('Sending redeem transaction...', { + const toastKey = toaster.info("Sending redeem transaction...", { autoHideDuration: 0, - }) + }); try { // Send the command - const signer = await getSigner(account) + const signer = await getSigner(account); await contract.tx .redeem({}, outputJson.ok) - .signAndSend(account.address, {signer}, (status) => { + .signAndSend(account.address, { signer }, (status) => { if (status.isFinalized) { - toaster.clear(toastKey) - toaster.positive('Transaction is finalized', {}) + toaster.clear(toastKey); + toaster.positive("Transaction is finalized", {}); // After the transaction is included in a finalized block, we start to poll the Fat // Contract to see if we can get the redemption code. This will start the 2s timer. - setVerified(true) + setVerified(true); } - }) + }); } catch (err) { - toaster.clear(toastKey) - toaster.negative((err as Error).message, {}) + toaster.clear(toastKey); + toaster.negative((err as Error).message, {}); } } else { - toaster.negative(outputJson.err, {}) + toaster.negative(outputJson.err, {}); } - } + }; return contract ? ( certificateData ? ( <> <HeadingMedium as="h1">1. Create a Gist</HeadingMedium> <ParagraphSmall> - Create a gist on{' '} + Create a gist on{" "} <StyledLink href="https://gist.github.com/" target="_blank" rel="noreferrer noopener" > GitHub - </StyledLink>{' '} + </StyledLink>{" "} with the following: </ParagraphSmall> @@ -175,7 +175,7 @@ const RedeemPOAP: Page = () => { <Input overrides={{ Root: { - style: ({$theme}) => ({ + style: ({ $theme }) => ({ flex: 1, marginRight: $theme.sizing.scale400, }), @@ -201,7 +201,7 @@ const RedeemPOAP: Page = () => { placeholder="https://gist.githubusercontent.com/..." overrides={{ Root: { - style: ({$theme}) => ({ + style: ({ $theme }) => ({ flex: 1, marginRight: $theme.sizing.scale400, }), @@ -211,7 +211,7 @@ const RedeemPOAP: Page = () => { /> <Button disabled={ - !gistURL.startsWith('https://gist.githubusercontent.com/') + !gistURL.startsWith("https://gist.githubusercontent.com/") } onClick={onVerify} kind="secondary" @@ -232,7 +232,7 @@ const RedeemPOAP: Page = () => { <Input overrides={{ Root: { - style: ({$theme}) => ({ + style: ({ $theme }) => ({ flex: 1, marginRight: $theme.sizing.scale400, }), @@ -254,7 +254,7 @@ const RedeemPOAP: Page = () => { title="Dev Options" overrides={{ PanelContainer: { - style: ({$theme}) => ({marginTop: $theme.sizing.scale1000}), + style: ({ $theme }) => ({ marginTop: $theme.sizing.scale1000 }), }, }} > @@ -266,27 +266,27 @@ const RedeemPOAP: Page = () => { <Button overrides={{ Root: { - style: ({$theme}: {$theme: Theme}) => ({ + style: ({ $theme }: { $theme: Theme }) => ({ marginTop: $theme.sizing.scale400, }), }, }} onClick={async () => { - if (!account || !contract) return - const signer = await getSigner(account) + if (!account || !contract) return; + const signer = await getSigner(account); try { // Send a command to set the POAP code. Must be signed by the admin account. await contract.tx .adminSetPoapCode({}, JSON.parse(devParam)) - .signAndSend(account.address, {signer}, (status) => { + .signAndSend(account.address, { signer }, (status) => { if (status.isFinalized) { - toaster.positive('Transaction is finalized', {}) + toaster.positive("Transaction is finalized", {}); } - }) + }); } catch (err) { - toaster.negative((err as Error).message, {}) - throw err + toaster.negative((err as Error).message, {}); + throw err; } }} > @@ -302,14 +302,14 @@ const RedeemPOAP: Page = () => { ) : ( <ContractLoader name="redeemPOAP" - onLoad={({api, contract}) => { - setApi(api) - setContract(contract) + onLoad={({ api, contract }) => { + setApi(api); + setContract(contract); }} /> - ) -} + ); +}; -RedeemPOAP.title = 'Redeem POAP' +RedeemPOAP.title = "Redeem POAP"; -export default RedeemPOAP +export default RedeemPOAP; diff --git a/packages/example/styletron.ts b/packages/example/styletron.ts index a7c2722..86591bb 100644 --- a/packages/example/styletron.ts +++ b/packages/example/styletron.ts @@ -1,13 +1,13 @@ -import {Client, Server} from 'styletron-engine-atomic' +import { Client, Server } from "styletron-engine-atomic"; const getHydrateClass = () => document.getElementsByClassName( - '_styletron_hydrate_' - ) as HTMLCollectionOf<HTMLStyleElement> + "_styletron_hydrate_" + ) as HTMLCollectionOf<HTMLStyleElement>; export const styletron = - typeof window === 'undefined' + typeof window === "undefined" ? new Server() : new Client({ hydrate: getHydrateClass(), - }) + }); diff --git a/packages/sdk/.eslintrc b/packages/sdk/.eslintrc index 593e0ca..d801206 100644 --- a/packages/sdk/.eslintrc +++ b/packages/sdk/.eslintrc @@ -11,6 +11,7 @@ ], "parser": "@typescript-eslint/parser", "rules": { - "no-console": "error" + "no-console": "error", + "@typescript-eslint/no-explicit-any": 0 } } diff --git a/packages/sdk/@types/polkadot-js.d.ts b/packages/sdk/@types/polkadot-js.d.ts deleted file mode 100644 index 6020c08..0000000 --- a/packages/sdk/@types/polkadot-js.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -import type {ApiTypes} from '@polkadot/api/types' -import type {AugmentedQueryAt} from '@polkadot/api/types/storage' -import type {Option, Vec} from '@polkadot/types/codec' -import type {u128} from '@polkadot/types/primitive' -import type {Codec, Observable} from '@polkadot/types/types' -import type { - AccountId32, - H256, - Sr25519Signature, -} from '@polkadot/types/interfaces' - -type ContractId = H256 | string - -type ContractClusterId = H256 | string - -interface BasicContractInfo extends Codec { - deployer: AccountId32 - cluster: ContractClusterId -} - -interface ClusterInfo extends Codec { - owner: AccountId32 - permission: unknown // @fixme ClusterPermission<AccountId> - workers: Vec<Sr25519Signature> - systemContract: ContractId - gasPrice: u128 - depositPerItem: u128 - depositPerByte: u128 -} - -declare module '@polkadot/api/types/storage' { - export interface AugmentedQueries<ApiType extends ApiTypes> { - phalaFatContracts: { - contracts: AugmentedQueryAt< - ApiType, - (contractId?: ContractId) => Observable<Option<BasicContractInfo>> - > - - clusters: AugmentedQueryAt< - ApiType, - (clusterId?: ContractClusterId) => Observable<Option<ClusterInfo>> - > - } - } -} diff --git a/packages/sdk/README.md b/packages/sdk/README.md index c2464af..322cec4 100644 --- a/packages/sdk/README.md +++ b/packages/sdk/README.md @@ -106,7 +106,7 @@ With `Keyring`, you can create it with a keypair: const certificateData = await signCertificate({ api, pair: keypair, -}) +}); ``` Send a query with the certificate. diff --git a/packages/sdk/edgeware.json b/packages/sdk/edgeware.json new file mode 100644 index 0000000..d7803bb --- /dev/null +++ b/packages/sdk/edgeware.json @@ -0,0 +1,5 @@ +{ + "jsonrpc": "2.0", + "result": "0x6d6574610b6c1853797374656d011853797374656d34304163636f756e744e6f6e636501010130543a3a4163636f756e74496420543a3a496e646578001000000000047c2045787472696e73696373206e6f6e636520666f72206163636f756e74732e3845787472696e736963436f756e7400000c753332040004b820546f74616c2065787472696e7369637320636f756e7420666f72207468652063757272656e7420626c6f636b2e4c416c6c45787472696e73696373576569676874000018576569676874040004150120546f74616c2077656967687420666f7220616c6c2065787472696e736963732070757420746f6765746865722c20666f72207468652063757272656e7420626c6f636b2e40416c6c45787472696e736963734c656e00000c753332040004410120546f74616c206c656e6774682028696e2062797465732920666f7220616c6c2065787472696e736963732070757420746f6765746865722c20666f72207468652063757272656e7420626c6f636b2e24426c6f636b4861736801010138543a3a426c6f636b4e756d6265721c543a3a48617368008000000000000000000000000000000000000000000000000000000000000000000498204d6170206f6620626c6f636b206e756d6265727320746f20626c6f636b206861736865732e3445787472696e736963446174610101010c7533321c5665633c75383e000400043d012045787472696e73696373206461746120666f72207468652063757272656e7420626c6f636b20286d61707320616e2065787472696e736963277320696e64657820746f206974732064617461292e184e756d626572010038543a3a426c6f636b4e756d6265721000000000040901205468652063757272656e7420626c6f636b206e756d626572206265696e672070726f6365737365642e205365742062792060657865637574655f626c6f636b602e28506172656e744861736801001c543a3a4861736880000000000000000000000000000000000000000000000000000000000000000004702048617368206f66207468652070726576696f757320626c6f636b2e3845787472696e73696373526f6f7401001c543a3a486173688000000000000000000000000000000000000000000000000000000000000000000415012045787472696e7369637320726f6f74206f66207468652063757272656e7420626c6f636b2c20616c736f2070617274206f662074686520626c6f636b206865616465722e1844696765737401002c4469676573744f663c543e040004f020446967657374206f66207468652063757272656e7420626c6f636b2c20616c736f2070617274206f662074686520626c6f636b206865616465722e184576656e747301008c5665633c4576656e745265636f72643c543a3a4576656e742c20543a3a486173683e3e040004a0204576656e7473206465706f736974656420666f72207468652063757272656e7420626c6f636b2e284576656e74436f756e740100284576656e74496e646578100000000004b820546865206e756d626572206f66206576656e747320696e2074686520604576656e74733c543e60206c6973742e2c4576656e74546f706963730101011c543a3a48617368845665633c28543a3a426c6f636b4e756d6265722c204576656e74496e646578293e000400282501204d617070696e67206265747765656e206120746f7069632028726570726573656e74656420627920543a3a486173682920616e64206120766563746f72206f6620696e646578657394206f66206576656e747320696e2074686520603c4576656e74733c543e3e60206c6973742e00510120416c6c20746f70696320766563746f727320686176652064657465726d696e69737469632073746f72616765206c6f636174696f6e7320646570656e64696e67206f6e2074686520746f7069632e2054686973450120616c6c6f7773206c696768742d636c69656e747320746f206c6576657261676520746865206368616e67657320747269652073746f7261676520747261636b696e67206d656368616e69736d20616e64e420696e2063617365206f66206368616e67657320666574636820746865206c697374206f66206576656e7473206f6620696e7465726573742e004d01205468652076616c756520686173207468652074797065206028543a3a426c6f636b4e756d6265722c204576656e74496e646578296020626563617573652069662077652075736564206f6e6c79206a7573744d012074686520604576656e74496e64657860207468656e20696e20636173652069662074686520746f70696320686173207468652073616d6520636f6e74656e7473206f6e20746865206e65787420626c6f636b0101206e6f206e6f74696669636174696f6e2077696c6c20626520747269676765726564207468757320746865206576656e74206d69676874206265206c6f73742e01242866696c6c5f626c6f636b0004210120412062696720646973706174636820746861742077696c6c20646973616c6c6f7720616e79206f74686572207472616e73616374696f6e20746f20626520696e636c756465642e1872656d61726b041c5f72656d61726b1c5665633c75383e046c204d616b6520736f6d65206f6e2d636861696e2072656d61726b2e387365745f686561705f7061676573041470616765730c75363404fc2053657420746865206e756d626572206f6620706167657320696e2074686520576562417373656d626c7920656e7669726f6e6d656e74277320686561702e207365745f636f64650410636f64651c5665633c75383e04682053657420746865206e65772072756e74696d6520636f64652e5c7365745f636f64655f776974686f75745f636865636b730410636f64651c5665633c75383e041d012053657420746865206e65772072756e74696d6520636f646520776974686f757420646f696e6720616e7920636865636b73206f662074686520676976656e2060636f6465602e5c7365745f6368616e6765735f747269655f636f6e666967044c6368616e6765735f747269655f636f6e666967804f7074696f6e3c4368616e67657354726965436f6e66696775726174696f6e3e04a02053657420746865206e6577206368616e676573207472696520636f6e66696775726174696f6e2e2c7365745f73746f7261676504146974656d73345665633c4b657956616c75653e046c2053657420736f6d65206974656d73206f662073746f726167652e306b696c6c5f73746f7261676504106b657973205665633c4b65793e0478204b696c6c20736f6d65206974656d732066726f6d2073746f726167652e2c6b696c6c5f70726566697804187072656669780c4b6579041501204b696c6c20616c6c2073746f72616765206974656d7320776974682061206b657920746861742073746172747320776974682074686520676976656e207072656669782e010c4045787472696e7369635375636365737304304469737061746368496e666f049420416e2065787472696e73696320636f6d706c65746564207375636365737366756c6c792e3c45787472696e7369634661696c6564083444697370617463684572726f72304469737061746368496e666f045420416e2065787472696e736963206661696c65642e2c436f64655570646174656400045420603a636f6465602077617320757064617465642e00143c496e76616c6964537065634e616d6508150120546865206e616d65206f662073706563696669636174696f6e20646f6573206e6f74206d61746368206265747765656e207468652063757272656e742072756e74696d655420616e6420746865206e65772072756e74696d652e7c5370656356657273696f6e4e6f74416c6c6f776564546f4465637265617365084501205468652073706563696669636174696f6e2076657273696f6e206973206e6f7420616c6c6f77656420746f206465637265617365206265747765656e207468652063757272656e742072756e74696d655420616e6420746865206e65772072756e74696d652e7c496d706c56657273696f6e4e6f74416c6c6f776564546f44656372656173650849012054686520696d706c656d656e746174696f6e2076657273696f6e206973206e6f7420616c6c6f77656420746f206465637265617365206265747765656e207468652063757272656e742072756e74696d655420616e6420746865206e65772072756e74696d652e7c537065634f72496d706c56657273696f6e4e656564546f496e637265617365083501205468652073706563696669636174696f6e206f722074686520696d706c656d656e746174696f6e2076657273696f6e206e65656420746f20696e637265617365206265747765656e20746865942063757272656e742072756e74696d6520616e6420746865206e65772072756e74696d652e744661696c6564546f4578747261637452756e74696d6556657273696f6e0cf0204661696c656420746f2065787472616374207468652072756e74696d652076657273696f6e2066726f6d20746865206e65772072756e74696d652e000d01204569746865722063616c6c696e672060436f72655f76657273696f6e60206f72206465636f64696e67206052756e74696d6556657273696f6e60206661696c65642e1c5574696c697479011c5574696c69747904244d756c74697369677300020530543a3a4163636f756e744964205b75383b2033325dd04d756c74697369673c543a3a426c6f636b4e756d6265722c2042616c616e63654f663c543e2c20543a3a4163636f756e7449643e02040004942054686520736574206f66206f70656e206d756c7469736967206f7065726174696f6e732e0114146261746368041463616c6c735c5665633c3c542061732054726169743e3a3a43616c6c3e48802053656e642061206261746368206f662064697370617463682063616c6c732e00ec20546869732077696c6c206578656375746520756e74696c20746865206669727374206f6e65206661696c7320616e64207468656e2073746f702e007c204d61792062652063616c6c65642066726f6d20616e79206f726967696e2e00f0202d206063616c6c73603a205468652063616c6c7320746f20626520646973706174636865642066726f6d207468652073616d65206f726967696e2e002c2023203c7765696768743ea4202d205468652073756d206f66207468652077656967687473206f6620746865206063616c6c73602e34202d204f6e65206576656e742e302023203c2f7765696768743e00590120546869732077696c6c2072657475726e20604f6b6020696e20616c6c2063697263756d7374616e6365732e20546f2064657465726d696e65207468652073756363657373206f66207468652062617463682c20616e3501206576656e74206973206465706f73697465642e20496620612063616c6c206661696c656420616e64207468652062617463682077617320696e7465727275707465642c207468656e20746865590120604261746368496e74657272757074656460206576656e74206973206465706f73697465642c20616c6f6e67207769746820746865206e756d626572206f66207375636365737366756c2063616c6c73206d616465510120616e6420746865206572726f72206f6620746865206661696c65642063616c6c2e20496620616c6c2077657265207375636365737366756c2c207468656e2074686520604261746368436f6d706c657465646050206576656e74206973206465706f73697465642e1861735f7375620814696e6465780c7531361063616c6c5c426f783c3c542061732054726169743e3a3a43616c6c3e1ce02053656e6420612063616c6c207468726f75676820616e20696e64657865642070736575646f6e796d206f66207468652073656e6465722e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e002c2023203c7765696768743e70202d2054686520776569676874206f6620746865206063616c6c602e302023203c2f7765696768743e2061735f6d756c746910247468726573686f6c640c753136446f746865725f7369676e61746f72696573445665633c543a3a4163636f756e7449643e3c6d617962655f74696d65706f696e74844f7074696f6e3c54696d65706f696e743c543a3a426c6f636b4e756d6265723e3e1063616c6c5c426f783c3c542061732054726169743e3a3a43616c6c3ea4590120526567697374657220617070726f76616c20666f72206120646973706174636820746f206265206d6164652066726f6d20612064657465726d696e697374696320636f6d706f73697465206163636f756e74206966fc20617070726f766564206279206120746f74616c206f6620607468726573686f6c64202d203160206f6620606f746865725f7369676e61746f72696573602e00b42049662074686572652061726520656e6f7567682c207468656e206469737061746368207468652063616c6c2e005101205061796d656e743a20604d756c74697369674465706f73697442617365602077696c6c20626520726573657276656420696620746869732069732074686520666972737420617070726f76616c2c20706c7573610120607468726573686f6c64602074696d657320604d756c74697369674465706f736974466163746f72602e2049742069732072657475726e6564206f6e636520746869732064697370617463682068617070656e73206f72382069732063616e63656c6c65642e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e005901202d20607468726573686f6c64603a2054686520746f74616c206e756d626572206f6620617070726f76616c7320666f722074686973206469737061746368206265666f72652069742069732065786563757465642e4501202d20606f746865725f7369676e61746f72696573603a20546865206163636f756e747320286f74686572207468616e207468652073656e646572292077686f2063616e20617070726f76652074686973702064697370617463682e204d6179206e6f7420626520656d7074792e5d01202d20606d617962655f74696d65706f696e74603a20496620746869732069732074686520666972737420617070726f76616c2c207468656e2074686973206d75737420626520604e6f6e65602e2049662069742069735501206e6f742074686520666972737420617070726f76616c2c207468656e206974206d7573742062652060536f6d65602c2077697468207468652074696d65706f696e742028626c6f636b206e756d62657220616e64d8207472616e73616374696f6e20696e64657829206f662074686520666972737420617070726f76616c207472616e73616374696f6e2e8c202d206063616c6c603a205468652063616c6c20746f2062652065786563757465642e002101204e4f54453a20556e6c6573732074686973206973207468652066696e616c20617070726f76616c2c20796f752077696c6c2067656e6572616c6c792077616e7420746f207573651d012060617070726f76655f61735f6d756c74696020696e73746561642c2073696e6365206974206f6e6c7920726571756972657320612068617368206f66207468652063616c6c2e005d0120526573756c74206973206571756976616c656e7420746f20746865206469737061746368656420726573756c7420696620607468726573686f6c64602069732065786163746c79206031602e204f74686572776973655901206f6e20737563636573732c20726573756c7420697320604f6b6020616e642074686520726573756c742066726f6d2074686520696e746572696f722063616c6c2c206966206974207761732065786563757465642ce0206d617920626520666f756e6420696e20746865206465706f736974656420604d756c7469736967457865637574656460206576656e742e002c2023203c7765696768743e54202d20604f2853202b205a202b2043616c6c29602ed0202d20557020746f206f6e652062616c616e63652d72657365727665206f7220756e72657365727665206f7065726174696f6e2e4101202d204f6e6520706173737468726f756768206f7065726174696f6e2c206f6e6520696e736572742c20626f746820604f285329602077686572652060536020697320746865206e756d626572206f6649012020207369676e61746f726965732e206053602069732063617070656420627920604d61785369676e61746f72696573602c207769746820776569676874206265696e672070726f706f7274696f6e616c2e2501202d204f6e652063616c6c20656e636f6465202620686173682c20626f7468206f6620636f6d706c657869747920604f285a296020776865726520605a602069732074782d6c656e2ec0202d204f6e6520656e636f6465202620686173682c20626f7468206f6620636f6d706c657869747920604f285329602ed8202d20557020746f206f6e652062696e6172792073656172636820616e6420696e736572742028604f286c6f6753202b20532960292efc202d20492f4f3a2031207265616420604f285329602c20757020746f2031206d757461746520604f285329602e20557020746f206f6e652072656d6f76652e34202d204f6e65206576656e742e70202d2054686520776569676874206f6620746865206063616c6c602e3101202d2053746f726167653a20696e7365727473206f6e65206974656d2c2076616c75652073697a6520626f756e64656420627920604d61785369676e61746f72696573602c20776974682061902020206465706f7369742074616b656e20666f7220697473206c69666574696d65206f66f4202020604d756c74697369674465706f73697442617365202b207468726573686f6c64202a204d756c74697369674465706f736974466163746f72602e302023203c2f7765696768743e40617070726f76655f61735f6d756c746910247468726573686f6c640c753136446f746865725f7369676e61746f72696573445665633c543a3a4163636f756e7449643e3c6d617962655f74696d65706f696e74844f7074696f6e3c54696d65706f696e743c543a3a426c6f636b4e756d6265723e3e2463616c6c5f68617368205b75383b2033325d80590120526567697374657220617070726f76616c20666f72206120646973706174636820746f206265206d6164652066726f6d20612064657465726d696e697374696320636f6d706f73697465206163636f756e74206966fc20617070726f766564206279206120746f74616c206f6620607468726573686f6c64202d203160206f6620606f746865725f7369676e61746f72696573602e005101205061796d656e743a20604d756c74697369674465706f73697442617365602077696c6c20626520726573657276656420696620746869732069732074686520666972737420617070726f76616c2c20706c7573610120607468726573686f6c64602074696d657320604d756c74697369674465706f736974466163746f72602e2049742069732072657475726e6564206f6e636520746869732064697370617463682068617070656e73206f72382069732063616e63656c6c65642e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e005901202d20607468726573686f6c64603a2054686520746f74616c206e756d626572206f6620617070726f76616c7320666f722074686973206469737061746368206265666f72652069742069732065786563757465642e4501202d20606f746865725f7369676e61746f72696573603a20546865206163636f756e747320286f74686572207468616e207468652073656e646572292077686f2063616e20617070726f76652074686973702064697370617463682e204d6179206e6f7420626520656d7074792e5d01202d20606d617962655f74696d65706f696e74603a20496620746869732069732074686520666972737420617070726f76616c2c207468656e2074686973206d75737420626520604e6f6e65602e2049662069742069735501206e6f742074686520666972737420617070726f76616c2c207468656e206974206d7573742062652060536f6d65602c2077697468207468652074696d65706f696e742028626c6f636b206e756d62657220616e64d8207472616e73616374696f6e20696e64657829206f662074686520666972737420617070726f76616c207472616e73616374696f6e2ed0202d206063616c6c5f68617368603a205468652068617368206f66207468652063616c6c20746f2062652065786563757465642e003901204e4f54453a2049662074686973206973207468652066696e616c20617070726f76616c2c20796f752077696c6c2077616e7420746f20757365206061735f6d756c74696020696e73746561642e002c2023203c7765696768743e28202d20604f285329602ed0202d20557020746f206f6e652062616c616e63652d72657365727665206f7220756e72657365727665206f7065726174696f6e2e4101202d204f6e6520706173737468726f756768206f7065726174696f6e2c206f6e6520696e736572742c20626f746820604f285329602077686572652060536020697320746865206e756d626572206f6649012020207369676e61746f726965732e206053602069732063617070656420627920604d61785369676e61746f72696573602c207769746820776569676874206265696e672070726f706f7274696f6e616c2ec0202d204f6e6520656e636f6465202620686173682c20626f7468206f6620636f6d706c657869747920604f285329602ed8202d20557020746f206f6e652062696e6172792073656172636820616e6420696e736572742028604f286c6f6753202b20532960292efc202d20492f4f3a2031207265616420604f285329602c20757020746f2031206d757461746520604f285329602e20557020746f206f6e652072656d6f76652e34202d204f6e65206576656e742e3101202d2053746f726167653a20696e7365727473206f6e65206974656d2c2076616c75652073697a6520626f756e64656420627920604d61785369676e61746f72696573602c20776974682061902020206465706f7369742074616b656e20666f7220697473206c69666574696d65206f66f4202020604d756c74697369674465706f73697442617365202b207468726573686f6c64202a204d756c74697369674465706f736974466163746f72602e302023203c2f7765696768743e3c63616e63656c5f61735f6d756c746910247468726573686f6c640c753136446f746865725f7369676e61746f72696573445665633c543a3a4163636f756e7449643e2474696d65706f696e746454696d65706f696e743c543a3a426c6f636b4e756d6265723e2463616c6c5f68617368205b75383b2033325d5859012043616e63656c2061207072652d6578697374696e672c206f6e2d676f696e67206d756c7469736967207472616e73616374696f6e2e20416e79206465706f7369742072657365727665642070726576696f75736c79c820666f722074686973206f7065726174696f6e2077696c6c20626520756e7265736572766564206f6e20737563636573732e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e005901202d20607468726573686f6c64603a2054686520746f74616c206e756d626572206f6620617070726f76616c7320666f722074686973206469737061746368206265666f72652069742069732065786563757465642e4501202d20606f746865725f7369676e61746f72696573603a20546865206163636f756e747320286f74686572207468616e207468652073656e646572292077686f2063616e20617070726f76652074686973702064697370617463682e204d6179206e6f7420626520656d7074792e6101202d206074696d65706f696e74603a205468652074696d65706f696e742028626c6f636b206e756d62657220616e64207472616e73616374696f6e20696e64657829206f662074686520666972737420617070726f76616c7c207472616e73616374696f6e20666f7220746869732064697370617463682ed0202d206063616c6c5f68617368603a205468652068617368206f66207468652063616c6c20746f2062652065786563757465642e002c2023203c7765696768743e28202d20604f285329602ed0202d20557020746f206f6e652062616c616e63652d72657365727665206f7220756e72657365727665206f7065726174696f6e2e4101202d204f6e6520706173737468726f756768206f7065726174696f6e2c206f6e6520696e736572742c20626f746820604f285329602077686572652060536020697320746865206e756d626572206f6649012020207369676e61746f726965732e206053602069732063617070656420627920604d61785369676e61746f72696573602c207769746820776569676874206265696e672070726f706f7274696f6e616c2ec0202d204f6e6520656e636f6465202620686173682c20626f7468206f6620636f6d706c657869747920604f285329602e34202d204f6e65206576656e742e88202d20492f4f3a2031207265616420604f285329602c206f6e652072656d6f76652e74202d2053746f726167653a2072656d6f766573206f6e65206974656d2e302023203c2f7765696768743e0118404261746368496e746572727570746564080c7533323444697370617463684572726f72085901204261746368206f66206469737061746368657320646964206e6f7420636f6d706c6574652066756c6c792e20496e646578206f66206669727374206661696c696e6720646973706174636820676976656e2c2061734c2077656c6c20617320746865206572726f722e384261746368436f6d706c657465640004cc204261746368206f66206469737061746368657320636f6d706c657465642066756c6c792077697468206e6f206572726f722e2c4e65774d756c746973696708244163636f756e744964244163636f756e7449640849012041206e6577206d756c7469736967206f7065726174696f6e2068617320626567756e2e20466972737420706172616d20697320746865206163636f756e74207468617420697320617070726f76696e672c80207365636f6e6420697320746865206d756c7469736967206163636f756e742e404d756c7469736967417070726f76616c0c244163636f756e7449645854696d65706f696e743c426c6f636b4e756d6265723e244163636f756e7449640859012041206d756c7469736967206f7065726174696f6e20686173206265656e20617070726f76656420627920736f6d656f6e652e20466972737420706172616d20697320746865206163636f756e742074686174206973a820617070726f76696e672c20746869726420697320746865206d756c7469736967206163636f756e742e404d756c7469736967457865637574656410244163636f756e7449645854696d65706f696e743c426c6f636b4e756d6265723e244163636f756e744964384469737061746368526573756c74082d012041206d756c7469736967206f7065726174696f6e20686173206265656e2065786563757465642e20466972737420706172616d20697320746865206163636f756e742074686174206973a820617070726f76696e672c20746869726420697320746865206d756c7469736967206163636f756e742e444d756c746973696743616e63656c6c65640c244163636f756e7449645854696d65706f696e743c426c6f636b4e756d6265723e244163636f756e7449640831012041206d756c7469736967206f7065726174696f6e20686173206265656e2063616e63656c6c65642e20466972737420706172616d20697320746865206163636f756e742074686174206973ac2063616e63656c6c696e672c20746869726420697320746865206d756c7469736967206163636f756e742e0030345a65726f5468726573686f6c640474205468726573686f6c6420697320746f6f206c6f7720287a65726f292e3c416c7265616479417070726f76656404b02043616c6c20697320616c726561647920617070726f7665642062792074686973207369676e61746f72792e444e6f417070726f76616c734e656564656404a02043616c6c20646f65736e2774206e65656420616e7920286d6f72652920617070726f76616c732e44546f6f4665775369676e61746f7269657304ac2054686572652061726520746f6f20666577207369676e61746f7269657320696e20746865206c6973742e48546f6f4d616e795369676e61746f7269657304b02054686572652061726520746f6f206d616e79207369676e61746f7269657320696e20746865206c6973742e545369676e61746f726965734f75744f664f7264657204110120546865207369676e61746f7269657320776572652070726f7669646564206f7574206f66206f726465723b20746865792073686f756c64206265206f7264657265642e4c53656e646572496e5369676e61746f72696573041101205468652073656e6465722077617320636f6e7461696e656420696e20746865206f74686572207369676e61746f726965733b2069742073686f756c646e27742062652e204e6f74466f756e6404e0204d756c7469736967206f7065726174696f6e206e6f7420666f756e64207768656e20617474656d7074696e6720746f2063616e63656c2e204e6f744f776e6572043101204f6e6c7920746865206163636f756e742074686174206f726967696e616c6c79206372656174656420746865206d756c74697369672069732061626c6520746f2063616e63656c2069742e2c4e6f54696d65706f696e74042101204e6f2074696d65706f696e742077617320676976656e2c2079657420746865206d756c7469736967206f7065726174696f6e20697320616c726561647920756e6465727761792e3857726f6e6754696d65706f696e74043101204120646966666572656e742074696d65706f696e742077617320676976656e20746f20746865206d756c7469736967206f7065726174696f6e207468617420697320756e6465727761792e4c556e657870656374656454696d65706f696e7404f820412074696d65706f696e742077617320676976656e2c20796574206e6f206d756c7469736967206f7065726174696f6e20697320756e6465727761792e2454696d657374616d70012454696d657374616d70080c4e6f77010024543a3a4d6f6d656e7420000000000000000004902043757272656e742074696d6520666f72207468652063757272656e7420626c6f636b2e24446964557064617465010010626f6f6c040004b420446964207468652074696d657374616d7020676574207570646174656420696e207468697320626c6f636b3f01040c736574040c6e6f7748436f6d706163743c543a3a4d6f6d656e743e245820536574207468652063757272656e742074696d652e00590120546869732063616c6c2073686f756c6420626520696e766f6b65642065786163746c79206f6e63652070657220626c6f636b2e2049742077696c6c2070616e6963206174207468652066696e616c697a6174696f6ed82070686173652c20696620746869732063616c6c206861736e2774206265656e20696e766f6b656420627920746861742074696d652e004501205468652074696d657374616d702073686f756c642062652067726561746572207468616e207468652070726576696f7573206f6e652062792074686520616d6f756e74207370656369666965642062794420604d696e696d756d506572696f64602e00d820546865206469737061746368206f726967696e20666f7220746869732063616c6c206d7573742062652060496e686572656e74602e0004344d696e696d756d506572696f6424543a3a4d6f6d656e7420b80b00000000000010690120546865206d696e696d756d20706572696f64206265747765656e20626c6f636b732e204265776172652074686174207468697320697320646966666572656e7420746f20746865202a65787065637465642a20706572696f64690120746861742074686520626c6f636b2070726f64756374696f6e206170706172617475732070726f76696465732e20596f75722063686f73656e20636f6e73656e7375732073797374656d2077696c6c2067656e6572616c6c79650120776f726b2077697468207468697320746f2064657465726d696e6520612073656e7369626c6520626c6f636b2074696d652e20652e672e20466f7220417572612c2069742077696c6c20626520646f75626c6520746869737020706572696f64206f6e2064656661756c742073657474696e67732e001041757261000000000028417574686f72736869700128417574686f72736869700c18556e636c65730100e85665633c556e636c65456e7472794974656d3c543a3a426c6f636b4e756d6265722c20543a3a486173682c20543a3a4163636f756e7449643e3e0400041c20556e636c657318417574686f72000030543a3a4163636f756e7449640400046420417574686f72206f662063757272656e7420626c6f636b2e30446964536574556e636c6573010010626f6f6c040004bc205768657468657220756e636c6573207765726520616c72656164792073657420696e207468697320626c6f636b2e0104287365745f756e636c657304286e65775f756e636c6573385665633c543a3a4865616465723e04642050726f76696465206120736574206f6620756e636c65732e00001c48496e76616c6964556e636c65506172656e74048c2054686520756e636c6520706172656e74206e6f7420696e2074686520636861696e2e40556e636c6573416c7265616479536574048420556e636c657320616c72656164792073657420696e2074686520626c6f636b2e34546f6f4d616e79556e636c6573044420546f6f206d616e7920756e636c65732e3047656e65736973556e636c6504582054686520756e636c652069732067656e657369732e30546f6f48696768556e636c6504802054686520756e636c6520697320746f6f206869676820696e20636861696e2e50556e636c65416c7265616479496e636c75646564047c2054686520756e636c6520697320616c726561647920696e636c756465642e204f6c64556e636c6504b82054686520756e636c652069736e277420726563656e7420656e6f75676820746f20626520696e636c756465642e1c496e6469636573011c496e6469636573082c4e657874456e756d53657401003c543a3a4163636f756e74496e6465781000000000047c20546865206e657874206672656520656e756d65726174696f6e207365742e1c456e756d5365740101013c543a3a4163636f756e74496e646578445665633c543a3a4163636f756e7449643e00040004582054686520656e756d65726174696f6e20736574732e010001043c4e65774163636f756e74496e64657808244163636f756e744964304163636f756e74496e64657810882041206e6577206163636f756e7420696e646578207761732061737369676e65642e0005012054686973206576656e74206973206e6f7420747269676765726564207768656e20616e206578697374696e6720696e64657820697320726561737369676e65646020746f20616e6f7468657220604163636f756e744964602e00002042616c616e636573012042616c616e6365731434546f74616c49737375616e6365010028543a3a42616c616e6365400000000000000000000000000000000004982054686520746f74616c20756e6974732069737375656420696e207468652073797374656d2e1c56657374696e6700010130543a3a4163636f756e744964ac56657374696e675363686564756c653c543a3a42616c616e63652c20543a3a426c6f636b4e756d6265723e00040004d820496e666f726d6174696f6e20726567617264696e67207468652076657374696e67206f66206120676976656e206163636f756e742e2c4672656542616c616e636501010130543a3a4163636f756e74496428543a3a42616c616e63650040000000000000000000000000000000002c9c20546865202766726565272062616c616e6365206f66206120676976656e206163636f756e742e004101205468697320697320746865206f6e6c792062616c616e63652074686174206d61747465727320696e207465726d73206f66206d6f7374206f7065726174696f6e73206f6e20746f6b656e732e204974750120616c6f6e65206973207573656420746f2064657465726d696e65207468652062616c616e6365207768656e20696e2074686520636f6e747261637420657865637574696f6e20656e7669726f6e6d656e742e205768656e207468697355012062616c616e63652066616c6c732062656c6f77207468652076616c7565206f6620604578697374656e7469616c4465706f736974602c207468656e20746865202763757272656e74206163636f756e74272069733d012064656c657465643a207370656369666963616c6c7920604672656542616c616e6365602e20467572746865722c2074686520604f6e4672656542616c616e63655a65726f602063616c6c6261636b450120697320696e766f6b65642c20676976696e672061206368616e636520746f2065787465726e616c206d6f64756c657320746f20636c65616e2075702064617461206173736f636961746564207769746854207468652064656c65746564206163636f756e742e00750120606672616d655f73797374656d3a3a4163636f756e744e6f6e63656020697320616c736f2064656c657465642069662060526573657276656442616c616e63656020697320616c736f207a65726f2028697420616c736f2067657473150120636f6c6c617073656420746f207a65726f2069662069742065766572206265636f6d6573206c657373207468616e20604578697374656e7469616c4465706f736974602e3c526573657276656442616c616e636501010130543a3a4163636f756e74496428543a3a42616c616e63650040000000000000000000000000000000002c75012054686520616d6f756e74206f66207468652062616c616e6365206f66206120676976656e206163636f756e7420746861742069732065787465726e616c6c792072657365727665643b20746869732063616e207374696c6c206765749c20736c61736865642c20627574206765747320736c6173686564206c617374206f6620616c6c2e006d0120546869732062616c616e63652069732061202772657365727665272062616c616e63652074686174206f746865722073756273797374656d732075736520696e206f7264657220746f2073657420617369646520746f6b656e732501207468617420617265207374696c6c20276f776e65642720627920746865206163636f756e7420686f6c6465722c20627574207768696368206172652073757370656e6461626c652e007501205768656e20746869732062616c616e63652066616c6c732062656c6f77207468652076616c7565206f6620604578697374656e7469616c4465706f736974602c207468656e2074686973202772657365727665206163636f756e7427b42069732064656c657465643a207370656369666963616c6c792c2060526573657276656442616c616e6365602e00650120606672616d655f73797374656d3a3a4163636f756e744e6f6e63656020697320616c736f2064656c6574656420696620604672656542616c616e63656020697320616c736f207a65726f2028697420616c736f2067657473190120636f6c6c617073656420746f207a65726f2069662069742065766572206265636f6d6573206c657373207468616e20604578697374656e7469616c4465706f736974602e29144c6f636b7301010130543a3a4163636f756e744964b05665633c42616c616e63654c6f636b3c543a3a42616c616e63652c20543a3a426c6f636b4e756d6265723e3e00040004b820416e79206c6971756964697479206c6f636b73206f6e20736f6d65206163636f756e742062616c616e6365732e0110207472616e736665720810646573748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651476616c75654c436f6d706163743c543a3a42616c616e63653e64d8205472616e7366657220736f6d65206c697175696420667265652062616c616e636520746f20616e6f74686572206163636f756e742e00090120607472616e73666572602077696c6c207365742074686520604672656542616c616e636560206f66207468652073656e64657220616e642072656365697665722e21012049742077696c6c2064656372656173652074686520746f74616c2069737375616e6365206f66207468652073797374656d2062792074686520605472616e73666572466565602e1501204966207468652073656e6465722773206163636f756e742069732062656c6f7720746865206578697374656e7469616c206465706f736974206173206120726573756c74b4206f6620746865207472616e736665722c20746865206163636f756e742077696c6c206265207265617065642e00190120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d75737420626520605369676e65646020627920746865207472616e736163746f722e002c2023203c7765696768743e3101202d20446570656e64656e74206f6e20617267756d656e747320627574206e6f7420637269746963616c2c20676976656e2070726f70657220696d706c656d656e746174696f6e7320666f72cc202020696e70757420636f6e6669672074797065732e205365652072656c617465642066756e6374696f6e732062656c6f772e6901202d20497420636f6e7461696e732061206c696d69746564206e756d626572206f6620726561647320616e642077726974657320696e7465726e616c6c7920616e64206e6f20636f6d706c657820636f6d7075746174696f6e2e004c2052656c617465642066756e6374696f6e733a0051012020202d2060656e737572655f63616e5f77697468647261776020697320616c776179732063616c6c656420696e7465726e616c6c792062757420686173206120626f756e64656420636f6d706c65786974792e2d012020202d205472616e7366657272696e672062616c616e63657320746f206163636f756e7473207468617420646964206e6f74206578697374206265666f72652077696c6c206361757365d420202020202060543a3a4f6e4e65774163636f756e743a3a6f6e5f6e65775f6163636f756e746020746f2062652063616c6c65642edc2020202d2052656d6f76696e6720656e6f7567682066756e64732066726f6d20616e206163636f756e742077696c6c20747269676765725901202020202060543a3a4475737452656d6f76616c3a3a6f6e5f756e62616c616e6365646020616e642060543a3a4f6e4672656542616c616e63655a65726f3a3a6f6e5f667265655f62616c616e63655f7a65726f602e49012020202d20607472616e736665725f6b6565705f616c6976656020776f726b73207468652073616d652077617920617320607472616e73666572602c206275742068617320616e206164646974696f6e616cf82020202020636865636b207468617420746865207472616e736665722077696c6c206e6f74206b696c6c20746865206f726967696e206163636f756e742e00302023203c2f7765696768743e2c7365745f62616c616e63650c0c77686f8c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f75726365206e65775f667265654c436f6d706163743c543a3a42616c616e63653e306e65775f72657365727665644c436f6d706163743c543a3a42616c616e63653e349420536574207468652062616c616e636573206f66206120676976656e206163636f756e742e00210120546869732077696c6c20616c74657220604672656542616c616e63656020616e642060526573657276656442616c616e63656020696e2073746f726167652e2069742077696c6c090120616c736f2064656372656173652074686520746f74616c2069737375616e6365206f66207468652073797374656d202860546f74616c49737375616e636560292e190120496620746865206e65772066726565206f722072657365727665642062616c616e63652069732062656c6f7720746865206578697374656e7469616c206465706f7369742c01012069742077696c6c20726573657420746865206163636f756e74206e6f6e63652028606672616d655f73797374656d3a3a4163636f756e744e6f6e636560292e00b420546865206469737061746368206f726967696e20666f7220746869732063616c6c2069732060726f6f74602e002c2023203c7765696768743e80202d20496e646570656e64656e74206f662074686520617267756d656e74732ec4202d20436f6e7461696e732061206c696d69746564206e756d626572206f6620726561647320616e64207772697465732e302023203c2f7765696768743e38666f7263655f7472616e736665720c18736f757263658c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636510646573748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651476616c75654c436f6d706163743c543a3a42616c616e63653e0851012045786163746c7920617320607472616e73666572602c2065786365707420746865206f726967696e206d75737420626520726f6f7420616e642074686520736f75726365206163636f756e74206d61792062652c207370656369666965642e4c7472616e736665725f6b6565705f616c6976650810646573748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651476616c75654c436f6d706163743c543a3a42616c616e63653e1851012053616d6520617320746865205b607472616e73666572605d2063616c6c2c206275742077697468206120636865636b207468617420746865207472616e736665722077696c6c206e6f74206b696c6c2074686540206f726967696e206163636f756e742e00bc20393925206f66207468652074696d6520796f752077616e74205b607472616e73666572605d20696e73746561642e00c4205b607472616e73666572605d3a207374727563742e4d6f64756c652e68746d6c236d6574686f642e7472616e736665720114284e65774163636f756e7408244163636f756e7449641c42616c616e6365046c2041206e6577206163636f756e742077617320637265617465642e345265617065644163636f756e7408244163636f756e7449641c42616c616e6365045c20416e206163636f756e7420776173207265617065642e205472616e7366657210244163636f756e744964244163636f756e7449641c42616c616e63651c42616c616e636504b0205472616e7366657220737563636565646564202866726f6d2c20746f2c2076616c75652c2066656573292e2842616c616e63655365740c244163636f756e7449641c42616c616e63651c42616c616e636504c420412062616c616e6365207761732073657420627920726f6f74202877686f2c20667265652c207265736572766564292e1c4465706f73697408244163636f756e7449641c42616c616e636504dc20536f6d6520616d6f756e7420776173206465706f73697465642028652e672e20666f72207472616e73616374696f6e2066656573292e0c484578697374656e7469616c4465706f73697428543a3a42616c616e63654000a0724e18090000000000000000000004d420546865206d696e696d756d20616d6f756e7420726571756972656420746f206b65657020616e206163636f756e74206f70656e2e2c5472616e7366657246656528543a3a42616c616e63654000008a5d7845630100000000000000000494205468652066656520726571756972656420746f206d616b652061207472616e736665722e2c4372656174696f6e46656528543a3a42616c616e63654000008a5d784563010000000000000000049c205468652066656520726571756972656420746f2063726561746520616e206163636f756e742e203856657374696e6742616c616e6365049c2056657374696e672062616c616e636520746f6f206869676820746f2073656e642076616c7565544c69717569646974795265737472696374696f6e7304c8204163636f756e74206c6971756964697479207265737472696374696f6e732070726576656e74207769746864726177616c204f766572666c6f77047420476f7420616e206f766572666c6f7720616674657220616464696e674c496e73756666696369656e7442616c616e636504782042616c616e636520746f6f206c6f7720746f2073656e642076616c7565484578697374656e7469616c4465706f73697404ec2056616c756520746f6f206c6f7720746f20637265617465206163636f756e742064756520746f206578697374656e7469616c206465706f736974244b656570416c6976650490205472616e736665722f7061796d656e7420776f756c64206b696c6c206163636f756e745c4578697374696e6756657374696e675363686564756c6504cc20412076657374696e67207363686564756c6520616c72656164792065786973747320666f722074686973206163636f756e742c446561644163636f756e74048c2042656e6566696369617279206163636f756e74206d757374207072652d6578697374485472616e73616374696f6e5061796d656e74012042616c616e63657304444e6578744665654d756c7469706c6965720100284d756c7469706c69657220000000000000000000000008485472616e73616374696f6e426173654665653042616c616e63654f663c543e4000008a5d78456301000000000000000004dc205468652066656520746f206265207061696420666f72206d616b696e672061207472616e73616374696f6e3b2074686520626173652e485472616e73616374696f6e427974654665653042616c616e63654f663c543e400080c6a47e8d03000000000000000000040d01205468652066656520746f206265207061696420666f72206d616b696e672061207472616e73616374696f6e3b20746865207065722d6279746520706f7274696f6e2e001c5374616b696e67011c5374616b696e67683856616c696461746f72436f756e7401000c753332100000000004a82054686520696465616c206e756d626572206f66207374616b696e67207061727469636970616e74732e544d696e696d756d56616c696461746f72436f756e7401000c7533321004000000044101204d696e696d756d206e756d626572206f66207374616b696e67207061727469636970616e7473206265666f726520656d657267656e637920636f6e646974696f6e732061726520696d706f7365642e34496e76756c6e657261626c65730100445665633c543a3a4163636f756e7449643e04000c590120416e792076616c696461746f72732074686174206d6179206e6576657220626520736c6173686564206f7220666f726369626c79206b69636b65642e20497427732061205665632073696e636520746865792772654d01206561737920746f20696e697469616c697a6520616e642074686520706572666f726d616e636520686974206973206d696e696d616c2028776520657870656374206e6f206d6f7265207468616e20666f7572ac20696e76756c6e657261626c65732920616e64207265737472696374656420746f20746573746e6574732e18426f6e64656400010130543a3a4163636f756e74496430543a3a4163636f756e744964000400040101204d61702066726f6d20616c6c206c6f636b65642022737461736822206163636f756e747320746f2074686520636f6e74726f6c6c6572206163636f756e742e184c656467657200010130543a3a4163636f756e744964a45374616b696e674c65646765723c543a3a4163636f756e7449642c2042616c616e63654f663c543e3e000400044501204d61702066726f6d20616c6c2028756e6c6f636b6564292022636f6e74726f6c6c657222206163636f756e747320746f2074686520696e666f20726567617264696e6720746865207374616b696e672e14506179656501010130543a3a4163636f756e7449644452657761726444657374696e6174696f6e00040004e42057686572652074686520726577617264207061796d656e742073686f756c64206265206d6164652e204b657965642062792073746173682e2856616c696461746f727301010130543a3a4163636f756e7449643856616c696461746f72507265667301040004450120546865206d61702066726f6d202877616e6e616265292076616c696461746f72207374617368206b657920746f2074686520707265666572656e636573206f6620746861742076616c696461746f722e284e6f6d696e61746f727300010130543a3a4163636f756e744964644e6f6d696e6174696f6e733c543a3a4163636f756e7449643e01040010650120546865206d61702066726f6d206e6f6d696e61746f72207374617368206b657920746f2074686520736574206f66207374617368206b657973206f6620616c6c2076616c696461746f727320746f206e6f6d696e6174652e003501204e4f54453a206973207072697661746520736f20746861742077652063616e20656e73757265207570677261646564206265666f726520616c6c207479706963616c2061636365737365732ed8204469726563742073746f7261676520415049732063616e207374696c6c2062797061737320746869732070726f74656374696f6e2e1c5374616b65727301010130543a3a4163636f756e744964904578706f737572653c543a3a4163636f756e7449642c2042616c616e63654f663c543e3e000c000000104d01204e6f6d696e61746f727320666f72206120706172746963756c6172206163636f756e74207468617420697320696e20616374696f6e207269676874206e6f772e20596f752063616e277420697465726174651901207468726f7567682076616c696461746f727320686572652c2062757420796f752063616e2066696e64207468656d20696e207468652053657373696f6e206d6f64756c652e00902054686973206973206b6579656420627920746865207374617368206163636f756e742e3843757272656e74456c65637465640100445665633c543a3a4163636f756e7449643e040004fc205468652063757272656e746c7920656c65637465642076616c696461746f7220736574206b65796564206279207374617368206163636f756e742049442e2843757272656e74457261010020457261496e6465781000000000045c205468652063757272656e742065726120696e6465782e3c43757272656e74457261537461727401002c4d6f6d656e744f663c543e200000000000000000047820546865207374617274206f66207468652063757272656e74206572612e6c43757272656e74457261537461727453657373696f6e496e64657801003053657373696f6e496e646578100000000004d0205468652073657373696f6e20696e646578206174207768696368207468652063757272656e742065726120737461727465642e5843757272656e74457261506f696e74734561726e6564010024457261506f696e7473140000000000040d01205265776172647320666f72207468652063757272656e74206572612e205573696e6720696e6469636573206f662063757272656e7420656c6563746564207365742e24536c6f745374616b6501003042616c616e63654f663c543e40000000000000000000000000000000000c31012054686520616d6f756e74206f662062616c616e6365206163746976656c79206174207374616b6520666f7220656163682076616c696461746f7220736c6f742c2063757272656e746c792e00c02054686973206973207573656420746f20646572697665207265776172647320616e642070756e6973686d656e74732e20466f72636545726101001c466f7263696e670400041d01205472756520696620746865206e6578742073657373696f6e206368616e67652077696c6c2062652061206e657720657261207265676172646c657373206f6620696e6465782e4c536c6173685265776172644672616374696f6e01001c50657262696c6c10000000000cf8205468652070657263656e74616765206f662074686520736c617368207468617420697320646973747269627574656420746f207265706f72746572732e00e4205468652072657374206f662074686520736c61736865642076616c75652069732068616e646c6564206279207468652060536c617368602e4c43616e63656c6564536c6173685061796f757401003042616c616e63654f663c543e40000000000000000000000000000000000815012054686520616d6f756e74206f662063757272656e637920676976656e20746f207265706f7274657273206f66206120736c617368206576656e7420776869636820776173ec2063616e63656c65642062792065787472616f7264696e6172792063697263756d7374616e6365732028652e672e20676f7665726e616e6365292e40556e6170706c696564536c617368657301010120457261496e646578bc5665633c556e6170706c696564536c6173683c543a3a4163636f756e7449642c2042616c616e63654f663c543e3e3e00040004c420416c6c20756e6170706c69656420736c61736865732074686174206172652071756575656420666f72206c617465722e28426f6e646564457261730100745665633c28457261496e6465782c2053657373696f6e496e646578293e04000425012041206d617070696e672066726f6d207374696c6c2d626f6e646564206572617320746f207468652066697273742073657373696f6e20696e646578206f662074686174206572612e4c56616c696461746f72536c617368496e45726100020120457261496e64657830543a3a4163636f756e7449645c2850657262696c6c2c2042616c616e63654f663c543e2903040008450120416c6c20736c617368696e67206576656e7473206f6e2076616c696461746f72732c206d61707065642062792065726120746f20746865206869676865737420736c6173682070726f706f7274696f6e7020616e6420736c6173682076616c7565206f6620746865206572612e4c4e6f6d696e61746f72536c617368496e45726100020120457261496e64657830543a3a4163636f756e7449643042616c616e63654f663c543e03040004610120416c6c20736c617368696e67206576656e7473206f6e206e6f6d696e61746f72732c206d61707065642062792065726120746f20746865206869676865737420736c6173682076616c7565206f6620746865206572612e34536c617368696e675370616e7300010130543a3a4163636f756e7449645c736c617368696e673a3a536c617368696e675370616e73000400048c20536c617368696e67207370616e7320666f72207374617368206163636f756e74732e245370616e536c6173680101018c28543a3a4163636f756e7449642c20736c617368696e673a3a5370616e496e6465782988736c617368696e673a3a5370616e5265636f72643c42616c616e63654f663c543e3e00800000000000000000000000000000000000000000000000000000000000000000083d01205265636f72647320696e666f726d6174696f6e2061626f757420746865206d6178696d756d20736c617368206f6620612073746173682077697468696e206120736c617368696e67207370616e2cb82061732077656c6c20617320686f77206d7563682072657761726420686173206265656e2070616964206f75742e584561726c69657374556e6170706c696564536c617368000020457261496e646578040004fc20546865206561726c696573742065726120666f72207768696368207765206861766520612070656e64696e672c20756e6170706c69656420736c6173682e3853746f7261676556657273696f6e01000c75333210000000000490205468652076657273696f6e206f662073746f7261676520666f7220757067726164652e014410626f6e640c28636f6e74726f6c6c65728c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651476616c756554436f6d706163743c42616c616e63654f663c543e3e1470617965654452657761726444657374696e6174696f6e3c65012054616b6520746865206f726967696e206163636f756e74206173206120737461736820616e64206c6f636b207570206076616c756560206f66206974732062616c616e63652e2060636f6e74726f6c6c6572602077696c6c8420626520746865206163636f756e74207468617420636f6e74726f6c732069742e003101206076616c756560206d757374206265206d6f7265207468616e2074686520606d696e696d756d5f62616c616e636560207370656369666965642062792060543a3a43757272656e6379602e00250120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20627920746865207374617368206163636f756e742e002c2023203c7765696768743ed4202d20496e646570656e64656e74206f662074686520617267756d656e74732e204d6f64657261746520636f6d706c65786974792e20202d204f2831292e68202d20546872656520657874726120444220656e74726965732e006d01204e4f54453a2054776f206f66207468652073746f726167652077726974657320286053656c663a3a626f6e646564602c206053656c663a3a7061796565602920617265205f6e657665725f20636c65616e656420756e6c65737325012074686520606f726967696e602066616c6c732062656c6f77205f6578697374656e7469616c206465706f7369745f20616e6420676574732072656d6f76656420617320647573742e302023203c2f7765696768743e28626f6e645f657874726104386d61785f6164646974696f6e616c54436f6d706163743c42616c616e63654f663c543e3e3865012041646420736f6d6520657874726120616d6f756e742074686174206861766520617070656172656420696e207468652073746173682060667265655f62616c616e63656020696e746f207468652062616c616e63652075703420666f72207374616b696e672e00510120557365207468697320696620746865726520617265206164646974696f6e616c2066756e647320696e20796f7572207374617368206163636f756e74207468617420796f75207769736820746f20626f6e642e650120556e6c696b65205b60626f6e64605d206f72205b60756e626f6e64605d20746869732066756e6374696f6e20646f6573206e6f7420696d706f736520616e79206c696d69746174696f6e206f6e2074686520616d6f756e744c20746861742063616e2062652061646465642e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f206279207468652073746173682c206e6f742074686520636f6e74726f6c6c65722e002c2023203c7765696768743ee8202d20496e646570656e64656e74206f662074686520617267756d656e74732e20496e7369676e69666963616e7420636f6d706c65786974792e20202d204f2831292e40202d204f6e6520444220656e7472792e302023203c2f7765696768743e18756e626f6e64041476616c756554436f6d706163743c42616c616e63654f663c543e3e5c5501205363686564756c65206120706f7274696f6e206f662074686520737461736820746f20626520756e6c6f636b656420726561647920666f72207472616e73666572206f75742061667465722074686520626f6e64010120706572696f6420656e64732e2049662074686973206c656176657320616e20616d6f756e74206163746976656c7920626f6e646564206c657373207468616e250120543a3a43757272656e63793a3a6d696e696d756d5f62616c616e636528292c207468656e20697420697320696e6372656173656420746f207468652066756c6c20616d6f756e742e004901204f6e63652074686520756e6c6f636b20706572696f6420697320646f6e652c20796f752063616e2063616c6c206077697468647261775f756e626f6e6465646020746f2061637475616c6c79206d6f7665c0207468652066756e6473206f7574206f66206d616e6167656d656e7420726561647920666f72207472616e736665722e003d01204e6f206d6f7265207468616e2061206c696d69746564206e756d626572206f6620756e6c6f636b696e67206368756e6b73202873656520604d41585f554e4c4f434b494e475f4348554e4b5360293d012063616e20636f2d657869737473206174207468652073616d652074696d652e20496e207468617420636173652c205b6043616c6c3a3a77697468647261775f756e626f6e646564605d206e656564fc20746f2062652063616c6c656420666972737420746f2072656d6f766520736f6d65206f6620746865206368756e6b732028696620706f737369626c65292e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2062792074686520636f6e74726f6c6c65722c206e6f74207468652073746173682e00982053656520616c736f205b6043616c6c3a3a77697468647261775f756e626f6e646564605d2e002c2023203c7765696768743e4101202d20496e646570656e64656e74206f662074686520617267756d656e74732e204c696d697465642062757420706f74656e7469616c6c79206578706c6f697461626c6520636f6d706c65786974792e98202d20436f6e7461696e732061206c696d69746564206e756d626572206f662072656164732e6501202d20456163682063616c6c20287265717569726573207468652072656d61696e646572206f662074686520626f6e6465642062616c616e636520746f2062652061626f766520606d696e696d756d5f62616c616e63656029710120202077696c6c2063617573652061206e657720656e74727920746f20626520696e73657274656420696e746f206120766563746f722028604c65646765722e756e6c6f636b696e676029206b65707420696e2073746f726167652ea501202020546865206f6e6c792077617920746f20636c65616e207468652061666f72656d656e74696f6e65642073746f72616765206974656d20697320616c736f20757365722d636f6e74726f6c6c656420766961206077697468647261775f756e626f6e646564602e40202d204f6e6520444220656e7472792e28203c2f7765696768743e4477697468647261775f756e626f6e64656400402d012052656d6f766520616e7920756e6c6f636b6564206368756e6b732066726f6d207468652060756e6c6f636b696e67602071756575652066726f6d206f7572206d616e6167656d656e742e003501205468697320657373656e7469616c6c7920667265657320757020746861742062616c616e636520746f206265207573656420627920746865207374617368206163636f756e7420746f20646f4c2077686174657665722069742077616e74732e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2062792074686520636f6e74726f6c6c65722c206e6f74207468652073746173682e006c2053656520616c736f205b6043616c6c3a3a756e626f6e64605d2e002c2023203c7765696768743e5501202d20436f756c6420626520646570656e64656e74206f6e2074686520606f726967696e6020617267756d656e7420616e6420686f77206d7563682060756e6c6f636b696e6760206368756e6b732065786973742e45012020497420696d706c6965732060636f6e736f6c69646174655f756e6c6f636b656460207768696368206c6f6f7073206f76657220604c65646765722e756e6c6f636b696e67602c207768696368206973f42020696e6469726563746c7920757365722d636f6e74726f6c6c65642e20536565205b60756e626f6e64605d20666f72206d6f72652064657461696c2e7901202d20436f6e7461696e732061206c696d69746564206e756d626572206f662072656164732c20796574207468652073697a65206f6620776869636820636f756c64206265206c61726765206261736564206f6e20606c6564676572602ec8202d2057726974657320617265206c696d6974656420746f2074686520606f726967696e60206163636f756e74206b65792e302023203c2f7765696768743e2076616c6964617465041470726566733856616c696461746f7250726566732ce8204465636c617265207468652064657369726520746f2076616c696461746520666f7220746865206f726967696e20636f6e74726f6c6c65722e00dc20456666656374732077696c6c2062652066656c742061742074686520626567696e6e696e67206f6620746865206e657874206572612e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2062792074686520636f6e74726f6c6c65722c206e6f74207468652073746173682e002c2023203c7765696768743ee8202d20496e646570656e64656e74206f662074686520617267756d656e74732e20496e7369676e69666963616e7420636f6d706c65786974792e98202d20436f6e7461696e732061206c696d69746564206e756d626572206f662072656164732ec8202d2057726974657320617265206c696d6974656420746f2074686520606f726967696e60206163636f756e74206b65792e302023203c2f7765696768743e206e6f6d696e617465041c74617267657473a05665633c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263653e2c1101204465636c617265207468652064657369726520746f206e6f6d696e6174652060746172676574736020666f7220746865206f726967696e20636f6e74726f6c6c65722e00dc20456666656374732077696c6c2062652066656c742061742074686520626567696e6e696e67206f6620746865206e657874206572612e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2062792074686520636f6e74726f6c6c65722c206e6f74207468652073746173682e002c2023203c7765696768743e2501202d20546865207472616e73616374696f6e277320636f6d706c65786974792069732070726f706f7274696f6e616c20746f207468652073697a65206f66206074617267657473602c982077686963682069732063617070656420617420604d41585f4e4f4d494e4154494f4e53602ed8202d20426f74682074686520726561647320616e642077726974657320666f6c6c6f7720612073696d696c6172207061747465726e2e302023203c2f7765696768743e146368696c6c002cc8204465636c617265206e6f2064657369726520746f206569746865722076616c6964617465206f72206e6f6d696e6174652e00dc20456666656374732077696c6c2062652066656c742061742074686520626567696e6e696e67206f6620746865206e657874206572612e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2062792074686520636f6e74726f6c6c65722c206e6f74207468652073746173682e002c2023203c7765696768743ee8202d20496e646570656e64656e74206f662074686520617267756d656e74732e20496e7369676e69666963616e7420636f6d706c65786974792e54202d20436f6e7461696e73206f6e6520726561642ec8202d2057726974657320617265206c696d6974656420746f2074686520606f726967696e60206163636f756e74206b65792e302023203c2f7765696768743e247365745f7061796565041470617965654452657761726444657374696e6174696f6e2cb8202852652d2973657420746865207061796d656e742074617267657420666f72206120636f6e74726f6c6c65722e00dc20456666656374732077696c6c2062652066656c742061742074686520626567696e6e696e67206f6620746865206e657874206572612e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2062792074686520636f6e74726f6c6c65722c206e6f74207468652073746173682e002c2023203c7765696768743ee8202d20496e646570656e64656e74206f662074686520617267756d656e74732e20496e7369676e69666963616e7420636f6d706c65786974792e98202d20436f6e7461696e732061206c696d69746564206e756d626572206f662072656164732ec8202d2057726974657320617265206c696d6974656420746f2074686520606f726967696e60206163636f756e74206b65792e302023203c2f7765696768743e387365745f636f6e74726f6c6c65720428636f6e74726f6c6c65728c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263652c90202852652d297365742074686520636f6e74726f6c6c6572206f6620612073746173682e00dc20456666656374732077696c6c2062652066656c742061742074686520626567696e6e696e67206f6620746865206e657874206572612e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f206279207468652073746173682c206e6f742074686520636f6e74726f6c6c65722e002c2023203c7765696768743ee8202d20496e646570656e64656e74206f662074686520617267756d656e74732e20496e7369676e69666963616e7420636f6d706c65786974792e98202d20436f6e7461696e732061206c696d69746564206e756d626572206f662072656164732ec8202d2057726974657320617265206c696d6974656420746f2074686520606f726967696e60206163636f756e74206b65792e302023203c2f7765696768743e4c7365745f76616c696461746f725f636f756e74040c6e657730436f6d706163743c7533323e04802054686520696465616c206e756d626572206f662076616c696461746f72732e34666f7263655f6e6f5f657261730014b020466f72636520746865726520746f206265206e6f206e6577206572617320696e646566696e6974656c792e002c2023203c7765696768743e40202d204e6f20617267756d656e74732e302023203c2f7765696768743e34666f7263655f6e65775f65726100184d0120466f72636520746865726520746f2062652061206e6577206572612061742074686520656e64206f6620746865206e6578742073657373696f6e2e20416674657220746869732c2069742077696c6c206265a020726573657420746f206e6f726d616c20286e6f6e2d666f7263656429206265686176696f75722e002c2023203c7765696768743e40202d204e6f20617267756d656e74732e302023203c2f7765696768743e447365745f696e76756c6e657261626c6573042876616c696461746f7273445665633c543a3a4163636f756e7449643e04cc20536574207468652076616c696461746f72732077686f2063616e6e6f7420626520736c61736865642028696620616e79292e34666f7263655f756e7374616b650414737461736830543a3a4163636f756e744964040d0120466f72636520612063757272656e74207374616b657220746f206265636f6d6520636f6d706c6574656c7920756e7374616b65642c20696d6d6564696174656c792e50666f7263655f6e65775f6572615f616c776179730014050120466f72636520746865726520746f2062652061206e6577206572612061742074686520656e64206f662073657373696f6e7320696e646566696e6974656c792e002c2023203c7765696768743e50202d204f6e652073746f72616765207772697465302023203c2f7765696768743e5463616e63656c5f64656665727265645f736c617368080c65726120457261496e64657834736c6173685f696e6469636573205665633c7533323e1c45012043616e63656c20656e6163746d656e74206f66206120646566657272656420736c6173682e2043616e2062652063616c6c6564206279206569746865722074686520726f6f74206f726967696e206f7270207468652060543a3a536c61736843616e63656c4f726967696e602e05012070617373696e67207468652065726120616e6420696e6469636573206f662074686520736c617368657320666f7220746861742065726120746f206b696c6c2e002c2023203c7765696768743e54202d204f6e652073746f726167652077726974652e302023203c2f7765696768743e187265626f6e64041476616c756554436f6d706163743c42616c616e63654f663c543e3e18e0205265626f6e64206120706f7274696f6e206f6620746865207374617368207363686564756c656420746f20626520756e6c6f636b65642e002c2023203c7765696768743ef0202d2054696d6520636f6d706c65786974793a204f2831292e20426f756e64656420627920604d41585f554e4c4f434b494e475f4348554e4b53602ef4202d2053746f72616765206368616e6765733a2043616e277420696e6372656173652073746f726167652c206f6e6c792064656372656173652069742e302023203c2f7765696768743e010c18526577617264081c42616c616e63651c42616c616e636508510120416c6c2076616c696461746f72732068617665206265656e207265776172646564206279207468652066697273742062616c616e63653b20746865207365636f6e64206973207468652072656d61696e6465728c2066726f6d20746865206d6178696d756d20616d6f756e74206f66207265776172642e14536c61736808244163636f756e7449641c42616c616e6365042501204f6e652076616c696461746f722028616e6420697473206e6f6d696e61746f72732920686173206265656e20736c61736865642062792074686520676976656e20616d6f756e742e684f6c64536c617368696e675265706f7274446973636172646564043053657373696f6e496e646578081d0120416e206f6c6420736c617368696e67207265706f72742066726f6d2061207072696f72206572612077617320646973636172646564206265636175736520697420636f756c6448206e6f742062652070726f6365737365642e083853657373696f6e735065724572613053657373696f6e496e64657810060000000470204e756d626572206f662073657373696f6e7320706572206572612e3c426f6e64696e674475726174696f6e20457261496e646578101c00000004e4204e756d626572206f6620657261732074686174207374616b65642066756e6473206d7573742072656d61696e20626f6e64656420666f722e28344e6f74436f6e74726f6c6c65720468204e6f74206120636f6e74726f6c6c6572206163636f756e742e204e6f7453746173680454204e6f742061207374617368206163636f756e742e34416c7265616479426f6e646564046420537461736820697320616c726561647920626f6e6465642e34416c7265616479506169726564047820436f6e74726f6c6c657220697320616c7265616479207061697265642e30456d70747954617267657473046420546172676574732063616e6e6f7420626520656d7074792e384475706c6963617465496e6465780444204475706c696361746520696e6465782e44496e76616c6964536c617368496e646578048820536c617368207265636f726420696e646578206f7574206f6620626f756e64732e44496e73756666696369656e7456616c756504cc2043616e206e6f7420626f6e6420776974682076616c7565206c657373207468616e206d696e696d756d2062616c616e63652e304e6f4d6f72654368756e6b7304942043616e206e6f74207363686564756c65206d6f726520756e6c6f636b206368756e6b732e344e6f556e6c6f636b4368756e6b04a42043616e206e6f74207265626f6e6420776974686f757420756e6c6f636b696e67206368756e6b732e1c53657373696f6e011c53657373696f6e1c2856616c696461746f727301004c5665633c543a3a56616c696461746f7249643e0400047c205468652063757272656e7420736574206f662076616c696461746f72732e3043757272656e74496e64657801003053657373696f6e496e646578100000000004782043757272656e7420696e646578206f66207468652073657373696f6e2e345175657565644368616e676564010010626f6f6c040008390120547275652069662074686520756e6465726c79696e672065636f6e6f6d6963206964656e746974696573206f7220776569676874696e6720626568696e64207468652076616c696461746f7273a420686173206368616e67656420696e20746865207175657565642076616c696461746f72207365742e285175657565644b6579730100785665633c28543a3a56616c696461746f7249642c20543a3a4b657973293e0400083d012054686520717565756564206b65797320666f7220746865206e6578742073657373696f6e2e205768656e20746865206e6578742073657373696f6e20626567696e732c207468657365206b657973e02077696c6c206265207573656420746f2064657465726d696e65207468652076616c696461746f7227732073657373696f6e206b6579732e4844697361626c656456616c696461746f72730100205665633c7533323e04000c8020496e6469636573206f662064697361626c65642076616c696461746f72732e003501205468652073657420697320636c6561726564207768656e20606f6e5f73657373696f6e5f656e64696e67602072657475726e732061206e657720736574206f66206964656e7469746965732e204e6578744b6579730002051c5665633c75383e38543a3a56616c696461746f7249641c543a3a4b657973010400109c20546865206e6578742073657373696f6e206b65797320666f7220612076616c696461746f722e00590120546865206669727374206b657920697320616c77617973206044454455505f4b45595f5052454649586020746f206861766520616c6c20746865206461746120696e207468652073616d65206272616e6368206f6661012074686520747269652e20486176696e6720616c6c206461746120696e207468652073616d65206272616e63682073686f756c642070726576656e7420736c6f77696e6720646f776e206f7468657220717565726965732e204b65794f776e65720002051c5665633c75383e50284b65795479706549642c205665633c75383e2938543a3a56616c696461746f72496401040010250120546865206f776e6572206f662061206b65792e20546865207365636f6e64206b65792069732074686520604b657954797065496460202b2074686520656e636f646564206b65792e00590120546865206669727374206b657920697320616c77617973206044454455505f4b45595f5052454649586020746f206861766520616c6c20746865206461746120696e207468652073616d65206272616e6368206f6661012074686520747269652e20486176696e6720616c6c206461746120696e207468652073616d65206272616e63682073686f756c642070726576656e7420736c6f77696e6720646f776e206f7468657220717565726965732e0104207365745f6b65797308106b6579731c543a3a4b6579731470726f6f661c5665633c75383e28e82053657473207468652073657373696f6e206b6579287329206f66207468652066756e6374696f6e2063616c6c657220746f20606b657973602e210120416c6c6f777320616e206163636f756e7420746f20736574206974732073657373696f6e206b6579207072696f7220746f206265636f6d696e6720612076616c696461746f722ec4205468697320646f65736e27742074616b652065666665637420756e74696c20746865206e6578742073657373696f6e2e00d420546865206469737061746368206f726967696e206f6620746869732066756e6374696f6e206d757374206265207369676e65642e002c2023203c7765696768743e88202d204f286c6f67206e2920696e206e756d626572206f66206163636f756e74732e58202d204f6e6520657874726120444220656e7472792e302023203c2f7765696768743e0104284e657753657373696f6e043053657373696f6e496e646578085501204e65772073657373696f6e206861732068617070656e65642e204e6f746520746861742074686520617267756d656e74206973207468652073657373696f6e20696e6465782c206e6f742074686520626c6f636b88206e756d626572206173207468652074797065206d6967687420737567676573742e044044454455505f4b45595f50524546495814265b75385d38343a73657373696f6e3a6b6579730865012055736564206173206669727374206b657920666f7220604e6578744b6579736020616e6420604b65794f776e65726020746f2070757420616c6c20746865206461746120696e746f207468652073616d65206272616e636834206f662074686520747269652e0c30496e76616c696450726f6f66046420496e76616c6964206f776e6572736869702070726f6f662e5c4e6f4173736f63696174656456616c696461746f72496404a0204e6f206173736f6369617465642076616c696461746f7220494420666f72206163636f756e742e344475706c6963617465644b657904682052656769737465726564206475706c6963617465206b65792e2444656d6f6372616379012444656d6f6372616379403c5075626c696350726f70436f756e7401002450726f70496e646578100000000004f420546865206e756d626572206f6620287075626c6963292070726f706f73616c7320746861742068617665206265656e206d61646520736f206661722e2c5075626c696350726f707301009c5665633c2850726f70496e6465782c20543a3a486173682c20543a3a4163636f756e744964293e040004210120546865207075626c69632070726f706f73616c732e20556e736f727465642e20546865207365636f6e64206974656d206973207468652070726f706f73616c277320686173682e24507265696d616765730001011c543a3a48617368d4285665633c75383e2c20543a3a4163636f756e7449642c2042616c616e63654f663c543e2c20543a3a426c6f636b4e756d62657229000400086101204d6170206f662068617368657320746f207468652070726f706f73616c20707265696d6167652c20616c6f6e6720776974682077686f207265676973746572656420697420616e64207468656972206465706f7369742ee42054686520626c6f636b206e756d6265722069732074686520626c6f636b20617420776869636820697420776173206465706f73697465642e244465706f7369744f660001012450726f70496e646578842842616c616e63654f663c543e2c205665633c543a3a4163636f756e7449643e2900040004842054686f73652077686f2068617665206c6f636b65642061206465706f7369742e3c5265666572656e64756d436f756e7401003c5265666572656e64756d496e646578100000000004310120546865206e6578742066726565207265666572656e64756d20696e6465782c20616b6120746865206e756d626572206f66207265666572656e6461207374617274656420736f206661722e344c6f77657374556e62616b656401003c5265666572656e64756d496e646578100000000008250120546865206c6f77657374207265666572656e64756d20696e64657820726570726573656e74696e6720616e20756e62616b6564207265666572656e64756d2e20457175616c20746fdc20605265666572656e64756d436f756e74602069662074686572652069736e2774206120756e62616b6564207265666572656e64756d2e405265666572656e64756d496e666f4f660001013c5265666572656e64756d496e6465789c5265666572656e64756d496e666f3c543a3a426c6f636b4e756d6265722c20543a3a486173683e00040004b420496e666f726d6174696f6e20636f6e6365726e696e6720616e7920676976656e207265666572656e64756d2e34446973706174636851756575650100bc5665633c28543a3a426c6f636b4e756d6265722c20543a3a486173682c205265666572656e64756d496e646578293e0400044101205175657565206f66207375636365737366756c207265666572656e646120746f20626520646973706174636865642e2053746f726564206f72646572656420627920626c6f636b206e756d6265722e24566f74657273466f720101013c5265666572656e64756d496e646578445665633c543a3a4163636f756e7449643e00040004a4204765742074686520766f7465727320666f72207468652063757272656e742070726f706f73616c2e18566f74654f660101017c285265666572656e64756d496e6465782c20543a3a4163636f756e7449642910566f7465000400106101204765742074686520766f746520696e206120676976656e207265666572656e64756d206f66206120706172746963756c617220766f7465722e2054686520726573756c74206973206d65616e696e6766756c206f6e6c794d012069662060766f746572735f666f726020696e636c756465732074686520766f746572207768656e2063616c6c6564207769746820746865207265666572656e64756d2028796f75276c6c20676574207468655d012064656661756c742060566f7465602076616c7565206f7468657277697365292e20496620796f7520646f6e27742077616e7420746f20636865636b2060766f746572735f666f72602c207468656e20796f752063616ef420616c736f20636865636b20666f722073696d706c65206578697374656e636520776974682060566f74654f663a3a657869737473602066697273742e1450726f787900010130543a3a4163636f756e74496430543a3a4163636f756e7449640004000831012057686f2069732061626c6520746f20766f746520666f722077686f6d2e2056616c7565206973207468652066756e642d686f6c64696e67206163636f756e742c206b6579206973207468658820766f74652d7472616e73616374696f6e2d73656e64696e67206163636f756e742e2c44656c65676174696f6e7301010130543a3a4163636f756e7449646828543a3a4163636f756e7449642c20436f6e76696374696f6e2901840000000000000000000000000000000000000000000000000000000000000000000441012047657420746865206163636f756e742028616e64206c6f636b20706572696f64732920746f20776869636820616e6f74686572206163636f756e742069732064656c65676174696e6720766f74652e544c6173745461626c656457617345787465726e616c010010626f6f6c0400085901205472756520696620746865206c617374207265666572656e64756d207461626c656420776173207375626d69747465642065787465726e616c6c792e2046616c7365206966206974207761732061207075626c6963282070726f706f73616c2e304e65787445787465726e616c00006028543a3a486173682c20566f74655468726573686f6c6429040010590120546865207265666572656e64756d20746f206265207461626c6564207768656e6576657220697420776f756c642062652076616c696420746f207461626c6520616e2065787465726e616c2070726f706f73616c2e550120546869732068617070656e73207768656e2061207265666572656e64756d206e6565647320746f206265207461626c656420616e64206f6e65206f662074776f20636f6e646974696f6e7320617265206d65743aa4202d20604c6173745461626c656457617345787465726e616c60206973206066616c7365603b206f7268202d20605075626c696350726f70736020697320656d7074792e24426c61636b6c6973740001011c543a3a486173688c28543a3a426c6f636b4e756d6265722c205665633c543a3a4163636f756e7449643e290004000851012041207265636f7264206f662077686f207665746f656420776861742e204d6170732070726f706f73616c206861736820746f206120706f737369626c65206578697374656e7420626c6f636b206e756d626572e82028756e74696c207768656e206974206d6179206e6f742062652072657375626d69747465642920616e642077686f207665746f65642069742e3443616e63656c6c6174696f6e730101011c543a3a4861736810626f6f6c000400042901205265636f7264206f6620616c6c2070726f706f73616c7320746861742068617665206265656e207375626a65637420746f20656d657267656e63792063616e63656c6c6174696f6e2e01541c70726f706f7365083470726f706f73616c5f686173681c543a3a486173681476616c756554436f6d706163743c42616c616e63654f663c543e3e18a02050726f706f736520612073656e73697469766520616374696f6e20746f2062652074616b656e2e002c2023203c7765696768743e20202d204f2831292e80202d2054776f204442206368616e6765732c206f6e6520444220656e7472792e302023203c2f7765696768743e187365636f6e64042070726f706f73616c48436f6d706163743c50726f70496e6465783e18a02050726f706f736520612073656e73697469766520616374696f6e20746f2062652074616b656e2e002c2023203c7765696768743e20202d204f2831292e40202d204f6e6520444220656e7472792e302023203c2f7765696768743e10766f746508247265665f696e64657860436f6d706163743c5265666572656e64756d496e6465783e10766f746510566f74651c350120566f746520696e2061207265666572656e64756d2e2049662060766f74652e69735f6179652829602c2074686520766f746520697320746f20656e616374207468652070726f706f73616c3bbc206f7468657277697365206974206973206120766f746520746f206b65657020746865207374617475732071756f2e002c2023203c7765696768743e20202d204f2831292e7c202d204f6e65204442206368616e67652c206f6e6520444220656e7472792e302023203c2f7765696768743e2870726f78795f766f746508247265665f696e64657860436f6d706163743c5265666572656e64756d496e6465783e10766f746510566f74651c510120566f746520696e2061207265666572656e64756d206f6e20626568616c66206f6620612073746173682e2049662060766f74652e69735f6179652829602c2074686520766f746520697320746f20656e616374f4207468652070726f706f73616c3b206f7468657277697365206974206973206120766f746520746f206b65657020746865207374617475732071756f2e002c2023203c7765696768743e20202d204f2831292e7c202d204f6e65204442206368616e67652c206f6e6520444220656e7472792e302023203c2f7765696768743e40656d657267656e63795f63616e63656c04247265665f696e6465783c5265666572656e64756d496e646578085101205363686564756c6520616e20656d657267656e63792063616e63656c6c6174696f6e206f662061207265666572656e64756d2e2043616e6e6f742068617070656e20747769636520746f207468652073616d6530207265666572656e64756d2e4065787465726e616c5f70726f706f7365043470726f706f73616c5f686173681c543a3a48617368083101205363686564756c652061207265666572656e64756d20746f206265207461626c6564206f6e6365206974206973206c6567616c20746f207363686564756c6520616e2065787465726e616c30207265666572656e64756d2e6465787465726e616c5f70726f706f73655f6d616a6f72697479043470726f706f73616c5f686173681c543a3a48617368145901205363686564756c652061206d616a6f726974792d63617272696573207265666572656e64756d20746f206265207461626c6564206e657874206f6e6365206974206973206c6567616c20746f207363686564756c656020616e2065787465726e616c207265666572656e64756d2e004d0120556e6c696b65206065787465726e616c5f70726f706f7365602c20626c61636b6c697374696e6720686173206e6f20656666656374206f6e207468697320616e64206974206d6179207265706c61636520619c207072652d7363686564756c6564206065787465726e616c5f70726f706f7365602063616c6c2e6065787465726e616c5f70726f706f73655f64656661756c74043470726f706f73616c5f686173681c543a3a48617368144901205363686564756c652061206e656761746976652d7475726e6f75742d62696173207265666572656e64756d20746f206265207461626c6564206e657874206f6e6365206974206973206c6567616c20746f84207363686564756c6520616e2065787465726e616c207265666572656e64756d2e004d0120556e6c696b65206065787465726e616c5f70726f706f7365602c20626c61636b6c697374696e6720686173206e6f20656666656374206f6e207468697320616e64206974206d6179207265706c61636520619c207072652d7363686564756c6564206065787465726e616c5f70726f706f7365602063616c6c2e28666173745f747261636b0c3470726f706f73616c5f686173681c543a3a4861736834766f74696e675f706572696f6438543a3a426c6f636b4e756d6265721464656c617938543a3a426c6f636b4e756d626572245101205363686564756c65207468652063757272656e746c792065787465726e616c6c792d70726f706f736564206d616a6f726974792d63617272696573207265666572656e64756d20746f206265207461626c6564650120696d6d6564696174656c792e204966207468657265206973206e6f2065787465726e616c6c792d70726f706f736564207265666572656e64756d2063757272656e746c792c206f72206966207468657265206973206f6e65ec20627574206974206973206e6f742061206d616a6f726974792d63617272696573207265666572656e64756d207468656e206974206661696c732e00f8202d206070726f706f73616c5f68617368603a205468652068617368206f66207468652063757272656e742065787465726e616c2070726f706f73616c2e6101202d2060766f74696e675f706572696f64603a2054686520706572696f64207468617420697320616c6c6f77656420666f7220766f74696e67206f6e20746869732070726f706f73616c2e20496e6372656173656420746f9820202060456d657267656e6379566f74696e67506572696f646020696620746f6f206c6f772e5501202d206064656c6179603a20546865206e756d626572206f6620626c6f636b20616674657220766f74696e672068617320656e64656420696e20617070726f76616c20616e6420746869732073686f756c64206265bc202020656e61637465642e205468697320646f65736e277420686176652061206d696e696d756d20616d6f756e742e347665746f5f65787465726e616c043470726f706f73616c5f686173681c543a3a4861736804bc205665746f20616e6420626c61636b6c697374207468652065787465726e616c2070726f706f73616c20686173682e4463616e63656c5f7265666572656e64756d04247265665f696e64657860436f6d706163743c5265666572656e64756d496e6465783e04542052656d6f76652061207265666572656e64756d2e3463616e63656c5f717565756564041477686963683c5265666572656e64756d496e64657804a02043616e63656c20612070726f706f73616c2071756575656420666f7220656e6163746d656e742e247365745f70726f7879041470726f787930543a3a4163636f756e7449641498205370656369667920612070726f78792e2043616c6c6564206279207468652073746173682e002c2023203c7765696768743e58202d204f6e6520657874726120444220656e7472792e302023203c2f7765696768743e3072657369676e5f70726f787900149820436c656172207468652070726f78792e2043616c6c6564206279207468652070726f78792e002c2023203c7765696768743e40202d204f6e6520444220636c6561722e302023203c2f7765696768743e3072656d6f76655f70726f7879041470726f787930543a3a4163636f756e744964149820436c656172207468652070726f78792e2043616c6c6564206279207468652073746173682e002c2023203c7765696768743e40202d204f6e6520444220636c6561722e302023203c2f7765696768743e2064656c65676174650808746f30543a3a4163636f756e74496428636f6e76696374696f6e28436f6e76696374696f6e143c2044656c656761746520766f74652e002c2023203c7765696768743e58202d204f6e6520657874726120444220656e7472792e302023203c2f7765696768743e28756e64656c656761746500144420556e64656c656761746520766f74652e002c2023203c7765696768743e20202d204f2831292e302023203c2f7765696768743e58636c6561725f7075626c69635f70726f706f73616c7300040101205665746f20616e6420626c61636b6c697374207468652070726f706f73616c20686173682e204d7573742062652066726f6d20526f6f74206f726967696e2e346e6f74655f707265696d6167650440656e636f6465645f70726f706f73616c1c5665633c75383e0861012052656769737465722074686520707265696d61676520666f7220616e207570636f6d696e672070726f706f73616c2e205468697320646f65736e27742072657175697265207468652070726f706f73616c20746f206265250120696e207468652064697370617463682071756575652062757420646f657320726571756972652061206465706f7369742c2072657475726e6564206f6e636520656e61637465642e586e6f74655f696d6d696e656e745f707265696d6167650440656e636f6465645f70726f706f73616c1c5665633c75383e0845012052656769737465722074686520707265696d61676520666f7220616e207570636f6d696e672070726f706f73616c2e2054686973207265717569726573207468652070726f706f73616c20746f206265b420696e207468652064697370617463682071756575652e204e6f206465706f736974206973206e65656465642e34726561705f707265696d616765043470726f706f73616c5f686173681c543a3a4861736814f42052656d6f766520616e20657870697265642070726f706f73616c20707265696d61676520616e6420636f6c6c65637420746865206465706f7369742e00510120546869732077696c6c206f6e6c7920776f726b2061667465722060566f74696e67506572696f646020626c6f636b732066726f6d207468652074696d6520746861742074686520707265696d616765207761735d01206e6f7465642c2069662069742773207468652073616d65206163636f756e7420646f696e672069742e2049662069742773206120646966666572656e74206163636f756e742c207468656e206974276c6c206f6e6c79b020776f726b20616e206164646974696f6e616c2060456e6163746d656e74506572696f6460206c617465722e01402050726f706f736564082450726f70496e6465781c42616c616e636504c02041206d6f74696f6e20686173206265656e2070726f706f7365642062792061207075626c6963206163636f756e742e185461626c65640c2450726f70496e6465781c42616c616e6365385665633c4163636f756e7449643e04dc2041207075626c69632070726f706f73616c20686173206265656e207461626c656420666f72207265666572656e64756d20766f74652e3845787465726e616c5461626c656400049820416e2065787465726e616c2070726f706f73616c20686173206265656e207461626c65642e1c53746172746564083c5265666572656e64756d496e64657834566f74655468726573686f6c6404602041207265666572656e64756d2068617320626567756e2e18506173736564043c5265666572656e64756d496e64657804b020412070726f706f73616c20686173206265656e20617070726f766564206279207265666572656e64756d2e244e6f74506173736564043c5265666572656e64756d496e64657804b020412070726f706f73616c20686173206265656e2072656a6563746564206279207265666572656e64756d2e2443616e63656c6c6564043c5265666572656e64756d496e64657804842041207265666572656e64756d20686173206265656e2063616e63656c6c65642e204578656375746564083c5265666572656e64756d496e64657810626f6f6c047420412070726f706f73616c20686173206265656e20656e61637465642e2444656c65676174656408244163636f756e744964244163636f756e74496404e020416e206163636f756e74206861732064656c65676174656420746865697220766f746520746f20616e6f74686572206163636f756e742e2c556e64656c65676174656404244163636f756e74496404e820416e206163636f756e74206861732063616e63656c6c656420612070726576696f75732064656c65676174696f6e206f7065726174696f6e2e185665746f65640c244163636f756e74496410486173682c426c6f636b4e756d626572049820416e2065787465726e616c2070726f706f73616c20686173206265656e207665746f65642e34507265696d6167654e6f7465640c1048617368244163636f756e7449641c42616c616e636504e020412070726f706f73616c277320707265696d61676520776173206e6f7465642c20616e6420746865206465706f7369742074616b656e2e30507265696d616765557365640c1048617368244163636f756e7449641c42616c616e636504150120412070726f706f73616c20707265696d616765207761732072656d6f76656420616e6420757365642028746865206465706f736974207761732072657475726e6564292e3c507265696d616765496e76616c69640810486173683c5265666572656e64756d496e646578040d0120412070726f706f73616c20636f756c64206e6f7420626520657865637574656420626563617573652069747320707265696d6167652077617320696e76616c69642e3c507265696d6167654d697373696e670810486173683c5265666572656e64756d496e646578040d0120412070726f706f73616c20636f756c64206e6f7420626520657865637574656420626563617573652069747320707265696d61676520776173206d697373696e672e38507265696d616765526561706564101048617368244163636f756e7449641c42616c616e6365244163636f756e744964045d012041207265676973746572656420707265696d616765207761732072656d6f76656420616e6420746865206465706f73697420636f6c6c6563746564206279207468652072656170657220286c617374206974656d292e1c3c456e6163746d656e74506572696f6438543a3a426c6f636b4e756d6265721000c2010014710120546865206d696e696d756d20706572696f64206f66206c6f636b696e6720616e642074686520706572696f64206265747765656e20612070726f706f73616c206265696e6720617070726f76656420616e6420656e61637465642e0031012049742073686f756c642067656e6572616c6c792062652061206c6974746c65206d6f7265207468616e2074686520756e7374616b6520706572696f6420746f20656e737572652074686174690120766f74696e67207374616b657273206861766520616e206f70706f7274756e69747920746f2072656d6f7665207468656d73656c7665732066726f6d207468652073797374656d20696e2074686520636173652077686572659c207468657920617265206f6e20746865206c6f73696e672073696465206f66206120766f74652e304c61756e6368506572696f6438543a3a426c6f636b4e756d62657210c089010004e420486f77206f6674656e2028696e20626c6f636b7329206e6577207075626c6963207265666572656e646120617265206c61756e636865642e30566f74696e67506572696f6438543a3a426c6f636b4e756d62657210c089010004b820486f77206f6674656e2028696e20626c6f636b732920746f20636865636b20666f72206e657720766f7465732e384d696e696d756d4465706f7369743042616c616e63654f663c543e40000010632d5ec76b050000000000000004350120546865206d696e696d756d20616d6f756e7420746f20626520757365642061732061206465706f73697420666f722061207075626c6963207265666572656e64756d2070726f706f73616c2e54456d657267656e6379566f74696e67506572696f6438543a3a426c6f636b4e756d626572104038000004ec204d696e696d756d20766f74696e6720706572696f6420616c6c6f77656420666f7220616e20656d657267656e6379207265666572656e64756d2e34436f6f6c6f6666506572696f6438543a3a426c6f636b4e756d62657210c089010004610120506572696f6420696e20626c6f636b7320776865726520616e2065787465726e616c2070726f706f73616c206d6179206e6f742062652072652d7375626d6974746564206166746572206265696e67207665746f65642e4c507265696d616765427974654465706f7369743042616c616e63654f663c543e400000c16ff286230000000000000000000429012054686520616d6f756e74206f662062616c616e63652074686174206d757374206265206465706f7369746564207065722062797465206f6620707265696d6167652073746f7265642e582056616c75654c6f7704382056616c756520746f6f206c6f773c50726f706f73616c4d697373696e6704602050726f706f73616c20646f6573206e6f74206578697374204e6f7450726f78790430204e6f7420612070726f787920426164496e646578043820556e6b6e6f776e20696e6465783c416c726561647943616e63656c656404982043616e6e6f742063616e63656c207468652073616d652070726f706f73616c207477696365444475706c696361746550726f706f73616c04582050726f706f73616c20616c7265616479206d6164654c50726f706f73616c426c61636b6c6973746564046c2050726f706f73616c207374696c6c20626c61636b6c6973746564444e6f7453696d706c654d616a6f7269747904ac204e6578742065787465726e616c2070726f706f73616c206e6f742073696d706c65206d616a6f726974792c496e76616c696448617368043420496e76616c69642068617368284e6f50726f706f73616c0454204e6f2065787465726e616c2070726f706f73616c34416c72656164795665746f6564049c204964656e74697479206d6179206e6f74207665746f20612070726f706f73616c20747769636530416c726561647950726f7879044020416c726561647920612070726f78792857726f6e6750726f787904302057726f6e672070726f7879304e6f7444656c6567617465640438204e6f742064656c656761746564444475706c6963617465507265696d616765045c20507265696d61676520616c7265616479206e6f7465642c4e6f74496d6d696e656e740434204e6f7420696d6d696e656e74144561726c79042820546f6f206561726c7920496d6d696e656e74042420496d6d696e656e743c507265696d6167654d697373696e67044c20507265696d616765206e6f7420666f756e64445265666572656e64756d496e76616c6964048820566f746520676976656e20666f7220696e76616c6964207265666572656e64756d3c507265696d616765496e76616c6964044420496e76616c696420707265696d6167652c4e6f6e6557616974696e670454204e6f2070726f706f73616c732077616974696e671c436f756e63696c014c496e7374616e636531436f6c6c656374697665142450726f706f73616c730100305665633c543a3a486173683e040004902054686520686173686573206f6620746865206163746976652070726f706f73616c732e2850726f706f73616c4f660001011c543a3a48617368643c542061732054726169743c493e3e3a3a50726f706f73616c00040004cc2041637475616c2070726f706f73616c20666f72206120676976656e20686173682c20696620697427732063757272656e742e18566f74696e670001011c543a3a486173684c566f7465733c543a3a4163636f756e7449643e00040004b420566f746573206f6e206120676976656e2070726f706f73616c2c206966206974206973206f6e676f696e672e3450726f706f73616c436f756e7401000c753332100000000004482050726f706f73616c7320736f206661722e1c4d656d626572730100445665633c543a3a4163636f756e7449643e0400043901205468652063757272656e74206d656d62657273206f662074686520636f6c6c6563746976652e20546869732069732073746f72656420736f7274656420286a7573742062792076616c7565292e01102c7365745f6d656d62657273042c6e65775f6d656d62657273445665633c543a3a4163636f756e7449643e105101205365742074686520636f6c6c6563746976652773206d656d62657273686970206d616e75616c6c7920746f20606e65775f6d656d62657273602e204265206e69636520746f2074686520636861696e20616e645c2070726f76696465206974207072652d736f727465642e005820526571756972657320726f6f74206f726967696e2e1c65786563757465042070726f706f73616c78426f783c3c542061732054726169743c493e3e3a3a50726f706f73616c3e0cf420446973706174636820612070726f706f73616c2066726f6d2061206d656d626572207573696e672074686520604d656d62657260206f726967696e2e00ac204f726967696e206d7573742062652061206d656d626572206f662074686520636f6c6c6563746976652e1c70726f706f736508247468726573686f6c6450436f6d706163743c4d656d626572436f756e743e2070726f706f73616c78426f783c3c542061732054726169743c493e3e3a3a50726f706f73616c3e102c2023203c7765696768743e90202d20426f756e6465642073746f7261676520726561647320616e64207772697465732eb8202d20417267756d656e7420607468726573686f6c6460206861732062656172696e67206f6e207765696768742e302023203c2f7765696768743e10766f74650c2070726f706f73616c1c543a3a4861736814696e64657858436f6d706163743c50726f706f73616c496e6465783e1c617070726f766510626f6f6c102c2023203c7765696768743e8c202d20426f756e6465642073746f72616765207265616420616e64207772697465732e5501202d2057696c6c20626520736c696768746c792068656176696572206966207468652070726f706f73616c20697320617070726f766564202f20646973617070726f7665642061667465722074686520766f74652e302023203c2f7765696768743e01182050726f706f73656410244163636f756e7449643450726f706f73616c496e64657810486173682c4d656d626572436f756e74084d012041206d6f74696f6e2028676976656e20686173682920686173206265656e2070726f706f7365642028627920676976656e206163636f756e742920776974682061207468726573686f6c642028676976656e4020604d656d626572436f756e7460292e14566f74656414244163636f756e744964104861736810626f6f6c2c4d656d626572436f756e742c4d656d626572436f756e740809012041206d6f74696f6e2028676976656e20686173682920686173206265656e20766f746564206f6e20627920676976656e206163636f756e742c206c656176696e67190120612074616c6c79202879657320766f74657320616e64206e6f20766f74657320676976656e20726573706563746976656c7920617320604d656d626572436f756e7460292e20417070726f76656404104861736804c42041206d6f74696f6e2077617320617070726f76656420627920746865207265717569726564207468726573686f6c642e2c446973617070726f76656404104861736804d42041206d6f74696f6e20776173206e6f7420617070726f76656420627920746865207265717569726564207468726573686f6c642e20457865637574656408104861736810626f6f6c0405012041206d6f74696f6e207761732065786563757465643b2060626f6f6c6020697320747275652069662072657475726e656420776974686f7574206572726f722e384d656d626572457865637574656408104861736810626f6f6c042d0120412073696e676c65206d656d6265722064696420736f6d6520616374696f6e3b2060626f6f6c6020697320747275652069662072657475726e656420776974686f7574206572726f722e0018244e6f744d656d6265720460204163636f756e74206973206e6f742061206d656d626572444475706c696361746550726f706f73616c0480204475706c69636174652070726f706f73616c73206e6f7420616c6c6f7765643c50726f706f73616c4d697373696e6704502050726f706f73616c206d7573742065786973742857726f6e67496e6465780444204d69736d61746368656420696e646578344475706c6963617465566f7465045c204475706c696361746520766f74652069676e6f72656448416c7265616479496e697469616c697a65640484204d656d626572732061726520616c726561647920696e697469616c697a65642124456c656374696f6e73014050687261676d656e456c656374696f6e181c4d656d626572730100845665633c28543a3a4163636f756e7449642c2042616c616e63654f663c543e293e040004f0205468652063757272656e7420656c6563746564206d656d626572736869702e20536f72746564206261736564206f6e206163636f756e742069642e2452756e6e65727355700100845665633c28543a3a4163636f756e7449642c2042616c616e63654f663c543e293e0400044901205468652063757272656e742072756e6e6572735f75702e20536f72746564206261736564206f6e206c6f7720746f2068696768206d657269742028776f72736520746f20626573742072756e6e6572292e38456c656374696f6e526f756e647301000c75333210000000000441012054686520746f74616c206e756d626572206f6620766f746520726f756e6473207468617420686176652068617070656e65642c206578636c7564696e6720746865207570636f6d696e67206f6e652e1c566f7465734f6601010130543a3a4163636f756e744964445665633c543a3a4163636f756e7449643e01040004010120566f746573206f66206120706172746963756c617220766f7465722c20776974682074686520726f756e6420696e646578206f662074686520766f7465732e1c5374616b654f6601010130543a3a4163636f756e7449643042616c616e63654f663c543e0040000000000000000000000000000000000464204c6f636b6564207374616b65206f66206120766f7465722e2843616e646964617465730100445665633c543a3a4163636f756e7449643e0400086501205468652070726573656e742063616e646964617465206c6973742e20536f72746564206261736564206f6e206163636f756e742d69642e20412063757272656e74206d656d626572206f7220612072756e6e65722063616e3101206e6576657220656e746572207468697320766563746f7220616e6420697320616c7761797320696d706c696369746c7920617373756d656420746f20626520612063616e6469646174652e011810766f74650814766f746573445665633c543a3a4163636f756e7449643e1476616c756554436f6d706163743c42616c616e63654f663c543e3e3c050120566f746520666f72206120736574206f662063616e6469646174657320666f7220746865207570636f6d696e6720726f756e64206f6620656c656374696f6e2e0050205468652060766f746573602073686f756c643a482020202d206e6f7420626520656d7074792eac2020202d206265206c657373207468616e20746865206e756d626572206f662063616e646964617465732e005d012055706f6e20766f74696e672c206076616c75656020756e697473206f66206077686f6027732062616c616e6365206973206c6f636b656420616e64206120626f6e6420616d6f756e742069732072657365727665642e5d012049742069732074686520726573706f6e736962696c697479206f66207468652063616c6c657220746f206e6f7420706c61636520616c6c206f662074686569722062616c616e636520696e746f20746865206c6f636ba020616e64206b65657020736f6d6520666f722066757274686572207472616e73616374696f6e732e002c2023203c7765696768743e2c2023232323205374617465302052656164733a204f283129c8205772697465733a204f28562920676976656e2060566020766f7465732e205620697320626f756e6465642062792031362e302023203c2f7765696768743e3072656d6f76655f766f746572001c21012052656d6f766520606f726967696e60206173206120766f7465722e20546869732072656d6f76657320746865206c6f636b20616e642072657475726e732074686520626f6e642e002c2023203c7765696768743e2c2023232323205374617465302052656164733a204f28312934205772697465733a204f283129302023203c2f7765696768743e507265706f72745f646566756e63745f766f74657204187461726765748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f75726365345d01205265706f727420607461726765746020666f72206265696e6720616e20646566756e637420766f7465722e20496e2063617365206f6620612076616c6964207265706f72742c20746865207265706f727465722069735d012072657761726465642062792074686520626f6e6420616d6f756e74206f662060746172676574602e204f74686572776973652c20746865207265706f7274657220697473656c662069732072656d6f76656420616e645c20746865697220626f6e6420697320736c61736865642e0088204120646566756e637420766f74657220697320646566696e656420746f2062653a4d012020202d206120766f7465722077686f73652063757272656e74207375626d697474656420766f7465732061726520616c6c20696e76616c69642e20692e652e20616c6c206f66207468656d20617265206e6fb420202020206c6f6e67657220612063616e646964617465206e6f7220616e20616374697665206d656d6265722e002c2023203c7765696768743e2c202323232320537461746515012052656164733a204f284e4c6f674d2920676976656e204d2063757272656e742063616e6469646174657320616e64204e20766f74657320666f722060746172676574602e34205772697465733a204f283129302023203c2f7765696768743e407375626d69745f63616e646964616379003478205375626d6974206f6e6573656c6620666f722063616e6469646163792e006420412063616e6469646174652077696c6c206569746865723aec2020202d204c6f73652061742074686520656e64206f6620746865207465726d20616e6420666f7266656974207468656972206465706f7369742e2d012020202d2057696e20616e64206265636f6d652061206d656d6265722e204d656d626572732077696c6c206576656e7475616c6c7920676574207468656972207374617368206261636b2e55012020202d204265636f6d6520612072756e6e65722d75702e2052756e6e6572732d75707320617265207265736572766564206d656d6265727320696e2063617365206f6e65206765747320666f72636566756c6c7934202020202072656d6f7665642e002c2023203c7765696768743e2c20232323232053746174658c2052656164733a204f284c6f674e2920476976656e204e2063616e646964617465732e34205772697465733a204f283129302023203c2f7765696768743e4872656e6f756e63655f63616e646964616379002451012052656e6f756e6365206f6e65277320696e74656e74696f6e20746f20626520612063616e64696461746520666f7220746865206e65787420656c656374696f6e20726f756e642e203320706f74656e7469616c40206f7574636f6d65732065786973743a4101202d20606f726967696e6020697320612063616e64696461746520616e64206e6f7420656c656374656420696e20616e79207365742e20496e207468697320636173652c2074686520626f6e64206973f4202020756e72657365727665642c2072657475726e656420616e64206f726967696e2069732072656d6f76656420617320612063616e6469646174652e5901202d20606f726967696e6020697320612063757272656e742072756e6e65722075702e20496e207468697320636173652c2074686520626f6e6420697320756e72657365727665642c2072657475726e656420616e64842020206f726967696e2069732072656d6f76656420617320612072756e6e65722e4d01202d20606f726967696e6020697320612063757272656e74206d656d6265722e20496e207468697320636173652c2074686520626f6e6420697320756e726573657276656420616e64206f726967696e206973590120202072656d6f7665642061732061206d656d6265722c20636f6e73657175656e746c79206e6f74206265696e6720612063616e64696461746520666f7220746865206e65787420726f756e6420616e796d6f72652e650120202053696d696c617220746f205b6072656d6f76655f766f746572605d2c206966207265706c6163656d656e742072756e6e657273206578697374732c20746865792061726520696d6d6564696174656c7920757365642e3472656d6f76655f6d656d626572040c77686f8c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f75726365345d012052656d6f7665206120706172746963756c6172206d656d6265722066726f6d20746865207365742e20546869732069732065666665637469766520696d6d6564696174656c7920616e642074686520626f6e64206f668020746865206f7574676f696e67206d656d62657220697320736c61736865642e00590120496620612072756e6e65722d757020697320617661696c61626c652c207468656e2074686520626573742072756e6e65722d75702077696c6c2062652072656d6f76656420616e64207265706c6163657320746865f4206f7574676f696e67206d656d6265722e204f74686572776973652c2061206e65772070687261676d656e20726f756e6420697320737461727465642e004501204e6f74652074686174207468697320646f6573206e6f7420616666656374207468652064657369676e6174656420626c6f636b206e756d626572206f6620746865206e65787420656c656374696f6e2e002c2023203c7765696768743e2c2023232323205374617465582052656164733a204f28646f5f70687261676d656e295c205772697465733a204f28646f5f70687261676d656e29302023203c2f7765696768743e01141c4e65775465726d04645665633c284163636f756e7449642c2042616c616e6365293e0855012041206e6577207465726d2077697468206e6577206d656d626572732e205468697320696e64696361746573207468617420656e6f7567682063616e6469646174657320657869737465642c206e6f742074686174450120656e6f756768206861766520686173206265656e20656c65637465642e2054686520696e6e65722076616c7565206d757374206265206578616d696e656420666f72207468697320707572706f73652e24456d7074795465726d0004d8204e6f20286f72206e6f7420656e6f756768292063616e64696461746573206578697374656420666f72207468697320726f756e642e304d656d6265724b69636b656404244163636f756e7449640845012041206d656d62657220686173206265656e2072656d6f7665642e20546869732073686f756c6420616c7761797320626520666f6c6c6f7765642062792065697468657220604e65775465726d60206f74342060456d7074795465726d602e3c4d656d62657252656e6f756e63656404244163636f756e74496404a02041206d656d626572206861732072656e6f756e6365642074686569722063616e6469646163792e34566f7465725265706f727465640c244163636f756e744964244163636f756e74496410626f6f6c086101204120766f7465722028666972737420656c656d656e742920776173207265706f72746564202862797420746865207365636f6e6420656c656d656e742920776974682074686520746865207265706f7274206265696e678c207375636365737366756c206f72206e6f742028746869726420656c656d656e74292e143443616e646964616379426f6e643042616c616e63654f663c543e400000a0dec5adc93536000000000000000028566f74696e67426f6e643042616c616e63654f663c543e400000e8890423c78a00000000000000000038446573697265644d656d626572730c753332100d00000000404465736972656452756e6e65727355700c753332100700000000305465726d4475726174696f6e38543a3a426c6f636b4e756d6265721000270600003830556e61626c65546f566f746504c42043616e6e6f7420766f7465207768656e206e6f2063616e64696461746573206f72206d656d626572732065786973742e1c4e6f566f7465730498204d75737420766f746520666f72206174206c65617374206f6e652063616e6469646174652e30546f6f4d616e79566f74657304882043616e6e6f7420766f7465206d6f7265207468616e2063616e646964617465732e504d6178696d756d566f7465734578636565646564049c2043616e6e6f7420766f7465206d6f7265207468616e206d6178696d756d20616c6c6f7765642e284c6f7742616c616e636504c82043616e6e6f7420766f74652077697468207374616b65206c657373207468616e206d696e696d756d2062616c616e63652e3c556e61626c65546f506179426f6e64047c20566f7465722063616e206e6f742070617920766f74696e6720626f6e642e2c4d7573744265566f7465720444204d757374206265206120766f7465722e285265706f727453656c6604502043616e6e6f74207265706f72742073656c662e4c4475706c69636174656443616e6469646174650484204475706c6963617465642063616e646964617465207375626d697373696f6e2e304d656d6265725375626d6974048c204d656d6265722063616e6e6f742072652d7375626d69742063616e6469646163792e3052756e6e65725375626d6974048c2052756e6e65722063616e6e6f742072652d7375626d69742063616e6469646163792e68496e73756666696369656e7443616e64696461746546756e647304982043616e64696461746520646f6573206e6f74206861766520656e6f7567682066756e64732e34496e76616c69644f726967696e04c8204f726967696e206973206e6f7420612063616e6469646174652c206d656d626572206f7220612072756e6e65722075702e244e6f744d656d6265720438204e6f742061206d656d6265722e3c46696e616c697479547261636b65720001042866696e616c5f68696e74041068696e745c436f6d706163743c543a3a426c6f636b4e756d6265723e08f42048696e7420746861742074686520617574686f72206f66207468697320626c6f636b207468696e6b732074686520626573742066696e616c697a65646c20626c6f636b2069732074686520676976656e206e756d6265722e00082857696e646f7753697a6538543a3a426c6f636b4e756d626572106500000004190120546865206e756d626572206f6620726563656e742073616d706c657320746f206b6565702066726f6d207468697320636861696e2e2044656661756c74206973203130312e345265706f72744c6174656e637938543a3a426c6f636b4e756d62657210e8030000041d01205468652064656c617920616674657220776869636820706f696e74207468696e6773206265636f6d6520737573706963696f75732e2044656661756c7420697320313030302e0838416c72656164795570646174656404c82046696e616c2068696e74206d7573742062652075706461746564206f6e6c79206f6e636520696e2074686520626c6f636b1c42616448696e7404902046696e616c697a6564206865696768742061626f766520626c6f636b206e756d6265721c4772616e647061013c4772616e64706146696e616c6974791c2c417574686f726974696573010034417574686f726974794c6973740400102c20444550524543415445440061012054686973207573656420746f2073746f7265207468652063757272656e7420617574686f72697479207365742c20776869636820686173206265656e206d6967726174656420746f207468652077656c6c2d6b6e6f776e94204752414e4450415f415554484f52495445535f4b455920756e686173686564206b65792e14537461746501006c53746f72656453746174653c543a3a426c6f636b4e756d6265723e04000490205374617465206f66207468652063757272656e7420617574686f72697479207365742e3450656e64696e674368616e676500008c53746f72656450656e64696e674368616e67653c543a3a426c6f636b4e756d6265723e040004c42050656e64696e67206368616e67653a20287369676e616c65642061742c207363686564756c6564206368616e6765292e284e657874466f72636564000038543a3a426c6f636b4e756d626572040004bc206e65787420626c6f636b206e756d6265722077686572652077652063616e20666f7263652061206368616e67652e1c5374616c6c656400008028543a3a426c6f636b4e756d6265722c20543a3a426c6f636b4e756d626572290400049020607472756560206966207765206172652063757272656e746c79207374616c6c65642e3043757272656e7453657449640100145365744964200000000000000000085d0120546865206e756d626572206f66206368616e6765732028626f746820696e207465726d73206f66206b65797320616e6420756e6465726c79696e672065636f6e6f6d696320726573706f6e736962696c697469657329c420696e20746865202273657422206f66204772616e6470612076616c696461746f72732066726f6d2067656e657369732e30536574496453657373696f6e0001011453657449643053657373696f6e496e64657800040004c1012041206d617070696e672066726f6d206772616e6470612073657420494420746f2074686520696e646578206f6620746865202a6d6f737420726563656e742a2073657373696f6e20666f7220776869636820697473206d656d62657273207765726520726573706f6e7369626c652e0104487265706f72745f6d69736265686176696f72041c5f7265706f72741c5665633c75383e0464205265706f727420736f6d65206d69736265686176696f722e010c384e6577417574686f7269746965730434417574686f726974794c6973740490204e657720617574686f726974792073657420686173206265656e206170706c6965642e1850617573656400049c2043757272656e7420617574686f726974792073657420686173206265656e207061757365642e1c526573756d65640004a02043757272656e7420617574686f726974792073657420686173206265656e20726573756d65642e00102c50617573654661696c656408090120417474656d707420746f207369676e616c204752414e445041207061757365207768656e2074686520617574686f72697479207365742069736e2774206c697665a8202865697468657220706175736564206f7220616c72656164792070656e64696e67207061757365292e30526573756d654661696c656408150120417474656d707420746f207369676e616c204752414e44504120726573756d65207768656e2074686520617574686f72697479207365742069736e277420706175736564a42028656974686572206c697665206f7220616c72656164792070656e64696e6720726573756d65292e344368616e676550656e64696e6704ec20417474656d707420746f207369676e616c204752414e445041206368616e67652077697468206f6e6520616c72656164792070656e64696e672e1c546f6f536f6f6e04c02043616e6e6f74207369676e616c20666f72636564206368616e676520736f20736f6f6e206166746572206c6173742e20547265617375727901205472656173757279143450726f706f73616c436f756e7401003450726f706f73616c496e646578100000000004a4204e756d626572206f662070726f706f73616c7320746861742068617665206265656e206d6164652e2450726f706f73616c730001013450726f706f73616c496e6465789050726f706f73616c3c543a3a4163636f756e7449642c2042616c616e63654f663c543e3e000400047c2050726f706f73616c7320746861742068617665206265656e206d6164652e24417070726f76616c730100485665633c50726f706f73616c496e6465783e040004f82050726f706f73616c20696e646963657320746861742068617665206265656e20617070726f76656420627574206e6f742079657420617761726465642e10546970730001051c543a3a48617368f04f70656e5469703c543a3a4163636f756e7449642c2042616c616e63654f663c543e2c20543a3a426c6f636b4e756d6265722c20543a3a486173683e0004000c59012054697073207468617420617265206e6f742079657420636f6d706c657465642e204b65796564206279207468652068617368206f66206028726561736f6e2c2077686f29602066726f6d207468652076616c75652e3d012054686973206861732074686520696e73656375726520656e756d657261626c6520686173682066756e6374696f6e2073696e636520746865206b657920697473656c6620697320616c7265616479802067756172616e7465656420746f20626520612073656375726520686173682e1c526561736f6e730001051c543a3a486173681c5665633c75383e0004000849012053696d706c6520707265696d616765206c6f6f6b75702066726f6d2074686520726561736f6e2773206861736820746f20746865206f726967696e616c20646174612e20416761696e2c2068617320616e610120696e73656375726520656e756d657261626c6520686173682073696e636520746865206b65792069732067756172616e7465656420746f2062652074686520726573756c74206f6620612073656375726520686173682e01203470726f706f73655f7370656e64081476616c756554436f6d706163743c42616c616e63654f663c543e3e2c62656e65666963696172798c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f75726365242d012050757420666f727761726420612073756767657374696f6e20666f72207370656e64696e672e2041206465706f7369742070726f706f7274696f6e616c20746f207468652076616c7565350120697320726573657276656420616e6420736c6173686564206966207468652070726f706f73616c2069732072656a65637465642e2049742069732072657475726e6564206f6e636520746865542070726f706f73616c20697320617761726465642e002c2023203c7765696768743e20202d204f2831292e64202d204c696d697465642073746f726167652072656164732e94202d204f6e65204442206368616e67652c206f6e6520657874726120444220656e7472792e302023203c2f7765696768743e3c72656a6563745f70726f706f73616c042c70726f706f73616c5f696458436f6d706163743c50726f706f73616c496e6465783e1cfc2052656a65637420612070726f706f736564207370656e642e20546865206f726967696e616c206465706f7369742077696c6c20626520736c61736865642e002c2023203c7765696768743e20202d204f2831292e64202d204c696d697465642073746f726167652072656164732e40202d204f6e6520444220636c6561722e302023203c2f7765696768743e40617070726f76655f70726f706f73616c042c70726f706f73616c5f696458436f6d706163743c50726f706f73616c496e6465783e205d0120417070726f766520612070726f706f73616c2e2041742061206c617465722074696d652c207468652070726f706f73616c2077696c6c20626520616c6c6f636174656420746f207468652062656e6566696369617279ac20616e6420746865206f726967696e616c206465706f7369742077696c6c2062652072657475726e65642e002c2023203c7765696768743e20202d204f2831292e64202d204c696d697465642073746f726167652072656164732e44202d204f6e65204442206368616e67652e302023203c2f7765696768743e387265706f72745f617765736f6d650818726561736f6e1c5665633c75383e0c77686f30543a3a4163636f756e7449644c5d01205265706f727420736f6d657468696e672060726561736f6e60207468617420646573657276657320612074697020616e6420636c61696d20616e79206576656e7475616c207468652066696e6465722773206665652e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e005501205061796d656e743a20605469705265706f72744465706f73697442617365602077696c6c2062652072657365727665642066726f6d20746865206f726967696e206163636f756e742c2061732077656c6c206173d420605469705265706f72744465706f736974506572427974656020666f722065616368206279746520696e2060726561736f6e602e006101202d2060726561736f6e603a2054686520726561736f6e20666f722c206f7220746865207468696e6720746861742064657365727665732c20746865207469703b2067656e6572616c6c7920746869732077696c6c2062655c20202061205554462d382d656e636f6465642055524c2eec202d206077686f603a20546865206163636f756e742077686963682073686f756c6420626520637265646974656420666f7220746865207469702e007820456d69747320604e657754697060206966207375636365737366756c2e002c2023203c7765696768743e9c202d20604f2852296020776865726520605260206c656e677468206f662060726561736f6e602e64202d204f6e652062616c616e6365206f7065726174696f6e2e9c202d204f6e652073746f72616765206d75746174696f6e2028636f64656320604f28522960292e34202d204f6e65206576656e742e302023203c2f7765696768743e2c726574726163745f7469700410686173681c543a3a486173684c550120526574726163742061207072696f72207469702d7265706f72742066726f6d20607265706f72745f617765736f6d65602c20616e642063616e63656c207468652070726f63657373206f662074697070696e672e00e0204966207375636365737366756c2c20746865206f726967696e616c206465706f7369742077696c6c20626520756e72657365727665642e00510120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e642074686520746970206964656e746966696564206279206068617368604501206d7573742068617665206265656e207265706f7274656420627920746865207369676e696e67206163636f756e74207468726f75676820607265706f72745f617765736f6d65602028616e64206e6f7450207468726f75676820607469705f6e657760292e006501202d206068617368603a20546865206964656e74697479206f6620746865206f70656e2074697020666f722077686963682061207469702076616c7565206973206465636c617265642e205468697320697320666f726d656461012020206173207468652068617368206f6620746865207475706c65206f6620746865206f726967696e616c207469702060726561736f6e6020616e64207468652062656e6566696369617279206163636f756e742049442e009020456d697473206054697052657472616374656460206966207375636365737366756c2e002c2023203c7765696768743e24202d20604f2854296064202d204f6e652062616c616e6365206f7065726174696f6e2ec4202d2054776f2073746f726167652072656d6f76616c7320286f6e6520726561642c20636f64656320604f28542960292e34202d204f6e65206576656e742e302023203c2f7765696768743e1c7469705f6e65770c18726561736f6e1c5665633c75383e0c77686f30543a3a4163636f756e744964247469705f76616c75653042616c616e63654f663c543e4cf4204769766520612074697020666f7220736f6d657468696e67206e65773b206e6f2066696e6465722773206665652077696c6c2062652074616b656e2e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e6420746865207369676e696e67206163636f756e74206d757374206265206174206d656d626572206f662074686520605469707065727360207365742e006101202d2060726561736f6e603a2054686520726561736f6e20666f722c206f7220746865207468696e6720746861742064657365727665732c20746865207469703b2067656e6572616c6c7920746869732077696c6c2062655c20202061205554462d382d656e636f6465642055524c2eec202d206077686f603a20546865206163636f756e742077686963682073686f756c6420626520637265646974656420666f7220746865207469702e5101202d20607469705f76616c7565603a2054686520616d6f756e74206f66207469702074686174207468652073656e64657220776f756c64206c696b6520746f20676976652e20546865206d656469616e20746970d820202076616c7565206f662061637469766520746970706572732077696c6c20626520676976656e20746f20746865206077686f602e007820456d69747320604e657754697060206966207375636365737366756c2e002c2023203c7765696768743e4101202d20604f2852202b2054296020776865726520605260206c656e677468206f662060726561736f6e602c2060546020697320746865206e756d626572206f6620746970706572732e2060546020697345012020206e61747572616c6c79206361707065642061732061206d656d62657273686970207365742c20605260206973206c696d69746564207468726f756768207472616e73616374696f6e2d73697a652e0d01202d2054776f2073746f7261676520696e73657274696f6e732028636f6465637320604f285229602c20604f28542960292c206f6e65207265616420604f283129602e34202d204f6e65206576656e742e302023203c2f7765696768743e0c7469700810686173681c543a3a48617368247469705f76616c75653042616c616e63654f663c543e4cb4204465636c6172652061207469702076616c756520666f7220616e20616c72656164792d6f70656e207469702e00550120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e6420746865207369676e696e67206163636f756e74206d757374206265206174206d656d626572206f662074686520605469707065727360207365742e006501202d206068617368603a20546865206964656e74697479206f6620746865206f70656e2074697020666f722077686963682061207469702076616c7565206973206465636c617265642e205468697320697320666f726d656461012020206173207468652068617368206f6620746865207475706c65206f66207468652068617368206f6620746865206f726967696e616c207469702060726561736f6e6020616e64207468652062656e6566696369617279382020206163636f756e742049442e5101202d20607469705f76616c7565603a2054686520616d6f756e74206f66207469702074686174207468652073656e64657220776f756c64206c696b6520746f20676976652e20546865206d656469616e20746970d820202076616c7565206f662061637469766520746970706572732077696c6c20626520676976656e20746f20746865206077686f602e00650120456d6974732060546970436c6f73696e676020696620746865207468726573686f6c64206f66207469707065727320686173206265656e207265616368656420616e642074686520636f756e74646f776e20706572696f64342068617320737461727465642e002c2023203c7765696768743e24202d20604f285429600101202d204f6e652073746f72616765206d75746174696f6e2028636f64656320604f28542960292c206f6e652073746f72616765207265616420604f283129602e4c202d20557020746f206f6e65206576656e742e302023203c2f7765696768743e24636c6f73655f7469700410686173681c543a3a48617368386020436c6f736520616e64207061796f75742061207469702e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e0019012054686520746970206964656e74696669656420627920606861736860206d75737420686176652066696e69736865642069747320636f756e74646f776e20706572696f642e006501202d206068617368603a20546865206964656e74697479206f6620746865206f70656e2074697020666f722077686963682061207469702076616c7565206973206465636c617265642e205468697320697320666f726d656461012020206173207468652068617368206f6620746865207475706c65206f6620746865206f726967696e616c207469702060726561736f6e6020616e64207468652062656e6566696369617279206163636f756e742049442e002c2023203c7765696768743e24202d20604f28542960e4202d204f6e652073746f726167652072657472696576616c2028636f64656320604f285429602920616e642074776f2072656d6f76616c732e88202d20557020746f2074687265652062616c616e6365206f7065726174696f6e732e302023203c2f7765696768743e012c2050726f706f736564043450726f706f73616c496e6465780438204e65772070726f706f73616c2e205370656e64696e67041c42616c616e636504e8205765206861766520656e6465642061207370656e6420706572696f6420616e642077696c6c206e6f7720616c6c6f636174652066756e64732e1c417761726465640c3450726f706f73616c496e6465781c42616c616e6365244163636f756e744964048020536f6d652066756e64732068617665206265656e20616c6c6f63617465642e2052656a6563746564083450726f706f73616c496e6465781c42616c616e636504b420412070726f706f73616c207761732072656a65637465643b2066756e6473207765726520736c61736865642e144275726e74041c42616c616e6365048c20536f6d65206f66206f75722066756e64732068617665206265656e206275726e742e20526f6c6c6f766572041c42616c616e6365043101205370656e64696e67206861732066696e69736865643b20746869732069732074686520616d6f756e74207468617420726f6c6c73206f76657220756e74696c206e657874207370656e642e1c4465706f736974041c42616c616e6365048020536f6d652066756e64732068617665206265656e206465706f73697465642e184e657754697004104861736804982041206e6577207469702073756767657374696f6e20686173206265656e206f70656e65642e28546970436c6f73696e6704104861736804dc2041207469702073756767657374696f6e206861732072656163686564207468726573686f6c6420616e6420697320636c6f73696e672e24546970436c6f7365640c1048617368244163636f756e7449641c42616c616e636504882041207469702073756767657374696f6e20686173206265656e20636c6f7365642e3054697052657472616374656404104861736804942041207469702073756767657374696f6e20686173206265656e207265747261637465642e203050726f706f73616c426f6e641c5065726d696c6c1050c30000085501204672616374696f6e206f6620612070726f706f73616c27732076616c756520746861742073686f756c6420626520626f6e64656420696e206f7264657220746f20706c616365207468652070726f706f73616c2e110120416e2061636365707465642070726f706f73616c2067657473207468657365206261636b2e20412072656a65637465642070726f706f73616c20646f6573206e6f742e4c50726f706f73616c426f6e644d696e696d756d3042616c616e63654f663c543e400000a0dec5adc9353600000000000000044901204d696e696d756d20616d6f756e74206f662066756e647320746861742073686f756c6420626520706c6163656420696e2061206465706f73697420666f72206d616b696e6720612070726f706f73616c2e2c5370656e64506572696f6438543a3a426c6f636b4e756d62657210c0890100048820506572696f64206265747765656e2073756363657373697665207370656e64732e104275726e1c5065726d696c6c10000000000411012050657263656e74616765206f662073706172652066756e64732028696620616e7929207468617420617265206275726e7420706572207370656e6420706572696f642e30546970436f756e74646f776e38543a3a426c6f636b4e756d62657210403800000445012054686520706572696f6420666f722077686963682061207469702072656d61696e73206f70656e20616674657220697320686173206163686965766564207468726573686f6c6420746970706572732e3454697046696e646572734665651c50657263656e7404140431012054686520616d6f756e74206f66207468652066696e616c2074697020776869636820676f657320746f20746865206f726967696e616c207265706f72746572206f6620746865207469702e505469705265706f72744465706f736974426173653042616c616e63654f663c543e40000064a7b3b6e00d000000000000000004d42054686520616d6f756e742068656c64206f6e206465706f73697420666f7220706c6163696e67206120746970207265706f72742e5c5469705265706f72744465706f736974506572427974653042616c616e63654f663c543e400000c16ff286230000000000000000000409012054686520616d6f756e742068656c64206f6e206465706f7369742070657220627974652077697468696e2074686520746970207265706f727420726561736f6e2e2070496e73756666696369656e7450726f706f7365727342616c616e6365047c2050726f706f73657227732062616c616e636520697320746f6f206c6f772e50496e76616c696450726f706f73616c496e646578046c204e6f2070726f706f73616c206174207468617420696e6465782e30526561736f6e546f6f42696704882054686520726561736f6e20676976656e206973206a75737420746f6f206269672e30416c72656164794b6e6f776e048c20546865207469702077617320616c726561647920666f756e642f737461727465642e28556e6b6e6f776e54697004642054686520746970206861736820697320756e6b6e6f776e2e244e6f7446696e64657204210120546865206163636f756e7420617474656d7074696e6720746f20726574726163742074686520746970206973206e6f74207468652066696e646572206f6620746865207469702e245374696c6c4f70656e042d0120546865207469702063616e6e6f7420626520636c61696d65642f636c6f736564206265636175736520746865726520617265206e6f7420656e6f7567682074697070657273207965742e245072656d617475726504350120546865207469702063616e6e6f7420626520636c61696d65642f636c6f73656420626563617573652069742773207374696c6c20696e2074686520636f756e74646f776e20706572696f642e24436f6e7472616374730120436f6e74726163741c204761735370656e7401000c476173200000000000000000048020476173207370656e7420736f2066617220696e207468697320626c6f636b2e3c43757272656e745363686564756c650100205363686564756c65c5010000000001000000000000000100000000000000010000000000000001000000000000000100000000000000010000000000000001000000000000008700000000000000af000000000000000100000000000000010000000000000004000000000001001000000000400000002000000004942043757272656e7420636f7374207363686564756c6520666f7220636f6e7472616374732e305072697374696e65436f64650001012c436f6465486173683c543e1c5665633c75383e0004000465012041206d617070696e672066726f6d20616e206f726967696e616c20636f6465206861736820746f20746865206f726967696e616c20636f64652c20756e746f756368656420627920696e737472756d656e746174696f6e2e2c436f646553746f726167650001012c436f6465486173683c543e587761736d3a3a5072656661625761736d4d6f64756c650004000465012041206d617070696e67206265747765656e20616e206f726967696e616c20636f6465206861736820616e6420696e737472756d656e746564207761736d20636f64652c20726561647920666f7220657865637574696f6e2e384163636f756e74436f756e74657201000c753634200000000000000000045420546865207375627472696520636f756e7465722e38436f6e7472616374496e666f4f6600010130543a3a4163636f756e7449643c436f6e7472616374496e666f3c543e00040004a82054686520636f6465206173736f6369617465642077697468206120676976656e206163636f756e742e20476173507269636501003042616c616e63654f663c543e4001000000000000000000000000000000047820546865207072696365206f66206f6e6520756e6974206f66206761732e01143c7570646174655f7363686564756c6504207363686564756c65205363686564756c650cb4205570646174657320746865207363686564756c6520666f72206d65746572696e6720636f6e7472616374732e000d0120546865207363686564756c65206d7573742068617665206120677265617465722076657273696f6e207468616e207468652073746f726564207363686564756c652e207075745f636f646508246761735f6c696d697430436f6d706163743c4761733e10636f64651c5665633c75383e085d012053746f7265732074686520676976656e2062696e617279205761736d20636f646520696e746f2074686520636861696e27732073746f7261676520616e642072657475726e73206974732060636f646568617368602ed420596f752063616e20696e7374616e746961746520636f6e747261637473206f6e6c7920776974682073746f72656420636f64652e1063616c6c1010646573748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651476616c756554436f6d706163743c42616c616e63654f663c543e3e246761735f6c696d697430436f6d706163743c4761733e10646174611c5665633c75383e1c0901204d616b657320612063616c6c20746f20616e206163636f756e742c206f7074696f6e616c6c79207472616e7366657272696e6720736f6d652062616c616e63652e002901202a20496620746865206163636f756e74206973206120736d6172742d636f6e7472616374206163636f756e742c20746865206173736f63696174656420636f64652077696c6c206265b020657865637574656420616e6420616e792076616c75652077696c6c206265207472616e736665727265642e1901202a20496620746865206163636f756e74206973206120726567756c6172206163636f756e742c20616e792076616c75652077696c6c206265207472616e736665727265642e4901202a204966206e6f206163636f756e742065786973747320616e64207468652063616c6c2076616c7565206973206e6f74206c657373207468616e20606578697374656e7469616c5f6465706f736974602c1501206120726567756c6172206163636f756e742077696c6c206265206372656174656420616e6420616e792076616c75652077696c6c206265207472616e736665727265642e2c696e7374616e74696174651024656e646f776d656e7454436f6d706163743c42616c616e63654f663c543e3e246761735f6c696d697430436f6d706163743c4761733e24636f64655f686173682c436f6465486173683c543e10646174611c5665633c75383e28bd0120496e7374616e7469617465732061206e657720636f6e74726163742066726f6d207468652060636f646568617368602067656e65726174656420627920607075745f636f6465602c206f7074696f6e616c6c79207472616e7366657272696e6720736f6d652062616c616e63652e009820496e7374616e74696174696f6e20697320657865637574656420617320666f6c6c6f77733a004101202d205468652064657374696e6174696f6e206164647265737320697320636f6d7075746564206261736564206f6e207468652073656e64657220616e642068617368206f662074686520636f64652e0501202d2054686520736d6172742d636f6e7472616374206163636f756e7420697320637265617465642061742074686520636f6d707574656420616464726573732e6d01202d20546865206063746f725f636f64656020697320657865637574656420696e2074686520636f6e74657874206f6620746865206e65776c792d63726561746564206163636f756e742e204275666665722072657475726e65645d0120202061667465722074686520657865637574696f6e206973207361766564206173207468652060636f646560206f6620746865206163636f756e742e205468617420636f64652077696c6c20626520696e766f6b6564a820202075706f6e20616e792063616c6c2072656365697665642062792074686973206163636f756e742e7c202d2054686520636f6e747261637420697320696e697469616c697a65642e3c636c61696d5f73757263686172676508106465737430543a3a4163636f756e744964286175785f73656e646572504f7074696f6e3c543a3a4163636f756e7449643e14710120416c6c6f777320626c6f636b2070726f64756365727320746f20636c61696d206120736d616c6c2072657761726420666f72206576696374696e67206120636f6e74726163742e204966206120626c6f636b2070726f64756365721501206661696c7320746f20646f20736f2c206120726567756c61722075736572732077696c6c20626520616c6c6f77656420746f20636c61696d20746865207265776172642e00390120496620636f6e7472616374206973206e6f742065766963746564206173206120726573756c74206f6620746869732063616c6c2c206e6f20616374696f6e73206172652074616b656e20616e64ac207468652073656e646572206973206e6f7420656c696769626c6520666f7220746865207265776172642e0120205472616e736665720c244163636f756e744964244163636f756e7449641c42616c616e6365046901205472616e736665722068617070656e6564206066726f6d6020746f2060746f60207769746820676976656e206076616c7565602061732070617274206f662061206063616c6c60206f722060696e7374616e7469617465602e30496e7374616e74696174656408244163636f756e744964244163636f756e74496404dc20436f6e7472616374206465706c6f7965642062792061646472657373206174207468652073706563696669656420616464726573732e1c4576696374656408244163636f756e74496410626f6f6c18e420436f6e747261637420686173206265656e206576696374656420616e64206973206e6f7720696e20746f6d6273746f6e652073746174652e0024202320506172616d73000d01202d2060636f6e7472616374603a20604163636f756e744964603a20546865206163636f756e74204944206f6620746865206576696374656420636f6e74726163742e3501202d2060746f6d6273746f6e65603a2060626f6f6c603a205472756520696620746865206576696374656420636f6e7472616374206c65667420626568696e64206120746f6d6273746f6e652e20526573746f72656414244163636f756e744964244163636f756e74496410486173681c42616c616e636510626f6f6c24bc20526573746f726174696f6e20666f72206120636f6e747261637420686173206265656e20696e697469617465642e0024202320506172616d7300f4202d2060646f6e6f72603a20604163636f756e744964603a204163636f756e74204944206f662074686520726573746f72696e6720636f6e7472616374ec202d206064657374603a20604163636f756e744964603a204163636f756e74204944206f662074686520726573746f72656420636f6e7472616374e8202d2060636f64655f68617368603a206048617368603a20436f64652068617368206f662074686520726573746f72656420636f6e74726163741901202d206072656e745f616c6c6f77616e63653a206042616c616e6365603a2052656e7420616c6c6f77616e6365206f662074686520726573746f72656420636f6e7472616374f0202d206073756363657373603a2060626f6f6c603a20547275652069662074686520726573746f726174696f6e20776173207375636365737366756c28436f646553746f72656404104861736804b820436f646520776974682074686520737065636966696564206861736820686173206265656e2073746f7265642e3c5363686564756c6555706461746564040c75333204c020547269676765726564207768656e207468652063757272656e74207363686564756c6520697320757064617465642e284469737061746368656408244163636f756e74496410626f6f6c08390120412063616c6c2077617320646973706174636865642066726f6d2074686520676976656e206163636f756e742e2054686520626f6f6c207369676e616c7320776865746865722069742077617374207375636365737366756c20657865637574696f6e206f72206e6f742e44436f6e7472616374457865637574696f6e08244163636f756e7449641c5665633c75383e04090120416e206576656e74206465706f73697465642075706f6e20657865637574696f6e206f66206120636f6e74726163742066726f6d20746865206163636f756e742e404c5369676e6564436c61696d48616e646963617038543a3a426c6f636b4e756d626572100200000010e0204e756d626572206f6620626c6f636b2064656c617920616e2065787472696e73696320636c61696d20737572636861726765206861732e000d01205768656e20636c61696d207375726368617267652069732063616c6c656420627920616e2065787472696e736963207468652072656e7420697320636865636b65646820666f722063757272656e745f626c6f636b202d2064656c617940546f6d6273746f6e654465706f7369743042616c616e63654f663c543e40000064a7b3b6e00d000000000000000004d420546865206d696e696d756d20616d6f756e7420726571756972656420746f2067656e6572617465206120746f6d6273746f6e652e4453746f7261676553697a654f66667365740c75333210080000000851012053697a65206f66206120636f6e7472616374206174207468652074696d65206f6620696e7374616e746961696f6e2e205468697320697320612073696d706c652077617920746f20656e737572652074686174a420656d70747920636f6e747261637473206576656e7475616c6c7920676574732064656c657465642e2c52656e74427974654665653042616c616e63654f663c543e40000064a7b3b6e00d0000000000000000043501205072696365206f6620612062797465206f662073746f7261676520706572206f6e6520626c6f636b20696e74657276616c2e2053686f756c642062652067726561746572207468616e20302e4452656e744465706f7369744f66667365743042616c616e63654f663c543e400000a0dec5adc93536000000000000001c05012054686520616d6f756e74206f662066756e6473206120636f6e74726163742073686f756c64206465706f73697420696e206f7264657220746f206f6666736574582074686520636f7374206f66206f6e6520627974652e006901204c6574277320737570706f736520746865206465706f73697420697320312c303030204255202862616c616e636520756e697473292f6279746520616e64207468652072656e7420697320312042552f627974652f6461792c5901207468656e206120636f6e7472616374207769746820312c3030302c3030302042552074686174207573657320312c303030206279746573206f662073746f7261676520776f756c6420706179206e6f2072656e742e4d0120427574206966207468652062616c616e6365207265647563656420746f203530302c30303020425520616e64207468652073746f7261676520737461796564207468652073616d6520617420312c3030302c78207468656e20697420776f756c6420706179203530302042552f6461792e3c5375726368617267655265776172643042616c616e63654f663c543e4000009814440dab21080000000000000008e4205265776172642074686174206973207265636569766564206279207468652070617274792077686f736520746f75636820686173206c65646820746f2072656d6f76616c206f66206120636f6e74726163742e2c5472616e736665724665653042616c616e63654f663c543e4000008a5d7845630100000000000000000494205468652066656520726571756972656420746f206d616b652061207472616e736665722e2c4372656174696f6e4665653042616c616e63654f663c543e4000008a5d784563010000000000000000049c205468652066656520726571756972656420746f2063726561746520616e206163636f756e742e485472616e73616374696f6e426173654665653042616c616e63654f663c543e4000008a5d78456301000000000000000004dc205468652066656520746f206265207061696420666f72206d616b696e672061207472616e73616374696f6e3b2074686520626173652e485472616e73616374696f6e427974654665653042616c616e63654f663c543e400080c6a47e8d03000000000000000000040d01205468652066656520746f206265207061696420666f72206d616b696e672061207472616e73616374696f6e3b20746865207065722d6279746520706f7274696f6e2e2c436f6e74726163744665653042616c616e63654f663c543e4000008a5d784563010000000000000000084101205468652066656520726571756972656420746f20696e7374616e7469617465206120636f6e747261637420696e7374616e63652e204120726561736f6e61626c652064656661756c742076616c75651c2069732032312e2c43616c6c426173654665650c47617320e803000000000000081d0120546865206261736520666565206368617267656420666f722063616c6c696e6720696e746f206120636f6e74726163742e204120726561736f6e61626c652064656661756c74382076616c7565206973203133352e48496e7374616e7469617465426173654665650c47617320e80300000000000008390120546865206261736520666565206368617267656420666f7220696e7374616e74696174696e67206120636f6e74726163742e204120726561736f6e61626c652064656661756c742076616c756520206973203137352e204d617844657074680c753332102000000008310120546865206d6178696d756d206e657374696e67206c6576656c206f6620612063616c6c2f696e7374616e746961746520737461636b2e204120726561736f6e61626c652064656661756c74382076616c7565206973203130302e304d617856616c756553697a650c753332100040000004390120546865206d6178696d756d2073697a65206f6620612073746f726167652076616c756520696e2062797465732e204120726561736f6e61626c652064656661756c74206973203136204b69422e34426c6f636b4761734c696d69740c47617320809698000000000008250120546865206d6178696d756d20616d6f756e74206f6620676173207468617420636f756c6420626520657870656e6465642070657220626c6f636b2e204120726561736f6e61626c65742064656661756c742076616c75652069732031305f3030305f3030302e1858496e76616c69645363686564756c6556657273696f6e0405012041206e6577207363686564756c65206d7573742068617665206120677265617465722076657273696f6e207468616e207468652063757272656e74206f6e652e54496e76616c6964537572636861726765436c61696d04550120416e206f726967696e206d757374206265207369676e6564206f7220696e686572656e7420616e6420617578696c696172792073656e646572206f6e6c792070726f7669646564206f6e20696e686572656e742e54496e76616c6964536f75726365436f6e747261637404dc2043616e6e6f7420726573746f72652066726f6d206e6f6e6578697374696e67206f7220746f6d6273746f6e6520636f6e74726163742e68496e76616c696444657374696e6174696f6e436f6e747261637404c42043616e6e6f7420726573746f726520746f206e6f6e6578697374696e67206f7220616c69766520636f6e74726163742e40496e76616c6964546f6d6273746f6e65046020546f6d6273746f6e657320646f6e2774206d617463682e54496e76616c6964436f6e74726163744f726967696e04bc20416e206f726967696e20547269654964207772697474656e20696e207468652063757272656e7420626c6f636b2e204964656e7469747901105375646f10284964656e746974794f6600010130543a3a4163636f756e74496468526567697374726174696f6e3c42616c616e63654f663c543e3e00040004210120496e666f726d6174696f6e20746861742069732070657274696e656e7420746f206964656e746966792074686520656e7469747920626568696e6420616e206163636f756e742e1c53757065724f6600010130543a3a4163636f756e7449645028543a3a4163636f756e7449642c204461746129000400086101205468652073757065722d6964656e74697479206f6620616e20616c7465726e6174697665202273756222206964656e7469747920746f676574686572207769746820697473206e616d652c2077697468696e2074686174510120636f6e746578742e20496620746865206163636f756e74206973206e6f7420736f6d65206f74686572206163636f756e742773207375622d6964656e746974792c207468656e206a75737420604e6f6e65602e18537562734f6601010130543a3a4163636f756e744964842842616c616e63654f663c543e2c205665633c543a3a4163636f756e7449643e29004400000000000000000000000000000000000cb820416c7465726e6174697665202273756222206964656e746974696573206f662074686973206163636f756e742e001d0120546865206669727374206974656d20697320746865206465706f7369742c20746865207365636f6e64206973206120766563746f72206f6620746865206163636f756e74732e28526567697374726172730100d85665633c4f7074696f6e3c526567697374726172496e666f3c42616c616e63654f663c543e2c20543a3a4163636f756e7449643e3e3e0400104d012054686520736574206f6620726567697374726172732e204e6f7420657870656374656420746f206765742076657279206269672061732063616e206f6e6c79206265206164646564207468726f7567682061a8207370656369616c206f726967696e20286c696b656c79206120636f756e63696c206d6f74696f6e292e0029012054686520696e64657820696e746f20746869732063616e206265206361737420746f2060526567697374726172496e6465786020746f2067657420612076616c69642076616c75652e012c346164645f726567697374726172041c6163636f756e7430543a3a4163636f756e744964347c2041646420612072656769737472617220746f207468652073797374656d2e001d0120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d75737420626520605265676973747261724f726967696e60206f722060526f6f74602e00ac202d20606163636f756e74603a20746865206163636f756e74206f6620746865207265676973747261722e009820456d6974732060526567697374726172416464656460206966207375636365737366756c2e002c2023203c7765696768743ee4202d20604f2852296020776865726520605260207265676973747261722d636f756e742028676f7665726e616e63652d626f756e646564292e9c202d204f6e652073746f72616765206d75746174696f6e2028636f64656320604f28522960292e34202d204f6e65206576656e742e302023203c2f7765696768743e307365745f6964656e746974790410696e666f304964656e74697479496e666f482d012053657420616e206163636f756e742773206964656e7469747920696e666f726d6174696f6e20616e6420726573657276652074686520617070726f707269617465206465706f7369742e00590120496620746865206163636f756e7420616c726561647920686173206964656e7469747920696e666f726d6174696f6e2c20746865206465706f7369742069732074616b656e2061732070617274207061796d656e745420666f7220746865206e6577206465706f7369742e00650120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d75737420686176652061207265676973746572656428206964656e746974792e0090202d2060696e666f603a20546865206964656e7469747920696e666f726d6174696f6e2e008c20456d69747320604964656e7469747953657460206966207375636365737366756c2e002c2023203c7765696768743e5d01202d20604f2858202b205827202b2052296020776865726520605860206164646974696f6e616c2d6669656c642d636f756e7420286465706f7369742d626f756e64656420616e6420636f64652d626f756e646564292e88202d204174206d6f73742074776f2062616c616e6365206f7065726174696f6e732e2501202d204f6e652073746f72616765206d75746174696f6e2028636f6465632d7265616420604f285827202b205229602c20636f6465632d777269746520604f2858202b20522960292e34202d204f6e65206576656e742e302023203c2f7765696768743e207365745f73756273041073756273645665633c28543a3a4163636f756e7449642c2044617461293e40902053657420746865207375622d6163636f756e7473206f66207468652073656e6465722e005901205061796d656e743a20416e79206167677265676174652062616c616e63652072657365727665642062792070726576696f757320607365745f73756273602063616c6c732077696c6c2062652072657475726e6564310120616e6420616e20616d6f756e7420605375624163636f756e744465706f736974602077696c6c20626520726573657276656420666f722065616368206974656d20696e206073756273602e00650120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d75737420686176652061207265676973746572656428206964656e746974792e009c202d206073756273603a20546865206964656e746974792773207375622d6163636f756e74732e002c2023203c7765696768743eec202d20604f285329602077686572652060536020737562732d636f756e742028686172642d20616e64206465706f7369742d626f756e646564292e88202d204174206d6f73742074776f2062616c616e6365206f7065726174696f6e732e4101202d204174206d6f7374204f2832202a2053202b2031292073746f72616765206d75746174696f6e733b20636f64656320636f6d706c657869747920604f2831202a2053202b2053202a20312960293b582020206f6e652073746f726167652d6578697374732e302023203c2f7765696768743e38636c6561725f6964656e74697479003c390120436c65617220616e206163636f756e742773206964656e7469747920696e666f20616e6420616c6c207375622d6163636f756e7420616e642072657475726e20616c6c206465706f736974732e00f0205061796d656e743a20416c6c2072657365727665642062616c616e636573206f6e20746865206163636f756e74206172652072657475726e65642e00650120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d75737420686176652061207265676973746572656428206964656e746974792e009c20456d69747320604964656e74697479436c656172656460206966207375636365737366756c2e002c2023203c7765696768743e48202d20604f2852202b2053202b205829602e84202d204f6e652062616c616e63652d72657365727665206f7065726174696f6e2e74202d206053202b2032602073746f726167652064656c6574696f6e732e34202d204f6e65206576656e742e302023203c2f7765696768743e44726571756573745f6a756467656d656e7408247265675f696e6465785c436f6d706163743c526567697374726172496e6465783e1c6d61785f66656554436f6d706163743c42616c616e63654f663c543e3e5c9820526571756573742061206a756467656d656e742066726f6d2061207265676973747261722e005901205061796d656e743a204174206d6f737420606d61785f666565602077696c6c20626520726573657276656420666f72207061796d656e7420746f2074686520726567697374726172206966206a756467656d656e741c20676976656e2e00390120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d75737420686176652061542072656769737465726564206964656e746974792e002101202d20607265675f696e646578603a2054686520696e646578206f6620746865207265676973747261722077686f7365206a756467656d656e74206973207265717565737465642e5901202d20606d61785f666565603a20546865206d6178696d756d206665652074686174206d617920626520706169642e20546869732073686f756c64206a757374206265206175746f2d706f70756c617465642061733a0034206060606e6f636f6d70696c65a42053656c663a3a72656769737472617273287265675f696e646578292e75776e72617028292e666565102060606000a820456d69747320604a756467656d656e7452657175657374656460206966207375636365737366756c2e002c2023203c7765696768743e38202d20604f2852202b205829602e84202d204f6e652062616c616e63652d72657365727665206f7065726174696f6e2ebc202d2053746f726167653a2031207265616420604f285229602c2031206d757461746520604f2858202b205229602e34202d204f6e65206576656e742e302023203c2f7765696768743e3863616e63656c5f7265717565737404247265675f696e64657838526567697374726172496e646578446c2043616e63656c20612070726576696f757320726571756573742e00fc205061796d656e743a20412070726576696f75736c79207265736572766564206465706f7369742069732072657475726e6564206f6e20737563636573732e00390120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d75737420686176652061542072656769737465726564206964656e746974792e004901202d20607265675f696e646578603a2054686520696e646578206f6620746865207265676973747261722077686f7365206a756467656d656e74206973206e6f206c6f6e676572207265717565737465642e00b020456d69747320604a756467656d656e74556e72657175657374656460206966207375636365737366756c2e002c2023203c7765696768743e38202d20604f2852202b205829602e84202d204f6e652062616c616e63652d72657365727665206f7065726174696f6e2e8c202d204f6e652073746f72616765206d75746174696f6e20604f2852202b205829602e34202d204f6e65206576656e742e302023203c2f7765696768743e1c7365745f6665650814696e6465785c436f6d706163743c526567697374726172496e6465783e0c66656554436f6d706163743c42616c616e63654f663c543e3e301d0120536574207468652066656520726571756972656420666f722061206a756467656d656e7420746f206265207265717565737465642066726f6d2061207265676973747261722e00590120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d75737420626520746865206163636f756e74a4206f6620746865207265676973747261722077686f736520696e6465782069732060696e646578602e00f8202d2060696e646578603a2074686520696e646578206f6620746865207265676973747261722077686f73652066656520697320746f206265207365742e58202d2060666565603a20746865206e6577206665652e002c2023203c7765696768743e28202d20604f285229602e7c202d204f6e652073746f72616765206d75746174696f6e20604f285229602e302023203c2f7765696768743e387365745f6163636f756e745f69640814696e6465785c436f6d706163743c526567697374726172496e6465783e0c6e657730543a3a4163636f756e74496430c0204368616e676520746865206163636f756e74206173736f63696174656420776974682061207265676973747261722e00590120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d75737420626520746865206163636f756e74a4206f6620746865207265676973747261722077686f736520696e6465782069732060696e646578602e00f8202d2060696e646578603a2074686520696e646578206f6620746865207265676973747261722077686f73652066656520697320746f206265207365742e74202d20606e6577603a20746865206e6577206163636f756e742049442e002c2023203c7765696768743e28202d20604f285229602e7c202d204f6e652073746f72616765206d75746174696f6e20604f285229602e302023203c2f7765696768743e287365745f6669656c64730814696e6465785c436f6d706163743c526567697374726172496e6465783e186669656c6473384964656e746974794669656c647330ac2053657420746865206669656c6420696e666f726d6174696f6e20666f722061207265676973747261722e00590120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d75737420626520746865206163636f756e74a4206f6620746865207265676973747261722077686f736520696e6465782069732060696e646578602e00f8202d2060696e646578603a2074686520696e646578206f6620746865207265676973747261722077686f73652066656520697320746f206265207365742e1101202d20606669656c6473603a20746865206669656c64732074686174207468652072656769737472617220636f6e6365726e73207468656d73656c76657320776974682e002c2023203c7765696768743e28202d20604f285229602e7c202d204f6e652073746f72616765206d75746174696f6e20604f285229602e302023203c2f7765696768743e4470726f766964655f6a756467656d656e740c247265675f696e6465785c436f6d706163743c526567697374726172496e6465783e187461726765748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f75726365246a756467656d656e745c4a756467656d656e743c42616c616e63654f663c543e3e4cbc2050726f766964652061206a756467656d656e7420666f7220616e206163636f756e742773206964656e746974792e00590120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f20616e64207468652073656e646572206d75737420626520746865206163636f756e74b4206f6620746865207265676973747261722077686f736520696e64657820697320607265675f696e646578602e002501202d20607265675f696e646578603a2074686520696e646578206f6620746865207265676973747261722077686f7365206a756467656d656e74206973206265696e67206d6164652e5901202d2060746172676574603a20746865206163636f756e742077686f7365206964656e7469747920746865206a756467656d656e742069732075706f6e2e2054686973206d75737420626520616e206163636f756e74782020207769746820612072656769737465726564206964656e746974792e4d01202d20606a756467656d656e74603a20746865206a756467656d656e74206f662074686520726567697374726172206f6620696e64657820607265675f696e646578602061626f75742060746172676574602e009820456d69747320604a756467656d656e74476976656e60206966207375636365737366756c2e002c2023203c7765696768743e38202d20604f2852202b205829602e88202d204f6e652062616c616e63652d7472616e73666572206f7065726174696f6e2e98202d20557020746f206f6e65206163636f756e742d6c6f6f6b7570206f7065726174696f6e2ebc202d2053746f726167653a2031207265616420604f285229602c2031206d757461746520604f2852202b205829602e34202d204f6e65206576656e742e302023203c2f7765696768743e346b696c6c5f6964656e7469747904187461726765748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263654c45012052656d6f766520616e206163636f756e742773206964656e7469747920616e64207375622d6163636f756e7420696e666f726d6174696f6e20616e6420736c61736820746865206465706f736974732e006501205061796d656e743a2052657365727665642062616c616e6365732066726f6d20607365745f737562736020616e6420607365745f6964656e74697479602061726520736c617368656420616e642068616e646c656420627949012060536c617368602e20566572696669636174696f6e2072657175657374206465706f7369747320617265206e6f742072657475726e65643b20746865792073686f756c642062652063616e63656c6c656484206d616e75616c6c79207573696e67206063616e63656c5f72657175657374602e00310120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f526f6f745f206f72206d617463682060543a3a466f7263654f726967696e602e005901202d2060746172676574603a20746865206163636f756e742077686f7365206964656e7469747920746865206a756467656d656e742069732075706f6e2e2054686973206d75737420626520616e206163636f756e74782020207769746820612072656769737465726564206964656e746974792e009820456d69747320604964656e746974794b696c6c656460206966207375636365737366756c2e002c2023203c7765696768743e48202d20604f2852202b2053202b205829602e84202d204f6e652062616c616e63652d72657365727665206f7065726174696f6e2e74202d206053202b2032602073746f72616765206d75746174696f6e732e34202d204f6e65206576656e742e302023203c2f7765696768743e011c2c4964656e7469747953657404244163636f756e74496404f02041206e616d652077617320736574206f72207265736574202877686963682077696c6c2072656d6f766520616c6c206a756467656d656e7473292e3c4964656e74697479436c656172656408244163636f756e7449641c42616c616e636504d02041206e616d652077617320636c65617265642c20616e642074686520676976656e2062616c616e63652072657475726e65642e384964656e746974794b696c6c656408244163636f756e7449641c42616c616e636504c82041206e616d65207761732072656d6f76656420616e642074686520676976656e2062616c616e636520736c61736865642e484a756467656d656e7452657175657374656408244163636f756e74496438526567697374726172496e64657804a02041206a756467656d656e74207761732061736b65642066726f6d2061207265676973747261722e504a756467656d656e74556e72657175657374656408244163636f756e74496438526567697374726172496e646578048c2041206a756467656d656e74207265717565737420776173207265747261637465642e384a756467656d656e74476976656e08244163636f756e74496438526567697374726172496e64657804982041206a756467656d656e742077617320676976656e2062792061207265676973747261722e3852656769737472617241646465640438526567697374726172496e646578045c204120726567697374726172207761732061646465642e003048546f6f4d616e795375624163636f756e7473046020546f6f206d616e7920737562732d6163636f756e74732e204e6f74466f756e640454204163636f756e742069736e277420666f756e642e204e6f744e616d65640454204163636f756e742069736e2774206e616d65642e28456d707479496e646578043420456d70747920696e6465782e284665654368616e676564044020466565206973206368616e6765642e284e6f4964656e74697479044c204e6f206964656e7469747920666f756e642e3c537469636b794a756467656d656e74044820537469636b79206a756467656d656e742e384a756467656d656e74476976656e0444204a756467656d656e7420676976656e2e40496e76616c69644a756467656d656e74044c20496e76616c6964206a756467656d656e742e30496e76616c6964496e64657804582054686520696e64657820697320696e76616c69642e34496e76616c6964546172676574045c205468652074617267657420697320696e76616c69642e34546f6f4d616e794669656c6473047020546f6f206d616e79206164646974696f6e616c206669656c64732e20496d4f6e6c696e650120496d4f6e6c696e6510384865617274626561744166746572010038543a3a426c6f636b4e756d62657210000000001831012054686520626c6f636b206e756d6265722061667465722077686963682069742773206f6b20746f2073656e64206865617274626561747320696e2063757272656e742073657373696f6e2e0011012041742074686520626567696e6e696e67206f6620656163682073657373696f6e20776520736574207468697320746f20612076616c756520746861742073686f756c64d02066616c6c20726f7567686c7920696e20746865206d6964646c65206f66207468652073657373696f6e206475726174696f6e2e010120546865206964656120697320746f206669727374207761697420666f72207468652076616c696461746f727320746f2070726f64756365206120626c6f636b390120696e207468652063757272656e742073657373696f6e2c20736f20746861742074686520686561727462656174206c61746572206f6e2077696c6c206e6f74206265206e65636573736172792e104b65797301004c5665633c543a3a417574686f7269747949643e040004d0205468652063757272656e7420736574206f66206b6579732074686174206d61792069737375652061206865617274626561742e485265636569766564486561727462656174730002013053657373696f6e496e6465782441757468496e6465781c5665633c75383e01040008e420466f7220656163682073657373696f6e20696e6465782c207765206b6565702061206d617070696e67206f66206041757468496e646578608c20746f20606f6666636861696e3a3a4f70617175654e6574776f726b5374617465602e38417574686f726564426c6f636b730102013053657373696f6e496e64657838543a3a56616c696461746f7249640c75333201100000000008150120466f7220656163682073657373696f6e20696e6465782c207765206b6565702061206d617070696e67206f662060543a3a56616c696461746f7249646020746f20746865c8206e756d626572206f6620626c6f636b7320617574686f7265642062792074686520676976656e20617574686f726974792e0104246865617274626561740824686561727462656174644865617274626561743c543a3a426c6f636b4e756d6265723e285f7369676e6174757265bc3c543a3a417574686f7269747949642061732052756e74696d654170705075626c69633e3a3a5369676e617475726500010c444865617274626561745265636569766564042c417574686f72697479496404c02041206e657720686561727462656174207761732072656365697665642066726f6d2060417574686f726974794964601c416c6c476f6f640004d42041742074686520656e64206f66207468652073657373696f6e2c206e6f206f6666656e63652077617320636f6d6d69747465642e2c536f6d654f66666c696e6504605665633c4964656e74696669636174696f6e5475706c653e0431012041742074686520656e64206f66207468652073657373696f6e2c206174206c65617374206f6e63652076616c696461746f722077617320666f756e6420746f206265206f66666c696e652e000828496e76616c69644b65790464204e6f6e206578697374656e74207075626c6963206b65792e4c4475706c6963617465644865617274626561740458204475706c696361746564206865617274626561742e48417574686f72697479446973636f76657279000100000000204f6666656e63657301204f6666656e6365730c1c5265706f727473000101345265706f727449644f663c543ed04f6666656e636544657461696c733c543a3a4163636f756e7449642c20543a3a4964656e74696669636174696f6e5475706c653e00040004490120546865207072696d61727920737472756374757265207468617420686f6c647320616c6c206f6666656e6365207265636f726473206b65796564206279207265706f7274206964656e746966696572732e58436f6e63757272656e745265706f727473496e646578010201104b696e64384f706171756554696d65536c6f74485665633c5265706f727449644f663c543e3e010400042901204120766563746f72206f66207265706f727473206f66207468652073616d65206b696e6420746861742068617070656e6564206174207468652073616d652074696d6520736c6f742e485265706f72747342794b696e64496e646578010101104b696e641c5665633c75383e00040018110120456e756d65726174657320616c6c207265706f727473206f662061206b696e6420616c6f6e672077697468207468652074696d6520746865792068617070656e65642e00bc20416c6c207265706f7274732061726520736f72746564206279207468652074696d65206f66206f6666656e63652e004901204e6f74652074686174207468652061637475616c2074797065206f662074686973206d617070696e6720697320605665633c75383e602c207468697320697320626563617573652076616c756573206f66690120646966666572656e7420747970657320617265206e6f7420737570706f7274656420617420746865206d6f6d656e7420736f2077652061726520646f696e6720746865206d616e75616c2073657269616c697a6174696f6e2e010001041c4f6666656e636508104b696e64384f706171756554696d65536c6f7408550120546865726520697320616e206f6666656e6365207265706f72746564206f662074686520676976656e20606b696e64602068617070656e656420617420746865206073657373696f6e5f696e6465786020616e64390120286b696e642d7370656369666963292074696d6520736c6f742e2054686973206576656e74206973206e6f74206465706f736974656420666f72206475706c696361746520736c61736865732e00006052616e646f6d6e657373436f6c6c656374697665466c6970016052616e646f6d6e657373436f6c6c656374697665466c6970043852616e646f6d4d6174657269616c0100305665633c543a3a486173683e04000c610120536572696573206f6620626c6f636b20686561646572732066726f6d20746865206c61737420383120626c6f636b73207468617420616374732061732072616e646f6d2073656564206d6174657269616c2e2054686973610120697320617272616e67656420617320612072696e672062756666657220776974682060626c6f636b5f6e756d626572202520383160206265696e672074686520696e64657820696e746f20746865206056656360206f664420746865206f6c6465737420686173682e0100000000144e69636b7301105375646f04184e616d654f6600010130543a3a4163636f756e7449645c285665633c75383e2c2042616c616e63654f663c543e29000400047020546865206c6f6f6b7570207461626c6520666f72206e616d65732e0110207365745f6e616d6504106e616d651c5665633c75383e405d012053657420616e206163636f756e742773206e616d652e20546865206e616d652073686f756c642062652061205554462d382d656e636f64656420737472696e6720627920636f6e76656e74696f6e2c2074686f7567684c20776520646f6e277420636865636b2069742e00610120546865206e616d65206d6179206e6f74206265206d6f7265207468616e2060543a3a4d61784c656e677468602062797465732c206e6f72206c657373207468616e2060543a3a4d696e4c656e677468602062797465732e005d0120496620746865206163636f756e7420646f65736e277420616c726561647920686176652061206e616d652c207468656e206120666565206f6620605265736572766174696f6e466565602069732072657365727665644020696e20746865206163636f756e742e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e002c2023203c7765696768743e20202d204f2831292e84202d204174206d6f7374206f6e652062616c616e6365206f7065726174696f6e2e68202d204f6e652073746f7261676520726561642f77726974652e34202d204f6e65206576656e742e302023203c2f7765696768743e28636c6561725f6e616d650028510120436c65617220616e206163636f756e742773206e616d6520616e642072657475726e20746865206465706f7369742e204661696c7320696620746865206163636f756e7420776173206e6f74206e616d65642e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e002c2023203c7765696768743e20202d204f2831292e64202d204f6e652062616c616e6365206f7065726174696f6e2e68202d204f6e652073746f7261676520726561642f77726974652e34202d204f6e65206576656e742e302023203c2f7765696768743e246b696c6c5f6e616d6504187461726765748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636534e42052656d6f766520616e206163636f756e742773206e616d6520616e642074616b6520636861726765206f6620746865206465706f7369742e004901204661696c73206966206077686f6020686173206e6f74206265656e206e616d65642e20546865206465706f736974206973206465616c742077697468207468726f7567682060543a3a536c6173686564604c20696d62616c616e63652068616e646c65722e00310120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f526f6f745f206f72206d617463682060543a3a466f7263654f726967696e602e002c2023203c7765696768743e20202d204f2831292edc202d204f6e6520756e62616c616e6365642068616e646c6572202870726f6261626c7920612062616c616e6365207472616e736665722968202d204f6e652073746f7261676520726561642f77726974652e34202d204f6e65206576656e742e302023203c2f7765696768743e28666f7263655f6e616d6508187461726765748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f75726365106e616d651c5665633c75383e30c82053657420612074686972642d7061727479206163636f756e742773206e616d652077697468206e6f206465706f7369742e00a0204e6f206c656e67746820636865636b696e6720697320646f6e65206f6e20746865206e616d652e00310120546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f526f6f745f206f72206d617463682060543a3a466f7263654f726967696e602e002c2023203c7765696768743e20202d204f2831292e84202d204174206d6f7374206f6e652062616c616e6365206f7065726174696f6e2e68202d204f6e652073746f7261676520726561642f77726974652e34202d204f6e65206576656e742e302023203c2f7765696768743e01141c4e616d6553657404244163636f756e74496404402041206e616d6520776173207365742e284e616d65466f7263656404244163636f756e74496404642041206e616d652077617320666f726369626c79207365742e2c4e616d654368616e67656404244163636f756e74496404502041206e616d6520776173206368616e6765642e2c4e616d65436c656172656408244163636f756e7449641c42616c616e636504d02041206e616d652077617320636c65617265642c20616e642074686520676976656e2062616c616e63652072657475726e65642e284e616d654b696c6c656408244163636f756e7449641c42616c616e636504c82041206e616d65207761732072656d6f76656420616e642074686520676976656e2062616c616e636520736c61736865642e0c385265736572766174696f6e4665653042616c616e63654f663c543e40000064a7b3b6e00d00000000000000000444205265736572766174696f6e206665652e244d696e4c656e6774680c7533321003000000048820546865206d696e696d756d206c656e6774682061206e616d65206d61792062652e244d61784c656e6774680c7533321010000000048820546865206d6178696d756d206c656e6774682061206e616d65206d61792062652e0c20546f6f53686f727404542041206e616d6520697320746f6f2073686f72742e1c546f6f4c6f6e6704502041206e616d6520697320746f6f206c6f6e672e1c556e6e616d6564045c20416e206163636f756e7420696e2774206e616d65642e105375646f01105375646f040c4b6579010030543a3a4163636f756e74496480000000000000000000000000000000000000000000000000000000000000000004842054686520604163636f756e74496460206f6620746865207375646f206b65792e010c107375646f042070726f706f73616c40426f783c543a3a50726f706f73616c3e2839012041757468656e7469636174657320746865207375646f206b657920616e64206469737061746368657320612066756e6374696f6e2063616c6c20776974682060526f6f7460206f726967696e2e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e002c2023203c7765696768743e20202d204f2831292e64202d204c696d697465642073746f726167652072656164732e60202d204f6e6520444220777269746520286576656e74292ed4202d20556e6b6e6f776e20776569676874206f662064657269766174697665206070726f706f73616c6020657865637574696f6e2e302023203c2f7765696768743e1c7365745f6b6579040c6e65778c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263652475012041757468656e74696361746573207468652063757272656e74207375646f206b657920616e6420736574732074686520676976656e204163636f756e7449642028606e6577602920617320746865206e6577207375646f206b65792e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e002c2023203c7765696768743e20202d204f2831292e64202d204c696d697465642073746f726167652072656164732e44202d204f6e65204442206368616e67652e302023203c2f7765696768743e1c7375646f5f6173080c77686f8c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263652070726f706f73616c40426f783c543a3a50726f706f73616c3e2c51012041757468656e7469636174657320746865207375646f206b657920616e64206469737061746368657320612066756e6374696f6e2063616c6c207769746820605369676e656460206f726967696e2066726f6d44206120676976656e206163636f756e742e00d020546865206469737061746368206f726967696e20666f7220746869732063616c6c206d757374206265205f5369676e65645f2e002c2023203c7765696768743e20202d204f2831292e64202d204c696d697465642073746f726167652072656164732e60202d204f6e6520444220777269746520286576656e74292ed4202d20556e6b6e6f776e20776569676874206f662064657269766174697665206070726f706f73616c6020657865637574696f6e2e302023203c2f7765696768743e010c1453756469640410626f6f6c04602041207375646f206a75737420746f6f6b20706c6163652e284b65794368616e67656404244163636f756e74496404f020546865207375646f6572206a757374207377697463686564206964656e746974793b20746865206f6c64206b657920697320737570706c6965642e285375646f4173446f6e650410626f6f6c04602041207375646f206a75737420746f6f6b20706c6163652e00042c526571756972655375646f04802053656e646572206d75737420626520746865205375646f206163636f756e74245369676e616c696e6701245369676e616c696e671c3450726f706f73616c436f756e7401000c753332100000000004c02054686520746f74616c206e756d626572206f662070726f706f73616c7320637265617465642074687573206661722e44496e61637469766550726f706f73616c730100785665633c28543a3a486173682c20543a3a426c6f636b4e756d626572293e040004802041206c697374206f6620616c6c20657874616e742070726f706f73616c732e3c41637469766550726f706f73616c730100785665633c28543a3a486173682c20543a3a426c6f636b4e756d626572293e0400041d012041206c697374206f66206163746976652070726f706f73616c7320616c6f6e672077697468207468652074696d65206174207768696368207468657920636f6d706c6574652e48436f6d706c6574656450726f706f73616c730100785665633c28543a3a486173682c20543a3a426c6f636b4e756d626572293e040004c02041206c697374206f6620636f6d706c657465642070726f706f73616c732c2070656e64696e672064656c6574696f6e30566f74696e674c656e677468010038543a3a426c6f636b4e756d626572100000000004d420416d6f756e74206f662074696d6520612070726f706f73616c2072656d61696e7320696e2022566f74696e67222073746167652e2850726f706f73616c4f660001011c543a3a48617368b050726f706f73616c5265636f72643c543a3a4163636f756e7449642c20543a3a426c6f636b4e756d6265723e000400041501204d617020666f722072657472696576696e672074686520696e666f726d6174696f6e2061626f757420616e792070726f706f73616c2066726f6d2069747320686173682e5050726f706f73616c4372656174696f6e426f6e6401003042616c616e63654f663c543e4000000000000000000000000000000000044820526567697374726174696f6e20626f6e6401083c6372656174655f70726f706f73616c14147469746c653450726f706f73616c5469746c6520636f6e74656e74734050726f706f73616c436f6e74656e7473206f7574636f6d6573405665633c566f74654f7574636f6d653e24766f74655f7479706540766f74696e673a3a566f7465547970652874616c6c795f7479706544766f74696e673a3a54616c6c7954797065048820437265617465732061206e6577207369676e616c696e672070726f706f73616c2e40616476616e63655f70726f706f73616c043470726f706f73616c5f686173681c543a3a4861736808090120416476616e63652061207369676e616c696e672070726f706f73616c20696e746f207468652022766f74696e6722206f722022636f6d6d6974222073746167652ef82043616e206f6e6c7920626520706572666f726d656420627920746865206f726967696e616c20617574686f72206f66207468652070726f706f73616c2e01102c4e657750726f706f73616c08244163636f756e744964104861736804d820456d69747465642061742070726f706f73616c206372656174696f6e3a202843726561746f722c2050726f706f73616c486173682934436f6d6d6974537461727465640c10486173680c7536342c426c6f636b4e756d62657204210120456d6974746564207768656e20636f6d6d697420737461676520626567696e733a202850726f706f73616c486173682c20566f746549642c20436f6d6d6974456e6454696d652934566f74696e67537461727465640c10486173680c7536342c426c6f636b4e756d62657204090120456d6974746564207768656e20766f74696e6720626567696e733a202850726f706f73616c486173682c20566f746549642c20566f74696e67456e6454696d65293c566f74696e67436f6d706c657465640810486173680c75363404190120456d6974746564207768656e20766f74696e6720697320636f6d706c657465643a202850726f706f73616c486173682c20566f746549642c20566f7465526573756c747329000454566f74655265636f7264446f65736e7445786973740018566f74696e670118566f74696e67082c566f74655265636f7264730001010c75363460566f74655265636f72643c543a3a4163636f756e7449643e00040004a820546865206d6170206f6620616c6c20766f7465207265636f72647320696e64657865642062792069643c566f74655265636f7264436f756e7401000c75363420000000000000000004c820546865206e756d626572206f6620766f7465207265636f72647320746861742068617665206265656e2063726561746564010818636f6d6d6974081c766f74655f69640c75363418636f6d6d69742c566f74654f7574636f6d6514250120412066756e6374696f6e20666f7220636f6d6d69742d72657665616c20766f74696e6720736368656d657320746861742061646473206120766f746520636f6d6d69746d656e742e001501204120766f746520636f6d6d69746d656e7420697320666f726d6174746564207573696e6720746865206e617469766520686173682066756e6374696f6e2e2054686572651901206172652063757272656e746c79206e6f2063727970746f65636f6e6f6d69632070756e6973686d656e747320616761696e7374206e6f742072657665616c696e67207468653020636f6d6d69746d656e742e1872657665616c0c1c766f74655f69640c75363410766f7465405665633c566f74654f7574636f6d653e187365637265744c4f7074696f6e3c566f74654f7574636f6d653e0c490120412066756e6374696f6e20746861742072657665616c73206120766f746520636f6d6d69746d656e74206f7220736572766573206173207468652067656e6572616c20766f74652066756e6374696f6e2e003d01205468657265206172652063757272656e746c79206e6f2063727970746f65636f6e6f6d696320696e63656e746976657320666f722072657665616c696e6720636f6d6d6974656420766f7465732e01102c566f7465437265617465640c0c753634244163636f756e74496420566f7465547970650494206e657720766f7465202869642c2063726561746f722c2074797065206f6620766f74652930566f7465416476616e6365640c0c75363424566f7465537461676524566f7465537461676504c420766f7465207374616765207472616e736974696f6e202869642c206f6c642073746167652c206e65772073746167652934566f7465436f6d6d6974746564080c753634244163636f756e7449640434207573657220636f6d6d69747330566f746552657665616c65640c0c753634244163636f756e744964405665633c566f74654f7574636f6d653e045020757365722072657665616c73206120766f7465000434566f7465436f6d706c6574656400385472656173757279526577617264013854726561737572795265776172640c3c4d696e74696e67496e74657276616c010038543a3a426c6f636b4e756d626572100000000004c020496e74657276616c20696e206e756d626572206f6620626c6f636b7320746f207265776172642074726561737572793443757272656e745061796f757401003042616c616e63654f663c543e400000000000000000000000000000000004642043757272656e74207061796f7574206f66206d6f64756c650c506f74010028543a3a42616c616e6365400000000000000000000000000000000004302043757272656e7420706f74010001043c54726561737572794d696e74696e670c1c42616c616e63652042616c616e6365322c426c6f636b4e756d626572000000041c30436865636b56657273696f6e30436865636b47656e6573697320436865636b45726128436865636b4e6f6e63652c436865636b576569676874604368617267655472616e73616374696f6e5061796d656e7448436865636b426c6f636b4761734c696d6974", + "id": 29 +} diff --git a/packages/sdk/package.json b/packages/sdk/package.json index e8840eb..eff6ee1 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,35 +1,47 @@ { "name": "@phala/sdk", - "version": "0.3.5-beta.10", - "description": "Phala JS SDK", + "version": "0.3.5", + "description": "Phala Phat Contract JS SDK", "homepage": "https://github.com/Phala-Network/js-sdk/tree/main/packages/sdk#readme", "repository": { "type": "git", "url": "https://github.com/Phala-Network/js-sdk.git", "directory": "packages/sdk" }, - "type": "module", - "main": "dist/index.js", + "main": "dist/node/index", + "browser": "dist/browser/index", "exports": { ".": { - "require": "./dist/index.cjs", - "import": "./dist/index.js" + "import": { + "node": "./dist/node/index.mjs", + "default": "./dist/browser/index.mjs" + }, + "require": { + "node": "./dist/node/index.js", + "default": "./dist/browser/index.js" + } } }, "files": [ "dist/*" ], "scripts": { - "build": "tsup", + "build": "npm run build:node && npm run build:browser", + "build:node": "tsup --config tsup.node.ts", + "build:browser": "tsup --config tsup.browser.ts", + "generate:defs": "ts-node --skip-project ../../node_modules/.bin/polkadot-types-from-defs --package @phala/sdk --input ./src/interfaces --endpoint ./edgeware.json", + "generate:meta": "ts-node --skip-project ../../node_modules/.bin/polkadot-types-from-chain --package @phala/sdk --endpoint ./edgeware.json --output ./src/interfaces", "build:proto": "scripts/build_proto.sh", "dev": "tsup --watch", "lint": "eslint --cache .", "lint:fix": "eslint --cache --fix .", - "publish": "npm publish --access public" + "auto-publish": "npm publish --access public" }, "dependencies": { + "@esbuild-plugins/node-modules-polyfill": "^0.1.4", "@phala/typedefs": "^0.2.32", "@polkadot/api": "^9.8.1", + "@polkadot/api-contract": "^9.8.1", "@polkadot/keyring": "^10.1.12", "@polkadot/util": "^10.1.12", "@polkadot/util-crypto": "^10.1.12", @@ -40,12 +52,15 @@ "rxjs": "^7.5.7" }, "devDependencies": { + "@esbuild-plugins/node-globals-polyfill": "^0.1.1", + "@polkadot/typegen": "^9.11.1", "@types/node": "^16.11.59", "@typescript-eslint/eslint-plugin": "^5.42.1", "@typescript-eslint/parser": "^5.42.1", "eslint": "^8.23.1", "eslint-config-prettier": "^8.5.0", "eslint-plugin-prettier": "^4.2.1", + "ts-node": "^10.9.1", "tsup": "^6.4.0", "typescript": "^4.8.4" }, diff --git a/packages/sdk/src/certificate.ts b/packages/sdk/src/certificate.ts index 6ee5af2..4d69a52 100644 --- a/packages/sdk/src/certificate.ts +++ b/packages/sdk/src/certificate.ts @@ -1,84 +1,91 @@ -import type {ApiPromise} from '@polkadot/api' -import type {InjectedAccountWithMeta} from '@polkadot/extension-inject/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 {sr25519KeypairFromSeed, waitReady} from '@polkadot/wasm-crypto' -import {randomHex} from './lib/hex' -import {pruntime_rpc as pruntimeRpc} from './proto' +import type { ApiPromise } from "@polkadot/api"; +import type { Signer as InjectedSigner } from "@polkadot/api/types"; +import type { InjectedAccountWithMeta } from "@polkadot/extension-inject/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 { sr25519KeypairFromSeed, waitReady } from "@polkadot/wasm-crypto"; +import { randomHex } from "./lib/hex"; +import { pruntime_rpc as pruntimeRpc } from "./proto"; export type CertificateData = { - certificate: pruntimeRpc.ICertificate - pubkey: Uint8Array - secret: Uint8Array -} + certificate: pruntimeRpc.ICertificate; + pubkey: Uint8Array; + secret: Uint8Array; +}; interface CertificateBaseParams { - api: ApiPromise - signatureType?: pruntimeRpc.SignatureType + api: ApiPromise; + signatureType?: pruntimeRpc.SignatureType; } interface CertificateParamsWithSigner extends CertificateBaseParams { - signer: Signer - account: InjectedAccountWithMeta + signer: Signer | InjectedSigner; + account: InjectedAccountWithMeta; } interface CertificateParamsWithPair extends CertificateBaseParams { - pair: KeyringPair + pair: KeyringPair; } -type CertificateParams = CertificateParamsWithSigner | CertificateParamsWithPair +type CertificateParams = + | CertificateParamsWithSigner + | CertificateParamsWithPair; const isUsingSigner = ( params: CertificateParams ): params is CertificateParamsWithSigner => - (params as CertificateParamsWithSigner).signer !== undefined + (params as CertificateParamsWithSigner).signer !== undefined; export const signCertificate = async ( params: CertificateParams ): Promise<CertificateData> => { - await waitReady() - const {api} = params - const generatedSeed = hexToU8a(hexAddPrefix(randomHex(32))) - const generatedPair = sr25519KeypairFromSeed(generatedSeed) - const [secret, pubkey] = [generatedPair.slice(0, 64), generatedPair.slice(64)] + await waitReady(); + const { api } = params; + const generatedSeed = hexToU8a(hexAddPrefix(randomHex(32))); + const generatedPair = sr25519KeypairFromSeed(generatedSeed); + const [secret, pubkey] = [ + generatedPair.slice(0, 64), + generatedPair.slice(64), + ]; const encodedCertificateBody = api - .createType('CertificateBody', { + .createType("CertificateBody", { pubkey: u8aToHex(pubkey), ttl: 0x7fffffff, // FIXME: max ttl is not safe config_bits: 0, }) - .toU8a() + .toU8a(); - let signerPubkey: string - let signatureType = params.signatureType - let signature: Uint8Array + let signerPubkey: string; + let signatureType = params.signatureType; + let signature: Uint8Array; if (isUsingSigner(params)) { - const {account, signer} = params - const address = account.address - signerPubkey = u8aToHex(decodeAddress(address)) + const { account, signer } = params; + const address = account.address; + signerPubkey = u8aToHex(decodeAddress(address)); if (!signatureType) { - signatureType = getSignatureTypeFromAccount(account) + signatureType = getSignatureTypeFromAccount(account); } const signerResult = await signer.signRaw?.({ address, data: u8aToHex(encodedCertificateBody), - type: 'bytes', - }) + type: "bytes", + }); if (signerResult) { - signature = hexToU8a(signerResult.signature) + signature = hexToU8a(signerResult.signature); } else { - throw new Error('Failed to sign certificate') + throw new Error("Failed to sign certificate"); } } else { - const {pair} = params - signerPubkey = u8aToHex(pair.publicKey) + const { pair } = params; + signerPubkey = u8aToHex(pair.publicKey); if (!signatureType) { - signatureType = getSignatureTypeFromPair(pair) + signatureType = getSignatureTypeFromPair(pair); } - signature = pair.sign(encodedCertificateBody) + signature = pair.sign(encodedCertificateBody); } const certificate: pruntimeRpc.ICertificate = { @@ -86,7 +93,7 @@ export const signCertificate = async ( signature: { signedBy: { encodedBody: api - .createType('CertificateBody', { + .createType("CertificateBody", { pubkey: signerPubkey, ttl: 0x7fffffff, // FIXME: max ttl is not safe config_bits: 0, @@ -97,46 +104,46 @@ export const signCertificate = async ( signatureType, signature, }, - } + }; return { certificate, pubkey, secret, - } -} + }; +}; const getSignatureTypeFromAccount = (account: InjectedAccountWithMeta) => { - const keypairType = account.type || 'sr25519' + const keypairType = account.type || "sr25519"; // Polkadot JS signature use wrapBytes - const useWrapBytes = account.meta.source === 'polkadot-js' + const useWrapBytes = account.meta.source === "polkadot-js"; switch (keypairType) { - case 'sr25519': + case "sr25519": return useWrapBytes ? pruntimeRpc.SignatureType.Sr25519WrapBytes - : pruntimeRpc.SignatureType.Sr25519 - case 'ed25519': + : pruntimeRpc.SignatureType.Sr25519; + case "ed25519": return useWrapBytes ? pruntimeRpc.SignatureType.Ed25519WrapBytes - : pruntimeRpc.SignatureType.Ed25519 - case 'ecdsa': + : pruntimeRpc.SignatureType.Ed25519; + case "ecdsa": return useWrapBytes ? pruntimeRpc.SignatureType.EcdsaWrapBytes - : pruntimeRpc.SignatureType.Ecdsa + : pruntimeRpc.SignatureType.Ecdsa; default: - throw new Error('Unsupported keypair type') + throw new Error("Unsupported keypair type"); } -} +}; const getSignatureTypeFromPair = (pair: KeyringPair) => { switch (pair.type) { - case 'sr25519': - return pruntimeRpc.SignatureType.Sr25519 - case 'ed25519': - return pruntimeRpc.SignatureType.Ed25519 - case 'ecdsa': - return pruntimeRpc.SignatureType.Ecdsa + case "sr25519": + return pruntimeRpc.SignatureType.Sr25519; + case "ed25519": + return pruntimeRpc.SignatureType.Ed25519; + case "ecdsa": + return pruntimeRpc.SignatureType.Ecdsa; default: - throw new Error('Unsupported keypair type') + throw new Error("Unsupported keypair type"); } -} +}; diff --git a/packages/sdk/src/create.ts b/packages/sdk/src/create.ts index 6f8da13..bff219a 100644 --- a/packages/sdk/src/create.ts +++ b/packages/sdk/src/create.ts @@ -1,80 +1,115 @@ -import type {ApiPromise} from '@polkadot/api' -import type {SubmittableExtrinsic} from '@polkadot/api/types' -import type {Bytes, Compact, u64} from '@polkadot/types-codec' -import type {AccountId, WeightV2} from '@polkadot/types/interfaces' -import type {Codec, ISubmittableResult} from '@polkadot/types/types' +import type { ApiPromise } from "@polkadot/api"; +import type { SubmittableExtrinsic } from "@polkadot/api/types"; +import type { Bytes, Compact, Option, u64 } from "@polkadot/types-codec"; +import type { AccountId } from "@polkadot/types/interfaces"; +import type { Codec } from "@polkadot/types/types"; import { + BN, hexAddPrefix, hexStripPrefix, hexToU8a, stringToHex, u8aToHex, -} from '@polkadot/util' +} from "@polkadot/util"; import { sr25519Agree, sr25519KeypairFromSeed, sr25519Sign, waitReady, -} from '@polkadot/wasm-crypto' -import axios, {AxiosError} from 'axios' -import {from} from 'rxjs' -import type {CertificateData} from './certificate' -import {decrypt, encrypt} from './lib/aes-256-gcm' -import {randomHex} from './lib/hex' -import {prpc, pruntime_rpc as pruntimeRpc} from './proto' - -export type Query = ( +} from "@polkadot/wasm-crypto"; +import axios, { AxiosError } from "axios"; +import { from } from "rxjs"; +import type { CertificateData } from "./certificate"; +import { decrypt, encrypt } from "./lib/aes-256-gcm"; +import { randomHex } from "./lib/hex"; +import { prpc, pruntime_rpc as pruntimeRpc } from "./proto"; + +export type QueryFn = ( encodedQuery: string, certificateData: CertificateData -) => Promise<string> +) => Promise<string>; export type SidevmQuery = ( bytes: Bytes, certificateData: CertificateData -) => Promise<string> +) => Promise<string>; type EncryptedData = { - iv: string - pubkey: string - data: string -} + iv: string; + pubkey: string; + data: string; +}; type CreateEncryptedData = ( data: string, agreementKey: Uint8Array -) => EncryptedData +) => EncryptedData; -export type Command = (params: { - contractId: string - payload: string - deposit: number -}) => SubmittableExtrinsic<'promise', ISubmittableResult> +export type CommandFn = (params: { + contractId: string; + payload: string; + deposit: BN; +}) => SubmittableExtrinsic<"promise">; export interface PhalaInstance { - query: Query - command: Command + query: QueryFn; + command: CommandFn; +} + +export interface ContractExecResultWeightV2 extends Codec { + gasConsumedV2?: { + refTime: Compact<u64>; + proofSize: Compact<u64>; + }; + gasConsumed?: u64; + gasRequiredV2?: { + refTime: Compact<u64>; + proofSize: Compact<u64>; + }; + gasRequired?: u64; } -type CreateFn = (options: { - api: ApiPromise - baseURL: string - contractId: string - autoDeposit: boolean -}) => Promise<{ - api: ApiPromise - sidevmQuery: SidevmQuery - instantiate: SidevmQuery -}> +export interface CreateFnOptions { + api: ApiPromise; + baseURL: string; + contractId: string; + remotePubkey?: string; + autoDeposit?: boolean; +} + +export interface CreateFnResult { + api: ApiPromise; + sidevmQuery: SidevmQuery; + instantiate: SidevmQuery; +} + +export interface ContractInfo { + cluster: string; + codeIndex: { + wasmCode: string; + }; + deployer: AccountId; + pubkey: string; +} + +export interface ClusterInfo { + owner: AccountId; + // @fixme + permission: "Public" | string; + systemContract?: string; + workers: string[]; + gasPrice: BN; +} export const createPruntimeApi = (baseURL: string) => { // Create a http client prepared for protobuf const http = axios.create({ baseURL, headers: { - 'Content-Type': 'application/octet-stream', + "Content-Type": "application/octet-stream", }, - responseType: 'arraybuffer', - }).post + responseType: "arraybuffer", + }).post; const pruntimeApi = pruntimeRpc.PhactoryAPI.create( async (method, requestData, callback) => { @@ -82,113 +117,125 @@ export const createPruntimeApi = (baseURL: string) => { const res = await http<ArrayBuffer>( `/prpc/PhactoryAPI.${method.name}`, new Uint8Array(requestData) - ) - callback(null, new Uint8Array(res.data)) + ); + callback(null, new Uint8Array(res.data)); } catch (err: unknown) { if ( err instanceof AxiosError && err.response?.data instanceof ArrayBuffer ) { - const message = new Uint8Array(err.response.data) - callback(new Error(prpc.PrpcError.decode(message).message)) + const message = new Uint8Array(err.response.data); + callback(new Error(prpc.PrpcError.decode(message).message)); } else { - throw err + throw err; } } } - ) + ); - return pruntimeApi -} + return pruntimeApi; +}; -export const create: CreateFn = async ({ +export async function create({ api, baseURL, contractId, + remotePubkey, autoDeposit = false, -}) => { - await waitReady() - - const pruntimeApi = createPruntimeApi(baseURL) +}: CreateFnOptions): Promise<CreateFnResult> { + await waitReady(); - // Get public key from remote for encrypting - const {publicKey} = await pruntimeApi.getInfo({}) + const pruntimeApi = createPruntimeApi(baseURL); - if (!publicKey) throw new Error('No remote pubkey') - const remotePubkey = hexAddPrefix(publicKey) + if (!remotePubkey) { + // Get public key from remote for encrypting + const info = await pruntimeApi.getInfo({}); + if (!info || !info.publicKey) throw new Error("No remote pubkey"); + remotePubkey = hexAddPrefix(info.publicKey); + } // 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 seed = hexToU8a(hexAddPrefix(randomHex(32))); + const pair = sr25519KeypairFromSeed(seed); + const [sk, pk] = [pair.slice(0, 64), pair.slice(64)]; const queryAgreementKey = sr25519Agree( hexToU8a(hexAddPrefix(remotePubkey)), sk - ) - let gasPrice = 0 - if (autoDeposit) { - const contractInfo = await api.query.phalaFatContracts.contracts(contractId) - const cluster = contractInfo.unwrap().cluster - const clusterInfo = await api.query.phalaFatContracts.clusters(cluster) - gasPrice = clusterInfo.unwrap().gasPrice.toNumber() - } + ); const contractKey = ( await api.query.phalaRegistry.contractKeys(contractId) - ).toString() + ).toString(); if (!contractKey) { - throw new Error(`No contract key for ${contractId}`) + throw new Error(`No contract key for ${contractId}`); } - const commandAgreementKey = sr25519Agree(hexToU8a(contractKey), sk) + const commandAgreementKey = sr25519Agree(hexToU8a(contractKey), sk); const createEncryptedData: CreateEncryptedData = (data, agreementKey) => { - const iv = hexAddPrefix(randomHex(12)) + const iv = hexAddPrefix(randomHex(12)); return { iv, pubkey: u8aToHex(pk), data: hexAddPrefix(encrypt(data, agreementKey, hexToU8a(iv))), - } + }; + }; + + let gasPrice = new BN(0); + if (autoDeposit) { + const contractInfo = (await api.query.phalaFatContracts.contracts( + contractId + )) as Option<Codec>; + const cluster = (contractInfo.unwrap() as unknown as ContractInfo).cluster; + const clusterInfo = (await api.query.phalaFatContracts.clusters( + cluster + )) as Option<Codec>; + gasPrice = new BN( + (clusterInfo.unwrap() as unknown as ClusterInfo).gasPrice + ); } - const query: Query = async (encodedQuery, {certificate, pubkey, secret}) => { + const query: QueryFn = async ( + encodedQuery, + { certificate, pubkey, secret } + ) => { // Encrypt the ContractQuery. - const encryptedData = createEncryptedData(encodedQuery, queryAgreementKey) + const encryptedData = createEncryptedData(encodedQuery, queryAgreementKey); const encodedEncryptedData = api - .createType('EncryptedData', encryptedData) - .toU8a() + .createType("EncryptedData", encryptedData) + .toU8a(); // Sign the encrypted data. const signature: pruntimeRpc.ISignature = { signedBy: certificate, signatureType: pruntimeRpc.SignatureType.Sr25519, signature: sr25519Sign(pubkey, secret, encodedEncryptedData), - } + }; // Send request. const requestData = { encodedEncryptedData, signature, - } + }; return pruntimeApi.contractQuery(requestData).then((res) => { - const {encodedEncryptedData} = res - const {data: encryptedData, iv} = api - .createType('EncryptedData', encodedEncryptedData) + const { encodedEncryptedData } = res; + const { data: encryptedData, iv } = api + .createType("EncryptedData", encodedEncryptedData) .toJSON() as { - iv: string - data: string - } - const data = decrypt(encryptedData, queryAgreementKey, iv) - return hexAddPrefix(data) - }) - } + iv: string; + data: string; + }; + const data = decrypt(encryptedData, queryAgreementKey, iv); + return hexAddPrefix(data); + }); + }; const sidevmQuery: SidevmQuery = async (bytes, certificateData) => query( api - .createType('InkQuery', { + .createType("InkQuery", { head: { nonce: hexAddPrefix(randomHex(32)), id: contractId, @@ -199,12 +246,12 @@ export const create: CreateFn = async ({ }) .toHex(), certificateData - ) + ); const instantiate: SidevmQuery = async (payload, certificateData) => query( api - .createType('InkQuery', { + .createType("InkQuery", { head: { nonce: hexAddPrefix(randomHex(32)), id: contractId, @@ -215,40 +262,49 @@ export const create: CreateFn = async ({ }) .toHex(), certificateData - ) + ); - const command: Command = ({contractId, payload, deposit}) => { + const command: CommandFn = ({ contractId, payload, deposit }) => { const encodedPayload = api - .createType('CommandPayload', { + .createType("CommandPayload", { encrypted: createEncryptedData(payload, commandAgreementKey), }) - .toHex() - return api.tx.phalaFatContracts.pushContractMessage( - contractId, - encodedPayload, - deposit - ) - } + .toHex(); + + try { + return api.tx.phalaFatContracts.pushContractMessage( + contractId, + encodedPayload, + deposit + ); + } catch (err) { + return api.tx.phalaMq.pushMessage( + stringToHex(`phala/contract/${hexStripPrefix(contractId)}/command`), + encodedPayload + ); + } + }; const txContracts = ( dest: AccountId, - value: number, - gas: {refTime: number}, - storageDepositLimit: number, + value: BN, + gas: { refTime: BN }, + storageDepositLimit: BN | undefined, encParams: Uint8Array ) => { - let deposit = 0 + let deposit = new BN(0); if (autoDeposit) { - const gasFee = gas.refTime * gasPrice - deposit = value + gasFee + (storageDepositLimit || 0) + const gasFee = new BN(gas.refTime).mul(gasPrice); + deposit = new BN(value).add(gasFee).add(new BN(storageDepositLimit || 0)); } return command({ contractId: dest.toHex(), payload: api - .createType('InkCommand', { + .createType("InkCommand", { InkMessage: { nonce: hexAddPrefix(randomHex(32)), - message: api.createType('Vec<u8>', encParams).toHex(), + // FIXME: unexpected u8a prefix + message: api.createType("Vec<u8>", encParams).toHex(), transfer: value, gasLimit: gas.refTime, storageDepositLimit, @@ -256,26 +312,26 @@ export const create: CreateFn = async ({ }) .toHex(), deposit, - }) - } + }); + }; - Object.defineProperty(txContracts, 'meta', { - value: {args: []}, + Object.defineProperty(txContracts, "meta", { + value: { args: [] }, enumerable: true, - }) + }); - const instantiateWithCode = () => null - instantiateWithCode.meta = {args: new Array(6)} + const instantiateWithCode = () => null; + instantiateWithCode.meta = { args: new Array(6) }; - Object.defineProperty(api.tx, 'contracts', { + Object.defineProperty(api.tx, "contracts", { value: { instantiateWithCode, call: txContracts, }, enumerable: true, - }) + }); - Object.defineProperty(api.rx.call, 'contractsApi', { + Object.defineProperty(api.rx.call, "contractsApi", { value: { call: ( origin: CertificateData, @@ -288,7 +344,7 @@ export const create: CreateFn = async ({ return from( query( api - .createType('InkQuery', { + .createType("InkQuery", { head: { nonce: hexAddPrefix(randomHex(32)), id: dest, @@ -301,24 +357,24 @@ export const create: CreateFn = async ({ origin ).then((data) => { return api.createType( - 'ContractExecResult', + "ContractExecResult", ( - api.createType('InkResponse', hexAddPrefix(data)).toJSON() as { - result: {ok: {inkMessageReturn: string}} + api.createType("InkResponse", hexAddPrefix(data)).toJSON() as { + result: { ok: { inkMessageReturn: string } }; } ).result.ok.inkMessageReturn - ) + ); }) - ) + ); }, }, enumerable: true, - }) + }); - Object.defineProperty(api.call, 'contractsApi', { - value: {call: () => null}, + Object.defineProperty(api.call, "contractsApi", { + value: { call: () => null }, enumerable: true, - }) + }); - return {api, sidevmQuery, instantiate} + return { api, sidevmQuery, instantiate }; } diff --git a/packages/sdk/src/global.d.ts b/packages/sdk/src/global.d.ts index c6cf475..261d189 100644 --- a/packages/sdk/src/global.d.ts +++ b/packages/sdk/src/global.d.ts @@ -1,3 +1,3 @@ -declare module 'crypto-browserify' { - export * from 'crypto' +declare module "crypto-browserify" { + export * from "crypto"; } diff --git a/packages/sdk/src/index.ts b/packages/sdk/src/index.ts index e1ffc74..e2e588d 100644 --- a/packages/sdk/src/index.ts +++ b/packages/sdk/src/index.ts @@ -1,4 +1,4 @@ -export * from './lib/types' -export * from './lib/hex' -export * from './create' -export * from './certificate' +export * from "./lib/types"; +export * from "./lib/hex"; +export * from "./create"; +export * from "./certificate"; diff --git a/packages/sdk/src/lib/aes-256-gcm.test.ts b/packages/sdk/src/lib/aes-256-gcm.test.ts index 5e935fe..be00ffd 100644 --- a/packages/sdk/src/lib/aes-256-gcm.test.ts +++ b/packages/sdk/src/lib/aes-256-gcm.test.ts @@ -1,15 +1,15 @@ -import {encrypt, decrypt} from './aes-256-gcm' +import { decrypt, encrypt } from "./aes-256-gcm"; -const data = '675abfa9aff26fbf3f4a0bd91f513c40644571f86aa2c18d2d284ad68f17fc97' -const key = '8a3ae1de0dddb21d1dce3647d66d488ce9dfd0f0f4bdad4766e931aef7e35656' +const data = "675abfa9aff26fbf3f4a0bd91f513c40644571f86aa2c18d2d284ad68f17fc97"; +const key = "8a3ae1de0dddb21d1dce3647d66d488ce9dfd0f0f4bdad4766e931aef7e35656"; const encryptedData = - 'ba10a8bd942fddc0d3acc5c20e33fb114c292d3521efed516e7e7dc444a92a3f69d69dd07a003cb8160067953d79fad4' -const iv = '989e2eaba6f775ef660ccdd3' + "ba10a8bd942fddc0d3acc5c20e33fb114c292d3521efed516e7e7dc444a92a3f69d69dd07a003cb8160067953d79fad4"; +const iv = "989e2eaba6f775ef660ccdd3"; -test('aes-256-gcm encrypt', () => { - expect(encrypt(data, key, iv)).toBe(encryptedData) -}) +test("aes-256-gcm encrypt", () => { + expect(encrypt(data, key, iv)).toBe(encryptedData); +}); -test('aes-256-gcm decrypt', () => { - expect(decrypt(encryptedData, key, iv)).toBe(data) -}) +test("aes-256-gcm decrypt", () => { + expect(decrypt(encryptedData, key, iv)).toBe(data); +}); diff --git a/packages/sdk/src/lib/aes-256-gcm.ts b/packages/sdk/src/lib/aes-256-gcm.ts index e6e04a0..4f889b1 100644 --- a/packages/sdk/src/lib/aes-256-gcm.ts +++ b/packages/sdk/src/lib/aes-256-gcm.ts @@ -1,34 +1,43 @@ -import {createCipheriv, createDecipheriv} from 'crypto-browserify' -import {hexToU8a, hexAddPrefix, hexStripPrefix} from '@polkadot/util' +import { hexAddPrefix, hexStripPrefix, hexToU8a } from "@polkadot/util"; +import { createCipheriv, createDecipheriv } from "crypto-browserify"; +import { Buffer } from "buffer"; -const ALGO = 'aes-256-gcm' -const AUTH_TAG_LENGTH = 32 +const ALGO = "aes-256-gcm"; +const AUTH_TAG_LENGTH = 32; -type Param = Uint8Array | string +type Param = Uint8Array | string; const toU8a = (param: Param): Uint8Array => { - if (typeof param === 'string') { - param = hexAddPrefix(param) - return hexToU8a(param) + if (typeof param === "string") { + param = hexAddPrefix(param); + return hexToU8a(param); } - return param -} + return param; +}; export const encrypt = (data: string, key: Param, iv: Param): string => { - data = hexStripPrefix(data) - const cipher = createCipheriv(ALGO, toU8a(key), toU8a(iv)) - const enc = cipher.update(data, 'hex', 'hex') - cipher.final() - return `${enc}${cipher.getAuthTag().toString('hex')}` -} + data = hexStripPrefix(data); + const cipher = createCipheriv( + ALGO, + toU8a(key), + Buffer.from(toU8a(iv)) as unknown as string + ); + const enc = cipher.update(data, "hex", "hex"); + cipher.final(); + return `${enc}${cipher.getAuthTag().toString("hex")}`; +}; export const decrypt = (enc: string, key: Param, iv: Param): string => { - enc = hexStripPrefix(enc) - const decipher = createDecipheriv(ALGO, toU8a(key), toU8a(iv)) - const authTag = hexToU8a(hexAddPrefix(enc.slice(-AUTH_TAG_LENGTH))) - decipher.setAuthTag(authTag) - const data = decipher.update(enc.slice(0, -AUTH_TAG_LENGTH), 'hex', 'hex') - decipher.final() - return data -} + enc = hexStripPrefix(enc); + const decipher = createDecipheriv( + ALGO, + toU8a(key), + Buffer.from(toU8a(iv)) as unknown as string + ); + const authTag = hexToU8a(hexAddPrefix(enc.slice(-AUTH_TAG_LENGTH))); + decipher.setAuthTag(authTag); + const data = decipher.update(enc.slice(0, -AUTH_TAG_LENGTH), "hex", "hex"); + decipher.final(); + return data; +}; diff --git a/packages/sdk/src/lib/hex.ts b/packages/sdk/src/lib/hex.ts index 48c271c..0ae8f76 100644 --- a/packages/sdk/src/lib/hex.ts +++ b/packages/sdk/src/lib/hex.ts @@ -1,4 +1,4 @@ -import {randomBytes} from 'crypto-browserify' +import { randomBytes } from "crypto-browserify"; export const randomHex = (size = 12): string => - randomBytes(size).toString('hex') + randomBytes(size).toString("hex"); diff --git a/packages/sdk/src/lib/types.ts b/packages/sdk/src/lib/types.ts index 64e8525..f43ea36 100644 --- a/packages/sdk/src/lib/types.ts +++ b/packages/sdk/src/lib/types.ts @@ -1,78 +1,76 @@ -import {RegistryTypes} from '@polkadot/types/types' +import { RegistryTypes } from "@polkadot/types/types"; export const types: RegistryTypes = { - ContractId: 'H256', - EcdhPublicKey: 'SpCoreSr25519Public', + ContractId: "H256", + EcdhPublicKey: "SpCoreSr25519Public", ContractQueryHead: { - id: 'ContractId', - nonce: '[u8; 32]', + id: "ContractId", + nonce: "[u8; 32]", }, CertificateBody: { - pubkey: 'Vec<u8>', - ttl: 'u32', - config_bits: 'u32', + pubkey: "Vec<u8>", + ttl: "u32", + config_bits: "u32", }, EncryptedData: { - iv: '[u8; 12]', - pubkey: 'EcdhPublicKey', - data: 'Vec<u8>', + iv: "[u8; 12]", + pubkey: "EcdhPublicKey", + data: "Vec<u8>", }, CommandPayload: { _enum: { Plain: null, // disable plain - Encrypted: 'EncryptedData', + Encrypted: "EncryptedData", }, }, InkQueryData: { - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore _enum: { // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore InkMessage: { - payload: 'Vec<u8>', - deposit: 'u128', - transfer: 'u128', + payload: "Vec<u8>", + deposit: "u128", + transfer: "u128", }, // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore - SidevmMessage: 'Vec<u8>', + SidevmMessage: "Vec<u8>", // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore InkInstantiate: { - codeHash: 'H256', - salt: 'Vec<u8>', - instantiateData: 'Vec<u8>', - deposit: 'u128', - transfer: 'u128', + codeHash: "H256", + salt: "Vec<u8>", + instantiateData: "Vec<u8>", + deposit: "u128", + transfer: "u128", }, }, }, InkQuery: { - head: 'ContractQueryHead', - data: 'InkQueryData', + head: "ContractQueryHead", + data: "InkQueryData", }, InkQueryError: { _enum: { BadOrigin: null, - RuntimeError: 'String', + RuntimeError: "String", }, }, InkQueryOk: { _enum: { - InkMessageReturn: 'Vec<u8>', + InkMessageReturn: "Vec<u8>", }, }, InkResponse: { - nonce: '[u8; 32]', - result: 'Result<InkQueryOk, InkQueryError>', + nonce: "[u8; 32]", + result: "Result<InkQueryOk, InkQueryError>", }, InkMessage: { - nonce: 'Vec<u8>', - message: 'Vec<u8>', - transfer: 'u128', - gasLimit: 'u64', - storageDepositLimit: 'Option<u128>', + nonce: "Vec<u8>", + message: "Vec<u8>", + transfer: "u128", + gasLimit: "u64", + storageDepositLimit: "Option<u128>", }, - InkCommand: {_enum: {InkMessage: 'InkMessage'}}, -} + InkCommand: { _enum: { InkMessage: "InkMessage" } }, +}; diff --git a/packages/sdk/src/proto/index.d.ts b/packages/sdk/src/proto/index.d.ts index baa3142..6caf8c9 100644 --- a/packages/sdk/src/proto/index.d.ts +++ b/packages/sdk/src/proto/index.d.ts @@ -1,4921 +1,5765 @@ import * as $protobuf from "protobufjs"; /** Namespace prpc. */ export namespace prpc { - - /** Properties of a PrpcError. */ - interface IPrpcError { - - /** The error description */ - message?: (string|null); - } - - /** The final Error type of RPCs to be serialized to protobuf. */ - class PrpcError implements IPrpcError { - - /** - * Constructs a new PrpcError. - * @param [properties] Properties to set - */ - constructor(properties?: prpc.IPrpcError); - - /** The error description */ - public message: string; - - /** - * Creates a new PrpcError instance using the specified properties. - * @param [properties] Properties to set - * @returns PrpcError instance - */ - public static create(properties?: prpc.IPrpcError): prpc.PrpcError; - - /** - * Encodes the specified PrpcError message. Does not implicitly {@link prpc.PrpcError.verify|verify} messages. - * @param message PrpcError message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: prpc.IPrpcError, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PrpcError message, length delimited. Does not implicitly {@link prpc.PrpcError.verify|verify} messages. - * @param message PrpcError message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: prpc.IPrpcError, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PrpcError message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PrpcError - * @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): prpc.PrpcError; - - /** - * Decodes a PrpcError message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PrpcError - * @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)): prpc.PrpcError; - - /** - * Verifies a PrpcError 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 PrpcError message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PrpcError - */ - public static fromObject(object: { [k: string]: any }): prpc.PrpcError; - - /** - * Creates a plain object from a PrpcError message. Also converts values to other types if specified. - * @param message PrpcError - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: prpc.PrpcError, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PrpcError to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Properties of a PrpcError. */ + interface IPrpcError { + /** The error description */ + message?: string | null; + } + + /** The final Error type of RPCs to be serialized to protobuf. */ + class PrpcError implements IPrpcError { + /** + * Constructs a new PrpcError. + * @param [properties] Properties to set + */ + constructor(properties?: prpc.IPrpcError); + + /** The error description */ + public message: string; + + /** + * Creates a new PrpcError instance using the specified properties. + * @param [properties] Properties to set + * @returns PrpcError instance + */ + public static create(properties?: prpc.IPrpcError): prpc.PrpcError; + + /** + * Encodes the specified PrpcError message. Does not implicitly {@link prpc.PrpcError.verify|verify} messages. + * @param message PrpcError message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: prpc.IPrpcError, + writer?: $protobuf.Writer + ): $protobuf.Writer; + + /** + * Encodes the specified PrpcError message, length delimited. Does not implicitly {@link prpc.PrpcError.verify|verify} messages. + * @param message PrpcError message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: prpc.IPrpcError, + writer?: $protobuf.Writer + ): $protobuf.Writer; + + /** + * Decodes a PrpcError message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PrpcError + * @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 + ): prpc.PrpcError; + + /** + * Decodes a PrpcError message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PrpcError + * @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 + ): prpc.PrpcError; + + /** + * Verifies a PrpcError 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 PrpcError message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PrpcError + */ + public static fromObject(object: { [k: string]: any }): prpc.PrpcError; + + /** + * Creates a plain object from a PrpcError message. Also converts values to other types if specified. + * @param message PrpcError + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: prpc.PrpcError, + options?: $protobuf.IConversionOptions + ): { [k: string]: any }; + + /** + * Converts this PrpcError to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } } /** Namespace pruntime_rpc. */ export namespace pruntime_rpc { + /** Represents a PhactoryAPI */ + class PhactoryAPI extends $protobuf.rpc.Service { + /** + * Constructs a new PhactoryAPI service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor( + rpcImpl: $protobuf.RPCImpl, + requestDelimited?: boolean, + responseDelimited?: boolean + ); + + /** + * Creates new PhactoryAPI service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create( + rpcImpl: $protobuf.RPCImpl, + requestDelimited?: boolean, + responseDelimited?: boolean + ): PhactoryAPI; + + /** + * Calls GetInfo. + * @param request Empty message or plain object + * @param callback Node-style callback called with the error, if any, and PhactoryInfo + */ + public getInfo( + request: google.protobuf.IEmpty, + callback: pruntime_rpc.PhactoryAPI.GetInfoCallback + ): void; + + /** + * Calls GetInfo. + * @param request Empty message or plain object + * @returns Promise + */ + public getInfo( + request: google.protobuf.IEmpty + ): Promise<pruntime_rpc.PhactoryInfo>; + + /** + * Calls SyncHeader. + * @param request HeadersToSync message or plain object + * @param callback Node-style callback called with the error, if any, and SyncedTo + */ + public syncHeader( + request: pruntime_rpc.IHeadersToSync, + callback: pruntime_rpc.PhactoryAPI.SyncHeaderCallback + ): void; + + /** + * Calls SyncHeader. + * @param request HeadersToSync message or plain object + * @returns Promise + */ + public syncHeader( + request: pruntime_rpc.IHeadersToSync + ): Promise<pruntime_rpc.SyncedTo>; + + /** + * Calls SyncParaHeader. + * @param request ParaHeadersToSync message or plain object + * @param callback Node-style callback called with the error, if any, and SyncedTo + */ + public syncParaHeader( + request: pruntime_rpc.IParaHeadersToSync, + callback: pruntime_rpc.PhactoryAPI.SyncParaHeaderCallback + ): void; + + /** + * Calls SyncParaHeader. + * @param request ParaHeadersToSync message or plain object + * @returns Promise + */ + public syncParaHeader( + request: pruntime_rpc.IParaHeadersToSync + ): Promise<pruntime_rpc.SyncedTo>; + + /** + * Calls SyncCombinedHeaders. + * @param request CombinedHeadersToSync message or plain object + * @param callback Node-style callback called with the error, if any, and HeadersSyncedTo + */ + public syncCombinedHeaders( + request: pruntime_rpc.ICombinedHeadersToSync, + callback: pruntime_rpc.PhactoryAPI.SyncCombinedHeadersCallback + ): void; + + /** + * Calls SyncCombinedHeaders. + * @param request CombinedHeadersToSync message or plain object + * @returns Promise + */ + public syncCombinedHeaders( + request: pruntime_rpc.ICombinedHeadersToSync + ): Promise<pruntime_rpc.HeadersSyncedTo>; + + /** + * Calls DispatchBlocks. + * @param request Blocks message or plain object + * @param callback Node-style callback called with the error, if any, and SyncedTo + */ + public dispatchBlocks( + request: pruntime_rpc.IBlocks, + callback: pruntime_rpc.PhactoryAPI.DispatchBlocksCallback + ): void; + + /** + * Calls DispatchBlocks. + * @param request Blocks message or plain object + * @returns Promise + */ + public dispatchBlocks( + request: pruntime_rpc.IBlocks + ): Promise<pruntime_rpc.SyncedTo>; + + /** + * Calls InitRuntime. + * @param request InitRuntimeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and InitRuntimeResponse + */ + public initRuntime( + request: pruntime_rpc.IInitRuntimeRequest, + callback: pruntime_rpc.PhactoryAPI.InitRuntimeCallback + ): void; + + /** + * Calls InitRuntime. + * @param request InitRuntimeRequest message or plain object + * @returns Promise + */ + public initRuntime( + request: pruntime_rpc.IInitRuntimeRequest + ): Promise<pruntime_rpc.InitRuntimeResponse>; + + /** + * Calls GetRuntimeInfo. + * @param request GetRuntimeInfoRequest message or plain object + * @param callback Node-style callback called with the error, if any, and InitRuntimeResponse + */ + public getRuntimeInfo( + request: pruntime_rpc.IGetRuntimeInfoRequest, + callback: pruntime_rpc.PhactoryAPI.GetRuntimeInfoCallback + ): void; + + /** + * Calls GetRuntimeInfo. + * @param request GetRuntimeInfoRequest message or plain object + * @returns Promise + */ + public getRuntimeInfo( + request: pruntime_rpc.IGetRuntimeInfoRequest + ): Promise<pruntime_rpc.InitRuntimeResponse>; + + /** + * Calls GetEgressMessages. + * @param request Empty message or plain object + * @param callback Node-style callback called with the error, if any, and GetEgressMessagesResponse + */ + public getEgressMessages( + request: google.protobuf.IEmpty, + callback: pruntime_rpc.PhactoryAPI.GetEgressMessagesCallback + ): void; + + /** + * Calls GetEgressMessages. + * @param request Empty message or plain object + * @returns Promise + */ + public getEgressMessages( + request: google.protobuf.IEmpty + ): Promise<pruntime_rpc.GetEgressMessagesResponse>; + + /** + * Calls ContractQuery. + * @param request ContractQueryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ContractQueryResponse + */ + public contractQuery( + request: pruntime_rpc.IContractQueryRequest, + callback: pruntime_rpc.PhactoryAPI.ContractQueryCallback + ): void; + + /** + * Calls ContractQuery. + * @param request ContractQueryRequest message or plain object + * @returns Promise + */ + public contractQuery( + request: pruntime_rpc.IContractQueryRequest + ): Promise<pruntime_rpc.ContractQueryResponse>; + + /** + * Calls GetWorkerState. + * @param request GetWorkerStateRequest message or plain object + * @param callback Node-style callback called with the error, if any, and WorkerState + */ + public getWorkerState( + request: pruntime_rpc.IGetWorkerStateRequest, + callback: pruntime_rpc.PhactoryAPI.GetWorkerStateCallback + ): void; + + /** + * Calls GetWorkerState. + * @param request GetWorkerStateRequest message or plain object + * @returns Promise + */ + public getWorkerState( + request: pruntime_rpc.IGetWorkerStateRequest + ): Promise<pruntime_rpc.WorkerState>; + + /** + * Calls AddEndpoint. + * @param request AddEndpointRequest message or plain object + * @param callback Node-style callback called with the error, if any, and GetEndpointResponse + */ + public addEndpoint( + request: pruntime_rpc.IAddEndpointRequest, + callback: pruntime_rpc.PhactoryAPI.AddEndpointCallback + ): void; + + /** + * Calls AddEndpoint. + * @param request AddEndpointRequest message or plain object + * @returns Promise + */ + public addEndpoint( + request: pruntime_rpc.IAddEndpointRequest + ): Promise<pruntime_rpc.GetEndpointResponse>; + + /** + * Calls RefreshEndpointSigningTime. + * @param request Empty message or plain object + * @param callback Node-style callback called with the error, if any, and GetEndpointResponse + */ + public refreshEndpointSigningTime( + request: google.protobuf.IEmpty, + callback: pruntime_rpc.PhactoryAPI.RefreshEndpointSigningTimeCallback + ): void; + + /** + * Calls RefreshEndpointSigningTime. + * @param request Empty message or plain object + * @returns Promise + */ + public refreshEndpointSigningTime( + request: google.protobuf.IEmpty + ): Promise<pruntime_rpc.GetEndpointResponse>; + + /** + * Calls GetEndpointInfo. + * @param request Empty message or plain object + * @param callback Node-style callback called with the error, if any, and GetEndpointResponse + */ + public getEndpointInfo( + request: google.protobuf.IEmpty, + callback: pruntime_rpc.PhactoryAPI.GetEndpointInfoCallback + ): void; + + /** + * Calls GetEndpointInfo. + * @param request Empty message or plain object + * @returns Promise + */ + public getEndpointInfo( + request: google.protobuf.IEmpty + ): Promise<pruntime_rpc.GetEndpointResponse>; + + /** + * Calls SignEndpointInfo. + * @param request SignEndpointsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and GetEndpointResponse + */ + public signEndpointInfo( + request: pruntime_rpc.ISignEndpointsRequest, + callback: pruntime_rpc.PhactoryAPI.SignEndpointInfoCallback + ): void; + + /** + * Calls SignEndpointInfo. + * @param request SignEndpointsRequest message or plain object + * @returns Promise + */ + public signEndpointInfo( + request: pruntime_rpc.ISignEndpointsRequest + ): Promise<pruntime_rpc.GetEndpointResponse>; + + /** + * Calls DerivePhalaI2pKey. + * @param request Empty message or plain object + * @param callback Node-style callback called with the error, if any, and DerivePhalaI2pKeyResponse + */ + public derivePhalaI2pKey( + request: google.protobuf.IEmpty, + callback: pruntime_rpc.PhactoryAPI.DerivePhalaI2pKeyCallback + ): void; + + /** + * Calls DerivePhalaI2pKey. + * @param request Empty message or plain object + * @returns Promise + */ + public derivePhalaI2pKey( + request: google.protobuf.IEmpty + ): Promise<pruntime_rpc.DerivePhalaI2pKeyResponse>; + + /** + * Calls Echo. + * @param request EchoMessage message or plain object + * @param callback Node-style callback called with the error, if any, and EchoMessage + */ + public echo( + request: pruntime_rpc.IEchoMessage, + callback: pruntime_rpc.PhactoryAPI.EchoCallback + ): void; + + /** + * Calls Echo. + * @param request EchoMessage message or plain object + * @returns Promise + */ + public echo( + request: pruntime_rpc.IEchoMessage + ): Promise<pruntime_rpc.EchoMessage>; + + /** + * Calls HandoverCreateChallenge. + * @param request Empty message or plain object + * @param callback Node-style callback called with the error, if any, and HandoverChallenge + */ + public handoverCreateChallenge( + request: google.protobuf.IEmpty, + callback: pruntime_rpc.PhactoryAPI.HandoverCreateChallengeCallback + ): void; + + /** + * Calls HandoverCreateChallenge. + * @param request Empty message or plain object + * @returns Promise + */ + public handoverCreateChallenge( + request: google.protobuf.IEmpty + ): Promise<pruntime_rpc.HandoverChallenge>; + + /** + * Calls HandoverStart. + * @param request HandoverChallengeResponse message or plain object + * @param callback Node-style callback called with the error, if any, and HandoverWorkerKey + */ + public handoverStart( + request: pruntime_rpc.IHandoverChallengeResponse, + callback: pruntime_rpc.PhactoryAPI.HandoverStartCallback + ): void; + + /** + * Calls HandoverStart. + * @param request HandoverChallengeResponse message or plain object + * @returns Promise + */ + public handoverStart( + request: pruntime_rpc.IHandoverChallengeResponse + ): Promise<pruntime_rpc.HandoverWorkerKey>; + + /** + * Calls HandoverAcceptChallenge. + * @param request HandoverChallenge message or plain object + * @param callback Node-style callback called with the error, if any, and HandoverChallengeResponse + */ + public handoverAcceptChallenge( + request: pruntime_rpc.IHandoverChallenge, + callback: pruntime_rpc.PhactoryAPI.HandoverAcceptChallengeCallback + ): void; + + /** + * Calls HandoverAcceptChallenge. + * @param request HandoverChallenge message or plain object + * @returns Promise + */ + public handoverAcceptChallenge( + request: pruntime_rpc.IHandoverChallenge + ): Promise<pruntime_rpc.HandoverChallengeResponse>; + + /** + * Calls HandoverReceive. + * @param request HandoverWorkerKey message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public handoverReceive( + request: pruntime_rpc.IHandoverWorkerKey, + callback: pruntime_rpc.PhactoryAPI.HandoverReceiveCallback + ): void; + + /** + * Calls HandoverReceive. + * @param request HandoverWorkerKey message or plain object + * @returns Promise + */ + public handoverReceive( + request: pruntime_rpc.IHandoverWorkerKey + ): Promise<google.protobuf.Empty>; + + /** + * Calls ConfigNetwork. + * @param request NetworkConfig message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public configNetwork( + request: pruntime_rpc.INetworkConfig, + callback: pruntime_rpc.PhactoryAPI.ConfigNetworkCallback + ): void; + + /** + * Calls ConfigNetwork. + * @param request NetworkConfig message or plain object + * @returns Promise + */ + public configNetwork( + request: pruntime_rpc.INetworkConfig + ): Promise<google.protobuf.Empty>; + + /** + * Calls HttpFetch. + * @param request HttpRequest message or plain object + * @param callback Node-style callback called with the error, if any, and HttpResponse + */ + public httpFetch( + request: pruntime_rpc.IHttpRequest, + callback: pruntime_rpc.PhactoryAPI.HttpFetchCallback + ): void; + + /** + * Calls HttpFetch. + * @param request HttpRequest message or plain object + * @returns Promise + */ + public httpFetch( + request: pruntime_rpc.IHttpRequest + ): Promise<pruntime_rpc.HttpResponse>; + } + + namespace PhactoryAPI { + /** + * Callback as used by {@link pruntime_rpc.PhactoryAPI#getInfo}. + * @param error Error, if any + * @param [response] PhactoryInfo + */ + type GetInfoCallback = ( + error: Error | null, + response?: pruntime_rpc.PhactoryInfo + ) => void; + + /** + * Callback as used by {@link pruntime_rpc.PhactoryAPI#syncHeader}. + * @param error Error, if any + * @param [response] SyncedTo + */ + type SyncHeaderCallback = ( + error: Error | null, + response?: pruntime_rpc.SyncedTo + ) => void; + + /** + * Callback as used by {@link pruntime_rpc.PhactoryAPI#syncParaHeader}. + * @param error Error, if any + * @param [response] SyncedTo + */ + type SyncParaHeaderCallback = ( + error: Error | null, + response?: pruntime_rpc.SyncedTo + ) => void; + + /** + * Callback as used by {@link pruntime_rpc.PhactoryAPI#syncCombinedHeaders}. + * @param error Error, if any + * @param [response] HeadersSyncedTo + */ + type SyncCombinedHeadersCallback = ( + error: Error | null, + response?: pruntime_rpc.HeadersSyncedTo + ) => void; + + /** + * Callback as used by {@link pruntime_rpc.PhactoryAPI#dispatchBlocks}. + * @param error Error, if any + * @param [response] SyncedTo + */ + type DispatchBlocksCallback = ( + error: Error | null, + response?: pruntime_rpc.SyncedTo + ) => void; + + /** + * Callback as used by {@link pruntime_rpc.PhactoryAPI#initRuntime}. + * @param error Error, if any + * @param [response] InitRuntimeResponse + */ + type InitRuntimeCallback = ( + error: Error | null, + response?: pruntime_rpc.InitRuntimeResponse + ) => void; + + /** + * Callback as used by {@link pruntime_rpc.PhactoryAPI#getRuntimeInfo}. + * @param error Error, if any + * @param [response] InitRuntimeResponse + */ + type GetRuntimeInfoCallback = ( + error: Error | null, + response?: pruntime_rpc.InitRuntimeResponse + ) => void; + + /** + * Callback as used by {@link pruntime_rpc.PhactoryAPI#getEgressMessages}. + * @param error Error, if any + * @param [response] GetEgressMessagesResponse + */ + type GetEgressMessagesCallback = ( + error: Error | null, + response?: pruntime_rpc.GetEgressMessagesResponse + ) => void; + + /** + * Callback as used by {@link pruntime_rpc.PhactoryAPI#contractQuery}. + * @param error Error, if any + * @param [response] ContractQueryResponse + */ + type ContractQueryCallback = ( + error: Error | null, + response?: pruntime_rpc.ContractQueryResponse + ) => void; + + /** + * Callback as used by {@link pruntime_rpc.PhactoryAPI#getWorkerState}. + * @param error Error, if any + * @param [response] WorkerState + */ + type GetWorkerStateCallback = ( + error: Error | null, + response?: pruntime_rpc.WorkerState + ) => void; + + /** + * Callback as used by {@link pruntime_rpc.PhactoryAPI#addEndpoint}. + * @param error Error, if any + * @param [response] GetEndpointResponse + */ + type AddEndpointCallback = ( + error: Error | null, + response?: pruntime_rpc.GetEndpointResponse + ) => void; + + /** + * Callback as used by {@link pruntime_rpc.PhactoryAPI#refreshEndpointSigningTime}. + * @param error Error, if any + * @param [response] GetEndpointResponse + */ + type RefreshEndpointSigningTimeCallback = ( + error: Error | null, + response?: pruntime_rpc.GetEndpointResponse + ) => void; + + /** + * Callback as used by {@link pruntime_rpc.PhactoryAPI#getEndpointInfo}. + * @param error Error, if any + * @param [response] GetEndpointResponse + */ + type GetEndpointInfoCallback = ( + error: Error | null, + response?: pruntime_rpc.GetEndpointResponse + ) => void; + + /** + * Callback as used by {@link pruntime_rpc.PhactoryAPI#signEndpointInfo}. + * @param error Error, if any + * @param [response] GetEndpointResponse + */ + type SignEndpointInfoCallback = ( + error: Error | null, + response?: pruntime_rpc.GetEndpointResponse + ) => void; + + /** + * Callback as used by {@link pruntime_rpc.PhactoryAPI#derivePhalaI2pKey}. + * @param error Error, if any + * @param [response] DerivePhalaI2pKeyResponse + */ + type DerivePhalaI2pKeyCallback = ( + error: Error | null, + response?: pruntime_rpc.DerivePhalaI2pKeyResponse + ) => void; + + /** + * Callback as used by {@link pruntime_rpc.PhactoryAPI#echo}. + * @param error Error, if any + * @param [response] EchoMessage + */ + type EchoCallback = ( + error: Error | null, + response?: pruntime_rpc.EchoMessage + ) => void; + + /** + * Callback as used by {@link pruntime_rpc.PhactoryAPI#handoverCreateChallenge}. + * @param error Error, if any + * @param [response] HandoverChallenge + */ + type HandoverCreateChallengeCallback = ( + error: Error | null, + response?: pruntime_rpc.HandoverChallenge + ) => void; + + /** + * Callback as used by {@link pruntime_rpc.PhactoryAPI#handoverStart}. + * @param error Error, if any + * @param [response] HandoverWorkerKey + */ + type HandoverStartCallback = ( + error: Error | null, + response?: pruntime_rpc.HandoverWorkerKey + ) => void; + + /** + * Callback as used by {@link pruntime_rpc.PhactoryAPI#handoverAcceptChallenge}. + * @param error Error, if any + * @param [response] HandoverChallengeResponse + */ + type HandoverAcceptChallengeCallback = ( + error: Error | null, + response?: pruntime_rpc.HandoverChallengeResponse + ) => void; + + /** + * Callback as used by {@link pruntime_rpc.PhactoryAPI#handoverReceive}. + * @param error Error, if any + * @param [response] Empty + */ + type HandoverReceiveCallback = ( + error: Error | null, + response?: google.protobuf.Empty + ) => void; + + /** + * Callback as used by {@link pruntime_rpc.PhactoryAPI#configNetwork}. + * @param error Error, if any + * @param [response] Empty + */ + type ConfigNetworkCallback = ( + error: Error | null, + response?: google.protobuf.Empty + ) => void; + + /** + * Callback as used by {@link pruntime_rpc.PhactoryAPI#httpFetch}. + * @param error Error, if any + * @param [response] HttpResponse + */ + type HttpFetchCallback = ( + error: Error | null, + response?: pruntime_rpc.HttpResponse + ) => void; + } + + /** Properties of a PhactoryInfo. */ + interface IPhactoryInfo { + /** PhactoryInfo initialized */ + initialized?: boolean | null; + + /** PhactoryInfo registered */ + registered?: boolean | null; + + /** PhactoryInfo genesisBlockHash */ + genesisBlockHash?: string | null; + + /** PhactoryInfo publicKey */ + publicKey?: string | null; + + /** PhactoryInfo ecdhPublicKey */ + ecdhPublicKey?: string | null; + + /** PhactoryInfo headernum */ + headernum?: number | null; + + /** PhactoryInfo paraHeadernum */ + paraHeadernum?: number | null; + + /** PhactoryInfo blocknum */ + blocknum?: number | null; + + /** PhactoryInfo stateRoot */ + stateRoot?: string | null; + + /** PhactoryInfo devMode */ + devMode?: boolean | null; + + /** PhactoryInfo pendingMessages */ + pendingMessages?: number | Long | null; + + /** PhactoryInfo score */ + score?: number | Long | null; - /** Represents a PhactoryAPI */ - class PhactoryAPI extends $protobuf.rpc.Service { - - /** - * Constructs a new PhactoryAPI service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - - /** - * Creates new PhactoryAPI service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. - */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): PhactoryAPI; - - /** - * Calls GetInfo. - * @param request Empty message or plain object - * @param callback Node-style callback called with the error, if any, and PhactoryInfo - */ - public getInfo(request: google.protobuf.IEmpty, callback: pruntime_rpc.PhactoryAPI.GetInfoCallback): void; - - /** - * Calls GetInfo. - * @param request Empty message or plain object - * @returns Promise - */ - public getInfo(request: google.protobuf.IEmpty): Promise<pruntime_rpc.PhactoryInfo>; - - /** - * Calls SyncHeader. - * @param request HeadersToSync message or plain object - * @param callback Node-style callback called with the error, if any, and SyncedTo - */ - public syncHeader(request: pruntime_rpc.IHeadersToSync, callback: pruntime_rpc.PhactoryAPI.SyncHeaderCallback): void; - - /** - * Calls SyncHeader. - * @param request HeadersToSync message or plain object - * @returns Promise - */ - public syncHeader(request: pruntime_rpc.IHeadersToSync): Promise<pruntime_rpc.SyncedTo>; - - /** - * Calls SyncParaHeader. - * @param request ParaHeadersToSync message or plain object - * @param callback Node-style callback called with the error, if any, and SyncedTo - */ - public syncParaHeader(request: pruntime_rpc.IParaHeadersToSync, callback: pruntime_rpc.PhactoryAPI.SyncParaHeaderCallback): void; - - /** - * Calls SyncParaHeader. - * @param request ParaHeadersToSync message or plain object - * @returns Promise - */ - public syncParaHeader(request: pruntime_rpc.IParaHeadersToSync): Promise<pruntime_rpc.SyncedTo>; - - /** - * Calls SyncCombinedHeaders. - * @param request CombinedHeadersToSync message or plain object - * @param callback Node-style callback called with the error, if any, and HeadersSyncedTo - */ - public syncCombinedHeaders(request: pruntime_rpc.ICombinedHeadersToSync, callback: pruntime_rpc.PhactoryAPI.SyncCombinedHeadersCallback): void; - - /** - * Calls SyncCombinedHeaders. - * @param request CombinedHeadersToSync message or plain object - * @returns Promise - */ - public syncCombinedHeaders(request: pruntime_rpc.ICombinedHeadersToSync): Promise<pruntime_rpc.HeadersSyncedTo>; - - /** - * Calls DispatchBlocks. - * @param request Blocks message or plain object - * @param callback Node-style callback called with the error, if any, and SyncedTo - */ - public dispatchBlocks(request: pruntime_rpc.IBlocks, callback: pruntime_rpc.PhactoryAPI.DispatchBlocksCallback): void; - - /** - * Calls DispatchBlocks. - * @param request Blocks message or plain object - * @returns Promise - */ - public dispatchBlocks(request: pruntime_rpc.IBlocks): Promise<pruntime_rpc.SyncedTo>; - - /** - * Calls InitRuntime. - * @param request InitRuntimeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and InitRuntimeResponse - */ - public initRuntime(request: pruntime_rpc.IInitRuntimeRequest, callback: pruntime_rpc.PhactoryAPI.InitRuntimeCallback): void; - - /** - * Calls InitRuntime. - * @param request InitRuntimeRequest message or plain object - * @returns Promise - */ - public initRuntime(request: pruntime_rpc.IInitRuntimeRequest): Promise<pruntime_rpc.InitRuntimeResponse>; - - /** - * Calls GetRuntimeInfo. - * @param request GetRuntimeInfoRequest message or plain object - * @param callback Node-style callback called with the error, if any, and InitRuntimeResponse - */ - public getRuntimeInfo(request: pruntime_rpc.IGetRuntimeInfoRequest, callback: pruntime_rpc.PhactoryAPI.GetRuntimeInfoCallback): void; - - /** - * Calls GetRuntimeInfo. - * @param request GetRuntimeInfoRequest message or plain object - * @returns Promise - */ - public getRuntimeInfo(request: pruntime_rpc.IGetRuntimeInfoRequest): Promise<pruntime_rpc.InitRuntimeResponse>; - - /** - * Calls GetEgressMessages. - * @param request Empty message or plain object - * @param callback Node-style callback called with the error, if any, and GetEgressMessagesResponse - */ - public getEgressMessages(request: google.protobuf.IEmpty, callback: pruntime_rpc.PhactoryAPI.GetEgressMessagesCallback): void; - - /** - * Calls GetEgressMessages. - * @param request Empty message or plain object - * @returns Promise - */ - public getEgressMessages(request: google.protobuf.IEmpty): Promise<pruntime_rpc.GetEgressMessagesResponse>; - - /** - * Calls ContractQuery. - * @param request ContractQueryRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ContractQueryResponse - */ - public contractQuery(request: pruntime_rpc.IContractQueryRequest, callback: pruntime_rpc.PhactoryAPI.ContractQueryCallback): void; - - /** - * Calls ContractQuery. - * @param request ContractQueryRequest message or plain object - * @returns Promise - */ - public contractQuery(request: pruntime_rpc.IContractQueryRequest): Promise<pruntime_rpc.ContractQueryResponse>; - - /** - * Calls GetWorkerState. - * @param request GetWorkerStateRequest message or plain object - * @param callback Node-style callback called with the error, if any, and WorkerState - */ - public getWorkerState(request: pruntime_rpc.IGetWorkerStateRequest, callback: pruntime_rpc.PhactoryAPI.GetWorkerStateCallback): void; - - /** - * Calls GetWorkerState. - * @param request GetWorkerStateRequest message or plain object - * @returns Promise - */ - public getWorkerState(request: pruntime_rpc.IGetWorkerStateRequest): Promise<pruntime_rpc.WorkerState>; - - /** - * Calls AddEndpoint. - * @param request AddEndpointRequest message or plain object - * @param callback Node-style callback called with the error, if any, and GetEndpointResponse - */ - public addEndpoint(request: pruntime_rpc.IAddEndpointRequest, callback: pruntime_rpc.PhactoryAPI.AddEndpointCallback): void; - - /** - * Calls AddEndpoint. - * @param request AddEndpointRequest message or plain object - * @returns Promise - */ - public addEndpoint(request: pruntime_rpc.IAddEndpointRequest): Promise<pruntime_rpc.GetEndpointResponse>; - - /** - * Calls RefreshEndpointSigningTime. - * @param request Empty message or plain object - * @param callback Node-style callback called with the error, if any, and GetEndpointResponse - */ - public refreshEndpointSigningTime(request: google.protobuf.IEmpty, callback: pruntime_rpc.PhactoryAPI.RefreshEndpointSigningTimeCallback): void; - - /** - * Calls RefreshEndpointSigningTime. - * @param request Empty message or plain object - * @returns Promise - */ - public refreshEndpointSigningTime(request: google.protobuf.IEmpty): Promise<pruntime_rpc.GetEndpointResponse>; - - /** - * Calls GetEndpointInfo. - * @param request Empty message or plain object - * @param callback Node-style callback called with the error, if any, and GetEndpointResponse - */ - public getEndpointInfo(request: google.protobuf.IEmpty, callback: pruntime_rpc.PhactoryAPI.GetEndpointInfoCallback): void; - - /** - * Calls GetEndpointInfo. - * @param request Empty message or plain object - * @returns Promise - */ - public getEndpointInfo(request: google.protobuf.IEmpty): Promise<pruntime_rpc.GetEndpointResponse>; - - /** - * Calls SignEndpointInfo. - * @param request SignEndpointsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and GetEndpointResponse - */ - public signEndpointInfo(request: pruntime_rpc.ISignEndpointsRequest, callback: pruntime_rpc.PhactoryAPI.SignEndpointInfoCallback): void; - - /** - * Calls SignEndpointInfo. - * @param request SignEndpointsRequest message or plain object - * @returns Promise - */ - public signEndpointInfo(request: pruntime_rpc.ISignEndpointsRequest): Promise<pruntime_rpc.GetEndpointResponse>; - - /** - * Calls DerivePhalaI2pKey. - * @param request Empty message or plain object - * @param callback Node-style callback called with the error, if any, and DerivePhalaI2pKeyResponse - */ - public derivePhalaI2pKey(request: google.protobuf.IEmpty, callback: pruntime_rpc.PhactoryAPI.DerivePhalaI2pKeyCallback): void; - - /** - * Calls DerivePhalaI2pKey. - * @param request Empty message or plain object - * @returns Promise - */ - public derivePhalaI2pKey(request: google.protobuf.IEmpty): Promise<pruntime_rpc.DerivePhalaI2pKeyResponse>; - - /** - * Calls Echo. - * @param request EchoMessage message or plain object - * @param callback Node-style callback called with the error, if any, and EchoMessage - */ - public echo(request: pruntime_rpc.IEchoMessage, callback: pruntime_rpc.PhactoryAPI.EchoCallback): void; - - /** - * Calls Echo. - * @param request EchoMessage message or plain object - * @returns Promise - */ - public echo(request: pruntime_rpc.IEchoMessage): Promise<pruntime_rpc.EchoMessage>; - - /** - * Calls HandoverCreateChallenge. - * @param request Empty message or plain object - * @param callback Node-style callback called with the error, if any, and HandoverChallenge - */ - public handoverCreateChallenge(request: google.protobuf.IEmpty, callback: pruntime_rpc.PhactoryAPI.HandoverCreateChallengeCallback): void; - - /** - * Calls HandoverCreateChallenge. - * @param request Empty message or plain object - * @returns Promise - */ - public handoverCreateChallenge(request: google.protobuf.IEmpty): Promise<pruntime_rpc.HandoverChallenge>; - - /** - * Calls HandoverStart. - * @param request HandoverChallengeResponse message or plain object - * @param callback Node-style callback called with the error, if any, and HandoverWorkerKey - */ - public handoverStart(request: pruntime_rpc.IHandoverChallengeResponse, callback: pruntime_rpc.PhactoryAPI.HandoverStartCallback): void; - - /** - * Calls HandoverStart. - * @param request HandoverChallengeResponse message or plain object - * @returns Promise - */ - public handoverStart(request: pruntime_rpc.IHandoverChallengeResponse): Promise<pruntime_rpc.HandoverWorkerKey>; - - /** - * Calls HandoverAcceptChallenge. - * @param request HandoverChallenge message or plain object - * @param callback Node-style callback called with the error, if any, and HandoverChallengeResponse - */ - public handoverAcceptChallenge(request: pruntime_rpc.IHandoverChallenge, callback: pruntime_rpc.PhactoryAPI.HandoverAcceptChallengeCallback): void; - - /** - * Calls HandoverAcceptChallenge. - * @param request HandoverChallenge message or plain object - * @returns Promise - */ - public handoverAcceptChallenge(request: pruntime_rpc.IHandoverChallenge): Promise<pruntime_rpc.HandoverChallengeResponse>; - - /** - * Calls HandoverReceive. - * @param request HandoverWorkerKey message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public handoverReceive(request: pruntime_rpc.IHandoverWorkerKey, callback: pruntime_rpc.PhactoryAPI.HandoverReceiveCallback): void; - - /** - * Calls HandoverReceive. - * @param request HandoverWorkerKey message or plain object - * @returns Promise - */ - public handoverReceive(request: pruntime_rpc.IHandoverWorkerKey): Promise<google.protobuf.Empty>; - - /** - * Calls ConfigNetwork. - * @param request NetworkConfig message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public configNetwork(request: pruntime_rpc.INetworkConfig, callback: pruntime_rpc.PhactoryAPI.ConfigNetworkCallback): void; - - /** - * Calls ConfigNetwork. - * @param request NetworkConfig message or plain object - * @returns Promise - */ - public configNetwork(request: pruntime_rpc.INetworkConfig): Promise<google.protobuf.Empty>; - - /** - * Calls HttpFetch. - * @param request HttpRequest message or plain object - * @param callback Node-style callback called with the error, if any, and HttpResponse - */ - public httpFetch(request: pruntime_rpc.IHttpRequest, callback: pruntime_rpc.PhactoryAPI.HttpFetchCallback): void; - - /** - * Calls HttpFetch. - * @param request HttpRequest message or plain object - * @returns Promise - */ - public httpFetch(request: pruntime_rpc.IHttpRequest): Promise<pruntime_rpc.HttpResponse>; - } - - namespace PhactoryAPI { - - /** - * Callback as used by {@link pruntime_rpc.PhactoryAPI#getInfo}. - * @param error Error, if any - * @param [response] PhactoryInfo - */ - type GetInfoCallback = (error: (Error|null), response?: pruntime_rpc.PhactoryInfo) => void; - - /** - * Callback as used by {@link pruntime_rpc.PhactoryAPI#syncHeader}. - * @param error Error, if any - * @param [response] SyncedTo - */ - type SyncHeaderCallback = (error: (Error|null), response?: pruntime_rpc.SyncedTo) => void; - - /** - * Callback as used by {@link pruntime_rpc.PhactoryAPI#syncParaHeader}. - * @param error Error, if any - * @param [response] SyncedTo - */ - type SyncParaHeaderCallback = (error: (Error|null), response?: pruntime_rpc.SyncedTo) => void; - - /** - * Callback as used by {@link pruntime_rpc.PhactoryAPI#syncCombinedHeaders}. - * @param error Error, if any - * @param [response] HeadersSyncedTo - */ - type SyncCombinedHeadersCallback = (error: (Error|null), response?: pruntime_rpc.HeadersSyncedTo) => void; - - /** - * Callback as used by {@link pruntime_rpc.PhactoryAPI#dispatchBlocks}. - * @param error Error, if any - * @param [response] SyncedTo - */ - type DispatchBlocksCallback = (error: (Error|null), response?: pruntime_rpc.SyncedTo) => void; - - /** - * Callback as used by {@link pruntime_rpc.PhactoryAPI#initRuntime}. - * @param error Error, if any - * @param [response] InitRuntimeResponse - */ - type InitRuntimeCallback = (error: (Error|null), response?: pruntime_rpc.InitRuntimeResponse) => void; - - /** - * Callback as used by {@link pruntime_rpc.PhactoryAPI#getRuntimeInfo}. - * @param error Error, if any - * @param [response] InitRuntimeResponse - */ - type GetRuntimeInfoCallback = (error: (Error|null), response?: pruntime_rpc.InitRuntimeResponse) => void; - - /** - * Callback as used by {@link pruntime_rpc.PhactoryAPI#getEgressMessages}. - * @param error Error, if any - * @param [response] GetEgressMessagesResponse - */ - type GetEgressMessagesCallback = (error: (Error|null), response?: pruntime_rpc.GetEgressMessagesResponse) => void; - - /** - * Callback as used by {@link pruntime_rpc.PhactoryAPI#contractQuery}. - * @param error Error, if any - * @param [response] ContractQueryResponse - */ - type ContractQueryCallback = (error: (Error|null), response?: pruntime_rpc.ContractQueryResponse) => void; - - /** - * Callback as used by {@link pruntime_rpc.PhactoryAPI#getWorkerState}. - * @param error Error, if any - * @param [response] WorkerState - */ - type GetWorkerStateCallback = (error: (Error|null), response?: pruntime_rpc.WorkerState) => void; - - /** - * Callback as used by {@link pruntime_rpc.PhactoryAPI#addEndpoint}. - * @param error Error, if any - * @param [response] GetEndpointResponse - */ - type AddEndpointCallback = (error: (Error|null), response?: pruntime_rpc.GetEndpointResponse) => void; - - /** - * Callback as used by {@link pruntime_rpc.PhactoryAPI#refreshEndpointSigningTime}. - * @param error Error, if any - * @param [response] GetEndpointResponse - */ - type RefreshEndpointSigningTimeCallback = (error: (Error|null), response?: pruntime_rpc.GetEndpointResponse) => void; - - /** - * Callback as used by {@link pruntime_rpc.PhactoryAPI#getEndpointInfo}. - * @param error Error, if any - * @param [response] GetEndpointResponse - */ - type GetEndpointInfoCallback = (error: (Error|null), response?: pruntime_rpc.GetEndpointResponse) => void; - - /** - * Callback as used by {@link pruntime_rpc.PhactoryAPI#signEndpointInfo}. - * @param error Error, if any - * @param [response] GetEndpointResponse - */ - type SignEndpointInfoCallback = (error: (Error|null), response?: pruntime_rpc.GetEndpointResponse) => void; - - /** - * Callback as used by {@link pruntime_rpc.PhactoryAPI#derivePhalaI2pKey}. - * @param error Error, if any - * @param [response] DerivePhalaI2pKeyResponse - */ - type DerivePhalaI2pKeyCallback = (error: (Error|null), response?: pruntime_rpc.DerivePhalaI2pKeyResponse) => void; - - /** - * Callback as used by {@link pruntime_rpc.PhactoryAPI#echo}. - * @param error Error, if any - * @param [response] EchoMessage - */ - type EchoCallback = (error: (Error|null), response?: pruntime_rpc.EchoMessage) => void; - - /** - * Callback as used by {@link pruntime_rpc.PhactoryAPI#handoverCreateChallenge}. - * @param error Error, if any - * @param [response] HandoverChallenge - */ - type HandoverCreateChallengeCallback = (error: (Error|null), response?: pruntime_rpc.HandoverChallenge) => void; - - /** - * Callback as used by {@link pruntime_rpc.PhactoryAPI#handoverStart}. - * @param error Error, if any - * @param [response] HandoverWorkerKey - */ - type HandoverStartCallback = (error: (Error|null), response?: pruntime_rpc.HandoverWorkerKey) => void; - - /** - * Callback as used by {@link pruntime_rpc.PhactoryAPI#handoverAcceptChallenge}. - * @param error Error, if any - * @param [response] HandoverChallengeResponse - */ - type HandoverAcceptChallengeCallback = (error: (Error|null), response?: pruntime_rpc.HandoverChallengeResponse) => void; - - /** - * Callback as used by {@link pruntime_rpc.PhactoryAPI#handoverReceive}. - * @param error Error, if any - * @param [response] Empty - */ - type HandoverReceiveCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link pruntime_rpc.PhactoryAPI#configNetwork}. - * @param error Error, if any - * @param [response] Empty - */ - type ConfigNetworkCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link pruntime_rpc.PhactoryAPI#httpFetch}. - * @param error Error, if any - * @param [response] HttpResponse - */ - type HttpFetchCallback = (error: (Error|null), response?: pruntime_rpc.HttpResponse) => void; - } - - /** Properties of a PhactoryInfo. */ - interface IPhactoryInfo { - - /** PhactoryInfo initialized */ - initialized?: (boolean|null); + /** PhactoryInfo gatekeeper */ + gatekeeper?: pruntime_rpc.IGatekeeperStatus | null; - /** PhactoryInfo registered */ - registered?: (boolean|null); + /** PhactoryInfo version */ + version?: string | null; - /** PhactoryInfo genesisBlockHash */ - genesisBlockHash?: (string|null); + /** PhactoryInfo gitRevision */ + gitRevision?: string | null; - /** PhactoryInfo publicKey */ - publicKey?: (string|null); + /** PhactoryInfo runningSideTasks */ + runningSideTasks?: number | Long | null; - /** PhactoryInfo ecdhPublicKey */ - ecdhPublicKey?: (string|null); + /** PhactoryInfo memoryUsage */ + memoryUsage?: pruntime_rpc.IMemoryUsage | null; - /** PhactoryInfo headernum */ - headernum?: (number|null); + /** PhactoryInfo waitingForParaheaders */ + waitingForParaheaders?: boolean | null; - /** PhactoryInfo paraHeadernum */ - paraHeadernum?: (number|null); + /** PhactoryInfo networkStatus */ + networkStatus?: pruntime_rpc.INetworkStatus | null; - /** PhactoryInfo blocknum */ - blocknum?: (number|null); + /** PhactoryInfo system */ + system?: pruntime_rpc.ISystemInfo | null; + } - /** PhactoryInfo stateRoot */ - stateRoot?: (string|null); + /** Represents a PhactoryInfo. */ + class PhactoryInfo implements IPhactoryInfo { + /** + * Constructs a new PhactoryInfo. + * @param [properties] Properties to set + */ + constructor(properties?: pruntime_rpc.IPhactoryInfo); - /** PhactoryInfo devMode */ - devMode?: (boolean|null); + /** PhactoryInfo initialized. */ + public initialized: boolean; - /** PhactoryInfo pendingMessages */ - pendingMessages?: (number|Long|null); - - /** PhactoryInfo score */ - score?: (number|Long|null); - - /** PhactoryInfo gatekeeper */ - gatekeeper?: (pruntime_rpc.IGatekeeperStatus|null); - - /** PhactoryInfo version */ - version?: (string|null); - - /** PhactoryInfo gitRevision */ - gitRevision?: (string|null); - - /** PhactoryInfo runningSideTasks */ - runningSideTasks?: (number|Long|null); - - /** PhactoryInfo memoryUsage */ - memoryUsage?: (pruntime_rpc.IMemoryUsage|null); - - /** PhactoryInfo waitingForParaheaders */ - waitingForParaheaders?: (boolean|null); - - /** PhactoryInfo networkStatus */ - networkStatus?: (pruntime_rpc.INetworkStatus|null); - - /** PhactoryInfo system */ - system?: (pruntime_rpc.ISystemInfo|null); - } + /** PhactoryInfo registered. */ + public registered: boolean; - /** Represents a PhactoryInfo. */ - class PhactoryInfo implements IPhactoryInfo { + /** PhactoryInfo genesisBlockHash. */ + public genesisBlockHash?: string | null; + + /** PhactoryInfo publicKey. */ + public publicKey?: string | null; + + /** PhactoryInfo ecdhPublicKey. */ + public ecdhPublicKey?: string | null; - /** - * Constructs a new PhactoryInfo. - * @param [properties] Properties to set - */ - constructor(properties?: pruntime_rpc.IPhactoryInfo); + /** PhactoryInfo headernum. */ + public headernum: number; - /** PhactoryInfo initialized. */ - public initialized: boolean; + /** PhactoryInfo paraHeadernum. */ + public paraHeadernum: number; + + /** PhactoryInfo blocknum. */ + public blocknum: number; - /** PhactoryInfo registered. */ - public registered: boolean; - - /** PhactoryInfo genesisBlockHash. */ - public genesisBlockHash?: (string|null); - - /** PhactoryInfo publicKey. */ - public publicKey?: (string|null); - - /** PhactoryInfo ecdhPublicKey. */ - public ecdhPublicKey?: (string|null); - - /** PhactoryInfo headernum. */ - public headernum: number; - - /** PhactoryInfo paraHeadernum. */ - public paraHeadernum: number; - - /** PhactoryInfo blocknum. */ - public blocknum: number; - - /** PhactoryInfo stateRoot. */ - public stateRoot: string; - - /** PhactoryInfo devMode. */ - public devMode: boolean; - - /** PhactoryInfo pendingMessages. */ - public pendingMessages: (number|Long); - - /** PhactoryInfo score. */ - public score: (number|Long); - - /** PhactoryInfo gatekeeper. */ - public gatekeeper?: (pruntime_rpc.IGatekeeperStatus|null); - - /** PhactoryInfo version. */ - public version: string; - - /** PhactoryInfo gitRevision. */ - public gitRevision: string; - - /** PhactoryInfo runningSideTasks. */ - public runningSideTasks: (number|Long); - - /** PhactoryInfo memoryUsage. */ - public memoryUsage?: (pruntime_rpc.IMemoryUsage|null); - - /** PhactoryInfo waitingForParaheaders. */ - public waitingForParaheaders: boolean; - - /** PhactoryInfo networkStatus. */ - public networkStatus?: (pruntime_rpc.INetworkStatus|null); - - /** PhactoryInfo system. */ - public system?: (pruntime_rpc.ISystemInfo|null); - - /** PhactoryInfo _genesisBlockHash. */ - public _genesisBlockHash?: "genesisBlockHash"; - - /** PhactoryInfo _publicKey. */ - public _publicKey?: "publicKey"; - - /** PhactoryInfo _ecdhPublicKey. */ - public _ecdhPublicKey?: "ecdhPublicKey"; - - /** - * Creates a new PhactoryInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns PhactoryInfo instance - */ - public static create(properties?: pruntime_rpc.IPhactoryInfo): pruntime_rpc.PhactoryInfo; - - /** - * Encodes the specified PhactoryInfo message. Does not implicitly {@link pruntime_rpc.PhactoryInfo.verify|verify} messages. - * @param message PhactoryInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pruntime_rpc.IPhactoryInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PhactoryInfo message, length delimited. Does not implicitly {@link pruntime_rpc.PhactoryInfo.verify|verify} messages. - * @param message PhactoryInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pruntime_rpc.IPhactoryInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PhactoryInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PhactoryInfo - * @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.PhactoryInfo; - - /** - * Decodes a PhactoryInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PhactoryInfo - * @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.PhactoryInfo; - - /** - * Verifies a PhactoryInfo 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 PhactoryInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PhactoryInfo - */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.PhactoryInfo; - - /** - * Creates a plain object from a PhactoryInfo message. Also converts values to other types if specified. - * @param message PhactoryInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pruntime_rpc.PhactoryInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PhactoryInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a SystemInfo. */ - interface ISystemInfo { - - /** SystemInfo registered */ - registered?: (boolean|null); - - /** SystemInfo publicKey */ - publicKey?: (string|null); - - /** SystemInfo ecdhPublicKey */ - ecdhPublicKey?: (string|null); - - /** SystemInfo gatekeeper */ - gatekeeper?: (pruntime_rpc.IGatekeeperStatus|null); - - /** SystemInfo numberOfClusters */ - numberOfClusters?: (number|Long|null); - - /** SystemInfo numberOfContracts */ - numberOfContracts?: (number|Long|null); - - /** SystemInfo consensusVersion */ - consensusVersion?: (number|null); - - /** SystemInfo maxSupportedConsensusVersion */ - maxSupportedConsensusVersion?: (number|null); - } - - /** Represents a SystemInfo. */ - class SystemInfo implements ISystemInfo { - - /** - * Constructs a new SystemInfo. - * @param [properties] Properties to set - */ - constructor(properties?: pruntime_rpc.ISystemInfo); - - /** SystemInfo registered. */ - public registered: boolean; - - /** SystemInfo publicKey. */ - public publicKey: string; - - /** SystemInfo ecdhPublicKey. */ - public ecdhPublicKey: string; - - /** SystemInfo gatekeeper. */ - public gatekeeper?: (pruntime_rpc.IGatekeeperStatus|null); - - /** SystemInfo numberOfClusters. */ - public numberOfClusters: (number|Long); - - /** SystemInfo numberOfContracts. */ - public numberOfContracts: (number|Long); - - /** SystemInfo consensusVersion. */ - public consensusVersion: number; - - /** SystemInfo maxSupportedConsensusVersion. */ - public maxSupportedConsensusVersion: number; - - /** - * Creates a new SystemInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns SystemInfo instance - */ - public static create(properties?: pruntime_rpc.ISystemInfo): pruntime_rpc.SystemInfo; - - /** - * Encodes the specified SystemInfo message. Does not implicitly {@link pruntime_rpc.SystemInfo.verify|verify} messages. - * @param message SystemInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pruntime_rpc.ISystemInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SystemInfo message, length delimited. Does not implicitly {@link pruntime_rpc.SystemInfo.verify|verify} messages. - * @param message SystemInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pruntime_rpc.ISystemInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SystemInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SystemInfo - * @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.SystemInfo; - - /** - * Decodes a SystemInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SystemInfo - * @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.SystemInfo; - - /** - * Verifies a SystemInfo 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 SystemInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SystemInfo - */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.SystemInfo; - - /** - * Creates a plain object from a SystemInfo message. Also converts values to other types if specified. - * @param message SystemInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pruntime_rpc.SystemInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SystemInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** GatekeeperRole enum. */ - enum GatekeeperRole { - None = 0, - Dummy = 1, - Active = 2 - } - - /** Properties of a GatekeeperStatus. */ - interface IGatekeeperStatus { - - /** GatekeeperStatus role */ - role?: (pruntime_rpc.GatekeeperRole|null); - - /** GatekeeperStatus masterPublicKey */ - masterPublicKey?: (string|null); - } - - /** Represents a GatekeeperStatus. */ - class GatekeeperStatus implements IGatekeeperStatus { - - /** - * Constructs a new GatekeeperStatus. - * @param [properties] Properties to set - */ - constructor(properties?: pruntime_rpc.IGatekeeperStatus); - - /** GatekeeperStatus role. */ - public role: pruntime_rpc.GatekeeperRole; - - /** GatekeeperStatus masterPublicKey. */ - public masterPublicKey: string; - - /** - * Creates a new GatekeeperStatus instance using the specified properties. - * @param [properties] Properties to set - * @returns GatekeeperStatus instance - */ - public static create(properties?: pruntime_rpc.IGatekeeperStatus): pruntime_rpc.GatekeeperStatus; - - /** - * Encodes the specified GatekeeperStatus message. Does not implicitly {@link pruntime_rpc.GatekeeperStatus.verify|verify} messages. - * @param message GatekeeperStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pruntime_rpc.IGatekeeperStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GatekeeperStatus message, length delimited. Does not implicitly {@link pruntime_rpc.GatekeeperStatus.verify|verify} messages. - * @param message GatekeeperStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pruntime_rpc.IGatekeeperStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GatekeeperStatus message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GatekeeperStatus - * @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.GatekeeperStatus; - - /** - * Decodes a GatekeeperStatus message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GatekeeperStatus - * @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.GatekeeperStatus; - - /** - * Verifies a GatekeeperStatus 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 GatekeeperStatus message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GatekeeperStatus - */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.GatekeeperStatus; - - /** - * Creates a plain object from a GatekeeperStatus message. Also converts values to other types if specified. - * @param message GatekeeperStatus - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pruntime_rpc.GatekeeperStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GatekeeperStatus to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MemoryUsage. */ - interface IMemoryUsage { - - /** MemoryUsage rustUsed */ - rustUsed?: (number|Long|null); - - /** MemoryUsage rustPeakUsed */ - rustPeakUsed?: (number|Long|null); - - /** MemoryUsage totalPeakUsed */ - totalPeakUsed?: (number|Long|null); - } - - /** Represents a MemoryUsage. */ - class MemoryUsage implements IMemoryUsage { - - /** - * Constructs a new MemoryUsage. - * @param [properties] Properties to set - */ - constructor(properties?: pruntime_rpc.IMemoryUsage); - - /** MemoryUsage rustUsed. */ - public rustUsed: (number|Long); - - /** MemoryUsage rustPeakUsed. */ - public rustPeakUsed: (number|Long); - - /** MemoryUsage totalPeakUsed. */ - public totalPeakUsed: (number|Long); - - /** - * Creates a new MemoryUsage instance using the specified properties. - * @param [properties] Properties to set - * @returns MemoryUsage instance - */ - public static create(properties?: pruntime_rpc.IMemoryUsage): pruntime_rpc.MemoryUsage; - - /** - * Encodes the specified MemoryUsage message. Does not implicitly {@link pruntime_rpc.MemoryUsage.verify|verify} messages. - * @param message MemoryUsage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pruntime_rpc.IMemoryUsage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MemoryUsage message, length delimited. Does not implicitly {@link pruntime_rpc.MemoryUsage.verify|verify} messages. - * @param message MemoryUsage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pruntime_rpc.IMemoryUsage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MemoryUsage message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MemoryUsage - * @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.MemoryUsage; - - /** - * Decodes a MemoryUsage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MemoryUsage - * @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.MemoryUsage; - - /** - * Verifies a MemoryUsage 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 MemoryUsage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MemoryUsage - */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.MemoryUsage; - - /** - * Creates a plain object from a MemoryUsage message. Also converts values to other types if specified. - * @param message MemoryUsage - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pruntime_rpc.MemoryUsage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MemoryUsage to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a SyncedTo. */ - interface ISyncedTo { - - /** SyncedTo syncedTo */ - syncedTo?: (number|null); - } - - /** Represents a SyncedTo. */ - class SyncedTo implements ISyncedTo { - - /** - * Constructs a new SyncedTo. - * @param [properties] Properties to set - */ - constructor(properties?: pruntime_rpc.ISyncedTo); - - /** SyncedTo syncedTo. */ - public syncedTo: number; - - /** - * Creates a new SyncedTo instance using the specified properties. - * @param [properties] Properties to set - * @returns SyncedTo instance - */ - public static create(properties?: pruntime_rpc.ISyncedTo): pruntime_rpc.SyncedTo; - - /** - * Encodes the specified SyncedTo message. Does not implicitly {@link pruntime_rpc.SyncedTo.verify|verify} messages. - * @param message SyncedTo 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; - - /** - * 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 - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pruntime_rpc.ISyncedTo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SyncedTo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SyncedTo - * @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; - - /** - * Decodes a SyncedTo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SyncedTo - * @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; - - /** - * Verifies a SyncedTo 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. - * @param object Plain object - * @returns SyncedTo - */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.SyncedTo; - - /** - * Creates a plain object from a SyncedTo message. Also converts values to other types if specified. - * @param message SyncedTo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pruntime_rpc.SyncedTo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SyncedTo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a HeadersToSync. */ - interface IHeadersToSync { - - /** HeadersToSync encodedHeaders */ - encodedHeaders?: (Uint8Array|null); - - /** HeadersToSync encodedAuthoritySetChange */ - encodedAuthoritySetChange?: (Uint8Array|null); - } - - /** Represents a HeadersToSync. */ - class HeadersToSync implements IHeadersToSync { - - /** - * Constructs a new HeadersToSync. - * @param [properties] Properties to set - */ - constructor(properties?: pruntime_rpc.IHeadersToSync); - - /** HeadersToSync encodedHeaders. */ - public encodedHeaders: Uint8Array; - - /** HeadersToSync encodedAuthoritySetChange. */ - public encodedAuthoritySetChange?: (Uint8Array|null); - - /** HeadersToSync _encodedAuthoritySetChange. */ - public _encodedAuthoritySetChange?: "encodedAuthoritySetChange"; - - /** - * Creates a new HeadersToSync instance using the specified properties. - * @param [properties] Properties to set - * @returns HeadersToSync instance - */ - public static create(properties?: pruntime_rpc.IHeadersToSync): pruntime_rpc.HeadersToSync; - - /** - * Encodes the specified HeadersToSync message. Does not implicitly {@link pruntime_rpc.HeadersToSync.verify|verify} messages. - * @param message HeadersToSync 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; - - /** - * 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 - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pruntime_rpc.IHeadersToSync, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HeadersToSync message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HeadersToSync - * @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; - - /** - * Decodes a HeadersToSync message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HeadersToSync - * @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; - - /** - * Verifies a HeadersToSync 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. - * @param object Plain object - * @returns HeadersToSync - */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.HeadersToSync; - - /** - * Creates a plain object from a HeadersToSync message. Also converts values to other types if specified. - * @param message HeadersToSync - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pruntime_rpc.HeadersToSync, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HeadersToSync to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ParaHeadersToSync. */ - interface IParaHeadersToSync { - - /** ParaHeadersToSync encodedHeaders */ - encodedHeaders?: (Uint8Array|null); - - /** ParaHeadersToSync proof */ - proof?: (Uint8Array[]|null); - } - - /** Represents a ParaHeadersToSync. */ - class ParaHeadersToSync implements IParaHeadersToSync { - - /** - * Constructs a new ParaHeadersToSync. - * @param [properties] Properties to set - */ - constructor(properties?: pruntime_rpc.IParaHeadersToSync); - - /** ParaHeadersToSync encodedHeaders. */ - public encodedHeaders: Uint8Array; - - /** ParaHeadersToSync proof. */ - public proof: Uint8Array[]; - - /** - * Creates a new ParaHeadersToSync instance using the specified properties. - * @param [properties] Properties to set - * @returns ParaHeadersToSync instance - */ - public static create(properties?: pruntime_rpc.IParaHeadersToSync): pruntime_rpc.ParaHeadersToSync; - - /** - * Encodes the specified ParaHeadersToSync message. Does not implicitly {@link pruntime_rpc.ParaHeadersToSync.verify|verify} messages. - * @param message ParaHeadersToSync 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; - - /** - * 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 - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pruntime_rpc.IParaHeadersToSync, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ParaHeadersToSync message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ParaHeadersToSync - * @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; - - /** - * Decodes a ParaHeadersToSync message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ParaHeadersToSync - * @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; - - /** - * Verifies a ParaHeadersToSync 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. - * @param object Plain object - * @returns ParaHeadersToSync - */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.ParaHeadersToSync; - - /** - * Creates a plain object from a ParaHeadersToSync message. Also converts values to other types if specified. - * @param message ParaHeadersToSync - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pruntime_rpc.ParaHeadersToSync, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ParaHeadersToSync to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a CombinedHeadersToSync. */ - interface ICombinedHeadersToSync { - - /** CombinedHeadersToSync encodedRelaychainHeaders */ - encodedRelaychainHeaders?: (Uint8Array|null); - - /** CombinedHeadersToSync authoritySetChange */ - authoritySetChange?: (Uint8Array|null); - - /** CombinedHeadersToSync encodedParachainHeaders */ - encodedParachainHeaders?: (Uint8Array|null); - - /** CombinedHeadersToSync proof */ - proof?: (Uint8Array[]|null); - } + /** PhactoryInfo stateRoot. */ + public stateRoot: string; - /** Represents a CombinedHeadersToSync. */ - class CombinedHeadersToSync implements ICombinedHeadersToSync { - - /** - * Constructs a new CombinedHeadersToSync. - * @param [properties] Properties to set - */ - constructor(properties?: pruntime_rpc.ICombinedHeadersToSync); - - /** CombinedHeadersToSync encodedRelaychainHeaders. */ - public encodedRelaychainHeaders: Uint8Array; - - /** CombinedHeadersToSync authoritySetChange. */ - public authoritySetChange?: (Uint8Array|null); - - /** CombinedHeadersToSync encodedParachainHeaders. */ - public encodedParachainHeaders: Uint8Array; - - /** CombinedHeadersToSync proof. */ - public proof: Uint8Array[]; - - /** CombinedHeadersToSync _authoritySetChange. */ - public _authoritySetChange?: "authoritySetChange"; - - /** - * Creates a new CombinedHeadersToSync instance using the specified properties. - * @param [properties] Properties to set - * @returns CombinedHeadersToSync instance - */ - public static create(properties?: pruntime_rpc.ICombinedHeadersToSync): pruntime_rpc.CombinedHeadersToSync; - - /** - * Encodes the specified CombinedHeadersToSync message. Does not implicitly {@link pruntime_rpc.CombinedHeadersToSync.verify|verify} messages. - * @param message CombinedHeadersToSync 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; - - /** - * 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 - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pruntime_rpc.ICombinedHeadersToSync, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CombinedHeadersToSync message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CombinedHeadersToSync - * @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; - - /** - * Decodes a CombinedHeadersToSync message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CombinedHeadersToSync - * @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; - - /** - * Verifies a CombinedHeadersToSync 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. - * @param object Plain object - * @returns CombinedHeadersToSync - */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.CombinedHeadersToSync; - - /** - * Creates a plain object from a CombinedHeadersToSync message. Also converts values to other types if specified. - * @param message CombinedHeadersToSync - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pruntime_rpc.CombinedHeadersToSync, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CombinedHeadersToSync to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a HeadersSyncedTo. */ - interface IHeadersSyncedTo { - - /** HeadersSyncedTo relaychainSyncedTo */ - relaychainSyncedTo?: (number|null); - - /** HeadersSyncedTo parachainSyncedTo */ - parachainSyncedTo?: (number|null); - } - - /** Represents a HeadersSyncedTo. */ - class HeadersSyncedTo implements IHeadersSyncedTo { - - /** - * Constructs a new HeadersSyncedTo. - * @param [properties] Properties to set - */ - constructor(properties?: pruntime_rpc.IHeadersSyncedTo); - - /** HeadersSyncedTo relaychainSyncedTo. */ - public relaychainSyncedTo: number; - - /** HeadersSyncedTo parachainSyncedTo. */ - public parachainSyncedTo: number; - - /** - * Creates a new HeadersSyncedTo instance using the specified properties. - * @param [properties] Properties to set - * @returns HeadersSyncedTo instance - */ - public static create(properties?: pruntime_rpc.IHeadersSyncedTo): pruntime_rpc.HeadersSyncedTo; - - /** - * Encodes the specified HeadersSyncedTo message. Does not implicitly {@link pruntime_rpc.HeadersSyncedTo.verify|verify} messages. - * @param message HeadersSyncedTo 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; - - /** - * 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 - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pruntime_rpc.IHeadersSyncedTo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HeadersSyncedTo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HeadersSyncedTo - * @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; - - /** - * Decodes a HeadersSyncedTo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HeadersSyncedTo - * @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; - - /** - * Verifies a HeadersSyncedTo 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. - * @param object Plain object - * @returns HeadersSyncedTo - */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.HeadersSyncedTo; - - /** - * Creates a plain object from a HeadersSyncedTo message. Also converts values to other types if specified. - * @param message HeadersSyncedTo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pruntime_rpc.HeadersSyncedTo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HeadersSyncedTo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Blocks. */ - interface IBlocks { - - /** 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 }; - } - - /** 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); - } - - /** 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 _debugSetKey. */ - public _debugSetKey?: "debugSetKey"; - - /** InitRuntimeRequest _encodedOperator. */ - public _encodedOperator?: "encodedOperator"; - - /** - * 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 }; - } - - /** 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 }; - } - - /** 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 }; - } - - /** Properties of an Attestation. */ - interface IAttestation { - - /** Attestation version */ - version?: (number|null); - - /** Attestation provider */ - provider?: (string|null); - - /** Attestation payload */ - payload?: (pruntime_rpc.IAttestationReport|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 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 }; - } - - /** 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 }; - } - - /** 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 }; - } - - /** 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 }; - } - - /** 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 }; - } - - /** 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 }; - } + /** PhactoryInfo devMode. */ + public devMode: boolean; + + /** PhactoryInfo pendingMessages. */ + public pendingMessages: number | Long; - /** SignatureType enum. */ - enum SignatureType { - Ed25519 = 0, - Sr25519 = 1, - Ecdsa = 2, - Ed25519WrapBytes = 3, - Sr25519WrapBytes = 4, - EcdsaWrapBytes = 5 - } - - /** 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 }; - } - - /** 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 }; - } - - /** 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 }; - } - - /** Properties of a WorkerState. */ - interface IWorkerState { - - /** WorkerState registered */ - registered?: (boolean|null); - - /** WorkerState unresponsive */ - unresponsive?: (boolean|null); - - /** WorkerState benchState */ - benchState?: (pruntime_rpc.IBenchState|null); - - /** WorkerState miningState */ - miningState?: (pruntime_rpc.IMiningState|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 miningState. */ - public miningState?: (pruntime_rpc.IMiningState|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 }; - } - - /** 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 }; - } - - /** 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 }; - } - - /** 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 }; - } - - /** 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 }; - } - - /** Properties of a MiningState. */ - interface IMiningState { - - /** MiningState sessionId */ - sessionId?: (number|null); - - /** MiningState paused */ - paused?: (boolean|null); - - /** MiningState startTime */ - startTime?: (number|Long|null); - } - - /** Represents a MiningState. */ - class MiningState implements IMiningState { - - /** - * Constructs a new MiningState. - * @param [properties] Properties to set - */ - constructor(properties?: pruntime_rpc.IMiningState); - - /** MiningState sessionId. */ - public sessionId: number; - - /** MiningState paused. */ - public paused: boolean; - - /** MiningState startTime. */ - public startTime: (number|Long); - - /** - * Creates a new MiningState instance using the specified properties. - * @param [properties] Properties to set - * @returns MiningState instance - */ - public static create(properties?: pruntime_rpc.IMiningState): pruntime_rpc.MiningState; - - /** - * Encodes the specified MiningState message. Does not implicitly {@link pruntime_rpc.MiningState.verify|verify} messages. - * @param message MiningState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pruntime_rpc.IMiningState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MiningState message, length delimited. Does not implicitly {@link pruntime_rpc.MiningState.verify|verify} messages. - * @param message MiningState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pruntime_rpc.IMiningState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MiningState message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MiningState - * @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.MiningState; - - /** - * Decodes a MiningState message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MiningState - * @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.MiningState; - - /** - * Verifies a MiningState 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 MiningState message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MiningState - */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.MiningState; - - /** - * Creates a plain object from a MiningState message. Also converts values to other types if specified. - * @param message MiningState - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pruntime_rpc.MiningState, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MiningState to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** 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 }; - } - - /** 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 }; - } - - /** 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 }; - } - - /** 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 }; - } - - /** 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 }; - } - - /** 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 }; - } - - /** 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 }; - } - - /** Properties of a NetworkStatus. */ - interface INetworkStatus { - - /** NetworkStatus publicRpcPort */ - publicRpcPort?: (number|null); - - /** NetworkStatus config */ - config?: (pruntime_rpc.INetworkConfig|null); - } - - /** Represents a NetworkStatus. */ - class NetworkStatus implements INetworkStatus { - - /** - * Constructs a new NetworkStatus. - * @param [properties] Properties to set - */ - constructor(properties?: pruntime_rpc.INetworkStatus); - - /** NetworkStatus publicRpcPort. */ - public publicRpcPort?: (number|null); - - /** NetworkStatus config. */ - public config?: (pruntime_rpc.INetworkConfig|null); - - /** NetworkStatus _publicRpcPort. */ - public _publicRpcPort?: "publicRpcPort"; - - /** NetworkStatus _config. */ - public _config?: "config"; - - /** - * Creates a new NetworkStatus instance using the specified properties. - * @param [properties] Properties to set - * @returns NetworkStatus instance - */ - public static create(properties?: pruntime_rpc.INetworkStatus): pruntime_rpc.NetworkStatus; - - /** - * Encodes the specified NetworkStatus message. Does not implicitly {@link pruntime_rpc.NetworkStatus.verify|verify} messages. - * @param message NetworkStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pruntime_rpc.INetworkStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NetworkStatus message, length delimited. Does not implicitly {@link pruntime_rpc.NetworkStatus.verify|verify} messages. - * @param message NetworkStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pruntime_rpc.INetworkStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NetworkStatus message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NetworkStatus - * @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.NetworkStatus; - - /** - * Decodes a NetworkStatus message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NetworkStatus - * @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.NetworkStatus; - - /** - * Verifies a NetworkStatus 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 NetworkStatus message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NetworkStatus - */ - public static fromObject(object: { [k: string]: any }): pruntime_rpc.NetworkStatus; - - /** - * Creates a plain object from a NetworkStatus message. Also converts values to other types if specified. - * @param message NetworkStatus - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pruntime_rpc.NetworkStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NetworkStatus to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** 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 }; - } - - /** 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 }; - } - - /** 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 }; - } - - /** 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 }; - } + /** PhactoryInfo score. */ + public score: number | Long; + + /** PhactoryInfo gatekeeper. */ + public gatekeeper?: pruntime_rpc.IGatekeeperStatus | null; + + /** PhactoryInfo version. */ + public version: string; + + /** PhactoryInfo gitRevision. */ + public gitRevision: string; + + /** PhactoryInfo runningSideTasks. */ + public runningSideTasks: number | Long; + + /** PhactoryInfo memoryUsage. */ + public memoryUsage?: pruntime_rpc.IMemoryUsage | null; + + /** PhactoryInfo waitingForParaheaders. */ + public waitingForParaheaders: boolean; + + /** PhactoryInfo networkStatus. */ + public networkStatus?: pruntime_rpc.INetworkStatus | null; + + /** PhactoryInfo system. */ + public system?: pruntime_rpc.ISystemInfo | null; + + /** PhactoryInfo _genesisBlockHash. */ + public _genesisBlockHash?: "genesisBlockHash"; + + /** PhactoryInfo _publicKey. */ + public _publicKey?: "publicKey"; + + /** PhactoryInfo _ecdhPublicKey. */ + public _ecdhPublicKey?: "ecdhPublicKey"; + + /** + * Creates a new PhactoryInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns PhactoryInfo instance + */ + public static create( + properties?: pruntime_rpc.IPhactoryInfo + ): pruntime_rpc.PhactoryInfo; + + /** + * Encodes the specified PhactoryInfo message. Does not implicitly {@link pruntime_rpc.PhactoryInfo.verify|verify} messages. + * @param message PhactoryInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pruntime_rpc.IPhactoryInfo, + writer?: $protobuf.Writer + ): $protobuf.Writer; + + /** + * Encodes the specified PhactoryInfo message, length delimited. Does not implicitly {@link pruntime_rpc.PhactoryInfo.verify|verify} messages. + * @param message PhactoryInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pruntime_rpc.IPhactoryInfo, + writer?: $protobuf.Writer + ): $protobuf.Writer; + + /** + * Decodes a PhactoryInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PhactoryInfo + * @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.PhactoryInfo; + + /** + * Decodes a PhactoryInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PhactoryInfo + * @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.PhactoryInfo; + + /** + * Verifies a PhactoryInfo 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 PhactoryInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PhactoryInfo + */ + public static fromObject(object: { + [k: string]: any; + }): pruntime_rpc.PhactoryInfo; + + /** + * Creates a plain object from a PhactoryInfo message. Also converts values to other types if specified. + * @param message PhactoryInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pruntime_rpc.PhactoryInfo, + options?: $protobuf.IConversionOptions + ): { [k: string]: any }; + + /** + * Converts this PhactoryInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a SystemInfo. */ + interface ISystemInfo { + /** SystemInfo registered */ + registered?: boolean | null; + + /** SystemInfo publicKey */ + publicKey?: string | null; + + /** SystemInfo ecdhPublicKey */ + ecdhPublicKey?: string | null; + + /** SystemInfo gatekeeper */ + gatekeeper?: pruntime_rpc.IGatekeeperStatus | null; + + /** SystemInfo numberOfClusters */ + numberOfClusters?: number | Long | null; + + /** SystemInfo numberOfContracts */ + numberOfContracts?: number | Long | null; + + /** SystemInfo consensusVersion */ + consensusVersion?: number | null; + + /** SystemInfo maxSupportedConsensusVersion */ + maxSupportedConsensusVersion?: number | null; + } + + /** Represents a SystemInfo. */ + class SystemInfo implements ISystemInfo { + /** + * Constructs a new SystemInfo. + * @param [properties] Properties to set + */ + constructor(properties?: pruntime_rpc.ISystemInfo); + + /** SystemInfo registered. */ + public registered: boolean; + + /** SystemInfo publicKey. */ + public publicKey: string; + + /** SystemInfo ecdhPublicKey. */ + public ecdhPublicKey: string; + + /** SystemInfo gatekeeper. */ + public gatekeeper?: pruntime_rpc.IGatekeeperStatus | null; + + /** SystemInfo numberOfClusters. */ + public numberOfClusters: number | Long; + + /** SystemInfo numberOfContracts. */ + public numberOfContracts: number | Long; + + /** SystemInfo consensusVersion. */ + public consensusVersion: number; + + /** SystemInfo maxSupportedConsensusVersion. */ + public maxSupportedConsensusVersion: number; + + /** + * Creates a new SystemInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SystemInfo instance + */ + public static create( + properties?: pruntime_rpc.ISystemInfo + ): pruntime_rpc.SystemInfo; + + /** + * Encodes the specified SystemInfo message. Does not implicitly {@link pruntime_rpc.SystemInfo.verify|verify} messages. + * @param message SystemInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pruntime_rpc.ISystemInfo, + writer?: $protobuf.Writer + ): $protobuf.Writer; + + /** + * Encodes the specified SystemInfo message, length delimited. Does not implicitly {@link pruntime_rpc.SystemInfo.verify|verify} messages. + * @param message SystemInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pruntime_rpc.ISystemInfo, + writer?: $protobuf.Writer + ): $protobuf.Writer; + + /** + * Decodes a SystemInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SystemInfo + * @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.SystemInfo; + + /** + * Decodes a SystemInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SystemInfo + * @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.SystemInfo; + + /** + * Verifies a SystemInfo 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 SystemInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SystemInfo + */ + public static fromObject(object: { + [k: string]: any; + }): pruntime_rpc.SystemInfo; + + /** + * Creates a plain object from a SystemInfo message. Also converts values to other types if specified. + * @param message SystemInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pruntime_rpc.SystemInfo, + options?: $protobuf.IConversionOptions + ): { [k: string]: any }; + + /** + * Converts this SystemInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** GatekeeperRole enum. */ + enum GatekeeperRole { + None = 0, + Dummy = 1, + Active = 2, + } + + /** Properties of a GatekeeperStatus. */ + interface IGatekeeperStatus { + /** GatekeeperStatus role */ + role?: pruntime_rpc.GatekeeperRole | null; + + /** GatekeeperStatus masterPublicKey */ + masterPublicKey?: string | null; + } + + /** Represents a GatekeeperStatus. */ + class GatekeeperStatus implements IGatekeeperStatus { + /** + * Constructs a new GatekeeperStatus. + * @param [properties] Properties to set + */ + constructor(properties?: pruntime_rpc.IGatekeeperStatus); + + /** GatekeeperStatus role. */ + public role: pruntime_rpc.GatekeeperRole; + + /** GatekeeperStatus masterPublicKey. */ + public masterPublicKey: string; + + /** + * Creates a new GatekeeperStatus instance using the specified properties. + * @param [properties] Properties to set + * @returns GatekeeperStatus instance + */ + public static create( + properties?: pruntime_rpc.IGatekeeperStatus + ): pruntime_rpc.GatekeeperStatus; + + /** + * Encodes the specified GatekeeperStatus message. Does not implicitly {@link pruntime_rpc.GatekeeperStatus.verify|verify} messages. + * @param message GatekeeperStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pruntime_rpc.IGatekeeperStatus, + writer?: $protobuf.Writer + ): $protobuf.Writer; + + /** + * Encodes the specified GatekeeperStatus message, length delimited. Does not implicitly {@link pruntime_rpc.GatekeeperStatus.verify|verify} messages. + * @param message GatekeeperStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pruntime_rpc.IGatekeeperStatus, + writer?: $protobuf.Writer + ): $protobuf.Writer; + + /** + * Decodes a GatekeeperStatus message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GatekeeperStatus + * @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.GatekeeperStatus; + + /** + * Decodes a GatekeeperStatus message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GatekeeperStatus + * @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.GatekeeperStatus; + + /** + * Verifies a GatekeeperStatus 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 GatekeeperStatus message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GatekeeperStatus + */ + public static fromObject(object: { + [k: string]: any; + }): pruntime_rpc.GatekeeperStatus; + + /** + * Creates a plain object from a GatekeeperStatus message. Also converts values to other types if specified. + * @param message GatekeeperStatus + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pruntime_rpc.GatekeeperStatus, + options?: $protobuf.IConversionOptions + ): { [k: string]: any }; + + /** + * Converts this GatekeeperStatus to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MemoryUsage. */ + interface IMemoryUsage { + /** MemoryUsage rustUsed */ + rustUsed?: number | Long | null; + + /** MemoryUsage rustPeakUsed */ + rustPeakUsed?: number | Long | null; + + /** MemoryUsage totalPeakUsed */ + totalPeakUsed?: number | Long | null; + } + + /** Represents a MemoryUsage. */ + class MemoryUsage implements IMemoryUsage { + /** + * Constructs a new MemoryUsage. + * @param [properties] Properties to set + */ + constructor(properties?: pruntime_rpc.IMemoryUsage); + + /** MemoryUsage rustUsed. */ + public rustUsed: number | Long; + + /** MemoryUsage rustPeakUsed. */ + public rustPeakUsed: number | Long; + + /** MemoryUsage totalPeakUsed. */ + public totalPeakUsed: number | Long; + + /** + * Creates a new MemoryUsage instance using the specified properties. + * @param [properties] Properties to set + * @returns MemoryUsage instance + */ + public static create( + properties?: pruntime_rpc.IMemoryUsage + ): pruntime_rpc.MemoryUsage; + + /** + * Encodes the specified MemoryUsage message. Does not implicitly {@link pruntime_rpc.MemoryUsage.verify|verify} messages. + * @param message MemoryUsage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pruntime_rpc.IMemoryUsage, + writer?: $protobuf.Writer + ): $protobuf.Writer; + + /** + * Encodes the specified MemoryUsage message, length delimited. Does not implicitly {@link pruntime_rpc.MemoryUsage.verify|verify} messages. + * @param message MemoryUsage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pruntime_rpc.IMemoryUsage, + writer?: $protobuf.Writer + ): $protobuf.Writer; + + /** + * Decodes a MemoryUsage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MemoryUsage + * @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.MemoryUsage; + + /** + * Decodes a MemoryUsage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MemoryUsage + * @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.MemoryUsage; + + /** + * Verifies a MemoryUsage 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 MemoryUsage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MemoryUsage + */ + public static fromObject(object: { + [k: string]: any; + }): pruntime_rpc.MemoryUsage; + + /** + * Creates a plain object from a MemoryUsage message. Also converts values to other types if specified. + * @param message MemoryUsage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pruntime_rpc.MemoryUsage, + options?: $protobuf.IConversionOptions + ): { [k: string]: any }; + + /** + * Converts this MemoryUsage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a SyncedTo. */ + interface ISyncedTo { + /** SyncedTo syncedTo */ + syncedTo?: number | null; + } + + /** Represents a SyncedTo. */ + class SyncedTo implements ISyncedTo { + /** + * Constructs a new SyncedTo. + * @param [properties] Properties to set + */ + constructor(properties?: pruntime_rpc.ISyncedTo); + + /** SyncedTo syncedTo. */ + public syncedTo: number; + + /** + * Creates a new SyncedTo instance using the specified properties. + * @param [properties] Properties to set + * @returns SyncedTo instance + */ + public static create( + properties?: pruntime_rpc.ISyncedTo + ): pruntime_rpc.SyncedTo; + + /** + * Encodes the specified SyncedTo message. Does not implicitly {@link pruntime_rpc.SyncedTo.verify|verify} messages. + * @param message SyncedTo 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; + + /** + * 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pruntime_rpc.ISyncedTo, + writer?: $protobuf.Writer + ): $protobuf.Writer; + + /** + * Decodes a SyncedTo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SyncedTo + * @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; + + /** + * Decodes a SyncedTo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SyncedTo + * @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; + + /** + * Verifies a SyncedTo 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. + * @param object Plain object + * @returns SyncedTo + */ + public static fromObject(object: { + [k: string]: any; + }): pruntime_rpc.SyncedTo; + + /** + * Creates a plain object from a SyncedTo message. Also converts values to other types if specified. + * @param message SyncedTo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pruntime_rpc.SyncedTo, + options?: $protobuf.IConversionOptions + ): { [k: string]: any }; + + /** + * Converts this SyncedTo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a HeadersToSync. */ + interface IHeadersToSync { + /** HeadersToSync encodedHeaders */ + encodedHeaders?: Uint8Array | null; + + /** HeadersToSync encodedAuthoritySetChange */ + encodedAuthoritySetChange?: Uint8Array | null; + } + + /** Represents a HeadersToSync. */ + class HeadersToSync implements IHeadersToSync { + /** + * Constructs a new HeadersToSync. + * @param [properties] Properties to set + */ + constructor(properties?: pruntime_rpc.IHeadersToSync); + + /** HeadersToSync encodedHeaders. */ + public encodedHeaders: Uint8Array; + + /** HeadersToSync encodedAuthoritySetChange. */ + public encodedAuthoritySetChange?: Uint8Array | null; + + /** HeadersToSync _encodedAuthoritySetChange. */ + public _encodedAuthoritySetChange?: "encodedAuthoritySetChange"; + + /** + * Creates a new HeadersToSync instance using the specified properties. + * @param [properties] Properties to set + * @returns HeadersToSync instance + */ + public static create( + properties?: pruntime_rpc.IHeadersToSync + ): pruntime_rpc.HeadersToSync; + + /** + * Encodes the specified HeadersToSync message. Does not implicitly {@link pruntime_rpc.HeadersToSync.verify|verify} messages. + * @param message HeadersToSync 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; + + /** + * 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pruntime_rpc.IHeadersToSync, + writer?: $protobuf.Writer + ): $protobuf.Writer; + + /** + * Decodes a HeadersToSync message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HeadersToSync + * @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; + + /** + * Decodes a HeadersToSync message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HeadersToSync + * @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; + + /** + * Verifies a HeadersToSync 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. + * @param object Plain object + * @returns HeadersToSync + */ + public static fromObject(object: { + [k: string]: any; + }): pruntime_rpc.HeadersToSync; + + /** + * Creates a plain object from a HeadersToSync message. Also converts values to other types if specified. + * @param message HeadersToSync + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pruntime_rpc.HeadersToSync, + options?: $protobuf.IConversionOptions + ): { [k: string]: any }; + + /** + * Converts this HeadersToSync to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ParaHeadersToSync. */ + interface IParaHeadersToSync { + /** ParaHeadersToSync encodedHeaders */ + encodedHeaders?: Uint8Array | null; + + /** ParaHeadersToSync proof */ + proof?: Uint8Array[] | null; + } + + /** Represents a ParaHeadersToSync. */ + class ParaHeadersToSync implements IParaHeadersToSync { + /** + * Constructs a new ParaHeadersToSync. + * @param [properties] Properties to set + */ + constructor(properties?: pruntime_rpc.IParaHeadersToSync); + + /** ParaHeadersToSync encodedHeaders. */ + public encodedHeaders: Uint8Array; + + /** ParaHeadersToSync proof. */ + public proof: Uint8Array[]; + + /** + * Creates a new ParaHeadersToSync instance using the specified properties. + * @param [properties] Properties to set + * @returns ParaHeadersToSync instance + */ + public static create( + properties?: pruntime_rpc.IParaHeadersToSync + ): pruntime_rpc.ParaHeadersToSync; + + /** + * Encodes the specified ParaHeadersToSync message. Does not implicitly {@link pruntime_rpc.ParaHeadersToSync.verify|verify} messages. + * @param message ParaHeadersToSync 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; + + /** + * 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pruntime_rpc.IParaHeadersToSync, + writer?: $protobuf.Writer + ): $protobuf.Writer; + + /** + * Decodes a ParaHeadersToSync message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ParaHeadersToSync + * @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; + + /** + * Decodes a ParaHeadersToSync message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ParaHeadersToSync + * @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; + + /** + * Verifies a ParaHeadersToSync 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. + * @param object Plain object + * @returns ParaHeadersToSync + */ + public static fromObject(object: { + [k: string]: any; + }): pruntime_rpc.ParaHeadersToSync; + + /** + * Creates a plain object from a ParaHeadersToSync message. Also converts values to other types if specified. + * @param message ParaHeadersToSync + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pruntime_rpc.ParaHeadersToSync, + options?: $protobuf.IConversionOptions + ): { [k: string]: any }; + + /** + * Converts this ParaHeadersToSync to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CombinedHeadersToSync. */ + interface ICombinedHeadersToSync { + /** CombinedHeadersToSync encodedRelaychainHeaders */ + encodedRelaychainHeaders?: Uint8Array | null; + + /** CombinedHeadersToSync authoritySetChange */ + authoritySetChange?: Uint8Array | null; + + /** CombinedHeadersToSync encodedParachainHeaders */ + encodedParachainHeaders?: Uint8Array | null; + + /** CombinedHeadersToSync proof */ + proof?: Uint8Array[] | null; + } + + /** Represents a CombinedHeadersToSync. */ + class CombinedHeadersToSync implements ICombinedHeadersToSync { + /** + * Constructs a new CombinedHeadersToSync. + * @param [properties] Properties to set + */ + constructor(properties?: pruntime_rpc.ICombinedHeadersToSync); + + /** CombinedHeadersToSync encodedRelaychainHeaders. */ + public encodedRelaychainHeaders: Uint8Array; + + /** CombinedHeadersToSync authoritySetChange. */ + public authoritySetChange?: Uint8Array | null; + + /** CombinedHeadersToSync encodedParachainHeaders. */ + public encodedParachainHeaders: Uint8Array; + + /** CombinedHeadersToSync proof. */ + public proof: Uint8Array[]; + + /** CombinedHeadersToSync _authoritySetChange. */ + public _authoritySetChange?: "authoritySetChange"; + + /** + * Creates a new CombinedHeadersToSync instance using the specified properties. + * @param [properties] Properties to set + * @returns CombinedHeadersToSync instance + */ + public static create( + properties?: pruntime_rpc.ICombinedHeadersToSync + ): pruntime_rpc.CombinedHeadersToSync; + + /** + * Encodes the specified CombinedHeadersToSync message. Does not implicitly {@link pruntime_rpc.CombinedHeadersToSync.verify|verify} messages. + * @param message CombinedHeadersToSync 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; + + /** + * 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pruntime_rpc.ICombinedHeadersToSync, + writer?: $protobuf.Writer + ): $protobuf.Writer; + + /** + * Decodes a CombinedHeadersToSync message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CombinedHeadersToSync + * @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; + + /** + * Decodes a CombinedHeadersToSync message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CombinedHeadersToSync + * @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; + + /** + * Verifies a CombinedHeadersToSync 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. + * @param object Plain object + * @returns CombinedHeadersToSync + */ + public static fromObject(object: { + [k: string]: any; + }): pruntime_rpc.CombinedHeadersToSync; + + /** + * Creates a plain object from a CombinedHeadersToSync message. Also converts values to other types if specified. + * @param message CombinedHeadersToSync + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pruntime_rpc.CombinedHeadersToSync, + options?: $protobuf.IConversionOptions + ): { [k: string]: any }; + + /** + * Converts this CombinedHeadersToSync to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a HeadersSyncedTo. */ + interface IHeadersSyncedTo { + /** HeadersSyncedTo relaychainSyncedTo */ + relaychainSyncedTo?: number | null; + + /** HeadersSyncedTo parachainSyncedTo */ + parachainSyncedTo?: number | null; + } + + /** Represents a HeadersSyncedTo. */ + class HeadersSyncedTo implements IHeadersSyncedTo { + /** + * Constructs a new HeadersSyncedTo. + * @param [properties] Properties to set + */ + constructor(properties?: pruntime_rpc.IHeadersSyncedTo); + + /** HeadersSyncedTo relaychainSyncedTo. */ + public relaychainSyncedTo: number; + + /** HeadersSyncedTo parachainSyncedTo. */ + public parachainSyncedTo: number; + + /** + * Creates a new HeadersSyncedTo instance using the specified properties. + * @param [properties] Properties to set + * @returns HeadersSyncedTo instance + */ + public static create( + properties?: pruntime_rpc.IHeadersSyncedTo + ): pruntime_rpc.HeadersSyncedTo; + + /** + * Encodes the specified HeadersSyncedTo message. Does not implicitly {@link pruntime_rpc.HeadersSyncedTo.verify|verify} messages. + * @param message HeadersSyncedTo 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; + + /** + * 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 + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pruntime_rpc.IHeadersSyncedTo, + writer?: $protobuf.Writer + ): $protobuf.Writer; + + /** + * Decodes a HeadersSyncedTo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HeadersSyncedTo + * @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; + + /** + * Decodes a HeadersSyncedTo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HeadersSyncedTo + * @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; + + /** + * Verifies a HeadersSyncedTo 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. + * @param object Plain object + * @returns HeadersSyncedTo + */ + public static fromObject(object: { + [k: string]: any; + }): pruntime_rpc.HeadersSyncedTo; + + /** + * Creates a plain object from a HeadersSyncedTo message. Also converts values to other types if specified. + * @param message HeadersSyncedTo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pruntime_rpc.HeadersSyncedTo, + options?: $protobuf.IConversionOptions + ): { [k: string]: any }; + + /** + * Converts this HeadersSyncedTo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Blocks. */ + interface IBlocks { + /** 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 }; + } + + /** 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; + } + + /** 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 _debugSetKey. */ + public _debugSetKey?: "debugSetKey"; + + /** InitRuntimeRequest _encodedOperator. */ + public _encodedOperator?: "encodedOperator"; + + /** + * 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 }; + } + + /** 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 }; + } + + /** 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 }; + } + + /** Properties of an Attestation. */ + interface IAttestation { + /** Attestation version */ + version?: number | null; + + /** Attestation provider */ + provider?: string | null; + + /** Attestation payload */ + payload?: pruntime_rpc.IAttestationReport | 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 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 }; + } + + /** 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 }; + } + + /** 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 }; + } + + /** 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 }; + } + + /** 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 }; + } + + /** 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 }; + } + + /** SignatureType enum. */ + enum SignatureType { + Ed25519 = 0, + Sr25519 = 1, + Ecdsa = 2, + Ed25519WrapBytes = 3, + Sr25519WrapBytes = 4, + EcdsaWrapBytes = 5, + } + + /** 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 }; + } + + /** 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 }; + } + + /** 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 }; + } + + /** Properties of a WorkerState. */ + interface IWorkerState { + /** WorkerState registered */ + registered?: boolean | null; + + /** WorkerState unresponsive */ + unresponsive?: boolean | null; + + /** WorkerState benchState */ + benchState?: pruntime_rpc.IBenchState | null; + + /** WorkerState miningState */ + miningState?: pruntime_rpc.IMiningState | 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 miningState. */ + public miningState?: pruntime_rpc.IMiningState | 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 }; + } + + /** 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 }; + } + + /** 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 }; + } + + /** 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 }; + } + + /** 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 }; + } + + /** Properties of a MiningState. */ + interface IMiningState { + /** MiningState sessionId */ + sessionId?: number | null; + + /** MiningState paused */ + paused?: boolean | null; + + /** MiningState startTime */ + startTime?: number | Long | null; + } + + /** Represents a MiningState. */ + class MiningState implements IMiningState { + /** + * Constructs a new MiningState. + * @param [properties] Properties to set + */ + constructor(properties?: pruntime_rpc.IMiningState); + + /** MiningState sessionId. */ + public sessionId: number; + + /** MiningState paused. */ + public paused: boolean; + + /** MiningState startTime. */ + public startTime: number | Long; + + /** + * Creates a new MiningState instance using the specified properties. + * @param [properties] Properties to set + * @returns MiningState instance + */ + public static create( + properties?: pruntime_rpc.IMiningState + ): pruntime_rpc.MiningState; + + /** + * Encodes the specified MiningState message. Does not implicitly {@link pruntime_rpc.MiningState.verify|verify} messages. + * @param message MiningState message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pruntime_rpc.IMiningState, + writer?: $protobuf.Writer + ): $protobuf.Writer; + + /** + * Encodes the specified MiningState message, length delimited. Does not implicitly {@link pruntime_rpc.MiningState.verify|verify} messages. + * @param message MiningState message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pruntime_rpc.IMiningState, + writer?: $protobuf.Writer + ): $protobuf.Writer; + + /** + * Decodes a MiningState message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MiningState + * @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.MiningState; + + /** + * Decodes a MiningState message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MiningState + * @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.MiningState; + + /** + * Verifies a MiningState 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 MiningState message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MiningState + */ + public static fromObject(object: { + [k: string]: any; + }): pruntime_rpc.MiningState; + + /** + * Creates a plain object from a MiningState message. Also converts values to other types if specified. + * @param message MiningState + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pruntime_rpc.MiningState, + options?: $protobuf.IConversionOptions + ): { [k: string]: any }; + + /** + * Converts this MiningState to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 }; + } + + /** 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 }; + } + + /** 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 }; + } + + /** 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 }; + } + + /** 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 }; + } + + /** 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 }; + } + + /** 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 }; + } + + /** Properties of a NetworkStatus. */ + interface INetworkStatus { + /** NetworkStatus publicRpcPort */ + publicRpcPort?: number | null; + + /** NetworkStatus config */ + config?: pruntime_rpc.INetworkConfig | null; + } + + /** Represents a NetworkStatus. */ + class NetworkStatus implements INetworkStatus { + /** + * Constructs a new NetworkStatus. + * @param [properties] Properties to set + */ + constructor(properties?: pruntime_rpc.INetworkStatus); + + /** NetworkStatus publicRpcPort. */ + public publicRpcPort?: number | null; + + /** NetworkStatus config. */ + public config?: pruntime_rpc.INetworkConfig | null; + + /** NetworkStatus _publicRpcPort. */ + public _publicRpcPort?: "publicRpcPort"; + + /** NetworkStatus _config. */ + public _config?: "config"; + + /** + * Creates a new NetworkStatus instance using the specified properties. + * @param [properties] Properties to set + * @returns NetworkStatus instance + */ + public static create( + properties?: pruntime_rpc.INetworkStatus + ): pruntime_rpc.NetworkStatus; + + /** + * Encodes the specified NetworkStatus message. Does not implicitly {@link pruntime_rpc.NetworkStatus.verify|verify} messages. + * @param message NetworkStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pruntime_rpc.INetworkStatus, + writer?: $protobuf.Writer + ): $protobuf.Writer; + + /** + * Encodes the specified NetworkStatus message, length delimited. Does not implicitly {@link pruntime_rpc.NetworkStatus.verify|verify} messages. + * @param message NetworkStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pruntime_rpc.INetworkStatus, + writer?: $protobuf.Writer + ): $protobuf.Writer; + + /** + * Decodes a NetworkStatus message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NetworkStatus + * @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.NetworkStatus; + + /** + * Decodes a NetworkStatus message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NetworkStatus + * @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.NetworkStatus; + + /** + * Verifies a NetworkStatus 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 NetworkStatus message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NetworkStatus + */ + public static fromObject(object: { + [k: string]: any; + }): pruntime_rpc.NetworkStatus; + + /** + * Creates a plain object from a NetworkStatus message. Also converts values to other types if specified. + * @param message NetworkStatus + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pruntime_rpc.NetworkStatus, + options?: $protobuf.IConversionOptions + ): { [k: string]: any }; + + /** + * Converts this NetworkStatus to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 }; + } + + /** 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 }; + } + + /** 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 }; + } + + /** 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 }; + } } /** Namespace google. */ export namespace google { - - /** Namespace protobuf. */ - namespace protobuf { - - /** Properties of an Empty. */ - interface IEmpty { - } - - /** Represents an Empty. */ - class Empty implements IEmpty { - - /** - * Constructs a new Empty. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEmpty); - - /** - * Creates a new Empty instance using the specified properties. - * @param [properties] Properties to set - * @returns Empty instance - */ - public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; - - /** - * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @param message Empty message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @param message Empty message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Empty message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Empty - * @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): google.protobuf.Empty; - - /** - * Decodes an Empty message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Empty - * @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)): google.protobuf.Empty; - - /** - * Verifies an Empty 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 Empty message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Empty - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; - - /** - * Creates a plain object from an Empty message. Also converts values to other types if specified. - * @param message Empty - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Empty to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Namespace protobuf. */ + namespace protobuf { + /** Properties of an Empty. */ + interface IEmpty {} + + /** Represents an Empty. */ + class Empty implements IEmpty { + /** + * Constructs a new Empty. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEmpty); + + /** + * Creates a new Empty instance using the specified properties. + * @param [properties] Properties to set + * @returns Empty instance + */ + public static create( + properties?: google.protobuf.IEmpty + ): google.protobuf.Empty; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: google.protobuf.IEmpty, + writer?: $protobuf.Writer + ): $protobuf.Writer; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: google.protobuf.IEmpty, + writer?: $protobuf.Writer + ): $protobuf.Writer; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Empty + * @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 + ): google.protobuf.Empty; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Empty + * @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 + ): google.protobuf.Empty; + + /** + * Verifies an Empty 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 Empty message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Empty + */ + public static fromObject(object: { + [k: string]: any; + }): google.protobuf.Empty; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @param message Empty + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: google.protobuf.Empty, + options?: $protobuf.IConversionOptions + ): { [k: string]: any }; + + /** + * Converts this Empty to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; } + } } diff --git a/packages/sdk/src/proto/index.js b/packages/sdk/src/proto/index.js index a761331..c624cac 100644 --- a/packages/sdk/src/proto/index.js +++ b/packages/sdk/src/proto/index.js @@ -2,11823 +2,14112 @@ import * as $protobuf from "protobufjs/minimal"; // Common aliases -const $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; +const $Reader = $protobuf.Reader, + $Writer = $protobuf.Writer, + $util = $protobuf.util; // Exported root namespace const $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); -export const prpc = $root.prpc = (() => { +export const prpc = ($root.prpc = (() => { + /** + * Namespace prpc. + * @exports prpc + * @namespace + */ + const prpc = {}; + prpc.PrpcError = (function () { /** - * Namespace prpc. - * @exports prpc - * @namespace + * Properties of a PrpcError. + * @memberof prpc + * @interface IPrpcError + * @property {string|null} [message] The error description + */ + + /** + * Constructs a new PrpcError. + * @memberof prpc + * @classdesc The final Error type of RPCs to be serialized to protobuf. + * @implements IPrpcError + * @constructor + * @param {prpc.IPrpcError=} [properties] Properties to set + */ + function PrpcError(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + } + + /** + * The error description + * @member {string} message + * @memberof prpc.PrpcError + * @instance + */ + PrpcError.prototype.message = ""; + + /** + * Creates a new PrpcError instance using the specified properties. + * @function create + * @memberof prpc.PrpcError + * @static + * @param {prpc.IPrpcError=} [properties] Properties to set + * @returns {prpc.PrpcError} PrpcError instance + */ + PrpcError.create = function create(properties) { + return new PrpcError(properties); + }; + + /** + * Encodes the specified PrpcError message. Does not implicitly {@link prpc.PrpcError.verify|verify} messages. + * @function encode + * @memberof prpc.PrpcError + * @static + * @param {prpc.IPrpcError} message PrpcError message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrpcError.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if ( + message.message != null && + Object.hasOwnProperty.call(message, "message") + ) + writer.uint32(/* id 1, wireType 2 =*/ 10).string(message.message); + return writer; + }; + + /** + * Encodes the specified PrpcError message, length delimited. Does not implicitly {@link prpc.PrpcError.verify|verify} messages. + * @function encodeDelimited + * @memberof prpc.PrpcError + * @static + * @param {prpc.IPrpcError} message PrpcError message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrpcError.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PrpcError message from the specified reader or buffer. + * @function decode + * @memberof prpc.PrpcError + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {prpc.PrpcError} PrpcError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrpcError.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.prpc.PrpcError(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.message = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PrpcError message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof prpc.PrpcError + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {prpc.PrpcError} PrpcError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrpcError.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PrpcError message. + * @function verify + * @memberof prpc.PrpcError + * @static + * @param {Object.<string,*>} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PrpcError.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) return "message: string expected"; + return null; + }; + + /** + * Creates a PrpcError message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof prpc.PrpcError + * @static + * @param {Object.<string,*>} object Plain object + * @returns {prpc.PrpcError} PrpcError + */ + PrpcError.fromObject = function fromObject(object) { + if (object instanceof $root.prpc.PrpcError) return object; + let message = new $root.prpc.PrpcError(); + if (object.message != null) message.message = String(object.message); + return message; + }; + + /** + * Creates a plain object from a PrpcError message. Also converts values to other types if specified. + * @function toObject + * @memberof prpc.PrpcError + * @static + * @param {prpc.PrpcError} message PrpcError + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.<string,*>} Plain object + */ + PrpcError.toObject = function toObject(message, options) { + if (!options) options = {}; + let object = {}; + if (options.defaults) object.message = ""; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + return object; + }; + + /** + * Converts this PrpcError to JSON. + * @function toJSON + * @memberof prpc.PrpcError + * @instance + * @returns {Object.<string,*>} JSON object + */ + PrpcError.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PrpcError; + })(); + + return prpc; +})()); + +export const pruntime_rpc = ($root.pruntime_rpc = (() => { + /** + * Namespace pruntime_rpc. + * @exports pruntime_rpc + * @namespace + */ + const pruntime_rpc = {}; + + pruntime_rpc.PhactoryAPI = (function () { + /** + * Constructs a new PhactoryAPI service. + * @memberof pruntime_rpc + * @classdesc Represents a PhactoryAPI + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function PhactoryAPI(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call( + this, + rpcImpl, + requestDelimited, + responseDelimited + ); + } + + (PhactoryAPI.prototype = Object.create( + $protobuf.rpc.Service.prototype + )).constructor = PhactoryAPI; + + /** + * Creates new PhactoryAPI service using the specified rpc implementation. + * @function create + * @memberof pruntime_rpc.PhactoryAPI + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {PhactoryAPI} RPC service. Useful where requests and/or responses are streamed. + */ + PhactoryAPI.create = function create( + rpcImpl, + requestDelimited, + responseDelimited + ) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link pruntime_rpc.PhactoryAPI#getInfo}. + * @memberof pruntime_rpc.PhactoryAPI + * @typedef GetInfoCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {pruntime_rpc.PhactoryInfo} [response] PhactoryInfo + */ + + /** + * Calls GetInfo. + * @function getInfo + * @memberof pruntime_rpc.PhactoryAPI + * @instance + * @param {google.protobuf.IEmpty} request Empty message or plain object + * @param {pruntime_rpc.PhactoryAPI.GetInfoCallback} callback Node-style callback called with the error, if any, and PhactoryInfo + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty( + (PhactoryAPI.prototype.getInfo = function getInfo(request, callback) { + return this.rpcCall( + getInfo, + $root.google.protobuf.Empty, + $root.pruntime_rpc.PhactoryInfo, + request, + callback + ); + }), + "name", + { value: "GetInfo" } + ); + + /** + * Calls GetInfo. + * @function getInfo + * @memberof pruntime_rpc.PhactoryAPI + * @instance + * @param {google.protobuf.IEmpty} request Empty message or plain object + * @returns {Promise<pruntime_rpc.PhactoryInfo>} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link pruntime_rpc.PhactoryAPI#syncHeader}. + * @memberof pruntime_rpc.PhactoryAPI + * @typedef SyncHeaderCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {pruntime_rpc.SyncedTo} [response] SyncedTo + */ + + /** + * Calls SyncHeader. + * @function syncHeader + * @memberof pruntime_rpc.PhactoryAPI + * @instance + * @param {pruntime_rpc.IHeadersToSync} request HeadersToSync message or plain object + * @param {pruntime_rpc.PhactoryAPI.SyncHeaderCallback} callback Node-style callback called with the error, if any, and SyncedTo + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty( + (PhactoryAPI.prototype.syncHeader = function syncHeader( + request, + callback + ) { + return this.rpcCall( + syncHeader, + $root.pruntime_rpc.HeadersToSync, + $root.pruntime_rpc.SyncedTo, + request, + callback + ); + }), + "name", + { value: "SyncHeader" } + ); + + /** + * Calls SyncHeader. + * @function syncHeader + * @memberof pruntime_rpc.PhactoryAPI + * @instance + * @param {pruntime_rpc.IHeadersToSync} request HeadersToSync message or plain object + * @returns {Promise<pruntime_rpc.SyncedTo>} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link pruntime_rpc.PhactoryAPI#syncParaHeader}. + * @memberof pruntime_rpc.PhactoryAPI + * @typedef SyncParaHeaderCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {pruntime_rpc.SyncedTo} [response] SyncedTo + */ + + /** + * Calls SyncParaHeader. + * @function syncParaHeader + * @memberof pruntime_rpc.PhactoryAPI + * @instance + * @param {pruntime_rpc.IParaHeadersToSync} request ParaHeadersToSync message or plain object + * @param {pruntime_rpc.PhactoryAPI.SyncParaHeaderCallback} callback Node-style callback called with the error, if any, and SyncedTo + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty( + (PhactoryAPI.prototype.syncParaHeader = function syncParaHeader( + request, + callback + ) { + return this.rpcCall( + syncParaHeader, + $root.pruntime_rpc.ParaHeadersToSync, + $root.pruntime_rpc.SyncedTo, + request, + callback + ); + }), + "name", + { value: "SyncParaHeader" } + ); + + /** + * Calls SyncParaHeader. + * @function syncParaHeader + * @memberof pruntime_rpc.PhactoryAPI + * @instance + * @param {pruntime_rpc.IParaHeadersToSync} request ParaHeadersToSync message or plain object + * @returns {Promise<pruntime_rpc.SyncedTo>} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link pruntime_rpc.PhactoryAPI#syncCombinedHeaders}. + * @memberof pruntime_rpc.PhactoryAPI + * @typedef SyncCombinedHeadersCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {pruntime_rpc.HeadersSyncedTo} [response] HeadersSyncedTo + */ + + /** + * Calls SyncCombinedHeaders. + * @function syncCombinedHeaders + * @memberof pruntime_rpc.PhactoryAPI + * @instance + * @param {pruntime_rpc.ICombinedHeadersToSync} request CombinedHeadersToSync message or plain object + * @param {pruntime_rpc.PhactoryAPI.SyncCombinedHeadersCallback} callback Node-style callback called with the error, if any, and HeadersSyncedTo + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty( + (PhactoryAPI.prototype.syncCombinedHeaders = function syncCombinedHeaders( + request, + callback + ) { + return this.rpcCall( + syncCombinedHeaders, + $root.pruntime_rpc.CombinedHeadersToSync, + $root.pruntime_rpc.HeadersSyncedTo, + request, + callback + ); + }), + "name", + { value: "SyncCombinedHeaders" } + ); + + /** + * Calls SyncCombinedHeaders. + * @function syncCombinedHeaders + * @memberof pruntime_rpc.PhactoryAPI + * @instance + * @param {pruntime_rpc.ICombinedHeadersToSync} request CombinedHeadersToSync message or plain object + * @returns {Promise<pruntime_rpc.HeadersSyncedTo>} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link pruntime_rpc.PhactoryAPI#dispatchBlocks}. + * @memberof pruntime_rpc.PhactoryAPI + * @typedef DispatchBlocksCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {pruntime_rpc.SyncedTo} [response] SyncedTo + */ + + /** + * Calls DispatchBlocks. + * @function dispatchBlocks + * @memberof pruntime_rpc.PhactoryAPI + * @instance + * @param {pruntime_rpc.IBlocks} request Blocks message or plain object + * @param {pruntime_rpc.PhactoryAPI.DispatchBlocksCallback} callback Node-style callback called with the error, if any, and SyncedTo + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty( + (PhactoryAPI.prototype.dispatchBlocks = function dispatchBlocks( + request, + callback + ) { + return this.rpcCall( + dispatchBlocks, + $root.pruntime_rpc.Blocks, + $root.pruntime_rpc.SyncedTo, + request, + callback + ); + }), + "name", + { value: "DispatchBlocks" } + ); + + /** + * Calls DispatchBlocks. + * @function dispatchBlocks + * @memberof pruntime_rpc.PhactoryAPI + * @instance + * @param {pruntime_rpc.IBlocks} request Blocks message or plain object + * @returns {Promise<pruntime_rpc.SyncedTo>} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link pruntime_rpc.PhactoryAPI#initRuntime}. + * @memberof pruntime_rpc.PhactoryAPI + * @typedef InitRuntimeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {pruntime_rpc.InitRuntimeResponse} [response] InitRuntimeResponse + */ + + /** + * Calls InitRuntime. + * @function initRuntime + * @memberof pruntime_rpc.PhactoryAPI + * @instance + * @param {pruntime_rpc.IInitRuntimeRequest} request InitRuntimeRequest message or plain object + * @param {pruntime_rpc.PhactoryAPI.InitRuntimeCallback} callback Node-style callback called with the error, if any, and InitRuntimeResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty( + (PhactoryAPI.prototype.initRuntime = function initRuntime( + request, + callback + ) { + return this.rpcCall( + initRuntime, + $root.pruntime_rpc.InitRuntimeRequest, + $root.pruntime_rpc.InitRuntimeResponse, + request, + callback + ); + }), + "name", + { value: "InitRuntime" } + ); + + /** + * Calls InitRuntime. + * @function initRuntime + * @memberof pruntime_rpc.PhactoryAPI + * @instance + * @param {pruntime_rpc.IInitRuntimeRequest} request InitRuntimeRequest message or plain object + * @returns {Promise<pruntime_rpc.InitRuntimeResponse>} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link pruntime_rpc.PhactoryAPI#getRuntimeInfo}. + * @memberof pruntime_rpc.PhactoryAPI + * @typedef GetRuntimeInfoCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {pruntime_rpc.InitRuntimeResponse} [response] InitRuntimeResponse + */ + + /** + * Calls GetRuntimeInfo. + * @function getRuntimeInfo + * @memberof pruntime_rpc.PhactoryAPI + * @instance + * @param {pruntime_rpc.IGetRuntimeInfoRequest} request GetRuntimeInfoRequest message or plain object + * @param {pruntime_rpc.PhactoryAPI.GetRuntimeInfoCallback} callback Node-style callback called with the error, if any, and InitRuntimeResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty( + (PhactoryAPI.prototype.getRuntimeInfo = function getRuntimeInfo( + request, + callback + ) { + return this.rpcCall( + getRuntimeInfo, + $root.pruntime_rpc.GetRuntimeInfoRequest, + $root.pruntime_rpc.InitRuntimeResponse, + request, + callback + ); + }), + "name", + { value: "GetRuntimeInfo" } + ); + + /** + * Calls GetRuntimeInfo. + * @function getRuntimeInfo + * @memberof pruntime_rpc.PhactoryAPI + * @instance + * @param {pruntime_rpc.IGetRuntimeInfoRequest} request GetRuntimeInfoRequest message or plain object + * @returns {Promise<pruntime_rpc.InitRuntimeResponse>} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link pruntime_rpc.PhactoryAPI#getEgressMessages}. + * @memberof pruntime_rpc.PhactoryAPI + * @typedef GetEgressMessagesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {pruntime_rpc.GetEgressMessagesResponse} [response] GetEgressMessagesResponse + */ + + /** + * Calls GetEgressMessages. + * @function getEgressMessages + * @memberof pruntime_rpc.PhactoryAPI + * @instance + * @param {google.protobuf.IEmpty} request Empty message or plain object + * @param {pruntime_rpc.PhactoryAPI.GetEgressMessagesCallback} callback Node-style callback called with the error, if any, and GetEgressMessagesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty( + (PhactoryAPI.prototype.getEgressMessages = function getEgressMessages( + request, + callback + ) { + return this.rpcCall( + getEgressMessages, + $root.google.protobuf.Empty, + $root.pruntime_rpc.GetEgressMessagesResponse, + request, + callback + ); + }), + "name", + { value: "GetEgressMessages" } + ); + + /** + * Calls GetEgressMessages. + * @function getEgressMessages + * @memberof pruntime_rpc.PhactoryAPI + * @instance + * @param {google.protobuf.IEmpty} request Empty message or plain object + * @returns {Promise<pruntime_rpc.GetEgressMessagesResponse>} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link pruntime_rpc.PhactoryAPI#contractQuery}. + * @memberof pruntime_rpc.PhactoryAPI + * @typedef ContractQueryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {pruntime_rpc.ContractQueryResponse} [response] ContractQueryResponse + */ + + /** + * Calls ContractQuery. + * @function contractQuery + * @memberof pruntime_rpc.PhactoryAPI + * @instance + * @param {pruntime_rpc.IContractQueryRequest} request ContractQueryRequest message or plain object + * @param {pruntime_rpc.PhactoryAPI.ContractQueryCallback} callback Node-style callback called with the error, if any, and ContractQueryResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty( + (PhactoryAPI.prototype.contractQuery = function contractQuery( + request, + callback + ) { + return this.rpcCall( + contractQuery, + $root.pruntime_rpc.ContractQueryRequest, + $root.pruntime_rpc.ContractQueryResponse, + request, + callback + ); + }), + "name", + { value: "ContractQuery" } + ); + + /** + * Calls ContractQuery. + * @function contractQuery + * @memberof pruntime_rpc.PhactoryAPI + * @instance + * @param {pruntime_rpc.IContractQueryRequest} request ContractQueryRequest message or plain object + * @returns {Promise<pruntime_rpc.ContractQueryResponse>} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link pruntime_rpc.PhactoryAPI#getWorkerState}. + * @memberof pruntime_rpc.PhactoryAPI + * @typedef GetWorkerStateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {pruntime_rpc.WorkerState} [response] WorkerState + */ + + /** + * Calls GetWorkerState. + * @function getWorkerState + * @memberof pruntime_rpc.PhactoryAPI + * @instance + * @param {pruntime_rpc.IGetWorkerStateRequest} request GetWorkerStateRequest message or plain object + * @param {pruntime_rpc.PhactoryAPI.GetWorkerStateCallback} callback Node-style callback called with the error, if any, and WorkerState + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty( + (PhactoryAPI.prototype.getWorkerState = function getWorkerState( + request, + callback + ) { + return this.rpcCall( + getWorkerState, + $root.pruntime_rpc.GetWorkerStateRequest, + $root.pruntime_rpc.WorkerState, + request, + callback + ); + }), + "name", + { value: "GetWorkerState" } + ); + + /** + * Calls GetWorkerState. + * @function getWorkerState + * @memberof pruntime_rpc.PhactoryAPI + * @instance + * @param {pruntime_rpc.IGetWorkerStateRequest} request GetWorkerStateRequest message or plain object + * @returns {Promise<pruntime_rpc.WorkerState>} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link pruntime_rpc.PhactoryAPI#addEndpoint}. + * @memberof pruntime_rpc.PhactoryAPI + * @typedef AddEndpointCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {pruntime_rpc.GetEndpointResponse} [response] GetEndpointResponse + */ + + /** + * Calls AddEndpoint. + * @function addEndpoint + * @memberof pruntime_rpc.PhactoryAPI + * @instance + * @param {pruntime_rpc.IAddEndpointRequest} request AddEndpointRequest message or plain object + * @param {pruntime_rpc.PhactoryAPI.AddEndpointCallback} callback Node-style callback called with the error, if any, and GetEndpointResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty( + (PhactoryAPI.prototype.addEndpoint = function addEndpoint( + request, + callback + ) { + return this.rpcCall( + addEndpoint, + $root.pruntime_rpc.AddEndpointRequest, + $root.pruntime_rpc.GetEndpointResponse, + request, + callback + ); + }), + "name", + { value: "AddEndpoint" } + ); + + /** + * Calls AddEndpoint. + * @function addEndpoint + * @memberof pruntime_rpc.PhactoryAPI + * @instance + * @param {pruntime_rpc.IAddEndpointRequest} request AddEndpointRequest message or plain object + * @returns {Promise<pruntime_rpc.GetEndpointResponse>} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link pruntime_rpc.PhactoryAPI#refreshEndpointSigningTime}. + * @memberof pruntime_rpc.PhactoryAPI + * @typedef RefreshEndpointSigningTimeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {pruntime_rpc.GetEndpointResponse} [response] GetEndpointResponse + */ + + /** + * Calls RefreshEndpointSigningTime. + * @function refreshEndpointSigningTime + * @memberof pruntime_rpc.PhactoryAPI + * @instance + * @param {google.protobuf.IEmpty} request Empty message or plain object + * @param {pruntime_rpc.PhactoryAPI.RefreshEndpointSigningTimeCallback} callback Node-style callback called with the error, if any, and GetEndpointResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty( + (PhactoryAPI.prototype.refreshEndpointSigningTime = + function refreshEndpointSigningTime(request, callback) { + return this.rpcCall( + refreshEndpointSigningTime, + $root.google.protobuf.Empty, + $root.pruntime_rpc.GetEndpointResponse, + request, + callback + ); + }), + "name", + { value: "RefreshEndpointSigningTime" } + ); + + /** + * Calls RefreshEndpointSigningTime. + * @function refreshEndpointSigningTime + * @memberof pruntime_rpc.PhactoryAPI + * @instance + * @param {google.protobuf.IEmpty} request Empty message or plain object + * @returns {Promise<pruntime_rpc.GetEndpointResponse>} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link pruntime_rpc.PhactoryAPI#getEndpointInfo}. + * @memberof pruntime_rpc.PhactoryAPI + * @typedef GetEndpointInfoCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {pruntime_rpc.GetEndpointResponse} [response] GetEndpointResponse + */ + + /** + * Calls GetEndpointInfo. + * @function getEndpointInfo + * @memberof pruntime_rpc.PhactoryAPI + * @instance + * @param {google.protobuf.IEmpty} request Empty message or plain object + * @param {pruntime_rpc.PhactoryAPI.GetEndpointInfoCallback} callback Node-style callback called with the error, if any, and GetEndpointResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty( + (PhactoryAPI.prototype.getEndpointInfo = function getEndpointInfo( + request, + callback + ) { + return this.rpcCall( + getEndpointInfo, + $root.google.protobuf.Empty, + $root.pruntime_rpc.GetEndpointResponse, + request, + callback + ); + }), + "name", + { value: "GetEndpointInfo" } + ); + + /** + * Calls GetEndpointInfo. + * @function getEndpointInfo + * @memberof pruntime_rpc.PhactoryAPI + * @instance + * @param {google.protobuf.IEmpty} request Empty message or plain object + * @returns {Promise<pruntime_rpc.GetEndpointResponse>} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link pruntime_rpc.PhactoryAPI#signEndpointInfo}. + * @memberof pruntime_rpc.PhactoryAPI + * @typedef SignEndpointInfoCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {pruntime_rpc.GetEndpointResponse} [response] GetEndpointResponse + */ + + /** + * Calls SignEndpointInfo. + * @function signEndpointInfo + * @memberof pruntime_rpc.PhactoryAPI + * @instance + * @param {pruntime_rpc.ISignEndpointsRequest} request SignEndpointsRequest message or plain object + * @param {pruntime_rpc.PhactoryAPI.SignEndpointInfoCallback} callback Node-style callback called with the error, if any, and GetEndpointResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty( + (PhactoryAPI.prototype.signEndpointInfo = function signEndpointInfo( + request, + callback + ) { + return this.rpcCall( + signEndpointInfo, + $root.pruntime_rpc.SignEndpointsRequest, + $root.pruntime_rpc.GetEndpointResponse, + request, + callback + ); + }), + "name", + { value: "SignEndpointInfo" } + ); + + /** + * Calls SignEndpointInfo. + * @function signEndpointInfo + * @memberof pruntime_rpc.PhactoryAPI + * @instance + * @param {pruntime_rpc.ISignEndpointsRequest} request SignEndpointsRequest message or plain object + * @returns {Promise<pruntime_rpc.GetEndpointResponse>} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link pruntime_rpc.PhactoryAPI#derivePhalaI2pKey}. + * @memberof pruntime_rpc.PhactoryAPI + * @typedef DerivePhalaI2pKeyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {pruntime_rpc.DerivePhalaI2pKeyResponse} [response] DerivePhalaI2pKeyResponse + */ + + /** + * Calls DerivePhalaI2pKey. + * @function derivePhalaI2pKey + * @memberof pruntime_rpc.PhactoryAPI + * @instance + * @param {google.protobuf.IEmpty} request Empty message or plain object + * @param {pruntime_rpc.PhactoryAPI.DerivePhalaI2pKeyCallback} callback Node-style callback called with the error, if any, and DerivePhalaI2pKeyResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty( + (PhactoryAPI.prototype.derivePhalaI2pKey = function derivePhalaI2pKey( + request, + callback + ) { + return this.rpcCall( + derivePhalaI2pKey, + $root.google.protobuf.Empty, + $root.pruntime_rpc.DerivePhalaI2pKeyResponse, + request, + callback + ); + }), + "name", + { value: "DerivePhalaI2pKey" } + ); + + /** + * Calls DerivePhalaI2pKey. + * @function derivePhalaI2pKey + * @memberof pruntime_rpc.PhactoryAPI + * @instance + * @param {google.protobuf.IEmpty} request Empty message or plain object + * @returns {Promise<pruntime_rpc.DerivePhalaI2pKeyResponse>} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link pruntime_rpc.PhactoryAPI#echo}. + * @memberof pruntime_rpc.PhactoryAPI + * @typedef EchoCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {pruntime_rpc.EchoMessage} [response] EchoMessage + */ + + /** + * Calls Echo. + * @function echo + * @memberof pruntime_rpc.PhactoryAPI + * @instance + * @param {pruntime_rpc.IEchoMessage} request EchoMessage message or plain object + * @param {pruntime_rpc.PhactoryAPI.EchoCallback} callback Node-style callback called with the error, if any, and EchoMessage + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty( + (PhactoryAPI.prototype.echo = function echo(request, callback) { + return this.rpcCall( + echo, + $root.pruntime_rpc.EchoMessage, + $root.pruntime_rpc.EchoMessage, + request, + callback + ); + }), + "name", + { value: "Echo" } + ); + + /** + * Calls Echo. + * @function echo + * @memberof pruntime_rpc.PhactoryAPI + * @instance + * @param {pruntime_rpc.IEchoMessage} request EchoMessage message or plain object + * @returns {Promise<pruntime_rpc.EchoMessage>} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link pruntime_rpc.PhactoryAPI#handoverCreateChallenge}. + * @memberof pruntime_rpc.PhactoryAPI + * @typedef HandoverCreateChallengeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {pruntime_rpc.HandoverChallenge} [response] HandoverChallenge + */ + + /** + * Calls HandoverCreateChallenge. + * @function handoverCreateChallenge + * @memberof pruntime_rpc.PhactoryAPI + * @instance + * @param {google.protobuf.IEmpty} request Empty message or plain object + * @param {pruntime_rpc.PhactoryAPI.HandoverCreateChallengeCallback} callback Node-style callback called with the error, if any, and HandoverChallenge + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty( + (PhactoryAPI.prototype.handoverCreateChallenge = + function handoverCreateChallenge(request, callback) { + return this.rpcCall( + handoverCreateChallenge, + $root.google.protobuf.Empty, + $root.pruntime_rpc.HandoverChallenge, + request, + callback + ); + }), + "name", + { value: "HandoverCreateChallenge" } + ); + + /** + * Calls HandoverCreateChallenge. + * @function handoverCreateChallenge + * @memberof pruntime_rpc.PhactoryAPI + * @instance + * @param {google.protobuf.IEmpty} request Empty message or plain object + * @returns {Promise<pruntime_rpc.HandoverChallenge>} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link pruntime_rpc.PhactoryAPI#handoverStart}. + * @memberof pruntime_rpc.PhactoryAPI + * @typedef HandoverStartCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {pruntime_rpc.HandoverWorkerKey} [response] HandoverWorkerKey + */ + + /** + * Calls HandoverStart. + * @function handoverStart + * @memberof pruntime_rpc.PhactoryAPI + * @instance + * @param {pruntime_rpc.IHandoverChallengeResponse} request HandoverChallengeResponse message or plain object + * @param {pruntime_rpc.PhactoryAPI.HandoverStartCallback} callback Node-style callback called with the error, if any, and HandoverWorkerKey + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty( + (PhactoryAPI.prototype.handoverStart = function handoverStart( + request, + callback + ) { + return this.rpcCall( + handoverStart, + $root.pruntime_rpc.HandoverChallengeResponse, + $root.pruntime_rpc.HandoverWorkerKey, + request, + callback + ); + }), + "name", + { value: "HandoverStart" } + ); + + /** + * Calls HandoverStart. + * @function handoverStart + * @memberof pruntime_rpc.PhactoryAPI + * @instance + * @param {pruntime_rpc.IHandoverChallengeResponse} request HandoverChallengeResponse message or plain object + * @returns {Promise<pruntime_rpc.HandoverWorkerKey>} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link pruntime_rpc.PhactoryAPI#handoverAcceptChallenge}. + * @memberof pruntime_rpc.PhactoryAPI + * @typedef HandoverAcceptChallengeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {pruntime_rpc.HandoverChallengeResponse} [response] HandoverChallengeResponse + */ + + /** + * Calls HandoverAcceptChallenge. + * @function handoverAcceptChallenge + * @memberof pruntime_rpc.PhactoryAPI + * @instance + * @param {pruntime_rpc.IHandoverChallenge} request HandoverChallenge message or plain object + * @param {pruntime_rpc.PhactoryAPI.HandoverAcceptChallengeCallback} callback Node-style callback called with the error, if any, and HandoverChallengeResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty( + (PhactoryAPI.prototype.handoverAcceptChallenge = + function handoverAcceptChallenge(request, callback) { + return this.rpcCall( + handoverAcceptChallenge, + $root.pruntime_rpc.HandoverChallenge, + $root.pruntime_rpc.HandoverChallengeResponse, + request, + callback + ); + }), + "name", + { value: "HandoverAcceptChallenge" } + ); + + /** + * Calls HandoverAcceptChallenge. + * @function handoverAcceptChallenge + * @memberof pruntime_rpc.PhactoryAPI + * @instance + * @param {pruntime_rpc.IHandoverChallenge} request HandoverChallenge message or plain object + * @returns {Promise<pruntime_rpc.HandoverChallengeResponse>} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link pruntime_rpc.PhactoryAPI#handoverReceive}. + * @memberof pruntime_rpc.PhactoryAPI + * @typedef HandoverReceiveCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls HandoverReceive. + * @function handoverReceive + * @memberof pruntime_rpc.PhactoryAPI + * @instance + * @param {pruntime_rpc.IHandoverWorkerKey} request HandoverWorkerKey message or plain object + * @param {pruntime_rpc.PhactoryAPI.HandoverReceiveCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty( + (PhactoryAPI.prototype.handoverReceive = function handoverReceive( + request, + callback + ) { + return this.rpcCall( + handoverReceive, + $root.pruntime_rpc.HandoverWorkerKey, + $root.google.protobuf.Empty, + request, + callback + ); + }), + "name", + { value: "HandoverReceive" } + ); + + /** + * Calls HandoverReceive. + * @function handoverReceive + * @memberof pruntime_rpc.PhactoryAPI + * @instance + * @param {pruntime_rpc.IHandoverWorkerKey} request HandoverWorkerKey message or plain object + * @returns {Promise<google.protobuf.Empty>} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link pruntime_rpc.PhactoryAPI#configNetwork}. + * @memberof pruntime_rpc.PhactoryAPI + * @typedef ConfigNetworkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls ConfigNetwork. + * @function configNetwork + * @memberof pruntime_rpc.PhactoryAPI + * @instance + * @param {pruntime_rpc.INetworkConfig} request NetworkConfig message or plain object + * @param {pruntime_rpc.PhactoryAPI.ConfigNetworkCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty( + (PhactoryAPI.prototype.configNetwork = function configNetwork( + request, + callback + ) { + return this.rpcCall( + configNetwork, + $root.pruntime_rpc.NetworkConfig, + $root.google.protobuf.Empty, + request, + callback + ); + }), + "name", + { value: "ConfigNetwork" } + ); + + /** + * Calls ConfigNetwork. + * @function configNetwork + * @memberof pruntime_rpc.PhactoryAPI + * @instance + * @param {pruntime_rpc.INetworkConfig} request NetworkConfig message or plain object + * @returns {Promise<google.protobuf.Empty>} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link pruntime_rpc.PhactoryAPI#httpFetch}. + * @memberof pruntime_rpc.PhactoryAPI + * @typedef HttpFetchCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {pruntime_rpc.HttpResponse} [response] HttpResponse + */ + + /** + * Calls HttpFetch. + * @function httpFetch + * @memberof pruntime_rpc.PhactoryAPI + * @instance + * @param {pruntime_rpc.IHttpRequest} request HttpRequest message or plain object + * @param {pruntime_rpc.PhactoryAPI.HttpFetchCallback} callback Node-style callback called with the error, if any, and HttpResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty( + (PhactoryAPI.prototype.httpFetch = function httpFetch(request, callback) { + return this.rpcCall( + httpFetch, + $root.pruntime_rpc.HttpRequest, + $root.pruntime_rpc.HttpResponse, + request, + callback + ); + }), + "name", + { value: "HttpFetch" } + ); + + /** + * Calls HttpFetch. + * @function httpFetch + * @memberof pruntime_rpc.PhactoryAPI + * @instance + * @param {pruntime_rpc.IHttpRequest} request HttpRequest message or plain object + * @returns {Promise<pruntime_rpc.HttpResponse>} Promise + * @variation 2 + */ + + return PhactoryAPI; + })(); + + pruntime_rpc.PhactoryInfo = (function () { + /** + * Properties of a PhactoryInfo. + * @memberof pruntime_rpc + * @interface IPhactoryInfo + * @property {boolean|null} [initialized] PhactoryInfo initialized + * @property {boolean|null} [registered] PhactoryInfo registered + * @property {string|null} [genesisBlockHash] PhactoryInfo genesisBlockHash + * @property {string|null} [publicKey] PhactoryInfo publicKey + * @property {string|null} [ecdhPublicKey] PhactoryInfo ecdhPublicKey + * @property {number|null} [headernum] PhactoryInfo headernum + * @property {number|null} [paraHeadernum] PhactoryInfo paraHeadernum + * @property {number|null} [blocknum] PhactoryInfo blocknum + * @property {string|null} [stateRoot] PhactoryInfo stateRoot + * @property {boolean|null} [devMode] PhactoryInfo devMode + * @property {number|Long|null} [pendingMessages] PhactoryInfo pendingMessages + * @property {number|Long|null} [score] PhactoryInfo score + * @property {pruntime_rpc.IGatekeeperStatus|null} [gatekeeper] PhactoryInfo gatekeeper + * @property {string|null} [version] PhactoryInfo version + * @property {string|null} [gitRevision] PhactoryInfo gitRevision + * @property {number|Long|null} [runningSideTasks] PhactoryInfo runningSideTasks + * @property {pruntime_rpc.IMemoryUsage|null} [memoryUsage] PhactoryInfo memoryUsage + * @property {boolean|null} [waitingForParaheaders] PhactoryInfo waitingForParaheaders + * @property {pruntime_rpc.INetworkStatus|null} [networkStatus] PhactoryInfo networkStatus + * @property {pruntime_rpc.ISystemInfo|null} [system] PhactoryInfo system + */ + + /** + * Constructs a new PhactoryInfo. + * @memberof pruntime_rpc + * @classdesc Represents a PhactoryInfo. + * @implements IPhactoryInfo + * @constructor + * @param {pruntime_rpc.IPhactoryInfo=} [properties] Properties to set + */ + function PhactoryInfo(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + } + + /** + * PhactoryInfo initialized. + * @member {boolean} initialized + * @memberof pruntime_rpc.PhactoryInfo + * @instance + */ + PhactoryInfo.prototype.initialized = false; + + /** + * PhactoryInfo registered. + * @member {boolean} registered + * @memberof pruntime_rpc.PhactoryInfo + * @instance + */ + PhactoryInfo.prototype.registered = false; + + /** + * PhactoryInfo genesisBlockHash. + * @member {string|null|undefined} genesisBlockHash + * @memberof pruntime_rpc.PhactoryInfo + * @instance + */ + PhactoryInfo.prototype.genesisBlockHash = null; + + /** + * PhactoryInfo publicKey. + * @member {string|null|undefined} publicKey + * @memberof pruntime_rpc.PhactoryInfo + * @instance + */ + PhactoryInfo.prototype.publicKey = null; + + /** + * PhactoryInfo ecdhPublicKey. + * @member {string|null|undefined} ecdhPublicKey + * @memberof pruntime_rpc.PhactoryInfo + * @instance + */ + PhactoryInfo.prototype.ecdhPublicKey = null; + + /** + * PhactoryInfo headernum. + * @member {number} headernum + * @memberof pruntime_rpc.PhactoryInfo + * @instance + */ + PhactoryInfo.prototype.headernum = 0; + + /** + * PhactoryInfo paraHeadernum. + * @member {number} paraHeadernum + * @memberof pruntime_rpc.PhactoryInfo + * @instance + */ + PhactoryInfo.prototype.paraHeadernum = 0; + + /** + * PhactoryInfo blocknum. + * @member {number} blocknum + * @memberof pruntime_rpc.PhactoryInfo + * @instance + */ + PhactoryInfo.prototype.blocknum = 0; + + /** + * PhactoryInfo stateRoot. + * @member {string} stateRoot + * @memberof pruntime_rpc.PhactoryInfo + * @instance + */ + PhactoryInfo.prototype.stateRoot = ""; + + /** + * PhactoryInfo devMode. + * @member {boolean} devMode + * @memberof pruntime_rpc.PhactoryInfo + * @instance + */ + PhactoryInfo.prototype.devMode = false; + + /** + * PhactoryInfo pendingMessages. + * @member {number|Long} pendingMessages + * @memberof pruntime_rpc.PhactoryInfo + * @instance + */ + PhactoryInfo.prototype.pendingMessages = $util.Long + ? $util.Long.fromBits(0, 0, true) + : 0; + + /** + * PhactoryInfo score. + * @member {number|Long} score + * @memberof pruntime_rpc.PhactoryInfo + * @instance + */ + PhactoryInfo.prototype.score = $util.Long + ? $util.Long.fromBits(0, 0, true) + : 0; + + /** + * PhactoryInfo gatekeeper. + * @member {pruntime_rpc.IGatekeeperStatus|null|undefined} gatekeeper + * @memberof pruntime_rpc.PhactoryInfo + * @instance + */ + PhactoryInfo.prototype.gatekeeper = null; + + /** + * PhactoryInfo version. + * @member {string} version + * @memberof pruntime_rpc.PhactoryInfo + * @instance + */ + PhactoryInfo.prototype.version = ""; + + /** + * PhactoryInfo gitRevision. + * @member {string} gitRevision + * @memberof pruntime_rpc.PhactoryInfo + * @instance + */ + PhactoryInfo.prototype.gitRevision = ""; + + /** + * PhactoryInfo runningSideTasks. + * @member {number|Long} runningSideTasks + * @memberof pruntime_rpc.PhactoryInfo + * @instance + */ + PhactoryInfo.prototype.runningSideTasks = $util.Long + ? $util.Long.fromBits(0, 0, true) + : 0; + + /** + * PhactoryInfo memoryUsage. + * @member {pruntime_rpc.IMemoryUsage|null|undefined} memoryUsage + * @memberof pruntime_rpc.PhactoryInfo + * @instance + */ + PhactoryInfo.prototype.memoryUsage = null; + + /** + * PhactoryInfo waitingForParaheaders. + * @member {boolean} waitingForParaheaders + * @memberof pruntime_rpc.PhactoryInfo + * @instance + */ + PhactoryInfo.prototype.waitingForParaheaders = false; + + /** + * PhactoryInfo networkStatus. + * @member {pruntime_rpc.INetworkStatus|null|undefined} networkStatus + * @memberof pruntime_rpc.PhactoryInfo + * @instance + */ + PhactoryInfo.prototype.networkStatus = null; + + /** + * PhactoryInfo system. + * @member {pruntime_rpc.ISystemInfo|null|undefined} system + * @memberof pruntime_rpc.PhactoryInfo + * @instance + */ + PhactoryInfo.prototype.system = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * PhactoryInfo _genesisBlockHash. + * @member {"genesisBlockHash"|undefined} _genesisBlockHash + * @memberof pruntime_rpc.PhactoryInfo + * @instance + */ + Object.defineProperty(PhactoryInfo.prototype, "_genesisBlockHash", { + get: $util.oneOfGetter(($oneOfFields = ["genesisBlockHash"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * PhactoryInfo _publicKey. + * @member {"publicKey"|undefined} _publicKey + * @memberof pruntime_rpc.PhactoryInfo + * @instance + */ + Object.defineProperty(PhactoryInfo.prototype, "_publicKey", { + get: $util.oneOfGetter(($oneOfFields = ["publicKey"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * PhactoryInfo _ecdhPublicKey. + * @member {"ecdhPublicKey"|undefined} _ecdhPublicKey + * @memberof pruntime_rpc.PhactoryInfo + * @instance + */ + Object.defineProperty(PhactoryInfo.prototype, "_ecdhPublicKey", { + get: $util.oneOfGetter(($oneOfFields = ["ecdhPublicKey"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Creates a new PhactoryInfo instance using the specified properties. + * @function create + * @memberof pruntime_rpc.PhactoryInfo + * @static + * @param {pruntime_rpc.IPhactoryInfo=} [properties] Properties to set + * @returns {pruntime_rpc.PhactoryInfo} PhactoryInfo instance + */ + PhactoryInfo.create = function create(properties) { + return new PhactoryInfo(properties); + }; + + /** + * Encodes the specified PhactoryInfo message. Does not implicitly {@link pruntime_rpc.PhactoryInfo.verify|verify} messages. + * @function encode + * @memberof pruntime_rpc.PhactoryInfo + * @static + * @param {pruntime_rpc.IPhactoryInfo} message PhactoryInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhactoryInfo.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if ( + message.initialized != null && + Object.hasOwnProperty.call(message, "initialized") + ) + writer.uint32(/* id 1, wireType 0 =*/ 8).bool(message.initialized); + if ( + message.registered != null && + Object.hasOwnProperty.call(message, "registered") + ) + writer.uint32(/* id 2, wireType 0 =*/ 16).bool(message.registered); + if ( + message.genesisBlockHash != null && + Object.hasOwnProperty.call(message, "genesisBlockHash") + ) + writer + .uint32(/* id 4, wireType 2 =*/ 34) + .string(message.genesisBlockHash); + if ( + message.publicKey != null && + Object.hasOwnProperty.call(message, "publicKey") + ) + writer.uint32(/* id 5, wireType 2 =*/ 42).string(message.publicKey); + if ( + message.ecdhPublicKey != null && + Object.hasOwnProperty.call(message, "ecdhPublicKey") + ) + writer.uint32(/* id 6, wireType 2 =*/ 50).string(message.ecdhPublicKey); + if ( + message.headernum != null && + Object.hasOwnProperty.call(message, "headernum") + ) + writer.uint32(/* id 7, wireType 0 =*/ 56).uint32(message.headernum); + if ( + message.paraHeadernum != null && + Object.hasOwnProperty.call(message, "paraHeadernum") + ) + writer.uint32(/* id 8, wireType 0 =*/ 64).uint32(message.paraHeadernum); + if ( + message.blocknum != null && + Object.hasOwnProperty.call(message, "blocknum") + ) + writer.uint32(/* id 9, wireType 0 =*/ 72).uint32(message.blocknum); + if ( + message.stateRoot != null && + Object.hasOwnProperty.call(message, "stateRoot") + ) + writer.uint32(/* id 10, wireType 2 =*/ 82).string(message.stateRoot); + if ( + message.devMode != null && + Object.hasOwnProperty.call(message, "devMode") + ) + writer.uint32(/* id 11, wireType 0 =*/ 88).bool(message.devMode); + if ( + message.pendingMessages != null && + Object.hasOwnProperty.call(message, "pendingMessages") + ) + writer + .uint32(/* id 12, wireType 0 =*/ 96) + .uint64(message.pendingMessages); + if (message.score != null && Object.hasOwnProperty.call(message, "score")) + writer.uint32(/* id 13, wireType 0 =*/ 104).uint64(message.score); + if ( + message.gatekeeper != null && + Object.hasOwnProperty.call(message, "gatekeeper") + ) + $root.pruntime_rpc.GatekeeperStatus.encode( + message.gatekeeper, + writer.uint32(/* id 14, wireType 2 =*/ 114).fork() + ).ldelim(); + if ( + message.version != null && + Object.hasOwnProperty.call(message, "version") + ) + writer.uint32(/* id 15, wireType 2 =*/ 122).string(message.version); + if ( + message.gitRevision != null && + Object.hasOwnProperty.call(message, "gitRevision") + ) + writer.uint32(/* id 16, wireType 2 =*/ 130).string(message.gitRevision); + if ( + message.runningSideTasks != null && + Object.hasOwnProperty.call(message, "runningSideTasks") + ) + writer + .uint32(/* id 17, wireType 0 =*/ 136) + .uint64(message.runningSideTasks); + if ( + message.memoryUsage != null && + Object.hasOwnProperty.call(message, "memoryUsage") + ) + $root.pruntime_rpc.MemoryUsage.encode( + message.memoryUsage, + writer.uint32(/* id 18, wireType 2 =*/ 146).fork() + ).ldelim(); + if ( + message.waitingForParaheaders != null && + Object.hasOwnProperty.call(message, "waitingForParaheaders") + ) + writer + .uint32(/* id 21, wireType 0 =*/ 168) + .bool(message.waitingForParaheaders); + if ( + message.networkStatus != null && + Object.hasOwnProperty.call(message, "networkStatus") + ) + $root.pruntime_rpc.NetworkStatus.encode( + message.networkStatus, + writer.uint32(/* id 22, wireType 2 =*/ 178).fork() + ).ldelim(); + if ( + message.system != null && + Object.hasOwnProperty.call(message, "system") + ) + $root.pruntime_rpc.SystemInfo.encode( + message.system, + writer.uint32(/* id 23, wireType 2 =*/ 186).fork() + ).ldelim(); + return writer; + }; + + /** + * Encodes the specified PhactoryInfo message, length delimited. Does not implicitly {@link pruntime_rpc.PhactoryInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof pruntime_rpc.PhactoryInfo + * @static + * @param {pruntime_rpc.IPhactoryInfo} message PhactoryInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhactoryInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PhactoryInfo message from the specified reader or buffer. + * @function decode + * @memberof pruntime_rpc.PhactoryInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pruntime_rpc.PhactoryInfo} PhactoryInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhactoryInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pruntime_rpc.PhactoryInfo(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.initialized = reader.bool(); + break; + case 2: + message.registered = reader.bool(); + break; + case 4: + message.genesisBlockHash = reader.string(); + break; + case 5: + message.publicKey = reader.string(); + break; + case 6: + message.ecdhPublicKey = reader.string(); + break; + case 7: + message.headernum = reader.uint32(); + break; + case 8: + message.paraHeadernum = reader.uint32(); + break; + case 9: + message.blocknum = reader.uint32(); + break; + case 10: + message.stateRoot = reader.string(); + break; + case 11: + message.devMode = reader.bool(); + break; + case 12: + message.pendingMessages = reader.uint64(); + break; + case 13: + message.score = reader.uint64(); + break; + case 14: + message.gatekeeper = $root.pruntime_rpc.GatekeeperStatus.decode( + reader, + reader.uint32() + ); + break; + case 15: + message.version = reader.string(); + break; + case 16: + message.gitRevision = reader.string(); + break; + case 17: + message.runningSideTasks = reader.uint64(); + break; + case 18: + message.memoryUsage = $root.pruntime_rpc.MemoryUsage.decode( + reader, + reader.uint32() + ); + break; + case 21: + message.waitingForParaheaders = reader.bool(); + break; + case 22: + message.networkStatus = $root.pruntime_rpc.NetworkStatus.decode( + reader, + reader.uint32() + ); + break; + case 23: + message.system = $root.pruntime_rpc.SystemInfo.decode( + reader, + reader.uint32() + ); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PhactoryInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pruntime_rpc.PhactoryInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pruntime_rpc.PhactoryInfo} PhactoryInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhactoryInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PhactoryInfo message. + * @function verify + * @memberof pruntime_rpc.PhactoryInfo + * @static + * @param {Object.<string,*>} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PhactoryInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if (message.initialized != null && message.hasOwnProperty("initialized")) + if (typeof message.initialized !== "boolean") + return "initialized: boolean expected"; + if (message.registered != null && message.hasOwnProperty("registered")) + if (typeof message.registered !== "boolean") + return "registered: boolean expected"; + if ( + message.genesisBlockHash != null && + message.hasOwnProperty("genesisBlockHash") + ) { + properties._genesisBlockHash = 1; + if (!$util.isString(message.genesisBlockHash)) + return "genesisBlockHash: string expected"; + } + if (message.publicKey != null && message.hasOwnProperty("publicKey")) { + properties._publicKey = 1; + if (!$util.isString(message.publicKey)) + return "publicKey: string expected"; + } + if ( + message.ecdhPublicKey != null && + message.hasOwnProperty("ecdhPublicKey") + ) { + properties._ecdhPublicKey = 1; + if (!$util.isString(message.ecdhPublicKey)) + return "ecdhPublicKey: string expected"; + } + if (message.headernum != null && message.hasOwnProperty("headernum")) + if (!$util.isInteger(message.headernum)) + return "headernum: integer expected"; + if ( + message.paraHeadernum != null && + message.hasOwnProperty("paraHeadernum") + ) + if (!$util.isInteger(message.paraHeadernum)) + return "paraHeadernum: integer expected"; + if (message.blocknum != null && message.hasOwnProperty("blocknum")) + if (!$util.isInteger(message.blocknum)) + return "blocknum: integer expected"; + if (message.stateRoot != null && message.hasOwnProperty("stateRoot")) + if (!$util.isString(message.stateRoot)) + return "stateRoot: string expected"; + if (message.devMode != null && message.hasOwnProperty("devMode")) + if (typeof message.devMode !== "boolean") + return "devMode: boolean expected"; + if ( + message.pendingMessages != null && + message.hasOwnProperty("pendingMessages") + ) + if ( + !$util.isInteger(message.pendingMessages) && + !( + message.pendingMessages && + $util.isInteger(message.pendingMessages.low) && + $util.isInteger(message.pendingMessages.high) + ) + ) + return "pendingMessages: integer|Long expected"; + if (message.score != null && message.hasOwnProperty("score")) + if ( + !$util.isInteger(message.score) && + !( + message.score && + $util.isInteger(message.score.low) && + $util.isInteger(message.score.high) + ) + ) + return "score: integer|Long expected"; + if (message.gatekeeper != null && message.hasOwnProperty("gatekeeper")) { + let error = $root.pruntime_rpc.GatekeeperStatus.verify( + message.gatekeeper + ); + if (error) return "gatekeeper." + error; + } + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) return "version: string expected"; + if (message.gitRevision != null && message.hasOwnProperty("gitRevision")) + if (!$util.isString(message.gitRevision)) + return "gitRevision: string expected"; + if ( + message.runningSideTasks != null && + message.hasOwnProperty("runningSideTasks") + ) + if ( + !$util.isInteger(message.runningSideTasks) && + !( + message.runningSideTasks && + $util.isInteger(message.runningSideTasks.low) && + $util.isInteger(message.runningSideTasks.high) + ) + ) + return "runningSideTasks: integer|Long expected"; + if ( + message.memoryUsage != null && + message.hasOwnProperty("memoryUsage") + ) { + let error = $root.pruntime_rpc.MemoryUsage.verify(message.memoryUsage); + if (error) return "memoryUsage." + error; + } + if ( + message.waitingForParaheaders != null && + message.hasOwnProperty("waitingForParaheaders") + ) + if (typeof message.waitingForParaheaders !== "boolean") + return "waitingForParaheaders: boolean expected"; + if ( + message.networkStatus != null && + message.hasOwnProperty("networkStatus") + ) { + let error = $root.pruntime_rpc.NetworkStatus.verify( + message.networkStatus + ); + if (error) return "networkStatus." + error; + } + if (message.system != null && message.hasOwnProperty("system")) { + let error = $root.pruntime_rpc.SystemInfo.verify(message.system); + if (error) return "system." + error; + } + return null; + }; + + /** + * Creates a PhactoryInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pruntime_rpc.PhactoryInfo + * @static + * @param {Object.<string,*>} object Plain object + * @returns {pruntime_rpc.PhactoryInfo} PhactoryInfo + */ + PhactoryInfo.fromObject = function fromObject(object) { + if (object instanceof $root.pruntime_rpc.PhactoryInfo) return object; + let message = new $root.pruntime_rpc.PhactoryInfo(); + if (object.initialized != null) + message.initialized = Boolean(object.initialized); + if (object.registered != null) + message.registered = Boolean(object.registered); + if (object.genesisBlockHash != null) + message.genesisBlockHash = String(object.genesisBlockHash); + if (object.publicKey != null) + message.publicKey = String(object.publicKey); + if (object.ecdhPublicKey != null) + message.ecdhPublicKey = String(object.ecdhPublicKey); + if (object.headernum != null) message.headernum = object.headernum >>> 0; + if (object.paraHeadernum != null) + message.paraHeadernum = object.paraHeadernum >>> 0; + if (object.blocknum != null) message.blocknum = object.blocknum >>> 0; + if (object.stateRoot != null) + message.stateRoot = String(object.stateRoot); + if (object.devMode != null) message.devMode = Boolean(object.devMode); + if (object.pendingMessages != null) + if ($util.Long) + (message.pendingMessages = $util.Long.fromValue( + object.pendingMessages + )).unsigned = true; + else if (typeof object.pendingMessages === "string") + message.pendingMessages = parseInt(object.pendingMessages, 10); + else if (typeof object.pendingMessages === "number") + message.pendingMessages = object.pendingMessages; + else if (typeof object.pendingMessages === "object") + message.pendingMessages = new $util.LongBits( + object.pendingMessages.low >>> 0, + object.pendingMessages.high >>> 0 + ).toNumber(true); + if (object.score != null) + if ($util.Long) + (message.score = $util.Long.fromValue(object.score)).unsigned = true; + else if (typeof object.score === "string") + message.score = parseInt(object.score, 10); + else if (typeof object.score === "number") message.score = object.score; + else if (typeof object.score === "object") + message.score = new $util.LongBits( + object.score.low >>> 0, + object.score.high >>> 0 + ).toNumber(true); + if (object.gatekeeper != null) { + if (typeof object.gatekeeper !== "object") + throw TypeError( + ".pruntime_rpc.PhactoryInfo.gatekeeper: object expected" + ); + message.gatekeeper = $root.pruntime_rpc.GatekeeperStatus.fromObject( + object.gatekeeper + ); + } + if (object.version != null) message.version = String(object.version); + if (object.gitRevision != null) + message.gitRevision = String(object.gitRevision); + if (object.runningSideTasks != null) + if ($util.Long) + (message.runningSideTasks = $util.Long.fromValue( + object.runningSideTasks + )).unsigned = true; + else if (typeof object.runningSideTasks === "string") + message.runningSideTasks = parseInt(object.runningSideTasks, 10); + else if (typeof object.runningSideTasks === "number") + message.runningSideTasks = object.runningSideTasks; + else if (typeof object.runningSideTasks === "object") + message.runningSideTasks = new $util.LongBits( + object.runningSideTasks.low >>> 0, + object.runningSideTasks.high >>> 0 + ).toNumber(true); + if (object.memoryUsage != null) { + if (typeof object.memoryUsage !== "object") + throw TypeError( + ".pruntime_rpc.PhactoryInfo.memoryUsage: object expected" + ); + message.memoryUsage = $root.pruntime_rpc.MemoryUsage.fromObject( + object.memoryUsage + ); + } + if (object.waitingForParaheaders != null) + message.waitingForParaheaders = Boolean(object.waitingForParaheaders); + if (object.networkStatus != null) { + if (typeof object.networkStatus !== "object") + throw TypeError( + ".pruntime_rpc.PhactoryInfo.networkStatus: object expected" + ); + message.networkStatus = $root.pruntime_rpc.NetworkStatus.fromObject( + object.networkStatus + ); + } + if (object.system != null) { + if (typeof object.system !== "object") + throw TypeError(".pruntime_rpc.PhactoryInfo.system: object expected"); + message.system = $root.pruntime_rpc.SystemInfo.fromObject( + object.system + ); + } + return message; + }; + + /** + * Creates a plain object from a PhactoryInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof pruntime_rpc.PhactoryInfo + * @static + * @param {pruntime_rpc.PhactoryInfo} message PhactoryInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.<string,*>} Plain object + */ + PhactoryInfo.toObject = function toObject(message, options) { + if (!options) options = {}; + let object = {}; + if (options.defaults) { + object.initialized = false; + object.registered = false; + object.headernum = 0; + object.paraHeadernum = 0; + object.blocknum = 0; + object.stateRoot = ""; + object.devMode = false; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.pendingMessages = + options.longs === String + ? long.toString() + : options.longs === Number + ? long.toNumber() + : long; + } else object.pendingMessages = options.longs === String ? "0" : 0; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.score = + options.longs === String + ? long.toString() + : options.longs === Number + ? long.toNumber() + : long; + } else object.score = options.longs === String ? "0" : 0; + object.gatekeeper = null; + object.version = ""; + object.gitRevision = ""; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.runningSideTasks = + options.longs === String + ? long.toString() + : options.longs === Number + ? long.toNumber() + : long; + } else object.runningSideTasks = options.longs === String ? "0" : 0; + object.memoryUsage = null; + object.waitingForParaheaders = false; + object.networkStatus = null; + object.system = null; + } + if (message.initialized != null && message.hasOwnProperty("initialized")) + object.initialized = message.initialized; + if (message.registered != null && message.hasOwnProperty("registered")) + object.registered = message.registered; + if ( + message.genesisBlockHash != null && + message.hasOwnProperty("genesisBlockHash") + ) { + object.genesisBlockHash = message.genesisBlockHash; + if (options.oneofs) object._genesisBlockHash = "genesisBlockHash"; + } + if (message.publicKey != null && message.hasOwnProperty("publicKey")) { + object.publicKey = message.publicKey; + if (options.oneofs) object._publicKey = "publicKey"; + } + if ( + message.ecdhPublicKey != null && + message.hasOwnProperty("ecdhPublicKey") + ) { + object.ecdhPublicKey = message.ecdhPublicKey; + if (options.oneofs) object._ecdhPublicKey = "ecdhPublicKey"; + } + if (message.headernum != null && message.hasOwnProperty("headernum")) + object.headernum = message.headernum; + if ( + message.paraHeadernum != null && + message.hasOwnProperty("paraHeadernum") + ) + object.paraHeadernum = message.paraHeadernum; + if (message.blocknum != null && message.hasOwnProperty("blocknum")) + object.blocknum = message.blocknum; + if (message.stateRoot != null && message.hasOwnProperty("stateRoot")) + object.stateRoot = message.stateRoot; + if (message.devMode != null && message.hasOwnProperty("devMode")) + object.devMode = message.devMode; + if ( + message.pendingMessages != null && + message.hasOwnProperty("pendingMessages") + ) + if (typeof message.pendingMessages === "number") + object.pendingMessages = + options.longs === String + ? String(message.pendingMessages) + : message.pendingMessages; + else + object.pendingMessages = + options.longs === String + ? $util.Long.prototype.toString.call(message.pendingMessages) + : options.longs === Number + ? new $util.LongBits( + message.pendingMessages.low >>> 0, + message.pendingMessages.high >>> 0 + ).toNumber(true) + : message.pendingMessages; + if (message.score != null && message.hasOwnProperty("score")) + if (typeof message.score === "number") + object.score = + options.longs === String ? String(message.score) : message.score; + else + object.score = + options.longs === String + ? $util.Long.prototype.toString.call(message.score) + : options.longs === Number + ? new $util.LongBits( + message.score.low >>> 0, + message.score.high >>> 0 + ).toNumber(true) + : message.score; + if (message.gatekeeper != null && message.hasOwnProperty("gatekeeper")) + object.gatekeeper = $root.pruntime_rpc.GatekeeperStatus.toObject( + message.gatekeeper, + options + ); + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.gitRevision != null && message.hasOwnProperty("gitRevision")) + object.gitRevision = message.gitRevision; + if ( + message.runningSideTasks != null && + message.hasOwnProperty("runningSideTasks") + ) + if (typeof message.runningSideTasks === "number") + object.runningSideTasks = + options.longs === String + ? String(message.runningSideTasks) + : message.runningSideTasks; + else + object.runningSideTasks = + options.longs === String + ? $util.Long.prototype.toString.call(message.runningSideTasks) + : options.longs === Number + ? new $util.LongBits( + message.runningSideTasks.low >>> 0, + message.runningSideTasks.high >>> 0 + ).toNumber(true) + : message.runningSideTasks; + if (message.memoryUsage != null && message.hasOwnProperty("memoryUsage")) + object.memoryUsage = $root.pruntime_rpc.MemoryUsage.toObject( + message.memoryUsage, + options + ); + if ( + message.waitingForParaheaders != null && + message.hasOwnProperty("waitingForParaheaders") + ) + object.waitingForParaheaders = message.waitingForParaheaders; + if ( + message.networkStatus != null && + message.hasOwnProperty("networkStatus") + ) + object.networkStatus = $root.pruntime_rpc.NetworkStatus.toObject( + message.networkStatus, + options + ); + if (message.system != null && message.hasOwnProperty("system")) + object.system = $root.pruntime_rpc.SystemInfo.toObject( + message.system, + options + ); + return object; + }; + + /** + * Converts this PhactoryInfo to JSON. + * @function toJSON + * @memberof pruntime_rpc.PhactoryInfo + * @instance + * @returns {Object.<string,*>} JSON object + */ + PhactoryInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PhactoryInfo; + })(); + + pruntime_rpc.SystemInfo = (function () { + /** + * Properties of a SystemInfo. + * @memberof pruntime_rpc + * @interface ISystemInfo + * @property {boolean|null} [registered] SystemInfo registered + * @property {string|null} [publicKey] SystemInfo publicKey + * @property {string|null} [ecdhPublicKey] SystemInfo ecdhPublicKey + * @property {pruntime_rpc.IGatekeeperStatus|null} [gatekeeper] SystemInfo gatekeeper + * @property {number|Long|null} [numberOfClusters] SystemInfo numberOfClusters + * @property {number|Long|null} [numberOfContracts] SystemInfo numberOfContracts + * @property {number|null} [consensusVersion] SystemInfo consensusVersion + * @property {number|null} [maxSupportedConsensusVersion] SystemInfo maxSupportedConsensusVersion + */ + + /** + * Constructs a new SystemInfo. + * @memberof pruntime_rpc + * @classdesc Represents a SystemInfo. + * @implements ISystemInfo + * @constructor + * @param {pruntime_rpc.ISystemInfo=} [properties] Properties to set + */ + function SystemInfo(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + } + + /** + * SystemInfo registered. + * @member {boolean} registered + * @memberof pruntime_rpc.SystemInfo + * @instance + */ + SystemInfo.prototype.registered = false; + + /** + * SystemInfo publicKey. + * @member {string} publicKey + * @memberof pruntime_rpc.SystemInfo + * @instance + */ + SystemInfo.prototype.publicKey = ""; + + /** + * SystemInfo ecdhPublicKey. + * @member {string} ecdhPublicKey + * @memberof pruntime_rpc.SystemInfo + * @instance + */ + SystemInfo.prototype.ecdhPublicKey = ""; + + /** + * SystemInfo gatekeeper. + * @member {pruntime_rpc.IGatekeeperStatus|null|undefined} gatekeeper + * @memberof pruntime_rpc.SystemInfo + * @instance + */ + SystemInfo.prototype.gatekeeper = null; + + /** + * SystemInfo numberOfClusters. + * @member {number|Long} numberOfClusters + * @memberof pruntime_rpc.SystemInfo + * @instance + */ + SystemInfo.prototype.numberOfClusters = $util.Long + ? $util.Long.fromBits(0, 0, true) + : 0; + + /** + * SystemInfo numberOfContracts. + * @member {number|Long} numberOfContracts + * @memberof pruntime_rpc.SystemInfo + * @instance + */ + SystemInfo.prototype.numberOfContracts = $util.Long + ? $util.Long.fromBits(0, 0, true) + : 0; + + /** + * SystemInfo consensusVersion. + * @member {number} consensusVersion + * @memberof pruntime_rpc.SystemInfo + * @instance + */ + SystemInfo.prototype.consensusVersion = 0; + + /** + * SystemInfo maxSupportedConsensusVersion. + * @member {number} maxSupportedConsensusVersion + * @memberof pruntime_rpc.SystemInfo + * @instance + */ + SystemInfo.prototype.maxSupportedConsensusVersion = 0; + + /** + * Creates a new SystemInfo instance using the specified properties. + * @function create + * @memberof pruntime_rpc.SystemInfo + * @static + * @param {pruntime_rpc.ISystemInfo=} [properties] Properties to set + * @returns {pruntime_rpc.SystemInfo} SystemInfo instance + */ + SystemInfo.create = function create(properties) { + return new SystemInfo(properties); + }; + + /** + * Encodes the specified SystemInfo message. Does not implicitly {@link pruntime_rpc.SystemInfo.verify|verify} messages. + * @function encode + * @memberof pruntime_rpc.SystemInfo + * @static + * @param {pruntime_rpc.ISystemInfo} message SystemInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SystemInfo.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.publicKey != null && + Object.hasOwnProperty.call(message, "publicKey") + ) + writer.uint32(/* id 2, wireType 2 =*/ 18).string(message.publicKey); + if ( + message.ecdhPublicKey != null && + Object.hasOwnProperty.call(message, "ecdhPublicKey") + ) + writer.uint32(/* id 3, wireType 2 =*/ 26).string(message.ecdhPublicKey); + if ( + message.gatekeeper != null && + Object.hasOwnProperty.call(message, "gatekeeper") + ) + $root.pruntime_rpc.GatekeeperStatus.encode( + message.gatekeeper, + writer.uint32(/* id 4, wireType 2 =*/ 34).fork() + ).ldelim(); + if ( + message.numberOfClusters != null && + Object.hasOwnProperty.call(message, "numberOfClusters") + ) + writer + .uint32(/* id 5, wireType 0 =*/ 40) + .uint64(message.numberOfClusters); + if ( + message.numberOfContracts != null && + Object.hasOwnProperty.call(message, "numberOfContracts") + ) + writer + .uint32(/* id 6, wireType 0 =*/ 48) + .uint64(message.numberOfContracts); + if ( + message.consensusVersion != null && + Object.hasOwnProperty.call(message, "consensusVersion") + ) + writer + .uint32(/* id 7, wireType 0 =*/ 56) + .uint32(message.consensusVersion); + if ( + message.maxSupportedConsensusVersion != null && + Object.hasOwnProperty.call(message, "maxSupportedConsensusVersion") + ) + writer + .uint32(/* id 8, wireType 0 =*/ 64) + .uint32(message.maxSupportedConsensusVersion); + return writer; + }; + + /** + * Encodes the specified SystemInfo message, length delimited. Does not implicitly {@link pruntime_rpc.SystemInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof pruntime_rpc.SystemInfo + * @static + * @param {pruntime_rpc.ISystemInfo} message SystemInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SystemInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SystemInfo message from the specified reader or buffer. + * @function decode + * @memberof pruntime_rpc.SystemInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pruntime_rpc.SystemInfo} SystemInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SystemInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pruntime_rpc.SystemInfo(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.registered = reader.bool(); + break; + case 2: + message.publicKey = reader.string(); + break; + case 3: + message.ecdhPublicKey = reader.string(); + break; + case 4: + message.gatekeeper = $root.pruntime_rpc.GatekeeperStatus.decode( + reader, + reader.uint32() + ); + break; + case 5: + message.numberOfClusters = reader.uint64(); + break; + case 6: + message.numberOfContracts = reader.uint64(); + break; + case 7: + message.consensusVersion = reader.uint32(); + break; + case 8: + message.maxSupportedConsensusVersion = reader.uint32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SystemInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pruntime_rpc.SystemInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pruntime_rpc.SystemInfo} SystemInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SystemInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SystemInfo message. + * @function verify + * @memberof pruntime_rpc.SystemInfo + * @static + * @param {Object.<string,*>} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SystemInfo.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.publicKey != null && message.hasOwnProperty("publicKey")) + if (!$util.isString(message.publicKey)) + return "publicKey: string expected"; + if ( + message.ecdhPublicKey != null && + message.hasOwnProperty("ecdhPublicKey") + ) + if (!$util.isString(message.ecdhPublicKey)) + return "ecdhPublicKey: string expected"; + if (message.gatekeeper != null && message.hasOwnProperty("gatekeeper")) { + let error = $root.pruntime_rpc.GatekeeperStatus.verify( + message.gatekeeper + ); + if (error) return "gatekeeper." + error; + } + if ( + message.numberOfClusters != null && + message.hasOwnProperty("numberOfClusters") + ) + if ( + !$util.isInteger(message.numberOfClusters) && + !( + message.numberOfClusters && + $util.isInteger(message.numberOfClusters.low) && + $util.isInteger(message.numberOfClusters.high) + ) + ) + return "numberOfClusters: integer|Long expected"; + if ( + message.numberOfContracts != null && + message.hasOwnProperty("numberOfContracts") + ) + if ( + !$util.isInteger(message.numberOfContracts) && + !( + message.numberOfContracts && + $util.isInteger(message.numberOfContracts.low) && + $util.isInteger(message.numberOfContracts.high) + ) + ) + return "numberOfContracts: integer|Long expected"; + if ( + message.consensusVersion != null && + message.hasOwnProperty("consensusVersion") + ) + if (!$util.isInteger(message.consensusVersion)) + return "consensusVersion: integer expected"; + if ( + message.maxSupportedConsensusVersion != null && + message.hasOwnProperty("maxSupportedConsensusVersion") + ) + if (!$util.isInteger(message.maxSupportedConsensusVersion)) + return "maxSupportedConsensusVersion: integer expected"; + return null; + }; + + /** + * Creates a SystemInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pruntime_rpc.SystemInfo + * @static + * @param {Object.<string,*>} object Plain object + * @returns {pruntime_rpc.SystemInfo} SystemInfo + */ + SystemInfo.fromObject = function fromObject(object) { + if (object instanceof $root.pruntime_rpc.SystemInfo) return object; + let message = new $root.pruntime_rpc.SystemInfo(); + if (object.registered != null) + message.registered = Boolean(object.registered); + if (object.publicKey != null) + message.publicKey = String(object.publicKey); + if (object.ecdhPublicKey != null) + message.ecdhPublicKey = String(object.ecdhPublicKey); + if (object.gatekeeper != null) { + if (typeof object.gatekeeper !== "object") + throw TypeError( + ".pruntime_rpc.SystemInfo.gatekeeper: object expected" + ); + message.gatekeeper = $root.pruntime_rpc.GatekeeperStatus.fromObject( + object.gatekeeper + ); + } + if (object.numberOfClusters != null) + if ($util.Long) + (message.numberOfClusters = $util.Long.fromValue( + object.numberOfClusters + )).unsigned = true; + else if (typeof object.numberOfClusters === "string") + message.numberOfClusters = parseInt(object.numberOfClusters, 10); + else if (typeof object.numberOfClusters === "number") + message.numberOfClusters = object.numberOfClusters; + else if (typeof object.numberOfClusters === "object") + message.numberOfClusters = new $util.LongBits( + object.numberOfClusters.low >>> 0, + object.numberOfClusters.high >>> 0 + ).toNumber(true); + if (object.numberOfContracts != null) + if ($util.Long) + (message.numberOfContracts = $util.Long.fromValue( + object.numberOfContracts + )).unsigned = true; + else if (typeof object.numberOfContracts === "string") + message.numberOfContracts = parseInt(object.numberOfContracts, 10); + else if (typeof object.numberOfContracts === "number") + message.numberOfContracts = object.numberOfContracts; + else if (typeof object.numberOfContracts === "object") + message.numberOfContracts = new $util.LongBits( + object.numberOfContracts.low >>> 0, + object.numberOfContracts.high >>> 0 + ).toNumber(true); + if (object.consensusVersion != null) + message.consensusVersion = object.consensusVersion >>> 0; + if (object.maxSupportedConsensusVersion != null) + message.maxSupportedConsensusVersion = + object.maxSupportedConsensusVersion >>> 0; + return message; + }; + + /** + * Creates a plain object from a SystemInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof pruntime_rpc.SystemInfo + * @static + * @param {pruntime_rpc.SystemInfo} message SystemInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.<string,*>} Plain object + */ + SystemInfo.toObject = function toObject(message, options) { + if (!options) options = {}; + let object = {}; + if (options.defaults) { + object.registered = false; + object.publicKey = ""; + object.ecdhPublicKey = ""; + object.gatekeeper = null; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.numberOfClusters = + options.longs === String + ? long.toString() + : options.longs === Number + ? long.toNumber() + : long; + } else object.numberOfClusters = options.longs === String ? "0" : 0; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.numberOfContracts = + options.longs === String + ? long.toString() + : options.longs === Number + ? long.toNumber() + : long; + } else object.numberOfContracts = options.longs === String ? "0" : 0; + object.consensusVersion = 0; + object.maxSupportedConsensusVersion = 0; + } + if (message.registered != null && message.hasOwnProperty("registered")) + object.registered = message.registered; + if (message.publicKey != null && message.hasOwnProperty("publicKey")) + object.publicKey = message.publicKey; + if ( + message.ecdhPublicKey != null && + message.hasOwnProperty("ecdhPublicKey") + ) + object.ecdhPublicKey = message.ecdhPublicKey; + if (message.gatekeeper != null && message.hasOwnProperty("gatekeeper")) + object.gatekeeper = $root.pruntime_rpc.GatekeeperStatus.toObject( + message.gatekeeper, + options + ); + if ( + message.numberOfClusters != null && + message.hasOwnProperty("numberOfClusters") + ) + if (typeof message.numberOfClusters === "number") + object.numberOfClusters = + options.longs === String + ? String(message.numberOfClusters) + : message.numberOfClusters; + else + object.numberOfClusters = + options.longs === String + ? $util.Long.prototype.toString.call(message.numberOfClusters) + : options.longs === Number + ? new $util.LongBits( + message.numberOfClusters.low >>> 0, + message.numberOfClusters.high >>> 0 + ).toNumber(true) + : message.numberOfClusters; + if ( + message.numberOfContracts != null && + message.hasOwnProperty("numberOfContracts") + ) + if (typeof message.numberOfContracts === "number") + object.numberOfContracts = + options.longs === String + ? String(message.numberOfContracts) + : message.numberOfContracts; + else + object.numberOfContracts = + options.longs === String + ? $util.Long.prototype.toString.call(message.numberOfContracts) + : options.longs === Number + ? new $util.LongBits( + message.numberOfContracts.low >>> 0, + message.numberOfContracts.high >>> 0 + ).toNumber(true) + : message.numberOfContracts; + if ( + message.consensusVersion != null && + message.hasOwnProperty("consensusVersion") + ) + object.consensusVersion = message.consensusVersion; + if ( + message.maxSupportedConsensusVersion != null && + message.hasOwnProperty("maxSupportedConsensusVersion") + ) + object.maxSupportedConsensusVersion = + message.maxSupportedConsensusVersion; + return object; + }; + + /** + * Converts this SystemInfo to JSON. + * @function toJSON + * @memberof pruntime_rpc.SystemInfo + * @instance + * @returns {Object.<string,*>} JSON object + */ + SystemInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SystemInfo; + })(); + + /** + * GatekeeperRole enum. + * @name pruntime_rpc.GatekeeperRole + * @enum {number} + * @property {number} None=0 None value + * @property {number} Dummy=1 Dummy value + * @property {number} Active=2 Active value + */ + pruntime_rpc.GatekeeperRole = (function () { + const valuesById = {}, + values = Object.create(valuesById); + values[(valuesById[0] = "None")] = 0; + values[(valuesById[1] = "Dummy")] = 1; + values[(valuesById[2] = "Active")] = 2; + return values; + })(); + + pruntime_rpc.GatekeeperStatus = (function () { + /** + * Properties of a GatekeeperStatus. + * @memberof pruntime_rpc + * @interface IGatekeeperStatus + * @property {pruntime_rpc.GatekeeperRole|null} [role] GatekeeperStatus role + * @property {string|null} [masterPublicKey] GatekeeperStatus masterPublicKey + */ + + /** + * Constructs a new GatekeeperStatus. + * @memberof pruntime_rpc + * @classdesc Represents a GatekeeperStatus. + * @implements IGatekeeperStatus + * @constructor + * @param {pruntime_rpc.IGatekeeperStatus=} [properties] Properties to set + */ + function GatekeeperStatus(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + } + + /** + * GatekeeperStatus role. + * @member {pruntime_rpc.GatekeeperRole} role + * @memberof pruntime_rpc.GatekeeperStatus + * @instance + */ + GatekeeperStatus.prototype.role = 0; + + /** + * GatekeeperStatus masterPublicKey. + * @member {string} masterPublicKey + * @memberof pruntime_rpc.GatekeeperStatus + * @instance + */ + GatekeeperStatus.prototype.masterPublicKey = ""; + + /** + * Creates a new GatekeeperStatus instance using the specified properties. + * @function create + * @memberof pruntime_rpc.GatekeeperStatus + * @static + * @param {pruntime_rpc.IGatekeeperStatus=} [properties] Properties to set + * @returns {pruntime_rpc.GatekeeperStatus} GatekeeperStatus instance + */ + GatekeeperStatus.create = function create(properties) { + return new GatekeeperStatus(properties); + }; + + /** + * Encodes the specified GatekeeperStatus message. Does not implicitly {@link pruntime_rpc.GatekeeperStatus.verify|verify} messages. + * @function encode + * @memberof pruntime_rpc.GatekeeperStatus + * @static + * @param {pruntime_rpc.IGatekeeperStatus} message GatekeeperStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GatekeeperStatus.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if (message.role != null && Object.hasOwnProperty.call(message, "role")) + writer.uint32(/* id 1, wireType 0 =*/ 8).int32(message.role); + if ( + message.masterPublicKey != null && + Object.hasOwnProperty.call(message, "masterPublicKey") + ) + writer + .uint32(/* id 2, wireType 2 =*/ 18) + .string(message.masterPublicKey); + return writer; + }; + + /** + * Encodes the specified GatekeeperStatus message, length delimited. Does not implicitly {@link pruntime_rpc.GatekeeperStatus.verify|verify} messages. + * @function encodeDelimited + * @memberof pruntime_rpc.GatekeeperStatus + * @static + * @param {pruntime_rpc.IGatekeeperStatus} message GatekeeperStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GatekeeperStatus.encodeDelimited = function encodeDelimited( + message, + writer + ) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GatekeeperStatus message from the specified reader or buffer. + * @function decode + * @memberof pruntime_rpc.GatekeeperStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pruntime_rpc.GatekeeperStatus} GatekeeperStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GatekeeperStatus.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pruntime_rpc.GatekeeperStatus(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.role = reader.int32(); + break; + case 2: + message.masterPublicKey = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GatekeeperStatus message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pruntime_rpc.GatekeeperStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pruntime_rpc.GatekeeperStatus} GatekeeperStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GatekeeperStatus.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GatekeeperStatus message. + * @function verify + * @memberof pruntime_rpc.GatekeeperStatus + * @static + * @param {Object.<string,*>} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GatekeeperStatus.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.role != null && message.hasOwnProperty("role")) + switch (message.role) { + default: + return "role: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if ( + message.masterPublicKey != null && + message.hasOwnProperty("masterPublicKey") + ) + if (!$util.isString(message.masterPublicKey)) + return "masterPublicKey: string expected"; + return null; + }; + + /** + * Creates a GatekeeperStatus message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pruntime_rpc.GatekeeperStatus + * @static + * @param {Object.<string,*>} object Plain object + * @returns {pruntime_rpc.GatekeeperStatus} GatekeeperStatus + */ + GatekeeperStatus.fromObject = function fromObject(object) { + if (object instanceof $root.pruntime_rpc.GatekeeperStatus) return object; + let message = new $root.pruntime_rpc.GatekeeperStatus(); + switch (object.role) { + case "None": + case 0: + message.role = 0; + break; + case "Dummy": + case 1: + message.role = 1; + break; + case "Active": + case 2: + message.role = 2; + break; + } + if (object.masterPublicKey != null) + message.masterPublicKey = String(object.masterPublicKey); + return message; + }; + + /** + * Creates a plain object from a GatekeeperStatus message. Also converts values to other types if specified. + * @function toObject + * @memberof pruntime_rpc.GatekeeperStatus + * @static + * @param {pruntime_rpc.GatekeeperStatus} message GatekeeperStatus + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.<string,*>} Plain object + */ + GatekeeperStatus.toObject = function toObject(message, options) { + if (!options) options = {}; + let object = {}; + if (options.defaults) { + object.role = options.enums === String ? "None" : 0; + object.masterPublicKey = ""; + } + if (message.role != null && message.hasOwnProperty("role")) + object.role = + options.enums === String + ? $root.pruntime_rpc.GatekeeperRole[message.role] + : message.role; + if ( + message.masterPublicKey != null && + message.hasOwnProperty("masterPublicKey") + ) + object.masterPublicKey = message.masterPublicKey; + return object; + }; + + /** + * Converts this GatekeeperStatus to JSON. + * @function toJSON + * @memberof pruntime_rpc.GatekeeperStatus + * @instance + * @returns {Object.<string,*>} JSON object + */ + GatekeeperStatus.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GatekeeperStatus; + })(); + + pruntime_rpc.MemoryUsage = (function () { + /** + * Properties of a MemoryUsage. + * @memberof pruntime_rpc + * @interface IMemoryUsage + * @property {number|Long|null} [rustUsed] MemoryUsage rustUsed + * @property {number|Long|null} [rustPeakUsed] MemoryUsage rustPeakUsed + * @property {number|Long|null} [totalPeakUsed] MemoryUsage totalPeakUsed + */ + + /** + * Constructs a new MemoryUsage. + * @memberof pruntime_rpc + * @classdesc Represents a MemoryUsage. + * @implements IMemoryUsage + * @constructor + * @param {pruntime_rpc.IMemoryUsage=} [properties] Properties to set + */ + function MemoryUsage(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + } + + /** + * MemoryUsage rustUsed. + * @member {number|Long} rustUsed + * @memberof pruntime_rpc.MemoryUsage + * @instance + */ + MemoryUsage.prototype.rustUsed = $util.Long + ? $util.Long.fromBits(0, 0, true) + : 0; + + /** + * MemoryUsage rustPeakUsed. + * @member {number|Long} rustPeakUsed + * @memberof pruntime_rpc.MemoryUsage + * @instance + */ + MemoryUsage.prototype.rustPeakUsed = $util.Long + ? $util.Long.fromBits(0, 0, true) + : 0; + + /** + * MemoryUsage totalPeakUsed. + * @member {number|Long} totalPeakUsed + * @memberof pruntime_rpc.MemoryUsage + * @instance + */ + MemoryUsage.prototype.totalPeakUsed = $util.Long + ? $util.Long.fromBits(0, 0, true) + : 0; + + /** + * Creates a new MemoryUsage instance using the specified properties. + * @function create + * @memberof pruntime_rpc.MemoryUsage + * @static + * @param {pruntime_rpc.IMemoryUsage=} [properties] Properties to set + * @returns {pruntime_rpc.MemoryUsage} MemoryUsage instance + */ + MemoryUsage.create = function create(properties) { + return new MemoryUsage(properties); + }; + + /** + * Encodes the specified MemoryUsage message. Does not implicitly {@link pruntime_rpc.MemoryUsage.verify|verify} messages. + * @function encode + * @memberof pruntime_rpc.MemoryUsage + * @static + * @param {pruntime_rpc.IMemoryUsage} message MemoryUsage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MemoryUsage.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if ( + message.rustUsed != null && + Object.hasOwnProperty.call(message, "rustUsed") + ) + writer.uint32(/* id 1, wireType 0 =*/ 8).uint64(message.rustUsed); + if ( + message.rustPeakUsed != null && + Object.hasOwnProperty.call(message, "rustPeakUsed") + ) + writer.uint32(/* id 2, wireType 0 =*/ 16).uint64(message.rustPeakUsed); + if ( + message.totalPeakUsed != null && + Object.hasOwnProperty.call(message, "totalPeakUsed") + ) + writer.uint32(/* id 3, wireType 0 =*/ 24).uint64(message.totalPeakUsed); + return writer; + }; + + /** + * Encodes the specified MemoryUsage message, length delimited. Does not implicitly {@link pruntime_rpc.MemoryUsage.verify|verify} messages. + * @function encodeDelimited + * @memberof pruntime_rpc.MemoryUsage + * @static + * @param {pruntime_rpc.IMemoryUsage} message MemoryUsage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MemoryUsage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MemoryUsage message from the specified reader or buffer. + * @function decode + * @memberof pruntime_rpc.MemoryUsage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pruntime_rpc.MemoryUsage} MemoryUsage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MemoryUsage.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pruntime_rpc.MemoryUsage(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.rustUsed = reader.uint64(); + break; + case 2: + message.rustPeakUsed = reader.uint64(); + break; + case 3: + message.totalPeakUsed = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MemoryUsage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pruntime_rpc.MemoryUsage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pruntime_rpc.MemoryUsage} MemoryUsage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MemoryUsage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MemoryUsage message. + * @function verify + * @memberof pruntime_rpc.MemoryUsage + * @static + * @param {Object.<string,*>} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MemoryUsage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rustUsed != null && message.hasOwnProperty("rustUsed")) + if ( + !$util.isInteger(message.rustUsed) && + !( + message.rustUsed && + $util.isInteger(message.rustUsed.low) && + $util.isInteger(message.rustUsed.high) + ) + ) + return "rustUsed: integer|Long expected"; + if ( + message.rustPeakUsed != null && + message.hasOwnProperty("rustPeakUsed") + ) + if ( + !$util.isInteger(message.rustPeakUsed) && + !( + message.rustPeakUsed && + $util.isInteger(message.rustPeakUsed.low) && + $util.isInteger(message.rustPeakUsed.high) + ) + ) + return "rustPeakUsed: integer|Long expected"; + if ( + message.totalPeakUsed != null && + message.hasOwnProperty("totalPeakUsed") + ) + if ( + !$util.isInteger(message.totalPeakUsed) && + !( + message.totalPeakUsed && + $util.isInteger(message.totalPeakUsed.low) && + $util.isInteger(message.totalPeakUsed.high) + ) + ) + return "totalPeakUsed: integer|Long expected"; + return null; + }; + + /** + * Creates a MemoryUsage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pruntime_rpc.MemoryUsage + * @static + * @param {Object.<string,*>} object Plain object + * @returns {pruntime_rpc.MemoryUsage} MemoryUsage + */ + MemoryUsage.fromObject = function fromObject(object) { + if (object instanceof $root.pruntime_rpc.MemoryUsage) return object; + let message = new $root.pruntime_rpc.MemoryUsage(); + if (object.rustUsed != null) + if ($util.Long) + (message.rustUsed = $util.Long.fromValue( + object.rustUsed + )).unsigned = true; + else if (typeof object.rustUsed === "string") + message.rustUsed = parseInt(object.rustUsed, 10); + else if (typeof object.rustUsed === "number") + message.rustUsed = object.rustUsed; + else if (typeof object.rustUsed === "object") + message.rustUsed = new $util.LongBits( + object.rustUsed.low >>> 0, + object.rustUsed.high >>> 0 + ).toNumber(true); + if (object.rustPeakUsed != null) + if ($util.Long) + (message.rustPeakUsed = $util.Long.fromValue( + object.rustPeakUsed + )).unsigned = true; + else if (typeof object.rustPeakUsed === "string") + message.rustPeakUsed = parseInt(object.rustPeakUsed, 10); + else if (typeof object.rustPeakUsed === "number") + message.rustPeakUsed = object.rustPeakUsed; + else if (typeof object.rustPeakUsed === "object") + message.rustPeakUsed = new $util.LongBits( + object.rustPeakUsed.low >>> 0, + object.rustPeakUsed.high >>> 0 + ).toNumber(true); + if (object.totalPeakUsed != null) + if ($util.Long) + (message.totalPeakUsed = $util.Long.fromValue( + object.totalPeakUsed + )).unsigned = true; + else if (typeof object.totalPeakUsed === "string") + message.totalPeakUsed = parseInt(object.totalPeakUsed, 10); + else if (typeof object.totalPeakUsed === "number") + message.totalPeakUsed = object.totalPeakUsed; + else if (typeof object.totalPeakUsed === "object") + message.totalPeakUsed = new $util.LongBits( + object.totalPeakUsed.low >>> 0, + object.totalPeakUsed.high >>> 0 + ).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a MemoryUsage message. Also converts values to other types if specified. + * @function toObject + * @memberof pruntime_rpc.MemoryUsage + * @static + * @param {pruntime_rpc.MemoryUsage} message MemoryUsage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.<string,*>} Plain object + */ + MemoryUsage.toObject = function toObject(message, options) { + if (!options) options = {}; + let object = {}; + if (options.defaults) { + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.rustUsed = + options.longs === String + ? long.toString() + : options.longs === Number + ? long.toNumber() + : long; + } else object.rustUsed = options.longs === String ? "0" : 0; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.rustPeakUsed = + options.longs === String + ? long.toString() + : options.longs === Number + ? long.toNumber() + : long; + } else object.rustPeakUsed = options.longs === String ? "0" : 0; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.totalPeakUsed = + options.longs === String + ? long.toString() + : options.longs === Number + ? long.toNumber() + : long; + } else object.totalPeakUsed = options.longs === String ? "0" : 0; + } + if (message.rustUsed != null && message.hasOwnProperty("rustUsed")) + if (typeof message.rustUsed === "number") + object.rustUsed = + options.longs === String + ? String(message.rustUsed) + : message.rustUsed; + else + object.rustUsed = + options.longs === String + ? $util.Long.prototype.toString.call(message.rustUsed) + : options.longs === Number + ? new $util.LongBits( + message.rustUsed.low >>> 0, + message.rustUsed.high >>> 0 + ).toNumber(true) + : message.rustUsed; + if ( + message.rustPeakUsed != null && + message.hasOwnProperty("rustPeakUsed") + ) + if (typeof message.rustPeakUsed === "number") + object.rustPeakUsed = + options.longs === String + ? String(message.rustPeakUsed) + : message.rustPeakUsed; + else + object.rustPeakUsed = + options.longs === String + ? $util.Long.prototype.toString.call(message.rustPeakUsed) + : options.longs === Number + ? new $util.LongBits( + message.rustPeakUsed.low >>> 0, + message.rustPeakUsed.high >>> 0 + ).toNumber(true) + : message.rustPeakUsed; + if ( + message.totalPeakUsed != null && + message.hasOwnProperty("totalPeakUsed") + ) + if (typeof message.totalPeakUsed === "number") + object.totalPeakUsed = + options.longs === String + ? String(message.totalPeakUsed) + : message.totalPeakUsed; + else + object.totalPeakUsed = + options.longs === String + ? $util.Long.prototype.toString.call(message.totalPeakUsed) + : options.longs === Number + ? new $util.LongBits( + message.totalPeakUsed.low >>> 0, + message.totalPeakUsed.high >>> 0 + ).toNumber(true) + : message.totalPeakUsed; + return object; + }; + + /** + * Converts this MemoryUsage to JSON. + * @function toJSON + * @memberof pruntime_rpc.MemoryUsage + * @instance + * @returns {Object.<string,*>} JSON object + */ + MemoryUsage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MemoryUsage; + })(); + + pruntime_rpc.SyncedTo = (function () { + /** + * Properties of a SyncedTo. + * @memberof pruntime_rpc + * @interface ISyncedTo + * @property {number|null} [syncedTo] SyncedTo syncedTo + */ + + /** + * Constructs a new SyncedTo. + * @memberof pruntime_rpc + * @classdesc Represents a SyncedTo. + * @implements ISyncedTo + * @constructor + * @param {pruntime_rpc.ISyncedTo=} [properties] Properties to set + */ + function SyncedTo(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + } + + /** + * SyncedTo syncedTo. + * @member {number} syncedTo + * @memberof pruntime_rpc.SyncedTo + * @instance + */ + SyncedTo.prototype.syncedTo = 0; + + /** + * Creates a new SyncedTo instance using the specified properties. + * @function create + * @memberof pruntime_rpc.SyncedTo + * @static + * @param {pruntime_rpc.ISyncedTo=} [properties] Properties to set + * @returns {pruntime_rpc.SyncedTo} SyncedTo instance + */ + SyncedTo.create = function create(properties) { + return new SyncedTo(properties); + }; + + /** + * Encodes the specified SyncedTo message. Does not implicitly {@link pruntime_rpc.SyncedTo.verify|verify} messages. + * @function encode + * @memberof pruntime_rpc.SyncedTo + * @static + * @param {pruntime_rpc.ISyncedTo} message SyncedTo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SyncedTo.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); + return writer; + }; + + /** + * Encodes the specified SyncedTo message, length delimited. Does not implicitly {@link pruntime_rpc.SyncedTo.verify|verify} messages. + * @function encodeDelimited + * @memberof pruntime_rpc.SyncedTo + * @static + * @param {pruntime_rpc.ISyncedTo} message SyncedTo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SyncedTo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SyncedTo message from the specified reader or buffer. + * @function decode + * @memberof pruntime_rpc.SyncedTo + * @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 + * @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) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pruntime_rpc.SyncedTo(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.syncedTo = reader.uint32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SyncedTo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pruntime_rpc.SyncedTo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pruntime_rpc.SyncedTo} SyncedTo + * @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) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SyncedTo message. + * @function verify + * @memberof pruntime_rpc.SyncedTo + * @static + * @param {Object.<string,*>} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SyncedTo.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"; + return null; + }; + + /** + * Creates a SyncedTo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pruntime_rpc.SyncedTo + * @static + * @param {Object.<string,*>} object Plain object + * @returns {pruntime_rpc.SyncedTo} SyncedTo + */ + SyncedTo.fromObject = function fromObject(object) { + if (object instanceof $root.pruntime_rpc.SyncedTo) return object; + let message = new $root.pruntime_rpc.SyncedTo(); + if (object.syncedTo != null) message.syncedTo = object.syncedTo >>> 0; + return message; + }; + + /** + * Creates a plain object from a SyncedTo message. Also converts values to other types if specified. + * @function toObject + * @memberof pruntime_rpc.SyncedTo + * @static + * @param {pruntime_rpc.SyncedTo} message SyncedTo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.<string,*>} Plain object + */ + SyncedTo.toObject = function toObject(message, options) { + if (!options) options = {}; + let object = {}; + if (options.defaults) object.syncedTo = 0; + if (message.syncedTo != null && message.hasOwnProperty("syncedTo")) + object.syncedTo = message.syncedTo; + return object; + }; + + /** + * Converts this SyncedTo to JSON. + * @function toJSON + * @memberof pruntime_rpc.SyncedTo + * @instance + * @returns {Object.<string,*>} JSON object + */ + SyncedTo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SyncedTo; + })(); + + pruntime_rpc.HeadersToSync = (function () { + /** + * Properties of a HeadersToSync. + * @memberof pruntime_rpc + * @interface IHeadersToSync + * @property {Uint8Array|null} [encodedHeaders] HeadersToSync encodedHeaders + * @property {Uint8Array|null} [encodedAuthoritySetChange] HeadersToSync encodedAuthoritySetChange + */ + + /** + * Constructs a new HeadersToSync. + * @memberof pruntime_rpc + * @classdesc Represents a HeadersToSync. + * @implements IHeadersToSync + * @constructor + * @param {pruntime_rpc.IHeadersToSync=} [properties] Properties to set + */ + function HeadersToSync(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + } + + /** + * HeadersToSync encodedHeaders. + * @member {Uint8Array} encodedHeaders + * @memberof pruntime_rpc.HeadersToSync + * @instance + */ + HeadersToSync.prototype.encodedHeaders = $util.newBuffer([]); + + /** + * HeadersToSync encodedAuthoritySetChange. + * @member {Uint8Array|null|undefined} encodedAuthoritySetChange + * @memberof pruntime_rpc.HeadersToSync + * @instance + */ + HeadersToSync.prototype.encodedAuthoritySetChange = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * HeadersToSync _encodedAuthoritySetChange. + * @member {"encodedAuthoritySetChange"|undefined} _encodedAuthoritySetChange + * @memberof pruntime_rpc.HeadersToSync + * @instance + */ + Object.defineProperty( + HeadersToSync.prototype, + "_encodedAuthoritySetChange", + { + get: $util.oneOfGetter(($oneOfFields = ["encodedAuthoritySetChange"])), + set: $util.oneOfSetter($oneOfFields), + } + ); + + /** + * Creates a new HeadersToSync instance using the specified properties. + * @function create + * @memberof pruntime_rpc.HeadersToSync + * @static + * @param {pruntime_rpc.IHeadersToSync=} [properties] Properties to set + * @returns {pruntime_rpc.HeadersToSync} HeadersToSync instance + */ + HeadersToSync.create = function create(properties) { + return new HeadersToSync(properties); + }; + + /** + * Encodes the specified HeadersToSync message. Does not implicitly {@link pruntime_rpc.HeadersToSync.verify|verify} messages. + * @function encode + * @memberof pruntime_rpc.HeadersToSync + * @static + * @param {pruntime_rpc.IHeadersToSync} message HeadersToSync message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HeadersToSync.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); + return writer; + }; + + /** + * Encodes the specified HeadersToSync message, length delimited. Does not implicitly {@link pruntime_rpc.HeadersToSync.verify|verify} messages. + * @function encodeDelimited + * @memberof pruntime_rpc.HeadersToSync + * @static + * @param {pruntime_rpc.IHeadersToSync} message HeadersToSync message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HeadersToSync.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HeadersToSync message from the specified reader or buffer. + * @function decode + * @memberof pruntime_rpc.HeadersToSync + * @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 + * @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) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pruntime_rpc.HeadersToSync(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.encodedHeaders = reader.bytes(); + break; + case 2: + message.encodedAuthoritySetChange = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HeadersToSync message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pruntime_rpc.HeadersToSync + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pruntime_rpc.HeadersToSync} HeadersToSync + * @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) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HeadersToSync message. + * @function verify + * @memberof pruntime_rpc.HeadersToSync + * @static + * @param {Object.<string,*>} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HeadersToSync.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let 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"; + } + return null; + }; + + /** + * Creates a HeadersToSync message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pruntime_rpc.HeadersToSync + * @static + * @param {Object.<string,*>} object Plain object + * @returns {pruntime_rpc.HeadersToSync} HeadersToSync + */ + HeadersToSync.fromObject = function fromObject(object) { + if (object instanceof $root.pruntime_rpc.HeadersToSync) return object; + let 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) + 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) + message.encodedAuthoritySetChange = object.encodedAuthoritySetChange; + return message; + }; + + /** + * Creates a plain object from a HeadersToSync message. Also converts values to other types if specified. + * @function toObject + * @memberof pruntime_rpc.HeadersToSync + * @static + * @param {pruntime_rpc.HeadersToSync} message HeadersToSync + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.<string,*>} Plain object + */ + HeadersToSync.toObject = function toObject(message, options) { + if (!options) options = {}; + let object = {}; + if (options.defaults) + if (options.bytes === String) object.encodedHeaders = ""; + else { + object.encodedHeaders = []; + if (options.bytes !== Array) + object.encodedHeaders = $util.newBuffer(object.encodedHeaders); + } + 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 (options.oneofs) + object._encodedAuthoritySetChange = "encodedAuthoritySetChange"; + } + return object; + }; + + /** + * Converts this HeadersToSync to JSON. + * @function toJSON + * @memberof pruntime_rpc.HeadersToSync + * @instance + * @returns {Object.<string,*>} JSON object + */ + HeadersToSync.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return HeadersToSync; + })(); + + pruntime_rpc.ParaHeadersToSync = (function () { + /** + * Properties of a ParaHeadersToSync. + * @memberof pruntime_rpc + * @interface IParaHeadersToSync + * @property {Uint8Array|null} [encodedHeaders] ParaHeadersToSync encodedHeaders + * @property {Array.<Uint8Array>|null} [proof] ParaHeadersToSync proof + */ + + /** + * Constructs a new ParaHeadersToSync. + * @memberof pruntime_rpc + * @classdesc Represents a ParaHeadersToSync. + * @implements IParaHeadersToSync + * @constructor + * @param {pruntime_rpc.IParaHeadersToSync=} [properties] Properties to set + */ + function ParaHeadersToSync(properties) { + this.proof = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + } + + /** + * ParaHeadersToSync encodedHeaders. + * @member {Uint8Array} encodedHeaders + * @memberof pruntime_rpc.ParaHeadersToSync + * @instance + */ + ParaHeadersToSync.prototype.encodedHeaders = $util.newBuffer([]); + + /** + * ParaHeadersToSync proof. + * @member {Array.<Uint8Array>} proof + * @memberof pruntime_rpc.ParaHeadersToSync + * @instance + */ + ParaHeadersToSync.prototype.proof = $util.emptyArray; + + /** + * Creates a new ParaHeadersToSync instance using the specified properties. + * @function create + * @memberof pruntime_rpc.ParaHeadersToSync + * @static + * @param {pruntime_rpc.IParaHeadersToSync=} [properties] Properties to set + * @returns {pruntime_rpc.ParaHeadersToSync} ParaHeadersToSync instance + */ + ParaHeadersToSync.create = function create(properties) { + return new ParaHeadersToSync(properties); + }; + + /** + * Encodes the specified ParaHeadersToSync message. Does not implicitly {@link pruntime_rpc.ParaHeadersToSync.verify|verify} messages. + * @function encode + * @memberof pruntime_rpc.ParaHeadersToSync + * @static + * @param {pruntime_rpc.IParaHeadersToSync} message ParaHeadersToSync message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ParaHeadersToSync.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 (let i = 0; i < message.proof.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/ 18).bytes(message.proof[i]); + return writer; + }; + + /** + * Encodes the specified ParaHeadersToSync message, length delimited. Does not implicitly {@link pruntime_rpc.ParaHeadersToSync.verify|verify} messages. + * @function encodeDelimited + * @memberof pruntime_rpc.ParaHeadersToSync + * @static + * @param {pruntime_rpc.IParaHeadersToSync} message ParaHeadersToSync message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ParaHeadersToSync.encodeDelimited = function encodeDelimited( + message, + writer + ) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ParaHeadersToSync message from the specified reader or buffer. + * @function decode + * @memberof pruntime_rpc.ParaHeadersToSync + * @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 + * @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) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pruntime_rpc.ParaHeadersToSync(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.encodedHeaders = reader.bytes(); + break; + case 2: + if (!(message.proof && message.proof.length)) message.proof = []; + message.proof.push(reader.bytes()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ParaHeadersToSync message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pruntime_rpc.ParaHeadersToSync + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pruntime_rpc.ParaHeadersToSync} ParaHeadersToSync + * @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) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ParaHeadersToSync message. + * @function verify + * @memberof pruntime_rpc.ParaHeadersToSync + * @static + * @param {Object.<string,*>} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ParaHeadersToSync.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 (let 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"; + } + return null; + }; + + /** + * Creates a ParaHeadersToSync message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pruntime_rpc.ParaHeadersToSync + * @static + * @param {Object.<string,*>} object Plain object + * @returns {pruntime_rpc.ParaHeadersToSync} ParaHeadersToSync + */ + ParaHeadersToSync.fromObject = function fromObject(object) { + if (object instanceof $root.pruntime_rpc.ParaHeadersToSync) return object; + let 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) + message.encodedHeaders = object.encodedHeaders; + if (object.proof) { + if (!Array.isArray(object.proof)) + throw TypeError( + ".pruntime_rpc.ParaHeadersToSync.proof: array expected" + ); + message.proof = []; + for (let 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) message.proof[i] = object.proof[i]; + } + return message; + }; + + /** + * Creates a plain object from a ParaHeadersToSync message. Also converts values to other types if specified. + * @function toObject + * @memberof pruntime_rpc.ParaHeadersToSync + * @static + * @param {pruntime_rpc.ParaHeadersToSync} message ParaHeadersToSync + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.<string,*>} Plain object + */ + ParaHeadersToSync.toObject = function toObject(message, options) { + if (!options) options = {}; + let object = {}; + if (options.arrays || options.defaults) object.proof = []; + if (options.defaults) + if (options.bytes === String) object.encodedHeaders = ""; + else { + object.encodedHeaders = []; + if (options.bytes !== Array) + object.encodedHeaders = $util.newBuffer(object.encodedHeaders); + } + 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 (let 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]; + } + return object; + }; + + /** + * Converts this ParaHeadersToSync to JSON. + * @function toJSON + * @memberof pruntime_rpc.ParaHeadersToSync + * @instance + * @returns {Object.<string,*>} JSON object + */ + ParaHeadersToSync.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ParaHeadersToSync; + })(); + + pruntime_rpc.CombinedHeadersToSync = (function () { + /** + * Properties of a CombinedHeadersToSync. + * @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.<Uint8Array>|null} [proof] CombinedHeadersToSync proof + */ + + /** + * Constructs a new CombinedHeadersToSync. + * @memberof pruntime_rpc + * @classdesc Represents a CombinedHeadersToSync. + * @implements ICombinedHeadersToSync + * @constructor + * @param {pruntime_rpc.ICombinedHeadersToSync=} [properties] Properties to set + */ + function CombinedHeadersToSync(properties) { + this.proof = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + } + + /** + * 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 + * @instance + */ + CombinedHeadersToSync.prototype.encodedParachainHeaders = $util.newBuffer( + [] + ); + + /** + * CombinedHeadersToSync proof. + * @member {Array.<Uint8Array>} proof + * @memberof pruntime_rpc.CombinedHeadersToSync + * @instance + */ + CombinedHeadersToSync.prototype.proof = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * CombinedHeadersToSync _authoritySetChange. + * @member {"authoritySetChange"|undefined} _authoritySetChange + * @memberof pruntime_rpc.CombinedHeadersToSync + * @instance + */ + Object.defineProperty( + CombinedHeadersToSync.prototype, + "_authoritySetChange", + { + get: $util.oneOfGetter(($oneOfFields = ["authoritySetChange"])), + set: $util.oneOfSetter($oneOfFields), + } + ); + + /** + * Creates a new CombinedHeadersToSync instance using the specified properties. + * @function create + * @memberof pruntime_rpc.CombinedHeadersToSync + * @static + * @param {pruntime_rpc.ICombinedHeadersToSync=} [properties] Properties to set + * @returns {pruntime_rpc.CombinedHeadersToSync} CombinedHeadersToSync instance + */ + CombinedHeadersToSync.create = function create(properties) { + return new CombinedHeadersToSync(properties); + }; + + /** + * Encodes the specified CombinedHeadersToSync message. Does not implicitly {@link pruntime_rpc.CombinedHeadersToSync.verify|verify} messages. + * @function encode + * @memberof pruntime_rpc.CombinedHeadersToSync + * @static + * @param {pruntime_rpc.ICombinedHeadersToSync} message CombinedHeadersToSync message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CombinedHeadersToSync.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 (let i = 0; i < message.proof.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/ 34).bytes(message.proof[i]); + return writer; + }; + + /** + * Encodes the specified CombinedHeadersToSync message, length delimited. Does not implicitly {@link pruntime_rpc.CombinedHeadersToSync.verify|verify} messages. + * @function encodeDelimited + * @memberof pruntime_rpc.CombinedHeadersToSync + * @static + * @param {pruntime_rpc.ICombinedHeadersToSync} message CombinedHeadersToSync message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CombinedHeadersToSync.encodeDelimited = function encodeDelimited( + message, + writer + ) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CombinedHeadersToSync message from the specified reader or buffer. + * @function decode + * @memberof pruntime_rpc.CombinedHeadersToSync + * @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 + * @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) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pruntime_rpc.CombinedHeadersToSync(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.encodedRelaychainHeaders = reader.bytes(); + break; + case 2: + message.authoritySetChange = 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()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CombinedHeadersToSync message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pruntime_rpc.CombinedHeadersToSync + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pruntime_rpc.CombinedHeadersToSync} CombinedHeadersToSync + * @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) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CombinedHeadersToSync message. + * @function verify + * @memberof pruntime_rpc.CombinedHeadersToSync + * @static + * @param {Object.<string,*>} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CombinedHeadersToSync.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let 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 (let 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"; + } + return null; + }; + + /** + * Creates a CombinedHeadersToSync message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pruntime_rpc.CombinedHeadersToSync + * @static + * @param {Object.<string,*>} object Plain object + * @returns {pruntime_rpc.CombinedHeadersToSync} CombinedHeadersToSync + */ + CombinedHeadersToSync.fromObject = function fromObject(object) { + if (object instanceof $root.pruntime_rpc.CombinedHeadersToSync) + return object; + let 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) + 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) + 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) + message.encodedParachainHeaders = object.encodedParachainHeaders; + if (object.proof) { + if (!Array.isArray(object.proof)) + throw TypeError( + ".pruntime_rpc.CombinedHeadersToSync.proof: array expected" + ); + message.proof = []; + for (let 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) message.proof[i] = object.proof[i]; + } + return message; + }; + + /** + * Creates a plain object from a CombinedHeadersToSync message. Also converts values to other types if specified. + * @function toObject + * @memberof pruntime_rpc.CombinedHeadersToSync + * @static + * @param {pruntime_rpc.CombinedHeadersToSync} message CombinedHeadersToSync + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.<string,*>} Plain object + */ + CombinedHeadersToSync.toObject = function toObject(message, options) { + if (!options) options = {}; + let object = {}; + if (options.arrays || options.defaults) object.proof = []; + if (options.defaults) { + if (options.bytes === String) object.encodedRelaychainHeaders = ""; + else { + object.encodedRelaychainHeaders = []; + if (options.bytes !== Array) + object.encodedRelaychainHeaders = $util.newBuffer( + object.encodedRelaychainHeaders + ); + } + if (options.bytes === String) object.encodedParachainHeaders = ""; + else { + object.encodedParachainHeaders = []; + if (options.bytes !== Array) + object.encodedParachainHeaders = $util.newBuffer( + object.encodedParachainHeaders + ); + } + } + 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 (let 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]; + } + return object; + }; + + /** + * Converts this CombinedHeadersToSync to JSON. + * @function toJSON + * @memberof pruntime_rpc.CombinedHeadersToSync + * @instance + * @returns {Object.<string,*>} JSON object + */ + CombinedHeadersToSync.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CombinedHeadersToSync; + })(); + + pruntime_rpc.HeadersSyncedTo = (function () { + /** + * Properties of a HeadersSyncedTo. + * @memberof pruntime_rpc + * @interface IHeadersSyncedTo + * @property {number|null} [relaychainSyncedTo] HeadersSyncedTo relaychainSyncedTo + * @property {number|null} [parachainSyncedTo] HeadersSyncedTo parachainSyncedTo + */ + + /** + * Constructs a new HeadersSyncedTo. + * @memberof pruntime_rpc + * @classdesc Represents a HeadersSyncedTo. + * @implements IHeadersSyncedTo + * @constructor + * @param {pruntime_rpc.IHeadersSyncedTo=} [properties] Properties to set + */ + function HeadersSyncedTo(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + } + + /** + * HeadersSyncedTo relaychainSyncedTo. + * @member {number} relaychainSyncedTo + * @memberof pruntime_rpc.HeadersSyncedTo + * @instance + */ + HeadersSyncedTo.prototype.relaychainSyncedTo = 0; + + /** + * HeadersSyncedTo parachainSyncedTo. + * @member {number} parachainSyncedTo + * @memberof pruntime_rpc.HeadersSyncedTo + * @instance + */ + HeadersSyncedTo.prototype.parachainSyncedTo = 0; + + /** + * Creates a new HeadersSyncedTo instance using the specified properties. + * @function create + * @memberof pruntime_rpc.HeadersSyncedTo + * @static + * @param {pruntime_rpc.IHeadersSyncedTo=} [properties] Properties to set + * @returns {pruntime_rpc.HeadersSyncedTo} HeadersSyncedTo instance + */ + HeadersSyncedTo.create = function create(properties) { + return new HeadersSyncedTo(properties); + }; + + /** + * Encodes the specified HeadersSyncedTo message. Does not implicitly {@link pruntime_rpc.HeadersSyncedTo.verify|verify} messages. + * @function encode + * @memberof pruntime_rpc.HeadersSyncedTo + * @static + * @param {pruntime_rpc.IHeadersSyncedTo} message HeadersSyncedTo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HeadersSyncedTo.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); + return writer; + }; + + /** + * Encodes the specified HeadersSyncedTo message, length delimited. Does not implicitly {@link pruntime_rpc.HeadersSyncedTo.verify|verify} messages. + * @function encodeDelimited + * @memberof pruntime_rpc.HeadersSyncedTo + * @static + * @param {pruntime_rpc.IHeadersSyncedTo} message HeadersSyncedTo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HeadersSyncedTo.encodeDelimited = function encodeDelimited( + message, + writer + ) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HeadersSyncedTo message from the specified reader or buffer. + * @function decode + * @memberof pruntime_rpc.HeadersSyncedTo + * @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 + * @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) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pruntime_rpc.HeadersSyncedTo(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.relaychainSyncedTo = reader.uint32(); + break; + case 2: + message.parachainSyncedTo = reader.uint32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HeadersSyncedTo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pruntime_rpc.HeadersSyncedTo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pruntime_rpc.HeadersSyncedTo} HeadersSyncedTo + * @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) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HeadersSyncedTo message. + * @function verify + * @memberof pruntime_rpc.HeadersSyncedTo + * @static + * @param {Object.<string,*>} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HeadersSyncedTo.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"; + return null; + }; + + /** + * Creates a HeadersSyncedTo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pruntime_rpc.HeadersSyncedTo + * @static + * @param {Object.<string,*>} object Plain object + * @returns {pruntime_rpc.HeadersSyncedTo} HeadersSyncedTo + */ + HeadersSyncedTo.fromObject = function fromObject(object) { + if (object instanceof $root.pruntime_rpc.HeadersSyncedTo) return object; + let message = new $root.pruntime_rpc.HeadersSyncedTo(); + if (object.relaychainSyncedTo != null) + message.relaychainSyncedTo = object.relaychainSyncedTo >>> 0; + if (object.parachainSyncedTo != null) + message.parachainSyncedTo = object.parachainSyncedTo >>> 0; + return message; + }; + + /** + * Creates a plain object from a HeadersSyncedTo message. Also converts values to other types if specified. + * @function toObject + * @memberof pruntime_rpc.HeadersSyncedTo + * @static + * @param {pruntime_rpc.HeadersSyncedTo} message HeadersSyncedTo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.<string,*>} Plain object + */ + HeadersSyncedTo.toObject = function toObject(message, options) { + if (!options) options = {}; + let object = {}; + if (options.defaults) { + object.relaychainSyncedTo = 0; + object.parachainSyncedTo = 0; + } + if ( + message.relaychainSyncedTo != null && + message.hasOwnProperty("relaychainSyncedTo") + ) + object.relaychainSyncedTo = message.relaychainSyncedTo; + if ( + message.parachainSyncedTo != null && + message.hasOwnProperty("parachainSyncedTo") + ) + object.parachainSyncedTo = message.parachainSyncedTo; + return object; + }; + + /** + * Converts this HeadersSyncedTo to JSON. + * @function toJSON + * @memberof pruntime_rpc.HeadersSyncedTo + * @instance + * @returns {Object.<string,*>} JSON object + */ + HeadersSyncedTo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return HeadersSyncedTo; + })(); + + pruntime_rpc.Blocks = (function () { + /** + * Properties of a Blocks. + * @memberof pruntime_rpc + * @interface IBlocks + * @property {Uint8Array|null} [encodedBlocks] Blocks encodedBlocks + */ + + /** + * Constructs a new Blocks. + * @memberof pruntime_rpc + * @classdesc Represents a Blocks. + * @implements IBlocks + * @constructor + * @param {pruntime_rpc.IBlocks=} [properties] Properties to set + */ + function Blocks(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + } + + /** + * Blocks encodedBlocks. + * @member {Uint8Array} encodedBlocks + * @memberof pruntime_rpc.Blocks + * @instance + */ + Blocks.prototype.encodedBlocks = $util.newBuffer([]); + + /** + * 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 + */ + Blocks.create = function create(properties) { + return new Blocks(properties); + }; + + /** + * 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); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pruntime_rpc.Blocks(); + while (reader.pos < end) { + let 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.<string,*>} 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.<string,*>} object Plain object + * @returns {pruntime_rpc.Blocks} Blocks + */ + Blocks.fromObject = function fromObject(object) { + if (object instanceof $root.pruntime_rpc.Blocks) return object; + let 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) + 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.<string,*>} Plain object + */ + Blocks.toObject = function toObject(message, options) { + if (!options) options = {}; + let 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.<string,*>} JSON object + */ + Blocks.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + 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 + */ + + /** + * 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 (let 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; + + // OneOf field names bound to virtual getters and setters + let $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), + }); + + /** + * 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); + 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); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pruntime_rpc.InitRuntimeRequest(); + while (reader.pos < end) { + let 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; + 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.<string,*>} 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"; + let 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"; + 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.<string,*>} object Plain object + * @returns {pruntime_rpc.InitRuntimeRequest} InitRuntimeRequest + */ + InitRuntimeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.pruntime_rpc.InitRuntimeRequest) + return object; + let 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) + 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) + 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) + 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) + message.encodedOperator = object.encodedOperator; + if (object.isParachain != null) + message.isParachain = Boolean(object.isParachain); + 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.<string,*>} Plain object + */ + InitRuntimeRequest.toObject = function toObject(message, options) { + if (!options) options = {}; + let 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; + return object; + }; + + /** + * Converts this InitRuntimeRequest to JSON. + * @function toJSON + * @memberof pruntime_rpc.InitRuntimeRequest + * @instance + * @returns {Object.<string,*>} JSON object + */ + InitRuntimeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + 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 (let 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 + let $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); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pruntime_rpc.GetRuntimeInfoRequest(); + while (reader.pos < end) { + let 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.<string,*>} 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"; + let 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.<string,*>} object Plain object + * @returns {pruntime_rpc.GetRuntimeInfoRequest} GetRuntimeInfoRequest + */ + GetRuntimeInfoRequest.fromObject = function fromObject(object) { + if (object instanceof $root.pruntime_rpc.GetRuntimeInfoRequest) + return object; + let 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) + 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.<string,*>} Plain object + */ + GetRuntimeInfoRequest.toObject = function toObject(message, options) { + if (!options) options = {}; + let 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.<string,*>} JSON object + */ + GetRuntimeInfoRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + 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 (let 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 + let $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); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pruntime_rpc.InitRuntimeResponse(); + while (reader.pos < end) { + let 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.<string,*>} 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"; + let 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; + { + let 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.<string,*>} object Plain object + * @returns {pruntime_rpc.InitRuntimeResponse} InitRuntimeResponse + */ + InitRuntimeResponse.fromObject = function fromObject(object) { + if (object instanceof $root.pruntime_rpc.InitRuntimeResponse) + return object; + let 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) + 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) + 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) + 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) + 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.<string,*>} Plain object + */ + InitRuntimeResponse.toObject = function toObject(message, options) { + if (!options) options = {}; + let 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.<string,*>} JSON object + */ + InitRuntimeResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + 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 {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 (let 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 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); + 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); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pruntime_rpc.Attestation(); + while (reader.pos < end) { + let 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 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.<string,*>} 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")) { + let error = $root.pruntime_rpc.AttestationReport.verify( + message.payload + ); + if (error) return "payload." + error; + } + 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.<string,*>} object Plain object + * @returns {pruntime_rpc.Attestation} Attestation + */ + Attestation.fromObject = function fromObject(object) { + if (object instanceof $root.pruntime_rpc.Attestation) return object; + let 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.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.<string,*>} Plain object + */ + Attestation.toObject = function toObject(message, options) { + if (!options) options = {}; + let object = {}; + if (options.defaults) { + object.version = 0; + object.provider = ""; + object.payload = null; + if ($util.Long) { + let 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 (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; + return object; + }; + + /** + * Converts this Attestation to JSON. + * @function toJSON + * @memberof pruntime_rpc.Attestation + * @instance + * @returns {Object.<string,*>} JSON object + */ + Attestation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + 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 (let 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); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pruntime_rpc.AttestationReport(); + while (reader.pos < end) { + let 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.<string,*>} 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.<string,*>} object Plain object + * @returns {pruntime_rpc.AttestationReport} AttestationReport + */ + AttestationReport.fromObject = function fromObject(object) { + if (object instanceof $root.pruntime_rpc.AttestationReport) return object; + let 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) 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) + 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.<string,*>} Plain object + */ + AttestationReport.toObject = function toObject(message, options) { + if (!options) options = {}; + let 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.<string,*>} JSON object + */ + AttestationReport.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + 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 (let 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); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pruntime_rpc.GetEgressMessagesResponse(); + while (reader.pos < end) { + let 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.<string,*>} 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.<string,*>} object Plain object + * @returns {pruntime_rpc.GetEgressMessagesResponse} GetEgressMessagesResponse + */ + GetEgressMessagesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.pruntime_rpc.GetEgressMessagesResponse) + return object; + let 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) + 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.<string,*>} Plain object + */ + GetEgressMessagesResponse.toObject = function toObject(message, options) { + if (!options) options = {}; + let 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.<string,*>} JSON object + */ + GetEgressMessagesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + 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 (let 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); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pruntime_rpc.ContractQueryRequest(); + while (reader.pos < end) { + let 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.<string,*>} 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")) { + let 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.<string,*>} object Plain object + * @returns {pruntime_rpc.ContractQueryRequest} ContractQueryRequest + */ + ContractQueryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.pruntime_rpc.ContractQueryRequest) + return object; + let 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) + 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.<string,*>} Plain object + */ + ContractQueryRequest.toObject = function toObject(message, options) { + if (!options) options = {}; + let 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.<string,*>} JSON object + */ + ContractQueryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + 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 (let 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); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pruntime_rpc.Signature(); + while (reader.pos < end) { + let 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.<string,*>} 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")) { + let 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: + 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.<string,*>} object Plain object + * @returns {pruntime_rpc.Signature} Signature + */ + Signature.fromObject = function fromObject(object) { + if (object instanceof $root.pruntime_rpc.Signature) return object; + let 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) { + 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; + } + 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) 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.<string,*>} Plain object + */ + Signature.toObject = function toObject(message, options) { + if (!options) options = {}; + let 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] + : 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.<string,*>} JSON object + */ + Signature.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + 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 (let 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); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pruntime_rpc.Certificate(); + while (reader.pos < end) { + let 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.<string,*>} 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")) { + let 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.<string,*>} object Plain object + * @returns {pruntime_rpc.Certificate} Certificate + */ + Certificate.fromObject = function fromObject(object) { + if (object instanceof $root.pruntime_rpc.Certificate) return object; + let 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) + 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.<string,*>} Plain object + */ + Certificate.toObject = function toObject(message, options) { + if (!options) options = {}; + let 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.<string,*>} JSON object + */ + Certificate.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + 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 + */ + pruntime_rpc.SignatureType = (function () { + const 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; + 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 (let 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); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pruntime_rpc.ContractQueryResponse(); + while (reader.pos < end) { + let 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.<string,*>} 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.<string,*>} object Plain object + * @returns {pruntime_rpc.ContractQueryResponse} ContractQueryResponse + */ + ContractQueryResponse.fromObject = function fromObject(object) { + if (object instanceof $root.pruntime_rpc.ContractQueryResponse) + return object; + let 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) + 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.<string,*>} Plain object + */ + ContractQueryResponse.toObject = function toObject(message, options) { + if (!options) options = {}; + let 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.<string,*>} JSON object + */ + ContractQueryResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + 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 (let 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); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pruntime_rpc.GetWorkerStateRequest(); + while (reader.pos < end) { + let 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.<string,*>} 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.<string,*>} object Plain object + * @returns {pruntime_rpc.GetWorkerStateRequest} GetWorkerStateRequest + */ + GetWorkerStateRequest.fromObject = function fromObject(object) { + if (object instanceof $root.pruntime_rpc.GetWorkerStateRequest) + return object; + let 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) 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.<string,*>} Plain object + */ + GetWorkerStateRequest.toObject = function toObject(message, options) { + if (!options) options = {}; + let 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.<string,*>} JSON object + */ + GetWorkerStateRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + 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 (let 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); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pruntime_rpc.WorkerStat(); + while (reader.pos < end) { + let 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.<string,*>} 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.<string,*>} object Plain object + * @returns {pruntime_rpc.WorkerStat} WorkerStat + */ + WorkerStat.fromObject = function fromObject(object) { + if (object instanceof $root.pruntime_rpc.WorkerStat) return object; + let 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) { + 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.<string,*>} Plain object + */ + WorkerStat.toObject = function toObject(message, options) { + if (!options) options = {}; + let 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] + : 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.<string,*>} JSON object + */ + WorkerStat.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + 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.IMiningState|null} [miningState] WorkerState miningState + * @property {Array.<number>|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 (let 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 miningState. + * @member {pruntime_rpc.IMiningState|null|undefined} miningState + * @memberof pruntime_rpc.WorkerState + * @instance + */ + WorkerState.prototype.miningState = null; + + /** + * WorkerState waitingHeartbeats. + * @member {Array.<number>} 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.miningState != null && + Object.hasOwnProperty.call(message, "miningState") + ) + $root.pruntime_rpc.MiningState.encode( + message.miningState, + 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 (let 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); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pruntime_rpc.WorkerState(); + while (reader.pos < end) { + let 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.miningState = $root.pruntime_rpc.MiningState.decode( + reader, + reader.uint32() + ); + break; + case 5: + if ( + !(message.waitingHeartbeats && message.waitingHeartbeats.length) + ) + message.waitingHeartbeats = []; + if ((tag & 7) === 2) { + let 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.<string,*>} 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")) { + let error = $root.pruntime_rpc.BenchState.verify(message.benchState); + if (error) return "benchState." + error; + } + if ( + message.miningState != null && + message.hasOwnProperty("miningState") + ) { + let error = $root.pruntime_rpc.MiningState.verify(message.miningState); + if (error) return "miningState." + error; + } + if ( + message.waitingHeartbeats != null && + message.hasOwnProperty("waitingHeartbeats") + ) { + if (!Array.isArray(message.waitingHeartbeats)) + return "waitingHeartbeats: array expected"; + for (let i = 0; i < message.waitingHeartbeats.length; ++i) + if (!$util.isInteger(message.waitingHeartbeats[i])) + return "waitingHeartbeats: integer[] expected"; + } + if ( + message.tokenomicInfo != null && + message.hasOwnProperty("tokenomicInfo") + ) { + let error = $root.pruntime_rpc.TokenomicInfo.verify( + message.tokenomicInfo + ); + if (error) return "tokenomicInfo." + error; + } + if (message.stat != null && message.hasOwnProperty("stat")) { + let 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.<string,*>} object Plain object + * @returns {pruntime_rpc.WorkerState} WorkerState + */ + WorkerState.fromObject = function fromObject(object) { + if (object instanceof $root.pruntime_rpc.WorkerState) return object; + let 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.miningState != null) { + if (typeof object.miningState !== "object") + throw TypeError( + ".pruntime_rpc.WorkerState.miningState: object expected" + ); + message.miningState = $root.pruntime_rpc.MiningState.fromObject( + object.miningState + ); + } + if (object.waitingHeartbeats) { + if (!Array.isArray(object.waitingHeartbeats)) + throw TypeError( + ".pruntime_rpc.WorkerState.waitingHeartbeats: array expected" + ); + message.waitingHeartbeats = []; + for (let 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.<string,*>} Plain object + */ + WorkerState.toObject = function toObject(message, options) { + if (!options) options = {}; + let object = {}; + if (options.arrays || options.defaults) object.waitingHeartbeats = []; + if (options.defaults) { + object.registered = false; + object.unresponsive = false; + object.benchState = null; + object.miningState = 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.miningState != null && message.hasOwnProperty("miningState")) + object.miningState = $root.pruntime_rpc.MiningState.toObject( + message.miningState, + options + ); + if (message.waitingHeartbeats && message.waitingHeartbeats.length) { + object.waitingHeartbeats = []; + for (let 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.<string,*>} JSON object + */ + WorkerState.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + 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 (let 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); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pruntime_rpc.HandoverChallenge(); + while (reader.pos < end) { + let 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.<string,*>} 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.<string,*>} object Plain object + * @returns {pruntime_rpc.HandoverChallenge} HandoverChallenge + */ + HandoverChallenge.fromObject = function fromObject(object) { + if (object instanceof $root.pruntime_rpc.HandoverChallenge) return object; + let 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) + 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.<string,*>} Plain object + */ + HandoverChallenge.toObject = function toObject(message, options) { + if (!options) options = {}; + let 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.<string,*>} JSON object + */ + HandoverChallenge.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + 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 (let 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); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pruntime_rpc.HandoverChallengeResponse(); + while (reader.pos < end) { + let 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.<string,*>} 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") + ) { + let 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.<string,*>} object Plain object + * @returns {pruntime_rpc.HandoverChallengeResponse} HandoverChallengeResponse + */ + HandoverChallengeResponse.fromObject = function fromObject(object) { + if (object instanceof $root.pruntime_rpc.HandoverChallengeResponse) + return object; + let 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) + 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.<string,*>} Plain object + */ + HandoverChallengeResponse.toObject = function toObject(message, options) { + if (!options) options = {}; + let 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.<string,*>} JSON object + */ + HandoverChallengeResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + 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 (let 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); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pruntime_rpc.HandoverWorkerKey(); + while (reader.pos < end) { + let 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.<string,*>} 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") + ) { + let 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.<string,*>} object Plain object + * @returns {pruntime_rpc.HandoverWorkerKey} HandoverWorkerKey + */ + HandoverWorkerKey.fromObject = function fromObject(object) { + if (object instanceof $root.pruntime_rpc.HandoverWorkerKey) return object; + let 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) + 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.<string,*>} Plain object + */ + HandoverWorkerKey.toObject = function toObject(message, options) { + if (!options) options = {}; + let 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.<string,*>} JSON object + */ + HandoverWorkerKey.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + 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 (let 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); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pruntime_rpc.BenchState(); + while (reader.pos < end) { + let 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.<string,*>} 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.<string,*>} object Plain object + * @returns {pruntime_rpc.BenchState} BenchState + */ + BenchState.fromObject = function fromObject(object) { + if (object instanceof $root.pruntime_rpc.BenchState) return object; + let 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.<string,*>} Plain object + */ + BenchState.toObject = function toObject(message, options) { + if (!options) options = {}; + let object = {}; + if (options.defaults) { + object.startBlock = 0; + if ($util.Long) { + let 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.<string,*>} JSON object + */ + BenchState.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return BenchState; + })(); + + pruntime_rpc.MiningState = (function () { + /** + * Properties of a MiningState. + * @memberof pruntime_rpc + * @interface IMiningState + * @property {number|null} [sessionId] MiningState sessionId + * @property {boolean|null} [paused] MiningState paused + * @property {number|Long|null} [startTime] MiningState startTime + */ + + /** + * Constructs a new MiningState. + * @memberof pruntime_rpc + * @classdesc Represents a MiningState. + * @implements IMiningState + * @constructor + * @param {pruntime_rpc.IMiningState=} [properties] Properties to set + */ + function MiningState(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + } + + /** + * MiningState sessionId. + * @member {number} sessionId + * @memberof pruntime_rpc.MiningState + * @instance + */ + MiningState.prototype.sessionId = 0; + + /** + * MiningState paused. + * @member {boolean} paused + * @memberof pruntime_rpc.MiningState + * @instance + */ + MiningState.prototype.paused = false; + + /** + * MiningState startTime. + * @member {number|Long} startTime + * @memberof pruntime_rpc.MiningState + * @instance + */ + MiningState.prototype.startTime = $util.Long + ? $util.Long.fromBits(0, 0, true) + : 0; + + /** + * Creates a new MiningState instance using the specified properties. + * @function create + * @memberof pruntime_rpc.MiningState + * @static + * @param {pruntime_rpc.IMiningState=} [properties] Properties to set + * @returns {pruntime_rpc.MiningState} MiningState instance + */ + MiningState.create = function create(properties) { + return new MiningState(properties); + }; + + /** + * Encodes the specified MiningState message. Does not implicitly {@link pruntime_rpc.MiningState.verify|verify} messages. + * @function encode + * @memberof pruntime_rpc.MiningState + * @static + * @param {pruntime_rpc.IMiningState} message MiningState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MiningState.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 MiningState message, length delimited. Does not implicitly {@link pruntime_rpc.MiningState.verify|verify} messages. + * @function encodeDelimited + * @memberof pruntime_rpc.MiningState + * @static + * @param {pruntime_rpc.IMiningState} message MiningState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MiningState.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MiningState message from the specified reader or buffer. + * @function decode + * @memberof pruntime_rpc.MiningState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pruntime_rpc.MiningState} MiningState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MiningState.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pruntime_rpc.MiningState(); + while (reader.pos < end) { + let 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 MiningState message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pruntime_rpc.MiningState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pruntime_rpc.MiningState} MiningState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MiningState.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MiningState message. + * @function verify + * @memberof pruntime_rpc.MiningState + * @static + * @param {Object.<string,*>} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MiningState.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 MiningState message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pruntime_rpc.MiningState + * @static + * @param {Object.<string,*>} object Plain object + * @returns {pruntime_rpc.MiningState} MiningState + */ + MiningState.fromObject = function fromObject(object) { + if (object instanceof $root.pruntime_rpc.MiningState) return object; + let message = new $root.pruntime_rpc.MiningState(); + 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 MiningState message. Also converts values to other types if specified. + * @function toObject + * @memberof pruntime_rpc.MiningState + * @static + * @param {pruntime_rpc.MiningState} message MiningState + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.<string,*>} Plain object + */ + MiningState.toObject = function toObject(message, options) { + if (!options) options = {}; + let object = {}; + if (options.defaults) { + object.sessionId = 0; + object.paused = false; + if ($util.Long) { + let 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 MiningState to JSON. + * @function toJSON + * @memberof pruntime_rpc.MiningState + * @instance + * @returns {Object.<string,*>} JSON object + */ + MiningState.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MiningState; + })(); + + 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 (let 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); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pruntime_rpc.EchoMessage(); + while (reader.pos < end) { + let 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.<string,*>} 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.<string,*>} object Plain object + * @returns {pruntime_rpc.EchoMessage} EchoMessage + */ + EchoMessage.fromObject = function fromObject(object) { + if (object instanceof $root.pruntime_rpc.EchoMessage) return object; + let 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) 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.<string,*>} Plain object + */ + EchoMessage.toObject = function toObject(message, options) { + if (!options) options = {}; + let 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.<string,*>} JSON object + */ + EchoMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + 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 () { + const 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 (let 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); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pruntime_rpc.AddEndpointRequest(); + while (reader.pos < end) { + let 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.<string,*>} 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.<string,*>} object Plain object + * @returns {pruntime_rpc.AddEndpointRequest} AddEndpointRequest + */ + AddEndpointRequest.fromObject = function fromObject(object) { + if (object instanceof $root.pruntime_rpc.AddEndpointRequest) + return object; + let 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) + 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.<string,*>} Plain object + */ + AddEndpointRequest.toObject = function toObject(message, options) { + if (!options) options = {}; + let 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.<string,*>} JSON object + */ + AddEndpointRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + 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 (let 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 + let $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); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pruntime_rpc.GetEndpointResponse(); + while (reader.pos < end) { + let 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.<string,*>} 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"; + let 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.<string,*>} object Plain object + * @returns {pruntime_rpc.GetEndpointResponse} GetEndpointResponse + */ + GetEndpointResponse.fromObject = function fromObject(object) { + if (object instanceof $root.pruntime_rpc.GetEndpointResponse) + return object; + let 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) + 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) 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.<string,*>} Plain object + */ + GetEndpointResponse.toObject = function toObject(message, options) { + if (!options) options = {}; + let 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.<string,*>} JSON object + */ + GetEndpointResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + 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 (let 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); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pruntime_rpc.SignEndpointsRequest(); + while (reader.pos < end) { + let 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.<string,*>} 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.<string,*>} object Plain object + * @returns {pruntime_rpc.SignEndpointsRequest} SignEndpointsRequest + */ + SignEndpointsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.pruntime_rpc.SignEndpointsRequest) + return object; + let 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) + 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.<string,*>} Plain object + */ + SignEndpointsRequest.toObject = function toObject(message, options) { + if (!options) options = {}; + let 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.<string,*>} JSON object + */ + SignEndpointsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + 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 (let 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); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pruntime_rpc.DerivePhalaI2pKeyResponse(); + while (reader.pos < end) { + let 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.<string,*>} 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.<string,*>} object Plain object + * @returns {pruntime_rpc.DerivePhalaI2pKeyResponse} DerivePhalaI2pKeyResponse + */ + DerivePhalaI2pKeyResponse.fromObject = function fromObject(object) { + if (object instanceof $root.pruntime_rpc.DerivePhalaI2pKeyResponse) + return object; + let 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) + 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.<string,*>} Plain object + */ + DerivePhalaI2pKeyResponse.toObject = function toObject(message, options) { + if (!options) options = {}; + let 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.<string,*>} JSON object + */ + DerivePhalaI2pKeyResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + 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 (let 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); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pruntime_rpc.TokenomicStat(); + while (reader.pos < end) { + let 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.<string,*>} 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.<string,*>} object Plain object + * @returns {pruntime_rpc.TokenomicStat} TokenomicStat + */ + TokenomicStat.fromObject = function fromObject(object) { + if (object instanceof $root.pruntime_rpc.TokenomicStat) return object; + let 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.<string,*>} Plain object + */ + TokenomicStat.toObject = function toObject(message, options) { + if (!options) options = {}; + let 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.<string,*>} JSON object + */ + TokenomicStat.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + 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 (let 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 */ - const prpc = {}; - - prpc.PrpcError = (function() { - - /** - * Properties of a PrpcError. - * @memberof prpc - * @interface IPrpcError - * @property {string|null} [message] The error description - */ - - /** - * Constructs a new PrpcError. - * @memberof prpc - * @classdesc The final Error type of RPCs to be serialized to protobuf. - * @implements IPrpcError - * @constructor - * @param {prpc.IPrpcError=} [properties] Properties to set - */ - function PrpcError(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + TokenomicInfo.prototype.share = ""; - /** - * The error description - * @member {string} message - * @memberof prpc.PrpcError - * @instance - */ - PrpcError.prototype.message = ""; - - /** - * Creates a new PrpcError instance using the specified properties. - * @function create - * @memberof prpc.PrpcError - * @static - * @param {prpc.IPrpcError=} [properties] Properties to set - * @returns {prpc.PrpcError} PrpcError instance - */ - PrpcError.create = function create(properties) { - return new PrpcError(properties); - }; - - /** - * Encodes the specified PrpcError message. Does not implicitly {@link prpc.PrpcError.verify|verify} messages. - * @function encode - * @memberof prpc.PrpcError - * @static - * @param {prpc.IPrpcError} message PrpcError message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PrpcError.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); - return writer; - }; - - /** - * Encodes the specified PrpcError message, length delimited. Does not implicitly {@link prpc.PrpcError.verify|verify} messages. - * @function encodeDelimited - * @memberof prpc.PrpcError - * @static - * @param {prpc.IPrpcError} message PrpcError message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PrpcError.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PrpcError message from the specified reader or buffer. - * @function decode - * @memberof prpc.PrpcError - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {prpc.PrpcError} PrpcError - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PrpcError.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.prpc.PrpcError(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.message = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PrpcError message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof prpc.PrpcError - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {prpc.PrpcError} PrpcError - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PrpcError.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PrpcError message. - * @function verify - * @memberof prpc.PrpcError - * @static - * @param {Object.<string,*>} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PrpcError.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - return null; - }; - - /** - * Creates a PrpcError message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof prpc.PrpcError - * @static - * @param {Object.<string,*>} object Plain object - * @returns {prpc.PrpcError} PrpcError - */ - PrpcError.fromObject = function fromObject(object) { - if (object instanceof $root.prpc.PrpcError) - return object; - let message = new $root.prpc.PrpcError(); - if (object.message != null) - message.message = String(object.message); - return message; - }; - - /** - * Creates a plain object from a PrpcError message. Also converts values to other types if specified. - * @function toObject - * @memberof prpc.PrpcError - * @static - * @param {prpc.PrpcError} message PrpcError - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.<string,*>} Plain object - */ - PrpcError.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - object.message = ""; - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - return object; - }; - - /** - * Converts this PrpcError to JSON. - * @function toJSON - * @memberof prpc.PrpcError - * @instance - * @returns {Object.<string,*>} JSON object - */ - PrpcError.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return PrpcError; - })(); + /** + * TokenomicInfo vUpdateAt. + * @member {number|Long} vUpdateAt + * @memberof pruntime_rpc.TokenomicInfo + * @instance + */ + TokenomicInfo.prototype.vUpdateAt = $util.Long + ? $util.Long.fromBits(0, 0, true) + : 0; - return prpc; -})(); + /** + * TokenomicInfo vUpdateBlock. + * @member {number} vUpdateBlock + * @memberof pruntime_rpc.TokenomicInfo + * @instance + */ + TokenomicInfo.prototype.vUpdateBlock = 0; -export const pruntime_rpc = $root.pruntime_rpc = (() => { + /** + * TokenomicInfo iterationLast. + * @member {number|Long} iterationLast + * @memberof pruntime_rpc.TokenomicInfo + * @instance + */ + TokenomicInfo.prototype.iterationLast = $util.Long + ? $util.Long.fromBits(0, 0, true) + : 0; /** - * Namespace pruntime_rpc. - * @exports pruntime_rpc - * @namespace + * TokenomicInfo challengeTimeLast. + * @member {number|Long} challengeTimeLast + * @memberof pruntime_rpc.TokenomicInfo + * @instance */ - const pruntime_rpc = {}; - - pruntime_rpc.PhactoryAPI = (function() { - - /** - * Constructs a new PhactoryAPI service. - * @memberof pruntime_rpc - * @classdesc Represents a PhactoryAPI - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function PhactoryAPI(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } + TokenomicInfo.prototype.challengeTimeLast = $util.Long + ? $util.Long.fromBits(0, 0, true) + : 0; - (PhactoryAPI.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = PhactoryAPI; - - /** - * Creates new PhactoryAPI service using the specified rpc implementation. - * @function create - * @memberof pruntime_rpc.PhactoryAPI - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {PhactoryAPI} RPC service. Useful where requests and/or responses are streamed. - */ - PhactoryAPI.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link pruntime_rpc.PhactoryAPI#getInfo}. - * @memberof pruntime_rpc.PhactoryAPI - * @typedef GetInfoCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {pruntime_rpc.PhactoryInfo} [response] PhactoryInfo - */ - - /** - * Calls GetInfo. - * @function getInfo - * @memberof pruntime_rpc.PhactoryAPI - * @instance - * @param {google.protobuf.IEmpty} request Empty message or plain object - * @param {pruntime_rpc.PhactoryAPI.GetInfoCallback} callback Node-style callback called with the error, if any, and PhactoryInfo - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PhactoryAPI.prototype.getInfo = function getInfo(request, callback) { - return this.rpcCall(getInfo, $root.google.protobuf.Empty, $root.pruntime_rpc.PhactoryInfo, request, callback); - }, "name", { value: "GetInfo" }); - - /** - * Calls GetInfo. - * @function getInfo - * @memberof pruntime_rpc.PhactoryAPI - * @instance - * @param {google.protobuf.IEmpty} request Empty message or plain object - * @returns {Promise<pruntime_rpc.PhactoryInfo>} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link pruntime_rpc.PhactoryAPI#syncHeader}. - * @memberof pruntime_rpc.PhactoryAPI - * @typedef SyncHeaderCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {pruntime_rpc.SyncedTo} [response] SyncedTo - */ - - /** - * Calls SyncHeader. - * @function syncHeader - * @memberof pruntime_rpc.PhactoryAPI - * @instance - * @param {pruntime_rpc.IHeadersToSync} request HeadersToSync message or plain object - * @param {pruntime_rpc.PhactoryAPI.SyncHeaderCallback} callback Node-style callback called with the error, if any, and SyncedTo - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PhactoryAPI.prototype.syncHeader = function syncHeader(request, callback) { - return this.rpcCall(syncHeader, $root.pruntime_rpc.HeadersToSync, $root.pruntime_rpc.SyncedTo, request, callback); - }, "name", { value: "SyncHeader" }); - - /** - * Calls SyncHeader. - * @function syncHeader - * @memberof pruntime_rpc.PhactoryAPI - * @instance - * @param {pruntime_rpc.IHeadersToSync} request HeadersToSync message or plain object - * @returns {Promise<pruntime_rpc.SyncedTo>} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link pruntime_rpc.PhactoryAPI#syncParaHeader}. - * @memberof pruntime_rpc.PhactoryAPI - * @typedef SyncParaHeaderCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {pruntime_rpc.SyncedTo} [response] SyncedTo - */ - - /** - * Calls SyncParaHeader. - * @function syncParaHeader - * @memberof pruntime_rpc.PhactoryAPI - * @instance - * @param {pruntime_rpc.IParaHeadersToSync} request ParaHeadersToSync message or plain object - * @param {pruntime_rpc.PhactoryAPI.SyncParaHeaderCallback} callback Node-style callback called with the error, if any, and SyncedTo - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PhactoryAPI.prototype.syncParaHeader = function syncParaHeader(request, callback) { - return this.rpcCall(syncParaHeader, $root.pruntime_rpc.ParaHeadersToSync, $root.pruntime_rpc.SyncedTo, request, callback); - }, "name", { value: "SyncParaHeader" }); - - /** - * Calls SyncParaHeader. - * @function syncParaHeader - * @memberof pruntime_rpc.PhactoryAPI - * @instance - * @param {pruntime_rpc.IParaHeadersToSync} request ParaHeadersToSync message or plain object - * @returns {Promise<pruntime_rpc.SyncedTo>} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link pruntime_rpc.PhactoryAPI#syncCombinedHeaders}. - * @memberof pruntime_rpc.PhactoryAPI - * @typedef SyncCombinedHeadersCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {pruntime_rpc.HeadersSyncedTo} [response] HeadersSyncedTo - */ - - /** - * Calls SyncCombinedHeaders. - * @function syncCombinedHeaders - * @memberof pruntime_rpc.PhactoryAPI - * @instance - * @param {pruntime_rpc.ICombinedHeadersToSync} request CombinedHeadersToSync message or plain object - * @param {pruntime_rpc.PhactoryAPI.SyncCombinedHeadersCallback} callback Node-style callback called with the error, if any, and HeadersSyncedTo - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PhactoryAPI.prototype.syncCombinedHeaders = function syncCombinedHeaders(request, callback) { - return this.rpcCall(syncCombinedHeaders, $root.pruntime_rpc.CombinedHeadersToSync, $root.pruntime_rpc.HeadersSyncedTo, request, callback); - }, "name", { value: "SyncCombinedHeaders" }); - - /** - * Calls SyncCombinedHeaders. - * @function syncCombinedHeaders - * @memberof pruntime_rpc.PhactoryAPI - * @instance - * @param {pruntime_rpc.ICombinedHeadersToSync} request CombinedHeadersToSync message or plain object - * @returns {Promise<pruntime_rpc.HeadersSyncedTo>} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link pruntime_rpc.PhactoryAPI#dispatchBlocks}. - * @memberof pruntime_rpc.PhactoryAPI - * @typedef DispatchBlocksCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {pruntime_rpc.SyncedTo} [response] SyncedTo - */ - - /** - * Calls DispatchBlocks. - * @function dispatchBlocks - * @memberof pruntime_rpc.PhactoryAPI - * @instance - * @param {pruntime_rpc.IBlocks} request Blocks message or plain object - * @param {pruntime_rpc.PhactoryAPI.DispatchBlocksCallback} callback Node-style callback called with the error, if any, and SyncedTo - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PhactoryAPI.prototype.dispatchBlocks = function dispatchBlocks(request, callback) { - return this.rpcCall(dispatchBlocks, $root.pruntime_rpc.Blocks, $root.pruntime_rpc.SyncedTo, request, callback); - }, "name", { value: "DispatchBlocks" }); - - /** - * Calls DispatchBlocks. - * @function dispatchBlocks - * @memberof pruntime_rpc.PhactoryAPI - * @instance - * @param {pruntime_rpc.IBlocks} request Blocks message or plain object - * @returns {Promise<pruntime_rpc.SyncedTo>} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link pruntime_rpc.PhactoryAPI#initRuntime}. - * @memberof pruntime_rpc.PhactoryAPI - * @typedef InitRuntimeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {pruntime_rpc.InitRuntimeResponse} [response] InitRuntimeResponse - */ - - /** - * Calls InitRuntime. - * @function initRuntime - * @memberof pruntime_rpc.PhactoryAPI - * @instance - * @param {pruntime_rpc.IInitRuntimeRequest} request InitRuntimeRequest message or plain object - * @param {pruntime_rpc.PhactoryAPI.InitRuntimeCallback} callback Node-style callback called with the error, if any, and InitRuntimeResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PhactoryAPI.prototype.initRuntime = function initRuntime(request, callback) { - return this.rpcCall(initRuntime, $root.pruntime_rpc.InitRuntimeRequest, $root.pruntime_rpc.InitRuntimeResponse, request, callback); - }, "name", { value: "InitRuntime" }); - - /** - * Calls InitRuntime. - * @function initRuntime - * @memberof pruntime_rpc.PhactoryAPI - * @instance - * @param {pruntime_rpc.IInitRuntimeRequest} request InitRuntimeRequest message or plain object - * @returns {Promise<pruntime_rpc.InitRuntimeResponse>} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link pruntime_rpc.PhactoryAPI#getRuntimeInfo}. - * @memberof pruntime_rpc.PhactoryAPI - * @typedef GetRuntimeInfoCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {pruntime_rpc.InitRuntimeResponse} [response] InitRuntimeResponse - */ - - /** - * Calls GetRuntimeInfo. - * @function getRuntimeInfo - * @memberof pruntime_rpc.PhactoryAPI - * @instance - * @param {pruntime_rpc.IGetRuntimeInfoRequest} request GetRuntimeInfoRequest message or plain object - * @param {pruntime_rpc.PhactoryAPI.GetRuntimeInfoCallback} callback Node-style callback called with the error, if any, and InitRuntimeResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PhactoryAPI.prototype.getRuntimeInfo = function getRuntimeInfo(request, callback) { - return this.rpcCall(getRuntimeInfo, $root.pruntime_rpc.GetRuntimeInfoRequest, $root.pruntime_rpc.InitRuntimeResponse, request, callback); - }, "name", { value: "GetRuntimeInfo" }); - - /** - * Calls GetRuntimeInfo. - * @function getRuntimeInfo - * @memberof pruntime_rpc.PhactoryAPI - * @instance - * @param {pruntime_rpc.IGetRuntimeInfoRequest} request GetRuntimeInfoRequest message or plain object - * @returns {Promise<pruntime_rpc.InitRuntimeResponse>} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link pruntime_rpc.PhactoryAPI#getEgressMessages}. - * @memberof pruntime_rpc.PhactoryAPI - * @typedef GetEgressMessagesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {pruntime_rpc.GetEgressMessagesResponse} [response] GetEgressMessagesResponse - */ - - /** - * Calls GetEgressMessages. - * @function getEgressMessages - * @memberof pruntime_rpc.PhactoryAPI - * @instance - * @param {google.protobuf.IEmpty} request Empty message or plain object - * @param {pruntime_rpc.PhactoryAPI.GetEgressMessagesCallback} callback Node-style callback called with the error, if any, and GetEgressMessagesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PhactoryAPI.prototype.getEgressMessages = function getEgressMessages(request, callback) { - return this.rpcCall(getEgressMessages, $root.google.protobuf.Empty, $root.pruntime_rpc.GetEgressMessagesResponse, request, callback); - }, "name", { value: "GetEgressMessages" }); - - /** - * Calls GetEgressMessages. - * @function getEgressMessages - * @memberof pruntime_rpc.PhactoryAPI - * @instance - * @param {google.protobuf.IEmpty} request Empty message or plain object - * @returns {Promise<pruntime_rpc.GetEgressMessagesResponse>} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link pruntime_rpc.PhactoryAPI#contractQuery}. - * @memberof pruntime_rpc.PhactoryAPI - * @typedef ContractQueryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {pruntime_rpc.ContractQueryResponse} [response] ContractQueryResponse - */ - - /** - * Calls ContractQuery. - * @function contractQuery - * @memberof pruntime_rpc.PhactoryAPI - * @instance - * @param {pruntime_rpc.IContractQueryRequest} request ContractQueryRequest message or plain object - * @param {pruntime_rpc.PhactoryAPI.ContractQueryCallback} callback Node-style callback called with the error, if any, and ContractQueryResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PhactoryAPI.prototype.contractQuery = function contractQuery(request, callback) { - return this.rpcCall(contractQuery, $root.pruntime_rpc.ContractQueryRequest, $root.pruntime_rpc.ContractQueryResponse, request, callback); - }, "name", { value: "ContractQuery" }); - - /** - * Calls ContractQuery. - * @function contractQuery - * @memberof pruntime_rpc.PhactoryAPI - * @instance - * @param {pruntime_rpc.IContractQueryRequest} request ContractQueryRequest message or plain object - * @returns {Promise<pruntime_rpc.ContractQueryResponse>} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link pruntime_rpc.PhactoryAPI#getWorkerState}. - * @memberof pruntime_rpc.PhactoryAPI - * @typedef GetWorkerStateCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {pruntime_rpc.WorkerState} [response] WorkerState - */ - - /** - * Calls GetWorkerState. - * @function getWorkerState - * @memberof pruntime_rpc.PhactoryAPI - * @instance - * @param {pruntime_rpc.IGetWorkerStateRequest} request GetWorkerStateRequest message or plain object - * @param {pruntime_rpc.PhactoryAPI.GetWorkerStateCallback} callback Node-style callback called with the error, if any, and WorkerState - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PhactoryAPI.prototype.getWorkerState = function getWorkerState(request, callback) { - return this.rpcCall(getWorkerState, $root.pruntime_rpc.GetWorkerStateRequest, $root.pruntime_rpc.WorkerState, request, callback); - }, "name", { value: "GetWorkerState" }); - - /** - * Calls GetWorkerState. - * @function getWorkerState - * @memberof pruntime_rpc.PhactoryAPI - * @instance - * @param {pruntime_rpc.IGetWorkerStateRequest} request GetWorkerStateRequest message or plain object - * @returns {Promise<pruntime_rpc.WorkerState>} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link pruntime_rpc.PhactoryAPI#addEndpoint}. - * @memberof pruntime_rpc.PhactoryAPI - * @typedef AddEndpointCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {pruntime_rpc.GetEndpointResponse} [response] GetEndpointResponse - */ - - /** - * Calls AddEndpoint. - * @function addEndpoint - * @memberof pruntime_rpc.PhactoryAPI - * @instance - * @param {pruntime_rpc.IAddEndpointRequest} request AddEndpointRequest message or plain object - * @param {pruntime_rpc.PhactoryAPI.AddEndpointCallback} callback Node-style callback called with the error, if any, and GetEndpointResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PhactoryAPI.prototype.addEndpoint = function addEndpoint(request, callback) { - return this.rpcCall(addEndpoint, $root.pruntime_rpc.AddEndpointRequest, $root.pruntime_rpc.GetEndpointResponse, request, callback); - }, "name", { value: "AddEndpoint" }); - - /** - * Calls AddEndpoint. - * @function addEndpoint - * @memberof pruntime_rpc.PhactoryAPI - * @instance - * @param {pruntime_rpc.IAddEndpointRequest} request AddEndpointRequest message or plain object - * @returns {Promise<pruntime_rpc.GetEndpointResponse>} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link pruntime_rpc.PhactoryAPI#refreshEndpointSigningTime}. - * @memberof pruntime_rpc.PhactoryAPI - * @typedef RefreshEndpointSigningTimeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {pruntime_rpc.GetEndpointResponse} [response] GetEndpointResponse - */ - - /** - * Calls RefreshEndpointSigningTime. - * @function refreshEndpointSigningTime - * @memberof pruntime_rpc.PhactoryAPI - * @instance - * @param {google.protobuf.IEmpty} request Empty message or plain object - * @param {pruntime_rpc.PhactoryAPI.RefreshEndpointSigningTimeCallback} callback Node-style callback called with the error, if any, and GetEndpointResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PhactoryAPI.prototype.refreshEndpointSigningTime = function refreshEndpointSigningTime(request, callback) { - return this.rpcCall(refreshEndpointSigningTime, $root.google.protobuf.Empty, $root.pruntime_rpc.GetEndpointResponse, request, callback); - }, "name", { value: "RefreshEndpointSigningTime" }); - - /** - * Calls RefreshEndpointSigningTime. - * @function refreshEndpointSigningTime - * @memberof pruntime_rpc.PhactoryAPI - * @instance - * @param {google.protobuf.IEmpty} request Empty message or plain object - * @returns {Promise<pruntime_rpc.GetEndpointResponse>} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link pruntime_rpc.PhactoryAPI#getEndpointInfo}. - * @memberof pruntime_rpc.PhactoryAPI - * @typedef GetEndpointInfoCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {pruntime_rpc.GetEndpointResponse} [response] GetEndpointResponse - */ - - /** - * Calls GetEndpointInfo. - * @function getEndpointInfo - * @memberof pruntime_rpc.PhactoryAPI - * @instance - * @param {google.protobuf.IEmpty} request Empty message or plain object - * @param {pruntime_rpc.PhactoryAPI.GetEndpointInfoCallback} callback Node-style callback called with the error, if any, and GetEndpointResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PhactoryAPI.prototype.getEndpointInfo = function getEndpointInfo(request, callback) { - return this.rpcCall(getEndpointInfo, $root.google.protobuf.Empty, $root.pruntime_rpc.GetEndpointResponse, request, callback); - }, "name", { value: "GetEndpointInfo" }); - - /** - * Calls GetEndpointInfo. - * @function getEndpointInfo - * @memberof pruntime_rpc.PhactoryAPI - * @instance - * @param {google.protobuf.IEmpty} request Empty message or plain object - * @returns {Promise<pruntime_rpc.GetEndpointResponse>} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link pruntime_rpc.PhactoryAPI#signEndpointInfo}. - * @memberof pruntime_rpc.PhactoryAPI - * @typedef SignEndpointInfoCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {pruntime_rpc.GetEndpointResponse} [response] GetEndpointResponse - */ - - /** - * Calls SignEndpointInfo. - * @function signEndpointInfo - * @memberof pruntime_rpc.PhactoryAPI - * @instance - * @param {pruntime_rpc.ISignEndpointsRequest} request SignEndpointsRequest message or plain object - * @param {pruntime_rpc.PhactoryAPI.SignEndpointInfoCallback} callback Node-style callback called with the error, if any, and GetEndpointResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PhactoryAPI.prototype.signEndpointInfo = function signEndpointInfo(request, callback) { - return this.rpcCall(signEndpointInfo, $root.pruntime_rpc.SignEndpointsRequest, $root.pruntime_rpc.GetEndpointResponse, request, callback); - }, "name", { value: "SignEndpointInfo" }); - - /** - * Calls SignEndpointInfo. - * @function signEndpointInfo - * @memberof pruntime_rpc.PhactoryAPI - * @instance - * @param {pruntime_rpc.ISignEndpointsRequest} request SignEndpointsRequest message or plain object - * @returns {Promise<pruntime_rpc.GetEndpointResponse>} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link pruntime_rpc.PhactoryAPI#derivePhalaI2pKey}. - * @memberof pruntime_rpc.PhactoryAPI - * @typedef DerivePhalaI2pKeyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {pruntime_rpc.DerivePhalaI2pKeyResponse} [response] DerivePhalaI2pKeyResponse - */ - - /** - * Calls DerivePhalaI2pKey. - * @function derivePhalaI2pKey - * @memberof pruntime_rpc.PhactoryAPI - * @instance - * @param {google.protobuf.IEmpty} request Empty message or plain object - * @param {pruntime_rpc.PhactoryAPI.DerivePhalaI2pKeyCallback} callback Node-style callback called with the error, if any, and DerivePhalaI2pKeyResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PhactoryAPI.prototype.derivePhalaI2pKey = function derivePhalaI2pKey(request, callback) { - return this.rpcCall(derivePhalaI2pKey, $root.google.protobuf.Empty, $root.pruntime_rpc.DerivePhalaI2pKeyResponse, request, callback); - }, "name", { value: "DerivePhalaI2pKey" }); - - /** - * Calls DerivePhalaI2pKey. - * @function derivePhalaI2pKey - * @memberof pruntime_rpc.PhactoryAPI - * @instance - * @param {google.protobuf.IEmpty} request Empty message or plain object - * @returns {Promise<pruntime_rpc.DerivePhalaI2pKeyResponse>} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link pruntime_rpc.PhactoryAPI#echo}. - * @memberof pruntime_rpc.PhactoryAPI - * @typedef EchoCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {pruntime_rpc.EchoMessage} [response] EchoMessage - */ - - /** - * Calls Echo. - * @function echo - * @memberof pruntime_rpc.PhactoryAPI - * @instance - * @param {pruntime_rpc.IEchoMessage} request EchoMessage message or plain object - * @param {pruntime_rpc.PhactoryAPI.EchoCallback} callback Node-style callback called with the error, if any, and EchoMessage - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PhactoryAPI.prototype.echo = function echo(request, callback) { - return this.rpcCall(echo, $root.pruntime_rpc.EchoMessage, $root.pruntime_rpc.EchoMessage, request, callback); - }, "name", { value: "Echo" }); - - /** - * Calls Echo. - * @function echo - * @memberof pruntime_rpc.PhactoryAPI - * @instance - * @param {pruntime_rpc.IEchoMessage} request EchoMessage message or plain object - * @returns {Promise<pruntime_rpc.EchoMessage>} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link pruntime_rpc.PhactoryAPI#handoverCreateChallenge}. - * @memberof pruntime_rpc.PhactoryAPI - * @typedef HandoverCreateChallengeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {pruntime_rpc.HandoverChallenge} [response] HandoverChallenge - */ - - /** - * Calls HandoverCreateChallenge. - * @function handoverCreateChallenge - * @memberof pruntime_rpc.PhactoryAPI - * @instance - * @param {google.protobuf.IEmpty} request Empty message or plain object - * @param {pruntime_rpc.PhactoryAPI.HandoverCreateChallengeCallback} callback Node-style callback called with the error, if any, and HandoverChallenge - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PhactoryAPI.prototype.handoverCreateChallenge = function handoverCreateChallenge(request, callback) { - return this.rpcCall(handoverCreateChallenge, $root.google.protobuf.Empty, $root.pruntime_rpc.HandoverChallenge, request, callback); - }, "name", { value: "HandoverCreateChallenge" }); - - /** - * Calls HandoverCreateChallenge. - * @function handoverCreateChallenge - * @memberof pruntime_rpc.PhactoryAPI - * @instance - * @param {google.protobuf.IEmpty} request Empty message or plain object - * @returns {Promise<pruntime_rpc.HandoverChallenge>} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link pruntime_rpc.PhactoryAPI#handoverStart}. - * @memberof pruntime_rpc.PhactoryAPI - * @typedef HandoverStartCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {pruntime_rpc.HandoverWorkerKey} [response] HandoverWorkerKey - */ - - /** - * Calls HandoverStart. - * @function handoverStart - * @memberof pruntime_rpc.PhactoryAPI - * @instance - * @param {pruntime_rpc.IHandoverChallengeResponse} request HandoverChallengeResponse message or plain object - * @param {pruntime_rpc.PhactoryAPI.HandoverStartCallback} callback Node-style callback called with the error, if any, and HandoverWorkerKey - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PhactoryAPI.prototype.handoverStart = function handoverStart(request, callback) { - return this.rpcCall(handoverStart, $root.pruntime_rpc.HandoverChallengeResponse, $root.pruntime_rpc.HandoverWorkerKey, request, callback); - }, "name", { value: "HandoverStart" }); - - /** - * Calls HandoverStart. - * @function handoverStart - * @memberof pruntime_rpc.PhactoryAPI - * @instance - * @param {pruntime_rpc.IHandoverChallengeResponse} request HandoverChallengeResponse message or plain object - * @returns {Promise<pruntime_rpc.HandoverWorkerKey>} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link pruntime_rpc.PhactoryAPI#handoverAcceptChallenge}. - * @memberof pruntime_rpc.PhactoryAPI - * @typedef HandoverAcceptChallengeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {pruntime_rpc.HandoverChallengeResponse} [response] HandoverChallengeResponse - */ - - /** - * Calls HandoverAcceptChallenge. - * @function handoverAcceptChallenge - * @memberof pruntime_rpc.PhactoryAPI - * @instance - * @param {pruntime_rpc.IHandoverChallenge} request HandoverChallenge message or plain object - * @param {pruntime_rpc.PhactoryAPI.HandoverAcceptChallengeCallback} callback Node-style callback called with the error, if any, and HandoverChallengeResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PhactoryAPI.prototype.handoverAcceptChallenge = function handoverAcceptChallenge(request, callback) { - return this.rpcCall(handoverAcceptChallenge, $root.pruntime_rpc.HandoverChallenge, $root.pruntime_rpc.HandoverChallengeResponse, request, callback); - }, "name", { value: "HandoverAcceptChallenge" }); - - /** - * Calls HandoverAcceptChallenge. - * @function handoverAcceptChallenge - * @memberof pruntime_rpc.PhactoryAPI - * @instance - * @param {pruntime_rpc.IHandoverChallenge} request HandoverChallenge message or plain object - * @returns {Promise<pruntime_rpc.HandoverChallengeResponse>} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link pruntime_rpc.PhactoryAPI#handoverReceive}. - * @memberof pruntime_rpc.PhactoryAPI - * @typedef HandoverReceiveCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls HandoverReceive. - * @function handoverReceive - * @memberof pruntime_rpc.PhactoryAPI - * @instance - * @param {pruntime_rpc.IHandoverWorkerKey} request HandoverWorkerKey message or plain object - * @param {pruntime_rpc.PhactoryAPI.HandoverReceiveCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PhactoryAPI.prototype.handoverReceive = function handoverReceive(request, callback) { - return this.rpcCall(handoverReceive, $root.pruntime_rpc.HandoverWorkerKey, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "HandoverReceive" }); - - /** - * Calls HandoverReceive. - * @function handoverReceive - * @memberof pruntime_rpc.PhactoryAPI - * @instance - * @param {pruntime_rpc.IHandoverWorkerKey} request HandoverWorkerKey message or plain object - * @returns {Promise<google.protobuf.Empty>} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link pruntime_rpc.PhactoryAPI#configNetwork}. - * @memberof pruntime_rpc.PhactoryAPI - * @typedef ConfigNetworkCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls ConfigNetwork. - * @function configNetwork - * @memberof pruntime_rpc.PhactoryAPI - * @instance - * @param {pruntime_rpc.INetworkConfig} request NetworkConfig message or plain object - * @param {pruntime_rpc.PhactoryAPI.ConfigNetworkCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PhactoryAPI.prototype.configNetwork = function configNetwork(request, callback) { - return this.rpcCall(configNetwork, $root.pruntime_rpc.NetworkConfig, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "ConfigNetwork" }); - - /** - * Calls ConfigNetwork. - * @function configNetwork - * @memberof pruntime_rpc.PhactoryAPI - * @instance - * @param {pruntime_rpc.INetworkConfig} request NetworkConfig message or plain object - * @returns {Promise<google.protobuf.Empty>} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link pruntime_rpc.PhactoryAPI#httpFetch}. - * @memberof pruntime_rpc.PhactoryAPI - * @typedef HttpFetchCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {pruntime_rpc.HttpResponse} [response] HttpResponse - */ - - /** - * Calls HttpFetch. - * @function httpFetch - * @memberof pruntime_rpc.PhactoryAPI - * @instance - * @param {pruntime_rpc.IHttpRequest} request HttpRequest message or plain object - * @param {pruntime_rpc.PhactoryAPI.HttpFetchCallback} callback Node-style callback called with the error, if any, and HttpResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(PhactoryAPI.prototype.httpFetch = function httpFetch(request, callback) { - return this.rpcCall(httpFetch, $root.pruntime_rpc.HttpRequest, $root.pruntime_rpc.HttpResponse, request, callback); - }, "name", { value: "HttpFetch" }); - - /** - * Calls HttpFetch. - * @function httpFetch - * @memberof pruntime_rpc.PhactoryAPI - * @instance - * @param {pruntime_rpc.IHttpRequest} request HttpRequest message or plain object - * @returns {Promise<pruntime_rpc.HttpResponse>} Promise - * @variation 2 - */ - - return PhactoryAPI; - })(); + /** + * TokenomicInfo pBench. + * @member {string} pBench + * @memberof pruntime_rpc.TokenomicInfo + * @instance + */ + TokenomicInfo.prototype.pBench = ""; - pruntime_rpc.PhactoryInfo = (function() { - - /** - * Properties of a PhactoryInfo. - * @memberof pruntime_rpc - * @interface IPhactoryInfo - * @property {boolean|null} [initialized] PhactoryInfo initialized - * @property {boolean|null} [registered] PhactoryInfo registered - * @property {string|null} [genesisBlockHash] PhactoryInfo genesisBlockHash - * @property {string|null} [publicKey] PhactoryInfo publicKey - * @property {string|null} [ecdhPublicKey] PhactoryInfo ecdhPublicKey - * @property {number|null} [headernum] PhactoryInfo headernum - * @property {number|null} [paraHeadernum] PhactoryInfo paraHeadernum - * @property {number|null} [blocknum] PhactoryInfo blocknum - * @property {string|null} [stateRoot] PhactoryInfo stateRoot - * @property {boolean|null} [devMode] PhactoryInfo devMode - * @property {number|Long|null} [pendingMessages] PhactoryInfo pendingMessages - * @property {number|Long|null} [score] PhactoryInfo score - * @property {pruntime_rpc.IGatekeeperStatus|null} [gatekeeper] PhactoryInfo gatekeeper - * @property {string|null} [version] PhactoryInfo version - * @property {string|null} [gitRevision] PhactoryInfo gitRevision - * @property {number|Long|null} [runningSideTasks] PhactoryInfo runningSideTasks - * @property {pruntime_rpc.IMemoryUsage|null} [memoryUsage] PhactoryInfo memoryUsage - * @property {boolean|null} [waitingForParaheaders] PhactoryInfo waitingForParaheaders - * @property {pruntime_rpc.INetworkStatus|null} [networkStatus] PhactoryInfo networkStatus - * @property {pruntime_rpc.ISystemInfo|null} [system] PhactoryInfo system - */ - - /** - * Constructs a new PhactoryInfo. - * @memberof pruntime_rpc - * @classdesc Represents a PhactoryInfo. - * @implements IPhactoryInfo - * @constructor - * @param {pruntime_rpc.IPhactoryInfo=} [properties] Properties to set - */ - function PhactoryInfo(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * TokenomicInfo pInstant. + * @member {string} pInstant + * @memberof pruntime_rpc.TokenomicInfo + * @instance + */ + TokenomicInfo.prototype.pInstant = ""; - /** - * PhactoryInfo initialized. - * @member {boolean} initialized - * @memberof pruntime_rpc.PhactoryInfo - * @instance - */ - PhactoryInfo.prototype.initialized = false; - - /** - * PhactoryInfo registered. - * @member {boolean} registered - * @memberof pruntime_rpc.PhactoryInfo - * @instance - */ - PhactoryInfo.prototype.registered = false; - - /** - * PhactoryInfo genesisBlockHash. - * @member {string|null|undefined} genesisBlockHash - * @memberof pruntime_rpc.PhactoryInfo - * @instance - */ - PhactoryInfo.prototype.genesisBlockHash = null; - - /** - * PhactoryInfo publicKey. - * @member {string|null|undefined} publicKey - * @memberof pruntime_rpc.PhactoryInfo - * @instance - */ - PhactoryInfo.prototype.publicKey = null; - - /** - * PhactoryInfo ecdhPublicKey. - * @member {string|null|undefined} ecdhPublicKey - * @memberof pruntime_rpc.PhactoryInfo - * @instance - */ - PhactoryInfo.prototype.ecdhPublicKey = null; - - /** - * PhactoryInfo headernum. - * @member {number} headernum - * @memberof pruntime_rpc.PhactoryInfo - * @instance - */ - PhactoryInfo.prototype.headernum = 0; - - /** - * PhactoryInfo paraHeadernum. - * @member {number} paraHeadernum - * @memberof pruntime_rpc.PhactoryInfo - * @instance - */ - PhactoryInfo.prototype.paraHeadernum = 0; - - /** - * PhactoryInfo blocknum. - * @member {number} blocknum - * @memberof pruntime_rpc.PhactoryInfo - * @instance - */ - PhactoryInfo.prototype.blocknum = 0; - - /** - * PhactoryInfo stateRoot. - * @member {string} stateRoot - * @memberof pruntime_rpc.PhactoryInfo - * @instance - */ - PhactoryInfo.prototype.stateRoot = ""; - - /** - * PhactoryInfo devMode. - * @member {boolean} devMode - * @memberof pruntime_rpc.PhactoryInfo - * @instance - */ - PhactoryInfo.prototype.devMode = false; - - /** - * PhactoryInfo pendingMessages. - * @member {number|Long} pendingMessages - * @memberof pruntime_rpc.PhactoryInfo - * @instance - */ - PhactoryInfo.prototype.pendingMessages = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * PhactoryInfo score. - * @member {number|Long} score - * @memberof pruntime_rpc.PhactoryInfo - * @instance - */ - PhactoryInfo.prototype.score = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * PhactoryInfo gatekeeper. - * @member {pruntime_rpc.IGatekeeperStatus|null|undefined} gatekeeper - * @memberof pruntime_rpc.PhactoryInfo - * @instance - */ - PhactoryInfo.prototype.gatekeeper = null; - - /** - * PhactoryInfo version. - * @member {string} version - * @memberof pruntime_rpc.PhactoryInfo - * @instance - */ - PhactoryInfo.prototype.version = ""; - - /** - * PhactoryInfo gitRevision. - * @member {string} gitRevision - * @memberof pruntime_rpc.PhactoryInfo - * @instance - */ - PhactoryInfo.prototype.gitRevision = ""; - - /** - * PhactoryInfo runningSideTasks. - * @member {number|Long} runningSideTasks - * @memberof pruntime_rpc.PhactoryInfo - * @instance - */ - PhactoryInfo.prototype.runningSideTasks = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * PhactoryInfo memoryUsage. - * @member {pruntime_rpc.IMemoryUsage|null|undefined} memoryUsage - * @memberof pruntime_rpc.PhactoryInfo - * @instance - */ - PhactoryInfo.prototype.memoryUsage = null; - - /** - * PhactoryInfo waitingForParaheaders. - * @member {boolean} waitingForParaheaders - * @memberof pruntime_rpc.PhactoryInfo - * @instance - */ - PhactoryInfo.prototype.waitingForParaheaders = false; - - /** - * PhactoryInfo networkStatus. - * @member {pruntime_rpc.INetworkStatus|null|undefined} networkStatus - * @memberof pruntime_rpc.PhactoryInfo - * @instance - */ - PhactoryInfo.prototype.networkStatus = null; - - /** - * PhactoryInfo system. - * @member {pruntime_rpc.ISystemInfo|null|undefined} system - * @memberof pruntime_rpc.PhactoryInfo - * @instance - */ - PhactoryInfo.prototype.system = null; - - // OneOf field names bound to virtual getters and setters - let $oneOfFields; - - /** - * PhactoryInfo _genesisBlockHash. - * @member {"genesisBlockHash"|undefined} _genesisBlockHash - * @memberof pruntime_rpc.PhactoryInfo - * @instance - */ - Object.defineProperty(PhactoryInfo.prototype, "_genesisBlockHash", { - get: $util.oneOfGetter($oneOfFields = ["genesisBlockHash"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * PhactoryInfo _publicKey. - * @member {"publicKey"|undefined} _publicKey - * @memberof pruntime_rpc.PhactoryInfo - * @instance - */ - Object.defineProperty(PhactoryInfo.prototype, "_publicKey", { - get: $util.oneOfGetter($oneOfFields = ["publicKey"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * PhactoryInfo _ecdhPublicKey. - * @member {"ecdhPublicKey"|undefined} _ecdhPublicKey - * @memberof pruntime_rpc.PhactoryInfo - * @instance - */ - Object.defineProperty(PhactoryInfo.prototype, "_ecdhPublicKey", { - get: $util.oneOfGetter($oneOfFields = ["ecdhPublicKey"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new PhactoryInfo instance using the specified properties. - * @function create - * @memberof pruntime_rpc.PhactoryInfo - * @static - * @param {pruntime_rpc.IPhactoryInfo=} [properties] Properties to set - * @returns {pruntime_rpc.PhactoryInfo} PhactoryInfo instance - */ - PhactoryInfo.create = function create(properties) { - return new PhactoryInfo(properties); - }; - - /** - * Encodes the specified PhactoryInfo message. Does not implicitly {@link pruntime_rpc.PhactoryInfo.verify|verify} messages. - * @function encode - * @memberof pruntime_rpc.PhactoryInfo - * @static - * @param {pruntime_rpc.IPhactoryInfo} message PhactoryInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PhactoryInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.initialized != null && Object.hasOwnProperty.call(message, "initialized")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.initialized); - if (message.registered != null && Object.hasOwnProperty.call(message, "registered")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.registered); - if (message.genesisBlockHash != null && Object.hasOwnProperty.call(message, "genesisBlockHash")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.genesisBlockHash); - if (message.publicKey != null && Object.hasOwnProperty.call(message, "publicKey")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.publicKey); - if (message.ecdhPublicKey != null && Object.hasOwnProperty.call(message, "ecdhPublicKey")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.ecdhPublicKey); - if (message.headernum != null && Object.hasOwnProperty.call(message, "headernum")) - writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.headernum); - if (message.paraHeadernum != null && Object.hasOwnProperty.call(message, "paraHeadernum")) - writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.paraHeadernum); - if (message.blocknum != null && Object.hasOwnProperty.call(message, "blocknum")) - writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.blocknum); - if (message.stateRoot != null && Object.hasOwnProperty.call(message, "stateRoot")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.stateRoot); - if (message.devMode != null && Object.hasOwnProperty.call(message, "devMode")) - writer.uint32(/* id 11, wireType 0 =*/88).bool(message.devMode); - if (message.pendingMessages != null && Object.hasOwnProperty.call(message, "pendingMessages")) - writer.uint32(/* id 12, wireType 0 =*/96).uint64(message.pendingMessages); - if (message.score != null && Object.hasOwnProperty.call(message, "score")) - writer.uint32(/* id 13, wireType 0 =*/104).uint64(message.score); - if (message.gatekeeper != null && Object.hasOwnProperty.call(message, "gatekeeper")) - $root.pruntime_rpc.GatekeeperStatus.encode(message.gatekeeper, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 15, wireType 2 =*/122).string(message.version); - if (message.gitRevision != null && Object.hasOwnProperty.call(message, "gitRevision")) - writer.uint32(/* id 16, wireType 2 =*/130).string(message.gitRevision); - if (message.runningSideTasks != null && Object.hasOwnProperty.call(message, "runningSideTasks")) - writer.uint32(/* id 17, wireType 0 =*/136).uint64(message.runningSideTasks); - if (message.memoryUsage != null && Object.hasOwnProperty.call(message, "memoryUsage")) - $root.pruntime_rpc.MemoryUsage.encode(message.memoryUsage, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); - if (message.waitingForParaheaders != null && Object.hasOwnProperty.call(message, "waitingForParaheaders")) - writer.uint32(/* id 21, wireType 0 =*/168).bool(message.waitingForParaheaders); - if (message.networkStatus != null && Object.hasOwnProperty.call(message, "networkStatus")) - $root.pruntime_rpc.NetworkStatus.encode(message.networkStatus, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); - if (message.system != null && Object.hasOwnProperty.call(message, "system")) - $root.pruntime_rpc.SystemInfo.encode(message.system, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PhactoryInfo message, length delimited. Does not implicitly {@link pruntime_rpc.PhactoryInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof pruntime_rpc.PhactoryInfo - * @static - * @param {pruntime_rpc.IPhactoryInfo} message PhactoryInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PhactoryInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PhactoryInfo message from the specified reader or buffer. - * @function decode - * @memberof pruntime_rpc.PhactoryInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pruntime_rpc.PhactoryInfo} PhactoryInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PhactoryInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.PhactoryInfo(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.initialized = reader.bool(); - break; - case 2: - message.registered = reader.bool(); - break; - case 4: - message.genesisBlockHash = reader.string(); - break; - case 5: - message.publicKey = reader.string(); - break; - case 6: - message.ecdhPublicKey = reader.string(); - break; - case 7: - message.headernum = reader.uint32(); - break; - case 8: - message.paraHeadernum = reader.uint32(); - break; - case 9: - message.blocknum = reader.uint32(); - break; - case 10: - message.stateRoot = reader.string(); - break; - case 11: - message.devMode = reader.bool(); - break; - case 12: - message.pendingMessages = reader.uint64(); - break; - case 13: - message.score = reader.uint64(); - break; - case 14: - message.gatekeeper = $root.pruntime_rpc.GatekeeperStatus.decode(reader, reader.uint32()); - break; - case 15: - message.version = reader.string(); - break; - case 16: - message.gitRevision = reader.string(); - break; - case 17: - message.runningSideTasks = reader.uint64(); - break; - case 18: - message.memoryUsage = $root.pruntime_rpc.MemoryUsage.decode(reader, reader.uint32()); - break; - case 21: - message.waitingForParaheaders = reader.bool(); - break; - case 22: - message.networkStatus = $root.pruntime_rpc.NetworkStatus.decode(reader, reader.uint32()); - break; - case 23: - message.system = $root.pruntime_rpc.SystemInfo.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PhactoryInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pruntime_rpc.PhactoryInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.PhactoryInfo} PhactoryInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PhactoryInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PhactoryInfo message. - * @function verify - * @memberof pruntime_rpc.PhactoryInfo - * @static - * @param {Object.<string,*>} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PhactoryInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - let properties = {}; - if (message.initialized != null && message.hasOwnProperty("initialized")) - if (typeof message.initialized !== "boolean") - return "initialized: boolean expected"; - if (message.registered != null && message.hasOwnProperty("registered")) - if (typeof message.registered !== "boolean") - return "registered: boolean expected"; - if (message.genesisBlockHash != null && message.hasOwnProperty("genesisBlockHash")) { - properties._genesisBlockHash = 1; - if (!$util.isString(message.genesisBlockHash)) - return "genesisBlockHash: string expected"; - } - if (message.publicKey != null && message.hasOwnProperty("publicKey")) { - properties._publicKey = 1; - if (!$util.isString(message.publicKey)) - return "publicKey: string expected"; - } - if (message.ecdhPublicKey != null && message.hasOwnProperty("ecdhPublicKey")) { - properties._ecdhPublicKey = 1; - if (!$util.isString(message.ecdhPublicKey)) - return "ecdhPublicKey: string expected"; - } - if (message.headernum != null && message.hasOwnProperty("headernum")) - if (!$util.isInteger(message.headernum)) - return "headernum: integer expected"; - if (message.paraHeadernum != null && message.hasOwnProperty("paraHeadernum")) - if (!$util.isInteger(message.paraHeadernum)) - return "paraHeadernum: integer expected"; - if (message.blocknum != null && message.hasOwnProperty("blocknum")) - if (!$util.isInteger(message.blocknum)) - return "blocknum: integer expected"; - if (message.stateRoot != null && message.hasOwnProperty("stateRoot")) - if (!$util.isString(message.stateRoot)) - return "stateRoot: string expected"; - if (message.devMode != null && message.hasOwnProperty("devMode")) - if (typeof message.devMode !== "boolean") - return "devMode: boolean expected"; - if (message.pendingMessages != null && message.hasOwnProperty("pendingMessages")) - if (!$util.isInteger(message.pendingMessages) && !(message.pendingMessages && $util.isInteger(message.pendingMessages.low) && $util.isInteger(message.pendingMessages.high))) - return "pendingMessages: integer|Long expected"; - if (message.score != null && message.hasOwnProperty("score")) - if (!$util.isInteger(message.score) && !(message.score && $util.isInteger(message.score.low) && $util.isInteger(message.score.high))) - return "score: integer|Long expected"; - if (message.gatekeeper != null && message.hasOwnProperty("gatekeeper")) { - let error = $root.pruntime_rpc.GatekeeperStatus.verify(message.gatekeeper); - if (error) - return "gatekeeper." + error; - } - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; - if (message.gitRevision != null && message.hasOwnProperty("gitRevision")) - if (!$util.isString(message.gitRevision)) - return "gitRevision: string expected"; - if (message.runningSideTasks != null && message.hasOwnProperty("runningSideTasks")) - if (!$util.isInteger(message.runningSideTasks) && !(message.runningSideTasks && $util.isInteger(message.runningSideTasks.low) && $util.isInteger(message.runningSideTasks.high))) - return "runningSideTasks: integer|Long expected"; - if (message.memoryUsage != null && message.hasOwnProperty("memoryUsage")) { - let error = $root.pruntime_rpc.MemoryUsage.verify(message.memoryUsage); - if (error) - return "memoryUsage." + error; - } - if (message.waitingForParaheaders != null && message.hasOwnProperty("waitingForParaheaders")) - if (typeof message.waitingForParaheaders !== "boolean") - return "waitingForParaheaders: boolean expected"; - if (message.networkStatus != null && message.hasOwnProperty("networkStatus")) { - let error = $root.pruntime_rpc.NetworkStatus.verify(message.networkStatus); - if (error) - return "networkStatus." + error; - } - if (message.system != null && message.hasOwnProperty("system")) { - let error = $root.pruntime_rpc.SystemInfo.verify(message.system); - if (error) - return "system." + error; - } - return null; - }; - - /** - * Creates a PhactoryInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pruntime_rpc.PhactoryInfo - * @static - * @param {Object.<string,*>} object Plain object - * @returns {pruntime_rpc.PhactoryInfo} PhactoryInfo - */ - PhactoryInfo.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.PhactoryInfo) - return object; - let message = new $root.pruntime_rpc.PhactoryInfo(); - if (object.initialized != null) - message.initialized = Boolean(object.initialized); - if (object.registered != null) - message.registered = Boolean(object.registered); - if (object.genesisBlockHash != null) - message.genesisBlockHash = String(object.genesisBlockHash); - if (object.publicKey != null) - message.publicKey = String(object.publicKey); - if (object.ecdhPublicKey != null) - message.ecdhPublicKey = String(object.ecdhPublicKey); - if (object.headernum != null) - message.headernum = object.headernum >>> 0; - if (object.paraHeadernum != null) - message.paraHeadernum = object.paraHeadernum >>> 0; - if (object.blocknum != null) - message.blocknum = object.blocknum >>> 0; - if (object.stateRoot != null) - message.stateRoot = String(object.stateRoot); - if (object.devMode != null) - message.devMode = Boolean(object.devMode); - if (object.pendingMessages != null) - if ($util.Long) - (message.pendingMessages = $util.Long.fromValue(object.pendingMessages)).unsigned = true; - else if (typeof object.pendingMessages === "string") - message.pendingMessages = parseInt(object.pendingMessages, 10); - else if (typeof object.pendingMessages === "number") - message.pendingMessages = object.pendingMessages; - else if (typeof object.pendingMessages === "object") - message.pendingMessages = new $util.LongBits(object.pendingMessages.low >>> 0, object.pendingMessages.high >>> 0).toNumber(true); - if (object.score != null) - if ($util.Long) - (message.score = $util.Long.fromValue(object.score)).unsigned = true; - else if (typeof object.score === "string") - message.score = parseInt(object.score, 10); - else if (typeof object.score === "number") - message.score = object.score; - else if (typeof object.score === "object") - message.score = new $util.LongBits(object.score.low >>> 0, object.score.high >>> 0).toNumber(true); - if (object.gatekeeper != null) { - if (typeof object.gatekeeper !== "object") - throw TypeError(".pruntime_rpc.PhactoryInfo.gatekeeper: object expected"); - message.gatekeeper = $root.pruntime_rpc.GatekeeperStatus.fromObject(object.gatekeeper); - } - if (object.version != null) - message.version = String(object.version); - if (object.gitRevision != null) - message.gitRevision = String(object.gitRevision); - if (object.runningSideTasks != null) - if ($util.Long) - (message.runningSideTasks = $util.Long.fromValue(object.runningSideTasks)).unsigned = true; - else if (typeof object.runningSideTasks === "string") - message.runningSideTasks = parseInt(object.runningSideTasks, 10); - else if (typeof object.runningSideTasks === "number") - message.runningSideTasks = object.runningSideTasks; - else if (typeof object.runningSideTasks === "object") - message.runningSideTasks = new $util.LongBits(object.runningSideTasks.low >>> 0, object.runningSideTasks.high >>> 0).toNumber(true); - if (object.memoryUsage != null) { - if (typeof object.memoryUsage !== "object") - throw TypeError(".pruntime_rpc.PhactoryInfo.memoryUsage: object expected"); - message.memoryUsage = $root.pruntime_rpc.MemoryUsage.fromObject(object.memoryUsage); - } - if (object.waitingForParaheaders != null) - message.waitingForParaheaders = Boolean(object.waitingForParaheaders); - if (object.networkStatus != null) { - if (typeof object.networkStatus !== "object") - throw TypeError(".pruntime_rpc.PhactoryInfo.networkStatus: object expected"); - message.networkStatus = $root.pruntime_rpc.NetworkStatus.fromObject(object.networkStatus); - } - if (object.system != null) { - if (typeof object.system !== "object") - throw TypeError(".pruntime_rpc.PhactoryInfo.system: object expected"); - message.system = $root.pruntime_rpc.SystemInfo.fromObject(object.system); - } - return message; - }; - - /** - * Creates a plain object from a PhactoryInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof pruntime_rpc.PhactoryInfo - * @static - * @param {pruntime_rpc.PhactoryInfo} message PhactoryInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.<string,*>} Plain object - */ - PhactoryInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.initialized = false; - object.registered = false; - object.headernum = 0; - object.paraHeadernum = 0; - object.blocknum = 0; - object.stateRoot = ""; - object.devMode = false; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.pendingMessages = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.pendingMessages = options.longs === String ? "0" : 0; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.score = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.score = options.longs === String ? "0" : 0; - object.gatekeeper = null; - object.version = ""; - object.gitRevision = ""; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.runningSideTasks = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.runningSideTasks = options.longs === String ? "0" : 0; - object.memoryUsage = null; - object.waitingForParaheaders = false; - object.networkStatus = null; - object.system = null; - } - if (message.initialized != null && message.hasOwnProperty("initialized")) - object.initialized = message.initialized; - if (message.registered != null && message.hasOwnProperty("registered")) - object.registered = message.registered; - if (message.genesisBlockHash != null && message.hasOwnProperty("genesisBlockHash")) { - object.genesisBlockHash = message.genesisBlockHash; - if (options.oneofs) - object._genesisBlockHash = "genesisBlockHash"; - } - if (message.publicKey != null && message.hasOwnProperty("publicKey")) { - object.publicKey = message.publicKey; - if (options.oneofs) - object._publicKey = "publicKey"; - } - if (message.ecdhPublicKey != null && message.hasOwnProperty("ecdhPublicKey")) { - object.ecdhPublicKey = message.ecdhPublicKey; - if (options.oneofs) - object._ecdhPublicKey = "ecdhPublicKey"; - } - if (message.headernum != null && message.hasOwnProperty("headernum")) - object.headernum = message.headernum; - if (message.paraHeadernum != null && message.hasOwnProperty("paraHeadernum")) - object.paraHeadernum = message.paraHeadernum; - if (message.blocknum != null && message.hasOwnProperty("blocknum")) - object.blocknum = message.blocknum; - if (message.stateRoot != null && message.hasOwnProperty("stateRoot")) - object.stateRoot = message.stateRoot; - if (message.devMode != null && message.hasOwnProperty("devMode")) - object.devMode = message.devMode; - if (message.pendingMessages != null && message.hasOwnProperty("pendingMessages")) - if (typeof message.pendingMessages === "number") - object.pendingMessages = options.longs === String ? String(message.pendingMessages) : message.pendingMessages; - else - object.pendingMessages = options.longs === String ? $util.Long.prototype.toString.call(message.pendingMessages) : options.longs === Number ? new $util.LongBits(message.pendingMessages.low >>> 0, message.pendingMessages.high >>> 0).toNumber(true) : message.pendingMessages; - if (message.score != null && message.hasOwnProperty("score")) - if (typeof message.score === "number") - object.score = options.longs === String ? String(message.score) : message.score; - else - object.score = options.longs === String ? $util.Long.prototype.toString.call(message.score) : options.longs === Number ? new $util.LongBits(message.score.low >>> 0, message.score.high >>> 0).toNumber(true) : message.score; - if (message.gatekeeper != null && message.hasOwnProperty("gatekeeper")) - object.gatekeeper = $root.pruntime_rpc.GatekeeperStatus.toObject(message.gatekeeper, options); - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.gitRevision != null && message.hasOwnProperty("gitRevision")) - object.gitRevision = message.gitRevision; - if (message.runningSideTasks != null && message.hasOwnProperty("runningSideTasks")) - if (typeof message.runningSideTasks === "number") - object.runningSideTasks = options.longs === String ? String(message.runningSideTasks) : message.runningSideTasks; - else - object.runningSideTasks = options.longs === String ? $util.Long.prototype.toString.call(message.runningSideTasks) : options.longs === Number ? new $util.LongBits(message.runningSideTasks.low >>> 0, message.runningSideTasks.high >>> 0).toNumber(true) : message.runningSideTasks; - if (message.memoryUsage != null && message.hasOwnProperty("memoryUsage")) - object.memoryUsage = $root.pruntime_rpc.MemoryUsage.toObject(message.memoryUsage, options); - if (message.waitingForParaheaders != null && message.hasOwnProperty("waitingForParaheaders")) - object.waitingForParaheaders = message.waitingForParaheaders; - if (message.networkStatus != null && message.hasOwnProperty("networkStatus")) - object.networkStatus = $root.pruntime_rpc.NetworkStatus.toObject(message.networkStatus, options); - if (message.system != null && message.hasOwnProperty("system")) - object.system = $root.pruntime_rpc.SystemInfo.toObject(message.system, options); - return object; - }; - - /** - * Converts this PhactoryInfo to JSON. - * @function toJSON - * @memberof pruntime_rpc.PhactoryInfo - * @instance - * @returns {Object.<string,*>} JSON object - */ - PhactoryInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return PhactoryInfo; - })(); + /** + * TokenomicInfo confidenceLevel. + * @member {number} confidenceLevel + * @memberof pruntime_rpc.TokenomicInfo + * @instance + */ + TokenomicInfo.prototype.confidenceLevel = 0; - pruntime_rpc.SystemInfo = (function() { - - /** - * Properties of a SystemInfo. - * @memberof pruntime_rpc - * @interface ISystemInfo - * @property {boolean|null} [registered] SystemInfo registered - * @property {string|null} [publicKey] SystemInfo publicKey - * @property {string|null} [ecdhPublicKey] SystemInfo ecdhPublicKey - * @property {pruntime_rpc.IGatekeeperStatus|null} [gatekeeper] SystemInfo gatekeeper - * @property {number|Long|null} [numberOfClusters] SystemInfo numberOfClusters - * @property {number|Long|null} [numberOfContracts] SystemInfo numberOfContracts - * @property {number|null} [consensusVersion] SystemInfo consensusVersion - * @property {number|null} [maxSupportedConsensusVersion] SystemInfo maxSupportedConsensusVersion - */ - - /** - * Constructs a new SystemInfo. - * @memberof pruntime_rpc - * @classdesc Represents a SystemInfo. - * @implements ISystemInfo - * @constructor - * @param {pruntime_rpc.ISystemInfo=} [properties] Properties to set - */ - function SystemInfo(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * TokenomicInfo stat. + * @member {pruntime_rpc.ITokenomicStat|null|undefined} stat + * @memberof pruntime_rpc.TokenomicInfo + * @instance + */ + TokenomicInfo.prototype.stat = null; - /** - * SystemInfo registered. - * @member {boolean} registered - * @memberof pruntime_rpc.SystemInfo - * @instance - */ - SystemInfo.prototype.registered = false; - - /** - * SystemInfo publicKey. - * @member {string} publicKey - * @memberof pruntime_rpc.SystemInfo - * @instance - */ - SystemInfo.prototype.publicKey = ""; - - /** - * SystemInfo ecdhPublicKey. - * @member {string} ecdhPublicKey - * @memberof pruntime_rpc.SystemInfo - * @instance - */ - SystemInfo.prototype.ecdhPublicKey = ""; - - /** - * SystemInfo gatekeeper. - * @member {pruntime_rpc.IGatekeeperStatus|null|undefined} gatekeeper - * @memberof pruntime_rpc.SystemInfo - * @instance - */ - SystemInfo.prototype.gatekeeper = null; - - /** - * SystemInfo numberOfClusters. - * @member {number|Long} numberOfClusters - * @memberof pruntime_rpc.SystemInfo - * @instance - */ - SystemInfo.prototype.numberOfClusters = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * SystemInfo numberOfContracts. - * @member {number|Long} numberOfContracts - * @memberof pruntime_rpc.SystemInfo - * @instance - */ - SystemInfo.prototype.numberOfContracts = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * SystemInfo consensusVersion. - * @member {number} consensusVersion - * @memberof pruntime_rpc.SystemInfo - * @instance - */ - SystemInfo.prototype.consensusVersion = 0; - - /** - * SystemInfo maxSupportedConsensusVersion. - * @member {number} maxSupportedConsensusVersion - * @memberof pruntime_rpc.SystemInfo - * @instance - */ - SystemInfo.prototype.maxSupportedConsensusVersion = 0; - - /** - * Creates a new SystemInfo instance using the specified properties. - * @function create - * @memberof pruntime_rpc.SystemInfo - * @static - * @param {pruntime_rpc.ISystemInfo=} [properties] Properties to set - * @returns {pruntime_rpc.SystemInfo} SystemInfo instance - */ - SystemInfo.create = function create(properties) { - return new SystemInfo(properties); - }; - - /** - * Encodes the specified SystemInfo message. Does not implicitly {@link pruntime_rpc.SystemInfo.verify|verify} messages. - * @function encode - * @memberof pruntime_rpc.SystemInfo - * @static - * @param {pruntime_rpc.ISystemInfo} message SystemInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SystemInfo.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.publicKey != null && Object.hasOwnProperty.call(message, "publicKey")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.publicKey); - if (message.ecdhPublicKey != null && Object.hasOwnProperty.call(message, "ecdhPublicKey")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.ecdhPublicKey); - if (message.gatekeeper != null && Object.hasOwnProperty.call(message, "gatekeeper")) - $root.pruntime_rpc.GatekeeperStatus.encode(message.gatekeeper, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.numberOfClusters != null && Object.hasOwnProperty.call(message, "numberOfClusters")) - writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.numberOfClusters); - if (message.numberOfContracts != null && Object.hasOwnProperty.call(message, "numberOfContracts")) - writer.uint32(/* id 6, wireType 0 =*/48).uint64(message.numberOfContracts); - if (message.consensusVersion != null && Object.hasOwnProperty.call(message, "consensusVersion")) - writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.consensusVersion); - if (message.maxSupportedConsensusVersion != null && Object.hasOwnProperty.call(message, "maxSupportedConsensusVersion")) - writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.maxSupportedConsensusVersion); - return writer; - }; - - /** - * Encodes the specified SystemInfo message, length delimited. Does not implicitly {@link pruntime_rpc.SystemInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof pruntime_rpc.SystemInfo - * @static - * @param {pruntime_rpc.ISystemInfo} message SystemInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SystemInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SystemInfo message from the specified reader or buffer. - * @function decode - * @memberof pruntime_rpc.SystemInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pruntime_rpc.SystemInfo} SystemInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SystemInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.SystemInfo(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.registered = reader.bool(); - break; - case 2: - message.publicKey = reader.string(); - break; - case 3: - message.ecdhPublicKey = reader.string(); - break; - case 4: - message.gatekeeper = $root.pruntime_rpc.GatekeeperStatus.decode(reader, reader.uint32()); - break; - case 5: - message.numberOfClusters = reader.uint64(); - break; - case 6: - message.numberOfContracts = reader.uint64(); - break; - case 7: - message.consensusVersion = reader.uint32(); - break; - case 8: - message.maxSupportedConsensusVersion = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SystemInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pruntime_rpc.SystemInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.SystemInfo} SystemInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SystemInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SystemInfo message. - * @function verify - * @memberof pruntime_rpc.SystemInfo - * @static - * @param {Object.<string,*>} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SystemInfo.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.publicKey != null && message.hasOwnProperty("publicKey")) - if (!$util.isString(message.publicKey)) - return "publicKey: string expected"; - if (message.ecdhPublicKey != null && message.hasOwnProperty("ecdhPublicKey")) - if (!$util.isString(message.ecdhPublicKey)) - return "ecdhPublicKey: string expected"; - if (message.gatekeeper != null && message.hasOwnProperty("gatekeeper")) { - let error = $root.pruntime_rpc.GatekeeperStatus.verify(message.gatekeeper); - if (error) - return "gatekeeper." + error; - } - if (message.numberOfClusters != null && message.hasOwnProperty("numberOfClusters")) - if (!$util.isInteger(message.numberOfClusters) && !(message.numberOfClusters && $util.isInteger(message.numberOfClusters.low) && $util.isInteger(message.numberOfClusters.high))) - return "numberOfClusters: integer|Long expected"; - if (message.numberOfContracts != null && message.hasOwnProperty("numberOfContracts")) - if (!$util.isInteger(message.numberOfContracts) && !(message.numberOfContracts && $util.isInteger(message.numberOfContracts.low) && $util.isInteger(message.numberOfContracts.high))) - return "numberOfContracts: integer|Long expected"; - if (message.consensusVersion != null && message.hasOwnProperty("consensusVersion")) - if (!$util.isInteger(message.consensusVersion)) - return "consensusVersion: integer expected"; - if (message.maxSupportedConsensusVersion != null && message.hasOwnProperty("maxSupportedConsensusVersion")) - if (!$util.isInteger(message.maxSupportedConsensusVersion)) - return "maxSupportedConsensusVersion: integer expected"; - return null; - }; - - /** - * Creates a SystemInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pruntime_rpc.SystemInfo - * @static - * @param {Object.<string,*>} object Plain object - * @returns {pruntime_rpc.SystemInfo} SystemInfo - */ - SystemInfo.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.SystemInfo) - return object; - let message = new $root.pruntime_rpc.SystemInfo(); - if (object.registered != null) - message.registered = Boolean(object.registered); - if (object.publicKey != null) - message.publicKey = String(object.publicKey); - if (object.ecdhPublicKey != null) - message.ecdhPublicKey = String(object.ecdhPublicKey); - if (object.gatekeeper != null) { - if (typeof object.gatekeeper !== "object") - throw TypeError(".pruntime_rpc.SystemInfo.gatekeeper: object expected"); - message.gatekeeper = $root.pruntime_rpc.GatekeeperStatus.fromObject(object.gatekeeper); - } - if (object.numberOfClusters != null) - if ($util.Long) - (message.numberOfClusters = $util.Long.fromValue(object.numberOfClusters)).unsigned = true; - else if (typeof object.numberOfClusters === "string") - message.numberOfClusters = parseInt(object.numberOfClusters, 10); - else if (typeof object.numberOfClusters === "number") - message.numberOfClusters = object.numberOfClusters; - else if (typeof object.numberOfClusters === "object") - message.numberOfClusters = new $util.LongBits(object.numberOfClusters.low >>> 0, object.numberOfClusters.high >>> 0).toNumber(true); - if (object.numberOfContracts != null) - if ($util.Long) - (message.numberOfContracts = $util.Long.fromValue(object.numberOfContracts)).unsigned = true; - else if (typeof object.numberOfContracts === "string") - message.numberOfContracts = parseInt(object.numberOfContracts, 10); - else if (typeof object.numberOfContracts === "number") - message.numberOfContracts = object.numberOfContracts; - else if (typeof object.numberOfContracts === "object") - message.numberOfContracts = new $util.LongBits(object.numberOfContracts.low >>> 0, object.numberOfContracts.high >>> 0).toNumber(true); - if (object.consensusVersion != null) - message.consensusVersion = object.consensusVersion >>> 0; - if (object.maxSupportedConsensusVersion != null) - message.maxSupportedConsensusVersion = object.maxSupportedConsensusVersion >>> 0; - return message; - }; - - /** - * Creates a plain object from a SystemInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof pruntime_rpc.SystemInfo - * @static - * @param {pruntime_rpc.SystemInfo} message SystemInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.<string,*>} Plain object - */ - SystemInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.registered = false; - object.publicKey = ""; - object.ecdhPublicKey = ""; - object.gatekeeper = null; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.numberOfClusters = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.numberOfClusters = options.longs === String ? "0" : 0; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.numberOfContracts = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.numberOfContracts = options.longs === String ? "0" : 0; - object.consensusVersion = 0; - object.maxSupportedConsensusVersion = 0; - } - if (message.registered != null && message.hasOwnProperty("registered")) - object.registered = message.registered; - if (message.publicKey != null && message.hasOwnProperty("publicKey")) - object.publicKey = message.publicKey; - if (message.ecdhPublicKey != null && message.hasOwnProperty("ecdhPublicKey")) - object.ecdhPublicKey = message.ecdhPublicKey; - if (message.gatekeeper != null && message.hasOwnProperty("gatekeeper")) - object.gatekeeper = $root.pruntime_rpc.GatekeeperStatus.toObject(message.gatekeeper, options); - if (message.numberOfClusters != null && message.hasOwnProperty("numberOfClusters")) - if (typeof message.numberOfClusters === "number") - object.numberOfClusters = options.longs === String ? String(message.numberOfClusters) : message.numberOfClusters; - else - object.numberOfClusters = options.longs === String ? $util.Long.prototype.toString.call(message.numberOfClusters) : options.longs === Number ? new $util.LongBits(message.numberOfClusters.low >>> 0, message.numberOfClusters.high >>> 0).toNumber(true) : message.numberOfClusters; - if (message.numberOfContracts != null && message.hasOwnProperty("numberOfContracts")) - if (typeof message.numberOfContracts === "number") - object.numberOfContracts = options.longs === String ? String(message.numberOfContracts) : message.numberOfContracts; - else - object.numberOfContracts = options.longs === String ? $util.Long.prototype.toString.call(message.numberOfContracts) : options.longs === Number ? new $util.LongBits(message.numberOfContracts.low >>> 0, message.numberOfContracts.high >>> 0).toNumber(true) : message.numberOfContracts; - if (message.consensusVersion != null && message.hasOwnProperty("consensusVersion")) - object.consensusVersion = message.consensusVersion; - if (message.maxSupportedConsensusVersion != null && message.hasOwnProperty("maxSupportedConsensusVersion")) - object.maxSupportedConsensusVersion = message.maxSupportedConsensusVersion; - return object; - }; - - /** - * Converts this SystemInfo to JSON. - * @function toJSON - * @memberof pruntime_rpc.SystemInfo - * @instance - * @returns {Object.<string,*>} JSON object - */ - SystemInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return SystemInfo; - })(); + /** + * 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); + }; /** - * GatekeeperRole enum. - * @name pruntime_rpc.GatekeeperRole - * @enum {number} - * @property {number} None=0 None value - * @property {number} Dummy=1 Dummy value - * @property {number} Active=2 Active value + * 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 */ - pruntime_rpc.GatekeeperRole = (function() { - const valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "None"] = 0; - values[valuesById[1] = "Dummy"] = 1; - values[valuesById[2] = "Active"] = 2; - return values; - })(); + 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; + }; - pruntime_rpc.GatekeeperStatus = (function() { - - /** - * Properties of a GatekeeperStatus. - * @memberof pruntime_rpc - * @interface IGatekeeperStatus - * @property {pruntime_rpc.GatekeeperRole|null} [role] GatekeeperStatus role - * @property {string|null} [masterPublicKey] GatekeeperStatus masterPublicKey - */ - - /** - * Constructs a new GatekeeperStatus. - * @memberof pruntime_rpc - * @classdesc Represents a GatekeeperStatus. - * @implements IGatekeeperStatus - * @constructor - * @param {pruntime_rpc.IGatekeeperStatus=} [properties] Properties to set - */ - function GatekeeperStatus(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * 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); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pruntime_rpc.TokenomicInfo(); + while (reader.pos < end) { + let 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; + }; - /** - * GatekeeperStatus role. - * @member {pruntime_rpc.GatekeeperRole} role - * @memberof pruntime_rpc.GatekeeperStatus - * @instance - */ - GatekeeperStatus.prototype.role = 0; - - /** - * GatekeeperStatus masterPublicKey. - * @member {string} masterPublicKey - * @memberof pruntime_rpc.GatekeeperStatus - * @instance - */ - GatekeeperStatus.prototype.masterPublicKey = ""; - - /** - * Creates a new GatekeeperStatus instance using the specified properties. - * @function create - * @memberof pruntime_rpc.GatekeeperStatus - * @static - * @param {pruntime_rpc.IGatekeeperStatus=} [properties] Properties to set - * @returns {pruntime_rpc.GatekeeperStatus} GatekeeperStatus instance - */ - GatekeeperStatus.create = function create(properties) { - return new GatekeeperStatus(properties); - }; - - /** - * Encodes the specified GatekeeperStatus message. Does not implicitly {@link pruntime_rpc.GatekeeperStatus.verify|verify} messages. - * @function encode - * @memberof pruntime_rpc.GatekeeperStatus - * @static - * @param {pruntime_rpc.IGatekeeperStatus} message GatekeeperStatus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GatekeeperStatus.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.role != null && Object.hasOwnProperty.call(message, "role")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.role); - if (message.masterPublicKey != null && Object.hasOwnProperty.call(message, "masterPublicKey")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.masterPublicKey); - return writer; - }; - - /** - * Encodes the specified GatekeeperStatus message, length delimited. Does not implicitly {@link pruntime_rpc.GatekeeperStatus.verify|verify} messages. - * @function encodeDelimited - * @memberof pruntime_rpc.GatekeeperStatus - * @static - * @param {pruntime_rpc.IGatekeeperStatus} message GatekeeperStatus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GatekeeperStatus.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GatekeeperStatus message from the specified reader or buffer. - * @function decode - * @memberof pruntime_rpc.GatekeeperStatus - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pruntime_rpc.GatekeeperStatus} GatekeeperStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GatekeeperStatus.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.GatekeeperStatus(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.role = reader.int32(); - break; - case 2: - message.masterPublicKey = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GatekeeperStatus message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pruntime_rpc.GatekeeperStatus - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.GatekeeperStatus} GatekeeperStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GatekeeperStatus.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GatekeeperStatus message. - * @function verify - * @memberof pruntime_rpc.GatekeeperStatus - * @static - * @param {Object.<string,*>} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GatekeeperStatus.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.role != null && message.hasOwnProperty("role")) - switch (message.role) { - default: - return "role: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.masterPublicKey != null && message.hasOwnProperty("masterPublicKey")) - if (!$util.isString(message.masterPublicKey)) - return "masterPublicKey: string expected"; - return null; - }; - - /** - * Creates a GatekeeperStatus message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pruntime_rpc.GatekeeperStatus - * @static - * @param {Object.<string,*>} object Plain object - * @returns {pruntime_rpc.GatekeeperStatus} GatekeeperStatus - */ - GatekeeperStatus.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.GatekeeperStatus) - return object; - let message = new $root.pruntime_rpc.GatekeeperStatus(); - switch (object.role) { - case "None": - case 0: - message.role = 0; - break; - case "Dummy": - case 1: - message.role = 1; - break; - case "Active": - case 2: - message.role = 2; - break; - } - if (object.masterPublicKey != null) - message.masterPublicKey = String(object.masterPublicKey); - return message; - }; - - /** - * Creates a plain object from a GatekeeperStatus message. Also converts values to other types if specified. - * @function toObject - * @memberof pruntime_rpc.GatekeeperStatus - * @static - * @param {pruntime_rpc.GatekeeperStatus} message GatekeeperStatus - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.<string,*>} Plain object - */ - GatekeeperStatus.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.role = options.enums === String ? "None" : 0; - object.masterPublicKey = ""; - } - if (message.role != null && message.hasOwnProperty("role")) - object.role = options.enums === String ? $root.pruntime_rpc.GatekeeperRole[message.role] : message.role; - if (message.masterPublicKey != null && message.hasOwnProperty("masterPublicKey")) - object.masterPublicKey = message.masterPublicKey; - return object; - }; - - /** - * Converts this GatekeeperStatus to JSON. - * @function toJSON - * @memberof pruntime_rpc.GatekeeperStatus - * @instance - * @returns {Object.<string,*>} JSON object - */ - GatekeeperStatus.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GatekeeperStatus; - })(); + /** + * 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()); + }; - pruntime_rpc.MemoryUsage = (function() { - - /** - * Properties of a MemoryUsage. - * @memberof pruntime_rpc - * @interface IMemoryUsage - * @property {number|Long|null} [rustUsed] MemoryUsage rustUsed - * @property {number|Long|null} [rustPeakUsed] MemoryUsage rustPeakUsed - * @property {number|Long|null} [totalPeakUsed] MemoryUsage totalPeakUsed - */ - - /** - * Constructs a new MemoryUsage. - * @memberof pruntime_rpc - * @classdesc Represents a MemoryUsage. - * @implements IMemoryUsage - * @constructor - * @param {pruntime_rpc.IMemoryUsage=} [properties] Properties to set - */ - function MemoryUsage(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Verifies a TokenomicInfo message. + * @function verify + * @memberof pruntime_rpc.TokenomicInfo + * @static + * @param {Object.<string,*>} 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")) { + let error = $root.pruntime_rpc.TokenomicStat.verify(message.stat); + if (error) return "stat." + error; + } + return null; + }; - /** - * MemoryUsage rustUsed. - * @member {number|Long} rustUsed - * @memberof pruntime_rpc.MemoryUsage - * @instance - */ - MemoryUsage.prototype.rustUsed = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * MemoryUsage rustPeakUsed. - * @member {number|Long} rustPeakUsed - * @memberof pruntime_rpc.MemoryUsage - * @instance - */ - MemoryUsage.prototype.rustPeakUsed = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * MemoryUsage totalPeakUsed. - * @member {number|Long} totalPeakUsed - * @memberof pruntime_rpc.MemoryUsage - * @instance - */ - MemoryUsage.prototype.totalPeakUsed = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Creates a new MemoryUsage instance using the specified properties. - * @function create - * @memberof pruntime_rpc.MemoryUsage - * @static - * @param {pruntime_rpc.IMemoryUsage=} [properties] Properties to set - * @returns {pruntime_rpc.MemoryUsage} MemoryUsage instance - */ - MemoryUsage.create = function create(properties) { - return new MemoryUsage(properties); - }; - - /** - * Encodes the specified MemoryUsage message. Does not implicitly {@link pruntime_rpc.MemoryUsage.verify|verify} messages. - * @function encode - * @memberof pruntime_rpc.MemoryUsage - * @static - * @param {pruntime_rpc.IMemoryUsage} message MemoryUsage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MemoryUsage.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rustUsed != null && Object.hasOwnProperty.call(message, "rustUsed")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.rustUsed); - if (message.rustPeakUsed != null && Object.hasOwnProperty.call(message, "rustPeakUsed")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.rustPeakUsed); - if (message.totalPeakUsed != null && Object.hasOwnProperty.call(message, "totalPeakUsed")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.totalPeakUsed); - return writer; - }; - - /** - * Encodes the specified MemoryUsage message, length delimited. Does not implicitly {@link pruntime_rpc.MemoryUsage.verify|verify} messages. - * @function encodeDelimited - * @memberof pruntime_rpc.MemoryUsage - * @static - * @param {pruntime_rpc.IMemoryUsage} message MemoryUsage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MemoryUsage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MemoryUsage message from the specified reader or buffer. - * @function decode - * @memberof pruntime_rpc.MemoryUsage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pruntime_rpc.MemoryUsage} MemoryUsage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MemoryUsage.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.MemoryUsage(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.rustUsed = reader.uint64(); - break; - case 2: - message.rustPeakUsed = reader.uint64(); - break; - case 3: - message.totalPeakUsed = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MemoryUsage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pruntime_rpc.MemoryUsage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.MemoryUsage} MemoryUsage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MemoryUsage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MemoryUsage message. - * @function verify - * @memberof pruntime_rpc.MemoryUsage - * @static - * @param {Object.<string,*>} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MemoryUsage.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rustUsed != null && message.hasOwnProperty("rustUsed")) - if (!$util.isInteger(message.rustUsed) && !(message.rustUsed && $util.isInteger(message.rustUsed.low) && $util.isInteger(message.rustUsed.high))) - return "rustUsed: integer|Long expected"; - if (message.rustPeakUsed != null && message.hasOwnProperty("rustPeakUsed")) - if (!$util.isInteger(message.rustPeakUsed) && !(message.rustPeakUsed && $util.isInteger(message.rustPeakUsed.low) && $util.isInteger(message.rustPeakUsed.high))) - return "rustPeakUsed: integer|Long expected"; - if (message.totalPeakUsed != null && message.hasOwnProperty("totalPeakUsed")) - if (!$util.isInteger(message.totalPeakUsed) && !(message.totalPeakUsed && $util.isInteger(message.totalPeakUsed.low) && $util.isInteger(message.totalPeakUsed.high))) - return "totalPeakUsed: integer|Long expected"; - return null; - }; - - /** - * Creates a MemoryUsage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pruntime_rpc.MemoryUsage - * @static - * @param {Object.<string,*>} object Plain object - * @returns {pruntime_rpc.MemoryUsage} MemoryUsage - */ - MemoryUsage.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.MemoryUsage) - return object; - let message = new $root.pruntime_rpc.MemoryUsage(); - if (object.rustUsed != null) - if ($util.Long) - (message.rustUsed = $util.Long.fromValue(object.rustUsed)).unsigned = true; - else if (typeof object.rustUsed === "string") - message.rustUsed = parseInt(object.rustUsed, 10); - else if (typeof object.rustUsed === "number") - message.rustUsed = object.rustUsed; - else if (typeof object.rustUsed === "object") - message.rustUsed = new $util.LongBits(object.rustUsed.low >>> 0, object.rustUsed.high >>> 0).toNumber(true); - if (object.rustPeakUsed != null) - if ($util.Long) - (message.rustPeakUsed = $util.Long.fromValue(object.rustPeakUsed)).unsigned = true; - else if (typeof object.rustPeakUsed === "string") - message.rustPeakUsed = parseInt(object.rustPeakUsed, 10); - else if (typeof object.rustPeakUsed === "number") - message.rustPeakUsed = object.rustPeakUsed; - else if (typeof object.rustPeakUsed === "object") - message.rustPeakUsed = new $util.LongBits(object.rustPeakUsed.low >>> 0, object.rustPeakUsed.high >>> 0).toNumber(true); - if (object.totalPeakUsed != null) - if ($util.Long) - (message.totalPeakUsed = $util.Long.fromValue(object.totalPeakUsed)).unsigned = true; - else if (typeof object.totalPeakUsed === "string") - message.totalPeakUsed = parseInt(object.totalPeakUsed, 10); - else if (typeof object.totalPeakUsed === "number") - message.totalPeakUsed = object.totalPeakUsed; - else if (typeof object.totalPeakUsed === "object") - message.totalPeakUsed = new $util.LongBits(object.totalPeakUsed.low >>> 0, object.totalPeakUsed.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a MemoryUsage message. Also converts values to other types if specified. - * @function toObject - * @memberof pruntime_rpc.MemoryUsage - * @static - * @param {pruntime_rpc.MemoryUsage} message MemoryUsage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.<string,*>} Plain object - */ - MemoryUsage.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.rustUsed = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.rustUsed = options.longs === String ? "0" : 0; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.rustPeakUsed = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.rustPeakUsed = options.longs === String ? "0" : 0; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.totalPeakUsed = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.totalPeakUsed = options.longs === String ? "0" : 0; - } - if (message.rustUsed != null && message.hasOwnProperty("rustUsed")) - if (typeof message.rustUsed === "number") - object.rustUsed = options.longs === String ? String(message.rustUsed) : message.rustUsed; - else - object.rustUsed = options.longs === String ? $util.Long.prototype.toString.call(message.rustUsed) : options.longs === Number ? new $util.LongBits(message.rustUsed.low >>> 0, message.rustUsed.high >>> 0).toNumber(true) : message.rustUsed; - if (message.rustPeakUsed != null && message.hasOwnProperty("rustPeakUsed")) - if (typeof message.rustPeakUsed === "number") - object.rustPeakUsed = options.longs === String ? String(message.rustPeakUsed) : message.rustPeakUsed; - else - object.rustPeakUsed = options.longs === String ? $util.Long.prototype.toString.call(message.rustPeakUsed) : options.longs === Number ? new $util.LongBits(message.rustPeakUsed.low >>> 0, message.rustPeakUsed.high >>> 0).toNumber(true) : message.rustPeakUsed; - if (message.totalPeakUsed != null && message.hasOwnProperty("totalPeakUsed")) - if (typeof message.totalPeakUsed === "number") - object.totalPeakUsed = options.longs === String ? String(message.totalPeakUsed) : message.totalPeakUsed; - else - object.totalPeakUsed = options.longs === String ? $util.Long.prototype.toString.call(message.totalPeakUsed) : options.longs === Number ? new $util.LongBits(message.totalPeakUsed.low >>> 0, message.totalPeakUsed.high >>> 0).toNumber(true) : message.totalPeakUsed; - return object; - }; - - /** - * Converts this MemoryUsage to JSON. - * @function toJSON - * @memberof pruntime_rpc.MemoryUsage - * @instance - * @returns {Object.<string,*>} JSON object - */ - MemoryUsage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MemoryUsage; - })(); + /** + * 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.<string,*>} object Plain object + * @returns {pruntime_rpc.TokenomicInfo} TokenomicInfo + */ + TokenomicInfo.fromObject = function fromObject(object) { + if (object instanceof $root.pruntime_rpc.TokenomicInfo) return object; + let 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; + }; - pruntime_rpc.SyncedTo = (function() { - - /** - * Properties of a SyncedTo. - * @memberof pruntime_rpc - * @interface ISyncedTo - * @property {number|null} [syncedTo] SyncedTo syncedTo - */ - - /** - * Constructs a new SyncedTo. - * @memberof pruntime_rpc - * @classdesc Represents a SyncedTo. - * @implements ISyncedTo - * @constructor - * @param {pruntime_rpc.ISyncedTo=} [properties] Properties to set - */ - function SyncedTo(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * 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.<string,*>} Plain object + */ + TokenomicInfo.toObject = function toObject(message, options) { + if (!options) options = {}; + let object = {}; + if (options.defaults) { + object.v = ""; + object.vInit = ""; + if ($util.Long) { + let 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) { + let 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) { + let 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; + }; - /** - * SyncedTo syncedTo. - * @member {number} syncedTo - * @memberof pruntime_rpc.SyncedTo - * @instance - */ - SyncedTo.prototype.syncedTo = 0; - - /** - * Creates a new SyncedTo instance using the specified properties. - * @function create - * @memberof pruntime_rpc.SyncedTo - * @static - * @param {pruntime_rpc.ISyncedTo=} [properties] Properties to set - * @returns {pruntime_rpc.SyncedTo} SyncedTo instance - */ - SyncedTo.create = function create(properties) { - return new SyncedTo(properties); - }; - - /** - * Encodes the specified SyncedTo message. Does not implicitly {@link pruntime_rpc.SyncedTo.verify|verify} messages. - * @function encode - * @memberof pruntime_rpc.SyncedTo - * @static - * @param {pruntime_rpc.ISyncedTo} message SyncedTo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SyncedTo.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); - return writer; - }; - - /** - * Encodes the specified SyncedTo message, length delimited. Does not implicitly {@link pruntime_rpc.SyncedTo.verify|verify} messages. - * @function encodeDelimited - * @memberof pruntime_rpc.SyncedTo - * @static - * @param {pruntime_rpc.ISyncedTo} message SyncedTo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SyncedTo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SyncedTo message from the specified reader or buffer. - * @function decode - * @memberof pruntime_rpc.SyncedTo - * @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 - * @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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.SyncedTo(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.syncedTo = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SyncedTo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pruntime_rpc.SyncedTo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.SyncedTo} SyncedTo - * @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) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SyncedTo message. - * @function verify - * @memberof pruntime_rpc.SyncedTo - * @static - * @param {Object.<string,*>} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SyncedTo.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"; - return null; - }; - - /** - * Creates a SyncedTo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pruntime_rpc.SyncedTo - * @static - * @param {Object.<string,*>} object Plain object - * @returns {pruntime_rpc.SyncedTo} SyncedTo - */ - SyncedTo.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.SyncedTo) - return object; - let message = new $root.pruntime_rpc.SyncedTo(); - if (object.syncedTo != null) - message.syncedTo = object.syncedTo >>> 0; - return message; - }; - - /** - * Creates a plain object from a SyncedTo message. Also converts values to other types if specified. - * @function toObject - * @memberof pruntime_rpc.SyncedTo - * @static - * @param {pruntime_rpc.SyncedTo} message SyncedTo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.<string,*>} Plain object - */ - SyncedTo.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - object.syncedTo = 0; - if (message.syncedTo != null && message.hasOwnProperty("syncedTo")) - object.syncedTo = message.syncedTo; - return object; - }; - - /** - * Converts this SyncedTo to JSON. - * @function toJSON - * @memberof pruntime_rpc.SyncedTo - * @instance - * @returns {Object.<string,*>} JSON object - */ - SyncedTo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return SyncedTo; - })(); + /** + * Converts this TokenomicInfo to JSON. + * @function toJSON + * @memberof pruntime_rpc.TokenomicInfo + * @instance + * @returns {Object.<string,*>} JSON object + */ + TokenomicInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - pruntime_rpc.HeadersToSync = (function() { - - /** - * Properties of a HeadersToSync. - * @memberof pruntime_rpc - * @interface IHeadersToSync - * @property {Uint8Array|null} [encodedHeaders] HeadersToSync encodedHeaders - * @property {Uint8Array|null} [encodedAuthoritySetChange] HeadersToSync encodedAuthoritySetChange - */ - - /** - * Constructs a new HeadersToSync. - * @memberof pruntime_rpc - * @classdesc Represents a HeadersToSync. - * @implements IHeadersToSync - * @constructor - * @param {pruntime_rpc.IHeadersToSync=} [properties] Properties to set - */ - function HeadersToSync(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + return TokenomicInfo; + })(); - /** - * HeadersToSync encodedHeaders. - * @member {Uint8Array} encodedHeaders - * @memberof pruntime_rpc.HeadersToSync - * @instance - */ - HeadersToSync.prototype.encodedHeaders = $util.newBuffer([]); - - /** - * HeadersToSync encodedAuthoritySetChange. - * @member {Uint8Array|null|undefined} encodedAuthoritySetChange - * @memberof pruntime_rpc.HeadersToSync - * @instance - */ - HeadersToSync.prototype.encodedAuthoritySetChange = null; - - // OneOf field names bound to virtual getters and setters - let $oneOfFields; - - /** - * HeadersToSync _encodedAuthoritySetChange. - * @member {"encodedAuthoritySetChange"|undefined} _encodedAuthoritySetChange - * @memberof pruntime_rpc.HeadersToSync - * @instance - */ - Object.defineProperty(HeadersToSync.prototype, "_encodedAuthoritySetChange", { - get: $util.oneOfGetter($oneOfFields = ["encodedAuthoritySetChange"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new HeadersToSync instance using the specified properties. - * @function create - * @memberof pruntime_rpc.HeadersToSync - * @static - * @param {pruntime_rpc.IHeadersToSync=} [properties] Properties to set - * @returns {pruntime_rpc.HeadersToSync} HeadersToSync instance - */ - HeadersToSync.create = function create(properties) { - return new HeadersToSync(properties); - }; - - /** - * Encodes the specified HeadersToSync message. Does not implicitly {@link pruntime_rpc.HeadersToSync.verify|verify} messages. - * @function encode - * @memberof pruntime_rpc.HeadersToSync - * @static - * @param {pruntime_rpc.IHeadersToSync} message HeadersToSync message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HeadersToSync.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); - return writer; - }; - - /** - * Encodes the specified HeadersToSync message, length delimited. Does not implicitly {@link pruntime_rpc.HeadersToSync.verify|verify} messages. - * @function encodeDelimited - * @memberof pruntime_rpc.HeadersToSync - * @static - * @param {pruntime_rpc.IHeadersToSync} message HeadersToSync message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HeadersToSync.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HeadersToSync message from the specified reader or buffer. - * @function decode - * @memberof pruntime_rpc.HeadersToSync - * @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 - * @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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.HeadersToSync(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.encodedHeaders = reader.bytes(); - break; - case 2: - message.encodedAuthoritySetChange = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HeadersToSync message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pruntime_rpc.HeadersToSync - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.HeadersToSync} HeadersToSync - * @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) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HeadersToSync message. - * @function verify - * @memberof pruntime_rpc.HeadersToSync - * @static - * @param {Object.<string,*>} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HeadersToSync.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - let 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"; - } - return null; - }; - - /** - * Creates a HeadersToSync message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pruntime_rpc.HeadersToSync - * @static - * @param {Object.<string,*>} object Plain object - * @returns {pruntime_rpc.HeadersToSync} HeadersToSync - */ - HeadersToSync.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.HeadersToSync) - return object; - let 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) - 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) - message.encodedAuthoritySetChange = object.encodedAuthoritySetChange; - return message; - }; - - /** - * Creates a plain object from a HeadersToSync message. Also converts values to other types if specified. - * @function toObject - * @memberof pruntime_rpc.HeadersToSync - * @static - * @param {pruntime_rpc.HeadersToSync} message HeadersToSync - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.<string,*>} Plain object - */ - HeadersToSync.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - if (options.bytes === String) - object.encodedHeaders = ""; - else { - object.encodedHeaders = []; - if (options.bytes !== Array) - object.encodedHeaders = $util.newBuffer(object.encodedHeaders); - } - 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 (options.oneofs) - object._encodedAuthoritySetChange = "encodedAuthoritySetChange"; - } - return object; - }; - - /** - * Converts this HeadersToSync to JSON. - * @function toJSON - * @memberof pruntime_rpc.HeadersToSync - * @instance - * @returns {Object.<string,*>} JSON object - */ - HeadersToSync.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return HeadersToSync; - })(); + pruntime_rpc.NetworkStatus = (function () { + /** + * Properties of a NetworkStatus. + * @memberof pruntime_rpc + * @interface INetworkStatus + * @property {number|null} [publicRpcPort] NetworkStatus publicRpcPort + * @property {pruntime_rpc.INetworkConfig|null} [config] NetworkStatus config + */ - pruntime_rpc.ParaHeadersToSync = (function() { - - /** - * Properties of a ParaHeadersToSync. - * @memberof pruntime_rpc - * @interface IParaHeadersToSync - * @property {Uint8Array|null} [encodedHeaders] ParaHeadersToSync encodedHeaders - * @property {Array.<Uint8Array>|null} [proof] ParaHeadersToSync proof - */ - - /** - * Constructs a new ParaHeadersToSync. - * @memberof pruntime_rpc - * @classdesc Represents a ParaHeadersToSync. - * @implements IParaHeadersToSync - * @constructor - * @param {pruntime_rpc.IParaHeadersToSync=} [properties] Properties to set - */ - function ParaHeadersToSync(properties) { - this.proof = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Constructs a new NetworkStatus. + * @memberof pruntime_rpc + * @classdesc Represents a NetworkStatus. + * @implements INetworkStatus + * @constructor + * @param {pruntime_rpc.INetworkStatus=} [properties] Properties to set + */ + function NetworkStatus(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + } - /** - * ParaHeadersToSync encodedHeaders. - * @member {Uint8Array} encodedHeaders - * @memberof pruntime_rpc.ParaHeadersToSync - * @instance - */ - ParaHeadersToSync.prototype.encodedHeaders = $util.newBuffer([]); - - /** - * ParaHeadersToSync proof. - * @member {Array.<Uint8Array>} proof - * @memberof pruntime_rpc.ParaHeadersToSync - * @instance - */ - ParaHeadersToSync.prototype.proof = $util.emptyArray; - - /** - * Creates a new ParaHeadersToSync instance using the specified properties. - * @function create - * @memberof pruntime_rpc.ParaHeadersToSync - * @static - * @param {pruntime_rpc.IParaHeadersToSync=} [properties] Properties to set - * @returns {pruntime_rpc.ParaHeadersToSync} ParaHeadersToSync instance - */ - ParaHeadersToSync.create = function create(properties) { - return new ParaHeadersToSync(properties); - }; - - /** - * Encodes the specified ParaHeadersToSync message. Does not implicitly {@link pruntime_rpc.ParaHeadersToSync.verify|verify} messages. - * @function encode - * @memberof pruntime_rpc.ParaHeadersToSync - * @static - * @param {pruntime_rpc.IParaHeadersToSync} message ParaHeadersToSync message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ParaHeadersToSync.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 (let i = 0; i < message.proof.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.proof[i]); - return writer; - }; - - /** - * Encodes the specified ParaHeadersToSync message, length delimited. Does not implicitly {@link pruntime_rpc.ParaHeadersToSync.verify|verify} messages. - * @function encodeDelimited - * @memberof pruntime_rpc.ParaHeadersToSync - * @static - * @param {pruntime_rpc.IParaHeadersToSync} message ParaHeadersToSync message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ParaHeadersToSync.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ParaHeadersToSync message from the specified reader or buffer. - * @function decode - * @memberof pruntime_rpc.ParaHeadersToSync - * @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 - * @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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.ParaHeadersToSync(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.encodedHeaders = reader.bytes(); - break; - case 2: - if (!(message.proof && message.proof.length)) - message.proof = []; - message.proof.push(reader.bytes()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ParaHeadersToSync message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pruntime_rpc.ParaHeadersToSync - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.ParaHeadersToSync} ParaHeadersToSync - * @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) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ParaHeadersToSync message. - * @function verify - * @memberof pruntime_rpc.ParaHeadersToSync - * @static - * @param {Object.<string,*>} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ParaHeadersToSync.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 (let 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"; - } - return null; - }; - - /** - * Creates a ParaHeadersToSync message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pruntime_rpc.ParaHeadersToSync - * @static - * @param {Object.<string,*>} object Plain object - * @returns {pruntime_rpc.ParaHeadersToSync} ParaHeadersToSync - */ - ParaHeadersToSync.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.ParaHeadersToSync) - return object; - let 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) - message.encodedHeaders = object.encodedHeaders; - if (object.proof) { - if (!Array.isArray(object.proof)) - throw TypeError(".pruntime_rpc.ParaHeadersToSync.proof: array expected"); - message.proof = []; - for (let 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) - message.proof[i] = object.proof[i]; - } - return message; - }; - - /** - * Creates a plain object from a ParaHeadersToSync message. Also converts values to other types if specified. - * @function toObject - * @memberof pruntime_rpc.ParaHeadersToSync - * @static - * @param {pruntime_rpc.ParaHeadersToSync} message ParaHeadersToSync - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.<string,*>} Plain object - */ - ParaHeadersToSync.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.proof = []; - if (options.defaults) - if (options.bytes === String) - object.encodedHeaders = ""; - else { - object.encodedHeaders = []; - if (options.bytes !== Array) - object.encodedHeaders = $util.newBuffer(object.encodedHeaders); - } - 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 (let 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]; - } - return object; - }; - - /** - * Converts this ParaHeadersToSync to JSON. - * @function toJSON - * @memberof pruntime_rpc.ParaHeadersToSync - * @instance - * @returns {Object.<string,*>} JSON object - */ - ParaHeadersToSync.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ParaHeadersToSync; - })(); + /** + * NetworkStatus publicRpcPort. + * @member {number|null|undefined} publicRpcPort + * @memberof pruntime_rpc.NetworkStatus + * @instance + */ + NetworkStatus.prototype.publicRpcPort = null; - pruntime_rpc.CombinedHeadersToSync = (function() { - - /** - * Properties of a CombinedHeadersToSync. - * @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.<Uint8Array>|null} [proof] CombinedHeadersToSync proof - */ - - /** - * Constructs a new CombinedHeadersToSync. - * @memberof pruntime_rpc - * @classdesc Represents a CombinedHeadersToSync. - * @implements ICombinedHeadersToSync - * @constructor - * @param {pruntime_rpc.ICombinedHeadersToSync=} [properties] Properties to set - */ - function CombinedHeadersToSync(properties) { - this.proof = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * NetworkStatus config. + * @member {pruntime_rpc.INetworkConfig|null|undefined} config + * @memberof pruntime_rpc.NetworkStatus + * @instance + */ + NetworkStatus.prototype.config = null; - /** - * 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 - * @instance - */ - CombinedHeadersToSync.prototype.encodedParachainHeaders = $util.newBuffer([]); - - /** - * CombinedHeadersToSync proof. - * @member {Array.<Uint8Array>} proof - * @memberof pruntime_rpc.CombinedHeadersToSync - * @instance - */ - CombinedHeadersToSync.prototype.proof = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - let $oneOfFields; - - /** - * CombinedHeadersToSync _authoritySetChange. - * @member {"authoritySetChange"|undefined} _authoritySetChange - * @memberof pruntime_rpc.CombinedHeadersToSync - * @instance - */ - Object.defineProperty(CombinedHeadersToSync.prototype, "_authoritySetChange", { - get: $util.oneOfGetter($oneOfFields = ["authoritySetChange"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new CombinedHeadersToSync instance using the specified properties. - * @function create - * @memberof pruntime_rpc.CombinedHeadersToSync - * @static - * @param {pruntime_rpc.ICombinedHeadersToSync=} [properties] Properties to set - * @returns {pruntime_rpc.CombinedHeadersToSync} CombinedHeadersToSync instance - */ - CombinedHeadersToSync.create = function create(properties) { - return new CombinedHeadersToSync(properties); - }; - - /** - * Encodes the specified CombinedHeadersToSync message. Does not implicitly {@link pruntime_rpc.CombinedHeadersToSync.verify|verify} messages. - * @function encode - * @memberof pruntime_rpc.CombinedHeadersToSync - * @static - * @param {pruntime_rpc.ICombinedHeadersToSync} message CombinedHeadersToSync message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CombinedHeadersToSync.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 (let i = 0; i < message.proof.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.proof[i]); - return writer; - }; - - /** - * Encodes the specified CombinedHeadersToSync message, length delimited. Does not implicitly {@link pruntime_rpc.CombinedHeadersToSync.verify|verify} messages. - * @function encodeDelimited - * @memberof pruntime_rpc.CombinedHeadersToSync - * @static - * @param {pruntime_rpc.ICombinedHeadersToSync} message CombinedHeadersToSync message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CombinedHeadersToSync.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CombinedHeadersToSync message from the specified reader or buffer. - * @function decode - * @memberof pruntime_rpc.CombinedHeadersToSync - * @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 - * @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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.CombinedHeadersToSync(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.encodedRelaychainHeaders = reader.bytes(); - break; - case 2: - message.authoritySetChange = 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()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CombinedHeadersToSync message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pruntime_rpc.CombinedHeadersToSync - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.CombinedHeadersToSync} CombinedHeadersToSync - * @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) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CombinedHeadersToSync message. - * @function verify - * @memberof pruntime_rpc.CombinedHeadersToSync - * @static - * @param {Object.<string,*>} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CombinedHeadersToSync.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - let 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 (let 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"; - } - return null; - }; - - /** - * Creates a CombinedHeadersToSync message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pruntime_rpc.CombinedHeadersToSync - * @static - * @param {Object.<string,*>} object Plain object - * @returns {pruntime_rpc.CombinedHeadersToSync} CombinedHeadersToSync - */ - CombinedHeadersToSync.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.CombinedHeadersToSync) - return object; - let 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) - 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) - 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) - message.encodedParachainHeaders = object.encodedParachainHeaders; - if (object.proof) { - if (!Array.isArray(object.proof)) - throw TypeError(".pruntime_rpc.CombinedHeadersToSync.proof: array expected"); - message.proof = []; - for (let 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) - message.proof[i] = object.proof[i]; - } - return message; - }; - - /** - * Creates a plain object from a CombinedHeadersToSync message. Also converts values to other types if specified. - * @function toObject - * @memberof pruntime_rpc.CombinedHeadersToSync - * @static - * @param {pruntime_rpc.CombinedHeadersToSync} message CombinedHeadersToSync - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.<string,*>} Plain object - */ - CombinedHeadersToSync.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.proof = []; - if (options.defaults) { - if (options.bytes === String) - object.encodedRelaychainHeaders = ""; - else { - object.encodedRelaychainHeaders = []; - if (options.bytes !== Array) - object.encodedRelaychainHeaders = $util.newBuffer(object.encodedRelaychainHeaders); - } - if (options.bytes === String) - object.encodedParachainHeaders = ""; - else { - object.encodedParachainHeaders = []; - if (options.bytes !== Array) - object.encodedParachainHeaders = $util.newBuffer(object.encodedParachainHeaders); - } - } - 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 (let 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]; - } - return object; - }; - - /** - * Converts this CombinedHeadersToSync to JSON. - * @function toJSON - * @memberof pruntime_rpc.CombinedHeadersToSync - * @instance - * @returns {Object.<string,*>} JSON object - */ - CombinedHeadersToSync.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return CombinedHeadersToSync; - })(); + // OneOf field names bound to virtual getters and setters + let $oneOfFields; - pruntime_rpc.HeadersSyncedTo = (function() { - - /** - * Properties of a HeadersSyncedTo. - * @memberof pruntime_rpc - * @interface IHeadersSyncedTo - * @property {number|null} [relaychainSyncedTo] HeadersSyncedTo relaychainSyncedTo - * @property {number|null} [parachainSyncedTo] HeadersSyncedTo parachainSyncedTo - */ - - /** - * Constructs a new HeadersSyncedTo. - * @memberof pruntime_rpc - * @classdesc Represents a HeadersSyncedTo. - * @implements IHeadersSyncedTo - * @constructor - * @param {pruntime_rpc.IHeadersSyncedTo=} [properties] Properties to set - */ - function HeadersSyncedTo(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * NetworkStatus _publicRpcPort. + * @member {"publicRpcPort"|undefined} _publicRpcPort + * @memberof pruntime_rpc.NetworkStatus + * @instance + */ + Object.defineProperty(NetworkStatus.prototype, "_publicRpcPort", { + get: $util.oneOfGetter(($oneOfFields = ["publicRpcPort"])), + set: $util.oneOfSetter($oneOfFields), + }); - /** - * HeadersSyncedTo relaychainSyncedTo. - * @member {number} relaychainSyncedTo - * @memberof pruntime_rpc.HeadersSyncedTo - * @instance - */ - HeadersSyncedTo.prototype.relaychainSyncedTo = 0; - - /** - * HeadersSyncedTo parachainSyncedTo. - * @member {number} parachainSyncedTo - * @memberof pruntime_rpc.HeadersSyncedTo - * @instance - */ - HeadersSyncedTo.prototype.parachainSyncedTo = 0; - - /** - * Creates a new HeadersSyncedTo instance using the specified properties. - * @function create - * @memberof pruntime_rpc.HeadersSyncedTo - * @static - * @param {pruntime_rpc.IHeadersSyncedTo=} [properties] Properties to set - * @returns {pruntime_rpc.HeadersSyncedTo} HeadersSyncedTo instance - */ - HeadersSyncedTo.create = function create(properties) { - return new HeadersSyncedTo(properties); - }; - - /** - * Encodes the specified HeadersSyncedTo message. Does not implicitly {@link pruntime_rpc.HeadersSyncedTo.verify|verify} messages. - * @function encode - * @memberof pruntime_rpc.HeadersSyncedTo - * @static - * @param {pruntime_rpc.IHeadersSyncedTo} message HeadersSyncedTo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HeadersSyncedTo.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); - return writer; - }; - - /** - * Encodes the specified HeadersSyncedTo message, length delimited. Does not implicitly {@link pruntime_rpc.HeadersSyncedTo.verify|verify} messages. - * @function encodeDelimited - * @memberof pruntime_rpc.HeadersSyncedTo - * @static - * @param {pruntime_rpc.IHeadersSyncedTo} message HeadersSyncedTo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HeadersSyncedTo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HeadersSyncedTo message from the specified reader or buffer. - * @function decode - * @memberof pruntime_rpc.HeadersSyncedTo - * @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 - * @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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.HeadersSyncedTo(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.relaychainSyncedTo = reader.uint32(); - break; - case 2: - message.parachainSyncedTo = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HeadersSyncedTo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pruntime_rpc.HeadersSyncedTo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.HeadersSyncedTo} HeadersSyncedTo - * @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) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HeadersSyncedTo message. - * @function verify - * @memberof pruntime_rpc.HeadersSyncedTo - * @static - * @param {Object.<string,*>} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HeadersSyncedTo.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"; - return null; - }; - - /** - * Creates a HeadersSyncedTo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pruntime_rpc.HeadersSyncedTo - * @static - * @param {Object.<string,*>} object Plain object - * @returns {pruntime_rpc.HeadersSyncedTo} HeadersSyncedTo - */ - HeadersSyncedTo.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.HeadersSyncedTo) - return object; - let message = new $root.pruntime_rpc.HeadersSyncedTo(); - if (object.relaychainSyncedTo != null) - message.relaychainSyncedTo = object.relaychainSyncedTo >>> 0; - if (object.parachainSyncedTo != null) - message.parachainSyncedTo = object.parachainSyncedTo >>> 0; - return message; - }; - - /** - * Creates a plain object from a HeadersSyncedTo message. Also converts values to other types if specified. - * @function toObject - * @memberof pruntime_rpc.HeadersSyncedTo - * @static - * @param {pruntime_rpc.HeadersSyncedTo} message HeadersSyncedTo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.<string,*>} Plain object - */ - HeadersSyncedTo.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.relaychainSyncedTo = 0; - object.parachainSyncedTo = 0; - } - if (message.relaychainSyncedTo != null && message.hasOwnProperty("relaychainSyncedTo")) - object.relaychainSyncedTo = message.relaychainSyncedTo; - if (message.parachainSyncedTo != null && message.hasOwnProperty("parachainSyncedTo")) - object.parachainSyncedTo = message.parachainSyncedTo; - return object; - }; - - /** - * Converts this HeadersSyncedTo to JSON. - * @function toJSON - * @memberof pruntime_rpc.HeadersSyncedTo - * @instance - * @returns {Object.<string,*>} JSON object - */ - HeadersSyncedTo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return HeadersSyncedTo; - })(); + /** + * NetworkStatus _config. + * @member {"config"|undefined} _config + * @memberof pruntime_rpc.NetworkStatus + * @instance + */ + Object.defineProperty(NetworkStatus.prototype, "_config", { + get: $util.oneOfGetter(($oneOfFields = ["config"])), + set: $util.oneOfSetter($oneOfFields), + }); - pruntime_rpc.Blocks = (function() { - - /** - * Properties of a Blocks. - * @memberof pruntime_rpc - * @interface IBlocks - * @property {Uint8Array|null} [encodedBlocks] Blocks encodedBlocks - */ - - /** - * Constructs a new Blocks. - * @memberof pruntime_rpc - * @classdesc Represents a Blocks. - * @implements IBlocks - * @constructor - * @param {pruntime_rpc.IBlocks=} [properties] Properties to set - */ - function Blocks(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Creates a new NetworkStatus instance using the specified properties. + * @function create + * @memberof pruntime_rpc.NetworkStatus + * @static + * @param {pruntime_rpc.INetworkStatus=} [properties] Properties to set + * @returns {pruntime_rpc.NetworkStatus} NetworkStatus instance + */ + NetworkStatus.create = function create(properties) { + return new NetworkStatus(properties); + }; - /** - * Blocks encodedBlocks. - * @member {Uint8Array} encodedBlocks - * @memberof pruntime_rpc.Blocks - * @instance - */ - Blocks.prototype.encodedBlocks = $util.newBuffer([]); - - /** - * 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 - */ - Blocks.create = function create(properties) { - return new Blocks(properties); - }; - - /** - * 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.Blocks(); - while (reader.pos < end) { - let 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.<string,*>} 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.<string,*>} object Plain object - * @returns {pruntime_rpc.Blocks} Blocks - */ - Blocks.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.Blocks) - return object; - let 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) - 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.<string,*>} Plain object - */ - Blocks.toObject = function toObject(message, options) { - if (!options) - options = {}; - let 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.<string,*>} JSON object - */ - Blocks.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Blocks; - })(); + /** + * Encodes the specified NetworkStatus message. Does not implicitly {@link pruntime_rpc.NetworkStatus.verify|verify} messages. + * @function encode + * @memberof pruntime_rpc.NetworkStatus + * @static + * @param {pruntime_rpc.INetworkStatus} message NetworkStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetworkStatus.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 NetworkStatus message, length delimited. Does not implicitly {@link pruntime_rpc.NetworkStatus.verify|verify} messages. + * @function encodeDelimited + * @memberof pruntime_rpc.NetworkStatus + * @static + * @param {pruntime_rpc.INetworkStatus} message NetworkStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetworkStatus.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - 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 - */ - - /** - * 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 (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Decodes a NetworkStatus message from the specified reader or buffer. + * @function decode + * @memberof pruntime_rpc.NetworkStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pruntime_rpc.NetworkStatus} NetworkStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetworkStatus.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pruntime_rpc.NetworkStatus(); + while (reader.pos < end) { + let 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; + }; - /** - * 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; - - // OneOf field names bound to virtual getters and setters - let $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) - }); - - /** - * 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); - 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.InitRuntimeRequest(); - while (reader.pos < end) { - let 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; - 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.<string,*>} 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"; - let 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"; - 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.<string,*>} object Plain object - * @returns {pruntime_rpc.InitRuntimeRequest} InitRuntimeRequest - */ - InitRuntimeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.InitRuntimeRequest) - return object; - let 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) - 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) - 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) - 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) - message.encodedOperator = object.encodedOperator; - if (object.isParachain != null) - message.isParachain = Boolean(object.isParachain); - 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.<string,*>} Plain object - */ - InitRuntimeRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - let 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; - return object; - }; - - /** - * Converts this InitRuntimeRequest to JSON. - * @function toJSON - * @memberof pruntime_rpc.InitRuntimeRequest - * @instance - * @returns {Object.<string,*>} JSON object - */ - InitRuntimeRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return InitRuntimeRequest; - })(); + /** + * Decodes a NetworkStatus message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pruntime_rpc.NetworkStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pruntime_rpc.NetworkStatus} NetworkStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetworkStatus.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - 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 (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Verifies a NetworkStatus message. + * @function verify + * @memberof pruntime_rpc.NetworkStatus + * @static + * @param {Object.<string,*>} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NetworkStatus.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let 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; + { + let error = $root.pruntime_rpc.NetworkConfig.verify(message.config); + if (error) return "config." + error; } + } + return null; + }; - /** - * 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 - let $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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.GetRuntimeInfoRequest(); - while (reader.pos < end) { - let 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.<string,*>} 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"; - let 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.<string,*>} object Plain object - * @returns {pruntime_rpc.GetRuntimeInfoRequest} GetRuntimeInfoRequest - */ - GetRuntimeInfoRequest.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.GetRuntimeInfoRequest) - return object; - let 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) - 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.<string,*>} Plain object - */ - GetRuntimeInfoRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - let 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.<string,*>} JSON object - */ - GetRuntimeInfoRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GetRuntimeInfoRequest; - })(); + /** + * Creates a NetworkStatus message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pruntime_rpc.NetworkStatus + * @static + * @param {Object.<string,*>} object Plain object + * @returns {pruntime_rpc.NetworkStatus} NetworkStatus + */ + NetworkStatus.fromObject = function fromObject(object) { + if (object instanceof $root.pruntime_rpc.NetworkStatus) return object; + let message = new $root.pruntime_rpc.NetworkStatus(); + if (object.publicRpcPort != null) + message.publicRpcPort = object.publicRpcPort >>> 0; + if (object.config != null) { + if (typeof object.config !== "object") + throw TypeError( + ".pruntime_rpc.NetworkStatus.config: object expected" + ); + message.config = $root.pruntime_rpc.NetworkConfig.fromObject( + object.config + ); + } + return message; + }; - 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 (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Creates a plain object from a NetworkStatus message. Also converts values to other types if specified. + * @function toObject + * @memberof pruntime_rpc.NetworkStatus + * @static + * @param {pruntime_rpc.NetworkStatus} message NetworkStatus + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.<string,*>} Plain object + */ + NetworkStatus.toObject = function toObject(message, options) { + if (!options) options = {}; + let 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; + }; - /** - * 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 - let $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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.InitRuntimeResponse(); - while (reader.pos < end) { - let 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.<string,*>} 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"; - let 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; - { - let 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.<string,*>} object Plain object - * @returns {pruntime_rpc.InitRuntimeResponse} InitRuntimeResponse - */ - InitRuntimeResponse.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.InitRuntimeResponse) - return object; - let 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) - 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) - 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) - 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) - 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.<string,*>} Plain object - */ - InitRuntimeResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let 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.<string,*>} JSON object - */ - InitRuntimeResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return InitRuntimeResponse; - })(); + /** + * Converts this NetworkStatus to JSON. + * @function toJSON + * @memberof pruntime_rpc.NetworkStatus + * @instance + * @returns {Object.<string,*>} JSON object + */ + NetworkStatus.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - 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 {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 (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + return NetworkStatus; + })(); - /** - * 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 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); - 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.Attestation(); - while (reader.pos < end) { - let 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 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.<string,*>} 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")) { - let error = $root.pruntime_rpc.AttestationReport.verify(message.payload); - if (error) - return "payload." + error; - } - 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.<string,*>} object Plain object - * @returns {pruntime_rpc.Attestation} Attestation - */ - Attestation.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.Attestation) - return object; - let 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.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.<string,*>} Plain object - */ - Attestation.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.version = 0; - object.provider = ""; - object.payload = null; - if ($util.Long) { - let 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 (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; - return object; - }; - - /** - * Converts this Attestation to JSON. - * @function toJSON - * @memberof pruntime_rpc.Attestation - * @instance - * @returns {Object.<string,*>} JSON object - */ - Attestation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Attestation; - })(); + 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 + */ - 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 (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * 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 (let 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.AttestationReport(); - while (reader.pos < end) { - let 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.<string,*>} 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.<string,*>} object Plain object - * @returns {pruntime_rpc.AttestationReport} AttestationReport - */ - AttestationReport.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.AttestationReport) - return object; - let 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) - 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) - 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.<string,*>} Plain object - */ - AttestationReport.toObject = function toObject(message, options) { - if (!options) - options = {}; - let 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.<string,*>} JSON object - */ - AttestationReport.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return AttestationReport; - })(); + /** + * NetworkConfig allProxy. + * @member {string} allProxy + * @memberof pruntime_rpc.NetworkConfig + * @instance + */ + NetworkConfig.prototype.allProxy = ""; - 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 (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * NetworkConfig i2pProxy. + * @member {string} i2pProxy + * @memberof pruntime_rpc.NetworkConfig + * @instance + */ + NetworkConfig.prototype.i2pProxy = ""; - /** - * 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.GetEgressMessagesResponse(); - while (reader.pos < end) { - let 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.<string,*>} 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.<string,*>} object Plain object - * @returns {pruntime_rpc.GetEgressMessagesResponse} GetEgressMessagesResponse - */ - GetEgressMessagesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.GetEgressMessagesResponse) - return object; - let 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) - 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.<string,*>} Plain object - */ - GetEgressMessagesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let 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.<string,*>} JSON object - */ - GetEgressMessagesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GetEgressMessagesResponse; - })(); + /** + * 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); + }; - 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 (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * 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; + }; - /** - * 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.ContractQueryRequest(); - while (reader.pos < end) { - let 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.<string,*>} 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")) { - let 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.<string,*>} object Plain object - * @returns {pruntime_rpc.ContractQueryRequest} ContractQueryRequest - */ - ContractQueryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.ContractQueryRequest) - return object; - let 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) - 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.<string,*>} Plain object - */ - ContractQueryRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - let 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.<string,*>} JSON object - */ - ContractQueryRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ContractQueryRequest; - })(); + /** + * 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(); + }; - 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 (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * 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); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pruntime_rpc.NetworkConfig(); + while (reader.pos < end) { + let 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; + }; - /** - * 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.Signature(); - while (reader.pos < end) { - let 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.<string,*>} 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")) { - let 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: - 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.<string,*>} object Plain object - * @returns {pruntime_rpc.Signature} Signature - */ - Signature.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.Signature) - return object; - let 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) { - 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; - } - 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) - 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.<string,*>} Plain object - */ - Signature.toObject = function toObject(message, options) { - if (!options) - options = {}; - let 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] : 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.<string,*>} JSON object - */ - Signature.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Signature; - })(); + /** + * 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()); + }; - 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 (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Verifies a NetworkConfig message. + * @function verify + * @memberof pruntime_rpc.NetworkConfig + * @static + * @param {Object.<string,*>} 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; + }; - /** - * 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.Certificate(); - while (reader.pos < end) { - let 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.<string,*>} 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")) { - let 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.<string,*>} object Plain object - * @returns {pruntime_rpc.Certificate} Certificate - */ - Certificate.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.Certificate) - return object; - let 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) - 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.<string,*>} Plain object - */ - Certificate.toObject = function toObject(message, options) { - if (!options) - options = {}; - let 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.<string,*>} JSON object - */ - Certificate.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Certificate; - })(); + /** + * 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.<string,*>} object Plain object + * @returns {pruntime_rpc.NetworkConfig} NetworkConfig + */ + NetworkConfig.fromObject = function fromObject(object) { + if (object instanceof $root.pruntime_rpc.NetworkConfig) return object; + let 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; + }; /** - * 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 - */ - pruntime_rpc.SignatureType = (function() { - const 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; - return values; - })(); + * 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.<string,*>} Plain object + */ + NetworkConfig.toObject = function toObject(message, options) { + if (!options) options = {}; + let 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; + }; - 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 (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Converts this NetworkConfig to JSON. + * @function toJSON + * @memberof pruntime_rpc.NetworkConfig + * @instance + * @returns {Object.<string,*>} JSON object + */ + NetworkConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.ContractQueryResponse(); - while (reader.pos < end) { - let 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.<string,*>} 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.<string,*>} object Plain object - * @returns {pruntime_rpc.ContractQueryResponse} ContractQueryResponse - */ - ContractQueryResponse.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.ContractQueryResponse) - return object; - let 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) - 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.<string,*>} Plain object - */ - ContractQueryResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let 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.<string,*>} JSON object - */ - ContractQueryResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ContractQueryResponse; - })(); + return NetworkConfig; + })(); - 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 (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + 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 + */ - /** - * 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.GetWorkerStateRequest(); - while (reader.pos < end) { - let 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.<string,*>} 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.<string,*>} object Plain object - * @returns {pruntime_rpc.GetWorkerStateRequest} GetWorkerStateRequest - */ - GetWorkerStateRequest.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.GetWorkerStateRequest) - return object; - let 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) - 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.<string,*>} Plain object - */ - GetWorkerStateRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - let 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.<string,*>} JSON object - */ - GetWorkerStateRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GetWorkerStateRequest; - })(); + /** + * 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 (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + } - 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 (let 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 = ""; - /** - * 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.WorkerStat(); - while (reader.pos < end) { - let 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.<string,*>} 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.<string,*>} object Plain object - * @returns {pruntime_rpc.WorkerStat} WorkerStat - */ - WorkerStat.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.WorkerStat) - return object; - let 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) { - 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.<string,*>} Plain object - */ - WorkerStat.toObject = function toObject(message, options) { - if (!options) - options = {}; - let 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] : 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.<string,*>} JSON object - */ - WorkerStat.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return WorkerStat; - })(); + /** + * HttpHeader value. + * @member {string} value + * @memberof pruntime_rpc.HttpHeader + * @instance + */ + HttpHeader.prototype.value = ""; - 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.IMiningState|null} [miningState] WorkerState miningState - * @property {Array.<number>|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 (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * 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); + }; - /** - * 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 miningState. - * @member {pruntime_rpc.IMiningState|null|undefined} miningState - * @memberof pruntime_rpc.WorkerState - * @instance - */ - WorkerState.prototype.miningState = null; - - /** - * WorkerState waitingHeartbeats. - * @member {Array.<number>} 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.miningState != null && Object.hasOwnProperty.call(message, "miningState")) - $root.pruntime_rpc.MiningState.encode(message.miningState, 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 (let 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.WorkerState(); - while (reader.pos < end) { - let 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.miningState = $root.pruntime_rpc.MiningState.decode(reader, reader.uint32()); - break; - case 5: - if (!(message.waitingHeartbeats && message.waitingHeartbeats.length)) - message.waitingHeartbeats = []; - if ((tag & 7) === 2) { - let 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.<string,*>} 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")) { - let error = $root.pruntime_rpc.BenchState.verify(message.benchState); - if (error) - return "benchState." + error; - } - if (message.miningState != null && message.hasOwnProperty("miningState")) { - let error = $root.pruntime_rpc.MiningState.verify(message.miningState); - if (error) - return "miningState." + error; - } - if (message.waitingHeartbeats != null && message.hasOwnProperty("waitingHeartbeats")) { - if (!Array.isArray(message.waitingHeartbeats)) - return "waitingHeartbeats: array expected"; - for (let i = 0; i < message.waitingHeartbeats.length; ++i) - if (!$util.isInteger(message.waitingHeartbeats[i])) - return "waitingHeartbeats: integer[] expected"; - } - if (message.tokenomicInfo != null && message.hasOwnProperty("tokenomicInfo")) { - let error = $root.pruntime_rpc.TokenomicInfo.verify(message.tokenomicInfo); - if (error) - return "tokenomicInfo." + error; - } - if (message.stat != null && message.hasOwnProperty("stat")) { - let 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.<string,*>} object Plain object - * @returns {pruntime_rpc.WorkerState} WorkerState - */ - WorkerState.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.WorkerState) - return object; - let 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.miningState != null) { - if (typeof object.miningState !== "object") - throw TypeError(".pruntime_rpc.WorkerState.miningState: object expected"); - message.miningState = $root.pruntime_rpc.MiningState.fromObject(object.miningState); - } - if (object.waitingHeartbeats) { - if (!Array.isArray(object.waitingHeartbeats)) - throw TypeError(".pruntime_rpc.WorkerState.waitingHeartbeats: array expected"); - message.waitingHeartbeats = []; - for (let 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.<string,*>} Plain object - */ - WorkerState.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.waitingHeartbeats = []; - if (options.defaults) { - object.registered = false; - object.unresponsive = false; - object.benchState = null; - object.miningState = 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.miningState != null && message.hasOwnProperty("miningState")) - object.miningState = $root.pruntime_rpc.MiningState.toObject(message.miningState, options); - if (message.waitingHeartbeats && message.waitingHeartbeats.length) { - object.waitingHeartbeats = []; - for (let 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.<string,*>} JSON object - */ - WorkerState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return WorkerState; - })(); + /** + * 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(); + }; - 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 (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * 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); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pruntime_rpc.HttpHeader(); + while (reader.pos < end) { + let 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; + }; - /** - * 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.HandoverChallenge(); - while (reader.pos < end) { - let 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.<string,*>} 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.<string,*>} object Plain object - * @returns {pruntime_rpc.HandoverChallenge} HandoverChallenge - */ - HandoverChallenge.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.HandoverChallenge) - return object; - let 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) - 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.<string,*>} Plain object - */ - HandoverChallenge.toObject = function toObject(message, options) { - if (!options) - options = {}; - let 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.<string,*>} JSON object - */ - HandoverChallenge.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return HandoverChallenge; - })(); + /** + * 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()); + }; - 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 (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Verifies a HttpHeader message. + * @function verify + * @memberof pruntime_rpc.HttpHeader + * @static + * @param {Object.<string,*>} 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; + }; - /** - * 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.HandoverChallengeResponse(); - while (reader.pos < end) { - let 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.<string,*>} 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")) { - let 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.<string,*>} object Plain object - * @returns {pruntime_rpc.HandoverChallengeResponse} HandoverChallengeResponse - */ - HandoverChallengeResponse.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.HandoverChallengeResponse) - return object; - let 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) - 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.<string,*>} Plain object - */ - HandoverChallengeResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let 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.<string,*>} JSON object - */ - HandoverChallengeResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return HandoverChallengeResponse; - })(); + /** + * 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.<string,*>} object Plain object + * @returns {pruntime_rpc.HttpHeader} HttpHeader + */ + HttpHeader.fromObject = function fromObject(object) { + if (object instanceof $root.pruntime_rpc.HttpHeader) return object; + let 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; + }; - 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 (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * 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.<string,*>} Plain object + */ + HttpHeader.toObject = function toObject(message, options) { + if (!options) options = {}; + let 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; + }; - /** - * 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.HandoverWorkerKey(); - while (reader.pos < end) { - let 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.<string,*>} 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")) { - let 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.<string,*>} object Plain object - * @returns {pruntime_rpc.HandoverWorkerKey} HandoverWorkerKey - */ - HandoverWorkerKey.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.HandoverWorkerKey) - return object; - let 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) - 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.<string,*>} Plain object - */ - HandoverWorkerKey.toObject = function toObject(message, options) { - if (!options) - options = {}; - let 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.<string,*>} JSON object - */ - HandoverWorkerKey.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return HandoverWorkerKey; - })(); + /** + * Converts this HttpHeader to JSON. + * @function toJSON + * @memberof pruntime_rpc.HttpHeader + * @instance + * @returns {Object.<string,*>} JSON object + */ + HttpHeader.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - 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 (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + return HttpHeader; + })(); - /** - * 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.BenchState(); - while (reader.pos < end) { - let 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.<string,*>} 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.<string,*>} object Plain object - * @returns {pruntime_rpc.BenchState} BenchState - */ - BenchState.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.BenchState) - return object; - let 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.<string,*>} Plain object - */ - BenchState.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.startBlock = 0; - if ($util.Long) { - let 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.<string,*>} JSON object - */ - BenchState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return BenchState; - })(); + 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.<pruntime_rpc.IHttpHeader>|null} [headers] HttpRequest headers + * @property {Uint8Array|null} [body] HttpRequest body + */ - pruntime_rpc.MiningState = (function() { - - /** - * Properties of a MiningState. - * @memberof pruntime_rpc - * @interface IMiningState - * @property {number|null} [sessionId] MiningState sessionId - * @property {boolean|null} [paused] MiningState paused - * @property {number|Long|null} [startTime] MiningState startTime - */ - - /** - * Constructs a new MiningState. - * @memberof pruntime_rpc - * @classdesc Represents a MiningState. - * @implements IMiningState - * @constructor - * @param {pruntime_rpc.IMiningState=} [properties] Properties to set - */ - function MiningState(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * 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 (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + } - /** - * MiningState sessionId. - * @member {number} sessionId - * @memberof pruntime_rpc.MiningState - * @instance - */ - MiningState.prototype.sessionId = 0; - - /** - * MiningState paused. - * @member {boolean} paused - * @memberof pruntime_rpc.MiningState - * @instance - */ - MiningState.prototype.paused = false; - - /** - * MiningState startTime. - * @member {number|Long} startTime - * @memberof pruntime_rpc.MiningState - * @instance - */ - MiningState.prototype.startTime = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Creates a new MiningState instance using the specified properties. - * @function create - * @memberof pruntime_rpc.MiningState - * @static - * @param {pruntime_rpc.IMiningState=} [properties] Properties to set - * @returns {pruntime_rpc.MiningState} MiningState instance - */ - MiningState.create = function create(properties) { - return new MiningState(properties); - }; - - /** - * Encodes the specified MiningState message. Does not implicitly {@link pruntime_rpc.MiningState.verify|verify} messages. - * @function encode - * @memberof pruntime_rpc.MiningState - * @static - * @param {pruntime_rpc.IMiningState} message MiningState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MiningState.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 MiningState message, length delimited. Does not implicitly {@link pruntime_rpc.MiningState.verify|verify} messages. - * @function encodeDelimited - * @memberof pruntime_rpc.MiningState - * @static - * @param {pruntime_rpc.IMiningState} message MiningState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MiningState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MiningState message from the specified reader or buffer. - * @function decode - * @memberof pruntime_rpc.MiningState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pruntime_rpc.MiningState} MiningState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MiningState.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.MiningState(); - while (reader.pos < end) { - let 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 MiningState message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pruntime_rpc.MiningState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.MiningState} MiningState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MiningState.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MiningState message. - * @function verify - * @memberof pruntime_rpc.MiningState - * @static - * @param {Object.<string,*>} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MiningState.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 MiningState message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pruntime_rpc.MiningState - * @static - * @param {Object.<string,*>} object Plain object - * @returns {pruntime_rpc.MiningState} MiningState - */ - MiningState.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.MiningState) - return object; - let message = new $root.pruntime_rpc.MiningState(); - 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 MiningState message. Also converts values to other types if specified. - * @function toObject - * @memberof pruntime_rpc.MiningState - * @static - * @param {pruntime_rpc.MiningState} message MiningState - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.<string,*>} Plain object - */ - MiningState.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.sessionId = 0; - object.paused = false; - if ($util.Long) { - let 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 MiningState to JSON. - * @function toJSON - * @memberof pruntime_rpc.MiningState - * @instance - * @returns {Object.<string,*>} JSON object - */ - MiningState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MiningState; - })(); + /** + * HttpRequest url. + * @member {string} url + * @memberof pruntime_rpc.HttpRequest + * @instance + */ + HttpRequest.prototype.url = ""; - 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 (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * HttpRequest method. + * @member {string} method + * @memberof pruntime_rpc.HttpRequest + * @instance + */ + HttpRequest.prototype.method = ""; - /** - * 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.EchoMessage(); - while (reader.pos < end) { - let 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.<string,*>} 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.<string,*>} object Plain object - * @returns {pruntime_rpc.EchoMessage} EchoMessage - */ - EchoMessage.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.EchoMessage) - return object; - let 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) - 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.<string,*>} Plain object - */ - EchoMessage.toObject = function toObject(message, options) { - if (!options) - options = {}; - let 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.<string,*>} JSON object - */ - EchoMessage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return EchoMessage; - })(); + /** + * HttpRequest headers. + * @member {Array.<pruntime_rpc.IHttpHeader>} headers + * @memberof pruntime_rpc.HttpRequest + * @instance + */ + HttpRequest.prototype.headers = $util.emptyArray; /** - * 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 + * HttpRequest body. + * @member {Uint8Array} body + * @memberof pruntime_rpc.HttpRequest + * @instance */ - pruntime_rpc.ResponsiveEvent = (function() { - const valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NoEvent"] = 0; - values[valuesById[1] = "EnterUnresponsive"] = 1; - values[valuesById[2] = "ExitUnresponsive"] = 2; - return values; - })(); + HttpRequest.prototype.body = $util.newBuffer([]); - 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 (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * 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); + }; - /** - * 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.AddEndpointRequest(); - while (reader.pos < end) { - let 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.<string,*>} 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.<string,*>} object Plain object - * @returns {pruntime_rpc.AddEndpointRequest} AddEndpointRequest - */ - AddEndpointRequest.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.AddEndpointRequest) - return object; - let 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) - 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.<string,*>} Plain object - */ - AddEndpointRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - let 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.<string,*>} JSON object - */ - AddEndpointRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return AddEndpointRequest; - })(); + /** + * 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 (let 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(); + }; - 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 (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * 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); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pruntime_rpc.HttpRequest(); + while (reader.pos < end) { + let 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; + }; - /** - * 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 - let $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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.GetEndpointResponse(); - while (reader.pos < end) { - let 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.<string,*>} 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"; - let 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.<string,*>} object Plain object - * @returns {pruntime_rpc.GetEndpointResponse} GetEndpointResponse - */ - GetEndpointResponse.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.GetEndpointResponse) - return object; - let 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) - 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) - 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.<string,*>} Plain object - */ - GetEndpointResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let 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.<string,*>} JSON object - */ - GetEndpointResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GetEndpointResponse; - })(); + /** + * 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()); + }; - 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 (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Verifies a HttpRequest message. + * @function verify + * @memberof pruntime_rpc.HttpRequest + * @static + * @param {Object.<string,*>} 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 (let i = 0; i < message.headers.length; ++i) { + let 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; + }; - /** - * 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.SignEndpointsRequest(); - while (reader.pos < end) { - let 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.<string,*>} 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.<string,*>} object Plain object - * @returns {pruntime_rpc.SignEndpointsRequest} SignEndpointsRequest - */ - SignEndpointsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.SignEndpointsRequest) - return object; - let 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) - 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.<string,*>} Plain object - */ - SignEndpointsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - let 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.<string,*>} JSON object - */ - SignEndpointsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return SignEndpointsRequest; - })(); + /** + * 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.<string,*>} object Plain object + * @returns {pruntime_rpc.HttpRequest} HttpRequest + */ + HttpRequest.fromObject = function fromObject(object) { + if (object instanceof $root.pruntime_rpc.HttpRequest) return object; + let 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 (let 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) message.body = object.body; + return message; + }; - 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 (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * 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.<string,*>} Plain object + */ + HttpRequest.toObject = function toObject(message, options) { + if (!options) options = {}; + let 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 (let 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; + }; - /** - * 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.DerivePhalaI2pKeyResponse(); - while (reader.pos < end) { - let 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.<string,*>} 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.<string,*>} object Plain object - * @returns {pruntime_rpc.DerivePhalaI2pKeyResponse} DerivePhalaI2pKeyResponse - */ - DerivePhalaI2pKeyResponse.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.DerivePhalaI2pKeyResponse) - return object; - let 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) - 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.<string,*>} Plain object - */ - DerivePhalaI2pKeyResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let 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.<string,*>} JSON object - */ - DerivePhalaI2pKeyResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return DerivePhalaI2pKeyResponse; - })(); + /** + * Converts this HttpRequest to JSON. + * @function toJSON + * @memberof pruntime_rpc.HttpRequest + * @instance + * @returns {Object.<string,*>} JSON object + */ + HttpRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - 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 (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + return HttpRequest; + })(); - /** - * 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.TokenomicStat(); - while (reader.pos < end) { - let 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.<string,*>} 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.<string,*>} object Plain object - * @returns {pruntime_rpc.TokenomicStat} TokenomicStat - */ - TokenomicStat.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.TokenomicStat) - return object; - let 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.<string,*>} Plain object - */ - TokenomicStat.toObject = function toObject(message, options) { - if (!options) - options = {}; - let 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.<string,*>} JSON object - */ - TokenomicStat.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return TokenomicStat; - })(); + pruntime_rpc.HttpResponse = (function () { + /** + * Properties of a HttpResponse. + * @memberof pruntime_rpc + * @interface IHttpResponse + * @property {number|null} [statusCode] HttpResponse statusCode + * @property {Array.<pruntime_rpc.IHttpHeader>|null} [headers] HttpResponse headers + * @property {Uint8Array|null} [body] HttpResponse body + */ - 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 (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * 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 (let 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.TokenomicInfo(); - while (reader.pos < end) { - let 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.<string,*>} 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")) { - let 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.<string,*>} object Plain object - * @returns {pruntime_rpc.TokenomicInfo} TokenomicInfo - */ - TokenomicInfo.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.TokenomicInfo) - return object; - let 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.<string,*>} Plain object - */ - TokenomicInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.v = ""; - object.vInit = ""; - if ($util.Long) { - let 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) { - let 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) { - let 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.<string,*>} JSON object - */ - TokenomicInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return TokenomicInfo; - })(); + /** + * HttpResponse statusCode. + * @member {number} statusCode + * @memberof pruntime_rpc.HttpResponse + * @instance + */ + HttpResponse.prototype.statusCode = 0; - pruntime_rpc.NetworkStatus = (function() { - - /** - * Properties of a NetworkStatus. - * @memberof pruntime_rpc - * @interface INetworkStatus - * @property {number|null} [publicRpcPort] NetworkStatus publicRpcPort - * @property {pruntime_rpc.INetworkConfig|null} [config] NetworkStatus config - */ - - /** - * Constructs a new NetworkStatus. - * @memberof pruntime_rpc - * @classdesc Represents a NetworkStatus. - * @implements INetworkStatus - * @constructor - * @param {pruntime_rpc.INetworkStatus=} [properties] Properties to set - */ - function NetworkStatus(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * HttpResponse headers. + * @member {Array.<pruntime_rpc.IHttpHeader>} headers + * @memberof pruntime_rpc.HttpResponse + * @instance + */ + HttpResponse.prototype.headers = $util.emptyArray; - /** - * NetworkStatus publicRpcPort. - * @member {number|null|undefined} publicRpcPort - * @memberof pruntime_rpc.NetworkStatus - * @instance - */ - NetworkStatus.prototype.publicRpcPort = null; - - /** - * NetworkStatus config. - * @member {pruntime_rpc.INetworkConfig|null|undefined} config - * @memberof pruntime_rpc.NetworkStatus - * @instance - */ - NetworkStatus.prototype.config = null; - - // OneOf field names bound to virtual getters and setters - let $oneOfFields; - - /** - * NetworkStatus _publicRpcPort. - * @member {"publicRpcPort"|undefined} _publicRpcPort - * @memberof pruntime_rpc.NetworkStatus - * @instance - */ - Object.defineProperty(NetworkStatus.prototype, "_publicRpcPort", { - get: $util.oneOfGetter($oneOfFields = ["publicRpcPort"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * NetworkStatus _config. - * @member {"config"|undefined} _config - * @memberof pruntime_rpc.NetworkStatus - * @instance - */ - Object.defineProperty(NetworkStatus.prototype, "_config", { - get: $util.oneOfGetter($oneOfFields = ["config"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new NetworkStatus instance using the specified properties. - * @function create - * @memberof pruntime_rpc.NetworkStatus - * @static - * @param {pruntime_rpc.INetworkStatus=} [properties] Properties to set - * @returns {pruntime_rpc.NetworkStatus} NetworkStatus instance - */ - NetworkStatus.create = function create(properties) { - return new NetworkStatus(properties); - }; - - /** - * Encodes the specified NetworkStatus message. Does not implicitly {@link pruntime_rpc.NetworkStatus.verify|verify} messages. - * @function encode - * @memberof pruntime_rpc.NetworkStatus - * @static - * @param {pruntime_rpc.INetworkStatus} message NetworkStatus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NetworkStatus.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 NetworkStatus message, length delimited. Does not implicitly {@link pruntime_rpc.NetworkStatus.verify|verify} messages. - * @function encodeDelimited - * @memberof pruntime_rpc.NetworkStatus - * @static - * @param {pruntime_rpc.INetworkStatus} message NetworkStatus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NetworkStatus.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NetworkStatus message from the specified reader or buffer. - * @function decode - * @memberof pruntime_rpc.NetworkStatus - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pruntime_rpc.NetworkStatus} NetworkStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NetworkStatus.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.NetworkStatus(); - while (reader.pos < end) { - let 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 NetworkStatus message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pruntime_rpc.NetworkStatus - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pruntime_rpc.NetworkStatus} NetworkStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NetworkStatus.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NetworkStatus message. - * @function verify - * @memberof pruntime_rpc.NetworkStatus - * @static - * @param {Object.<string,*>} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NetworkStatus.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - let 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; - { - let error = $root.pruntime_rpc.NetworkConfig.verify(message.config); - if (error) - return "config." + error; - } - } - return null; - }; - - /** - * Creates a NetworkStatus message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pruntime_rpc.NetworkStatus - * @static - * @param {Object.<string,*>} object Plain object - * @returns {pruntime_rpc.NetworkStatus} NetworkStatus - */ - NetworkStatus.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.NetworkStatus) - return object; - let message = new $root.pruntime_rpc.NetworkStatus(); - if (object.publicRpcPort != null) - message.publicRpcPort = object.publicRpcPort >>> 0; - if (object.config != null) { - if (typeof object.config !== "object") - throw TypeError(".pruntime_rpc.NetworkStatus.config: object expected"); - message.config = $root.pruntime_rpc.NetworkConfig.fromObject(object.config); - } - return message; - }; - - /** - * Creates a plain object from a NetworkStatus message. Also converts values to other types if specified. - * @function toObject - * @memberof pruntime_rpc.NetworkStatus - * @static - * @param {pruntime_rpc.NetworkStatus} message NetworkStatus - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.<string,*>} Plain object - */ - NetworkStatus.toObject = function toObject(message, options) { - if (!options) - options = {}; - let 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 NetworkStatus to JSON. - * @function toJSON - * @memberof pruntime_rpc.NetworkStatus - * @instance - * @returns {Object.<string,*>} JSON object - */ - NetworkStatus.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return NetworkStatus; - })(); + /** + * HttpResponse body. + * @member {Uint8Array} body + * @memberof pruntime_rpc.HttpResponse + * @instance + */ + HttpResponse.prototype.body = $util.newBuffer([]); - 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 (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * 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); + }; - /** - * 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.NetworkConfig(); - while (reader.pos < end) { - let 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.<string,*>} 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.<string,*>} object Plain object - * @returns {pruntime_rpc.NetworkConfig} NetworkConfig - */ - NetworkConfig.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.NetworkConfig) - return object; - let 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.<string,*>} Plain object - */ - NetworkConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - let 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.<string,*>} JSON object - */ - NetworkConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return NetworkConfig; - })(); + /** + * 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 (let 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(); + }; - 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 (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * 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); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pruntime_rpc.HttpResponse(); + while (reader.pos < end) { + let 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; + }; - /** - * 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.HttpHeader(); - while (reader.pos < end) { - let 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.<string,*>} 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.<string,*>} object Plain object - * @returns {pruntime_rpc.HttpHeader} HttpHeader - */ - HttpHeader.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.HttpHeader) - return object; - let 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.<string,*>} Plain object - */ - HttpHeader.toObject = function toObject(message, options) { - if (!options) - options = {}; - let 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.<string,*>} JSON object - */ - HttpHeader.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return HttpHeader; - })(); + /** + * 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()); + }; - 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.<pruntime_rpc.IHttpHeader>|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 (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Verifies a HttpResponse message. + * @function verify + * @memberof pruntime_rpc.HttpResponse + * @static + * @param {Object.<string,*>} 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 (let i = 0; i < message.headers.length; ++i) { + let 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; + }; - /** - * 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.<pruntime_rpc.IHttpHeader>} 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 (let 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.HttpRequest(); - while (reader.pos < end) { - let 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.<string,*>} 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 (let i = 0; i < message.headers.length; ++i) { - let 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.<string,*>} object Plain object - * @returns {pruntime_rpc.HttpRequest} HttpRequest - */ - HttpRequest.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.HttpRequest) - return object; - let 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 (let 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) - 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.<string,*>} Plain object - */ - HttpRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - let 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 (let 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.<string,*>} JSON object - */ - HttpRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return HttpRequest; - })(); + /** + * 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.<string,*>} object Plain object + * @returns {pruntime_rpc.HttpResponse} HttpResponse + */ + HttpResponse.fromObject = function fromObject(object) { + if (object instanceof $root.pruntime_rpc.HttpResponse) return object; + let 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 (let 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) message.body = object.body; + return message; + }; - pruntime_rpc.HttpResponse = (function() { - - /** - * Properties of a HttpResponse. - * @memberof pruntime_rpc - * @interface IHttpResponse - * @property {number|null} [statusCode] HttpResponse statusCode - * @property {Array.<pruntime_rpc.IHttpHeader>|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 (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * 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.<string,*>} Plain object + */ + HttpResponse.toObject = function toObject(message, options) { + if (!options) options = {}; + let 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 (let 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; + }; - /** - * HttpResponse statusCode. - * @member {number} statusCode - * @memberof pruntime_rpc.HttpResponse - * @instance - */ - HttpResponse.prototype.statusCode = 0; - - /** - * HttpResponse headers. - * @member {Array.<pruntime_rpc.IHttpHeader>} 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 (let 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pruntime_rpc.HttpResponse(); - while (reader.pos < end) { - let 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.<string,*>} 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 (let i = 0; i < message.headers.length; ++i) { - let 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.<string,*>} object Plain object - * @returns {pruntime_rpc.HttpResponse} HttpResponse - */ - HttpResponse.fromObject = function fromObject(object) { - if (object instanceof $root.pruntime_rpc.HttpResponse) - return object; - let 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 (let 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) - 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.<string,*>} Plain object - */ - HttpResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let 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 (let 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.<string,*>} JSON object - */ - HttpResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return HttpResponse; - })(); + /** + * Converts this HttpResponse to JSON. + * @function toJSON + * @memberof pruntime_rpc.HttpResponse + * @instance + * @returns {Object.<string,*>} JSON object + */ + HttpResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return HttpResponse; + })(); - return pruntime_rpc; -})(); + return pruntime_rpc; +})()); -export const google = $root.google = (() => { +export const google = ($root.google = (() => { + /** + * Namespace google. + * @exports google + * @namespace + */ + const google = {}; + google.protobuf = (function () { /** - * Namespace google. - * @exports google + * Namespace protobuf. + * @memberof google * @namespace */ - const google = {}; - - google.protobuf = (function() { - - /** - * Namespace protobuf. - * @memberof google - * @namespace - */ - const protobuf = {}; - - protobuf.Empty = (function() { - - /** - * Properties of an Empty. - * @memberof google.protobuf - * @interface IEmpty - */ - - /** - * Constructs a new Empty. - * @memberof google.protobuf - * @classdesc Represents an Empty. - * @implements IEmpty - * @constructor - * @param {google.protobuf.IEmpty=} [properties] Properties to set - */ - function Empty(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new Empty instance using the specified properties. - * @function create - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.IEmpty=} [properties] Properties to set - * @returns {google.protobuf.Empty} Empty instance - */ - Empty.create = function create(properties) { - return new Empty(properties); - }; - - /** - * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.IEmpty} message Empty message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Empty.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.IEmpty} message Empty message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Empty.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Empty message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Empty - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Empty} Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Empty.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Empty message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Empty - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Empty} Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Empty.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Empty message. - * @function verify - * @memberof google.protobuf.Empty - * @static - * @param {Object.<string,*>} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Empty.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates an Empty message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Empty - * @static - * @param {Object.<string,*>} object Plain object - * @returns {google.protobuf.Empty} Empty - */ - Empty.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Empty) - return object; - return new $root.google.protobuf.Empty(); - }; - - /** - * Creates a plain object from an Empty message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.Empty} message Empty - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.<string,*>} Plain object - */ - Empty.toObject = function toObject() { - return {}; - }; - - /** - * Converts this Empty to JSON. - * @function toJSON - * @memberof google.protobuf.Empty - * @instance - * @returns {Object.<string,*>} JSON object - */ - Empty.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Empty; - })(); - - return protobuf; + const protobuf = {}; + + protobuf.Empty = (function () { + /** + * Properties of an Empty. + * @memberof google.protobuf + * @interface IEmpty + */ + + /** + * Constructs a new Empty. + * @memberof google.protobuf + * @classdesc Represents an Empty. + * @implements IEmpty + * @constructor + * @param {google.protobuf.IEmpty=} [properties] Properties to set + */ + function Empty(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Empty instance using the specified properties. + * @function create + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @returns {google.protobuf.Empty} Empty instance + */ + Empty.create = function create(properties) { + return new Empty(properties); + }; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.google.protobuf.Empty(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Empty message. + * @function verify + * @memberof google.protobuf.Empty + * @static + * @param {Object.<string,*>} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Empty.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Empty + * @static + * @param {Object.<string,*>} object Plain object + * @returns {google.protobuf.Empty} Empty + */ + Empty.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Empty) return object; + return new $root.google.protobuf.Empty(); + }; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.Empty} message Empty + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.<string,*>} Plain object + */ + Empty.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Empty to JSON. + * @function toJSON + * @memberof google.protobuf.Empty + * @instance + * @returns {Object.<string,*>} JSON object + */ + Empty.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Empty; })(); - return google; -})(); + return protobuf; + })(); + + return google; +})()); export { $root as default }; diff --git a/packages/sdk/tsup.browser.ts b/packages/sdk/tsup.browser.ts new file mode 100644 index 0000000..1f264ca --- /dev/null +++ b/packages/sdk/tsup.browser.ts @@ -0,0 +1,22 @@ +import { NodeGlobalsPolyfillPlugin } from "@esbuild-plugins/node-globals-polyfill"; +import { NodeModulesPolyfillPlugin } from "@esbuild-plugins/node-modules-polyfill"; +// import nodePolyfills from 'rollup-plugin-node-polyfills'; +import { defineConfig } from "tsup"; + +export default defineConfig({ + esbuildPlugins: [ + NodeModulesPolyfillPlugin(), + NodeGlobalsPolyfillPlugin({ + buffer: true, + }), + ], + entry: ["src/index.ts"], + outDir: "./dist/browser", + dts: true, + format: ["cjs", "esm"], + ignoreWatch: ["*.test.ts"], + target: "node16", + clean: true, + platform: "browser", + noExternal: ["crypto-browserify", "protobufjs", "randomBytes"], +}); diff --git a/packages/sdk/tsup.config.ts b/packages/sdk/tsup.config.ts deleted file mode 100644 index 0ee9feb..0000000 --- a/packages/sdk/tsup.config.ts +++ /dev/null @@ -1,10 +0,0 @@ -import {defineConfig} from 'tsup' - -export default defineConfig({ - entry: ['src/index.ts'], - dts: true, - format: ['cjs', 'esm'], - ignoreWatch: ['*.test.ts'], - target: 'node16', - clean: true, -}) diff --git a/packages/sdk/tsup.node.ts b/packages/sdk/tsup.node.ts new file mode 100644 index 0000000..5c2d667 --- /dev/null +++ b/packages/sdk/tsup.node.ts @@ -0,0 +1,11 @@ +import { defineConfig } from "tsup"; + +export default defineConfig({ + entry: ["src/index.ts"], + outDir: "./dist/node", + dts: true, + format: ["cjs", "esm"], + ignoreWatch: ["*.test.ts"], + target: "node16", + clean: true, +}); diff --git a/yarn.lock b/yarn.lock index 9e411a3..3c194e1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -14,6 +14,16 @@ __metadata: languageName: node linkType: hard +"@ampproject/remapping@npm:^2.1.0": + version: 2.2.0 + resolution: "@ampproject/remapping@npm:2.2.0" + dependencies: + "@jridgewell/gen-mapping": ^0.1.0 + "@jridgewell/trace-mapping": ^0.3.9 + checksum: d74d170d06468913921d72430259424b7e4c826b5a7d39ff839a29d547efb97dc577caa8ba3fb5cf023624e9af9d09651afc3d4112a45e2050328abc9b3a2292 + languageName: node + linkType: hard + "@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.12.13, @babel/code-frame@npm:^7.16.7": version: 7.16.7 resolution: "@babel/code-frame@npm:7.16.7" @@ -23,6 +33,15 @@ __metadata: languageName: node linkType: hard +"@babel/code-frame@npm:^7.18.6": + version: 7.18.6 + resolution: "@babel/code-frame@npm:7.18.6" + dependencies: + "@babel/highlight": ^7.18.6 + checksum: 195e2be3172d7684bf95cff69ae3b7a15a9841ea9d27d3c843662d50cdd7d6470fd9c8e64be84d031117e4a4083486effba39f9aef6bbb2c89f7f21bcfba33ba + languageName: node + linkType: hard + "@babel/compat-data@npm:^7.16.4": version: 7.17.0 resolution: "@babel/compat-data@npm:7.17.0" @@ -30,6 +49,13 @@ __metadata: languageName: node linkType: hard +"@babel/compat-data@npm:^7.20.5": + version: 7.20.10 + resolution: "@babel/compat-data@npm:7.20.10" + checksum: 6ed6c1bb6fc03c225d63b8611788cd976107d1692402b560ebffbf1fa53e63705f8625bb12e12d17ce7f7af34e61e1ca96c77858aac6f57010045271466200c0 + languageName: node + linkType: hard + "@babel/core@npm:^7.1.0, @babel/core@npm:^7.12.3, @babel/core@npm:^7.7.2, @babel/core@npm:^7.8.0": version: 7.17.2 resolution: "@babel/core@npm:7.17.2" @@ -53,6 +79,29 @@ __metadata: languageName: node linkType: hard +"@babel/core@npm:^7.20.12": + version: 7.20.12 + resolution: "@babel/core@npm:7.20.12" + dependencies: + "@ampproject/remapping": ^2.1.0 + "@babel/code-frame": ^7.18.6 + "@babel/generator": ^7.20.7 + "@babel/helper-compilation-targets": ^7.20.7 + "@babel/helper-module-transforms": ^7.20.11 + "@babel/helpers": ^7.20.7 + "@babel/parser": ^7.20.7 + "@babel/template": ^7.20.7 + "@babel/traverse": ^7.20.12 + "@babel/types": ^7.20.7 + convert-source-map: ^1.7.0 + debug: ^4.1.0 + gensync: ^1.0.0-beta.2 + json5: ^2.2.2 + semver: ^6.3.0 + checksum: 62e6c3e2149a70b5c9729ef5f0d3e2e97e9dcde89fc039c8d8e3463d5d7ba9b29ee84d10faf79b61532ac1645aa62f2bd42338320617e6e3a8a4d8e2a27076e7 + languageName: node + linkType: hard + "@babel/generator@npm:^7.17.0, @babel/generator@npm:^7.7.2": version: 7.17.0 resolution: "@babel/generator@npm:7.17.0" @@ -64,6 +113,17 @@ __metadata: languageName: node linkType: hard +"@babel/generator@npm:^7.20.7": + version: 7.20.7 + resolution: "@babel/generator@npm:7.20.7" + dependencies: + "@babel/types": ^7.20.7 + "@jridgewell/gen-mapping": ^0.3.2 + jsesc: ^2.5.1 + checksum: 84b6983ffdb50c80c1c2e3f3c32617a7133d8effd1065f3e0f9bba188a7d54ab42a4dd5e42b61b843c65f9dd1aa870036ff0f848ebd42707aaa8a2b6d31d04f5 + languageName: node + linkType: hard + "@babel/helper-compilation-targets@npm:^7.16.7": version: 7.16.7 resolution: "@babel/helper-compilation-targets@npm:7.16.7" @@ -78,6 +138,21 @@ __metadata: languageName: node linkType: hard +"@babel/helper-compilation-targets@npm:^7.20.7": + version: 7.20.7 + resolution: "@babel/helper-compilation-targets@npm:7.20.7" + dependencies: + "@babel/compat-data": ^7.20.5 + "@babel/helper-validator-option": ^7.18.6 + browserslist: ^4.21.3 + lru-cache: ^5.1.1 + semver: ^6.3.0 + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 8c32c873ba86e2e1805b30e0807abd07188acbe00ebb97576f0b09061cc65007f1312b589eccb4349c5a8c7f8bb9f2ab199d41da7030bf103d9f347dcd3a3cf4 + languageName: node + linkType: hard + "@babel/helper-environment-visitor@npm:^7.16.7": version: 7.16.7 resolution: "@babel/helper-environment-visitor@npm:7.16.7" @@ -87,6 +162,13 @@ __metadata: languageName: node linkType: hard +"@babel/helper-environment-visitor@npm:^7.18.9": + version: 7.18.9 + resolution: "@babel/helper-environment-visitor@npm:7.18.9" + checksum: b25101f6162ddca2d12da73942c08ad203d7668e06663df685634a8fde54a98bc015f6f62938e8554457a592a024108d45b8f3e651fd6dcdb877275b73cc4420 + languageName: node + linkType: hard + "@babel/helper-function-name@npm:^7.16.7": version: 7.16.7 resolution: "@babel/helper-function-name@npm:7.16.7" @@ -98,6 +180,16 @@ __metadata: languageName: node linkType: hard +"@babel/helper-function-name@npm:^7.19.0": + version: 7.19.0 + resolution: "@babel/helper-function-name@npm:7.19.0" + dependencies: + "@babel/template": ^7.18.10 + "@babel/types": ^7.19.0 + checksum: eac1f5db428ba546270c2b8d750c24eb528b8fcfe50c81de2e0bdebf0e20f24bec688d4331533b782e4a907fad435244621ca2193cfcf80a86731299840e0f6e + languageName: node + linkType: hard + "@babel/helper-get-function-arity@npm:^7.16.7": version: 7.16.7 resolution: "@babel/helper-get-function-arity@npm:7.16.7" @@ -116,6 +208,15 @@ __metadata: languageName: node linkType: hard +"@babel/helper-hoist-variables@npm:^7.18.6": + version: 7.18.6 + resolution: "@babel/helper-hoist-variables@npm:7.18.6" + dependencies: + "@babel/types": ^7.18.6 + checksum: fd9c35bb435fda802bf9ff7b6f2df06308a21277c6dec2120a35b09f9de68f68a33972e2c15505c1a1a04b36ec64c9ace97d4a9e26d6097b76b4396b7c5fa20f + languageName: node + linkType: hard + "@babel/helper-module-imports@npm:^7.16.7": version: 7.16.7 resolution: "@babel/helper-module-imports@npm:7.16.7" @@ -125,6 +226,15 @@ __metadata: languageName: node linkType: hard +"@babel/helper-module-imports@npm:^7.18.6": + version: 7.18.6 + resolution: "@babel/helper-module-imports@npm:7.18.6" + dependencies: + "@babel/types": ^7.18.6 + checksum: f393f8a3b3304b1b7a288a38c10989de754f01d29caf62ce7c4e5835daf0a27b81f3ac687d9d2780d39685aae7b55267324b512150e7b2be967b0c493b6a1def + languageName: node + linkType: hard + "@babel/helper-module-transforms@npm:^7.16.7": version: 7.16.7 resolution: "@babel/helper-module-transforms@npm:7.16.7" @@ -141,6 +251,22 @@ __metadata: languageName: node linkType: hard +"@babel/helper-module-transforms@npm:^7.20.11": + version: 7.20.11 + resolution: "@babel/helper-module-transforms@npm:7.20.11" + dependencies: + "@babel/helper-environment-visitor": ^7.18.9 + "@babel/helper-module-imports": ^7.18.6 + "@babel/helper-simple-access": ^7.20.2 + "@babel/helper-split-export-declaration": ^7.18.6 + "@babel/helper-validator-identifier": ^7.19.1 + "@babel/template": ^7.20.7 + "@babel/traverse": ^7.20.10 + "@babel/types": ^7.20.7 + checksum: 29319ebafa693d48756c6ba0d871677bb0037e0da084fbe221a17c38d57093fc8aa38543c07d76e788266a937976e37ab4901971ca7f237c5ab45f524b9ecca0 + languageName: node + linkType: hard + "@babel/helper-plugin-utils@npm:^7.0.0, @babel/helper-plugin-utils@npm:^7.10.4, @babel/helper-plugin-utils@npm:^7.12.13, @babel/helper-plugin-utils@npm:^7.14.5, @babel/helper-plugin-utils@npm:^7.8.0": version: 7.14.5 resolution: "@babel/helper-plugin-utils@npm:7.14.5" @@ -157,6 +283,15 @@ __metadata: languageName: node linkType: hard +"@babel/helper-simple-access@npm:^7.20.2": + version: 7.20.2 + resolution: "@babel/helper-simple-access@npm:7.20.2" + dependencies: + "@babel/types": ^7.20.2 + checksum: ad1e96ee2e5f654ffee2369a586e5e8d2722bf2d8b028a121b4c33ebae47253f64d420157b9f0a8927aea3a9e0f18c0103e74fdd531815cf3650a0a4adca11a1 + languageName: node + linkType: hard + "@babel/helper-split-export-declaration@npm:^7.16.7": version: 7.16.7 resolution: "@babel/helper-split-export-declaration@npm:7.16.7" @@ -166,6 +301,22 @@ __metadata: languageName: node linkType: hard +"@babel/helper-split-export-declaration@npm:^7.18.6": + version: 7.18.6 + resolution: "@babel/helper-split-export-declaration@npm:7.18.6" + dependencies: + "@babel/types": ^7.18.6 + checksum: c6d3dede53878f6be1d869e03e9ffbbb36f4897c7cc1527dc96c56d127d834ffe4520a6f7e467f5b6f3c2843ea0e81a7819d66ae02f707f6ac057f3d57943a2b + languageName: node + linkType: hard + +"@babel/helper-string-parser@npm:^7.19.4": + version: 7.19.4 + resolution: "@babel/helper-string-parser@npm:7.19.4" + checksum: b2f8a3920b30dfac81ec282ac4ad9598ea170648f8254b10f475abe6d944808fb006aab325d3eb5a8ad3bea8dfa888cfa6ef471050dae5748497c110ec060943 + languageName: node + linkType: hard + "@babel/helper-validator-identifier@npm:^7.16.7": version: 7.16.7 resolution: "@babel/helper-validator-identifier@npm:7.16.7" @@ -173,6 +324,13 @@ __metadata: languageName: node linkType: hard +"@babel/helper-validator-identifier@npm:^7.18.6, @babel/helper-validator-identifier@npm:^7.19.1": + version: 7.19.1 + resolution: "@babel/helper-validator-identifier@npm:7.19.1" + checksum: 0eca5e86a729162af569b46c6c41a63e18b43dbe09fda1d2a3c8924f7d617116af39cac5e4cd5d431bb760b4dca3c0970e0c444789b1db42bcf1fa41fbad0a3a + languageName: node + linkType: hard + "@babel/helper-validator-option@npm:^7.16.7": version: 7.16.7 resolution: "@babel/helper-validator-option@npm:7.16.7" @@ -180,6 +338,13 @@ __metadata: languageName: node linkType: hard +"@babel/helper-validator-option@npm:^7.18.6": + version: 7.18.6 + resolution: "@babel/helper-validator-option@npm:7.18.6" + checksum: f9cc6eb7cc5d759c5abf006402180f8d5e4251e9198197428a97e05d65eb2f8ae5a0ce73b1dfd2d35af41d0eb780627a64edf98a4e71f064eeeacef8de58f2cf + languageName: node + linkType: hard + "@babel/helpers@npm:^7.17.2": version: 7.17.2 resolution: "@babel/helpers@npm:7.17.2" @@ -191,6 +356,17 @@ __metadata: languageName: node linkType: hard +"@babel/helpers@npm:^7.20.7": + version: 7.20.7 + resolution: "@babel/helpers@npm:7.20.7" + dependencies: + "@babel/template": ^7.20.7 + "@babel/traverse": ^7.20.7 + "@babel/types": ^7.20.7 + checksum: 3fb10df3510ba7116a180d5fd983d0f558f7a65c3d599385dba991bff66b74174c88881bc12c2b3cf7284294fcac5b301ded49a8b0098bdf2ef61d0cad8010db + languageName: node + linkType: hard + "@babel/highlight@npm:^7.16.7": version: 7.16.10 resolution: "@babel/highlight@npm:7.16.10" @@ -202,6 +378,17 @@ __metadata: languageName: node linkType: hard +"@babel/highlight@npm:^7.18.6": + version: 7.18.6 + resolution: "@babel/highlight@npm:7.18.6" + dependencies: + "@babel/helper-validator-identifier": ^7.18.6 + chalk: ^2.0.0 + js-tokens: ^4.0.0 + checksum: 92d8ee61549de5ff5120e945e774728e5ccd57fd3b2ed6eace020ec744823d4a98e242be1453d21764a30a14769ecd62170fba28539b211799bbaf232bbb2789 + languageName: node + linkType: hard + "@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.16.7, @babel/parser@npm:^7.17.0": version: 7.17.0 resolution: "@babel/parser@npm:7.17.0" @@ -211,6 +398,15 @@ __metadata: languageName: node linkType: hard +"@babel/parser@npm:^7.20.7": + version: 7.20.7 + resolution: "@babel/parser@npm:7.20.7" + bin: + parser: ./bin/babel-parser.js + checksum: 25b5266e3bd4be837092685f6b7ef886f1308ff72659a24342eb646ae5014f61ed1771ce8fc20636c890fcae19304fc72c069564ca6075207b7fbf3f75367275 + languageName: node + linkType: hard + "@babel/plugin-syntax-async-generators@npm:^7.8.4": version: 7.8.4 resolution: "@babel/plugin-syntax-async-generators@npm:7.8.4" @@ -354,6 +550,21 @@ __metadata: languageName: node linkType: hard +"@babel/register@npm:^7.18.9": + version: 7.18.9 + resolution: "@babel/register@npm:7.18.9" + dependencies: + clone-deep: ^4.0.1 + find-cache-dir: ^2.0.0 + make-dir: ^2.1.0 + pirates: ^4.0.5 + source-map-support: ^0.5.16 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 4aeaff97e061a397f632659082ba86c539ef8194697b236d991c10d1c2ea8f73213d3b5b3b2c24625951a1ef726b7a7d2e70f70ffcb37f79ef0c1a745eebef21 + languageName: node + linkType: hard + "@babel/runtime-corejs3@npm:^7.10.2": version: 7.15.4 resolution: "@babel/runtime-corejs3@npm:7.15.4" @@ -373,6 +584,15 @@ __metadata: languageName: node linkType: hard +"@babel/runtime@npm:^7.20.6, @babel/runtime@npm:^7.20.7": + version: 7.20.7 + resolution: "@babel/runtime@npm:7.20.7" + dependencies: + regenerator-runtime: ^0.13.11 + checksum: 4629ce5c46f06cca9cfb9b7fc00d48003335a809888e2b91ec2069a2dcfbfef738480cff32ba81e0b7c290f8918e5c22ddcf2b710001464ee84ba62c7e32a3a3 + languageName: node + linkType: hard + "@babel/template@npm:^7.16.7, @babel/template@npm:^7.3.3": version: 7.16.7 resolution: "@babel/template@npm:7.16.7" @@ -384,6 +604,17 @@ __metadata: languageName: node linkType: hard +"@babel/template@npm:^7.18.10, @babel/template@npm:^7.20.7": + version: 7.20.7 + resolution: "@babel/template@npm:7.20.7" + dependencies: + "@babel/code-frame": ^7.18.6 + "@babel/parser": ^7.20.7 + "@babel/types": ^7.20.7 + checksum: 2eb1a0ab8d415078776bceb3473d07ab746e6bb4c2f6ca46ee70efb284d75c4a32bb0cd6f4f4946dec9711f9c0780e8e5d64b743208deac6f8e9858afadc349e + languageName: node + linkType: hard + "@babel/traverse@npm:^7.16.7, @babel/traverse@npm:^7.17.0, @babel/traverse@npm:^7.7.2": version: 7.17.0 resolution: "@babel/traverse@npm:7.17.0" @@ -402,6 +633,24 @@ __metadata: languageName: node linkType: hard +"@babel/traverse@npm:^7.20.10, @babel/traverse@npm:^7.20.12, @babel/traverse@npm:^7.20.7": + version: 7.20.12 + resolution: "@babel/traverse@npm:7.20.12" + dependencies: + "@babel/code-frame": ^7.18.6 + "@babel/generator": ^7.20.7 + "@babel/helper-environment-visitor": ^7.18.9 + "@babel/helper-function-name": ^7.19.0 + "@babel/helper-hoist-variables": ^7.18.6 + "@babel/helper-split-export-declaration": ^7.18.6 + "@babel/parser": ^7.20.7 + "@babel/types": ^7.20.7 + debug: ^4.1.0 + globals: ^11.1.0 + checksum: d758b355ab4f1e87984524b67785fa23d74e8a45d2ceb8bcf4d5b2b0cd15ee160db5e68c7078808542805774ca3802e2eafb1b9638afa4cd7f9ecabd0ca7fd56 + languageName: node + linkType: hard + "@babel/types@npm:^7.0.0, @babel/types@npm:^7.16.7, @babel/types@npm:^7.17.0, @babel/types@npm:^7.3.0, @babel/types@npm:^7.3.3, @babel/types@npm:^7.8.3": version: 7.17.0 resolution: "@babel/types@npm:7.17.0" @@ -412,6 +661,17 @@ __metadata: languageName: node linkType: hard +"@babel/types@npm:^7.18.6, @babel/types@npm:^7.19.0, @babel/types@npm:^7.20.2, @babel/types@npm:^7.20.7": + version: 7.20.7 + resolution: "@babel/types@npm:7.20.7" + dependencies: + "@babel/helper-string-parser": ^7.19.4 + "@babel/helper-validator-identifier": ^7.19.1 + to-fast-properties: ^2.0.0 + checksum: b39af241f0b72bba67fd6d0d23914f6faec8c0eba8015c181cbd5ea92e59fc91a52a1ab490d3520c7dbd19ddb9ebb76c476308f6388764f16d8201e37fae6811 + languageName: node + linkType: hard + "@bcoe/v8-coverage@npm:^0.2.3": version: 0.2.3 resolution: "@bcoe/v8-coverage@npm:0.2.3" @@ -449,6 +709,27 @@ __metadata: languageName: node linkType: hard +"@esbuild-plugins/node-globals-polyfill@npm:^0.1.1": + version: 0.1.1 + resolution: "@esbuild-plugins/node-globals-polyfill@npm:0.1.1" + peerDependencies: + esbuild: "*" + checksum: 68a41e2c377724e9cd46ca344ad219d289cc41a8b273d0d89bbc82bd90025b067b28234a865d8862a3f38c2a028ca4c93138dfca4e1e75e617efc314156c1ce0 + languageName: node + linkType: hard + +"@esbuild-plugins/node-modules-polyfill@npm:^0.1.4": + version: 0.1.4 + resolution: "@esbuild-plugins/node-modules-polyfill@npm:0.1.4" + dependencies: + escape-string-regexp: ^4.0.0 + rollup-plugin-node-polyfills: ^0.2.1 + peerDependencies: + esbuild: "*" + checksum: 39ff2a816139d71ebfbb78914c024565b6026da3146776aa10d27ee1330938ce78c7b2aad11c2d7768c7675d0942d1d1690dabfe60fa79e07dbb31cfbe396cec + languageName: node + linkType: hard + "@esbuild/android-arm@npm:0.15.8": version: 0.15.8 resolution: "@esbuild/android-arm@npm:0.15.8" @@ -735,6 +1016,34 @@ __metadata: languageName: node linkType: hard +"@jridgewell/gen-mapping@npm:^0.1.0": + version: 0.1.1 + resolution: "@jridgewell/gen-mapping@npm:0.1.1" + dependencies: + "@jridgewell/set-array": ^1.0.0 + "@jridgewell/sourcemap-codec": ^1.4.10 + checksum: 3bcc21fe786de6ffbf35c399a174faab05eb23ce6a03e8769569de28abbf4facc2db36a9ddb0150545ae23a8d35a7cf7237b2aa9e9356a7c626fb4698287d5cc + languageName: node + linkType: hard + +"@jridgewell/gen-mapping@npm:^0.3.2": + version: 0.3.2 + resolution: "@jridgewell/gen-mapping@npm:0.3.2" + dependencies: + "@jridgewell/set-array": ^1.0.1 + "@jridgewell/sourcemap-codec": ^1.4.10 + "@jridgewell/trace-mapping": ^0.3.9 + checksum: 1832707a1c476afebe4d0fbbd4b9434fdb51a4c3e009ab1e9938648e21b7a97049fa6009393bdf05cab7504108413441df26d8a3c12193996e65493a4efb6882 + languageName: node + linkType: hard + +"@jridgewell/resolve-uri@npm:3.1.0": + version: 3.1.0 + resolution: "@jridgewell/resolve-uri@npm:3.1.0" + checksum: b5ceaaf9a110fcb2780d1d8f8d4a0bfd216702f31c988d8042e5f8fbe353c55d9b0f55a1733afdc64806f8e79c485d2464680ac48a0d9fcadb9548ee6b81d267 + languageName: node + linkType: hard + "@jridgewell/resolve-uri@npm:^3.0.3": version: 3.0.4 resolution: "@jridgewell/resolve-uri@npm:3.0.4" @@ -742,6 +1051,20 @@ __metadata: languageName: node linkType: hard +"@jridgewell/set-array@npm:^1.0.0, @jridgewell/set-array@npm:^1.0.1": + version: 1.1.2 + resolution: "@jridgewell/set-array@npm:1.1.2" + checksum: 69a84d5980385f396ff60a175f7177af0b8da4ddb81824cb7016a9ef914eee9806c72b6b65942003c63f7983d4f39a5c6c27185bbca88eb4690b62075602e28e + languageName: node + linkType: hard + +"@jridgewell/sourcemap-codec@npm:1.4.14": + version: 1.4.14 + resolution: "@jridgewell/sourcemap-codec@npm:1.4.14" + checksum: 61100637b6d173d3ba786a5dff019e1a74b1f394f323c1fee337ff390239f053b87266c7a948777f4b1ee68c01a8ad0ab61e5ff4abb5a012a0b091bec391ab97 + languageName: node + linkType: hard + "@jridgewell/sourcemap-codec@npm:^1.4.10": version: 1.4.10 resolution: "@jridgewell/sourcemap-codec@npm:1.4.10" @@ -759,6 +1082,16 @@ __metadata: languageName: node linkType: hard +"@jridgewell/trace-mapping@npm:^0.3.9": + version: 0.3.17 + resolution: "@jridgewell/trace-mapping@npm:0.3.17" + dependencies: + "@jridgewell/resolve-uri": 3.1.0 + "@jridgewell/sourcemap-codec": 1.4.14 + checksum: 9d703b859cff5cd83b7308fd457a431387db5db96bd781a63bf48e183418dd9d3d44e76b9e4ae13237f6abeeb25d739ec9215c1d5bfdd08f66f750a50074a339 + languageName: node + linkType: hard + "@next/env@npm:12.3.1": version: 12.3.1 resolution: "@next/env@npm:12.3.1" @@ -873,6 +1206,13 @@ __metadata: languageName: node linkType: hard +"@noble/hashes@npm:1.1.5": + version: 1.1.5 + resolution: "@noble/hashes@npm:1.1.5" + checksum: de3f095a7ac1cbf5b4b3d09f193288d4f2eec35fbadf2ed9fd7e47d8a3042fef410052ba62dc0296a185f994c11192f5357fdb1bd9178c905efd82e946c53b00 + languageName: node + linkType: hard + "@noble/secp256k1@npm:1.7.0": version: 1.7.0 resolution: "@noble/secp256k1@npm:1.7.0" @@ -921,9 +1261,13 @@ __metadata: version: 0.0.0-use.local resolution: "@phala/sdk@workspace:packages/sdk" dependencies: + "@esbuild-plugins/node-globals-polyfill": ^0.1.1 + "@esbuild-plugins/node-modules-polyfill": ^0.1.4 "@phala/typedefs": ^0.2.32 "@polkadot/api": ^9.8.1 + "@polkadot/api-contract": ^9.8.1 "@polkadot/keyring": ^10.1.12 + "@polkadot/typegen": ^9.11.1 "@polkadot/util": ^10.1.12 "@polkadot/util-crypto": ^10.1.12 "@polkadot/wasm-crypto": 6.3.1 @@ -937,6 +1281,7 @@ __metadata: eslint-plugin-prettier: ^4.2.1 protobufjs: ^6.11.3 rxjs: ^7.5.7 + ts-node: ^10.9.1 tsup: ^6.4.0 typescript: ^4.8.4 languageName: unknown @@ -949,6 +1294,21 @@ __metadata: languageName: node linkType: hard +"@polkadot/api-augment@npm:9.11.1": + version: 9.11.1 + resolution: "@polkadot/api-augment@npm:9.11.1" + dependencies: + "@babel/runtime": ^7.20.7 + "@polkadot/api-base": 9.11.1 + "@polkadot/rpc-augment": 9.11.1 + "@polkadot/types": 9.11.1 + "@polkadot/types-augment": 9.11.1 + "@polkadot/types-codec": 9.11.1 + "@polkadot/util": ^10.2.3 + checksum: a296ccbd763ed2479b0310789d9b8ba723806568a7af95122ea87a0003a3c4e60e816441d70cf9d316911c5e80db94c6c639b63a8823e34470409f4d74c5f11f + languageName: node + linkType: hard + "@polkadot/api-augment@npm:9.8.1": version: 9.8.1 resolution: "@polkadot/api-augment@npm:9.8.1" @@ -964,6 +1324,19 @@ __metadata: languageName: node linkType: hard +"@polkadot/api-base@npm:9.11.1": + version: 9.11.1 + resolution: "@polkadot/api-base@npm:9.11.1" + dependencies: + "@babel/runtime": ^7.20.7 + "@polkadot/rpc-core": 9.11.1 + "@polkadot/types": 9.11.1 + "@polkadot/util": ^10.2.3 + rxjs: ^7.8.0 + checksum: b23254f1dfdd62fd226236b6bd0046e5406a132a39a60d3265677422102eac738a7010299d3fcfa70231de8cde8ed9456feb207074c7c3575e14b5cca2c48a3b + languageName: node + linkType: hard + "@polkadot/api-base@npm:9.8.1": version: 9.8.1 resolution: "@polkadot/api-base@npm:9.8.1" @@ -993,6 +1366,24 @@ __metadata: languageName: node linkType: hard +"@polkadot/api-derive@npm:9.11.1": + version: 9.11.1 + resolution: "@polkadot/api-derive@npm:9.11.1" + dependencies: + "@babel/runtime": ^7.20.7 + "@polkadot/api": 9.11.1 + "@polkadot/api-augment": 9.11.1 + "@polkadot/api-base": 9.11.1 + "@polkadot/rpc-core": 9.11.1 + "@polkadot/types": 9.11.1 + "@polkadot/types-codec": 9.11.1 + "@polkadot/util": ^10.2.3 + "@polkadot/util-crypto": ^10.2.3 + rxjs: ^7.8.0 + checksum: f8b04fc67a8261df37ac6cb4a1d6285caddbde27fb68ccb439c8d34ab34ac69b50cdef88b36378cd68441a7acc1b6b8d0c2043fff2c8d04c1da0a19881a9612c + languageName: node + linkType: hard + "@polkadot/api-derive@npm:9.8.1": version: 9.8.1 resolution: "@polkadot/api-derive@npm:9.8.1" @@ -1011,6 +1402,31 @@ __metadata: languageName: node linkType: hard +"@polkadot/api@npm:9.11.1": + version: 9.11.1 + resolution: "@polkadot/api@npm:9.11.1" + dependencies: + "@babel/runtime": ^7.20.7 + "@polkadot/api-augment": 9.11.1 + "@polkadot/api-base": 9.11.1 + "@polkadot/api-derive": 9.11.1 + "@polkadot/keyring": ^10.2.3 + "@polkadot/rpc-augment": 9.11.1 + "@polkadot/rpc-core": 9.11.1 + "@polkadot/rpc-provider": 9.11.1 + "@polkadot/types": 9.11.1 + "@polkadot/types-augment": 9.11.1 + "@polkadot/types-codec": 9.11.1 + "@polkadot/types-create": 9.11.1 + "@polkadot/types-known": 9.11.1 + "@polkadot/util": ^10.2.3 + "@polkadot/util-crypto": ^10.2.3 + eventemitter3: ^4.0.7 + rxjs: ^7.8.0 + checksum: 18b2dd1a69e56e8bb1864f0691d4a4dedfaafa4b5e54eeb76e17b210d4f8c3793bb86569d165217c3595ef076d9084f841ec40e18147d3bfdd479cc5b5e5204c + languageName: node + linkType: hard + "@polkadot/api@npm:9.8.1, @polkadot/api@npm:^9.8.1": version: 9.8.1 resolution: "@polkadot/api@npm:9.8.1" @@ -1096,6 +1512,20 @@ __metadata: languageName: node linkType: hard +"@polkadot/keyring@npm:^10.2.3": + version: 10.2.3 + resolution: "@polkadot/keyring@npm:10.2.3" + dependencies: + "@babel/runtime": ^7.20.7 + "@polkadot/util": 10.2.3 + "@polkadot/util-crypto": 10.2.3 + peerDependencies: + "@polkadot/util": 10.2.3 + "@polkadot/util-crypto": 10.2.3 + checksum: f9f8d30f2a6878075f651fde2e689de1cc7dab537047906ae7169b6758cef7dadb6c0eac7831c27a7243c33e4a951500dc5b4380e1837bedc4e6a8557cfda5fc + languageName: node + linkType: hard + "@polkadot/networks@npm:10.1.11": version: 10.1.11 resolution: "@polkadot/networks@npm:10.1.11" @@ -1118,6 +1548,30 @@ __metadata: languageName: node linkType: hard +"@polkadot/networks@npm:10.2.3, @polkadot/networks@npm:^10.2.3": + version: 10.2.3 + resolution: "@polkadot/networks@npm:10.2.3" + dependencies: + "@babel/runtime": ^7.20.7 + "@polkadot/util": 10.2.3 + "@substrate/ss58-registry": ^1.37.0 + checksum: 0697f6be7449f55d5f980973fb432f08681786c51e2a532f9887b44f9a7c26d5ba3938b2658fa7258027a70f955af7058c6ec9c13b8167257e6e3c565b3c33d5 + languageName: node + linkType: hard + +"@polkadot/rpc-augment@npm:9.11.1": + version: 9.11.1 + resolution: "@polkadot/rpc-augment@npm:9.11.1" + dependencies: + "@babel/runtime": ^7.20.7 + "@polkadot/rpc-core": 9.11.1 + "@polkadot/types": 9.11.1 + "@polkadot/types-codec": 9.11.1 + "@polkadot/util": ^10.2.3 + checksum: 27a13d4730d00798bf52ae99e216591af0cb3b1413a35ea790aa66a19043b85f615ad2d3d333bd5cc23f2975342be53f7288b9d7bef78ebc1d1b91e35fcb09aa + languageName: node + linkType: hard + "@polkadot/rpc-augment@npm:9.8.1": version: 9.8.1 resolution: "@polkadot/rpc-augment@npm:9.8.1" @@ -1131,6 +1585,20 @@ __metadata: languageName: node linkType: hard +"@polkadot/rpc-core@npm:9.11.1": + version: 9.11.1 + resolution: "@polkadot/rpc-core@npm:9.11.1" + dependencies: + "@babel/runtime": ^7.20.7 + "@polkadot/rpc-augment": 9.11.1 + "@polkadot/rpc-provider": 9.11.1 + "@polkadot/types": 9.11.1 + "@polkadot/util": ^10.2.3 + rxjs: ^7.8.0 + checksum: 3446ae5b7ea347bac42e5e173310b9a8ed5eef95aa88ff61edfb09c07e5b1bdef9d90b2d776a4e295d844f78d2c8aa5bafb63d77c423cbd09e53aa35115295c0 + languageName: node + linkType: hard + "@polkadot/rpc-core@npm:9.8.1": version: 9.8.1 resolution: "@polkadot/rpc-core@npm:9.8.1" @@ -1145,6 +1613,30 @@ __metadata: languageName: node linkType: hard +"@polkadot/rpc-provider@npm:9.11.1": + version: 9.11.1 + resolution: "@polkadot/rpc-provider@npm:9.11.1" + dependencies: + "@babel/runtime": ^7.20.7 + "@polkadot/keyring": ^10.2.3 + "@polkadot/types": 9.11.1 + "@polkadot/types-support": 9.11.1 + "@polkadot/util": ^10.2.3 + "@polkadot/util-crypto": ^10.2.3 + "@polkadot/x-fetch": ^10.2.3 + "@polkadot/x-global": ^10.2.3 + "@polkadot/x-ws": ^10.2.3 + "@substrate/connect": 0.7.18 + eventemitter3: ^4.0.7 + mock-socket: ^9.1.5 + nock: ^13.2.9 + dependenciesMeta: + "@substrate/connect": + optional: true + checksum: a8273a9f018138f2bb96fd6381b843f31120974391db0bfbbb02624a71bf2f082bc8afaf12f0628d0f6b71c12e52574722d64046ce3efafb261c7cab0f28b46c + languageName: node + linkType: hard + "@polkadot/rpc-provider@npm:9.8.1": version: 9.8.1 resolution: "@polkadot/rpc-provider@npm:9.8.1" @@ -1187,6 +1679,50 @@ __metadata: languageName: node linkType: hard +"@polkadot/typegen@npm:^9.11.1": + version: 9.11.1 + resolution: "@polkadot/typegen@npm:9.11.1" + dependencies: + "@babel/core": ^7.20.12 + "@babel/register": ^7.18.9 + "@babel/runtime": ^7.20.7 + "@polkadot/api": 9.11.1 + "@polkadot/api-augment": 9.11.1 + "@polkadot/rpc-augment": 9.11.1 + "@polkadot/rpc-provider": 9.11.1 + "@polkadot/types": 9.11.1 + "@polkadot/types-augment": 9.11.1 + "@polkadot/types-codec": 9.11.1 + "@polkadot/types-create": 9.11.1 + "@polkadot/types-support": 9.11.1 + "@polkadot/util": ^10.2.3 + "@polkadot/util-crypto": ^10.2.3 + "@polkadot/x-ws": ^10.2.3 + handlebars: ^4.7.7 + websocket: ^1.0.34 + yargs: ^17.6.2 + bin: + polkadot-types-chain-info: scripts/polkadot-types-chain-info.cjs + polkadot-types-from-chain: scripts/polkadot-types-from-chain.cjs + polkadot-types-from-defs: scripts/polkadot-types-from-defs.cjs + polkadot-types-internal-interfaces: scripts/polkadot-types-internal-interfaces.cjs + polkadot-types-internal-metadata: scripts/polkadot-types-internal-metadata.cjs + checksum: d4cc1abbb62b5e46669d27d2a2b35cf09a0a57a403587de9b66bbf5007a1682046e10eaae3f5300e41c74efd95775365462f4064848986555bb4442cdcbb8355 + languageName: node + linkType: hard + +"@polkadot/types-augment@npm:9.11.1": + version: 9.11.1 + resolution: "@polkadot/types-augment@npm:9.11.1" + dependencies: + "@babel/runtime": ^7.20.7 + "@polkadot/types": 9.11.1 + "@polkadot/types-codec": 9.11.1 + "@polkadot/util": ^10.2.3 + checksum: 55ba5edb217b2dcb73065bd744b7822d98f4aa7b0181cf65b89e506c79eb6d28d4ebd96f97229b6ed54f8fa41aee064d23f91aa6a600370f50f33b9ed3ce60d7 + languageName: node + linkType: hard + "@polkadot/types-augment@npm:9.7.1": version: 9.7.1 resolution: "@polkadot/types-augment@npm:9.7.1" @@ -1211,6 +1747,17 @@ __metadata: languageName: node linkType: hard +"@polkadot/types-codec@npm:9.11.1": + version: 9.11.1 + resolution: "@polkadot/types-codec@npm:9.11.1" + dependencies: + "@babel/runtime": ^7.20.7 + "@polkadot/util": ^10.2.3 + "@polkadot/x-bigint": ^10.2.3 + checksum: aedb21c9f0589374de4361c338a93d297b9021ca0dd7be34f8bc64f09809a3657685dc53ece4e0f663162f94db830b47061c9762a238b7f757c1cf51bbfff254 + languageName: node + linkType: hard + "@polkadot/types-codec@npm:9.7.1": version: 9.7.1 resolution: "@polkadot/types-codec@npm:9.7.1" @@ -1233,6 +1780,17 @@ __metadata: languageName: node linkType: hard +"@polkadot/types-create@npm:9.11.1": + version: 9.11.1 + resolution: "@polkadot/types-create@npm:9.11.1" + dependencies: + "@babel/runtime": ^7.20.7 + "@polkadot/types-codec": 9.11.1 + "@polkadot/util": ^10.2.3 + checksum: 761fe9839bd73d75140489e00dfceb0b816e4bad13db89231fb715488cb27ff48178adffe5169c13ee4c9b088efaf1a433b07fb1641ce680aa54a156b37e9f0f + languageName: node + linkType: hard + "@polkadot/types-create@npm:9.7.1": version: 9.7.1 resolution: "@polkadot/types-create@npm:9.7.1" @@ -1255,6 +1813,20 @@ __metadata: languageName: node linkType: hard +"@polkadot/types-known@npm:9.11.1": + version: 9.11.1 + resolution: "@polkadot/types-known@npm:9.11.1" + dependencies: + "@babel/runtime": ^7.20.7 + "@polkadot/networks": ^10.2.3 + "@polkadot/types": 9.11.1 + "@polkadot/types-codec": 9.11.1 + "@polkadot/types-create": 9.11.1 + "@polkadot/util": ^10.2.3 + checksum: b1708b17f691d88092c107761a61d27e9b1867cb54fb4f911093ca8d56603337d38bd51b9b9fc9622b95fa4b260b09bef638c9b0f108b277a4c3e7589b1a7946 + languageName: node + linkType: hard + "@polkadot/types-known@npm:9.8.1": version: 9.8.1 resolution: "@polkadot/types-known@npm:9.8.1" @@ -1269,6 +1841,16 @@ __metadata: languageName: node linkType: hard +"@polkadot/types-support@npm:9.11.1": + version: 9.11.1 + resolution: "@polkadot/types-support@npm:9.11.1" + dependencies: + "@babel/runtime": ^7.20.7 + "@polkadot/util": ^10.2.3 + checksum: 1b14ed0b5f2a5190a04b19eb94d1eb35a5f08d50ba6c284e4cbf1b94ba15994024b8ace7e71e309dda5d7bea5f2916dcfebf6199d98cadf9ae69ae69f49d9bce + languageName: node + linkType: hard + "@polkadot/types-support@npm:9.7.1": version: 9.7.1 resolution: "@polkadot/types-support@npm:9.7.1" @@ -1289,6 +1871,22 @@ __metadata: languageName: node linkType: hard +"@polkadot/types@npm:9.11.1": + version: 9.11.1 + resolution: "@polkadot/types@npm:9.11.1" + dependencies: + "@babel/runtime": ^7.20.7 + "@polkadot/keyring": ^10.2.3 + "@polkadot/types-augment": 9.11.1 + "@polkadot/types-codec": 9.11.1 + "@polkadot/types-create": 9.11.1 + "@polkadot/util": ^10.2.3 + "@polkadot/util-crypto": ^10.2.3 + rxjs: ^7.8.0 + checksum: 4cb11b7330c50c42c2f819894a459f1a06fb41f284ed3dfb7b08fb667545a995c9f902bd5470f078d969ea1904aee3fd0e5339153c97b6f6483e4b394864feda + languageName: node + linkType: hard + "@polkadot/types@npm:9.7.1, @polkadot/types@npm:^9.2.3": version: 9.7.1 resolution: "@polkadot/types@npm:9.7.1" @@ -1363,6 +1961,27 @@ __metadata: languageName: node linkType: hard +"@polkadot/util-crypto@npm:10.2.3, @polkadot/util-crypto@npm:^10.2.3": + version: 10.2.3 + resolution: "@polkadot/util-crypto@npm:10.2.3" + dependencies: + "@babel/runtime": ^7.20.7 + "@noble/hashes": 1.1.5 + "@noble/secp256k1": 1.7.0 + "@polkadot/networks": 10.2.3 + "@polkadot/util": 10.2.3 + "@polkadot/wasm-crypto": ^6.4.1 + "@polkadot/x-bigint": 10.2.3 + "@polkadot/x-randomvalues": 10.2.3 + "@scure/base": 1.1.1 + ed2curve: ^0.3.0 + tweetnacl: ^1.0.3 + peerDependencies: + "@polkadot/util": 10.2.3 + checksum: 3c672893f8c986fadf15fe6c62a95e422eb789e6abe41950074624452e66e5269b035056d3120783801df56d118f9be80a4e40a583ad398678950ad11d7ee42e + languageName: node + linkType: hard + "@polkadot/util@npm:10.1.11, @polkadot/util@npm:^10.1.11, @polkadot/util@npm:^10.1.5": version: 10.1.11 resolution: "@polkadot/util@npm:10.1.11" @@ -1393,6 +2012,21 @@ __metadata: languageName: node linkType: hard +"@polkadot/util@npm:10.2.3, @polkadot/util@npm:^10.2.3": + version: 10.2.3 + resolution: "@polkadot/util@npm:10.2.3" + dependencies: + "@babel/runtime": ^7.20.7 + "@polkadot/x-bigint": 10.2.3 + "@polkadot/x-global": 10.2.3 + "@polkadot/x-textdecoder": 10.2.3 + "@polkadot/x-textencoder": 10.2.3 + "@types/bn.js": ^5.1.1 + bn.js: ^5.2.1 + checksum: 466ae121352fffc9aad5b5e3f3eea665678fd6b18f864b77545ce54a794f3a1986e861442beb7eb469163c50069fb0b4675228332f24f04e8dc91b3be475afa5 + languageName: node + linkType: hard + "@polkadot/wasm-bridge@npm:6.3.1": version: 6.3.1 resolution: "@polkadot/wasm-bridge@npm:6.3.1" @@ -1405,6 +2039,18 @@ __metadata: languageName: node linkType: hard +"@polkadot/wasm-bridge@npm:6.4.1": + version: 6.4.1 + resolution: "@polkadot/wasm-bridge@npm:6.4.1" + dependencies: + "@babel/runtime": ^7.20.6 + peerDependencies: + "@polkadot/util": "*" + "@polkadot/x-randomvalues": "*" + checksum: 02d9cd1b5c2f6d0261004229751137ef829b38c12e0e844548ef356f9b65dc9a82ec4dcad32f4a156e3c8666b21ef4a8e0c2e5e0e1c51a51a2d7d00373f6f65e + languageName: node + linkType: hard + "@polkadot/wasm-crypto-asmjs@npm:6.3.1": version: 6.3.1 resolution: "@polkadot/wasm-crypto-asmjs@npm:6.3.1" @@ -1416,6 +2062,17 @@ __metadata: languageName: node linkType: hard +"@polkadot/wasm-crypto-asmjs@npm:6.4.1": + version: 6.4.1 + resolution: "@polkadot/wasm-crypto-asmjs@npm:6.4.1" + dependencies: + "@babel/runtime": ^7.20.6 + peerDependencies: + "@polkadot/util": "*" + checksum: 6c2bba5014c373dfc18ec82bb7779141bfaea7d90e3e198fee0bc8ba3078238fee9bf1bb7138a3cbb8b5ad01ade603c44ce838e17940a610fbeec6341a17a0f3 + languageName: node + linkType: hard + "@polkadot/wasm-crypto-init@npm:6.3.1": version: 6.3.1 resolution: "@polkadot/wasm-crypto-init@npm:6.3.1" @@ -1431,6 +2088,21 @@ __metadata: languageName: node linkType: hard +"@polkadot/wasm-crypto-init@npm:6.4.1": + version: 6.4.1 + resolution: "@polkadot/wasm-crypto-init@npm:6.4.1" + dependencies: + "@babel/runtime": ^7.20.6 + "@polkadot/wasm-bridge": 6.4.1 + "@polkadot/wasm-crypto-asmjs": 6.4.1 + "@polkadot/wasm-crypto-wasm": 6.4.1 + peerDependencies: + "@polkadot/util": "*" + "@polkadot/x-randomvalues": "*" + checksum: e1d30cae9588607cbbe35f539df2cb3fca6b69d65ab7907ca24183931953de0e8d7e61be4af7c30a05295a16a1a9255256a6420a049ddf38c155400f91187956 + languageName: node + linkType: hard + "@polkadot/wasm-crypto-wasm@npm:6.3.1": version: 6.3.1 resolution: "@polkadot/wasm-crypto-wasm@npm:6.3.1" @@ -1443,6 +2115,18 @@ __metadata: languageName: node linkType: hard +"@polkadot/wasm-crypto-wasm@npm:6.4.1": + version: 6.4.1 + resolution: "@polkadot/wasm-crypto-wasm@npm:6.4.1" + dependencies: + "@babel/runtime": ^7.20.6 + "@polkadot/wasm-util": 6.4.1 + peerDependencies: + "@polkadot/util": "*" + checksum: 21c72028d2e4333b54fb212980e3dc51827ffaf90364df1932205162859eab9b1be3a7767e1c3c5e8cfcf6ad2bc8cb9dafd3be59ada250b77679fa7ade67c646 + languageName: node + linkType: hard + "@polkadot/wasm-crypto@npm:6.3.1, @polkadot/wasm-crypto@npm:^6.3.1": version: 6.3.1 resolution: "@polkadot/wasm-crypto@npm:6.3.1" @@ -1460,6 +2144,23 @@ __metadata: languageName: node linkType: hard +"@polkadot/wasm-crypto@npm:^6.4.1": + version: 6.4.1 + resolution: "@polkadot/wasm-crypto@npm:6.4.1" + dependencies: + "@babel/runtime": ^7.20.6 + "@polkadot/wasm-bridge": 6.4.1 + "@polkadot/wasm-crypto-asmjs": 6.4.1 + "@polkadot/wasm-crypto-init": 6.4.1 + "@polkadot/wasm-crypto-wasm": 6.4.1 + "@polkadot/wasm-util": 6.4.1 + peerDependencies: + "@polkadot/util": "*" + "@polkadot/x-randomvalues": "*" + checksum: 2892834aa2357e5974257810be625b0f08a35a3ba1def4a87e4989636dc7a43691357fdbfbeab4595eb47cd90177dba3c0ce95e593219db7c488fdf450d86357 + languageName: node + linkType: hard + "@polkadot/wasm-util@npm:6.3.1": version: 6.3.1 resolution: "@polkadot/wasm-util@npm:6.3.1" @@ -1471,6 +2172,17 @@ __metadata: languageName: node linkType: hard +"@polkadot/wasm-util@npm:6.4.1": + version: 6.4.1 + resolution: "@polkadot/wasm-util@npm:6.4.1" + dependencies: + "@babel/runtime": ^7.20.6 + peerDependencies: + "@polkadot/util": "*" + checksum: 6d5ef0aa9af7ca9fe23149793bd1fa9f864b41695b49ab5ae5c23b3ac761c310edf382fe0d0a0d812dc07b10a2d0b056de5750947867a94ab87ab51e176d94b3 + languageName: node + linkType: hard + "@polkadot/x-bigint@npm:10.1.11, @polkadot/x-bigint@npm:^10.1.11": version: 10.1.11 resolution: "@polkadot/x-bigint@npm:10.1.11" @@ -1491,6 +2203,16 @@ __metadata: languageName: node linkType: hard +"@polkadot/x-bigint@npm:10.2.3, @polkadot/x-bigint@npm:^10.2.3": + version: 10.2.3 + resolution: "@polkadot/x-bigint@npm:10.2.3" + dependencies: + "@babel/runtime": ^7.20.7 + "@polkadot/x-global": 10.2.3 + checksum: 08c6c739aae1e597e073b301b2f32c1b2f6ec7d9f7ce056106977da2036a4f167d4276e7ed8a8f10f0753804573b39b365d943941f6902f9c32ebf091be0b725 + languageName: node + linkType: hard + "@polkadot/x-fetch@npm:^10.1.11": version: 10.1.11 resolution: "@polkadot/x-fetch@npm:10.1.11" @@ -1515,6 +2237,18 @@ __metadata: languageName: node linkType: hard +"@polkadot/x-fetch@npm:^10.2.3": + version: 10.2.3 + resolution: "@polkadot/x-fetch@npm:10.2.3" + dependencies: + "@babel/runtime": ^7.20.7 + "@polkadot/x-global": 10.2.3 + "@types/node-fetch": ^2.6.2 + node-fetch: ^3.3.0 + checksum: e5b03392efc2df782c684b4a64bb733ed2d11bfd1a9e47dac3bde6456110743cf4a70718b799eb2be7044c2e963f598e944f98c8dbe4f27e278a2f95dab6aa90 + languageName: node + linkType: hard + "@polkadot/x-global@npm:10.1.11, @polkadot/x-global@npm:^10.1.11, @polkadot/x-global@npm:^10.1.5": version: 10.1.11 resolution: "@polkadot/x-global@npm:10.1.11" @@ -1533,6 +2267,15 @@ __metadata: languageName: node linkType: hard +"@polkadot/x-global@npm:10.2.3, @polkadot/x-global@npm:^10.2.3": + version: 10.2.3 + resolution: "@polkadot/x-global@npm:10.2.3" + dependencies: + "@babel/runtime": ^7.20.7 + checksum: 4bd4d9b3bed8ed9ed1bf7905821b20598b83d5621920bb78d59a618e4f0bb6f0effbe1b4d3d51ee70bc414d6b7c50e470b36276292e3551ff14f82fe07fb77c4 + languageName: node + linkType: hard + "@polkadot/x-randomvalues@npm:10.1.11": version: 10.1.11 resolution: "@polkadot/x-randomvalues@npm:10.1.11" @@ -1553,6 +2296,16 @@ __metadata: languageName: node linkType: hard +"@polkadot/x-randomvalues@npm:10.2.3": + version: 10.2.3 + resolution: "@polkadot/x-randomvalues@npm:10.2.3" + dependencies: + "@babel/runtime": ^7.20.7 + "@polkadot/x-global": 10.2.3 + checksum: a22b9a02609836276d36032445b3c0d17986bd61fa067549319ca4b1ed4b08c748830d88753a5658ed26e17cac8cbec3b81c4e122da7f8e0a0e59597de2a4cf1 + languageName: node + linkType: hard + "@polkadot/x-textdecoder@npm:10.1.11": version: 10.1.11 resolution: "@polkadot/x-textdecoder@npm:10.1.11" @@ -1573,6 +2326,16 @@ __metadata: languageName: node linkType: hard +"@polkadot/x-textdecoder@npm:10.2.3": + version: 10.2.3 + resolution: "@polkadot/x-textdecoder@npm:10.2.3" + dependencies: + "@babel/runtime": ^7.20.7 + "@polkadot/x-global": 10.2.3 + checksum: 0617b756f3d88bf3e31cf52b7080fdd4c62f5c024242d1870c3428dea6906d6d30993b4c7271df886be8ab1370e79b177c59c9c9759e7ce81e3b13309fcc7906 + languageName: node + linkType: hard + "@polkadot/x-textencoder@npm:10.1.11": version: 10.1.11 resolution: "@polkadot/x-textencoder@npm:10.1.11" @@ -1593,6 +2356,16 @@ __metadata: languageName: node linkType: hard +"@polkadot/x-textencoder@npm:10.2.3": + version: 10.2.3 + resolution: "@polkadot/x-textencoder@npm:10.2.3" + dependencies: + "@babel/runtime": ^7.20.7 + "@polkadot/x-global": 10.2.3 + checksum: eb1412fd5d79209bbeda80c758224a0605eb67aecbda412e31a93796e471bf4bd5d0e027b9e8aac881c71ad874ba9239e85465c30d217aa289654112188657ec + languageName: node + linkType: hard + "@polkadot/x-ws@npm:^10.1.11": version: 10.1.11 resolution: "@polkadot/x-ws@npm:10.1.11" @@ -1617,6 +2390,18 @@ __metadata: languageName: node linkType: hard +"@polkadot/x-ws@npm:^10.2.3": + version: 10.2.3 + resolution: "@polkadot/x-ws@npm:10.2.3" + dependencies: + "@babel/runtime": ^7.20.7 + "@polkadot/x-global": 10.2.3 + "@types/websocket": ^1.0.5 + websocket: ^1.0.34 + checksum: 6c3512105296fac47fa3f3fc9098d3b4bd76a2ca976c0c9cba309bd5a9ae426a5ee483dde0fbaa4a98ec73c15e8325bf643ddd984f2b7e59c7bb9f6e6ae9774b + languageName: node + linkType: hard + "@protobufjs/aspromise@npm:^1.1.1, @protobufjs/aspromise@npm:^1.1.2": version: 1.1.2 resolution: "@protobufjs/aspromise@npm:1.1.2" @@ -1747,6 +2532,17 @@ __metadata: languageName: node linkType: hard +"@substrate/connect@npm:0.7.18": + version: 0.7.18 + resolution: "@substrate/connect@npm:0.7.18" + dependencies: + "@substrate/connect-extension-protocol": ^1.0.1 + "@substrate/smoldot-light": 0.7.9 + eventemitter3: ^4.0.7 + checksum: cc3e189d3ceffc30b5a89b4575c76371f7b0dd620180f4846b784a168b459b37bb2017bd273de63a199a2d14cffbeabf67b0c8ae8db0fc7252297c9129902ebc + languageName: node + linkType: hard + "@substrate/smoldot-light@npm:0.7.5": version: 0.7.5 resolution: "@substrate/smoldot-light@npm:0.7.5" @@ -1757,6 +2553,16 @@ __metadata: languageName: node linkType: hard +"@substrate/smoldot-light@npm:0.7.9": + version: 0.7.9 + resolution: "@substrate/smoldot-light@npm:0.7.9" + dependencies: + pako: ^2.0.4 + ws: ^8.8.1 + checksum: d378ab3330734c3efbbba67fdd49e4ecb45e0ae9cd6539090e22718fd06f3eaeadcc520c030c8b16b30745a4a295c0ad406d3c61ddd37c50204722e251fcc6b9 + languageName: node + linkType: hard + "@substrate/ss58-registry@npm:^1.33.0": version: 1.33.0 resolution: "@substrate/ss58-registry@npm:1.33.0" @@ -1771,6 +2577,13 @@ __metadata: languageName: node linkType: hard +"@substrate/ss58-registry@npm:^1.37.0": + version: 1.37.0 + resolution: "@substrate/ss58-registry@npm:1.37.0" + checksum: c70f9109318a53813b75db664bcc10738b407fd5dd9df1e9cb24a49157f6037b67061d9dc81a0174ec9281032277fdf2fef00a16ed8092bd35afa60061e6bfdd + languageName: node + linkType: hard + "@swc/helpers@npm:0.4.11": version: 0.4.11 resolution: "@swc/helpers@npm:0.4.11" @@ -2749,6 +3562,20 @@ __metadata: languageName: node linkType: hard +"browserslist@npm:^4.21.3": + version: 4.21.4 + resolution: "browserslist@npm:4.21.4" + dependencies: + caniuse-lite: ^1.0.30001400 + electron-to-chromium: ^1.4.251 + node-releases: ^2.0.6 + update-browserslist-db: ^1.0.9 + bin: + browserslist: cli.js + checksum: 4af3793704dbb4615bcd29059ab472344dc7961c8680aa6c4bb84f05340e14038d06a5aead58724eae69455b8fade8b8c69f1638016e87e5578969d74c078b79 + languageName: node + linkType: hard + "bs-logger@npm:0.x": version: 0.2.6 resolution: "bs-logger@npm:0.2.6" @@ -2872,6 +3699,13 @@ __metadata: languageName: node linkType: hard +"caniuse-lite@npm:^1.0.30001400": + version: 1.0.30001442 + resolution: "caniuse-lite@npm:1.0.30001442" + checksum: c1bff65bd4f53da2d288e7f55be40706ee0119b983eae5a9dcc884046990476891630aef72d708f7989f8f1964200c44e4c37ea40deecaa2fb4a480df23e6317 + languageName: node + linkType: hard + "card-validator@npm:^6.2.0": version: 6.2.0 resolution: "card-validator@npm:6.2.0" @@ -2977,6 +3811,28 @@ __metadata: languageName: node linkType: hard +"cliui@npm:^8.0.1": + version: 8.0.1 + resolution: "cliui@npm:8.0.1" + dependencies: + string-width: ^4.2.0 + strip-ansi: ^6.0.1 + wrap-ansi: ^7.0.0 + checksum: 79648b3b0045f2e285b76fb2e24e207c6db44323581e421c3acbd0e86454cba1b37aea976ab50195a49e7384b871e6dfb2247ad7dec53c02454ac6497394cb56 + languageName: node + linkType: hard + +"clone-deep@npm:^4.0.1": + version: 4.0.1 + resolution: "clone-deep@npm:4.0.1" + dependencies: + is-plain-object: ^2.0.4 + kind-of: ^6.0.2 + shallow-clone: ^3.0.0 + checksum: 770f912fe4e6f21873c8e8fbb1e99134db3b93da32df271d00589ea4a29dbe83a9808a322c93f3bcaf8584b8b4fa6fc269fc8032efbaa6728e0c9886c74467d2 + languageName: node + linkType: hard + "clsx@npm:^1.0.4": version: 1.1.1 resolution: "clsx@npm:1.1.1" @@ -3060,6 +3916,13 @@ __metadata: languageName: node linkType: hard +"commondir@npm:^1.0.1": + version: 1.0.1 + resolution: "commondir@npm:1.0.1" + checksum: 59715f2fc456a73f68826285718503340b9f0dd89bfffc42749906c5cf3d4277ef11ef1cca0350d0e79204f00f1f6d83851ececc9095dc88512a697ac0b9bdcb + languageName: node + linkType: hard + "concat-map@npm:0.0.1": version: 0.0.1 resolution: "concat-map@npm:0.0.1" @@ -3801,6 +4664,13 @@ __metadata: languageName: node linkType: hard +"electron-to-chromium@npm:^1.4.251": + version: 1.4.284 + resolution: "electron-to-chromium@npm:1.4.284" + checksum: be496e9dca6509dbdbb54dc32146fc99f8eb716d28a7ee8ccd3eba0066561df36fc51418d8bd7cf5a5891810bf56c0def3418e74248f51ea4a843d423603d10a + languageName: node + linkType: hard + "elliptic@npm:^6.5.3": version: 6.5.4 resolution: "elliptic@npm:6.5.4" @@ -4548,6 +5418,13 @@ __metadata: languageName: node linkType: hard +"estree-walker@npm:^0.6.1": + version: 0.6.1 + resolution: "estree-walker@npm:0.6.1" + checksum: 9d6f82a4921f11eec18f8089fb3cce6e53bcf45a8e545c42a2674d02d055fb30f25f90495f8be60803df6c39680c80dcee7f944526867eb7aa1fc9254883b23d + languageName: node + linkType: hard + "esutils@npm:^2.0.2": version: 2.0.3 resolution: "esutils@npm:2.0.3" @@ -4745,6 +5622,17 @@ __metadata: languageName: node linkType: hard +"find-cache-dir@npm:^2.0.0": + version: 2.1.0 + resolution: "find-cache-dir@npm:2.1.0" + dependencies: + commondir: ^1.0.1 + make-dir: ^2.0.0 + pkg-dir: ^3.0.0 + checksum: 60ad475a6da9f257df4e81900f78986ab367d4f65d33cf802c5b91e969c28a8762f098693d7a571b6e4dd4c15166c2da32ae2d18b6766a18e2071079448fdce4 + languageName: node + linkType: hard + "find-up@npm:^2.1.0": version: 2.1.0 resolution: "find-up@npm:2.1.0" @@ -4754,6 +5642,15 @@ __metadata: languageName: node linkType: hard +"find-up@npm:^3.0.0": + version: 3.0.0 + resolution: "find-up@npm:3.0.0" + dependencies: + locate-path: ^3.0.0 + checksum: 38eba3fe7a66e4bc7f0f5a1366dc25508b7cfc349f852640e3678d26ad9a6d7e2c43eff0a472287de4a9753ef58f066a0ea892a256fa3636ad51b3fe1e17fae9 + languageName: node + linkType: hard + "find-up@npm:^4.0.0, find-up@npm:^4.1.0": version: 4.1.0 resolution: "find-up@npm:4.1.0" @@ -5071,6 +5968,24 @@ __metadata: languageName: node linkType: hard +"handlebars@npm:^4.7.7": + version: 4.7.7 + resolution: "handlebars@npm:4.7.7" + dependencies: + minimist: ^1.2.5 + neo-async: ^2.6.0 + source-map: ^0.6.1 + uglify-js: ^3.1.4 + wordwrap: ^1.0.0 + dependenciesMeta: + uglify-js: + optional: true + bin: + handlebars: bin/handlebars + checksum: 1e79a43f5e18d15742977cb987923eab3e2a8f44f2d9d340982bcb69e1735ed049226e534d7c1074eaddaf37e4fb4f471a8adb71cddd5bc8cf3f894241df5cee + languageName: node + linkType: hard + "has-bigints@npm:^1.0.1, has-bigints@npm:^1.0.2": version: 1.0.2 resolution: "has-bigints@npm:1.0.2" @@ -5496,6 +6411,15 @@ __metadata: languageName: node linkType: hard +"is-plain-object@npm:^2.0.4": + version: 2.0.4 + resolution: "is-plain-object@npm:2.0.4" + dependencies: + isobject: ^3.0.1 + checksum: 2a401140cfd86cabe25214956ae2cfee6fbd8186809555cd0e84574f88de7b17abacb2e477a6a658fa54c6083ecbda1e6ae404c7720244cd198903848fca70ca + languageName: node + linkType: hard + "is-potential-custom-element-name@npm:^1.0.1": version: 1.0.1 resolution: "is-potential-custom-element-name@npm:1.0.1" @@ -6305,6 +7229,15 @@ __metadata: languageName: node linkType: hard +"json5@npm:^2.2.2": + version: 2.2.3 + resolution: "json5@npm:2.2.3" + bin: + json5: lib/cli.js + checksum: 2a7436a93393830bce797d4626275152e37e877b265e94ca69c99e3d20c2b9dab021279146a39cdb700e71b2dd32a4cebd1514cd57cee102b1af906ce5040349 + languageName: node + linkType: hard + "jsx-ast-utils@npm:^2.4.1 || ^3.0.0, jsx-ast-utils@npm:^3.2.1": version: 3.2.1 resolution: "jsx-ast-utils@npm:3.2.1" @@ -6322,6 +7255,13 @@ __metadata: languageName: node linkType: hard +"kind-of@npm:^6.0.2": + version: 6.0.3 + resolution: "kind-of@npm:6.0.3" + checksum: 3ab01e7b1d440b22fe4c31f23d8d38b4d9b91d9f291df683476576493d5dfd2e03848a8b05813dd0c3f0e835bc63f433007ddeceb71f05cb25c45ae1b19c6d3b + languageName: node + linkType: hard + "kleur@npm:^3.0.3": version: 3.0.3 resolution: "kleur@npm:3.0.3" @@ -6403,6 +7343,16 @@ __metadata: languageName: node linkType: hard +"locate-path@npm:^3.0.0": + version: 3.0.0 + resolution: "locate-path@npm:3.0.0" + dependencies: + p-locate: ^3.0.0 + path-exists: ^3.0.0 + checksum: 53db3996672f21f8b0bf2a2c645ae2c13ffdae1eeecfcd399a583bce8516c0b88dcb4222ca6efbbbeb6949df7e46860895be2c02e8d3219abd373ace3bfb4e11 + languageName: node + linkType: hard + "locate-path@npm:^5.0.0": version: 5.0.0 resolution: "locate-path@npm:5.0.0" @@ -6467,6 +7417,15 @@ __metadata: languageName: node linkType: hard +"lru-cache@npm:^5.1.1": + version: 5.1.1 + resolution: "lru-cache@npm:5.1.1" + dependencies: + yallist: ^3.0.2 + checksum: c154ae1cbb0c2206d1501a0e94df349653c92c8cbb25236d7e85190bcaf4567a03ac6eb43166fabfa36fd35623694da7233e88d9601fbf411a9a481d85dbd2cb + languageName: node + linkType: hard + "lru-cache@npm:^6.0.0": version: 6.0.0 resolution: "lru-cache@npm:6.0.0" @@ -6476,6 +7435,25 @@ __metadata: languageName: node linkType: hard +"magic-string@npm:^0.25.3": + version: 0.25.9 + resolution: "magic-string@npm:0.25.9" + dependencies: + sourcemap-codec: ^1.4.8 + checksum: 9a0e55a15c7303fc360f9572a71cffba1f61451bc92c5602b1206c9d17f492403bf96f946dfce7483e66822d6b74607262e24392e87b0ac27b786e69a40e9b1a + languageName: node + linkType: hard + +"make-dir@npm:^2.0.0, make-dir@npm:^2.1.0": + version: 2.1.0 + resolution: "make-dir@npm:2.1.0" + dependencies: + pify: ^4.0.1 + semver: ^5.6.0 + checksum: 043548886bfaf1820323c6a2997e6d2fa51ccc2586ac14e6f14634f7458b4db2daf15f8c310e2a0abd3e0cddc64df1890d8fc7263033602c47bb12cbfcf86aab + languageName: node + linkType: hard + "make-dir@npm:^3.0.0": version: 3.1.0 resolution: "make-dir@npm:3.1.0" @@ -6779,6 +7757,13 @@ __metadata: languageName: node linkType: hard +"neo-async@npm:^2.6.0": + version: 2.6.2 + resolution: "neo-async@npm:2.6.2" + checksum: deac9f8d00eda7b2e5cd1b2549e26e10a0faa70adaa6fdadca701cc55f49ee9018e427f424bac0c790b7c7e2d3068db97f3093f1093975f2acb8f8818b936ed9 + languageName: node + linkType: hard + "next-tick@npm:~1.0.0": version: 1.0.0 resolution: "next-tick@npm:1.0.0" @@ -6941,6 +7926,13 @@ __metadata: languageName: node linkType: hard +"node-releases@npm:^2.0.6": + version: 2.0.8 + resolution: "node-releases@npm:2.0.8" + checksum: b1ab02c0d5d8e081bf9537232777a7a787dc8fef07f70feabe70a344599b220fe16462f746ac30f3eed5a58549445ad69368964d12a1f8b3b764f6caab7ba34a + languageName: node + linkType: hard + "nopt@npm:^5.0.0": version: 5.0.0 resolution: "nopt@npm:5.0.0" @@ -7132,7 +8124,7 @@ __metadata: languageName: node linkType: hard -"p-limit@npm:^2.2.0": +"p-limit@npm:^2.0.0, p-limit@npm:^2.2.0": version: 2.3.0 resolution: "p-limit@npm:2.3.0" dependencies: @@ -7159,6 +8151,15 @@ __metadata: languageName: node linkType: hard +"p-locate@npm:^3.0.0": + version: 3.0.0 + resolution: "p-locate@npm:3.0.0" + dependencies: + p-limit: ^2.0.0 + checksum: 83991734a9854a05fe9dbb29f707ea8a0599391f52daac32b86f08e21415e857ffa60f0e120bfe7ce0cc4faf9274a50239c7895fc0d0579d08411e513b83a4ae + languageName: node + linkType: hard + "p-locate@npm:^4.1.0": version: 4.1.0 resolution: "p-locate@npm:4.1.0" @@ -7307,6 +8308,7 @@ __metadata: version: 0.0.0-use.local resolution: "phala-js-sdk@workspace:." dependencies: + "@polkadot/util": ^10.2.3 "@types/jest": ^27.5.2 jest: ^27.5.1 prettier: ^2.7.1 @@ -7330,13 +8332,29 @@ __metadata: languageName: node linkType: hard -"pirates@npm:^4.0.1, pirates@npm:^4.0.4": +"pify@npm:^4.0.1": + version: 4.0.1 + resolution: "pify@npm:4.0.1" + checksum: 9c4e34278cb09987685fa5ef81499c82546c033713518f6441778fbec623fc708777fe8ac633097c72d88470d5963094076c7305cafc7ad340aae27cfacd856b + languageName: node + linkType: hard + +"pirates@npm:^4.0.1, pirates@npm:^4.0.4, pirates@npm:^4.0.5": version: 4.0.5 resolution: "pirates@npm:4.0.5" checksum: c9994e61b85260bec6c4fc0307016340d9b0c4f4b6550a957afaaff0c9b1ad58fbbea5cfcf083860a25cb27a375442e2b0edf52e2e1e40e69934e08dcc52d227 languageName: node linkType: hard +"pkg-dir@npm:^3.0.0": + version: 3.0.0 + resolution: "pkg-dir@npm:3.0.0" + dependencies: + find-up: ^3.0.0 + checksum: 70c9476ffefc77552cc6b1880176b71ad70bfac4f367604b2b04efd19337309a4eec985e94823271c7c0e83946fa5aeb18cd360d15d10a5d7533e19344bfa808 + languageName: node + linkType: hard + "pkg-dir@npm:^4.2.0": version: 4.2.0 resolution: "pkg-dir@npm:4.2.0" @@ -7797,6 +8815,13 @@ __metadata: languageName: node linkType: hard +"regenerator-runtime@npm:^0.13.11": + version: 0.13.11 + resolution: "regenerator-runtime@npm:0.13.11" + checksum: 27481628d22a1c4e3ff551096a683b424242a216fee44685467307f14d58020af1e19660bf2e26064de946bad7eff28950eae9f8209d55723e2d9351e632bbb4 + languageName: node + linkType: hard + "regexp.prototype.flags@npm:^1.4.1, regexp.prototype.flags@npm:^1.4.3": version: 1.4.3 resolution: "regexp.prototype.flags@npm:1.4.3" @@ -7940,6 +8965,35 @@ resolve@^2.0.0-next.3: languageName: node linkType: hard +"rollup-plugin-inject@npm:^3.0.0": + version: 3.0.2 + resolution: "rollup-plugin-inject@npm:3.0.2" + dependencies: + estree-walker: ^0.6.1 + magic-string: ^0.25.3 + rollup-pluginutils: ^2.8.1 + checksum: a014972c80fe34b8c8154056fa2533a8440066a31de831e3793fc21b15d108d92c22d8f7f472397bd5783d7c5e04d8cbf112fb72c5a26e997726e4eb090edad1 + languageName: node + linkType: hard + +"rollup-plugin-node-polyfills@npm:^0.2.1": + version: 0.2.1 + resolution: "rollup-plugin-node-polyfills@npm:0.2.1" + dependencies: + rollup-plugin-inject: ^3.0.0 + checksum: e84645212c443aca3cfae2ba69f01c6d8c5c250f0bf651416b69a4572b60aae9da7cdd687de3ab9b903f7a1ab96b06b71f0c4927d1b02a37485360d2b563937b + languageName: node + linkType: hard + +"rollup-pluginutils@npm:^2.8.1": + version: 2.8.2 + resolution: "rollup-pluginutils@npm:2.8.2" + dependencies: + estree-walker: ^0.6.1 + checksum: 339fdf866d8f4ff6e408fa274c0525412f7edb01dc46b5ccda51f575b7e0d20ad72965773376fb5db95a77a7fcfcab97bf841ec08dbadf5d6b08af02b7a2cf5e + languageName: node + linkType: hard + "rollup@npm:^3.2.5": version: 3.2.5 resolution: "rollup@npm:3.2.5" @@ -7979,6 +9033,15 @@ resolve@^2.0.0-next.3: languageName: node linkType: hard +"rxjs@npm:^7.8.0": + version: 7.8.0 + resolution: "rxjs@npm:7.8.0" + dependencies: + tslib: ^2.1.0 + checksum: 61b4d4fd323c1043d8d6ceb91f24183b28bcf5def4f01ca111511d5c6b66755bc5578587fe714ef5d67cf4c9f2e26f4490d4e1d8cabf9bd5967687835e9866a2 + languageName: node + linkType: hard + "safe-buffer@npm:^5.0.1, safe-buffer@npm:^5.1.0, safe-buffer@npm:^5.1.1, safe-buffer@npm:^5.1.2, safe-buffer@npm:^5.2.0, safe-buffer@npm:~5.2.0": version: 5.2.1 resolution: "safe-buffer@npm:5.2.1" @@ -8030,6 +9093,15 @@ resolve@^2.0.0-next.3: languageName: node linkType: hard +"semver@npm:^5.6.0": + version: 5.7.1 + resolution: "semver@npm:5.7.1" + bin: + semver: ./bin/semver + checksum: 57fd0acfd0bac382ee87cd52cd0aaa5af086a7dc8d60379dfe65fea491fb2489b6016400813930ecd61fd0952dae75c115287a1b16c234b1550887117744dfaf + languageName: node + linkType: hard + "semver@npm:^6.0.0, semver@npm:^6.3.0": version: 6.3.0 resolution: "semver@npm:6.3.0" @@ -8058,6 +9130,15 @@ resolve@^2.0.0-next.3: languageName: node linkType: hard +"shallow-clone@npm:^3.0.0": + version: 3.0.1 + resolution: "shallow-clone@npm:3.0.1" + dependencies: + kind-of: ^6.0.2 + checksum: 39b3dd9630a774aba288a680e7d2901f5c0eae7b8387fc5c8ea559918b29b3da144b7bdb990d7ccd9e11be05508ac9e459ce51d01fd65e583282f6ffafcba2e7 + languageName: node + linkType: hard + "shebang-command@npm:^2.0.0": version: 2.0.0 resolution: "shebang-command@npm:2.0.0" @@ -8141,6 +9222,16 @@ resolve@^2.0.0-next.3: languageName: node linkType: hard +"source-map-support@npm:^0.5.16": + version: 0.5.21 + resolution: "source-map-support@npm:0.5.21" + dependencies: + buffer-from: ^1.0.0 + source-map: ^0.6.0 + checksum: 43e98d700d79af1d36f859bdb7318e601dfc918c7ba2e98456118ebc4c4872b327773e5a1df09b0524e9e5063bb18f0934538eace60cca2710d1fa687645d137 + languageName: node + linkType: hard + "source-map-support@npm:^0.5.6": version: 0.5.19 resolution: "source-map-support@npm:0.5.19" @@ -8181,6 +9272,13 @@ resolve@^2.0.0-next.3: languageName: node linkType: hard +"sourcemap-codec@npm:^1.4.8": + version: 1.4.8 + resolution: "sourcemap-codec@npm:1.4.8" + checksum: b57981c05611afef31605732b598ccf65124a9fcb03b833532659ac4d29ac0f7bfacbc0d6c5a28a03e84c7510e7e556d758d0bb57786e214660016fb94279316 + languageName: node + linkType: hard + "sprintf-js@npm:~1.0.2": version: 1.0.3 resolution: "sprintf-js@npm:1.0.3" @@ -8248,6 +9346,17 @@ resolve@^2.0.0-next.3: languageName: node linkType: hard +"string-width@npm:^4.2.3": + version: 4.2.3 + resolution: "string-width@npm:4.2.3" + dependencies: + emoji-regex: ^8.0.0 + is-fullwidth-code-point: ^3.0.0 + strip-ansi: ^6.0.1 + checksum: e52c10dc3fbfcd6c3a15f159f54a90024241d0f149cf8aed2982a2d801d2e64df0bf1dc351cf8e95c3319323f9f220c16e740b06faecd53e2462df1d2b5443fb + languageName: node + linkType: hard + "string.prototype.matchall@npm:^4.0.7": version: 4.0.7 resolution: "string.prototype.matchall@npm:4.0.7" @@ -8842,6 +9951,15 @@ resolve@^2.0.0-next.3: languageName: node linkType: hard +"uglify-js@npm:^3.1.4": + version: 3.17.4 + resolution: "uglify-js@npm:3.17.4" + bin: + uglifyjs: bin/uglifyjs + checksum: 7b3897df38b6fc7d7d9f4dcd658599d81aa2b1fb0d074829dd4e5290f7318dbca1f4af2f45acb833b95b1fe0ed4698662ab61b87e94328eb4c0a0d3435baf924 + languageName: node + linkType: hard + "unbox-primitive@npm:^1.0.2": version: 1.0.2 resolution: "unbox-primitive@npm:1.0.2" @@ -8879,6 +9997,20 @@ resolve@^2.0.0-next.3: languageName: node linkType: hard +"update-browserslist-db@npm:^1.0.9": + version: 1.0.10 + resolution: "update-browserslist-db@npm:1.0.10" + dependencies: + escalade: ^3.1.1 + picocolors: ^1.0.0 + peerDependencies: + browserslist: ">= 4.21.0" + bin: + browserslist-lint: cli.js + checksum: 12db73b4f63029ac407b153732e7cd69a1ea8206c9100b482b7d12859cd3cd0bc59c602d7ae31e652706189f1acb90d42c53ab24a5ba563ed13aebdddc5561a0 + languageName: node + linkType: hard + "uri-js@npm:^4.2.2": version: 4.4.1 resolution: "uri-js@npm:4.4.1" @@ -9113,6 +10245,13 @@ resolve@^2.0.0-next.3: languageName: node linkType: hard +"wordwrap@npm:^1.0.0": + version: 1.0.0 + resolution: "wordwrap@npm:1.0.0" + checksum: 2a44b2788165d0a3de71fd517d4880a8e20ea3a82c080ce46e294f0b68b69a2e49cff5f99c600e275c698a90d12c5ea32aff06c311f0db2eb3f1201f3e7b2a04 + languageName: node + linkType: hard + "wrap-ansi@npm:^7.0.0": version: 7.0.0 resolution: "wrap-ansi@npm:7.0.0" @@ -9201,6 +10340,13 @@ resolve@^2.0.0-next.3: languageName: node linkType: hard +"yallist@npm:^3.0.2": + version: 3.1.1 + resolution: "yallist@npm:3.1.1" + checksum: 48f7bb00dc19fc635a13a39fe547f527b10c9290e7b3e836b9a8f1ca04d4d342e85714416b3c2ab74949c9c66f9cebb0473e6bc353b79035356103b47641285d + languageName: node + linkType: hard + "yallist@npm:^4.0.0": version: 4.0.0 resolution: "yallist@npm:4.0.0" @@ -9222,6 +10368,13 @@ resolve@^2.0.0-next.3: languageName: node linkType: hard +"yargs-parser@npm:^21.1.1": + version: 21.1.1 + resolution: "yargs-parser@npm:21.1.1" + checksum: ed2d96a616a9e3e1cc7d204c62ecc61f7aaab633dcbfab2c6df50f7f87b393993fe6640d017759fe112d0cb1e0119f2b4150a87305cc873fd90831c6a58ccf1c + languageName: node + linkType: hard + "yargs@npm:^16.2.0": version: 16.2.0 resolution: "yargs@npm:16.2.0" @@ -9237,6 +10390,21 @@ resolve@^2.0.0-next.3: languageName: node linkType: hard +"yargs@npm:^17.6.2": + version: 17.6.2 + resolution: "yargs@npm:17.6.2" + dependencies: + cliui: ^8.0.1 + escalade: ^3.1.1 + get-caller-file: ^2.0.5 + require-directory: ^2.1.1 + string-width: ^4.2.3 + y18n: ^5.0.5 + yargs-parser: ^21.1.1 + checksum: 47da1b0d854fa16d45a3ded57b716b013b2179022352a5f7467409da5a04a1eef5b3b3d97a2dfc13e8bbe5f2ffc0afe3bc6a4a72f8254e60f5a4bd7947138643 + languageName: node + linkType: hard + "yn@npm:3.1.1": version: 3.1.1 resolution: "yn@npm:3.1.1"