From f581b9c8f29bd91041f6b2cae693d077466ca7f5 Mon Sep 17 00:00:00 2001 From: Daniel Chew Date: Fri, 23 May 2025 13:15:11 +0900 Subject: [PATCH 01/27] feat: add initial Lazer integration --- .../packages/xc_admin_common/src/index.ts | 12 +- .../src/programs/core/core_functions.ts | 10 +- .../src/programs/lazer/lazer_functions.ts | 320 +++++++++++++----- .../src/programs/program_registry.ts | 27 +- .../xc_admin_common/src/programs/types.ts | 67 +++- .../components/programs/PythCore.tsx | 5 +- .../components/programs/PythLazer.tsx | 221 ++++++++++-- .../contexts/PythContext.tsx | 26 +- 8 files changed, 536 insertions(+), 152 deletions(-) diff --git a/governance/xc_admin/packages/xc_admin_common/src/index.ts b/governance/xc_admin/packages/xc_admin_common/src/index.ts index 5431b007d3..c6510a312e 100644 --- a/governance/xc_admin/packages/xc_admin_common/src/index.ts +++ b/governance/xc_admin/packages/xc_admin_common/src/index.ts @@ -15,9 +15,9 @@ export * from "./deterministic_stake_accounts"; export * from "./price_store"; export { default as lazerIdl } from "./multisig_transaction/idl/lazer.json"; -export { - ProgramType, - PROGRAM_TYPE_NAMES, +export { ProgramType, PROGRAM_TYPE_NAMES } from "./programs/types"; + +export type { PriceRawConfig, ProductRawConfig, MappingRawConfig, @@ -29,7 +29,13 @@ export { ProgramInstructionAccounts, InstructionAccountsTypeMap, ValidationResult, + LazerState, + LazerFeed, + LazerPublisher, + LazerFeedMetadata, + LazerConfig, } from "./programs/types"; + export { getProgramAddress, isAvailableOnCluster, diff --git a/governance/xc_admin/packages/xc_admin_common/src/programs/core/core_functions.ts b/governance/xc_admin/packages/xc_admin_common/src/programs/core/core_functions.ts index d6795649db..9bb5ae4148 100644 --- a/governance/xc_admin/packages/xc_admin_common/src/programs/core/core_functions.ts +++ b/governance/xc_admin/packages/xc_admin_common/src/programs/core/core_functions.ts @@ -7,7 +7,6 @@ import { import { AccountType, PythCluster, - getPythProgramKeyForCluster, parseBaseData, parseMappingData, parsePermissionData, @@ -34,7 +33,6 @@ import { PriceRawConfig, RawConfig, ValidationResult, - ProgramType, } from "../types"; import { Program } from "@coral-xyz/anchor"; import { PythOracle } from "@pythnetwork/client/lib/anchor"; @@ -103,7 +101,9 @@ const mapValues = ( /** * Sort configuration data for consistent output */ -function sortData(data: DownloadableConfig): DownloadableConfig { +function sortData( + data: Record, +): DownloadableConfig { return mapValues(data, (productData: DownloadableProduct) => ({ address: productData.address, metadata: Object.fromEntries( @@ -306,8 +306,8 @@ export function getDownloadableConfig( * Validate an uploaded configuration against the current configuration */ export function validateUploadedConfig( - existingConfig: DownloadableConfig, - uploadedConfig: DownloadableConfig, + existingConfig: Record, + uploadedConfig: Record, cluster: PythCluster, ): ValidationResult { try { diff --git a/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/lazer_functions.ts b/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/lazer_functions.ts index 54765ae903..39e005be35 100644 --- a/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/lazer_functions.ts +++ b/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/lazer_functions.ts @@ -2,32 +2,11 @@ import { PublicKey, TransactionInstruction } from "@solana/web3.js"; import { PythCluster } from "@pythnetwork/client"; import { ValidationResult, - DownloadableProduct, - DownloadableConfig, ProgramType, + LazerConfig, + LazerState, } from "../types"; -/** - * Program ID for the Pyth Lazer program - */ -export const LAZER_PROGRAM_ID = new PublicKey( - "pytd2yyk641x7ak7mkaasSJVXh6YYZnC7wTmtgAyxPt", -); - -/** - * Lazer-specific configuration type - * TODO: Change to actual Lazer config type - */ -export type LazerConfig = { - programType: ProgramType.PYTH_LAZER; - // Make cluster optional since Lazer might not be tied to a specific cluster - cluster?: PythCluster; - // More generic data source instead of Solana-specific accounts - feeds: LazerFeed[]; - // Additional metadata that might be relevant for Lazer - metadata?: Record; -}; - /** * Parameters for getting Lazer configuration */ @@ -49,15 +28,77 @@ export interface LazerInstructionAccounts { additionalAccounts?: Record; } +// Import the sample state directly +// In a real implementation, this would be fetched from an API +const sampleLazerState: LazerState = { + shardId: 1, + lastSequenceNo: "1234", + lastTimestamp: "2025-05-20T16:54:39.348499000Z", + shardName: "production.tokyo.shard1", + minRate: "0.001000000s", + feeds: [ + { + metadata: { + priceFeedId: 1, + name: "CATCOIN", + symbol: "CAT", + description: "desc1", + assetType: "CRYPTO", + exponent: -9, + minPublishers: 3, + minRate: "0.001000000s", + expiryTime: "5.000000000s", + isActivated: true, + hermesId: "id1", + marketSchedule: "UTC;O,O,O,O,O,O,O;", + }, + }, + { + metadata: { + priceFeedId: 2, + name: "DUCKCOIN", + symbol: "DUCKY", + description: "desc2", + assetType: "FUNDING_RATE", + exponent: -12, + cmcId: 42, + fundingRateInterval: "3600.000000000s", + minPublishers: 9, + minRate: "0.200000000s", + expiryTime: "5.000000000s", + isActivated: false, + quoteCurrency: "USD", + marketSchedule: + "America/New_York;O,1234-1347,0930-2359,C,C,C,O;0412/O,0413/C,0414/1234-1347,1230/0930-2359", + }, + pendingActivation: "2025-05-20T17:54:39.349669000Z", + }, + ], + publishers: [ + { + publisherId: 1, + name: "lazer.binance", + publicKeys: ["obiC8z4ePs9LH9tYSYXTsolVF3sQCZyuSWQ35qVCDVQ="], + isActive: true, + }, + { + publisherId: 2, + name: "jump", + publicKeys: [ + "HhUU1ODk1xHDhUh24Vfb2UBEk7JWrl9dea3OaCNQrQg=", + "X727WKFU9kXaoOGdb/ReqGSe/rKM/kJ7Nm6h+u8oEc4=", + ], + isActive: true, + }, + ], +}; + /** - * Lazer feed configuration - * TODO: Change to actual Lazer feed type + * Program ID for the Pyth Lazer program */ -export type LazerFeed = { - id: string; - metadata: Record; - // Add other feed-specific properties as needed -}; +export const LAZER_PROGRAM_ID = new PublicKey( + "pytd2yyk641x7ak7mkaasSJVXh6YYZnC7wTmtgAyxPt", +); /** * Check if the Pyth Lazer program is available on the specified cluster @@ -84,25 +125,12 @@ export function getConfig(params: LazerConfigParams): LazerConfig { // Extract the properties const { endpoint, network, options } = params; - // Example implementation that would fetch data from a non-Solana source - // For now, return a placeholder with empty feeds - - // In a real implementation, this might: - // 1. Connect to a REST API endpoint - // 2. Query a database - // 3. Read from a file - // 4. Or even call a different blockchain's RPC + // In a real implementation, this would fetch data from an API + // For now, we're using the sample state - // Simulating some async operation return { programType: ProgramType.PYTH_LAZER, - // Include cluster if provided in options - cluster: options?.cluster as PythCluster | undefined, - feeds: [], - metadata: { - source: endpoint ?? "unknown", - network: network ?? "unknown", - }, + state: sampleLazerState, }; } @@ -112,31 +140,9 @@ export function getConfig(params: LazerConfigParams): LazerConfig { * @param config The program's configuration object * @returns Configuration formatted for download */ -export function getDownloadableConfig(config: LazerConfig): DownloadableConfig { - return Object.fromEntries( - config.feeds.map((feed) => [ - feed.id, - { - address: "", - metadata: { - symbol: feed.id, - asset_type: feed.metadata.asset_type?.toString() ?? "", - country: feed.metadata.country?.toString() ?? "", - quote_currency: feed.metadata.quote_currency?.toString() ?? "", - tenor: feed.metadata.tenor?.toString() ?? "", - }, - priceAccounts: [ - { - address: "", - publishers: [], - expo: 0, - minPub: 0, - maxLatency: 0, - }, - ], - }, - ]), - ); +export function getDownloadableConfig(config: LazerConfig): LazerState { + // For Lazer, we just return the state directly as it's already in the correct format + return config.state; } /** @@ -148,12 +154,12 @@ export function getDownloadableConfig(config: LazerConfig): DownloadableConfig { * @returns Object with validation result and optional error message */ export function validateUploadedConfig( - existingConfig: DownloadableConfig, - uploadedConfig: unknown, + existingConfig: LazerState, + uploadedConfig: LazerState, cluster: PythCluster, ): ValidationResult { - // Basic validation logic for Lazer config try { + // Basic type validation if (typeof uploadedConfig !== "object" || uploadedConfig === null) { return { isValid: false, @@ -161,11 +167,130 @@ export function validateUploadedConfig( }; } - // More detailed validation would be implemented here - // For now, return not implemented error + // Cast to LazerState + const uploadedLazerState = uploadedConfig as LazerState; + + // Check for required fields + if ( + !("shardId" in uploadedLazerState) || + !("feeds" in uploadedLazerState) || + !("publishers" in uploadedLazerState) + ) { + return { + isValid: false, + error: "Missing required fields in Lazer configuration", + }; + } + + // Calculate changes between existing and uploaded config + const changes: Record = {}; + + // Compare shard metadata + if ( + existingConfig.shardId !== uploadedLazerState.shardId || + existingConfig.shardName !== uploadedLazerState.shardName || + existingConfig.minRate !== uploadedLazerState.minRate + ) { + changes["shard"] = { + prev: { + shardId: existingConfig.shardId, + shardName: existingConfig.shardName, + minRate: existingConfig.minRate, + }, + new: { + shardId: uploadedLazerState.shardId, + shardName: uploadedLazerState.shardName, + minRate: uploadedLazerState.minRate, + }, + }; + } + + // Compare feeds + const existingFeeds = new Map( + existingConfig.feeds.map((feed) => [feed.metadata.priceFeedId, feed]), + ); + const uploadedFeeds = new Map( + uploadedLazerState.feeds.map((feed) => [feed.metadata.priceFeedId, feed]), + ); + + // Find added, removed, and modified feeds + for (const [id, feed] of existingFeeds.entries()) { + if (!uploadedFeeds.has(id)) { + // Feed was removed + changes[`feed_${id}`] = { + prev: feed, + new: undefined, + }; + } else if ( + JSON.stringify(feed) !== JSON.stringify(uploadedFeeds.get(id)) + ) { + // Feed was modified + changes[`feed_${id}`] = { + prev: feed, + new: uploadedFeeds.get(id), + }; + } + } + + for (const [id, feed] of uploadedFeeds.entries()) { + if (!existingFeeds.has(id)) { + // New feed was added + changes[`feed_${id}`] = { + prev: undefined, + new: feed, + }; + } + } + + // Compare publishers + const existingPublishers = new Map( + existingConfig.publishers.map((pub) => [pub.publisherId, pub]), + ); + const uploadedPublishers = new Map( + uploadedLazerState.publishers.map((pub) => [pub.publisherId, pub]), + ); + + // Find added, removed, and modified publishers + for (const [id, pub] of existingPublishers.entries()) { + if (!uploadedPublishers.has(id)) { + // Publisher was removed + changes[`publisher_${id}`] = { + prev: pub, + new: undefined, + }; + } else if ( + JSON.stringify(pub) !== JSON.stringify(uploadedPublishers.get(id)) + ) { + // Publisher was modified + changes[`publisher_${id}`] = { + prev: pub, + new: uploadedPublishers.get(id), + }; + } + } + + for (const [id, pub] of uploadedPublishers.entries()) { + if (!existingPublishers.has(id)) { + // New publisher was added + changes[`publisher_${id}`] = { + prev: undefined, + new: pub, + }; + } + } + + // If there are no changes, return isValid with no changes + if (Object.keys(changes).length === 0) { + return { + isValid: true, + changes: {}, + }; + } + + // Return successful validation with changes return { - isValid: false, - error: "Uploading configuration for Pyth Lazer is not yet supported", + isValid: true, + changes, }; } catch (error) { return { @@ -188,20 +313,41 @@ export async function generateInstructions( changes: Record< string, { - prev?: Partial; - new?: Partial; + prev?: Partial; + new?: Partial; } >, cluster: PythCluster, accounts: LazerInstructionAccounts, ): Promise { - // Simple placeholder implementation that returns an empty array of instructions - // In a real implementation, this would transform the changes into Lazer-specific instructions + // This is a placeholder implementation that would be replaced with real logic + // In a real implementation, we would: + // 1. Group changes by type (shard metadata, feeds, publishers) + // 2. Generate appropriate instructions for each change type + // 3. If needed, convert to/from Protobuf format + + // For the demo, just log the changes and return an empty array + console.log("Changes to apply:", changes); + console.log("Target cluster:", cluster); + console.log("Instruction accounts:", accounts); - // Example of how this might be implemented: - // 1. For each change, determine if it's an add, update, or delete operation - // 2. Map the DownloadableProduct format to Lazer-specific data structure - // 3. Generate appropriate Lazer instructions based on the operation type + // Mock instruction to show in UI + const mockInstruction = new TransactionInstruction({ + keys: [ + { + pubkey: accounts.fundingAccount, + isSigner: true, + isWritable: true, + }, + { + pubkey: LAZER_PROGRAM_ID, + isSigner: false, + isWritable: false, + }, + ], + programId: LAZER_PROGRAM_ID, + data: Buffer.from("Lazer update instruction placeholder"), + }); - return []; + return [mockInstruction]; } diff --git a/governance/xc_admin/packages/xc_admin_common/src/programs/program_registry.ts b/governance/xc_admin/packages/xc_admin_common/src/programs/program_registry.ts index fba58c4752..1fd8a08353 100644 --- a/governance/xc_admin/packages/xc_admin_common/src/programs/program_registry.ts +++ b/governance/xc_admin/packages/xc_admin_common/src/programs/program_registry.ts @@ -1,22 +1,16 @@ -import { AccountInfo, PublicKey } from "@solana/web3.js"; +import { PublicKey } from "@solana/web3.js"; import { getPythProgramKeyForCluster, PythCluster } from "@pythnetwork/client"; import { DownloadableConfig, ProgramType, ProgramConfig, - ValidationResult, RawConfig, + LazerConfig, } from "./types"; // Import functions from each program implementation import * as pythCore from "./core/core_functions"; import * as pythLazer from "./lazer/lazer_functions"; -import { - LazerConfig, - LAZER_PROGRAM_ID, - LazerConfigParams, -} from "./lazer/lazer_functions"; -import { CoreConfigParams } from "./core/core_functions"; /** * Function to get the program address for each program type @@ -27,7 +21,7 @@ export const getProgramAddress: Record< > = { [ProgramType.PYTH_CORE]: (cluster: PythCluster) => getPythProgramKeyForCluster(cluster), - [ProgramType.PYTH_LAZER]: () => LAZER_PROGRAM_ID, + [ProgramType.PYTH_LAZER]: () => pythLazer.LAZER_PROGRAM_ID, }; /** @@ -45,8 +39,8 @@ export const isAvailableOnCluster: Record< * Function to get configuration for each program type */ export const getConfig: { - [ProgramType.PYTH_CORE]: (params: CoreConfigParams) => RawConfig; - [ProgramType.PYTH_LAZER]: (params: LazerConfigParams) => LazerConfig; + [ProgramType.PYTH_CORE]: (params: pythCore.CoreConfigParams) => RawConfig; + [ProgramType.PYTH_LAZER]: (params: pythLazer.LazerConfigParams) => LazerConfig; } = { [ProgramType.PYTH_CORE]: pythCore.getConfig, [ProgramType.PYTH_LAZER]: pythLazer.getConfig, @@ -62,7 +56,7 @@ export const getDownloadableConfig = ( if ("mappingAccounts" in config) { return pythCore.getDownloadableConfig(config); } else if ( - "feeds" in config && + "state" in config && config.programType === ProgramType.PYTH_LAZER ) { return pythLazer.getDownloadableConfig(config); @@ -75,14 +69,7 @@ export const getDownloadableConfig = ( /** * Function to validate an uploaded configuration against the current configuration */ -export const validateUploadedConfig: Record< - ProgramType, - ( - existingConfig: DownloadableConfig, - uploadedConfig: DownloadableConfig, - cluster: PythCluster, - ) => ValidationResult -> = { +export const validateUploadedConfig = { [ProgramType.PYTH_CORE]: pythCore.validateUploadedConfig, [ProgramType.PYTH_LAZER]: pythLazer.validateUploadedConfig, }; diff --git a/governance/xc_admin/packages/xc_admin_common/src/programs/types.ts b/governance/xc_admin/packages/xc_admin_common/src/programs/types.ts index 72d5d6cbb9..8faf7bc7fc 100644 --- a/governance/xc_admin/packages/xc_admin_common/src/programs/types.ts +++ b/governance/xc_admin/packages/xc_admin_common/src/programs/types.ts @@ -1,6 +1,6 @@ import { PublicKey } from "@solana/web3.js"; import { PermissionData, Product } from "@pythnetwork/client"; -import { LazerConfig, LazerInstructionAccounts } from "./lazer/lazer_functions"; +import { LazerInstructionAccounts } from "./lazer/lazer_functions"; import { CoreInstructionAccounts } from "./core/core_functions"; /** * Represents the different Pyth programs supported by the application. @@ -85,8 +85,9 @@ export type DownloadableProduct = { /** * Type for downloadable configuration + * Can be either a mapping of symbols to products (Core) or a LazerState (Lazer) */ -export type DownloadableConfig = Record; +export type DownloadableConfig = Record | LazerState; /** * Type for configuration that can be either RawConfig for Pyth Core or LazerConfig for Lazer @@ -116,3 +117,65 @@ export interface ValidationResult { error?: string; changes?: any; } + +/** + * Lazer feed metadata type + */ +export type LazerFeedMetadata = { + priceFeedId: number; + name: string; + symbol: string; + description: string; + assetType: string; + exponent: number; + minPublishers: number; + minRate: string; + expiryTime: string; + isActivated: boolean; + hermesId?: string; + cmcId?: number; + fundingRateInterval?: string; + quoteCurrency?: string; + marketSchedule: string; +}; + +/** + * Lazer feed type + */ +export type LazerFeed = { + metadata: LazerFeedMetadata; + pendingActivation?: string; +}; + +/** + * Lazer publisher type + */ +export type LazerPublisher = { + publisherId: number; + name: string; + publicKeys: string[]; + isActive: boolean; +}; + +/** + * Full Lazer state type + */ +export type LazerState = { + shardId: number; + lastSequenceNo: string; + lastTimestamp: string; + shardName: string; + minRate: string; + feeds: LazerFeed[]; + publishers: LazerPublisher[]; +}; + +/** + * Lazer-specific configuration type + */ +export type LazerConfig = { + programType: ProgramType.PYTH_LAZER; + // The Lazer state data + state: LazerState; + +}; diff --git a/governance/xc_admin/packages/xc_admin_frontend/components/programs/PythCore.tsx b/governance/xc_admin/packages/xc_admin_frontend/components/programs/PythCore.tsx index 756fa522fb..c10931349b 100644 --- a/governance/xc_admin/packages/xc_admin_frontend/components/programs/PythCore.tsx +++ b/governance/xc_admin/packages/xc_admin_frontend/components/programs/PythCore.tsx @@ -18,7 +18,6 @@ import { ProgramType, validateUploadedConfig, generateInstructions, - DownloadableConfig, DownloadableProduct, DownloadablePriceAccount, } from '@pythnetwork/xc-admin-common' @@ -375,7 +374,7 @@ interface PythCoreProps { } const PythCore: React.FC = ({ proposerServerUrl }) => { - const [data, setData] = useState({}) + const [data, setData] = useState>({}) const [dataChanges, setDataChanges] = useState>() const [isModalOpen, setIsModalOpen] = useState(false) @@ -400,7 +399,7 @@ const PythCore: React.FC = ({ proposerServerUrl }) => { useEffect(() => { if (!dataIsLoading && rawConfig) { - const downloadableConfig = getDownloadableConfig(rawConfig) + const downloadableConfig = getDownloadableConfig(rawConfig) as Record setData(downloadableConfig) } }, [rawConfig, dataIsLoading, cluster]) diff --git a/governance/xc_admin/packages/xc_admin_frontend/components/programs/PythLazer.tsx b/governance/xc_admin/packages/xc_admin_frontend/components/programs/PythLazer.tsx index 2d3745d5d9..c778f436da 100644 --- a/governance/xc_admin/packages/xc_admin_frontend/components/programs/PythLazer.tsx +++ b/governance/xc_admin/packages/xc_admin_frontend/components/programs/PythLazer.tsx @@ -1,41 +1,200 @@ -import React from 'react' +import React, { useState, useContext } from 'react' +import { usePythContext } from '../../contexts/PythContext' +import { ClusterContext } from '../../contexts/ClusterContext' +import Modal from '../common/Modal' +import { + validateUploadedConfig, + ProgramType, +} from '@pythnetwork/xc-admin-common' +import toast from 'react-hot-toast' +import Loadbar from '../loaders/Loadbar' +import { LazerState } from '@pythnetwork/xc-admin-common/src/programs/types' interface PythLazerProps { - proposerServerUrl: string // kept for consistency with PythCore interface + proposerServerUrl: string +} + +interface ModalContentProps { + changes: Record; + new?: Partial; + }>, + onSendProposal: () => void, + isSendProposalButtonLoading: boolean +} + +const ModalContent: React.FC = ({ + changes, + onSendProposal, + isSendProposalButtonLoading +}) => { + return ( + <> + {Object.keys(changes).length > 0 ? ( + + + {Object.entries(changes).map(([key, change]) => ( + + + + + ))} + +
+ {key} + +
+                    {JSON.stringify(change, null, 2)}
+                  
+
+ ) : ( +

No proposed changes.

+ )} + {Object.keys(changes).length > 0 && ( + + )} + + ) } const PythLazer = ({ - proposerServerUrl: _proposerServerUrl, + proposerServerUrl: _proposerServerUrl }: PythLazerProps) => { + const { dataIsLoading, lazerState } = usePythContext() + const { cluster } = useContext(ClusterContext) + + const [dataChanges, setDataChanges] = useState; new?: Partial }>>() + const [isModalOpen, setIsModalOpen] = useState(false) + const [isSendProposalButtonLoading, setIsSendProposalButtonLoading] = useState(false) + + const openModal = () => { + setIsModalOpen(true) + } + + const closeModal = () => { + setIsModalOpen(false) + } + + const handleDownloadJsonButtonClick = () => { + if (!lazerState) return + + const dataStr = 'data:text/json;charset=utf-8,' + encodeURIComponent(JSON.stringify(lazerState, null, 2)) + const downloadAnchor = document.createElement('a') + downloadAnchor.setAttribute('href', dataStr) + downloadAnchor.setAttribute('download', `lazer_config_${cluster}.json`) + document.body.appendChild(downloadAnchor) // required for firefox + downloadAnchor.click() + downloadAnchor.remove() + } + + const handleUploadJsonButtonClick = () => { + if (!lazerState) { + toast.error('Lazer state not available') + return + } + + const uploadAnchor = document.createElement('input') + uploadAnchor.setAttribute('type', 'file') + uploadAnchor.setAttribute('accept', '.json') + uploadAnchor.addEventListener('change', (e) => { + const file = (e.target as HTMLInputElement).files?.[0] + if (!file) return + + const reader = new FileReader() + reader.onload = (e) => { + if (e.target?.result) { + try { + const uploadedConfig = JSON.parse(e.target.result as string) + const validation = validateUploadedConfig[ProgramType.PYTH_LAZER]( + lazerState, + uploadedConfig, + cluster + ) + + if (!validation.isValid) { + toast.error(validation.error || 'Invalid configuration') + return + } + + setDataChanges(validation.changes) + openModal() + } catch (error) { + if (error instanceof Error) { + toast.error(error.message) + } + } + } + } + reader.readAsText(file) + }) + document.body.appendChild(uploadAnchor) // required for firefox + uploadAnchor.click() + uploadAnchor.remove() + } + + const handleSendProposalButtonClick = async () => { + setIsSendProposalButtonLoading(true) + try { + // In a real implementation, this would send the proposal to the server + await new Promise(resolve => setTimeout(resolve, 2000)) // Mock delay + + // Close the modal and show success notification + setIsModalOpen(false) + toast.success('Proposal sent successfully!') + } catch (error) { + if (error instanceof Error) { + toast.error(error.message) + } + } finally { + setIsSendProposalButtonLoading(false) + } + } + return ( -
-
-
- - - -

- Pyth Lazer is not supported yet -

-
-

- The Pyth Lazer program integration is currently under development. -

-

- Please check back later or switch to Pyth Core using the program - selector above. -

+
+ + } + /> +
+ {dataIsLoading || !lazerState ? ( +
+ +
+ ) : ( +
+
+ +
+
+ +
+
+ )}
) diff --git a/governance/xc_admin/packages/xc_admin_frontend/contexts/PythContext.tsx b/governance/xc_admin/packages/xc_admin_frontend/contexts/PythContext.tsx index 4a1014402e..a192562cfa 100644 --- a/governance/xc_admin/packages/xc_admin_frontend/contexts/PythContext.tsx +++ b/governance/xc_admin/packages/xc_admin_frontend/contexts/PythContext.tsx @@ -11,11 +11,15 @@ import { Connection } from '@solana/web3.js' import { MappingRawConfig, ProductRawConfig, + getConfig, + LazerState, + ProgramType, } from '@pythnetwork/xc-admin-common' type AccountKeyToSymbol = { [key: string]: string } interface PythContextProps { rawConfig: RawConfig + lazerState: LazerState | null dataIsLoading: boolean connection?: Connection priceAccountKeyToSymbolMapping: AccountKeyToSymbol @@ -26,6 +30,7 @@ interface PythContextProps { const PythContext = createContext({ rawConfig: { mappingAccounts: [] }, + lazerState: null, dataIsLoading: true, priceAccountKeyToSymbolMapping: {}, productAccountKeyToSymbolMapping: {}, @@ -46,6 +51,7 @@ export const PythContextProvider: React.FC = ({ multisigSignerKeyToNameMapping, }) => { const { isLoading, connection, rawConfig } = usePyth() + const [lazerState, setLazerState] = useState(null) const [ productAccountKeyToSymbolMapping, setProductAccountKeyToSymbolMapping, @@ -53,8 +59,24 @@ export const PythContextProvider: React.FC = ({ const [priceAccountKeyToSymbolMapping, setPriceAccountKeyToSymbolMapping] = useState({}) + // Fetch Lazer state useEffect(() => { - if (!isLoading) { + const fetchLazerState = async () => { + try { + // Get the Lazer config and transform it to downloadable format + const lazerConfig = getConfig[ProgramType.PYTH_LAZER]({}); + // Since we know this is a LazerState object, we can cast it + setLazerState(lazerConfig.state); + } catch (error) { + console.error("Error fetching Lazer state:", error) + } + } + + fetchLazerState() + }, []) + + useEffect(() => { + if (!isLoading && rawConfig.mappingAccounts) { const productAccountMapping: AccountKeyToSymbol = {} const priceAccountMapping: AccountKeyToSymbol = {} rawConfig.mappingAccounts.map((acc: MappingRawConfig) => @@ -72,6 +94,7 @@ export const PythContextProvider: React.FC = ({ const value = useMemo( () => ({ rawConfig, + lazerState, dataIsLoading: isLoading, connection, priceAccountKeyToSymbolMapping, @@ -81,6 +104,7 @@ export const PythContextProvider: React.FC = ({ }), [ rawConfig, + lazerState, isLoading, connection, publisherKeyToNameMapping, From 206a01b2942c9caad8f9319a90f22a74da4e5285 Mon Sep 17 00:00:00 2001 From: Daniel Chew Date: Fri, 23 May 2025 13:41:43 +0900 Subject: [PATCH 02/27] refactor: improve code formatting and readability in PythCore, PythLazer, and PythContext components --- .../components/programs/PythCore.tsx | 5 ++- .../components/programs/PythLazer.tsx | 36 ++++++++++++------- .../contexts/PythContext.tsx | 6 ++-- 3 files changed, 31 insertions(+), 16 deletions(-) diff --git a/governance/xc_admin/packages/xc_admin_frontend/components/programs/PythCore.tsx b/governance/xc_admin/packages/xc_admin_frontend/components/programs/PythCore.tsx index c10931349b..cd499f6463 100644 --- a/governance/xc_admin/packages/xc_admin_frontend/components/programs/PythCore.tsx +++ b/governance/xc_admin/packages/xc_admin_frontend/components/programs/PythCore.tsx @@ -399,7 +399,10 @@ const PythCore: React.FC = ({ proposerServerUrl }) => { useEffect(() => { if (!dataIsLoading && rawConfig) { - const downloadableConfig = getDownloadableConfig(rawConfig) as Record + const downloadableConfig = getDownloadableConfig(rawConfig) as Record< + string, + DownloadableProduct + > setData(downloadableConfig) } }, [rawConfig, dataIsLoading, cluster]) diff --git a/governance/xc_admin/packages/xc_admin_frontend/components/programs/PythLazer.tsx b/governance/xc_admin/packages/xc_admin_frontend/components/programs/PythLazer.tsx index c778f436da..01ad9e1c19 100644 --- a/governance/xc_admin/packages/xc_admin_frontend/components/programs/PythLazer.tsx +++ b/governance/xc_admin/packages/xc_admin_frontend/components/programs/PythLazer.tsx @@ -15,18 +15,21 @@ interface PythLazerProps { } interface ModalContentProps { - changes: Record; - new?: Partial; - }>, - onSendProposal: () => void, + changes: Record< + string, + { + prev?: Partial + new?: Partial + } + > + onSendProposal: () => void isSendProposalButtonLoading: boolean } const ModalContent: React.FC = ({ changes, onSendProposal, - isSendProposalButtonLoading + isSendProposalButtonLoading, }) => { return ( <> @@ -35,7 +38,10 @@ const ModalContent: React.FC = ({ {Object.entries(changes).map(([key, change]) => ( - + {key} @@ -64,14 +70,18 @@ const ModalContent: React.FC = ({ } const PythLazer = ({ - proposerServerUrl: _proposerServerUrl + proposerServerUrl: _proposerServerUrl, }: PythLazerProps) => { const { dataIsLoading, lazerState } = usePythContext() const { cluster } = useContext(ClusterContext) - const [dataChanges, setDataChanges] = useState; new?: Partial }>>() + const [dataChanges, setDataChanges] = + useState< + Record; new?: Partial }> + >() const [isModalOpen, setIsModalOpen] = useState(false) - const [isSendProposalButtonLoading, setIsSendProposalButtonLoading] = useState(false) + const [isSendProposalButtonLoading, setIsSendProposalButtonLoading] = + useState(false) const openModal = () => { setIsModalOpen(true) @@ -84,7 +94,9 @@ const PythLazer = ({ const handleDownloadJsonButtonClick = () => { if (!lazerState) return - const dataStr = 'data:text/json;charset=utf-8,' + encodeURIComponent(JSON.stringify(lazerState, null, 2)) + const dataStr = + 'data:text/json;charset=utf-8,' + + encodeURIComponent(JSON.stringify(lazerState, null, 2)) const downloadAnchor = document.createElement('a') downloadAnchor.setAttribute('href', dataStr) downloadAnchor.setAttribute('download', `lazer_config_${cluster}.json`) @@ -142,7 +154,7 @@ const PythLazer = ({ setIsSendProposalButtonLoading(true) try { // In a real implementation, this would send the proposal to the server - await new Promise(resolve => setTimeout(resolve, 2000)) // Mock delay + await new Promise((resolve) => setTimeout(resolve, 2000)) // Mock delay // Close the modal and show success notification setIsModalOpen(false) diff --git a/governance/xc_admin/packages/xc_admin_frontend/contexts/PythContext.tsx b/governance/xc_admin/packages/xc_admin_frontend/contexts/PythContext.tsx index a192562cfa..6c1e56d2ed 100644 --- a/governance/xc_admin/packages/xc_admin_frontend/contexts/PythContext.tsx +++ b/governance/xc_admin/packages/xc_admin_frontend/contexts/PythContext.tsx @@ -64,11 +64,11 @@ export const PythContextProvider: React.FC = ({ const fetchLazerState = async () => { try { // Get the Lazer config and transform it to downloadable format - const lazerConfig = getConfig[ProgramType.PYTH_LAZER]({}); + const lazerConfig = getConfig[ProgramType.PYTH_LAZER]({}) // Since we know this is a LazerState object, we can cast it - setLazerState(lazerConfig.state); + setLazerState(lazerConfig.state) } catch (error) { - console.error("Error fetching Lazer state:", error) + console.error('Error fetching Lazer state:', error) } } From 3f3f8902de4ea278d8ed933fdbd89f327bf66270 Mon Sep 17 00:00:00 2001 From: Daniel Chew Date: Fri, 23 May 2025 13:50:57 +0900 Subject: [PATCH 03/27] chore: format --- .../xc_admin_common/src/programs/program_registry.ts | 4 +++- .../xc_admin/packages/xc_admin_common/src/programs/types.ts | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/governance/xc_admin/packages/xc_admin_common/src/programs/program_registry.ts b/governance/xc_admin/packages/xc_admin_common/src/programs/program_registry.ts index 1fd8a08353..75eec98246 100644 --- a/governance/xc_admin/packages/xc_admin_common/src/programs/program_registry.ts +++ b/governance/xc_admin/packages/xc_admin_common/src/programs/program_registry.ts @@ -40,7 +40,9 @@ export const isAvailableOnCluster: Record< */ export const getConfig: { [ProgramType.PYTH_CORE]: (params: pythCore.CoreConfigParams) => RawConfig; - [ProgramType.PYTH_LAZER]: (params: pythLazer.LazerConfigParams) => LazerConfig; + [ProgramType.PYTH_LAZER]: ( + params: pythLazer.LazerConfigParams, + ) => LazerConfig; } = { [ProgramType.PYTH_CORE]: pythCore.getConfig, [ProgramType.PYTH_LAZER]: pythLazer.getConfig, diff --git a/governance/xc_admin/packages/xc_admin_common/src/programs/types.ts b/governance/xc_admin/packages/xc_admin_common/src/programs/types.ts index 8faf7bc7fc..31fc764865 100644 --- a/governance/xc_admin/packages/xc_admin_common/src/programs/types.ts +++ b/governance/xc_admin/packages/xc_admin_common/src/programs/types.ts @@ -87,7 +87,9 @@ export type DownloadableProduct = { * Type for downloadable configuration * Can be either a mapping of symbols to products (Core) or a LazerState (Lazer) */ -export type DownloadableConfig = Record | LazerState; +export type DownloadableConfig = + | Record + | LazerState; /** * Type for configuration that can be either RawConfig for Pyth Core or LazerConfig for Lazer @@ -177,5 +179,4 @@ export type LazerConfig = { programType: ProgramType.PYTH_LAZER; // The Lazer state data state: LazerState; - }; From bc325e1414661be47ea2f52f047a23ceaad7157e Mon Sep 17 00:00:00 2001 From: Daniel Chew Date: Fri, 23 May 2025 14:11:37 +0900 Subject: [PATCH 04/27] feat: enhance proposal modal with detailed change tracking for shards, feeds, and publishers --- .../components/programs/PythLazer.tsx | 287 ++++++++++++++++-- 1 file changed, 266 insertions(+), 21 deletions(-) diff --git a/governance/xc_admin/packages/xc_admin_frontend/components/programs/PythLazer.tsx b/governance/xc_admin/packages/xc_admin_frontend/components/programs/PythLazer.tsx index 01ad9e1c19..55822292e7 100644 --- a/governance/xc_admin/packages/xc_admin_frontend/components/programs/PythLazer.tsx +++ b/governance/xc_admin/packages/xc_admin_frontend/components/programs/PythLazer.tsx @@ -8,12 +8,51 @@ import { } from '@pythnetwork/xc-admin-common' import toast from 'react-hot-toast' import Loadbar from '../loaders/Loadbar' -import { LazerState } from '@pythnetwork/xc-admin-common/src/programs/types' +import Spinner from '../common/Spinner' +import { LazerState, LazerFeed, LazerPublisher } from '@pythnetwork/xc-admin-common/src/programs/types' +import { capitalizeFirstLetter } from '../../utils/capitalizeFirstLetter' interface PythLazerProps { proposerServerUrl: string } +interface ShardChanges { + prev?: { + shardId: number + shardName: string + minRate: string + } + new: { + shardId: number + shardName: string + minRate: string + } +} + +interface FeedChanges { + prev?: LazerFeed + new?: LazerFeed +} + +interface PublisherChanges { + prev?: LazerPublisher + new?: LazerPublisher +} + +interface ShardChangesRowsProps { + changes: ShardChanges +} + +interface FeedChangesRowsProps { + changes: FeedChanges + feedId: string +} + +interface PublisherChangesRowsProps { + changes: PublisherChanges + publisherId: string +} + interface ModalContentProps { changes: Record< string, @@ -26,6 +65,167 @@ interface ModalContentProps { isSendProposalButtonLoading: boolean } +const ShardChangesRows: React.FC = ({ changes }) => { + const isNewShard = !changes.prev && changes.new + + return ( + <> + {Object.entries(changes.new).map(([key, newValue]) => + (isNewShard || (changes.prev && changes.prev[key as keyof typeof changes.prev] !== newValue)) && ( + + + {key + .split(/(?=[A-Z])/) + .join(' ') + .split('_') + .map((word) => capitalizeFirstLetter(word)) + .join(' ')} + + + {!isNewShard && changes.prev ? ( + <> + {String(changes.prev[key as keyof typeof changes.prev])} +
+ + ) : null} + {String(newValue)} + + + ) + )} + + ) +} + +const FeedChangesRows: React.FC = ({ changes, feedId }) => { + const isNewFeed = !changes.prev && changes.new + const isDeletedFeed = changes.prev && !changes.new + + if (isDeletedFeed) { + return ( + + Feed ID + {feedId.replace('feed_', '')} + + ) + } + + if (!changes.new) return null + + const renderMetadataChanges = () => { + if (!changes.new?.metadata) return null + + return Object.entries(changes.new.metadata).map(([key, newValue]) => { + const prevValue = changes.prev?.metadata?.[key as keyof typeof changes.prev.metadata] + const hasChanged = isNewFeed || prevValue !== newValue + + if (!hasChanged) return null + + return ( + + + {key + .split(/(?=[A-Z])/) + .join(' ') + .split('_') + .map((word) => capitalizeFirstLetter(word)) + .join(' ')} + + + {!isNewFeed && prevValue !== undefined ? ( + <> + {String(prevValue)} +
+ + ) : null} + {String(newValue)} + + + ) + }) + } + + const renderPendingActivationChanges = () => { + if (changes.new?.pendingActivation !== undefined || changes.prev?.pendingActivation !== undefined) { + const hasChanged = isNewFeed || changes.prev?.pendingActivation !== changes.new?.pendingActivation + + if (hasChanged) { + return ( + + Pending Activation + + {!isNewFeed && changes.prev?.pendingActivation ? ( + <> + {changes.prev.pendingActivation} +
+ + ) : null} + {changes.new?.pendingActivation || 'None'} + + + ) + } + } + return null + } + + return ( + <> + {renderMetadataChanges()} + {renderPendingActivationChanges()} + + ) +} + +const PublisherChangesRows: React.FC = ({ changes, publisherId }) => { + const isNewPublisher = !changes.prev && changes.new + const isDeletedPublisher = changes.prev && !changes.new + + if (isDeletedPublisher) { + return ( + + Publisher ID + {publisherId.replace('publisher_', '')} + + ) + } + + if (!changes.new) return null + + return ( + <> + {Object.entries(changes.new).map(([key, newValue]) => { + const prevValue = changes.prev?.[key as keyof LazerPublisher] + const hasChanged = isNewPublisher || JSON.stringify(prevValue) !== JSON.stringify(newValue) + + if (!hasChanged) return null + + return ( + + + {key + .split(/(?=[A-Z])/) + .join(' ') + .split('_') + .map((word) => capitalizeFirstLetter(word)) + .join(' ')} + + + {!isNewPublisher && prevValue !== undefined ? ( + <> + {Array.isArray(prevValue) ? prevValue.join(', ') : String(prevValue)} +
+ + ) : null} + {Array.isArray(newValue) ? newValue.join(', ') : String(newValue)} + + + ) + })} + + ) +} + const ModalContent: React.FC = ({ changes, onSendProposal, @@ -35,23 +235,68 @@ const ModalContent: React.FC = ({ <> {Object.keys(changes).length > 0 ? ( - - {Object.entries(changes).map(([key, change]) => ( - - - - - ))} - + {Object.entries(changes).map(([key, change]) => { + const { prev, new: newChanges } = change + const isAddition = !prev && newChanges + const isDeletion = prev && !newChanges + + let title = key + if (key === 'shard') { + title = isAddition ? 'Add New Shard' : isDeletion ? 'Delete Shard' : 'Shard Configuration' + } else if (key.startsWith('feed_')) { + const feedId = key.replace('feed_', '') + title = isAddition ? `Add New Feed (ID: ${feedId})` : isDeletion ? `Delete Feed (ID: ${feedId})` : `Feed ${feedId}` + } else if (key.startsWith('publisher_')) { + const publisherId = key.replace('publisher_', '') + title = isAddition ? `Add New Publisher (ID: ${publisherId})` : isDeletion ? `Delete Publisher (ID: ${publisherId})` : `Publisher ${publisherId}` + } + + return ( + + + + + + {key === 'shard' && newChanges ? ( + + ) : key.startsWith('feed_') ? ( + + ) : key.startsWith('publisher_') ? ( + + ) : null} + + {Object.keys(changes).indexOf(key) !== Object.keys(changes).length - 1 ? ( + + + + ) : null} + + ) + })}
- {key} - -
-                    {JSON.stringify(change, null, 2)}
-                  
-
+ {title} +
+
+
) : (

No proposed changes.

@@ -62,7 +307,7 @@ const ModalContent: React.FC = ({ onClick={onSendProposal} disabled={isSendProposalButtonLoading} > - {isSendProposalButtonLoading ? 'Sending...' : 'Send Proposal'} + {isSendProposalButtonLoading ? : 'Send Proposal'} )} @@ -138,7 +383,7 @@ const PythLazer = ({ openModal() } catch (error) { if (error instanceof Error) { - toast.error(error.message) + toast.error(capitalizeFirstLetter(error.message)) } } } @@ -161,7 +406,7 @@ const PythLazer = ({ toast.success('Proposal sent successfully!') } catch (error) { if (error instanceof Error) { - toast.error(error.message) + toast.error(capitalizeFirstLetter(error.message)) } } finally { setIsSendProposalButtonLoading(false) From bec54695334924dfc12a3602199bd24822f284b7 Mon Sep 17 00:00:00 2001 From: Daniel Chew Date: Fri, 23 May 2025 17:24:39 +0900 Subject: [PATCH 05/27] fix: format --- .../components/programs/PythLazer.tsx | 120 ++++++++++++------ 1 file changed, 83 insertions(+), 37 deletions(-) diff --git a/governance/xc_admin/packages/xc_admin_frontend/components/programs/PythLazer.tsx b/governance/xc_admin/packages/xc_admin_frontend/components/programs/PythLazer.tsx index 55822292e7..c6a6098b4d 100644 --- a/governance/xc_admin/packages/xc_admin_frontend/components/programs/PythLazer.tsx +++ b/governance/xc_admin/packages/xc_admin_frontend/components/programs/PythLazer.tsx @@ -9,7 +9,11 @@ import { import toast from 'react-hot-toast' import Loadbar from '../loaders/Loadbar' import Spinner from '../common/Spinner' -import { LazerState, LazerFeed, LazerPublisher } from '@pythnetwork/xc-admin-common/src/programs/types' +import { + LazerState, + LazerFeed, + LazerPublisher, +} from '@pythnetwork/xc-admin-common/src/programs/types' import { capitalizeFirstLetter } from '../../utils/capitalizeFirstLetter' interface PythLazerProps { @@ -70,34 +74,42 @@ const ShardChangesRows: React.FC = ({ changes }) => { return ( <> - {Object.entries(changes.new).map(([key, newValue]) => - (isNewShard || (changes.prev && changes.prev[key as keyof typeof changes.prev] !== newValue)) && ( - - - {key - .split(/(?=[A-Z])/) - .join(' ') - .split('_') - .map((word) => capitalizeFirstLetter(word)) - .join(' ')} - - - {!isNewShard && changes.prev ? ( - <> - {String(changes.prev[key as keyof typeof changes.prev])} -
- - ) : null} - {String(newValue)} - - - ) + {Object.entries(changes.new).map( + ([key, newValue]) => + (isNewShard || + (changes.prev && + changes.prev[key as keyof typeof changes.prev] !== newValue)) && ( + + + {key + .split(/(?=[A-Z])/) + .join(' ') + .split('_') + .map((word) => capitalizeFirstLetter(word)) + .join(' ')} + + + {!isNewShard && changes.prev ? ( + <> + + {String(changes.prev[key as keyof typeof changes.prev])} + +
+ + ) : null} + {String(newValue)} + + + ) )} ) } -const FeedChangesRows: React.FC = ({ changes, feedId }) => { +const FeedChangesRows: React.FC = ({ + changes, + feedId, +}) => { const isNewFeed = !changes.prev && changes.new const isDeletedFeed = changes.prev && !changes.new @@ -105,7 +117,9 @@ const FeedChangesRows: React.FC = ({ changes, feedId }) => return ( Feed ID - {feedId.replace('feed_', '')} + + {feedId.replace('feed_', '')} + ) } @@ -116,7 +130,8 @@ const FeedChangesRows: React.FC = ({ changes, feedId }) => if (!changes.new?.metadata) return null return Object.entries(changes.new.metadata).map(([key, newValue]) => { - const prevValue = changes.prev?.metadata?.[key as keyof typeof changes.prev.metadata] + const prevValue = + changes.prev?.metadata?.[key as keyof typeof changes.prev.metadata] const hasChanged = isNewFeed || prevValue !== newValue if (!hasChanged) return null @@ -146,13 +161,20 @@ const FeedChangesRows: React.FC = ({ changes, feedId }) => } const renderPendingActivationChanges = () => { - if (changes.new?.pendingActivation !== undefined || changes.prev?.pendingActivation !== undefined) { - const hasChanged = isNewFeed || changes.prev?.pendingActivation !== changes.new?.pendingActivation + if ( + changes.new?.pendingActivation !== undefined || + changes.prev?.pendingActivation !== undefined + ) { + const hasChanged = + isNewFeed || + changes.prev?.pendingActivation !== changes.new?.pendingActivation if (hasChanged) { return ( - Pending Activation + + Pending Activation + {!isNewFeed && changes.prev?.pendingActivation ? ( <> @@ -177,7 +199,10 @@ const FeedChangesRows: React.FC = ({ changes, feedId }) => ) } -const PublisherChangesRows: React.FC = ({ changes, publisherId }) => { +const PublisherChangesRows: React.FC = ({ + changes, + publisherId, +}) => { const isNewPublisher = !changes.prev && changes.new const isDeletedPublisher = changes.prev && !changes.new @@ -185,7 +210,9 @@ const PublisherChangesRows: React.FC = ({ changes, pu return ( Publisher ID - {publisherId.replace('publisher_', '')} + + {publisherId.replace('publisher_', '')} + ) } @@ -196,7 +223,9 @@ const PublisherChangesRows: React.FC = ({ changes, pu <> {Object.entries(changes.new).map(([key, newValue]) => { const prevValue = changes.prev?.[key as keyof LazerPublisher] - const hasChanged = isNewPublisher || JSON.stringify(prevValue) !== JSON.stringify(newValue) + const hasChanged = + isNewPublisher || + JSON.stringify(prevValue) !== JSON.stringify(newValue) if (!hasChanged) return null @@ -213,7 +242,11 @@ const PublisherChangesRows: React.FC = ({ changes, pu {!isNewPublisher && prevValue !== undefined ? ( <> - {Array.isArray(prevValue) ? prevValue.join(', ') : String(prevValue)} + + {Array.isArray(prevValue) + ? prevValue.join(', ') + : String(prevValue)} +
) : null} @@ -242,13 +275,25 @@ const ModalContent: React.FC = ({ let title = key if (key === 'shard') { - title = isAddition ? 'Add New Shard' : isDeletion ? 'Delete Shard' : 'Shard Configuration' + title = isAddition + ? 'Add New Shard' + : isDeletion + ? 'Delete Shard' + : 'Shard Configuration' } else if (key.startsWith('feed_')) { const feedId = key.replace('feed_', '') - title = isAddition ? `Add New Feed (ID: ${feedId})` : isDeletion ? `Delete Feed (ID: ${feedId})` : `Feed ${feedId}` + title = isAddition + ? `Add New Feed (ID: ${feedId})` + : isDeletion + ? `Delete Feed (ID: ${feedId})` + : `Feed ${feedId}` } else if (key.startsWith('publisher_')) { const publisherId = key.replace('publisher_', '') - title = isAddition ? `Add New Publisher (ID: ${publisherId})` : isDeletion ? `Delete Publisher (ID: ${publisherId})` : `Publisher ${publisherId}` + title = isAddition + ? `Add New Publisher (ID: ${publisherId})` + : isDeletion + ? `Delete Publisher (ID: ${publisherId})` + : `Publisher ${publisherId}` } return ( @@ -287,7 +332,8 @@ const ModalContent: React.FC = ({ /> ) : null} - {Object.keys(changes).indexOf(key) !== Object.keys(changes).length - 1 ? ( + {Object.keys(changes).indexOf(key) !== + Object.keys(changes).length - 1 ? (
From 5c8d566af7bbbda309aeed24326577ab6cc65c1b Mon Sep 17 00:00:00 2001 From: Daniel Chew Date: Fri, 23 May 2025 19:17:43 +0900 Subject: [PATCH 06/27] refactor: revert placeholder implementation in generateInstructions --- .../src/programs/lazer/lazer_functions.ts | 35 ++++--------------- 1 file changed, 7 insertions(+), 28 deletions(-) diff --git a/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/lazer_functions.ts b/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/lazer_functions.ts index 39e005be35..e73564a47d 100644 --- a/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/lazer_functions.ts +++ b/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/lazer_functions.ts @@ -320,34 +320,13 @@ export async function generateInstructions( cluster: PythCluster, accounts: LazerInstructionAccounts, ): Promise { - // This is a placeholder implementation that would be replaced with real logic - // In a real implementation, we would: - // 1. Group changes by type (shard metadata, feeds, publishers) - // 2. Generate appropriate instructions for each change type - // 3. If needed, convert to/from Protobuf format + // Simple placeholder implementation that returns an empty array of instructions + // In a real implementation, this would transform the changes into Lazer-specific instructions - // For the demo, just log the changes and return an empty array - console.log("Changes to apply:", changes); - console.log("Target cluster:", cluster); - console.log("Instruction accounts:", accounts); + // Example of how this might be implemented: + // 1. For each change, determine if it's an add, update, or delete operation + // 2. Map the DownloadableProduct format to Lazer-specific data structure + // 3. Generate appropriate Lazer instructions based on the operation type - // Mock instruction to show in UI - const mockInstruction = new TransactionInstruction({ - keys: [ - { - pubkey: accounts.fundingAccount, - isSigner: true, - isWritable: true, - }, - { - pubkey: LAZER_PROGRAM_ID, - isSigner: false, - isWritable: false, - }, - ], - programId: LAZER_PROGRAM_ID, - data: Buffer.from("Lazer update instruction placeholder"), - }); - - return [mockInstruction]; + return []; } From 76c6620b646f8a61849ca793a28de9c5f30207d8 Mon Sep 17 00:00:00 2001 From: Daniel Chew Date: Mon, 26 May 2025 11:15:41 +0900 Subject: [PATCH 07/27] feat: add governance payload functions for managing feeds and publishers --- .../packages/xc_admin_common/package.json | 4 +- .../generated/governance_instruction.d.ts | 3819 ++++++ .../lazer/generated/governance_instruction.js | 10022 ++++++++++++++++ .../lazer/governance_payload/AddFeed.ts | 46 + .../lazer/governance_payload/AddPublisher.ts | 48 + .../lazer/governance_payload/UpdateFeed.ts | 71 + .../governance_payload/UpdatePublisher.ts | 95 + .../lazer/governance_payload/index.ts | 131 + .../lazer/governance_payload/proto_utils.ts | 22 + .../src/programs/lazer/lazer_functions.ts | 87 +- pnpm-lock.yaml | 234 +- 11 files changed, 14550 insertions(+), 29 deletions(-) create mode 100644 governance/xc_admin/packages/xc_admin_common/src/programs/lazer/generated/governance_instruction.d.ts create mode 100644 governance/xc_admin/packages/xc_admin_common/src/programs/lazer/generated/governance_instruction.js create mode 100644 governance/xc_admin/packages/xc_admin_common/src/programs/lazer/governance_payload/AddFeed.ts create mode 100644 governance/xc_admin/packages/xc_admin_common/src/programs/lazer/governance_payload/AddPublisher.ts create mode 100644 governance/xc_admin/packages/xc_admin_common/src/programs/lazer/governance_payload/UpdateFeed.ts create mode 100644 governance/xc_admin/packages/xc_admin_common/src/programs/lazer/governance_payload/UpdatePublisher.ts create mode 100644 governance/xc_admin/packages/xc_admin_common/src/programs/lazer/governance_payload/index.ts create mode 100644 governance/xc_admin/packages/xc_admin_common/src/programs/lazer/governance_payload/proto_utils.ts diff --git a/governance/xc_admin/packages/xc_admin_common/package.json b/governance/xc_admin/packages/xc_admin_common/package.json index 1669fbb859..aae1e08f01 100644 --- a/governance/xc_admin/packages/xc_admin_common/package.json +++ b/governance/xc_admin/packages/xc_admin_common/package.json @@ -15,7 +15,8 @@ "url": "https://github.com/pyth-network/pyth-crosschain/issues" }, "scripts": { - "build": "tsc", + "build": "npm run build:proto && tsc", + "build:proto": "pbjs -t static-module -w es6 -o src/programs/lazer/generated/governance_instruction.js ../../../../lazer/publisher_sdk/proto/governance_instruction.proto ../../../../lazer/publisher_sdk/proto/dynamic_value.proto && pbts -o src/programs/lazer/generated/governance_instruction.d.ts src/programs/lazer/generated/governance_instruction.js", "test:unit": "jest", "fix:format": "prettier --write \"src/**/*.ts\"", "test:format": "prettier --check \"src/**/*.ts\"" @@ -51,6 +52,7 @@ "fast-check": "^3.10.0", "jest": "^29.3.1", "prettier": "catalog:", + "protobufjs-cli": "^1.1.3", "ts-jest": "^29.0.3" } } diff --git a/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/generated/governance_instruction.d.ts b/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/generated/governance_instruction.d.ts new file mode 100644 index 0000000000..69485186c0 --- /dev/null +++ b/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/generated/governance_instruction.d.ts @@ -0,0 +1,3819 @@ +import * as $protobuf from "protobufjs"; +import Long = require("long"); +/** Namespace pyth_lazer_transaction. */ +export namespace pyth_lazer_transaction { + + /** Properties of a GovernanceInstruction. */ + interface IGovernanceInstruction { + + /** GovernanceInstruction source */ + source?: (pyth_lazer_transaction.IGovernanceSource|null); + + /** GovernanceInstruction directives */ + directives?: (pyth_lazer_transaction.IGovernanceDirective[]|null); + + /** GovernanceInstruction minExecutionTimestamp */ + minExecutionTimestamp?: (google.protobuf.ITimestamp|null); + + /** GovernanceInstruction maxExecutionTimestamp */ + maxExecutionTimestamp?: (google.protobuf.ITimestamp|null); + + /** GovernanceInstruction governanceSequenceNo */ + governanceSequenceNo?: (number|null); + } + + /** Represents a GovernanceInstruction. */ + class GovernanceInstruction implements IGovernanceInstruction { + + /** + * Constructs a new GovernanceInstruction. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IGovernanceInstruction); + + /** GovernanceInstruction source. */ + public source?: (pyth_lazer_transaction.IGovernanceSource|null); + + /** GovernanceInstruction directives. */ + public directives: pyth_lazer_transaction.IGovernanceDirective[]; + + /** GovernanceInstruction minExecutionTimestamp. */ + public minExecutionTimestamp?: (google.protobuf.ITimestamp|null); + + /** GovernanceInstruction maxExecutionTimestamp. */ + public maxExecutionTimestamp?: (google.protobuf.ITimestamp|null); + + /** GovernanceInstruction governanceSequenceNo. */ + public governanceSequenceNo?: (number|null); + + /** GovernanceInstruction _source. */ + public _source?: "source"; + + /** GovernanceInstruction _minExecutionTimestamp. */ + public _minExecutionTimestamp?: "minExecutionTimestamp"; + + /** GovernanceInstruction _maxExecutionTimestamp. */ + public _maxExecutionTimestamp?: "maxExecutionTimestamp"; + + /** GovernanceInstruction _governanceSequenceNo. */ + public _governanceSequenceNo?: "governanceSequenceNo"; + + /** + * Creates a new GovernanceInstruction instance using the specified properties. + * @param [properties] Properties to set + * @returns GovernanceInstruction instance + */ + public static create(properties?: pyth_lazer_transaction.IGovernanceInstruction): pyth_lazer_transaction.GovernanceInstruction; + + /** + * Encodes the specified GovernanceInstruction message. Does not implicitly {@link pyth_lazer_transaction.GovernanceInstruction.verify|verify} messages. + * @param message GovernanceInstruction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IGovernanceInstruction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GovernanceInstruction message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceInstruction.verify|verify} messages. + * @param message GovernanceInstruction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IGovernanceInstruction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GovernanceInstruction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GovernanceInstruction + * @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): pyth_lazer_transaction.GovernanceInstruction; + + /** + * Decodes a GovernanceInstruction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GovernanceInstruction + * @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)): pyth_lazer_transaction.GovernanceInstruction; + + /** + * Verifies a GovernanceInstruction 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 GovernanceInstruction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GovernanceInstruction + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.GovernanceInstruction; + + /** + * Creates a plain object from a GovernanceInstruction message. Also converts values to other types if specified. + * @param message GovernanceInstruction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.GovernanceInstruction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GovernanceInstruction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GovernanceInstruction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ShardFilter. */ + interface IShardFilter { + + /** ShardFilter allShards */ + allShards?: (google.protobuf.IEmpty|null); + + /** ShardFilter shardNames */ + shardNames?: (pyth_lazer_transaction.ShardFilter.IShardNames|null); + + /** ShardFilter shardGroups */ + shardGroups?: (pyth_lazer_transaction.ShardFilter.IShardGroups|null); + } + + /** Represents a ShardFilter. */ + class ShardFilter implements IShardFilter { + + /** + * Constructs a new ShardFilter. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IShardFilter); + + /** ShardFilter allShards. */ + public allShards?: (google.protobuf.IEmpty|null); + + /** ShardFilter shardNames. */ + public shardNames?: (pyth_lazer_transaction.ShardFilter.IShardNames|null); + + /** ShardFilter shardGroups. */ + public shardGroups?: (pyth_lazer_transaction.ShardFilter.IShardGroups|null); + + /** ShardFilter filter. */ + public filter?: ("allShards"|"shardNames"|"shardGroups"); + + /** + * Creates a new ShardFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns ShardFilter instance + */ + public static create(properties?: pyth_lazer_transaction.IShardFilter): pyth_lazer_transaction.ShardFilter; + + /** + * Encodes the specified ShardFilter message. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.verify|verify} messages. + * @param message ShardFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IShardFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ShardFilter message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.verify|verify} messages. + * @param message ShardFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IShardFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ShardFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ShardFilter + * @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): pyth_lazer_transaction.ShardFilter; + + /** + * Decodes a ShardFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ShardFilter + * @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)): pyth_lazer_transaction.ShardFilter; + + /** + * Verifies a ShardFilter 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 ShardFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ShardFilter + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.ShardFilter; + + /** + * Creates a plain object from a ShardFilter message. Also converts values to other types if specified. + * @param message ShardFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.ShardFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ShardFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ShardFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ShardFilter { + + /** Properties of a ShardNames. */ + interface IShardNames { + + /** ShardNames shardNames */ + shardNames?: (string[]|null); + } + + /** Represents a ShardNames. */ + class ShardNames implements IShardNames { + + /** + * Constructs a new ShardNames. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ShardFilter.IShardNames); + + /** ShardNames shardNames. */ + public shardNames: string[]; + + /** + * Creates a new ShardNames instance using the specified properties. + * @param [properties] Properties to set + * @returns ShardNames instance + */ + public static create(properties?: pyth_lazer_transaction.ShardFilter.IShardNames): pyth_lazer_transaction.ShardFilter.ShardNames; + + /** + * Encodes the specified ShardNames message. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardNames.verify|verify} messages. + * @param message ShardNames message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.ShardFilter.IShardNames, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ShardNames message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardNames.verify|verify} messages. + * @param message ShardNames message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.ShardFilter.IShardNames, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ShardNames message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ShardNames + * @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): pyth_lazer_transaction.ShardFilter.ShardNames; + + /** + * Decodes a ShardNames message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ShardNames + * @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)): pyth_lazer_transaction.ShardFilter.ShardNames; + + /** + * Verifies a ShardNames 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 ShardNames message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ShardNames + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.ShardFilter.ShardNames; + + /** + * Creates a plain object from a ShardNames message. Also converts values to other types if specified. + * @param message ShardNames + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.ShardFilter.ShardNames, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ShardNames to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ShardNames + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ShardGroups. */ + interface IShardGroups { + + /** ShardGroups shardGroups */ + shardGroups?: (string[]|null); + } + + /** Represents a ShardGroups. */ + class ShardGroups implements IShardGroups { + + /** + * Constructs a new ShardGroups. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ShardFilter.IShardGroups); + + /** ShardGroups shardGroups. */ + public shardGroups: string[]; + + /** + * Creates a new ShardGroups instance using the specified properties. + * @param [properties] Properties to set + * @returns ShardGroups instance + */ + public static create(properties?: pyth_lazer_transaction.ShardFilter.IShardGroups): pyth_lazer_transaction.ShardFilter.ShardGroups; + + /** + * Encodes the specified ShardGroups message. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardGroups.verify|verify} messages. + * @param message ShardGroups message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.ShardFilter.IShardGroups, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ShardGroups message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardGroups.verify|verify} messages. + * @param message ShardGroups message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.ShardFilter.IShardGroups, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ShardGroups message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ShardGroups + * @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): pyth_lazer_transaction.ShardFilter.ShardGroups; + + /** + * Decodes a ShardGroups message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ShardGroups + * @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)): pyth_lazer_transaction.ShardFilter.ShardGroups; + + /** + * Verifies a ShardGroups 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 ShardGroups message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ShardGroups + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.ShardFilter.ShardGroups; + + /** + * Creates a plain object from a ShardGroups message. Also converts values to other types if specified. + * @param message ShardGroups + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.ShardFilter.ShardGroups, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ShardGroups to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ShardGroups + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a GovernanceDirective. */ + interface IGovernanceDirective { + + /** GovernanceDirective shardFilter */ + shardFilter?: (pyth_lazer_transaction.IShardFilter|null); + + /** GovernanceDirective createShard */ + createShard?: (pyth_lazer_transaction.ICreateShard|null); + + /** GovernanceDirective addGovernanceSource */ + addGovernanceSource?: (pyth_lazer_transaction.IAddGovernanceSource|null); + + /** GovernanceDirective updateGovernanceSource */ + updateGovernanceSource?: (pyth_lazer_transaction.IUpdateGovernanceSource|null); + + /** GovernanceDirective setShardName */ + setShardName?: (pyth_lazer_transaction.ISetShardName|null); + + /** GovernanceDirective setShardGroup */ + setShardGroup?: (pyth_lazer_transaction.ISetShardGroup|null); + + /** GovernanceDirective resetLastSequenceNo */ + resetLastSequenceNo?: (pyth_lazer_transaction.IResetLastSequenceNo|null); + + /** GovernanceDirective addPublisher */ + addPublisher?: (pyth_lazer_transaction.IAddPublisher|null); + + /** GovernanceDirective updatePublisher */ + updatePublisher?: (pyth_lazer_transaction.IUpdatePublisher|null); + + /** GovernanceDirective addFeed */ + addFeed?: (pyth_lazer_transaction.IAddFeed|null); + + /** GovernanceDirective updateFeed */ + updateFeed?: (pyth_lazer_transaction.IUpdateFeed|null); + } + + /** Represents a GovernanceDirective. */ + class GovernanceDirective implements IGovernanceDirective { + + /** + * Constructs a new GovernanceDirective. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IGovernanceDirective); + + /** GovernanceDirective shardFilter. */ + public shardFilter?: (pyth_lazer_transaction.IShardFilter|null); + + /** GovernanceDirective createShard. */ + public createShard?: (pyth_lazer_transaction.ICreateShard|null); + + /** GovernanceDirective addGovernanceSource. */ + public addGovernanceSource?: (pyth_lazer_transaction.IAddGovernanceSource|null); + + /** GovernanceDirective updateGovernanceSource. */ + public updateGovernanceSource?: (pyth_lazer_transaction.IUpdateGovernanceSource|null); + + /** GovernanceDirective setShardName. */ + public setShardName?: (pyth_lazer_transaction.ISetShardName|null); + + /** GovernanceDirective setShardGroup. */ + public setShardGroup?: (pyth_lazer_transaction.ISetShardGroup|null); + + /** GovernanceDirective resetLastSequenceNo. */ + public resetLastSequenceNo?: (pyth_lazer_transaction.IResetLastSequenceNo|null); + + /** GovernanceDirective addPublisher. */ + public addPublisher?: (pyth_lazer_transaction.IAddPublisher|null); + + /** GovernanceDirective updatePublisher. */ + public updatePublisher?: (pyth_lazer_transaction.IUpdatePublisher|null); + + /** GovernanceDirective addFeed. */ + public addFeed?: (pyth_lazer_transaction.IAddFeed|null); + + /** GovernanceDirective updateFeed. */ + public updateFeed?: (pyth_lazer_transaction.IUpdateFeed|null); + + /** GovernanceDirective _shardFilter. */ + public _shardFilter?: "shardFilter"; + + /** GovernanceDirective action. */ + public action?: ("createShard"|"addGovernanceSource"|"updateGovernanceSource"|"setShardName"|"setShardGroup"|"resetLastSequenceNo"|"addPublisher"|"updatePublisher"|"addFeed"|"updateFeed"); + + /** + * Creates a new GovernanceDirective instance using the specified properties. + * @param [properties] Properties to set + * @returns GovernanceDirective instance + */ + public static create(properties?: pyth_lazer_transaction.IGovernanceDirective): pyth_lazer_transaction.GovernanceDirective; + + /** + * Encodes the specified GovernanceDirective message. Does not implicitly {@link pyth_lazer_transaction.GovernanceDirective.verify|verify} messages. + * @param message GovernanceDirective message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IGovernanceDirective, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GovernanceDirective message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceDirective.verify|verify} messages. + * @param message GovernanceDirective message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IGovernanceDirective, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GovernanceDirective message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GovernanceDirective + * @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): pyth_lazer_transaction.GovernanceDirective; + + /** + * Decodes a GovernanceDirective message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GovernanceDirective + * @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)): pyth_lazer_transaction.GovernanceDirective; + + /** + * Verifies a GovernanceDirective 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 GovernanceDirective message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GovernanceDirective + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.GovernanceDirective; + + /** + * Creates a plain object from a GovernanceDirective message. Also converts values to other types if specified. + * @param message GovernanceDirective + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.GovernanceDirective, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GovernanceDirective to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GovernanceDirective + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Permissions. */ + interface IPermissions { + + /** Permissions allActions */ + allActions?: (boolean|null); + + /** Permissions shardActions */ + shardActions?: (pyth_lazer_transaction.Permissions.ShardAction[]|null); + + /** Permissions allUpdateGovernanceSourceActions */ + allUpdateGovernanceSourceActions?: (boolean|null); + + /** Permissions updateGovernanceSourceActions */ + updateGovernanceSourceActions?: (pyth_lazer_transaction.Permissions.UpdateGovernanceSourceAction[]|null); + + /** Permissions allUpdatePublisherAction */ + allUpdatePublisherAction?: (boolean|null); + + /** Permissions updatePublisherActions */ + updatePublisherActions?: (pyth_lazer_transaction.Permissions.UpdatePublisherAction[]|null); + + /** Permissions allUpdateFeedActions */ + allUpdateFeedActions?: (boolean|null); + + /** Permissions updateFeedActions */ + updateFeedActions?: (pyth_lazer_transaction.Permissions.UpdateFeedAction[]|null); + } + + /** Represents a Permissions. */ + class Permissions implements IPermissions { + + /** + * Constructs a new Permissions. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IPermissions); + + /** Permissions allActions. */ + public allActions?: (boolean|null); + + /** Permissions shardActions. */ + public shardActions: pyth_lazer_transaction.Permissions.ShardAction[]; + + /** Permissions allUpdateGovernanceSourceActions. */ + public allUpdateGovernanceSourceActions?: (boolean|null); + + /** Permissions updateGovernanceSourceActions. */ + public updateGovernanceSourceActions: pyth_lazer_transaction.Permissions.UpdateGovernanceSourceAction[]; + + /** Permissions allUpdatePublisherAction. */ + public allUpdatePublisherAction?: (boolean|null); + + /** Permissions updatePublisherActions. */ + public updatePublisherActions: pyth_lazer_transaction.Permissions.UpdatePublisherAction[]; + + /** Permissions allUpdateFeedActions. */ + public allUpdateFeedActions?: (boolean|null); + + /** Permissions updateFeedActions. */ + public updateFeedActions: pyth_lazer_transaction.Permissions.UpdateFeedAction[]; + + /** Permissions _allActions. */ + public _allActions?: "allActions"; + + /** Permissions _allUpdateGovernanceSourceActions. */ + public _allUpdateGovernanceSourceActions?: "allUpdateGovernanceSourceActions"; + + /** Permissions _allUpdatePublisherAction. */ + public _allUpdatePublisherAction?: "allUpdatePublisherAction"; + + /** Permissions _allUpdateFeedActions. */ + public _allUpdateFeedActions?: "allUpdateFeedActions"; + + /** + * Creates a new Permissions instance using the specified properties. + * @param [properties] Properties to set + * @returns Permissions instance + */ + public static create(properties?: pyth_lazer_transaction.IPermissions): pyth_lazer_transaction.Permissions; + + /** + * Encodes the specified Permissions message. Does not implicitly {@link pyth_lazer_transaction.Permissions.verify|verify} messages. + * @param message Permissions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IPermissions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Permissions message, length delimited. Does not implicitly {@link pyth_lazer_transaction.Permissions.verify|verify} messages. + * @param message Permissions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IPermissions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Permissions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Permissions + * @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): pyth_lazer_transaction.Permissions; + + /** + * Decodes a Permissions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Permissions + * @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)): pyth_lazer_transaction.Permissions; + + /** + * Verifies a Permissions 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 Permissions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Permissions + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.Permissions; + + /** + * Creates a plain object from a Permissions message. Also converts values to other types if specified. + * @param message Permissions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.Permissions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Permissions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Permissions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Permissions { + + /** ShardAction enum. */ + enum ShardAction { + SHARD_ACTION_UNSPECIFIED = 0, + CREATE_SHARD = 101, + ADD_GOVERNANCE_SOURCE = 102, + UPDATE_GOVERNANCE_SOURCE = 103, + SET_SHARD_NAME = 104, + SET_SHARD_GROUP = 105, + RESET_LAST_SEQUENCE_NO = 106, + ADD_PUBLISHER = 107, + ADD_FEED = 109 + } + + /** UpdateGovernanceSourceAction enum. */ + enum UpdateGovernanceSourceAction { + UPDATE_GOVERNANCE_SOURCE_ACTION_UNSPECIFIED = 0, + SET_GOVERNANCE_SOURCE_PERMISSIONS = 101, + REMOVE_GOVERNANCE_SOURCE = 199 + } + + /** UpdatePublisherAction enum. */ + enum UpdatePublisherAction { + UPDATE_PUBLISHER_ACTION_UNSPECIFIED = 0, + SET_PUBLISHER_NAME = 101, + ADD_PUBLISHER_PUBLIC_KEYS = 102, + REMOVE_PUBLISHER_PUBLIC_KEYS = 103, + SET_PUBLISHER_PUBLIC_KEYS = 104, + SET_PUBLISHER_ACTIVE = 105, + REMOVE_PUBLISHER = 199 + } + + /** UpdateFeedAction enum. */ + enum UpdateFeedAction { + UPDATE_FEED_ACTION_UNSPECIFIED = 0, + UPDATE_FEED_METADATA = 101, + ACTIVATE_FEED = 102, + DEACTIVATE_FEED = 103, + REMOVE_FEED = 199 + } + } + + /** Properties of a GovernanceSource. */ + interface IGovernanceSource { + + /** GovernanceSource singleEd25519 */ + singleEd25519?: (pyth_lazer_transaction.GovernanceSource.ISingleEd25519|null); + } + + /** Represents a GovernanceSource. */ + class GovernanceSource implements IGovernanceSource { + + /** + * Constructs a new GovernanceSource. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IGovernanceSource); + + /** GovernanceSource singleEd25519. */ + public singleEd25519?: (pyth_lazer_transaction.GovernanceSource.ISingleEd25519|null); + + /** GovernanceSource source. */ + public source?: "singleEd25519"; + + /** + * Creates a new GovernanceSource instance using the specified properties. + * @param [properties] Properties to set + * @returns GovernanceSource instance + */ + public static create(properties?: pyth_lazer_transaction.IGovernanceSource): pyth_lazer_transaction.GovernanceSource; + + /** + * Encodes the specified GovernanceSource message. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.verify|verify} messages. + * @param message GovernanceSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IGovernanceSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GovernanceSource message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.verify|verify} messages. + * @param message GovernanceSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IGovernanceSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GovernanceSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GovernanceSource + * @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): pyth_lazer_transaction.GovernanceSource; + + /** + * Decodes a GovernanceSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GovernanceSource + * @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)): pyth_lazer_transaction.GovernanceSource; + + /** + * Verifies a GovernanceSource 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 GovernanceSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GovernanceSource + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.GovernanceSource; + + /** + * Creates a plain object from a GovernanceSource message. Also converts values to other types if specified. + * @param message GovernanceSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.GovernanceSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GovernanceSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GovernanceSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GovernanceSource { + + /** Properties of a SingleEd25519. */ + interface ISingleEd25519 { + + /** SingleEd25519 publicKey */ + publicKey?: (Uint8Array|null); + } + + /** Represents a SingleEd25519. */ + class SingleEd25519 implements ISingleEd25519 { + + /** + * Constructs a new SingleEd25519. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.GovernanceSource.ISingleEd25519); + + /** SingleEd25519 publicKey. */ + public publicKey?: (Uint8Array|null); + + /** SingleEd25519 _publicKey. */ + public _publicKey?: "publicKey"; + + /** + * Creates a new SingleEd25519 instance using the specified properties. + * @param [properties] Properties to set + * @returns SingleEd25519 instance + */ + public static create(properties?: pyth_lazer_transaction.GovernanceSource.ISingleEd25519): pyth_lazer_transaction.GovernanceSource.SingleEd25519; + + /** + * Encodes the specified SingleEd25519 message. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.SingleEd25519.verify|verify} messages. + * @param message SingleEd25519 message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.GovernanceSource.ISingleEd25519, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SingleEd25519 message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.SingleEd25519.verify|verify} messages. + * @param message SingleEd25519 message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.GovernanceSource.ISingleEd25519, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SingleEd25519 message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SingleEd25519 + * @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): pyth_lazer_transaction.GovernanceSource.SingleEd25519; + + /** + * Decodes a SingleEd25519 message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SingleEd25519 + * @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)): pyth_lazer_transaction.GovernanceSource.SingleEd25519; + + /** + * Verifies a SingleEd25519 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 SingleEd25519 message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SingleEd25519 + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.GovernanceSource.SingleEd25519; + + /** + * Creates a plain object from a SingleEd25519 message. Also converts values to other types if specified. + * @param message SingleEd25519 + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.GovernanceSource.SingleEd25519, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SingleEd25519 to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SingleEd25519 + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a CreateShard. */ + interface ICreateShard { + + /** CreateShard shardId */ + shardId?: (number|null); + + /** CreateShard shardGroup */ + shardGroup?: (string|null); + + /** CreateShard minRate */ + minRate?: (google.protobuf.IDuration|null); + } + + /** Represents a CreateShard. */ + class CreateShard implements ICreateShard { + + /** + * Constructs a new CreateShard. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ICreateShard); + + /** CreateShard shardId. */ + public shardId?: (number|null); + + /** CreateShard shardGroup. */ + public shardGroup?: (string|null); + + /** CreateShard minRate. */ + public minRate?: (google.protobuf.IDuration|null); + + /** CreateShard _shardId. */ + public _shardId?: "shardId"; + + /** CreateShard _shardGroup. */ + public _shardGroup?: "shardGroup"; + + /** CreateShard _minRate. */ + public _minRate?: "minRate"; + + /** + * Creates a new CreateShard instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateShard instance + */ + public static create(properties?: pyth_lazer_transaction.ICreateShard): pyth_lazer_transaction.CreateShard; + + /** + * Encodes the specified CreateShard message. Does not implicitly {@link pyth_lazer_transaction.CreateShard.verify|verify} messages. + * @param message CreateShard message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.ICreateShard, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateShard message, length delimited. Does not implicitly {@link pyth_lazer_transaction.CreateShard.verify|verify} messages. + * @param message CreateShard message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.ICreateShard, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateShard message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateShard + * @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): pyth_lazer_transaction.CreateShard; + + /** + * Decodes a CreateShard message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateShard + * @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)): pyth_lazer_transaction.CreateShard; + + /** + * Verifies a CreateShard 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 CreateShard message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateShard + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.CreateShard; + + /** + * Creates a plain object from a CreateShard message. Also converts values to other types if specified. + * @param message CreateShard + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.CreateShard, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateShard to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateShard + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AddGovernanceSource. */ + interface IAddGovernanceSource { + + /** AddGovernanceSource newSource */ + newSource?: (pyth_lazer_transaction.IGovernanceSource|null); + + /** AddGovernanceSource permissions */ + permissions?: (pyth_lazer_transaction.IPermissions|null); + } + + /** Represents an AddGovernanceSource. */ + class AddGovernanceSource implements IAddGovernanceSource { + + /** + * Constructs a new AddGovernanceSource. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IAddGovernanceSource); + + /** AddGovernanceSource newSource. */ + public newSource?: (pyth_lazer_transaction.IGovernanceSource|null); + + /** AddGovernanceSource permissions. */ + public permissions?: (pyth_lazer_transaction.IPermissions|null); + + /** AddGovernanceSource _newSource. */ + public _newSource?: "newSource"; + + /** AddGovernanceSource _permissions. */ + public _permissions?: "permissions"; + + /** + * Creates a new AddGovernanceSource instance using the specified properties. + * @param [properties] Properties to set + * @returns AddGovernanceSource instance + */ + public static create(properties?: pyth_lazer_transaction.IAddGovernanceSource): pyth_lazer_transaction.AddGovernanceSource; + + /** + * Encodes the specified AddGovernanceSource message. Does not implicitly {@link pyth_lazer_transaction.AddGovernanceSource.verify|verify} messages. + * @param message AddGovernanceSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IAddGovernanceSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AddGovernanceSource message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddGovernanceSource.verify|verify} messages. + * @param message AddGovernanceSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IAddGovernanceSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AddGovernanceSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AddGovernanceSource + * @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): pyth_lazer_transaction.AddGovernanceSource; + + /** + * Decodes an AddGovernanceSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AddGovernanceSource + * @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)): pyth_lazer_transaction.AddGovernanceSource; + + /** + * Verifies an AddGovernanceSource 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 AddGovernanceSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AddGovernanceSource + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.AddGovernanceSource; + + /** + * Creates a plain object from an AddGovernanceSource message. Also converts values to other types if specified. + * @param message AddGovernanceSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.AddGovernanceSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AddGovernanceSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AddGovernanceSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateGovernanceSource. */ + interface IUpdateGovernanceSource { + + /** UpdateGovernanceSource source */ + source?: (pyth_lazer_transaction.IGovernanceSource|null); + + /** UpdateGovernanceSource setGovernanceSourcePermissions */ + setGovernanceSourcePermissions?: (pyth_lazer_transaction.ISetGovernanceSourcePermissions|null); + + /** UpdateGovernanceSource removeGovernanceSource */ + removeGovernanceSource?: (google.protobuf.IEmpty|null); + } + + /** Represents an UpdateGovernanceSource. */ + class UpdateGovernanceSource implements IUpdateGovernanceSource { + + /** + * Constructs a new UpdateGovernanceSource. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IUpdateGovernanceSource); + + /** UpdateGovernanceSource source. */ + public source?: (pyth_lazer_transaction.IGovernanceSource|null); + + /** UpdateGovernanceSource setGovernanceSourcePermissions. */ + public setGovernanceSourcePermissions?: (pyth_lazer_transaction.ISetGovernanceSourcePermissions|null); + + /** UpdateGovernanceSource removeGovernanceSource. */ + public removeGovernanceSource?: (google.protobuf.IEmpty|null); + + /** UpdateGovernanceSource _source. */ + public _source?: "source"; + + /** UpdateGovernanceSource action. */ + public action?: ("setGovernanceSourcePermissions"|"removeGovernanceSource"); + + /** + * Creates a new UpdateGovernanceSource instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateGovernanceSource instance + */ + public static create(properties?: pyth_lazer_transaction.IUpdateGovernanceSource): pyth_lazer_transaction.UpdateGovernanceSource; + + /** + * Encodes the specified UpdateGovernanceSource message. Does not implicitly {@link pyth_lazer_transaction.UpdateGovernanceSource.verify|verify} messages. + * @param message UpdateGovernanceSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IUpdateGovernanceSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateGovernanceSource message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdateGovernanceSource.verify|verify} messages. + * @param message UpdateGovernanceSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IUpdateGovernanceSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateGovernanceSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateGovernanceSource + * @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): pyth_lazer_transaction.UpdateGovernanceSource; + + /** + * Decodes an UpdateGovernanceSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateGovernanceSource + * @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)): pyth_lazer_transaction.UpdateGovernanceSource; + + /** + * Verifies an UpdateGovernanceSource 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 UpdateGovernanceSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateGovernanceSource + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.UpdateGovernanceSource; + + /** + * Creates a plain object from an UpdateGovernanceSource message. Also converts values to other types if specified. + * @param message UpdateGovernanceSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.UpdateGovernanceSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateGovernanceSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateGovernanceSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetGovernanceSourcePermissions. */ + interface ISetGovernanceSourcePermissions { + + /** SetGovernanceSourcePermissions permissions */ + permissions?: (pyth_lazer_transaction.IPermissions|null); + } + + /** Represents a SetGovernanceSourcePermissions. */ + class SetGovernanceSourcePermissions implements ISetGovernanceSourcePermissions { + + /** + * Constructs a new SetGovernanceSourcePermissions. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ISetGovernanceSourcePermissions); + + /** SetGovernanceSourcePermissions permissions. */ + public permissions?: (pyth_lazer_transaction.IPermissions|null); + + /** SetGovernanceSourcePermissions _permissions. */ + public _permissions?: "permissions"; + + /** + * Creates a new SetGovernanceSourcePermissions instance using the specified properties. + * @param [properties] Properties to set + * @returns SetGovernanceSourcePermissions instance + */ + public static create(properties?: pyth_lazer_transaction.ISetGovernanceSourcePermissions): pyth_lazer_transaction.SetGovernanceSourcePermissions; + + /** + * Encodes the specified SetGovernanceSourcePermissions message. Does not implicitly {@link pyth_lazer_transaction.SetGovernanceSourcePermissions.verify|verify} messages. + * @param message SetGovernanceSourcePermissions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.ISetGovernanceSourcePermissions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetGovernanceSourcePermissions message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetGovernanceSourcePermissions.verify|verify} messages. + * @param message SetGovernanceSourcePermissions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.ISetGovernanceSourcePermissions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetGovernanceSourcePermissions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetGovernanceSourcePermissions + * @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): pyth_lazer_transaction.SetGovernanceSourcePermissions; + + /** + * Decodes a SetGovernanceSourcePermissions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetGovernanceSourcePermissions + * @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)): pyth_lazer_transaction.SetGovernanceSourcePermissions; + + /** + * Verifies a SetGovernanceSourcePermissions 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 SetGovernanceSourcePermissions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetGovernanceSourcePermissions + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.SetGovernanceSourcePermissions; + + /** + * Creates a plain object from a SetGovernanceSourcePermissions message. Also converts values to other types if specified. + * @param message SetGovernanceSourcePermissions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.SetGovernanceSourcePermissions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetGovernanceSourcePermissions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetGovernanceSourcePermissions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetShardName. */ + interface ISetShardName { + + /** SetShardName shardName */ + shardName?: (string|null); + } + + /** Represents a SetShardName. */ + class SetShardName implements ISetShardName { + + /** + * Constructs a new SetShardName. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ISetShardName); + + /** SetShardName shardName. */ + public shardName?: (string|null); + + /** SetShardName _shardName. */ + public _shardName?: "shardName"; + + /** + * Creates a new SetShardName instance using the specified properties. + * @param [properties] Properties to set + * @returns SetShardName instance + */ + public static create(properties?: pyth_lazer_transaction.ISetShardName): pyth_lazer_transaction.SetShardName; + + /** + * Encodes the specified SetShardName message. Does not implicitly {@link pyth_lazer_transaction.SetShardName.verify|verify} messages. + * @param message SetShardName message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.ISetShardName, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetShardName message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetShardName.verify|verify} messages. + * @param message SetShardName message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.ISetShardName, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetShardName message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetShardName + * @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): pyth_lazer_transaction.SetShardName; + + /** + * Decodes a SetShardName message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetShardName + * @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)): pyth_lazer_transaction.SetShardName; + + /** + * Verifies a SetShardName 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 SetShardName message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetShardName + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.SetShardName; + + /** + * Creates a plain object from a SetShardName message. Also converts values to other types if specified. + * @param message SetShardName + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.SetShardName, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetShardName to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetShardName + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetShardGroup. */ + interface ISetShardGroup { + + /** SetShardGroup shardGroup */ + shardGroup?: (string|null); + } + + /** Represents a SetShardGroup. */ + class SetShardGroup implements ISetShardGroup { + + /** + * Constructs a new SetShardGroup. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ISetShardGroup); + + /** SetShardGroup shardGroup. */ + public shardGroup?: (string|null); + + /** SetShardGroup _shardGroup. */ + public _shardGroup?: "shardGroup"; + + /** + * Creates a new SetShardGroup instance using the specified properties. + * @param [properties] Properties to set + * @returns SetShardGroup instance + */ + public static create(properties?: pyth_lazer_transaction.ISetShardGroup): pyth_lazer_transaction.SetShardGroup; + + /** + * Encodes the specified SetShardGroup message. Does not implicitly {@link pyth_lazer_transaction.SetShardGroup.verify|verify} messages. + * @param message SetShardGroup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.ISetShardGroup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetShardGroup message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetShardGroup.verify|verify} messages. + * @param message SetShardGroup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.ISetShardGroup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetShardGroup message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetShardGroup + * @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): pyth_lazer_transaction.SetShardGroup; + + /** + * Decodes a SetShardGroup message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetShardGroup + * @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)): pyth_lazer_transaction.SetShardGroup; + + /** + * Verifies a SetShardGroup 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 SetShardGroup message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetShardGroup + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.SetShardGroup; + + /** + * Creates a plain object from a SetShardGroup message. Also converts values to other types if specified. + * @param message SetShardGroup + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.SetShardGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetShardGroup to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetShardGroup + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ResetLastSequenceNo. */ + interface IResetLastSequenceNo { + + /** ResetLastSequenceNo lastSequenceNo */ + lastSequenceNo?: (number|Long|null); + } + + /** Represents a ResetLastSequenceNo. */ + class ResetLastSequenceNo implements IResetLastSequenceNo { + + /** + * Constructs a new ResetLastSequenceNo. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IResetLastSequenceNo); + + /** ResetLastSequenceNo lastSequenceNo. */ + public lastSequenceNo?: (number|Long|null); + + /** ResetLastSequenceNo _lastSequenceNo. */ + public _lastSequenceNo?: "lastSequenceNo"; + + /** + * Creates a new ResetLastSequenceNo instance using the specified properties. + * @param [properties] Properties to set + * @returns ResetLastSequenceNo instance + */ + public static create(properties?: pyth_lazer_transaction.IResetLastSequenceNo): pyth_lazer_transaction.ResetLastSequenceNo; + + /** + * Encodes the specified ResetLastSequenceNo message. Does not implicitly {@link pyth_lazer_transaction.ResetLastSequenceNo.verify|verify} messages. + * @param message ResetLastSequenceNo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IResetLastSequenceNo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResetLastSequenceNo message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ResetLastSequenceNo.verify|verify} messages. + * @param message ResetLastSequenceNo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IResetLastSequenceNo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResetLastSequenceNo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResetLastSequenceNo + * @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): pyth_lazer_transaction.ResetLastSequenceNo; + + /** + * Decodes a ResetLastSequenceNo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResetLastSequenceNo + * @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)): pyth_lazer_transaction.ResetLastSequenceNo; + + /** + * Verifies a ResetLastSequenceNo 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 ResetLastSequenceNo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResetLastSequenceNo + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.ResetLastSequenceNo; + + /** + * Creates a plain object from a ResetLastSequenceNo message. Also converts values to other types if specified. + * @param message ResetLastSequenceNo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.ResetLastSequenceNo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResetLastSequenceNo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResetLastSequenceNo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AddPublisher. */ + interface IAddPublisher { + + /** AddPublisher publisherId */ + publisherId?: (number|null); + + /** AddPublisher name */ + name?: (string|null); + + /** AddPublisher publicKeys */ + publicKeys?: (Uint8Array[]|null); + + /** AddPublisher isActive */ + isActive?: (boolean|null); + } + + /** Represents an AddPublisher. */ + class AddPublisher implements IAddPublisher { + + /** + * Constructs a new AddPublisher. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IAddPublisher); + + /** AddPublisher publisherId. */ + public publisherId?: (number|null); + + /** AddPublisher name. */ + public name?: (string|null); + + /** AddPublisher publicKeys. */ + public publicKeys: Uint8Array[]; + + /** AddPublisher isActive. */ + public isActive?: (boolean|null); + + /** AddPublisher _publisherId. */ + public _publisherId?: "publisherId"; + + /** AddPublisher _name. */ + public _name?: "name"; + + /** AddPublisher _isActive. */ + public _isActive?: "isActive"; + + /** + * Creates a new AddPublisher instance using the specified properties. + * @param [properties] Properties to set + * @returns AddPublisher instance + */ + public static create(properties?: pyth_lazer_transaction.IAddPublisher): pyth_lazer_transaction.AddPublisher; + + /** + * Encodes the specified AddPublisher message. Does not implicitly {@link pyth_lazer_transaction.AddPublisher.verify|verify} messages. + * @param message AddPublisher message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IAddPublisher, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AddPublisher message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddPublisher.verify|verify} messages. + * @param message AddPublisher message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IAddPublisher, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AddPublisher message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AddPublisher + * @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): pyth_lazer_transaction.AddPublisher; + + /** + * Decodes an AddPublisher message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AddPublisher + * @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)): pyth_lazer_transaction.AddPublisher; + + /** + * Verifies an AddPublisher 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 AddPublisher message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AddPublisher + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.AddPublisher; + + /** + * Creates a plain object from an AddPublisher message. Also converts values to other types if specified. + * @param message AddPublisher + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.AddPublisher, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AddPublisher to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AddPublisher + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdatePublisher. */ + interface IUpdatePublisher { + + /** UpdatePublisher publisherId */ + publisherId?: (number|null); + + /** UpdatePublisher setPublisherName */ + setPublisherName?: (pyth_lazer_transaction.ISetPublisherName|null); + + /** UpdatePublisher addPublisherPublicKeys */ + addPublisherPublicKeys?: (pyth_lazer_transaction.IAddPublisherPublicKeys|null); + + /** UpdatePublisher removePublisherPublicKeys */ + removePublisherPublicKeys?: (pyth_lazer_transaction.IRemovePublisherPublicKeys|null); + + /** UpdatePublisher setPublisherPublicKeys */ + setPublisherPublicKeys?: (pyth_lazer_transaction.ISetPublisherPublicKeys|null); + + /** UpdatePublisher setPublisherActive */ + setPublisherActive?: (pyth_lazer_transaction.ISetPublisherActive|null); + + /** UpdatePublisher removePublisher */ + removePublisher?: (google.protobuf.IEmpty|null); + } + + /** Represents an UpdatePublisher. */ + class UpdatePublisher implements IUpdatePublisher { + + /** + * Constructs a new UpdatePublisher. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IUpdatePublisher); + + /** UpdatePublisher publisherId. */ + public publisherId?: (number|null); + + /** UpdatePublisher setPublisherName. */ + public setPublisherName?: (pyth_lazer_transaction.ISetPublisherName|null); + + /** UpdatePublisher addPublisherPublicKeys. */ + public addPublisherPublicKeys?: (pyth_lazer_transaction.IAddPublisherPublicKeys|null); + + /** UpdatePublisher removePublisherPublicKeys. */ + public removePublisherPublicKeys?: (pyth_lazer_transaction.IRemovePublisherPublicKeys|null); + + /** UpdatePublisher setPublisherPublicKeys. */ + public setPublisherPublicKeys?: (pyth_lazer_transaction.ISetPublisherPublicKeys|null); + + /** UpdatePublisher setPublisherActive. */ + public setPublisherActive?: (pyth_lazer_transaction.ISetPublisherActive|null); + + /** UpdatePublisher removePublisher. */ + public removePublisher?: (google.protobuf.IEmpty|null); + + /** UpdatePublisher _publisherId. */ + public _publisherId?: "publisherId"; + + /** UpdatePublisher action. */ + public action?: ("setPublisherName"|"addPublisherPublicKeys"|"removePublisherPublicKeys"|"setPublisherPublicKeys"|"setPublisherActive"|"removePublisher"); + + /** + * Creates a new UpdatePublisher instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdatePublisher instance + */ + public static create(properties?: pyth_lazer_transaction.IUpdatePublisher): pyth_lazer_transaction.UpdatePublisher; + + /** + * Encodes the specified UpdatePublisher message. Does not implicitly {@link pyth_lazer_transaction.UpdatePublisher.verify|verify} messages. + * @param message UpdatePublisher message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IUpdatePublisher, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdatePublisher message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdatePublisher.verify|verify} messages. + * @param message UpdatePublisher message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IUpdatePublisher, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdatePublisher message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdatePublisher + * @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): pyth_lazer_transaction.UpdatePublisher; + + /** + * Decodes an UpdatePublisher message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdatePublisher + * @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)): pyth_lazer_transaction.UpdatePublisher; + + /** + * Verifies an UpdatePublisher 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 UpdatePublisher message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdatePublisher + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.UpdatePublisher; + + /** + * Creates a plain object from an UpdatePublisher message. Also converts values to other types if specified. + * @param message UpdatePublisher + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.UpdatePublisher, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdatePublisher to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdatePublisher + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetPublisherName. */ + interface ISetPublisherName { + + /** SetPublisherName name */ + name?: (string|null); + } + + /** Represents a SetPublisherName. */ + class SetPublisherName implements ISetPublisherName { + + /** + * Constructs a new SetPublisherName. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ISetPublisherName); + + /** SetPublisherName name. */ + public name?: (string|null); + + /** SetPublisherName _name. */ + public _name?: "name"; + + /** + * Creates a new SetPublisherName instance using the specified properties. + * @param [properties] Properties to set + * @returns SetPublisherName instance + */ + public static create(properties?: pyth_lazer_transaction.ISetPublisherName): pyth_lazer_transaction.SetPublisherName; + + /** + * Encodes the specified SetPublisherName message. Does not implicitly {@link pyth_lazer_transaction.SetPublisherName.verify|verify} messages. + * @param message SetPublisherName message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.ISetPublisherName, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetPublisherName message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetPublisherName.verify|verify} messages. + * @param message SetPublisherName message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.ISetPublisherName, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetPublisherName message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetPublisherName + * @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): pyth_lazer_transaction.SetPublisherName; + + /** + * Decodes a SetPublisherName message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetPublisherName + * @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)): pyth_lazer_transaction.SetPublisherName; + + /** + * Verifies a SetPublisherName 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 SetPublisherName message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetPublisherName + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.SetPublisherName; + + /** + * Creates a plain object from a SetPublisherName message. Also converts values to other types if specified. + * @param message SetPublisherName + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.SetPublisherName, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetPublisherName to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetPublisherName + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AddPublisherPublicKeys. */ + interface IAddPublisherPublicKeys { + + /** AddPublisherPublicKeys publicKeys */ + publicKeys?: (Uint8Array[]|null); + } + + /** Represents an AddPublisherPublicKeys. */ + class AddPublisherPublicKeys implements IAddPublisherPublicKeys { + + /** + * Constructs a new AddPublisherPublicKeys. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IAddPublisherPublicKeys); + + /** AddPublisherPublicKeys publicKeys. */ + public publicKeys: Uint8Array[]; + + /** + * Creates a new AddPublisherPublicKeys instance using the specified properties. + * @param [properties] Properties to set + * @returns AddPublisherPublicKeys instance + */ + public static create(properties?: pyth_lazer_transaction.IAddPublisherPublicKeys): pyth_lazer_transaction.AddPublisherPublicKeys; + + /** + * Encodes the specified AddPublisherPublicKeys message. Does not implicitly {@link pyth_lazer_transaction.AddPublisherPublicKeys.verify|verify} messages. + * @param message AddPublisherPublicKeys message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IAddPublisherPublicKeys, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AddPublisherPublicKeys message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddPublisherPublicKeys.verify|verify} messages. + * @param message AddPublisherPublicKeys message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IAddPublisherPublicKeys, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AddPublisherPublicKeys message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AddPublisherPublicKeys + * @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): pyth_lazer_transaction.AddPublisherPublicKeys; + + /** + * Decodes an AddPublisherPublicKeys message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AddPublisherPublicKeys + * @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)): pyth_lazer_transaction.AddPublisherPublicKeys; + + /** + * Verifies an AddPublisherPublicKeys 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 AddPublisherPublicKeys message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AddPublisherPublicKeys + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.AddPublisherPublicKeys; + + /** + * Creates a plain object from an AddPublisherPublicKeys message. Also converts values to other types if specified. + * @param message AddPublisherPublicKeys + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.AddPublisherPublicKeys, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AddPublisherPublicKeys to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AddPublisherPublicKeys + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RemovePublisherPublicKeys. */ + interface IRemovePublisherPublicKeys { + + /** RemovePublisherPublicKeys publicKeys */ + publicKeys?: (Uint8Array[]|null); + } + + /** Represents a RemovePublisherPublicKeys. */ + class RemovePublisherPublicKeys implements IRemovePublisherPublicKeys { + + /** + * Constructs a new RemovePublisherPublicKeys. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IRemovePublisherPublicKeys); + + /** RemovePublisherPublicKeys publicKeys. */ + public publicKeys: Uint8Array[]; + + /** + * Creates a new RemovePublisherPublicKeys instance using the specified properties. + * @param [properties] Properties to set + * @returns RemovePublisherPublicKeys instance + */ + public static create(properties?: pyth_lazer_transaction.IRemovePublisherPublicKeys): pyth_lazer_transaction.RemovePublisherPublicKeys; + + /** + * Encodes the specified RemovePublisherPublicKeys message. Does not implicitly {@link pyth_lazer_transaction.RemovePublisherPublicKeys.verify|verify} messages. + * @param message RemovePublisherPublicKeys message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IRemovePublisherPublicKeys, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RemovePublisherPublicKeys message, length delimited. Does not implicitly {@link pyth_lazer_transaction.RemovePublisherPublicKeys.verify|verify} messages. + * @param message RemovePublisherPublicKeys message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IRemovePublisherPublicKeys, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RemovePublisherPublicKeys message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RemovePublisherPublicKeys + * @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): pyth_lazer_transaction.RemovePublisherPublicKeys; + + /** + * Decodes a RemovePublisherPublicKeys message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RemovePublisherPublicKeys + * @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)): pyth_lazer_transaction.RemovePublisherPublicKeys; + + /** + * Verifies a RemovePublisherPublicKeys 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 RemovePublisherPublicKeys message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RemovePublisherPublicKeys + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.RemovePublisherPublicKeys; + + /** + * Creates a plain object from a RemovePublisherPublicKeys message. Also converts values to other types if specified. + * @param message RemovePublisherPublicKeys + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.RemovePublisherPublicKeys, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RemovePublisherPublicKeys to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RemovePublisherPublicKeys + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetPublisherPublicKeys. */ + interface ISetPublisherPublicKeys { + + /** SetPublisherPublicKeys publicKeys */ + publicKeys?: (Uint8Array[]|null); + } + + /** Represents a SetPublisherPublicKeys. */ + class SetPublisherPublicKeys implements ISetPublisherPublicKeys { + + /** + * Constructs a new SetPublisherPublicKeys. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ISetPublisherPublicKeys); + + /** SetPublisherPublicKeys publicKeys. */ + public publicKeys: Uint8Array[]; + + /** + * Creates a new SetPublisherPublicKeys instance using the specified properties. + * @param [properties] Properties to set + * @returns SetPublisherPublicKeys instance + */ + public static create(properties?: pyth_lazer_transaction.ISetPublisherPublicKeys): pyth_lazer_transaction.SetPublisherPublicKeys; + + /** + * Encodes the specified SetPublisherPublicKeys message. Does not implicitly {@link pyth_lazer_transaction.SetPublisherPublicKeys.verify|verify} messages. + * @param message SetPublisherPublicKeys message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.ISetPublisherPublicKeys, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetPublisherPublicKeys message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetPublisherPublicKeys.verify|verify} messages. + * @param message SetPublisherPublicKeys message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.ISetPublisherPublicKeys, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetPublisherPublicKeys message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetPublisherPublicKeys + * @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): pyth_lazer_transaction.SetPublisherPublicKeys; + + /** + * Decodes a SetPublisherPublicKeys message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetPublisherPublicKeys + * @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)): pyth_lazer_transaction.SetPublisherPublicKeys; + + /** + * Verifies a SetPublisherPublicKeys 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 SetPublisherPublicKeys message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetPublisherPublicKeys + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.SetPublisherPublicKeys; + + /** + * Creates a plain object from a SetPublisherPublicKeys message. Also converts values to other types if specified. + * @param message SetPublisherPublicKeys + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.SetPublisherPublicKeys, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetPublisherPublicKeys to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetPublisherPublicKeys + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetPublisherActive. */ + interface ISetPublisherActive { + + /** SetPublisherActive isActive */ + isActive?: (boolean|null); + } + + /** Represents a SetPublisherActive. */ + class SetPublisherActive implements ISetPublisherActive { + + /** + * Constructs a new SetPublisherActive. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ISetPublisherActive); + + /** SetPublisherActive isActive. */ + public isActive?: (boolean|null); + + /** SetPublisherActive _isActive. */ + public _isActive?: "isActive"; + + /** + * Creates a new SetPublisherActive instance using the specified properties. + * @param [properties] Properties to set + * @returns SetPublisherActive instance + */ + public static create(properties?: pyth_lazer_transaction.ISetPublisherActive): pyth_lazer_transaction.SetPublisherActive; + + /** + * Encodes the specified SetPublisherActive message. Does not implicitly {@link pyth_lazer_transaction.SetPublisherActive.verify|verify} messages. + * @param message SetPublisherActive message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.ISetPublisherActive, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetPublisherActive message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetPublisherActive.verify|verify} messages. + * @param message SetPublisherActive message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.ISetPublisherActive, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetPublisherActive message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetPublisherActive + * @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): pyth_lazer_transaction.SetPublisherActive; + + /** + * Decodes a SetPublisherActive message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetPublisherActive + * @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)): pyth_lazer_transaction.SetPublisherActive; + + /** + * Verifies a SetPublisherActive 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 SetPublisherActive message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetPublisherActive + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.SetPublisherActive; + + /** + * Creates a plain object from a SetPublisherActive message. Also converts values to other types if specified. + * @param message SetPublisherActive + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.SetPublisherActive, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetPublisherActive to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetPublisherActive + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AddFeed. */ + interface IAddFeed { + + /** AddFeed priceFeedId */ + priceFeedId?: (number|null); + + /** AddFeed metadata */ + metadata?: (pyth_lazer_transaction.DynamicValue.IMap|null); + + /** AddFeed permissionedPublishers */ + permissionedPublishers?: (number[]|null); + } + + /** Represents an AddFeed. */ + class AddFeed implements IAddFeed { + + /** + * Constructs a new AddFeed. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IAddFeed); + + /** AddFeed priceFeedId. */ + public priceFeedId?: (number|null); + + /** AddFeed metadata. */ + public metadata?: (pyth_lazer_transaction.DynamicValue.IMap|null); + + /** AddFeed permissionedPublishers. */ + public permissionedPublishers: number[]; + + /** AddFeed _priceFeedId. */ + public _priceFeedId?: "priceFeedId"; + + /** AddFeed _metadata. */ + public _metadata?: "metadata"; + + /** + * Creates a new AddFeed instance using the specified properties. + * @param [properties] Properties to set + * @returns AddFeed instance + */ + public static create(properties?: pyth_lazer_transaction.IAddFeed): pyth_lazer_transaction.AddFeed; + + /** + * Encodes the specified AddFeed message. Does not implicitly {@link pyth_lazer_transaction.AddFeed.verify|verify} messages. + * @param message AddFeed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IAddFeed, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AddFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddFeed.verify|verify} messages. + * @param message AddFeed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IAddFeed, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AddFeed message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AddFeed + * @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): pyth_lazer_transaction.AddFeed; + + /** + * Decodes an AddFeed message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AddFeed + * @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)): pyth_lazer_transaction.AddFeed; + + /** + * Verifies an AddFeed 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 AddFeed message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AddFeed + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.AddFeed; + + /** + * Creates a plain object from an AddFeed message. Also converts values to other types if specified. + * @param message AddFeed + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.AddFeed, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AddFeed to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AddFeed + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateFeed. */ + interface IUpdateFeed { + + /** UpdateFeed priceFeedId */ + priceFeedId?: (number|null); + + /** UpdateFeed updateFeedMetadata */ + updateFeedMetadata?: (pyth_lazer_transaction.IUpdateFeedMetadata|null); + + /** UpdateFeed activateFeed */ + activateFeed?: (pyth_lazer_transaction.IActivateFeed|null); + + /** UpdateFeed deactivateFeed */ + deactivateFeed?: (pyth_lazer_transaction.IDeactivateFeed|null); + + /** UpdateFeed removeFeed */ + removeFeed?: (google.protobuf.IEmpty|null); + } + + /** Represents an UpdateFeed. */ + class UpdateFeed implements IUpdateFeed { + + /** + * Constructs a new UpdateFeed. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IUpdateFeed); + + /** UpdateFeed priceFeedId. */ + public priceFeedId?: (number|null); + + /** UpdateFeed updateFeedMetadata. */ + public updateFeedMetadata?: (pyth_lazer_transaction.IUpdateFeedMetadata|null); + + /** UpdateFeed activateFeed. */ + public activateFeed?: (pyth_lazer_transaction.IActivateFeed|null); + + /** UpdateFeed deactivateFeed. */ + public deactivateFeed?: (pyth_lazer_transaction.IDeactivateFeed|null); + + /** UpdateFeed removeFeed. */ + public removeFeed?: (google.protobuf.IEmpty|null); + + /** UpdateFeed _priceFeedId. */ + public _priceFeedId?: "priceFeedId"; + + /** UpdateFeed action. */ + public action?: ("updateFeedMetadata"|"activateFeed"|"deactivateFeed"|"removeFeed"); + + /** + * Creates a new UpdateFeed instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateFeed instance + */ + public static create(properties?: pyth_lazer_transaction.IUpdateFeed): pyth_lazer_transaction.UpdateFeed; + + /** + * Encodes the specified UpdateFeed message. Does not implicitly {@link pyth_lazer_transaction.UpdateFeed.verify|verify} messages. + * @param message UpdateFeed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IUpdateFeed, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdateFeed.verify|verify} messages. + * @param message UpdateFeed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IUpdateFeed, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateFeed message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateFeed + * @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): pyth_lazer_transaction.UpdateFeed; + + /** + * Decodes an UpdateFeed message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateFeed + * @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)): pyth_lazer_transaction.UpdateFeed; + + /** + * Verifies an UpdateFeed 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 UpdateFeed message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateFeed + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.UpdateFeed; + + /** + * Creates a plain object from an UpdateFeed message. Also converts values to other types if specified. + * @param message UpdateFeed + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.UpdateFeed, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateFeed to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateFeed + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateFeedMetadata. */ + interface IUpdateFeedMetadata { + + /** UpdateFeedMetadata name */ + name?: (string|null); + + /** UpdateFeedMetadata value */ + value?: (pyth_lazer_transaction.IDynamicValue|null); + } + + /** Represents an UpdateFeedMetadata. */ + class UpdateFeedMetadata implements IUpdateFeedMetadata { + + /** + * Constructs a new UpdateFeedMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IUpdateFeedMetadata); + + /** UpdateFeedMetadata name. */ + public name?: (string|null); + + /** UpdateFeedMetadata value. */ + public value?: (pyth_lazer_transaction.IDynamicValue|null); + + /** UpdateFeedMetadata _name. */ + public _name?: "name"; + + /** UpdateFeedMetadata _value. */ + public _value?: "value"; + + /** + * Creates a new UpdateFeedMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateFeedMetadata instance + */ + public static create(properties?: pyth_lazer_transaction.IUpdateFeedMetadata): pyth_lazer_transaction.UpdateFeedMetadata; + + /** + * Encodes the specified UpdateFeedMetadata message. Does not implicitly {@link pyth_lazer_transaction.UpdateFeedMetadata.verify|verify} messages. + * @param message UpdateFeedMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IUpdateFeedMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateFeedMetadata message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdateFeedMetadata.verify|verify} messages. + * @param message UpdateFeedMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IUpdateFeedMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateFeedMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateFeedMetadata + * @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): pyth_lazer_transaction.UpdateFeedMetadata; + + /** + * Decodes an UpdateFeedMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateFeedMetadata + * @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)): pyth_lazer_transaction.UpdateFeedMetadata; + + /** + * Verifies an UpdateFeedMetadata 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 UpdateFeedMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateFeedMetadata + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.UpdateFeedMetadata; + + /** + * Creates a plain object from an UpdateFeedMetadata message. Also converts values to other types if specified. + * @param message UpdateFeedMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.UpdateFeedMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateFeedMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateFeedMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ActivateFeed. */ + interface IActivateFeed { + + /** ActivateFeed activationTimestamp */ + activationTimestamp?: (google.protobuf.ITimestamp|null); + } + + /** Represents an ActivateFeed. */ + class ActivateFeed implements IActivateFeed { + + /** + * Constructs a new ActivateFeed. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IActivateFeed); + + /** ActivateFeed activationTimestamp. */ + public activationTimestamp?: (google.protobuf.ITimestamp|null); + + /** ActivateFeed _activationTimestamp. */ + public _activationTimestamp?: "activationTimestamp"; + + /** + * Creates a new ActivateFeed instance using the specified properties. + * @param [properties] Properties to set + * @returns ActivateFeed instance + */ + public static create(properties?: pyth_lazer_transaction.IActivateFeed): pyth_lazer_transaction.ActivateFeed; + + /** + * Encodes the specified ActivateFeed message. Does not implicitly {@link pyth_lazer_transaction.ActivateFeed.verify|verify} messages. + * @param message ActivateFeed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IActivateFeed, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ActivateFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ActivateFeed.verify|verify} messages. + * @param message ActivateFeed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IActivateFeed, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ActivateFeed message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ActivateFeed + * @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): pyth_lazer_transaction.ActivateFeed; + + /** + * Decodes an ActivateFeed message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ActivateFeed + * @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)): pyth_lazer_transaction.ActivateFeed; + + /** + * Verifies an ActivateFeed 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 ActivateFeed message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ActivateFeed + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.ActivateFeed; + + /** + * Creates a plain object from an ActivateFeed message. Also converts values to other types if specified. + * @param message ActivateFeed + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.ActivateFeed, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ActivateFeed to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ActivateFeed + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeactivateFeed. */ + interface IDeactivateFeed { + + /** DeactivateFeed deactivationTimestamp */ + deactivationTimestamp?: (google.protobuf.ITimestamp|null); + } + + /** Represents a DeactivateFeed. */ + class DeactivateFeed implements IDeactivateFeed { + + /** + * Constructs a new DeactivateFeed. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IDeactivateFeed); + + /** DeactivateFeed deactivationTimestamp. */ + public deactivationTimestamp?: (google.protobuf.ITimestamp|null); + + /** DeactivateFeed _deactivationTimestamp. */ + public _deactivationTimestamp?: "deactivationTimestamp"; + + /** + * Creates a new DeactivateFeed instance using the specified properties. + * @param [properties] Properties to set + * @returns DeactivateFeed instance + */ + public static create(properties?: pyth_lazer_transaction.IDeactivateFeed): pyth_lazer_transaction.DeactivateFeed; + + /** + * Encodes the specified DeactivateFeed message. Does not implicitly {@link pyth_lazer_transaction.DeactivateFeed.verify|verify} messages. + * @param message DeactivateFeed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IDeactivateFeed, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeactivateFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DeactivateFeed.verify|verify} messages. + * @param message DeactivateFeed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IDeactivateFeed, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeactivateFeed message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeactivateFeed + * @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): pyth_lazer_transaction.DeactivateFeed; + + /** + * Decodes a DeactivateFeed message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeactivateFeed + * @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)): pyth_lazer_transaction.DeactivateFeed; + + /** + * Verifies a DeactivateFeed 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 DeactivateFeed message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeactivateFeed + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.DeactivateFeed; + + /** + * Creates a plain object from a DeactivateFeed message. Also converts values to other types if specified. + * @param message DeactivateFeed + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.DeactivateFeed, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeactivateFeed to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeactivateFeed + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DynamicValue. */ + interface IDynamicValue { + + /** DynamicValue stringValue */ + stringValue?: (string|null); + + /** DynamicValue doubleValue */ + doubleValue?: (number|null); + + /** DynamicValue uintValue */ + uintValue?: (number|Long|null); + + /** DynamicValue intValue */ + intValue?: (number|Long|null); + + /** DynamicValue boolValue */ + boolValue?: (boolean|null); + + /** DynamicValue bytesValue */ + bytesValue?: (Uint8Array|null); + + /** DynamicValue durationValue */ + durationValue?: (google.protobuf.IDuration|null); + + /** DynamicValue timestampValue */ + timestampValue?: (google.protobuf.ITimestamp|null); + + /** DynamicValue list */ + list?: (pyth_lazer_transaction.DynamicValue.IList|null); + + /** DynamicValue map */ + map?: (pyth_lazer_transaction.DynamicValue.IMap|null); + } + + /** Represents a DynamicValue. */ + class DynamicValue implements IDynamicValue { + + /** + * Constructs a new DynamicValue. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IDynamicValue); + + /** DynamicValue stringValue. */ + public stringValue?: (string|null); + + /** DynamicValue doubleValue. */ + public doubleValue?: (number|null); + + /** DynamicValue uintValue. */ + public uintValue?: (number|Long|null); + + /** DynamicValue intValue. */ + public intValue?: (number|Long|null); + + /** DynamicValue boolValue. */ + public boolValue?: (boolean|null); + + /** DynamicValue bytesValue. */ + public bytesValue?: (Uint8Array|null); + + /** DynamicValue durationValue. */ + public durationValue?: (google.protobuf.IDuration|null); + + /** DynamicValue timestampValue. */ + public timestampValue?: (google.protobuf.ITimestamp|null); + + /** DynamicValue list. */ + public list?: (pyth_lazer_transaction.DynamicValue.IList|null); + + /** DynamicValue map. */ + public map?: (pyth_lazer_transaction.DynamicValue.IMap|null); + + /** DynamicValue value. */ + public value?: ("stringValue"|"doubleValue"|"uintValue"|"intValue"|"boolValue"|"bytesValue"|"durationValue"|"timestampValue"|"list"|"map"); + + /** + * Creates a new DynamicValue instance using the specified properties. + * @param [properties] Properties to set + * @returns DynamicValue instance + */ + public static create(properties?: pyth_lazer_transaction.IDynamicValue): pyth_lazer_transaction.DynamicValue; + + /** + * Encodes the specified DynamicValue message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.verify|verify} messages. + * @param message DynamicValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IDynamicValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DynamicValue message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.verify|verify} messages. + * @param message DynamicValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IDynamicValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DynamicValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DynamicValue + * @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): pyth_lazer_transaction.DynamicValue; + + /** + * Decodes a DynamicValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DynamicValue + * @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)): pyth_lazer_transaction.DynamicValue; + + /** + * Verifies a DynamicValue 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 DynamicValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DynamicValue + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.DynamicValue; + + /** + * Creates a plain object from a DynamicValue message. Also converts values to other types if specified. + * @param message DynamicValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.DynamicValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DynamicValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DynamicValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DynamicValue { + + /** Properties of a List. */ + interface IList { + + /** List items */ + items?: (pyth_lazer_transaction.IDynamicValue[]|null); + } + + /** Represents a List. */ + class List implements IList { + + /** + * Constructs a new List. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.DynamicValue.IList); + + /** List items. */ + public items: pyth_lazer_transaction.IDynamicValue[]; + + /** + * Creates a new List instance using the specified properties. + * @param [properties] Properties to set + * @returns List instance + */ + public static create(properties?: pyth_lazer_transaction.DynamicValue.IList): pyth_lazer_transaction.DynamicValue.List; + + /** + * Encodes the specified List message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.List.verify|verify} messages. + * @param message List message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.DynamicValue.IList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified List message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.List.verify|verify} messages. + * @param message List message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.DynamicValue.IList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a List message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns List + * @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): pyth_lazer_transaction.DynamicValue.List; + + /** + * Decodes a List message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns List + * @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)): pyth_lazer_transaction.DynamicValue.List; + + /** + * Verifies a List 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 List message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns List + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.DynamicValue.List; + + /** + * Creates a plain object from a List message. Also converts values to other types if specified. + * @param message List + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.DynamicValue.List, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this List to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for List + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MapItem. */ + interface IMapItem { + + /** MapItem key */ + key?: (string|null); + + /** MapItem value */ + value?: (pyth_lazer_transaction.IDynamicValue|null); + } + + /** Represents a MapItem. */ + class MapItem implements IMapItem { + + /** + * Constructs a new MapItem. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.DynamicValue.IMapItem); + + /** MapItem key. */ + public key?: (string|null); + + /** MapItem value. */ + public value?: (pyth_lazer_transaction.IDynamicValue|null); + + /** MapItem _key. */ + public _key?: "key"; + + /** MapItem _value. */ + public _value?: "value"; + + /** + * Creates a new MapItem instance using the specified properties. + * @param [properties] Properties to set + * @returns MapItem instance + */ + public static create(properties?: pyth_lazer_transaction.DynamicValue.IMapItem): pyth_lazer_transaction.DynamicValue.MapItem; + + /** + * Encodes the specified MapItem message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.MapItem.verify|verify} messages. + * @param message MapItem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.DynamicValue.IMapItem, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MapItem message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.MapItem.verify|verify} messages. + * @param message MapItem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.DynamicValue.IMapItem, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MapItem message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MapItem + * @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): pyth_lazer_transaction.DynamicValue.MapItem; + + /** + * Decodes a MapItem message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MapItem + * @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)): pyth_lazer_transaction.DynamicValue.MapItem; + + /** + * Verifies a MapItem 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 MapItem message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MapItem + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.DynamicValue.MapItem; + + /** + * Creates a plain object from a MapItem message. Also converts values to other types if specified. + * @param message MapItem + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.DynamicValue.MapItem, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MapItem to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MapItem + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Map. */ + interface IMap { + + /** Map items */ + items?: (pyth_lazer_transaction.DynamicValue.IMapItem[]|null); + } + + /** Represents a Map. */ + class Map implements IMap { + + /** + * Constructs a new Map. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.DynamicValue.IMap); + + /** Map items. */ + public items: pyth_lazer_transaction.DynamicValue.IMapItem[]; + + /** + * Creates a new Map instance using the specified properties. + * @param [properties] Properties to set + * @returns Map instance + */ + public static create(properties?: pyth_lazer_transaction.DynamicValue.IMap): pyth_lazer_transaction.DynamicValue.Map; + + /** + * Encodes the specified Map message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.Map.verify|verify} messages. + * @param message Map message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.DynamicValue.IMap, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Map message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.Map.verify|verify} messages. + * @param message Map message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.DynamicValue.IMap, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Map message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Map + * @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): pyth_lazer_transaction.DynamicValue.Map; + + /** + * Decodes a Map message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Map + * @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)): pyth_lazer_transaction.DynamicValue.Map; + + /** + * Verifies a Map 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 Map message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Map + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.DynamicValue.Map; + + /** + * Creates a plain object from a Map message. Also converts values to other types if specified. + * @param message Map + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.DynamicValue.Map, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Map to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Map + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } +} + +/** Namespace google. */ +export namespace google { + + /** Namespace protobuf. */ + namespace protobuf { + + /** Properties of a Timestamp. */ + interface ITimestamp { + + /** Timestamp seconds */ + seconds?: (number|Long|null); + + /** Timestamp nanos */ + nanos?: (number|null); + } + + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { + + /** + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ITimestamp); + + /** Timestamp seconds. */ + public seconds: (number|Long); + + /** Timestamp nanos. */ + public nanos: number; + + /** + * Creates a new Timestamp instance using the specified properties. + * @param [properties] Properties to set + * @returns Timestamp instance + */ + public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Timestamp + * @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.Timestamp; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Timestamp + * @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.Timestamp; + + /** + * Verifies a Timestamp 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 Timestamp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Timestamp + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @param message Timestamp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Timestamp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Timestamp + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Duration. */ + interface IDuration { + + /** Duration seconds */ + seconds?: (number|Long|null); + + /** Duration nanos */ + nanos?: (number|null); + } + + /** Represents a Duration. */ + class Duration implements IDuration { + + /** + * Constructs a new Duration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDuration); + + /** Duration seconds. */ + public seconds: (number|Long); + + /** Duration nanos. */ + public nanos: number; + + /** + * Creates a new Duration instance using the specified properties. + * @param [properties] Properties to set + * @returns Duration instance + */ + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Duration + * @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.Duration; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Duration + * @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.Duration; + + /** + * Verifies a Duration 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 Duration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Duration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @param message Duration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Duration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Duration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** 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 }; + + /** + * Gets the default type url for Empty + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } +} diff --git a/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/generated/governance_instruction.js b/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/generated/governance_instruction.js new file mode 100644 index 0000000000..74b76e45d3 --- /dev/null +++ b/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/generated/governance_instruction.js @@ -0,0 +1,10022 @@ +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +import * as $protobuf from "protobufjs/minimal"; + +// Common aliases +const $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + +// Exported root namespace +const $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); + +export const pyth_lazer_transaction = $root.pyth_lazer_transaction = (() => { + + /** + * Namespace pyth_lazer_transaction. + * @exports pyth_lazer_transaction + * @namespace + */ + const pyth_lazer_transaction = {}; + + pyth_lazer_transaction.GovernanceInstruction = (function() { + + /** + * Properties of a GovernanceInstruction. + * @memberof pyth_lazer_transaction + * @interface IGovernanceInstruction + * @property {pyth_lazer_transaction.IGovernanceSource|null} [source] GovernanceInstruction source + * @property {Array.|null} [directives] GovernanceInstruction directives + * @property {google.protobuf.ITimestamp|null} [minExecutionTimestamp] GovernanceInstruction minExecutionTimestamp + * @property {google.protobuf.ITimestamp|null} [maxExecutionTimestamp] GovernanceInstruction maxExecutionTimestamp + * @property {number|null} [governanceSequenceNo] GovernanceInstruction governanceSequenceNo + */ + + /** + * Constructs a new GovernanceInstruction. + * @memberof pyth_lazer_transaction + * @classdesc Represents a GovernanceInstruction. + * @implements IGovernanceInstruction + * @constructor + * @param {pyth_lazer_transaction.IGovernanceInstruction=} [properties] Properties to set + */ + function GovernanceInstruction(properties) { + this.directives = []; + 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]]; + } + + /** + * GovernanceInstruction source. + * @member {pyth_lazer_transaction.IGovernanceSource|null|undefined} source + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @instance + */ + GovernanceInstruction.prototype.source = null; + + /** + * GovernanceInstruction directives. + * @member {Array.} directives + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @instance + */ + GovernanceInstruction.prototype.directives = $util.emptyArray; + + /** + * GovernanceInstruction minExecutionTimestamp. + * @member {google.protobuf.ITimestamp|null|undefined} minExecutionTimestamp + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @instance + */ + GovernanceInstruction.prototype.minExecutionTimestamp = null; + + /** + * GovernanceInstruction maxExecutionTimestamp. + * @member {google.protobuf.ITimestamp|null|undefined} maxExecutionTimestamp + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @instance + */ + GovernanceInstruction.prototype.maxExecutionTimestamp = null; + + /** + * GovernanceInstruction governanceSequenceNo. + * @member {number|null|undefined} governanceSequenceNo + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @instance + */ + GovernanceInstruction.prototype.governanceSequenceNo = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * GovernanceInstruction _source. + * @member {"source"|undefined} _source + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @instance + */ + Object.defineProperty(GovernanceInstruction.prototype, "_source", { + get: $util.oneOfGetter($oneOfFields = ["source"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * GovernanceInstruction _minExecutionTimestamp. + * @member {"minExecutionTimestamp"|undefined} _minExecutionTimestamp + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @instance + */ + Object.defineProperty(GovernanceInstruction.prototype, "_minExecutionTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["minExecutionTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * GovernanceInstruction _maxExecutionTimestamp. + * @member {"maxExecutionTimestamp"|undefined} _maxExecutionTimestamp + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @instance + */ + Object.defineProperty(GovernanceInstruction.prototype, "_maxExecutionTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["maxExecutionTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * GovernanceInstruction _governanceSequenceNo. + * @member {"governanceSequenceNo"|undefined} _governanceSequenceNo + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @instance + */ + Object.defineProperty(GovernanceInstruction.prototype, "_governanceSequenceNo", { + get: $util.oneOfGetter($oneOfFields = ["governanceSequenceNo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GovernanceInstruction instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @static + * @param {pyth_lazer_transaction.IGovernanceInstruction=} [properties] Properties to set + * @returns {pyth_lazer_transaction.GovernanceInstruction} GovernanceInstruction instance + */ + GovernanceInstruction.create = function create(properties) { + return new GovernanceInstruction(properties); + }; + + /** + * Encodes the specified GovernanceInstruction message. Does not implicitly {@link pyth_lazer_transaction.GovernanceInstruction.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @static + * @param {pyth_lazer_transaction.IGovernanceInstruction} message GovernanceInstruction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GovernanceInstruction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.source != null && Object.hasOwnProperty.call(message, "source")) + $root.pyth_lazer_transaction.GovernanceSource.encode(message.source, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.directives != null && message.directives.length) + for (let i = 0; i < message.directives.length; ++i) + $root.pyth_lazer_transaction.GovernanceDirective.encode(message.directives[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.minExecutionTimestamp != null && Object.hasOwnProperty.call(message, "minExecutionTimestamp")) + $root.google.protobuf.Timestamp.encode(message.minExecutionTimestamp, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.maxExecutionTimestamp != null && Object.hasOwnProperty.call(message, "maxExecutionTimestamp")) + $root.google.protobuf.Timestamp.encode(message.maxExecutionTimestamp, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.governanceSequenceNo != null && Object.hasOwnProperty.call(message, "governanceSequenceNo")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.governanceSequenceNo); + return writer; + }; + + /** + * Encodes the specified GovernanceInstruction message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceInstruction.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @static + * @param {pyth_lazer_transaction.IGovernanceInstruction} message GovernanceInstruction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GovernanceInstruction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GovernanceInstruction message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.GovernanceInstruction} GovernanceInstruction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GovernanceInstruction.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.GovernanceInstruction(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.source = $root.pyth_lazer_transaction.GovernanceSource.decode(reader, reader.uint32()); + break; + } + case 2: { + if (!(message.directives && message.directives.length)) + message.directives = []; + message.directives.push($root.pyth_lazer_transaction.GovernanceDirective.decode(reader, reader.uint32())); + break; + } + case 3: { + message.minExecutionTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.maxExecutionTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.governanceSequenceNo = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GovernanceInstruction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.GovernanceInstruction} GovernanceInstruction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GovernanceInstruction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GovernanceInstruction message. + * @function verify + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GovernanceInstruction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if (message.source != null && message.hasOwnProperty("source")) { + properties._source = 1; + { + let error = $root.pyth_lazer_transaction.GovernanceSource.verify(message.source); + if (error) + return "source." + error; + } + } + if (message.directives != null && message.hasOwnProperty("directives")) { + if (!Array.isArray(message.directives)) + return "directives: array expected"; + for (let i = 0; i < message.directives.length; ++i) { + let error = $root.pyth_lazer_transaction.GovernanceDirective.verify(message.directives[i]); + if (error) + return "directives." + error; + } + } + if (message.minExecutionTimestamp != null && message.hasOwnProperty("minExecutionTimestamp")) { + properties._minExecutionTimestamp = 1; + { + let error = $root.google.protobuf.Timestamp.verify(message.minExecutionTimestamp); + if (error) + return "minExecutionTimestamp." + error; + } + } + if (message.maxExecutionTimestamp != null && message.hasOwnProperty("maxExecutionTimestamp")) { + properties._maxExecutionTimestamp = 1; + { + let error = $root.google.protobuf.Timestamp.verify(message.maxExecutionTimestamp); + if (error) + return "maxExecutionTimestamp." + error; + } + } + if (message.governanceSequenceNo != null && message.hasOwnProperty("governanceSequenceNo")) { + properties._governanceSequenceNo = 1; + if (!$util.isInteger(message.governanceSequenceNo)) + return "governanceSequenceNo: integer expected"; + } + return null; + }; + + /** + * Creates a GovernanceInstruction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.GovernanceInstruction} GovernanceInstruction + */ + GovernanceInstruction.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.GovernanceInstruction) + return object; + let message = new $root.pyth_lazer_transaction.GovernanceInstruction(); + if (object.source != null) { + if (typeof object.source !== "object") + throw TypeError(".pyth_lazer_transaction.GovernanceInstruction.source: object expected"); + message.source = $root.pyth_lazer_transaction.GovernanceSource.fromObject(object.source); + } + if (object.directives) { + if (!Array.isArray(object.directives)) + throw TypeError(".pyth_lazer_transaction.GovernanceInstruction.directives: array expected"); + message.directives = []; + for (let i = 0; i < object.directives.length; ++i) { + if (typeof object.directives[i] !== "object") + throw TypeError(".pyth_lazer_transaction.GovernanceInstruction.directives: object expected"); + message.directives[i] = $root.pyth_lazer_transaction.GovernanceDirective.fromObject(object.directives[i]); + } + } + if (object.minExecutionTimestamp != null) { + if (typeof object.minExecutionTimestamp !== "object") + throw TypeError(".pyth_lazer_transaction.GovernanceInstruction.minExecutionTimestamp: object expected"); + message.minExecutionTimestamp = $root.google.protobuf.Timestamp.fromObject(object.minExecutionTimestamp); + } + if (object.maxExecutionTimestamp != null) { + if (typeof object.maxExecutionTimestamp !== "object") + throw TypeError(".pyth_lazer_transaction.GovernanceInstruction.maxExecutionTimestamp: object expected"); + message.maxExecutionTimestamp = $root.google.protobuf.Timestamp.fromObject(object.maxExecutionTimestamp); + } + if (object.governanceSequenceNo != null) + message.governanceSequenceNo = object.governanceSequenceNo >>> 0; + return message; + }; + + /** + * Creates a plain object from a GovernanceInstruction message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @static + * @param {pyth_lazer_transaction.GovernanceInstruction} message GovernanceInstruction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GovernanceInstruction.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.directives = []; + if (message.source != null && message.hasOwnProperty("source")) { + object.source = $root.pyth_lazer_transaction.GovernanceSource.toObject(message.source, options); + if (options.oneofs) + object._source = "source"; + } + if (message.directives && message.directives.length) { + object.directives = []; + for (let j = 0; j < message.directives.length; ++j) + object.directives[j] = $root.pyth_lazer_transaction.GovernanceDirective.toObject(message.directives[j], options); + } + if (message.minExecutionTimestamp != null && message.hasOwnProperty("minExecutionTimestamp")) { + object.minExecutionTimestamp = $root.google.protobuf.Timestamp.toObject(message.minExecutionTimestamp, options); + if (options.oneofs) + object._minExecutionTimestamp = "minExecutionTimestamp"; + } + if (message.maxExecutionTimestamp != null && message.hasOwnProperty("maxExecutionTimestamp")) { + object.maxExecutionTimestamp = $root.google.protobuf.Timestamp.toObject(message.maxExecutionTimestamp, options); + if (options.oneofs) + object._maxExecutionTimestamp = "maxExecutionTimestamp"; + } + if (message.governanceSequenceNo != null && message.hasOwnProperty("governanceSequenceNo")) { + object.governanceSequenceNo = message.governanceSequenceNo; + if (options.oneofs) + object._governanceSequenceNo = "governanceSequenceNo"; + } + return object; + }; + + /** + * Converts this GovernanceInstruction to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @instance + * @returns {Object.} JSON object + */ + GovernanceInstruction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GovernanceInstruction + * @function getTypeUrl + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GovernanceInstruction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.GovernanceInstruction"; + }; + + return GovernanceInstruction; + })(); + + pyth_lazer_transaction.ShardFilter = (function() { + + /** + * Properties of a ShardFilter. + * @memberof pyth_lazer_transaction + * @interface IShardFilter + * @property {google.protobuf.IEmpty|null} [allShards] ShardFilter allShards + * @property {pyth_lazer_transaction.ShardFilter.IShardNames|null} [shardNames] ShardFilter shardNames + * @property {pyth_lazer_transaction.ShardFilter.IShardGroups|null} [shardGroups] ShardFilter shardGroups + */ + + /** + * Constructs a new ShardFilter. + * @memberof pyth_lazer_transaction + * @classdesc Represents a ShardFilter. + * @implements IShardFilter + * @constructor + * @param {pyth_lazer_transaction.IShardFilter=} [properties] Properties to set + */ + function ShardFilter(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]]; + } + + /** + * ShardFilter allShards. + * @member {google.protobuf.IEmpty|null|undefined} allShards + * @memberof pyth_lazer_transaction.ShardFilter + * @instance + */ + ShardFilter.prototype.allShards = null; + + /** + * ShardFilter shardNames. + * @member {pyth_lazer_transaction.ShardFilter.IShardNames|null|undefined} shardNames + * @memberof pyth_lazer_transaction.ShardFilter + * @instance + */ + ShardFilter.prototype.shardNames = null; + + /** + * ShardFilter shardGroups. + * @member {pyth_lazer_transaction.ShardFilter.IShardGroups|null|undefined} shardGroups + * @memberof pyth_lazer_transaction.ShardFilter + * @instance + */ + ShardFilter.prototype.shardGroups = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * ShardFilter filter. + * @member {"allShards"|"shardNames"|"shardGroups"|undefined} filter + * @memberof pyth_lazer_transaction.ShardFilter + * @instance + */ + Object.defineProperty(ShardFilter.prototype, "filter", { + get: $util.oneOfGetter($oneOfFields = ["allShards", "shardNames", "shardGroups"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ShardFilter instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.ShardFilter + * @static + * @param {pyth_lazer_transaction.IShardFilter=} [properties] Properties to set + * @returns {pyth_lazer_transaction.ShardFilter} ShardFilter instance + */ + ShardFilter.create = function create(properties) { + return new ShardFilter(properties); + }; + + /** + * Encodes the specified ShardFilter message. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.ShardFilter + * @static + * @param {pyth_lazer_transaction.IShardFilter} message ShardFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ShardFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allShards != null && Object.hasOwnProperty.call(message, "allShards")) + $root.google.protobuf.Empty.encode(message.allShards, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.shardNames != null && Object.hasOwnProperty.call(message, "shardNames")) + $root.pyth_lazer_transaction.ShardFilter.ShardNames.encode(message.shardNames, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.shardGroups != null && Object.hasOwnProperty.call(message, "shardGroups")) + $root.pyth_lazer_transaction.ShardFilter.ShardGroups.encode(message.shardGroups, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ShardFilter message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.ShardFilter + * @static + * @param {pyth_lazer_transaction.IShardFilter} message ShardFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ShardFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ShardFilter message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.ShardFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.ShardFilter} ShardFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ShardFilter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.ShardFilter(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.allShards = $root.google.protobuf.Empty.decode(reader, reader.uint32()); + break; + } + case 2: { + message.shardNames = $root.pyth_lazer_transaction.ShardFilter.ShardNames.decode(reader, reader.uint32()); + break; + } + case 3: { + message.shardGroups = $root.pyth_lazer_transaction.ShardFilter.ShardGroups.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ShardFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.ShardFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.ShardFilter} ShardFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ShardFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ShardFilter message. + * @function verify + * @memberof pyth_lazer_transaction.ShardFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ShardFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if (message.allShards != null && message.hasOwnProperty("allShards")) { + properties.filter = 1; + { + let error = $root.google.protobuf.Empty.verify(message.allShards); + if (error) + return "allShards." + error; + } + } + if (message.shardNames != null && message.hasOwnProperty("shardNames")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + { + let error = $root.pyth_lazer_transaction.ShardFilter.ShardNames.verify(message.shardNames); + if (error) + return "shardNames." + error; + } + } + if (message.shardGroups != null && message.hasOwnProperty("shardGroups")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + { + let error = $root.pyth_lazer_transaction.ShardFilter.ShardGroups.verify(message.shardGroups); + if (error) + return "shardGroups." + error; + } + } + return null; + }; + + /** + * Creates a ShardFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.ShardFilter + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.ShardFilter} ShardFilter + */ + ShardFilter.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.ShardFilter) + return object; + let message = new $root.pyth_lazer_transaction.ShardFilter(); + if (object.allShards != null) { + if (typeof object.allShards !== "object") + throw TypeError(".pyth_lazer_transaction.ShardFilter.allShards: object expected"); + message.allShards = $root.google.protobuf.Empty.fromObject(object.allShards); + } + if (object.shardNames != null) { + if (typeof object.shardNames !== "object") + throw TypeError(".pyth_lazer_transaction.ShardFilter.shardNames: object expected"); + message.shardNames = $root.pyth_lazer_transaction.ShardFilter.ShardNames.fromObject(object.shardNames); + } + if (object.shardGroups != null) { + if (typeof object.shardGroups !== "object") + throw TypeError(".pyth_lazer_transaction.ShardFilter.shardGroups: object expected"); + message.shardGroups = $root.pyth_lazer_transaction.ShardFilter.ShardGroups.fromObject(object.shardGroups); + } + return message; + }; + + /** + * Creates a plain object from a ShardFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.ShardFilter + * @static + * @param {pyth_lazer_transaction.ShardFilter} message ShardFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ShardFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (message.allShards != null && message.hasOwnProperty("allShards")) { + object.allShards = $root.google.protobuf.Empty.toObject(message.allShards, options); + if (options.oneofs) + object.filter = "allShards"; + } + if (message.shardNames != null && message.hasOwnProperty("shardNames")) { + object.shardNames = $root.pyth_lazer_transaction.ShardFilter.ShardNames.toObject(message.shardNames, options); + if (options.oneofs) + object.filter = "shardNames"; + } + if (message.shardGroups != null && message.hasOwnProperty("shardGroups")) { + object.shardGroups = $root.pyth_lazer_transaction.ShardFilter.ShardGroups.toObject(message.shardGroups, options); + if (options.oneofs) + object.filter = "shardGroups"; + } + return object; + }; + + /** + * Converts this ShardFilter to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.ShardFilter + * @instance + * @returns {Object.} JSON object + */ + ShardFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ShardFilter + * @function getTypeUrl + * @memberof pyth_lazer_transaction.ShardFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ShardFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.ShardFilter"; + }; + + ShardFilter.ShardNames = (function() { + + /** + * Properties of a ShardNames. + * @memberof pyth_lazer_transaction.ShardFilter + * @interface IShardNames + * @property {Array.|null} [shardNames] ShardNames shardNames + */ + + /** + * Constructs a new ShardNames. + * @memberof pyth_lazer_transaction.ShardFilter + * @classdesc Represents a ShardNames. + * @implements IShardNames + * @constructor + * @param {pyth_lazer_transaction.ShardFilter.IShardNames=} [properties] Properties to set + */ + function ShardNames(properties) { + this.shardNames = []; + 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]]; + } + + /** + * ShardNames shardNames. + * @member {Array.} shardNames + * @memberof pyth_lazer_transaction.ShardFilter.ShardNames + * @instance + */ + ShardNames.prototype.shardNames = $util.emptyArray; + + /** + * Creates a new ShardNames instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.ShardFilter.ShardNames + * @static + * @param {pyth_lazer_transaction.ShardFilter.IShardNames=} [properties] Properties to set + * @returns {pyth_lazer_transaction.ShardFilter.ShardNames} ShardNames instance + */ + ShardNames.create = function create(properties) { + return new ShardNames(properties); + }; + + /** + * Encodes the specified ShardNames message. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardNames.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.ShardFilter.ShardNames + * @static + * @param {pyth_lazer_transaction.ShardFilter.IShardNames} message ShardNames message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ShardNames.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.shardNames != null && message.shardNames.length) + for (let i = 0; i < message.shardNames.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.shardNames[i]); + return writer; + }; + + /** + * Encodes the specified ShardNames message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardNames.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.ShardFilter.ShardNames + * @static + * @param {pyth_lazer_transaction.ShardFilter.IShardNames} message ShardNames message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ShardNames.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ShardNames message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.ShardFilter.ShardNames + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.ShardFilter.ShardNames} ShardNames + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ShardNames.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.ShardFilter.ShardNames(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.shardNames && message.shardNames.length)) + message.shardNames = []; + message.shardNames.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ShardNames message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.ShardFilter.ShardNames + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.ShardFilter.ShardNames} ShardNames + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ShardNames.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ShardNames message. + * @function verify + * @memberof pyth_lazer_transaction.ShardFilter.ShardNames + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ShardNames.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.shardNames != null && message.hasOwnProperty("shardNames")) { + if (!Array.isArray(message.shardNames)) + return "shardNames: array expected"; + for (let i = 0; i < message.shardNames.length; ++i) + if (!$util.isString(message.shardNames[i])) + return "shardNames: string[] expected"; + } + return null; + }; + + /** + * Creates a ShardNames message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.ShardFilter.ShardNames + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.ShardFilter.ShardNames} ShardNames + */ + ShardNames.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.ShardFilter.ShardNames) + return object; + let message = new $root.pyth_lazer_transaction.ShardFilter.ShardNames(); + if (object.shardNames) { + if (!Array.isArray(object.shardNames)) + throw TypeError(".pyth_lazer_transaction.ShardFilter.ShardNames.shardNames: array expected"); + message.shardNames = []; + for (let i = 0; i < object.shardNames.length; ++i) + message.shardNames[i] = String(object.shardNames[i]); + } + return message; + }; + + /** + * Creates a plain object from a ShardNames message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.ShardFilter.ShardNames + * @static + * @param {pyth_lazer_transaction.ShardFilter.ShardNames} message ShardNames + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ShardNames.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.shardNames = []; + if (message.shardNames && message.shardNames.length) { + object.shardNames = []; + for (let j = 0; j < message.shardNames.length; ++j) + object.shardNames[j] = message.shardNames[j]; + } + return object; + }; + + /** + * Converts this ShardNames to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.ShardFilter.ShardNames + * @instance + * @returns {Object.} JSON object + */ + ShardNames.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ShardNames + * @function getTypeUrl + * @memberof pyth_lazer_transaction.ShardFilter.ShardNames + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ShardNames.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.ShardFilter.ShardNames"; + }; + + return ShardNames; + })(); + + ShardFilter.ShardGroups = (function() { + + /** + * Properties of a ShardGroups. + * @memberof pyth_lazer_transaction.ShardFilter + * @interface IShardGroups + * @property {Array.|null} [shardGroups] ShardGroups shardGroups + */ + + /** + * Constructs a new ShardGroups. + * @memberof pyth_lazer_transaction.ShardFilter + * @classdesc Represents a ShardGroups. + * @implements IShardGroups + * @constructor + * @param {pyth_lazer_transaction.ShardFilter.IShardGroups=} [properties] Properties to set + */ + function ShardGroups(properties) { + this.shardGroups = []; + 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]]; + } + + /** + * ShardGroups shardGroups. + * @member {Array.} shardGroups + * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups + * @instance + */ + ShardGroups.prototype.shardGroups = $util.emptyArray; + + /** + * Creates a new ShardGroups instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups + * @static + * @param {pyth_lazer_transaction.ShardFilter.IShardGroups=} [properties] Properties to set + * @returns {pyth_lazer_transaction.ShardFilter.ShardGroups} ShardGroups instance + */ + ShardGroups.create = function create(properties) { + return new ShardGroups(properties); + }; + + /** + * Encodes the specified ShardGroups message. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardGroups.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups + * @static + * @param {pyth_lazer_transaction.ShardFilter.IShardGroups} message ShardGroups message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ShardGroups.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.shardGroups != null && message.shardGroups.length) + for (let i = 0; i < message.shardGroups.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.shardGroups[i]); + return writer; + }; + + /** + * Encodes the specified ShardGroups message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardGroups.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups + * @static + * @param {pyth_lazer_transaction.ShardFilter.IShardGroups} message ShardGroups message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ShardGroups.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ShardGroups message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.ShardFilter.ShardGroups} ShardGroups + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ShardGroups.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.ShardFilter.ShardGroups(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.shardGroups && message.shardGroups.length)) + message.shardGroups = []; + message.shardGroups.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ShardGroups message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.ShardFilter.ShardGroups} ShardGroups + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ShardGroups.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ShardGroups message. + * @function verify + * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ShardGroups.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.shardGroups != null && message.hasOwnProperty("shardGroups")) { + if (!Array.isArray(message.shardGroups)) + return "shardGroups: array expected"; + for (let i = 0; i < message.shardGroups.length; ++i) + if (!$util.isString(message.shardGroups[i])) + return "shardGroups: string[] expected"; + } + return null; + }; + + /** + * Creates a ShardGroups message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.ShardFilter.ShardGroups} ShardGroups + */ + ShardGroups.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.ShardFilter.ShardGroups) + return object; + let message = new $root.pyth_lazer_transaction.ShardFilter.ShardGroups(); + if (object.shardGroups) { + if (!Array.isArray(object.shardGroups)) + throw TypeError(".pyth_lazer_transaction.ShardFilter.ShardGroups.shardGroups: array expected"); + message.shardGroups = []; + for (let i = 0; i < object.shardGroups.length; ++i) + message.shardGroups[i] = String(object.shardGroups[i]); + } + return message; + }; + + /** + * Creates a plain object from a ShardGroups message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups + * @static + * @param {pyth_lazer_transaction.ShardFilter.ShardGroups} message ShardGroups + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ShardGroups.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.shardGroups = []; + if (message.shardGroups && message.shardGroups.length) { + object.shardGroups = []; + for (let j = 0; j < message.shardGroups.length; ++j) + object.shardGroups[j] = message.shardGroups[j]; + } + return object; + }; + + /** + * Converts this ShardGroups to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups + * @instance + * @returns {Object.} JSON object + */ + ShardGroups.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ShardGroups + * @function getTypeUrl + * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ShardGroups.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.ShardFilter.ShardGroups"; + }; + + return ShardGroups; + })(); + + return ShardFilter; + })(); + + pyth_lazer_transaction.GovernanceDirective = (function() { + + /** + * Properties of a GovernanceDirective. + * @memberof pyth_lazer_transaction + * @interface IGovernanceDirective + * @property {pyth_lazer_transaction.IShardFilter|null} [shardFilter] GovernanceDirective shardFilter + * @property {pyth_lazer_transaction.ICreateShard|null} [createShard] GovernanceDirective createShard + * @property {pyth_lazer_transaction.IAddGovernanceSource|null} [addGovernanceSource] GovernanceDirective addGovernanceSource + * @property {pyth_lazer_transaction.IUpdateGovernanceSource|null} [updateGovernanceSource] GovernanceDirective updateGovernanceSource + * @property {pyth_lazer_transaction.ISetShardName|null} [setShardName] GovernanceDirective setShardName + * @property {pyth_lazer_transaction.ISetShardGroup|null} [setShardGroup] GovernanceDirective setShardGroup + * @property {pyth_lazer_transaction.IResetLastSequenceNo|null} [resetLastSequenceNo] GovernanceDirective resetLastSequenceNo + * @property {pyth_lazer_transaction.IAddPublisher|null} [addPublisher] GovernanceDirective addPublisher + * @property {pyth_lazer_transaction.IUpdatePublisher|null} [updatePublisher] GovernanceDirective updatePublisher + * @property {pyth_lazer_transaction.IAddFeed|null} [addFeed] GovernanceDirective addFeed + * @property {pyth_lazer_transaction.IUpdateFeed|null} [updateFeed] GovernanceDirective updateFeed + */ + + /** + * Constructs a new GovernanceDirective. + * @memberof pyth_lazer_transaction + * @classdesc Represents a GovernanceDirective. + * @implements IGovernanceDirective + * @constructor + * @param {pyth_lazer_transaction.IGovernanceDirective=} [properties] Properties to set + */ + function GovernanceDirective(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]]; + } + + /** + * GovernanceDirective shardFilter. + * @member {pyth_lazer_transaction.IShardFilter|null|undefined} shardFilter + * @memberof pyth_lazer_transaction.GovernanceDirective + * @instance + */ + GovernanceDirective.prototype.shardFilter = null; + + /** + * GovernanceDirective createShard. + * @member {pyth_lazer_transaction.ICreateShard|null|undefined} createShard + * @memberof pyth_lazer_transaction.GovernanceDirective + * @instance + */ + GovernanceDirective.prototype.createShard = null; + + /** + * GovernanceDirective addGovernanceSource. + * @member {pyth_lazer_transaction.IAddGovernanceSource|null|undefined} addGovernanceSource + * @memberof pyth_lazer_transaction.GovernanceDirective + * @instance + */ + GovernanceDirective.prototype.addGovernanceSource = null; + + /** + * GovernanceDirective updateGovernanceSource. + * @member {pyth_lazer_transaction.IUpdateGovernanceSource|null|undefined} updateGovernanceSource + * @memberof pyth_lazer_transaction.GovernanceDirective + * @instance + */ + GovernanceDirective.prototype.updateGovernanceSource = null; + + /** + * GovernanceDirective setShardName. + * @member {pyth_lazer_transaction.ISetShardName|null|undefined} setShardName + * @memberof pyth_lazer_transaction.GovernanceDirective + * @instance + */ + GovernanceDirective.prototype.setShardName = null; + + /** + * GovernanceDirective setShardGroup. + * @member {pyth_lazer_transaction.ISetShardGroup|null|undefined} setShardGroup + * @memberof pyth_lazer_transaction.GovernanceDirective + * @instance + */ + GovernanceDirective.prototype.setShardGroup = null; + + /** + * GovernanceDirective resetLastSequenceNo. + * @member {pyth_lazer_transaction.IResetLastSequenceNo|null|undefined} resetLastSequenceNo + * @memberof pyth_lazer_transaction.GovernanceDirective + * @instance + */ + GovernanceDirective.prototype.resetLastSequenceNo = null; + + /** + * GovernanceDirective addPublisher. + * @member {pyth_lazer_transaction.IAddPublisher|null|undefined} addPublisher + * @memberof pyth_lazer_transaction.GovernanceDirective + * @instance + */ + GovernanceDirective.prototype.addPublisher = null; + + /** + * GovernanceDirective updatePublisher. + * @member {pyth_lazer_transaction.IUpdatePublisher|null|undefined} updatePublisher + * @memberof pyth_lazer_transaction.GovernanceDirective + * @instance + */ + GovernanceDirective.prototype.updatePublisher = null; + + /** + * GovernanceDirective addFeed. + * @member {pyth_lazer_transaction.IAddFeed|null|undefined} addFeed + * @memberof pyth_lazer_transaction.GovernanceDirective + * @instance + */ + GovernanceDirective.prototype.addFeed = null; + + /** + * GovernanceDirective updateFeed. + * @member {pyth_lazer_transaction.IUpdateFeed|null|undefined} updateFeed + * @memberof pyth_lazer_transaction.GovernanceDirective + * @instance + */ + GovernanceDirective.prototype.updateFeed = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * GovernanceDirective _shardFilter. + * @member {"shardFilter"|undefined} _shardFilter + * @memberof pyth_lazer_transaction.GovernanceDirective + * @instance + */ + Object.defineProperty(GovernanceDirective.prototype, "_shardFilter", { + get: $util.oneOfGetter($oneOfFields = ["shardFilter"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * GovernanceDirective action. + * @member {"createShard"|"addGovernanceSource"|"updateGovernanceSource"|"setShardName"|"setShardGroup"|"resetLastSequenceNo"|"addPublisher"|"updatePublisher"|"addFeed"|"updateFeed"|undefined} action + * @memberof pyth_lazer_transaction.GovernanceDirective + * @instance + */ + Object.defineProperty(GovernanceDirective.prototype, "action", { + get: $util.oneOfGetter($oneOfFields = ["createShard", "addGovernanceSource", "updateGovernanceSource", "setShardName", "setShardGroup", "resetLastSequenceNo", "addPublisher", "updatePublisher", "addFeed", "updateFeed"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GovernanceDirective instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.GovernanceDirective + * @static + * @param {pyth_lazer_transaction.IGovernanceDirective=} [properties] Properties to set + * @returns {pyth_lazer_transaction.GovernanceDirective} GovernanceDirective instance + */ + GovernanceDirective.create = function create(properties) { + return new GovernanceDirective(properties); + }; + + /** + * Encodes the specified GovernanceDirective message. Does not implicitly {@link pyth_lazer_transaction.GovernanceDirective.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.GovernanceDirective + * @static + * @param {pyth_lazer_transaction.IGovernanceDirective} message GovernanceDirective message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GovernanceDirective.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.shardFilter != null && Object.hasOwnProperty.call(message, "shardFilter")) + $root.pyth_lazer_transaction.ShardFilter.encode(message.shardFilter, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.createShard != null && Object.hasOwnProperty.call(message, "createShard")) + $root.pyth_lazer_transaction.CreateShard.encode(message.createShard, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); + if (message.addGovernanceSource != null && Object.hasOwnProperty.call(message, "addGovernanceSource")) + $root.pyth_lazer_transaction.AddGovernanceSource.encode(message.addGovernanceSource, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); + if (message.updateGovernanceSource != null && Object.hasOwnProperty.call(message, "updateGovernanceSource")) + $root.pyth_lazer_transaction.UpdateGovernanceSource.encode(message.updateGovernanceSource, writer.uint32(/* id 103, wireType 2 =*/826).fork()).ldelim(); + if (message.setShardName != null && Object.hasOwnProperty.call(message, "setShardName")) + $root.pyth_lazer_transaction.SetShardName.encode(message.setShardName, writer.uint32(/* id 104, wireType 2 =*/834).fork()).ldelim(); + if (message.setShardGroup != null && Object.hasOwnProperty.call(message, "setShardGroup")) + $root.pyth_lazer_transaction.SetShardGroup.encode(message.setShardGroup, writer.uint32(/* id 105, wireType 2 =*/842).fork()).ldelim(); + if (message.resetLastSequenceNo != null && Object.hasOwnProperty.call(message, "resetLastSequenceNo")) + $root.pyth_lazer_transaction.ResetLastSequenceNo.encode(message.resetLastSequenceNo, writer.uint32(/* id 106, wireType 2 =*/850).fork()).ldelim(); + if (message.addPublisher != null && Object.hasOwnProperty.call(message, "addPublisher")) + $root.pyth_lazer_transaction.AddPublisher.encode(message.addPublisher, writer.uint32(/* id 107, wireType 2 =*/858).fork()).ldelim(); + if (message.updatePublisher != null && Object.hasOwnProperty.call(message, "updatePublisher")) + $root.pyth_lazer_transaction.UpdatePublisher.encode(message.updatePublisher, writer.uint32(/* id 108, wireType 2 =*/866).fork()).ldelim(); + if (message.addFeed != null && Object.hasOwnProperty.call(message, "addFeed")) + $root.pyth_lazer_transaction.AddFeed.encode(message.addFeed, writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim(); + if (message.updateFeed != null && Object.hasOwnProperty.call(message, "updateFeed")) + $root.pyth_lazer_transaction.UpdateFeed.encode(message.updateFeed, writer.uint32(/* id 110, wireType 2 =*/882).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GovernanceDirective message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceDirective.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.GovernanceDirective + * @static + * @param {pyth_lazer_transaction.IGovernanceDirective} message GovernanceDirective message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GovernanceDirective.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GovernanceDirective message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.GovernanceDirective + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.GovernanceDirective} GovernanceDirective + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GovernanceDirective.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.GovernanceDirective(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.shardFilter = $root.pyth_lazer_transaction.ShardFilter.decode(reader, reader.uint32()); + break; + } + case 101: { + message.createShard = $root.pyth_lazer_transaction.CreateShard.decode(reader, reader.uint32()); + break; + } + case 102: { + message.addGovernanceSource = $root.pyth_lazer_transaction.AddGovernanceSource.decode(reader, reader.uint32()); + break; + } + case 103: { + message.updateGovernanceSource = $root.pyth_lazer_transaction.UpdateGovernanceSource.decode(reader, reader.uint32()); + break; + } + case 104: { + message.setShardName = $root.pyth_lazer_transaction.SetShardName.decode(reader, reader.uint32()); + break; + } + case 105: { + message.setShardGroup = $root.pyth_lazer_transaction.SetShardGroup.decode(reader, reader.uint32()); + break; + } + case 106: { + message.resetLastSequenceNo = $root.pyth_lazer_transaction.ResetLastSequenceNo.decode(reader, reader.uint32()); + break; + } + case 107: { + message.addPublisher = $root.pyth_lazer_transaction.AddPublisher.decode(reader, reader.uint32()); + break; + } + case 108: { + message.updatePublisher = $root.pyth_lazer_transaction.UpdatePublisher.decode(reader, reader.uint32()); + break; + } + case 109: { + message.addFeed = $root.pyth_lazer_transaction.AddFeed.decode(reader, reader.uint32()); + break; + } + case 110: { + message.updateFeed = $root.pyth_lazer_transaction.UpdateFeed.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GovernanceDirective message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.GovernanceDirective + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.GovernanceDirective} GovernanceDirective + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GovernanceDirective.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GovernanceDirective message. + * @function verify + * @memberof pyth_lazer_transaction.GovernanceDirective + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GovernanceDirective.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if (message.shardFilter != null && message.hasOwnProperty("shardFilter")) { + properties._shardFilter = 1; + { + let error = $root.pyth_lazer_transaction.ShardFilter.verify(message.shardFilter); + if (error) + return "shardFilter." + error; + } + } + if (message.createShard != null && message.hasOwnProperty("createShard")) { + properties.action = 1; + { + let error = $root.pyth_lazer_transaction.CreateShard.verify(message.createShard); + if (error) + return "createShard." + error; + } + } + if (message.addGovernanceSource != null && message.hasOwnProperty("addGovernanceSource")) { + if (properties.action === 1) + return "action: multiple values"; + properties.action = 1; + { + let error = $root.pyth_lazer_transaction.AddGovernanceSource.verify(message.addGovernanceSource); + if (error) + return "addGovernanceSource." + error; + } + } + if (message.updateGovernanceSource != null && message.hasOwnProperty("updateGovernanceSource")) { + if (properties.action === 1) + return "action: multiple values"; + properties.action = 1; + { + let error = $root.pyth_lazer_transaction.UpdateGovernanceSource.verify(message.updateGovernanceSource); + if (error) + return "updateGovernanceSource." + error; + } + } + if (message.setShardName != null && message.hasOwnProperty("setShardName")) { + if (properties.action === 1) + return "action: multiple values"; + properties.action = 1; + { + let error = $root.pyth_lazer_transaction.SetShardName.verify(message.setShardName); + if (error) + return "setShardName." + error; + } + } + if (message.setShardGroup != null && message.hasOwnProperty("setShardGroup")) { + if (properties.action === 1) + return "action: multiple values"; + properties.action = 1; + { + let error = $root.pyth_lazer_transaction.SetShardGroup.verify(message.setShardGroup); + if (error) + return "setShardGroup." + error; + } + } + if (message.resetLastSequenceNo != null && message.hasOwnProperty("resetLastSequenceNo")) { + if (properties.action === 1) + return "action: multiple values"; + properties.action = 1; + { + let error = $root.pyth_lazer_transaction.ResetLastSequenceNo.verify(message.resetLastSequenceNo); + if (error) + return "resetLastSequenceNo." + error; + } + } + if (message.addPublisher != null && message.hasOwnProperty("addPublisher")) { + if (properties.action === 1) + return "action: multiple values"; + properties.action = 1; + { + let error = $root.pyth_lazer_transaction.AddPublisher.verify(message.addPublisher); + if (error) + return "addPublisher." + error; + } + } + if (message.updatePublisher != null && message.hasOwnProperty("updatePublisher")) { + if (properties.action === 1) + return "action: multiple values"; + properties.action = 1; + { + let error = $root.pyth_lazer_transaction.UpdatePublisher.verify(message.updatePublisher); + if (error) + return "updatePublisher." + error; + } + } + if (message.addFeed != null && message.hasOwnProperty("addFeed")) { + if (properties.action === 1) + return "action: multiple values"; + properties.action = 1; + { + let error = $root.pyth_lazer_transaction.AddFeed.verify(message.addFeed); + if (error) + return "addFeed." + error; + } + } + if (message.updateFeed != null && message.hasOwnProperty("updateFeed")) { + if (properties.action === 1) + return "action: multiple values"; + properties.action = 1; + { + let error = $root.pyth_lazer_transaction.UpdateFeed.verify(message.updateFeed); + if (error) + return "updateFeed." + error; + } + } + return null; + }; + + /** + * Creates a GovernanceDirective message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.GovernanceDirective + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.GovernanceDirective} GovernanceDirective + */ + GovernanceDirective.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.GovernanceDirective) + return object; + let message = new $root.pyth_lazer_transaction.GovernanceDirective(); + if (object.shardFilter != null) { + if (typeof object.shardFilter !== "object") + throw TypeError(".pyth_lazer_transaction.GovernanceDirective.shardFilter: object expected"); + message.shardFilter = $root.pyth_lazer_transaction.ShardFilter.fromObject(object.shardFilter); + } + if (object.createShard != null) { + if (typeof object.createShard !== "object") + throw TypeError(".pyth_lazer_transaction.GovernanceDirective.createShard: object expected"); + message.createShard = $root.pyth_lazer_transaction.CreateShard.fromObject(object.createShard); + } + if (object.addGovernanceSource != null) { + if (typeof object.addGovernanceSource !== "object") + throw TypeError(".pyth_lazer_transaction.GovernanceDirective.addGovernanceSource: object expected"); + message.addGovernanceSource = $root.pyth_lazer_transaction.AddGovernanceSource.fromObject(object.addGovernanceSource); + } + if (object.updateGovernanceSource != null) { + if (typeof object.updateGovernanceSource !== "object") + throw TypeError(".pyth_lazer_transaction.GovernanceDirective.updateGovernanceSource: object expected"); + message.updateGovernanceSource = $root.pyth_lazer_transaction.UpdateGovernanceSource.fromObject(object.updateGovernanceSource); + } + if (object.setShardName != null) { + if (typeof object.setShardName !== "object") + throw TypeError(".pyth_lazer_transaction.GovernanceDirective.setShardName: object expected"); + message.setShardName = $root.pyth_lazer_transaction.SetShardName.fromObject(object.setShardName); + } + if (object.setShardGroup != null) { + if (typeof object.setShardGroup !== "object") + throw TypeError(".pyth_lazer_transaction.GovernanceDirective.setShardGroup: object expected"); + message.setShardGroup = $root.pyth_lazer_transaction.SetShardGroup.fromObject(object.setShardGroup); + } + if (object.resetLastSequenceNo != null) { + if (typeof object.resetLastSequenceNo !== "object") + throw TypeError(".pyth_lazer_transaction.GovernanceDirective.resetLastSequenceNo: object expected"); + message.resetLastSequenceNo = $root.pyth_lazer_transaction.ResetLastSequenceNo.fromObject(object.resetLastSequenceNo); + } + if (object.addPublisher != null) { + if (typeof object.addPublisher !== "object") + throw TypeError(".pyth_lazer_transaction.GovernanceDirective.addPublisher: object expected"); + message.addPublisher = $root.pyth_lazer_transaction.AddPublisher.fromObject(object.addPublisher); + } + if (object.updatePublisher != null) { + if (typeof object.updatePublisher !== "object") + throw TypeError(".pyth_lazer_transaction.GovernanceDirective.updatePublisher: object expected"); + message.updatePublisher = $root.pyth_lazer_transaction.UpdatePublisher.fromObject(object.updatePublisher); + } + if (object.addFeed != null) { + if (typeof object.addFeed !== "object") + throw TypeError(".pyth_lazer_transaction.GovernanceDirective.addFeed: object expected"); + message.addFeed = $root.pyth_lazer_transaction.AddFeed.fromObject(object.addFeed); + } + if (object.updateFeed != null) { + if (typeof object.updateFeed !== "object") + throw TypeError(".pyth_lazer_transaction.GovernanceDirective.updateFeed: object expected"); + message.updateFeed = $root.pyth_lazer_transaction.UpdateFeed.fromObject(object.updateFeed); + } + return message; + }; + + /** + * Creates a plain object from a GovernanceDirective message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.GovernanceDirective + * @static + * @param {pyth_lazer_transaction.GovernanceDirective} message GovernanceDirective + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GovernanceDirective.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (message.shardFilter != null && message.hasOwnProperty("shardFilter")) { + object.shardFilter = $root.pyth_lazer_transaction.ShardFilter.toObject(message.shardFilter, options); + if (options.oneofs) + object._shardFilter = "shardFilter"; + } + if (message.createShard != null && message.hasOwnProperty("createShard")) { + object.createShard = $root.pyth_lazer_transaction.CreateShard.toObject(message.createShard, options); + if (options.oneofs) + object.action = "createShard"; + } + if (message.addGovernanceSource != null && message.hasOwnProperty("addGovernanceSource")) { + object.addGovernanceSource = $root.pyth_lazer_transaction.AddGovernanceSource.toObject(message.addGovernanceSource, options); + if (options.oneofs) + object.action = "addGovernanceSource"; + } + if (message.updateGovernanceSource != null && message.hasOwnProperty("updateGovernanceSource")) { + object.updateGovernanceSource = $root.pyth_lazer_transaction.UpdateGovernanceSource.toObject(message.updateGovernanceSource, options); + if (options.oneofs) + object.action = "updateGovernanceSource"; + } + if (message.setShardName != null && message.hasOwnProperty("setShardName")) { + object.setShardName = $root.pyth_lazer_transaction.SetShardName.toObject(message.setShardName, options); + if (options.oneofs) + object.action = "setShardName"; + } + if (message.setShardGroup != null && message.hasOwnProperty("setShardGroup")) { + object.setShardGroup = $root.pyth_lazer_transaction.SetShardGroup.toObject(message.setShardGroup, options); + if (options.oneofs) + object.action = "setShardGroup"; + } + if (message.resetLastSequenceNo != null && message.hasOwnProperty("resetLastSequenceNo")) { + object.resetLastSequenceNo = $root.pyth_lazer_transaction.ResetLastSequenceNo.toObject(message.resetLastSequenceNo, options); + if (options.oneofs) + object.action = "resetLastSequenceNo"; + } + if (message.addPublisher != null && message.hasOwnProperty("addPublisher")) { + object.addPublisher = $root.pyth_lazer_transaction.AddPublisher.toObject(message.addPublisher, options); + if (options.oneofs) + object.action = "addPublisher"; + } + if (message.updatePublisher != null && message.hasOwnProperty("updatePublisher")) { + object.updatePublisher = $root.pyth_lazer_transaction.UpdatePublisher.toObject(message.updatePublisher, options); + if (options.oneofs) + object.action = "updatePublisher"; + } + if (message.addFeed != null && message.hasOwnProperty("addFeed")) { + object.addFeed = $root.pyth_lazer_transaction.AddFeed.toObject(message.addFeed, options); + if (options.oneofs) + object.action = "addFeed"; + } + if (message.updateFeed != null && message.hasOwnProperty("updateFeed")) { + object.updateFeed = $root.pyth_lazer_transaction.UpdateFeed.toObject(message.updateFeed, options); + if (options.oneofs) + object.action = "updateFeed"; + } + return object; + }; + + /** + * Converts this GovernanceDirective to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.GovernanceDirective + * @instance + * @returns {Object.} JSON object + */ + GovernanceDirective.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GovernanceDirective + * @function getTypeUrl + * @memberof pyth_lazer_transaction.GovernanceDirective + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GovernanceDirective.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.GovernanceDirective"; + }; + + return GovernanceDirective; + })(); + + pyth_lazer_transaction.Permissions = (function() { + + /** + * Properties of a Permissions. + * @memberof pyth_lazer_transaction + * @interface IPermissions + * @property {boolean|null} [allActions] Permissions allActions + * @property {Array.|null} [shardActions] Permissions shardActions + * @property {boolean|null} [allUpdateGovernanceSourceActions] Permissions allUpdateGovernanceSourceActions + * @property {Array.|null} [updateGovernanceSourceActions] Permissions updateGovernanceSourceActions + * @property {boolean|null} [allUpdatePublisherAction] Permissions allUpdatePublisherAction + * @property {Array.|null} [updatePublisherActions] Permissions updatePublisherActions + * @property {boolean|null} [allUpdateFeedActions] Permissions allUpdateFeedActions + * @property {Array.|null} [updateFeedActions] Permissions updateFeedActions + */ + + /** + * Constructs a new Permissions. + * @memberof pyth_lazer_transaction + * @classdesc Represents a Permissions. + * @implements IPermissions + * @constructor + * @param {pyth_lazer_transaction.IPermissions=} [properties] Properties to set + */ + function Permissions(properties) { + this.shardActions = []; + this.updateGovernanceSourceActions = []; + this.updatePublisherActions = []; + this.updateFeedActions = []; + 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]]; + } + + /** + * Permissions allActions. + * @member {boolean|null|undefined} allActions + * @memberof pyth_lazer_transaction.Permissions + * @instance + */ + Permissions.prototype.allActions = null; + + /** + * Permissions shardActions. + * @member {Array.} shardActions + * @memberof pyth_lazer_transaction.Permissions + * @instance + */ + Permissions.prototype.shardActions = $util.emptyArray; + + /** + * Permissions allUpdateGovernanceSourceActions. + * @member {boolean|null|undefined} allUpdateGovernanceSourceActions + * @memberof pyth_lazer_transaction.Permissions + * @instance + */ + Permissions.prototype.allUpdateGovernanceSourceActions = null; + + /** + * Permissions updateGovernanceSourceActions. + * @member {Array.} updateGovernanceSourceActions + * @memberof pyth_lazer_transaction.Permissions + * @instance + */ + Permissions.prototype.updateGovernanceSourceActions = $util.emptyArray; + + /** + * Permissions allUpdatePublisherAction. + * @member {boolean|null|undefined} allUpdatePublisherAction + * @memberof pyth_lazer_transaction.Permissions + * @instance + */ + Permissions.prototype.allUpdatePublisherAction = null; + + /** + * Permissions updatePublisherActions. + * @member {Array.} updatePublisherActions + * @memberof pyth_lazer_transaction.Permissions + * @instance + */ + Permissions.prototype.updatePublisherActions = $util.emptyArray; + + /** + * Permissions allUpdateFeedActions. + * @member {boolean|null|undefined} allUpdateFeedActions + * @memberof pyth_lazer_transaction.Permissions + * @instance + */ + Permissions.prototype.allUpdateFeedActions = null; + + /** + * Permissions updateFeedActions. + * @member {Array.} updateFeedActions + * @memberof pyth_lazer_transaction.Permissions + * @instance + */ + Permissions.prototype.updateFeedActions = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * Permissions _allActions. + * @member {"allActions"|undefined} _allActions + * @memberof pyth_lazer_transaction.Permissions + * @instance + */ + Object.defineProperty(Permissions.prototype, "_allActions", { + get: $util.oneOfGetter($oneOfFields = ["allActions"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Permissions _allUpdateGovernanceSourceActions. + * @member {"allUpdateGovernanceSourceActions"|undefined} _allUpdateGovernanceSourceActions + * @memberof pyth_lazer_transaction.Permissions + * @instance + */ + Object.defineProperty(Permissions.prototype, "_allUpdateGovernanceSourceActions", { + get: $util.oneOfGetter($oneOfFields = ["allUpdateGovernanceSourceActions"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Permissions _allUpdatePublisherAction. + * @member {"allUpdatePublisherAction"|undefined} _allUpdatePublisherAction + * @memberof pyth_lazer_transaction.Permissions + * @instance + */ + Object.defineProperty(Permissions.prototype, "_allUpdatePublisherAction", { + get: $util.oneOfGetter($oneOfFields = ["allUpdatePublisherAction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Permissions _allUpdateFeedActions. + * @member {"allUpdateFeedActions"|undefined} _allUpdateFeedActions + * @memberof pyth_lazer_transaction.Permissions + * @instance + */ + Object.defineProperty(Permissions.prototype, "_allUpdateFeedActions", { + get: $util.oneOfGetter($oneOfFields = ["allUpdateFeedActions"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Permissions instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.Permissions + * @static + * @param {pyth_lazer_transaction.IPermissions=} [properties] Properties to set + * @returns {pyth_lazer_transaction.Permissions} Permissions instance + */ + Permissions.create = function create(properties) { + return new Permissions(properties); + }; + + /** + * Encodes the specified Permissions message. Does not implicitly {@link pyth_lazer_transaction.Permissions.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.Permissions + * @static + * @param {pyth_lazer_transaction.IPermissions} message Permissions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Permissions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allActions != null && Object.hasOwnProperty.call(message, "allActions")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.allActions); + if (message.shardActions != null && message.shardActions.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (let i = 0; i < message.shardActions.length; ++i) + writer.int32(message.shardActions[i]); + writer.ldelim(); + } + if (message.allUpdateGovernanceSourceActions != null && Object.hasOwnProperty.call(message, "allUpdateGovernanceSourceActions")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allUpdateGovernanceSourceActions); + if (message.updateGovernanceSourceActions != null && message.updateGovernanceSourceActions.length) { + writer.uint32(/* id 4, wireType 2 =*/34).fork(); + for (let i = 0; i < message.updateGovernanceSourceActions.length; ++i) + writer.int32(message.updateGovernanceSourceActions[i]); + writer.ldelim(); + } + if (message.allUpdatePublisherAction != null && Object.hasOwnProperty.call(message, "allUpdatePublisherAction")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.allUpdatePublisherAction); + if (message.updatePublisherActions != null && message.updatePublisherActions.length) { + writer.uint32(/* id 6, wireType 2 =*/50).fork(); + for (let i = 0; i < message.updatePublisherActions.length; ++i) + writer.int32(message.updatePublisherActions[i]); + writer.ldelim(); + } + if (message.allUpdateFeedActions != null && Object.hasOwnProperty.call(message, "allUpdateFeedActions")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.allUpdateFeedActions); + if (message.updateFeedActions != null && message.updateFeedActions.length) { + writer.uint32(/* id 8, wireType 2 =*/66).fork(); + for (let i = 0; i < message.updateFeedActions.length; ++i) + writer.int32(message.updateFeedActions[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified Permissions message, length delimited. Does not implicitly {@link pyth_lazer_transaction.Permissions.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.Permissions + * @static + * @param {pyth_lazer_transaction.IPermissions} message Permissions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Permissions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Permissions message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.Permissions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.Permissions} Permissions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Permissions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.Permissions(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.allActions = reader.bool(); + break; + } + case 2: { + if (!(message.shardActions && message.shardActions.length)) + message.shardActions = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.shardActions.push(reader.int32()); + } else + message.shardActions.push(reader.int32()); + break; + } + case 3: { + message.allUpdateGovernanceSourceActions = reader.bool(); + break; + } + case 4: { + if (!(message.updateGovernanceSourceActions && message.updateGovernanceSourceActions.length)) + message.updateGovernanceSourceActions = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.updateGovernanceSourceActions.push(reader.int32()); + } else + message.updateGovernanceSourceActions.push(reader.int32()); + break; + } + case 5: { + message.allUpdatePublisherAction = reader.bool(); + break; + } + case 6: { + if (!(message.updatePublisherActions && message.updatePublisherActions.length)) + message.updatePublisherActions = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.updatePublisherActions.push(reader.int32()); + } else + message.updatePublisherActions.push(reader.int32()); + break; + } + case 7: { + message.allUpdateFeedActions = reader.bool(); + break; + } + case 8: { + if (!(message.updateFeedActions && message.updateFeedActions.length)) + message.updateFeedActions = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.updateFeedActions.push(reader.int32()); + } else + message.updateFeedActions.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Permissions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.Permissions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.Permissions} Permissions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Permissions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Permissions message. + * @function verify + * @memberof pyth_lazer_transaction.Permissions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Permissions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if (message.allActions != null && message.hasOwnProperty("allActions")) { + properties._allActions = 1; + if (typeof message.allActions !== "boolean") + return "allActions: boolean expected"; + } + if (message.shardActions != null && message.hasOwnProperty("shardActions")) { + if (!Array.isArray(message.shardActions)) + return "shardActions: array expected"; + for (let i = 0; i < message.shardActions.length; ++i) + switch (message.shardActions[i]) { + default: + return "shardActions: enum value[] expected"; + case 0: + case 101: + case 102: + case 103: + case 104: + case 105: + case 106: + case 107: + case 109: + break; + } + } + if (message.allUpdateGovernanceSourceActions != null && message.hasOwnProperty("allUpdateGovernanceSourceActions")) { + properties._allUpdateGovernanceSourceActions = 1; + if (typeof message.allUpdateGovernanceSourceActions !== "boolean") + return "allUpdateGovernanceSourceActions: boolean expected"; + } + if (message.updateGovernanceSourceActions != null && message.hasOwnProperty("updateGovernanceSourceActions")) { + if (!Array.isArray(message.updateGovernanceSourceActions)) + return "updateGovernanceSourceActions: array expected"; + for (let i = 0; i < message.updateGovernanceSourceActions.length; ++i) + switch (message.updateGovernanceSourceActions[i]) { + default: + return "updateGovernanceSourceActions: enum value[] expected"; + case 0: + case 101: + case 199: + break; + } + } + if (message.allUpdatePublisherAction != null && message.hasOwnProperty("allUpdatePublisherAction")) { + properties._allUpdatePublisherAction = 1; + if (typeof message.allUpdatePublisherAction !== "boolean") + return "allUpdatePublisherAction: boolean expected"; + } + if (message.updatePublisherActions != null && message.hasOwnProperty("updatePublisherActions")) { + if (!Array.isArray(message.updatePublisherActions)) + return "updatePublisherActions: array expected"; + for (let i = 0; i < message.updatePublisherActions.length; ++i) + switch (message.updatePublisherActions[i]) { + default: + return "updatePublisherActions: enum value[] expected"; + case 0: + case 101: + case 102: + case 103: + case 104: + case 105: + case 199: + break; + } + } + if (message.allUpdateFeedActions != null && message.hasOwnProperty("allUpdateFeedActions")) { + properties._allUpdateFeedActions = 1; + if (typeof message.allUpdateFeedActions !== "boolean") + return "allUpdateFeedActions: boolean expected"; + } + if (message.updateFeedActions != null && message.hasOwnProperty("updateFeedActions")) { + if (!Array.isArray(message.updateFeedActions)) + return "updateFeedActions: array expected"; + for (let i = 0; i < message.updateFeedActions.length; ++i) + switch (message.updateFeedActions[i]) { + default: + return "updateFeedActions: enum value[] expected"; + case 0: + case 101: + case 102: + case 103: + case 199: + break; + } + } + return null; + }; + + /** + * Creates a Permissions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.Permissions + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.Permissions} Permissions + */ + Permissions.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.Permissions) + return object; + let message = new $root.pyth_lazer_transaction.Permissions(); + if (object.allActions != null) + message.allActions = Boolean(object.allActions); + if (object.shardActions) { + if (!Array.isArray(object.shardActions)) + throw TypeError(".pyth_lazer_transaction.Permissions.shardActions: array expected"); + message.shardActions = []; + for (let i = 0; i < object.shardActions.length; ++i) + switch (object.shardActions[i]) { + default: + if (typeof object.shardActions[i] === "number") { + message.shardActions[i] = object.shardActions[i]; + break; + } + case "SHARD_ACTION_UNSPECIFIED": + case 0: + message.shardActions[i] = 0; + break; + case "CREATE_SHARD": + case 101: + message.shardActions[i] = 101; + break; + case "ADD_GOVERNANCE_SOURCE": + case 102: + message.shardActions[i] = 102; + break; + case "UPDATE_GOVERNANCE_SOURCE": + case 103: + message.shardActions[i] = 103; + break; + case "SET_SHARD_NAME": + case 104: + message.shardActions[i] = 104; + break; + case "SET_SHARD_GROUP": + case 105: + message.shardActions[i] = 105; + break; + case "RESET_LAST_SEQUENCE_NO": + case 106: + message.shardActions[i] = 106; + break; + case "ADD_PUBLISHER": + case 107: + message.shardActions[i] = 107; + break; + case "ADD_FEED": + case 109: + message.shardActions[i] = 109; + break; + } + } + if (object.allUpdateGovernanceSourceActions != null) + message.allUpdateGovernanceSourceActions = Boolean(object.allUpdateGovernanceSourceActions); + if (object.updateGovernanceSourceActions) { + if (!Array.isArray(object.updateGovernanceSourceActions)) + throw TypeError(".pyth_lazer_transaction.Permissions.updateGovernanceSourceActions: array expected"); + message.updateGovernanceSourceActions = []; + for (let i = 0; i < object.updateGovernanceSourceActions.length; ++i) + switch (object.updateGovernanceSourceActions[i]) { + default: + if (typeof object.updateGovernanceSourceActions[i] === "number") { + message.updateGovernanceSourceActions[i] = object.updateGovernanceSourceActions[i]; + break; + } + case "UPDATE_GOVERNANCE_SOURCE_ACTION_UNSPECIFIED": + case 0: + message.updateGovernanceSourceActions[i] = 0; + break; + case "SET_GOVERNANCE_SOURCE_PERMISSIONS": + case 101: + message.updateGovernanceSourceActions[i] = 101; + break; + case "REMOVE_GOVERNANCE_SOURCE": + case 199: + message.updateGovernanceSourceActions[i] = 199; + break; + } + } + if (object.allUpdatePublisherAction != null) + message.allUpdatePublisherAction = Boolean(object.allUpdatePublisherAction); + if (object.updatePublisherActions) { + if (!Array.isArray(object.updatePublisherActions)) + throw TypeError(".pyth_lazer_transaction.Permissions.updatePublisherActions: array expected"); + message.updatePublisherActions = []; + for (let i = 0; i < object.updatePublisherActions.length; ++i) + switch (object.updatePublisherActions[i]) { + default: + if (typeof object.updatePublisherActions[i] === "number") { + message.updatePublisherActions[i] = object.updatePublisherActions[i]; + break; + } + case "UPDATE_PUBLISHER_ACTION_UNSPECIFIED": + case 0: + message.updatePublisherActions[i] = 0; + break; + case "SET_PUBLISHER_NAME": + case 101: + message.updatePublisherActions[i] = 101; + break; + case "ADD_PUBLISHER_PUBLIC_KEYS": + case 102: + message.updatePublisherActions[i] = 102; + break; + case "REMOVE_PUBLISHER_PUBLIC_KEYS": + case 103: + message.updatePublisherActions[i] = 103; + break; + case "SET_PUBLISHER_PUBLIC_KEYS": + case 104: + message.updatePublisherActions[i] = 104; + break; + case "SET_PUBLISHER_ACTIVE": + case 105: + message.updatePublisherActions[i] = 105; + break; + case "REMOVE_PUBLISHER": + case 199: + message.updatePublisherActions[i] = 199; + break; + } + } + if (object.allUpdateFeedActions != null) + message.allUpdateFeedActions = Boolean(object.allUpdateFeedActions); + if (object.updateFeedActions) { + if (!Array.isArray(object.updateFeedActions)) + throw TypeError(".pyth_lazer_transaction.Permissions.updateFeedActions: array expected"); + message.updateFeedActions = []; + for (let i = 0; i < object.updateFeedActions.length; ++i) + switch (object.updateFeedActions[i]) { + default: + if (typeof object.updateFeedActions[i] === "number") { + message.updateFeedActions[i] = object.updateFeedActions[i]; + break; + } + case "UPDATE_FEED_ACTION_UNSPECIFIED": + case 0: + message.updateFeedActions[i] = 0; + break; + case "UPDATE_FEED_METADATA": + case 101: + message.updateFeedActions[i] = 101; + break; + case "ACTIVATE_FEED": + case 102: + message.updateFeedActions[i] = 102; + break; + case "DEACTIVATE_FEED": + case 103: + message.updateFeedActions[i] = 103; + break; + case "REMOVE_FEED": + case 199: + message.updateFeedActions[i] = 199; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a Permissions message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.Permissions + * @static + * @param {pyth_lazer_transaction.Permissions} message Permissions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Permissions.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.shardActions = []; + object.updateGovernanceSourceActions = []; + object.updatePublisherActions = []; + object.updateFeedActions = []; + } + if (message.allActions != null && message.hasOwnProperty("allActions")) { + object.allActions = message.allActions; + if (options.oneofs) + object._allActions = "allActions"; + } + if (message.shardActions && message.shardActions.length) { + object.shardActions = []; + for (let j = 0; j < message.shardActions.length; ++j) + object.shardActions[j] = options.enums === String ? $root.pyth_lazer_transaction.Permissions.ShardAction[message.shardActions[j]] === undefined ? message.shardActions[j] : $root.pyth_lazer_transaction.Permissions.ShardAction[message.shardActions[j]] : message.shardActions[j]; + } + if (message.allUpdateGovernanceSourceActions != null && message.hasOwnProperty("allUpdateGovernanceSourceActions")) { + object.allUpdateGovernanceSourceActions = message.allUpdateGovernanceSourceActions; + if (options.oneofs) + object._allUpdateGovernanceSourceActions = "allUpdateGovernanceSourceActions"; + } + if (message.updateGovernanceSourceActions && message.updateGovernanceSourceActions.length) { + object.updateGovernanceSourceActions = []; + for (let j = 0; j < message.updateGovernanceSourceActions.length; ++j) + object.updateGovernanceSourceActions[j] = options.enums === String ? $root.pyth_lazer_transaction.Permissions.UpdateGovernanceSourceAction[message.updateGovernanceSourceActions[j]] === undefined ? message.updateGovernanceSourceActions[j] : $root.pyth_lazer_transaction.Permissions.UpdateGovernanceSourceAction[message.updateGovernanceSourceActions[j]] : message.updateGovernanceSourceActions[j]; + } + if (message.allUpdatePublisherAction != null && message.hasOwnProperty("allUpdatePublisherAction")) { + object.allUpdatePublisherAction = message.allUpdatePublisherAction; + if (options.oneofs) + object._allUpdatePublisherAction = "allUpdatePublisherAction"; + } + if (message.updatePublisherActions && message.updatePublisherActions.length) { + object.updatePublisherActions = []; + for (let j = 0; j < message.updatePublisherActions.length; ++j) + object.updatePublisherActions[j] = options.enums === String ? $root.pyth_lazer_transaction.Permissions.UpdatePublisherAction[message.updatePublisherActions[j]] === undefined ? message.updatePublisherActions[j] : $root.pyth_lazer_transaction.Permissions.UpdatePublisherAction[message.updatePublisherActions[j]] : message.updatePublisherActions[j]; + } + if (message.allUpdateFeedActions != null && message.hasOwnProperty("allUpdateFeedActions")) { + object.allUpdateFeedActions = message.allUpdateFeedActions; + if (options.oneofs) + object._allUpdateFeedActions = "allUpdateFeedActions"; + } + if (message.updateFeedActions && message.updateFeedActions.length) { + object.updateFeedActions = []; + for (let j = 0; j < message.updateFeedActions.length; ++j) + object.updateFeedActions[j] = options.enums === String ? $root.pyth_lazer_transaction.Permissions.UpdateFeedAction[message.updateFeedActions[j]] === undefined ? message.updateFeedActions[j] : $root.pyth_lazer_transaction.Permissions.UpdateFeedAction[message.updateFeedActions[j]] : message.updateFeedActions[j]; + } + return object; + }; + + /** + * Converts this Permissions to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.Permissions + * @instance + * @returns {Object.} JSON object + */ + Permissions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Permissions + * @function getTypeUrl + * @memberof pyth_lazer_transaction.Permissions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Permissions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.Permissions"; + }; + + /** + * ShardAction enum. + * @name pyth_lazer_transaction.Permissions.ShardAction + * @enum {number} + * @property {number} SHARD_ACTION_UNSPECIFIED=0 SHARD_ACTION_UNSPECIFIED value + * @property {number} CREATE_SHARD=101 CREATE_SHARD value + * @property {number} ADD_GOVERNANCE_SOURCE=102 ADD_GOVERNANCE_SOURCE value + * @property {number} UPDATE_GOVERNANCE_SOURCE=103 UPDATE_GOVERNANCE_SOURCE value + * @property {number} SET_SHARD_NAME=104 SET_SHARD_NAME value + * @property {number} SET_SHARD_GROUP=105 SET_SHARD_GROUP value + * @property {number} RESET_LAST_SEQUENCE_NO=106 RESET_LAST_SEQUENCE_NO value + * @property {number} ADD_PUBLISHER=107 ADD_PUBLISHER value + * @property {number} ADD_FEED=109 ADD_FEED value + */ + Permissions.ShardAction = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SHARD_ACTION_UNSPECIFIED"] = 0; + values[valuesById[101] = "CREATE_SHARD"] = 101; + values[valuesById[102] = "ADD_GOVERNANCE_SOURCE"] = 102; + values[valuesById[103] = "UPDATE_GOVERNANCE_SOURCE"] = 103; + values[valuesById[104] = "SET_SHARD_NAME"] = 104; + values[valuesById[105] = "SET_SHARD_GROUP"] = 105; + values[valuesById[106] = "RESET_LAST_SEQUENCE_NO"] = 106; + values[valuesById[107] = "ADD_PUBLISHER"] = 107; + values[valuesById[109] = "ADD_FEED"] = 109; + return values; + })(); + + /** + * UpdateGovernanceSourceAction enum. + * @name pyth_lazer_transaction.Permissions.UpdateGovernanceSourceAction + * @enum {number} + * @property {number} UPDATE_GOVERNANCE_SOURCE_ACTION_UNSPECIFIED=0 UPDATE_GOVERNANCE_SOURCE_ACTION_UNSPECIFIED value + * @property {number} SET_GOVERNANCE_SOURCE_PERMISSIONS=101 SET_GOVERNANCE_SOURCE_PERMISSIONS value + * @property {number} REMOVE_GOVERNANCE_SOURCE=199 REMOVE_GOVERNANCE_SOURCE value + */ + Permissions.UpdateGovernanceSourceAction = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UPDATE_GOVERNANCE_SOURCE_ACTION_UNSPECIFIED"] = 0; + values[valuesById[101] = "SET_GOVERNANCE_SOURCE_PERMISSIONS"] = 101; + values[valuesById[199] = "REMOVE_GOVERNANCE_SOURCE"] = 199; + return values; + })(); + + /** + * UpdatePublisherAction enum. + * @name pyth_lazer_transaction.Permissions.UpdatePublisherAction + * @enum {number} + * @property {number} UPDATE_PUBLISHER_ACTION_UNSPECIFIED=0 UPDATE_PUBLISHER_ACTION_UNSPECIFIED value + * @property {number} SET_PUBLISHER_NAME=101 SET_PUBLISHER_NAME value + * @property {number} ADD_PUBLISHER_PUBLIC_KEYS=102 ADD_PUBLISHER_PUBLIC_KEYS value + * @property {number} REMOVE_PUBLISHER_PUBLIC_KEYS=103 REMOVE_PUBLISHER_PUBLIC_KEYS value + * @property {number} SET_PUBLISHER_PUBLIC_KEYS=104 SET_PUBLISHER_PUBLIC_KEYS value + * @property {number} SET_PUBLISHER_ACTIVE=105 SET_PUBLISHER_ACTIVE value + * @property {number} REMOVE_PUBLISHER=199 REMOVE_PUBLISHER value + */ + Permissions.UpdatePublisherAction = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UPDATE_PUBLISHER_ACTION_UNSPECIFIED"] = 0; + values[valuesById[101] = "SET_PUBLISHER_NAME"] = 101; + values[valuesById[102] = "ADD_PUBLISHER_PUBLIC_KEYS"] = 102; + values[valuesById[103] = "REMOVE_PUBLISHER_PUBLIC_KEYS"] = 103; + values[valuesById[104] = "SET_PUBLISHER_PUBLIC_KEYS"] = 104; + values[valuesById[105] = "SET_PUBLISHER_ACTIVE"] = 105; + values[valuesById[199] = "REMOVE_PUBLISHER"] = 199; + return values; + })(); + + /** + * UpdateFeedAction enum. + * @name pyth_lazer_transaction.Permissions.UpdateFeedAction + * @enum {number} + * @property {number} UPDATE_FEED_ACTION_UNSPECIFIED=0 UPDATE_FEED_ACTION_UNSPECIFIED value + * @property {number} UPDATE_FEED_METADATA=101 UPDATE_FEED_METADATA value + * @property {number} ACTIVATE_FEED=102 ACTIVATE_FEED value + * @property {number} DEACTIVATE_FEED=103 DEACTIVATE_FEED value + * @property {number} REMOVE_FEED=199 REMOVE_FEED value + */ + Permissions.UpdateFeedAction = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UPDATE_FEED_ACTION_UNSPECIFIED"] = 0; + values[valuesById[101] = "UPDATE_FEED_METADATA"] = 101; + values[valuesById[102] = "ACTIVATE_FEED"] = 102; + values[valuesById[103] = "DEACTIVATE_FEED"] = 103; + values[valuesById[199] = "REMOVE_FEED"] = 199; + return values; + })(); + + return Permissions; + })(); + + pyth_lazer_transaction.GovernanceSource = (function() { + + /** + * Properties of a GovernanceSource. + * @memberof pyth_lazer_transaction + * @interface IGovernanceSource + * @property {pyth_lazer_transaction.GovernanceSource.ISingleEd25519|null} [singleEd25519] GovernanceSource singleEd25519 + */ + + /** + * Constructs a new GovernanceSource. + * @memberof pyth_lazer_transaction + * @classdesc Represents a GovernanceSource. + * @implements IGovernanceSource + * @constructor + * @param {pyth_lazer_transaction.IGovernanceSource=} [properties] Properties to set + */ + function GovernanceSource(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]]; + } + + /** + * GovernanceSource singleEd25519. + * @member {pyth_lazer_transaction.GovernanceSource.ISingleEd25519|null|undefined} singleEd25519 + * @memberof pyth_lazer_transaction.GovernanceSource + * @instance + */ + GovernanceSource.prototype.singleEd25519 = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * GovernanceSource source. + * @member {"singleEd25519"|undefined} source + * @memberof pyth_lazer_transaction.GovernanceSource + * @instance + */ + Object.defineProperty(GovernanceSource.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["singleEd25519"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GovernanceSource instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.GovernanceSource + * @static + * @param {pyth_lazer_transaction.IGovernanceSource=} [properties] Properties to set + * @returns {pyth_lazer_transaction.GovernanceSource} GovernanceSource instance + */ + GovernanceSource.create = function create(properties) { + return new GovernanceSource(properties); + }; + + /** + * Encodes the specified GovernanceSource message. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.GovernanceSource + * @static + * @param {pyth_lazer_transaction.IGovernanceSource} message GovernanceSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GovernanceSource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.singleEd25519 != null && Object.hasOwnProperty.call(message, "singleEd25519")) + $root.pyth_lazer_transaction.GovernanceSource.SingleEd25519.encode(message.singleEd25519, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GovernanceSource message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.GovernanceSource + * @static + * @param {pyth_lazer_transaction.IGovernanceSource} message GovernanceSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GovernanceSource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GovernanceSource message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.GovernanceSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.GovernanceSource} GovernanceSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GovernanceSource.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.GovernanceSource(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.singleEd25519 = $root.pyth_lazer_transaction.GovernanceSource.SingleEd25519.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GovernanceSource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.GovernanceSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.GovernanceSource} GovernanceSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GovernanceSource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GovernanceSource message. + * @function verify + * @memberof pyth_lazer_transaction.GovernanceSource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GovernanceSource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if (message.singleEd25519 != null && message.hasOwnProperty("singleEd25519")) { + properties.source = 1; + { + let error = $root.pyth_lazer_transaction.GovernanceSource.SingleEd25519.verify(message.singleEd25519); + if (error) + return "singleEd25519." + error; + } + } + return null; + }; + + /** + * Creates a GovernanceSource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.GovernanceSource + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.GovernanceSource} GovernanceSource + */ + GovernanceSource.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.GovernanceSource) + return object; + let message = new $root.pyth_lazer_transaction.GovernanceSource(); + if (object.singleEd25519 != null) { + if (typeof object.singleEd25519 !== "object") + throw TypeError(".pyth_lazer_transaction.GovernanceSource.singleEd25519: object expected"); + message.singleEd25519 = $root.pyth_lazer_transaction.GovernanceSource.SingleEd25519.fromObject(object.singleEd25519); + } + return message; + }; + + /** + * Creates a plain object from a GovernanceSource message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.GovernanceSource + * @static + * @param {pyth_lazer_transaction.GovernanceSource} message GovernanceSource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GovernanceSource.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (message.singleEd25519 != null && message.hasOwnProperty("singleEd25519")) { + object.singleEd25519 = $root.pyth_lazer_transaction.GovernanceSource.SingleEd25519.toObject(message.singleEd25519, options); + if (options.oneofs) + object.source = "singleEd25519"; + } + return object; + }; + + /** + * Converts this GovernanceSource to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.GovernanceSource + * @instance + * @returns {Object.} JSON object + */ + GovernanceSource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GovernanceSource + * @function getTypeUrl + * @memberof pyth_lazer_transaction.GovernanceSource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GovernanceSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.GovernanceSource"; + }; + + GovernanceSource.SingleEd25519 = (function() { + + /** + * Properties of a SingleEd25519. + * @memberof pyth_lazer_transaction.GovernanceSource + * @interface ISingleEd25519 + * @property {Uint8Array|null} [publicKey] SingleEd25519 publicKey + */ + + /** + * Constructs a new SingleEd25519. + * @memberof pyth_lazer_transaction.GovernanceSource + * @classdesc Represents a SingleEd25519. + * @implements ISingleEd25519 + * @constructor + * @param {pyth_lazer_transaction.GovernanceSource.ISingleEd25519=} [properties] Properties to set + */ + function SingleEd25519(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]]; + } + + /** + * SingleEd25519 publicKey. + * @member {Uint8Array|null|undefined} publicKey + * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 + * @instance + */ + SingleEd25519.prototype.publicKey = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * SingleEd25519 _publicKey. + * @member {"publicKey"|undefined} _publicKey + * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 + * @instance + */ + Object.defineProperty(SingleEd25519.prototype, "_publicKey", { + get: $util.oneOfGetter($oneOfFields = ["publicKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SingleEd25519 instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 + * @static + * @param {pyth_lazer_transaction.GovernanceSource.ISingleEd25519=} [properties] Properties to set + * @returns {pyth_lazer_transaction.GovernanceSource.SingleEd25519} SingleEd25519 instance + */ + SingleEd25519.create = function create(properties) { + return new SingleEd25519(properties); + }; + + /** + * Encodes the specified SingleEd25519 message. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.SingleEd25519.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 + * @static + * @param {pyth_lazer_transaction.GovernanceSource.ISingleEd25519} message SingleEd25519 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SingleEd25519.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 SingleEd25519 message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.SingleEd25519.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 + * @static + * @param {pyth_lazer_transaction.GovernanceSource.ISingleEd25519} message SingleEd25519 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SingleEd25519.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SingleEd25519 message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.GovernanceSource.SingleEd25519} SingleEd25519 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SingleEd25519.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.GovernanceSource.SingleEd25519(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.publicKey = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SingleEd25519 message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.GovernanceSource.SingleEd25519} SingleEd25519 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SingleEd25519.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SingleEd25519 message. + * @function verify + * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SingleEd25519.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if (message.publicKey != null && message.hasOwnProperty("publicKey")) { + properties._publicKey = 1; + if (!(message.publicKey && typeof message.publicKey.length === "number" || $util.isString(message.publicKey))) + return "publicKey: buffer expected"; + } + return null; + }; + + /** + * Creates a SingleEd25519 message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.GovernanceSource.SingleEd25519} SingleEd25519 + */ + SingleEd25519.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.GovernanceSource.SingleEd25519) + return object; + let message = new $root.pyth_lazer_transaction.GovernanceSource.SingleEd25519(); + if (object.publicKey != null) + if (typeof object.publicKey === "string") + $util.base64.decode(object.publicKey, message.publicKey = $util.newBuffer($util.base64.length(object.publicKey)), 0); + else if (object.publicKey.length >= 0) + message.publicKey = object.publicKey; + return message; + }; + + /** + * Creates a plain object from a SingleEd25519 message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 + * @static + * @param {pyth_lazer_transaction.GovernanceSource.SingleEd25519} message SingleEd25519 + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SingleEd25519.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + 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; + if (options.oneofs) + object._publicKey = "publicKey"; + } + return object; + }; + + /** + * Converts this SingleEd25519 to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 + * @instance + * @returns {Object.} JSON object + */ + SingleEd25519.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SingleEd25519 + * @function getTypeUrl + * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SingleEd25519.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.GovernanceSource.SingleEd25519"; + }; + + return SingleEd25519; + })(); + + return GovernanceSource; + })(); + + pyth_lazer_transaction.CreateShard = (function() { + + /** + * Properties of a CreateShard. + * @memberof pyth_lazer_transaction + * @interface ICreateShard + * @property {number|null} [shardId] CreateShard shardId + * @property {string|null} [shardGroup] CreateShard shardGroup + * @property {google.protobuf.IDuration|null} [minRate] CreateShard minRate + */ + + /** + * Constructs a new CreateShard. + * @memberof pyth_lazer_transaction + * @classdesc Represents a CreateShard. + * @implements ICreateShard + * @constructor + * @param {pyth_lazer_transaction.ICreateShard=} [properties] Properties to set + */ + function CreateShard(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]]; + } + + /** + * CreateShard shardId. + * @member {number|null|undefined} shardId + * @memberof pyth_lazer_transaction.CreateShard + * @instance + */ + CreateShard.prototype.shardId = null; + + /** + * CreateShard shardGroup. + * @member {string|null|undefined} shardGroup + * @memberof pyth_lazer_transaction.CreateShard + * @instance + */ + CreateShard.prototype.shardGroup = null; + + /** + * CreateShard minRate. + * @member {google.protobuf.IDuration|null|undefined} minRate + * @memberof pyth_lazer_transaction.CreateShard + * @instance + */ + CreateShard.prototype.minRate = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * CreateShard _shardId. + * @member {"shardId"|undefined} _shardId + * @memberof pyth_lazer_transaction.CreateShard + * @instance + */ + Object.defineProperty(CreateShard.prototype, "_shardId", { + get: $util.oneOfGetter($oneOfFields = ["shardId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * CreateShard _shardGroup. + * @member {"shardGroup"|undefined} _shardGroup + * @memberof pyth_lazer_transaction.CreateShard + * @instance + */ + Object.defineProperty(CreateShard.prototype, "_shardGroup", { + get: $util.oneOfGetter($oneOfFields = ["shardGroup"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * CreateShard _minRate. + * @member {"minRate"|undefined} _minRate + * @memberof pyth_lazer_transaction.CreateShard + * @instance + */ + Object.defineProperty(CreateShard.prototype, "_minRate", { + get: $util.oneOfGetter($oneOfFields = ["minRate"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CreateShard instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.CreateShard + * @static + * @param {pyth_lazer_transaction.ICreateShard=} [properties] Properties to set + * @returns {pyth_lazer_transaction.CreateShard} CreateShard instance + */ + CreateShard.create = function create(properties) { + return new CreateShard(properties); + }; + + /** + * Encodes the specified CreateShard message. Does not implicitly {@link pyth_lazer_transaction.CreateShard.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.CreateShard + * @static + * @param {pyth_lazer_transaction.ICreateShard} message CreateShard message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateShard.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.shardId != null && Object.hasOwnProperty.call(message, "shardId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.shardId); + if (message.shardGroup != null && Object.hasOwnProperty.call(message, "shardGroup")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.shardGroup); + if (message.minRate != null && Object.hasOwnProperty.call(message, "minRate")) + $root.google.protobuf.Duration.encode(message.minRate, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateShard message, length delimited. Does not implicitly {@link pyth_lazer_transaction.CreateShard.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.CreateShard + * @static + * @param {pyth_lazer_transaction.ICreateShard} message CreateShard message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateShard.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateShard message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.CreateShard + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.CreateShard} CreateShard + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateShard.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.CreateShard(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.shardId = reader.uint32(); + break; + } + case 2: { + message.shardGroup = reader.string(); + break; + } + case 3: { + message.minRate = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateShard message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.CreateShard + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.CreateShard} CreateShard + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateShard.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateShard message. + * @function verify + * @memberof pyth_lazer_transaction.CreateShard + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateShard.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if (message.shardId != null && message.hasOwnProperty("shardId")) { + properties._shardId = 1; + if (!$util.isInteger(message.shardId)) + return "shardId: integer expected"; + } + if (message.shardGroup != null && message.hasOwnProperty("shardGroup")) { + properties._shardGroup = 1; + if (!$util.isString(message.shardGroup)) + return "shardGroup: string expected"; + } + if (message.minRate != null && message.hasOwnProperty("minRate")) { + properties._minRate = 1; + { + let error = $root.google.protobuf.Duration.verify(message.minRate); + if (error) + return "minRate." + error; + } + } + return null; + }; + + /** + * Creates a CreateShard message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.CreateShard + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.CreateShard} CreateShard + */ + CreateShard.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.CreateShard) + return object; + let message = new $root.pyth_lazer_transaction.CreateShard(); + if (object.shardId != null) + message.shardId = object.shardId >>> 0; + if (object.shardGroup != null) + message.shardGroup = String(object.shardGroup); + if (object.minRate != null) { + if (typeof object.minRate !== "object") + throw TypeError(".pyth_lazer_transaction.CreateShard.minRate: object expected"); + message.minRate = $root.google.protobuf.Duration.fromObject(object.minRate); + } + return message; + }; + + /** + * Creates a plain object from a CreateShard message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.CreateShard + * @static + * @param {pyth_lazer_transaction.CreateShard} message CreateShard + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateShard.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (message.shardId != null && message.hasOwnProperty("shardId")) { + object.shardId = message.shardId; + if (options.oneofs) + object._shardId = "shardId"; + } + if (message.shardGroup != null && message.hasOwnProperty("shardGroup")) { + object.shardGroup = message.shardGroup; + if (options.oneofs) + object._shardGroup = "shardGroup"; + } + if (message.minRate != null && message.hasOwnProperty("minRate")) { + object.minRate = $root.google.protobuf.Duration.toObject(message.minRate, options); + if (options.oneofs) + object._minRate = "minRate"; + } + return object; + }; + + /** + * Converts this CreateShard to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.CreateShard + * @instance + * @returns {Object.} JSON object + */ + CreateShard.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateShard + * @function getTypeUrl + * @memberof pyth_lazer_transaction.CreateShard + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateShard.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.CreateShard"; + }; + + return CreateShard; + })(); + + pyth_lazer_transaction.AddGovernanceSource = (function() { + + /** + * Properties of an AddGovernanceSource. + * @memberof pyth_lazer_transaction + * @interface IAddGovernanceSource + * @property {pyth_lazer_transaction.IGovernanceSource|null} [newSource] AddGovernanceSource newSource + * @property {pyth_lazer_transaction.IPermissions|null} [permissions] AddGovernanceSource permissions + */ + + /** + * Constructs a new AddGovernanceSource. + * @memberof pyth_lazer_transaction + * @classdesc Represents an AddGovernanceSource. + * @implements IAddGovernanceSource + * @constructor + * @param {pyth_lazer_transaction.IAddGovernanceSource=} [properties] Properties to set + */ + function AddGovernanceSource(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]]; + } + + /** + * AddGovernanceSource newSource. + * @member {pyth_lazer_transaction.IGovernanceSource|null|undefined} newSource + * @memberof pyth_lazer_transaction.AddGovernanceSource + * @instance + */ + AddGovernanceSource.prototype.newSource = null; + + /** + * AddGovernanceSource permissions. + * @member {pyth_lazer_transaction.IPermissions|null|undefined} permissions + * @memberof pyth_lazer_transaction.AddGovernanceSource + * @instance + */ + AddGovernanceSource.prototype.permissions = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * AddGovernanceSource _newSource. + * @member {"newSource"|undefined} _newSource + * @memberof pyth_lazer_transaction.AddGovernanceSource + * @instance + */ + Object.defineProperty(AddGovernanceSource.prototype, "_newSource", { + get: $util.oneOfGetter($oneOfFields = ["newSource"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AddGovernanceSource _permissions. + * @member {"permissions"|undefined} _permissions + * @memberof pyth_lazer_transaction.AddGovernanceSource + * @instance + */ + Object.defineProperty(AddGovernanceSource.prototype, "_permissions", { + get: $util.oneOfGetter($oneOfFields = ["permissions"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AddGovernanceSource instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.AddGovernanceSource + * @static + * @param {pyth_lazer_transaction.IAddGovernanceSource=} [properties] Properties to set + * @returns {pyth_lazer_transaction.AddGovernanceSource} AddGovernanceSource instance + */ + AddGovernanceSource.create = function create(properties) { + return new AddGovernanceSource(properties); + }; + + /** + * Encodes the specified AddGovernanceSource message. Does not implicitly {@link pyth_lazer_transaction.AddGovernanceSource.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.AddGovernanceSource + * @static + * @param {pyth_lazer_transaction.IAddGovernanceSource} message AddGovernanceSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddGovernanceSource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.newSource != null && Object.hasOwnProperty.call(message, "newSource")) + $root.pyth_lazer_transaction.GovernanceSource.encode(message.newSource, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.permissions != null && Object.hasOwnProperty.call(message, "permissions")) + $root.pyth_lazer_transaction.Permissions.encode(message.permissions, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AddGovernanceSource message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddGovernanceSource.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.AddGovernanceSource + * @static + * @param {pyth_lazer_transaction.IAddGovernanceSource} message AddGovernanceSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddGovernanceSource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AddGovernanceSource message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.AddGovernanceSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.AddGovernanceSource} AddGovernanceSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddGovernanceSource.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.AddGovernanceSource(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.newSource = $root.pyth_lazer_transaction.GovernanceSource.decode(reader, reader.uint32()); + break; + } + case 2: { + message.permissions = $root.pyth_lazer_transaction.Permissions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AddGovernanceSource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.AddGovernanceSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.AddGovernanceSource} AddGovernanceSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddGovernanceSource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AddGovernanceSource message. + * @function verify + * @memberof pyth_lazer_transaction.AddGovernanceSource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AddGovernanceSource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if (message.newSource != null && message.hasOwnProperty("newSource")) { + properties._newSource = 1; + { + let error = $root.pyth_lazer_transaction.GovernanceSource.verify(message.newSource); + if (error) + return "newSource." + error; + } + } + if (message.permissions != null && message.hasOwnProperty("permissions")) { + properties._permissions = 1; + { + let error = $root.pyth_lazer_transaction.Permissions.verify(message.permissions); + if (error) + return "permissions." + error; + } + } + return null; + }; + + /** + * Creates an AddGovernanceSource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.AddGovernanceSource + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.AddGovernanceSource} AddGovernanceSource + */ + AddGovernanceSource.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.AddGovernanceSource) + return object; + let message = new $root.pyth_lazer_transaction.AddGovernanceSource(); + if (object.newSource != null) { + if (typeof object.newSource !== "object") + throw TypeError(".pyth_lazer_transaction.AddGovernanceSource.newSource: object expected"); + message.newSource = $root.pyth_lazer_transaction.GovernanceSource.fromObject(object.newSource); + } + if (object.permissions != null) { + if (typeof object.permissions !== "object") + throw TypeError(".pyth_lazer_transaction.AddGovernanceSource.permissions: object expected"); + message.permissions = $root.pyth_lazer_transaction.Permissions.fromObject(object.permissions); + } + return message; + }; + + /** + * Creates a plain object from an AddGovernanceSource message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.AddGovernanceSource + * @static + * @param {pyth_lazer_transaction.AddGovernanceSource} message AddGovernanceSource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AddGovernanceSource.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (message.newSource != null && message.hasOwnProperty("newSource")) { + object.newSource = $root.pyth_lazer_transaction.GovernanceSource.toObject(message.newSource, options); + if (options.oneofs) + object._newSource = "newSource"; + } + if (message.permissions != null && message.hasOwnProperty("permissions")) { + object.permissions = $root.pyth_lazer_transaction.Permissions.toObject(message.permissions, options); + if (options.oneofs) + object._permissions = "permissions"; + } + return object; + }; + + /** + * Converts this AddGovernanceSource to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.AddGovernanceSource + * @instance + * @returns {Object.} JSON object + */ + AddGovernanceSource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AddGovernanceSource + * @function getTypeUrl + * @memberof pyth_lazer_transaction.AddGovernanceSource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AddGovernanceSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.AddGovernanceSource"; + }; + + return AddGovernanceSource; + })(); + + pyth_lazer_transaction.UpdateGovernanceSource = (function() { + + /** + * Properties of an UpdateGovernanceSource. + * @memberof pyth_lazer_transaction + * @interface IUpdateGovernanceSource + * @property {pyth_lazer_transaction.IGovernanceSource|null} [source] UpdateGovernanceSource source + * @property {pyth_lazer_transaction.ISetGovernanceSourcePermissions|null} [setGovernanceSourcePermissions] UpdateGovernanceSource setGovernanceSourcePermissions + * @property {google.protobuf.IEmpty|null} [removeGovernanceSource] UpdateGovernanceSource removeGovernanceSource + */ + + /** + * Constructs a new UpdateGovernanceSource. + * @memberof pyth_lazer_transaction + * @classdesc Represents an UpdateGovernanceSource. + * @implements IUpdateGovernanceSource + * @constructor + * @param {pyth_lazer_transaction.IUpdateGovernanceSource=} [properties] Properties to set + */ + function UpdateGovernanceSource(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]]; + } + + /** + * UpdateGovernanceSource source. + * @member {pyth_lazer_transaction.IGovernanceSource|null|undefined} source + * @memberof pyth_lazer_transaction.UpdateGovernanceSource + * @instance + */ + UpdateGovernanceSource.prototype.source = null; + + /** + * UpdateGovernanceSource setGovernanceSourcePermissions. + * @member {pyth_lazer_transaction.ISetGovernanceSourcePermissions|null|undefined} setGovernanceSourcePermissions + * @memberof pyth_lazer_transaction.UpdateGovernanceSource + * @instance + */ + UpdateGovernanceSource.prototype.setGovernanceSourcePermissions = null; + + /** + * UpdateGovernanceSource removeGovernanceSource. + * @member {google.protobuf.IEmpty|null|undefined} removeGovernanceSource + * @memberof pyth_lazer_transaction.UpdateGovernanceSource + * @instance + */ + UpdateGovernanceSource.prototype.removeGovernanceSource = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * UpdateGovernanceSource _source. + * @member {"source"|undefined} _source + * @memberof pyth_lazer_transaction.UpdateGovernanceSource + * @instance + */ + Object.defineProperty(UpdateGovernanceSource.prototype, "_source", { + get: $util.oneOfGetter($oneOfFields = ["source"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * UpdateGovernanceSource action. + * @member {"setGovernanceSourcePermissions"|"removeGovernanceSource"|undefined} action + * @memberof pyth_lazer_transaction.UpdateGovernanceSource + * @instance + */ + Object.defineProperty(UpdateGovernanceSource.prototype, "action", { + get: $util.oneOfGetter($oneOfFields = ["setGovernanceSourcePermissions", "removeGovernanceSource"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new UpdateGovernanceSource instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.UpdateGovernanceSource + * @static + * @param {pyth_lazer_transaction.IUpdateGovernanceSource=} [properties] Properties to set + * @returns {pyth_lazer_transaction.UpdateGovernanceSource} UpdateGovernanceSource instance + */ + UpdateGovernanceSource.create = function create(properties) { + return new UpdateGovernanceSource(properties); + }; + + /** + * Encodes the specified UpdateGovernanceSource message. Does not implicitly {@link pyth_lazer_transaction.UpdateGovernanceSource.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.UpdateGovernanceSource + * @static + * @param {pyth_lazer_transaction.IUpdateGovernanceSource} message UpdateGovernanceSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateGovernanceSource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.source != null && Object.hasOwnProperty.call(message, "source")) + $root.pyth_lazer_transaction.GovernanceSource.encode(message.source, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.setGovernanceSourcePermissions != null && Object.hasOwnProperty.call(message, "setGovernanceSourcePermissions")) + $root.pyth_lazer_transaction.SetGovernanceSourcePermissions.encode(message.setGovernanceSourcePermissions, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); + if (message.removeGovernanceSource != null && Object.hasOwnProperty.call(message, "removeGovernanceSource")) + $root.google.protobuf.Empty.encode(message.removeGovernanceSource, writer.uint32(/* id 199, wireType 2 =*/1594).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateGovernanceSource message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdateGovernanceSource.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.UpdateGovernanceSource + * @static + * @param {pyth_lazer_transaction.IUpdateGovernanceSource} message UpdateGovernanceSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateGovernanceSource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateGovernanceSource message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.UpdateGovernanceSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.UpdateGovernanceSource} UpdateGovernanceSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateGovernanceSource.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.UpdateGovernanceSource(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.source = $root.pyth_lazer_transaction.GovernanceSource.decode(reader, reader.uint32()); + break; + } + case 101: { + message.setGovernanceSourcePermissions = $root.pyth_lazer_transaction.SetGovernanceSourcePermissions.decode(reader, reader.uint32()); + break; + } + case 199: { + message.removeGovernanceSource = $root.google.protobuf.Empty.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateGovernanceSource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.UpdateGovernanceSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.UpdateGovernanceSource} UpdateGovernanceSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateGovernanceSource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateGovernanceSource message. + * @function verify + * @memberof pyth_lazer_transaction.UpdateGovernanceSource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateGovernanceSource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if (message.source != null && message.hasOwnProperty("source")) { + properties._source = 1; + { + let error = $root.pyth_lazer_transaction.GovernanceSource.verify(message.source); + if (error) + return "source." + error; + } + } + if (message.setGovernanceSourcePermissions != null && message.hasOwnProperty("setGovernanceSourcePermissions")) { + properties.action = 1; + { + let error = $root.pyth_lazer_transaction.SetGovernanceSourcePermissions.verify(message.setGovernanceSourcePermissions); + if (error) + return "setGovernanceSourcePermissions." + error; + } + } + if (message.removeGovernanceSource != null && message.hasOwnProperty("removeGovernanceSource")) { + if (properties.action === 1) + return "action: multiple values"; + properties.action = 1; + { + let error = $root.google.protobuf.Empty.verify(message.removeGovernanceSource); + if (error) + return "removeGovernanceSource." + error; + } + } + return null; + }; + + /** + * Creates an UpdateGovernanceSource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.UpdateGovernanceSource + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.UpdateGovernanceSource} UpdateGovernanceSource + */ + UpdateGovernanceSource.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.UpdateGovernanceSource) + return object; + let message = new $root.pyth_lazer_transaction.UpdateGovernanceSource(); + if (object.source != null) { + if (typeof object.source !== "object") + throw TypeError(".pyth_lazer_transaction.UpdateGovernanceSource.source: object expected"); + message.source = $root.pyth_lazer_transaction.GovernanceSource.fromObject(object.source); + } + if (object.setGovernanceSourcePermissions != null) { + if (typeof object.setGovernanceSourcePermissions !== "object") + throw TypeError(".pyth_lazer_transaction.UpdateGovernanceSource.setGovernanceSourcePermissions: object expected"); + message.setGovernanceSourcePermissions = $root.pyth_lazer_transaction.SetGovernanceSourcePermissions.fromObject(object.setGovernanceSourcePermissions); + } + if (object.removeGovernanceSource != null) { + if (typeof object.removeGovernanceSource !== "object") + throw TypeError(".pyth_lazer_transaction.UpdateGovernanceSource.removeGovernanceSource: object expected"); + message.removeGovernanceSource = $root.google.protobuf.Empty.fromObject(object.removeGovernanceSource); + } + return message; + }; + + /** + * Creates a plain object from an UpdateGovernanceSource message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.UpdateGovernanceSource + * @static + * @param {pyth_lazer_transaction.UpdateGovernanceSource} message UpdateGovernanceSource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateGovernanceSource.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (message.source != null && message.hasOwnProperty("source")) { + object.source = $root.pyth_lazer_transaction.GovernanceSource.toObject(message.source, options); + if (options.oneofs) + object._source = "source"; + } + if (message.setGovernanceSourcePermissions != null && message.hasOwnProperty("setGovernanceSourcePermissions")) { + object.setGovernanceSourcePermissions = $root.pyth_lazer_transaction.SetGovernanceSourcePermissions.toObject(message.setGovernanceSourcePermissions, options); + if (options.oneofs) + object.action = "setGovernanceSourcePermissions"; + } + if (message.removeGovernanceSource != null && message.hasOwnProperty("removeGovernanceSource")) { + object.removeGovernanceSource = $root.google.protobuf.Empty.toObject(message.removeGovernanceSource, options); + if (options.oneofs) + object.action = "removeGovernanceSource"; + } + return object; + }; + + /** + * Converts this UpdateGovernanceSource to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.UpdateGovernanceSource + * @instance + * @returns {Object.} JSON object + */ + UpdateGovernanceSource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateGovernanceSource + * @function getTypeUrl + * @memberof pyth_lazer_transaction.UpdateGovernanceSource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateGovernanceSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.UpdateGovernanceSource"; + }; + + return UpdateGovernanceSource; + })(); + + pyth_lazer_transaction.SetGovernanceSourcePermissions = (function() { + + /** + * Properties of a SetGovernanceSourcePermissions. + * @memberof pyth_lazer_transaction + * @interface ISetGovernanceSourcePermissions + * @property {pyth_lazer_transaction.IPermissions|null} [permissions] SetGovernanceSourcePermissions permissions + */ + + /** + * Constructs a new SetGovernanceSourcePermissions. + * @memberof pyth_lazer_transaction + * @classdesc Represents a SetGovernanceSourcePermissions. + * @implements ISetGovernanceSourcePermissions + * @constructor + * @param {pyth_lazer_transaction.ISetGovernanceSourcePermissions=} [properties] Properties to set + */ + function SetGovernanceSourcePermissions(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]]; + } + + /** + * SetGovernanceSourcePermissions permissions. + * @member {pyth_lazer_transaction.IPermissions|null|undefined} permissions + * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions + * @instance + */ + SetGovernanceSourcePermissions.prototype.permissions = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * SetGovernanceSourcePermissions _permissions. + * @member {"permissions"|undefined} _permissions + * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions + * @instance + */ + Object.defineProperty(SetGovernanceSourcePermissions.prototype, "_permissions", { + get: $util.oneOfGetter($oneOfFields = ["permissions"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SetGovernanceSourcePermissions instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions + * @static + * @param {pyth_lazer_transaction.ISetGovernanceSourcePermissions=} [properties] Properties to set + * @returns {pyth_lazer_transaction.SetGovernanceSourcePermissions} SetGovernanceSourcePermissions instance + */ + SetGovernanceSourcePermissions.create = function create(properties) { + return new SetGovernanceSourcePermissions(properties); + }; + + /** + * Encodes the specified SetGovernanceSourcePermissions message. Does not implicitly {@link pyth_lazer_transaction.SetGovernanceSourcePermissions.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions + * @static + * @param {pyth_lazer_transaction.ISetGovernanceSourcePermissions} message SetGovernanceSourcePermissions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetGovernanceSourcePermissions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.permissions != null && Object.hasOwnProperty.call(message, "permissions")) + $root.pyth_lazer_transaction.Permissions.encode(message.permissions, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SetGovernanceSourcePermissions message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetGovernanceSourcePermissions.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions + * @static + * @param {pyth_lazer_transaction.ISetGovernanceSourcePermissions} message SetGovernanceSourcePermissions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetGovernanceSourcePermissions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetGovernanceSourcePermissions message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.SetGovernanceSourcePermissions} SetGovernanceSourcePermissions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetGovernanceSourcePermissions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.SetGovernanceSourcePermissions(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.permissions = $root.pyth_lazer_transaction.Permissions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetGovernanceSourcePermissions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.SetGovernanceSourcePermissions} SetGovernanceSourcePermissions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetGovernanceSourcePermissions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetGovernanceSourcePermissions message. + * @function verify + * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetGovernanceSourcePermissions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if (message.permissions != null && message.hasOwnProperty("permissions")) { + properties._permissions = 1; + { + let error = $root.pyth_lazer_transaction.Permissions.verify(message.permissions); + if (error) + return "permissions." + error; + } + } + return null; + }; + + /** + * Creates a SetGovernanceSourcePermissions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.SetGovernanceSourcePermissions} SetGovernanceSourcePermissions + */ + SetGovernanceSourcePermissions.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.SetGovernanceSourcePermissions) + return object; + let message = new $root.pyth_lazer_transaction.SetGovernanceSourcePermissions(); + if (object.permissions != null) { + if (typeof object.permissions !== "object") + throw TypeError(".pyth_lazer_transaction.SetGovernanceSourcePermissions.permissions: object expected"); + message.permissions = $root.pyth_lazer_transaction.Permissions.fromObject(object.permissions); + } + return message; + }; + + /** + * Creates a plain object from a SetGovernanceSourcePermissions message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions + * @static + * @param {pyth_lazer_transaction.SetGovernanceSourcePermissions} message SetGovernanceSourcePermissions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetGovernanceSourcePermissions.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (message.permissions != null && message.hasOwnProperty("permissions")) { + object.permissions = $root.pyth_lazer_transaction.Permissions.toObject(message.permissions, options); + if (options.oneofs) + object._permissions = "permissions"; + } + return object; + }; + + /** + * Converts this SetGovernanceSourcePermissions to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions + * @instance + * @returns {Object.} JSON object + */ + SetGovernanceSourcePermissions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetGovernanceSourcePermissions + * @function getTypeUrl + * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetGovernanceSourcePermissions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.SetGovernanceSourcePermissions"; + }; + + return SetGovernanceSourcePermissions; + })(); + + pyth_lazer_transaction.SetShardName = (function() { + + /** + * Properties of a SetShardName. + * @memberof pyth_lazer_transaction + * @interface ISetShardName + * @property {string|null} [shardName] SetShardName shardName + */ + + /** + * Constructs a new SetShardName. + * @memberof pyth_lazer_transaction + * @classdesc Represents a SetShardName. + * @implements ISetShardName + * @constructor + * @param {pyth_lazer_transaction.ISetShardName=} [properties] Properties to set + */ + function SetShardName(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]]; + } + + /** + * SetShardName shardName. + * @member {string|null|undefined} shardName + * @memberof pyth_lazer_transaction.SetShardName + * @instance + */ + SetShardName.prototype.shardName = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * SetShardName _shardName. + * @member {"shardName"|undefined} _shardName + * @memberof pyth_lazer_transaction.SetShardName + * @instance + */ + Object.defineProperty(SetShardName.prototype, "_shardName", { + get: $util.oneOfGetter($oneOfFields = ["shardName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SetShardName instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.SetShardName + * @static + * @param {pyth_lazer_transaction.ISetShardName=} [properties] Properties to set + * @returns {pyth_lazer_transaction.SetShardName} SetShardName instance + */ + SetShardName.create = function create(properties) { + return new SetShardName(properties); + }; + + /** + * Encodes the specified SetShardName message. Does not implicitly {@link pyth_lazer_transaction.SetShardName.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.SetShardName + * @static + * @param {pyth_lazer_transaction.ISetShardName} message SetShardName message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetShardName.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.shardName != null && Object.hasOwnProperty.call(message, "shardName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.shardName); + return writer; + }; + + /** + * Encodes the specified SetShardName message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetShardName.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.SetShardName + * @static + * @param {pyth_lazer_transaction.ISetShardName} message SetShardName message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetShardName.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetShardName message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.SetShardName + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.SetShardName} SetShardName + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetShardName.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.SetShardName(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.shardName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetShardName message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.SetShardName + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.SetShardName} SetShardName + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetShardName.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetShardName message. + * @function verify + * @memberof pyth_lazer_transaction.SetShardName + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetShardName.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if (message.shardName != null && message.hasOwnProperty("shardName")) { + properties._shardName = 1; + if (!$util.isString(message.shardName)) + return "shardName: string expected"; + } + return null; + }; + + /** + * Creates a SetShardName message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.SetShardName + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.SetShardName} SetShardName + */ + SetShardName.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.SetShardName) + return object; + let message = new $root.pyth_lazer_transaction.SetShardName(); + if (object.shardName != null) + message.shardName = String(object.shardName); + return message; + }; + + /** + * Creates a plain object from a SetShardName message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.SetShardName + * @static + * @param {pyth_lazer_transaction.SetShardName} message SetShardName + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetShardName.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (message.shardName != null && message.hasOwnProperty("shardName")) { + object.shardName = message.shardName; + if (options.oneofs) + object._shardName = "shardName"; + } + return object; + }; + + /** + * Converts this SetShardName to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.SetShardName + * @instance + * @returns {Object.} JSON object + */ + SetShardName.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetShardName + * @function getTypeUrl + * @memberof pyth_lazer_transaction.SetShardName + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetShardName.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.SetShardName"; + }; + + return SetShardName; + })(); + + pyth_lazer_transaction.SetShardGroup = (function() { + + /** + * Properties of a SetShardGroup. + * @memberof pyth_lazer_transaction + * @interface ISetShardGroup + * @property {string|null} [shardGroup] SetShardGroup shardGroup + */ + + /** + * Constructs a new SetShardGroup. + * @memberof pyth_lazer_transaction + * @classdesc Represents a SetShardGroup. + * @implements ISetShardGroup + * @constructor + * @param {pyth_lazer_transaction.ISetShardGroup=} [properties] Properties to set + */ + function SetShardGroup(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]]; + } + + /** + * SetShardGroup shardGroup. + * @member {string|null|undefined} shardGroup + * @memberof pyth_lazer_transaction.SetShardGroup + * @instance + */ + SetShardGroup.prototype.shardGroup = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * SetShardGroup _shardGroup. + * @member {"shardGroup"|undefined} _shardGroup + * @memberof pyth_lazer_transaction.SetShardGroup + * @instance + */ + Object.defineProperty(SetShardGroup.prototype, "_shardGroup", { + get: $util.oneOfGetter($oneOfFields = ["shardGroup"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SetShardGroup instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.SetShardGroup + * @static + * @param {pyth_lazer_transaction.ISetShardGroup=} [properties] Properties to set + * @returns {pyth_lazer_transaction.SetShardGroup} SetShardGroup instance + */ + SetShardGroup.create = function create(properties) { + return new SetShardGroup(properties); + }; + + /** + * Encodes the specified SetShardGroup message. Does not implicitly {@link pyth_lazer_transaction.SetShardGroup.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.SetShardGroup + * @static + * @param {pyth_lazer_transaction.ISetShardGroup} message SetShardGroup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetShardGroup.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.shardGroup != null && Object.hasOwnProperty.call(message, "shardGroup")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.shardGroup); + return writer; + }; + + /** + * Encodes the specified SetShardGroup message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetShardGroup.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.SetShardGroup + * @static + * @param {pyth_lazer_transaction.ISetShardGroup} message SetShardGroup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetShardGroup.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetShardGroup message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.SetShardGroup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.SetShardGroup} SetShardGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetShardGroup.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.SetShardGroup(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.shardGroup = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetShardGroup message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.SetShardGroup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.SetShardGroup} SetShardGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetShardGroup.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetShardGroup message. + * @function verify + * @memberof pyth_lazer_transaction.SetShardGroup + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetShardGroup.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if (message.shardGroup != null && message.hasOwnProperty("shardGroup")) { + properties._shardGroup = 1; + if (!$util.isString(message.shardGroup)) + return "shardGroup: string expected"; + } + return null; + }; + + /** + * Creates a SetShardGroup message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.SetShardGroup + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.SetShardGroup} SetShardGroup + */ + SetShardGroup.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.SetShardGroup) + return object; + let message = new $root.pyth_lazer_transaction.SetShardGroup(); + if (object.shardGroup != null) + message.shardGroup = String(object.shardGroup); + return message; + }; + + /** + * Creates a plain object from a SetShardGroup message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.SetShardGroup + * @static + * @param {pyth_lazer_transaction.SetShardGroup} message SetShardGroup + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetShardGroup.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (message.shardGroup != null && message.hasOwnProperty("shardGroup")) { + object.shardGroup = message.shardGroup; + if (options.oneofs) + object._shardGroup = "shardGroup"; + } + return object; + }; + + /** + * Converts this SetShardGroup to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.SetShardGroup + * @instance + * @returns {Object.} JSON object + */ + SetShardGroup.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetShardGroup + * @function getTypeUrl + * @memberof pyth_lazer_transaction.SetShardGroup + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetShardGroup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.SetShardGroup"; + }; + + return SetShardGroup; + })(); + + pyth_lazer_transaction.ResetLastSequenceNo = (function() { + + /** + * Properties of a ResetLastSequenceNo. + * @memberof pyth_lazer_transaction + * @interface IResetLastSequenceNo + * @property {number|Long|null} [lastSequenceNo] ResetLastSequenceNo lastSequenceNo + */ + + /** + * Constructs a new ResetLastSequenceNo. + * @memberof pyth_lazer_transaction + * @classdesc Represents a ResetLastSequenceNo. + * @implements IResetLastSequenceNo + * @constructor + * @param {pyth_lazer_transaction.IResetLastSequenceNo=} [properties] Properties to set + */ + function ResetLastSequenceNo(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]]; + } + + /** + * ResetLastSequenceNo lastSequenceNo. + * @member {number|Long|null|undefined} lastSequenceNo + * @memberof pyth_lazer_transaction.ResetLastSequenceNo + * @instance + */ + ResetLastSequenceNo.prototype.lastSequenceNo = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * ResetLastSequenceNo _lastSequenceNo. + * @member {"lastSequenceNo"|undefined} _lastSequenceNo + * @memberof pyth_lazer_transaction.ResetLastSequenceNo + * @instance + */ + Object.defineProperty(ResetLastSequenceNo.prototype, "_lastSequenceNo", { + get: $util.oneOfGetter($oneOfFields = ["lastSequenceNo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ResetLastSequenceNo instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.ResetLastSequenceNo + * @static + * @param {pyth_lazer_transaction.IResetLastSequenceNo=} [properties] Properties to set + * @returns {pyth_lazer_transaction.ResetLastSequenceNo} ResetLastSequenceNo instance + */ + ResetLastSequenceNo.create = function create(properties) { + return new ResetLastSequenceNo(properties); + }; + + /** + * Encodes the specified ResetLastSequenceNo message. Does not implicitly {@link pyth_lazer_transaction.ResetLastSequenceNo.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.ResetLastSequenceNo + * @static + * @param {pyth_lazer_transaction.IResetLastSequenceNo} message ResetLastSequenceNo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResetLastSequenceNo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.lastSequenceNo != null && Object.hasOwnProperty.call(message, "lastSequenceNo")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.lastSequenceNo); + return writer; + }; + + /** + * Encodes the specified ResetLastSequenceNo message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ResetLastSequenceNo.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.ResetLastSequenceNo + * @static + * @param {pyth_lazer_transaction.IResetLastSequenceNo} message ResetLastSequenceNo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResetLastSequenceNo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResetLastSequenceNo message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.ResetLastSequenceNo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.ResetLastSequenceNo} ResetLastSequenceNo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResetLastSequenceNo.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.ResetLastSequenceNo(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.lastSequenceNo = reader.uint64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResetLastSequenceNo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.ResetLastSequenceNo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.ResetLastSequenceNo} ResetLastSequenceNo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResetLastSequenceNo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResetLastSequenceNo message. + * @function verify + * @memberof pyth_lazer_transaction.ResetLastSequenceNo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResetLastSequenceNo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if (message.lastSequenceNo != null && message.hasOwnProperty("lastSequenceNo")) { + properties._lastSequenceNo = 1; + if (!$util.isInteger(message.lastSequenceNo) && !(message.lastSequenceNo && $util.isInteger(message.lastSequenceNo.low) && $util.isInteger(message.lastSequenceNo.high))) + return "lastSequenceNo: integer|Long expected"; + } + return null; + }; + + /** + * Creates a ResetLastSequenceNo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.ResetLastSequenceNo + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.ResetLastSequenceNo} ResetLastSequenceNo + */ + ResetLastSequenceNo.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.ResetLastSequenceNo) + return object; + let message = new $root.pyth_lazer_transaction.ResetLastSequenceNo(); + if (object.lastSequenceNo != null) + if ($util.Long) + (message.lastSequenceNo = $util.Long.fromValue(object.lastSequenceNo)).unsigned = true; + else if (typeof object.lastSequenceNo === "string") + message.lastSequenceNo = parseInt(object.lastSequenceNo, 10); + else if (typeof object.lastSequenceNo === "number") + message.lastSequenceNo = object.lastSequenceNo; + else if (typeof object.lastSequenceNo === "object") + message.lastSequenceNo = new $util.LongBits(object.lastSequenceNo.low >>> 0, object.lastSequenceNo.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a ResetLastSequenceNo message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.ResetLastSequenceNo + * @static + * @param {pyth_lazer_transaction.ResetLastSequenceNo} message ResetLastSequenceNo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResetLastSequenceNo.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (message.lastSequenceNo != null && message.hasOwnProperty("lastSequenceNo")) { + if (typeof message.lastSequenceNo === "number") + object.lastSequenceNo = options.longs === String ? String(message.lastSequenceNo) : message.lastSequenceNo; + else + object.lastSequenceNo = options.longs === String ? $util.Long.prototype.toString.call(message.lastSequenceNo) : options.longs === Number ? new $util.LongBits(message.lastSequenceNo.low >>> 0, message.lastSequenceNo.high >>> 0).toNumber(true) : message.lastSequenceNo; + if (options.oneofs) + object._lastSequenceNo = "lastSequenceNo"; + } + return object; + }; + + /** + * Converts this ResetLastSequenceNo to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.ResetLastSequenceNo + * @instance + * @returns {Object.} JSON object + */ + ResetLastSequenceNo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResetLastSequenceNo + * @function getTypeUrl + * @memberof pyth_lazer_transaction.ResetLastSequenceNo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResetLastSequenceNo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.ResetLastSequenceNo"; + }; + + return ResetLastSequenceNo; + })(); + + pyth_lazer_transaction.AddPublisher = (function() { + + /** + * Properties of an AddPublisher. + * @memberof pyth_lazer_transaction + * @interface IAddPublisher + * @property {number|null} [publisherId] AddPublisher publisherId + * @property {string|null} [name] AddPublisher name + * @property {Array.|null} [publicKeys] AddPublisher publicKeys + * @property {boolean|null} [isActive] AddPublisher isActive + */ + + /** + * Constructs a new AddPublisher. + * @memberof pyth_lazer_transaction + * @classdesc Represents an AddPublisher. + * @implements IAddPublisher + * @constructor + * @param {pyth_lazer_transaction.IAddPublisher=} [properties] Properties to set + */ + function AddPublisher(properties) { + this.publicKeys = []; + 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]]; + } + + /** + * AddPublisher publisherId. + * @member {number|null|undefined} publisherId + * @memberof pyth_lazer_transaction.AddPublisher + * @instance + */ + AddPublisher.prototype.publisherId = null; + + /** + * AddPublisher name. + * @member {string|null|undefined} name + * @memberof pyth_lazer_transaction.AddPublisher + * @instance + */ + AddPublisher.prototype.name = null; + + /** + * AddPublisher publicKeys. + * @member {Array.} publicKeys + * @memberof pyth_lazer_transaction.AddPublisher + * @instance + */ + AddPublisher.prototype.publicKeys = $util.emptyArray; + + /** + * AddPublisher isActive. + * @member {boolean|null|undefined} isActive + * @memberof pyth_lazer_transaction.AddPublisher + * @instance + */ + AddPublisher.prototype.isActive = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * AddPublisher _publisherId. + * @member {"publisherId"|undefined} _publisherId + * @memberof pyth_lazer_transaction.AddPublisher + * @instance + */ + Object.defineProperty(AddPublisher.prototype, "_publisherId", { + get: $util.oneOfGetter($oneOfFields = ["publisherId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AddPublisher _name. + * @member {"name"|undefined} _name + * @memberof pyth_lazer_transaction.AddPublisher + * @instance + */ + Object.defineProperty(AddPublisher.prototype, "_name", { + get: $util.oneOfGetter($oneOfFields = ["name"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AddPublisher _isActive. + * @member {"isActive"|undefined} _isActive + * @memberof pyth_lazer_transaction.AddPublisher + * @instance + */ + Object.defineProperty(AddPublisher.prototype, "_isActive", { + get: $util.oneOfGetter($oneOfFields = ["isActive"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AddPublisher instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.AddPublisher + * @static + * @param {pyth_lazer_transaction.IAddPublisher=} [properties] Properties to set + * @returns {pyth_lazer_transaction.AddPublisher} AddPublisher instance + */ + AddPublisher.create = function create(properties) { + return new AddPublisher(properties); + }; + + /** + * Encodes the specified AddPublisher message. Does not implicitly {@link pyth_lazer_transaction.AddPublisher.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.AddPublisher + * @static + * @param {pyth_lazer_transaction.IAddPublisher} message AddPublisher message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddPublisher.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.publisherId != null && Object.hasOwnProperty.call(message, "publisherId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.publisherId); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); + if (message.publicKeys != null && message.publicKeys.length) + for (let i = 0; i < message.publicKeys.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.publicKeys[i]); + if (message.isActive != null && Object.hasOwnProperty.call(message, "isActive")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.isActive); + return writer; + }; + + /** + * Encodes the specified AddPublisher message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddPublisher.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.AddPublisher + * @static + * @param {pyth_lazer_transaction.IAddPublisher} message AddPublisher message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddPublisher.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AddPublisher message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.AddPublisher + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.AddPublisher} AddPublisher + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddPublisher.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.AddPublisher(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.publisherId = reader.uint32(); + break; + } + case 2: { + message.name = reader.string(); + break; + } + case 3: { + if (!(message.publicKeys && message.publicKeys.length)) + message.publicKeys = []; + message.publicKeys.push(reader.bytes()); + break; + } + case 4: { + message.isActive = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AddPublisher message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.AddPublisher + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.AddPublisher} AddPublisher + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddPublisher.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AddPublisher message. + * @function verify + * @memberof pyth_lazer_transaction.AddPublisher + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AddPublisher.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if (message.publisherId != null && message.hasOwnProperty("publisherId")) { + properties._publisherId = 1; + if (!$util.isInteger(message.publisherId)) + return "publisherId: integer expected"; + } + if (message.name != null && message.hasOwnProperty("name")) { + properties._name = 1; + if (!$util.isString(message.name)) + return "name: string expected"; + } + if (message.publicKeys != null && message.hasOwnProperty("publicKeys")) { + if (!Array.isArray(message.publicKeys)) + return "publicKeys: array expected"; + for (let i = 0; i < message.publicKeys.length; ++i) + if (!(message.publicKeys[i] && typeof message.publicKeys[i].length === "number" || $util.isString(message.publicKeys[i]))) + return "publicKeys: buffer[] expected"; + } + if (message.isActive != null && message.hasOwnProperty("isActive")) { + properties._isActive = 1; + if (typeof message.isActive !== "boolean") + return "isActive: boolean expected"; + } + return null; + }; + + /** + * Creates an AddPublisher message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.AddPublisher + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.AddPublisher} AddPublisher + */ + AddPublisher.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.AddPublisher) + return object; + let message = new $root.pyth_lazer_transaction.AddPublisher(); + if (object.publisherId != null) + message.publisherId = object.publisherId >>> 0; + if (object.name != null) + message.name = String(object.name); + if (object.publicKeys) { + if (!Array.isArray(object.publicKeys)) + throw TypeError(".pyth_lazer_transaction.AddPublisher.publicKeys: array expected"); + message.publicKeys = []; + for (let i = 0; i < object.publicKeys.length; ++i) + if (typeof object.publicKeys[i] === "string") + $util.base64.decode(object.publicKeys[i], message.publicKeys[i] = $util.newBuffer($util.base64.length(object.publicKeys[i])), 0); + else if (object.publicKeys[i].length >= 0) + message.publicKeys[i] = object.publicKeys[i]; + } + if (object.isActive != null) + message.isActive = Boolean(object.isActive); + return message; + }; + + /** + * Creates a plain object from an AddPublisher message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.AddPublisher + * @static + * @param {pyth_lazer_transaction.AddPublisher} message AddPublisher + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AddPublisher.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.publicKeys = []; + if (message.publisherId != null && message.hasOwnProperty("publisherId")) { + object.publisherId = message.publisherId; + if (options.oneofs) + object._publisherId = "publisherId"; + } + if (message.name != null && message.hasOwnProperty("name")) { + object.name = message.name; + if (options.oneofs) + object._name = "name"; + } + if (message.publicKeys && message.publicKeys.length) { + object.publicKeys = []; + for (let j = 0; j < message.publicKeys.length; ++j) + object.publicKeys[j] = options.bytes === String ? $util.base64.encode(message.publicKeys[j], 0, message.publicKeys[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.publicKeys[j]) : message.publicKeys[j]; + } + if (message.isActive != null && message.hasOwnProperty("isActive")) { + object.isActive = message.isActive; + if (options.oneofs) + object._isActive = "isActive"; + } + return object; + }; + + /** + * Converts this AddPublisher to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.AddPublisher + * @instance + * @returns {Object.} JSON object + */ + AddPublisher.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AddPublisher + * @function getTypeUrl + * @memberof pyth_lazer_transaction.AddPublisher + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AddPublisher.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.AddPublisher"; + }; + + return AddPublisher; + })(); + + pyth_lazer_transaction.UpdatePublisher = (function() { + + /** + * Properties of an UpdatePublisher. + * @memberof pyth_lazer_transaction + * @interface IUpdatePublisher + * @property {number|null} [publisherId] UpdatePublisher publisherId + * @property {pyth_lazer_transaction.ISetPublisherName|null} [setPublisherName] UpdatePublisher setPublisherName + * @property {pyth_lazer_transaction.IAddPublisherPublicKeys|null} [addPublisherPublicKeys] UpdatePublisher addPublisherPublicKeys + * @property {pyth_lazer_transaction.IRemovePublisherPublicKeys|null} [removePublisherPublicKeys] UpdatePublisher removePublisherPublicKeys + * @property {pyth_lazer_transaction.ISetPublisherPublicKeys|null} [setPublisherPublicKeys] UpdatePublisher setPublisherPublicKeys + * @property {pyth_lazer_transaction.ISetPublisherActive|null} [setPublisherActive] UpdatePublisher setPublisherActive + * @property {google.protobuf.IEmpty|null} [removePublisher] UpdatePublisher removePublisher + */ + + /** + * Constructs a new UpdatePublisher. + * @memberof pyth_lazer_transaction + * @classdesc Represents an UpdatePublisher. + * @implements IUpdatePublisher + * @constructor + * @param {pyth_lazer_transaction.IUpdatePublisher=} [properties] Properties to set + */ + function UpdatePublisher(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]]; + } + + /** + * UpdatePublisher publisherId. + * @member {number|null|undefined} publisherId + * @memberof pyth_lazer_transaction.UpdatePublisher + * @instance + */ + UpdatePublisher.prototype.publisherId = null; + + /** + * UpdatePublisher setPublisherName. + * @member {pyth_lazer_transaction.ISetPublisherName|null|undefined} setPublisherName + * @memberof pyth_lazer_transaction.UpdatePublisher + * @instance + */ + UpdatePublisher.prototype.setPublisherName = null; + + /** + * UpdatePublisher addPublisherPublicKeys. + * @member {pyth_lazer_transaction.IAddPublisherPublicKeys|null|undefined} addPublisherPublicKeys + * @memberof pyth_lazer_transaction.UpdatePublisher + * @instance + */ + UpdatePublisher.prototype.addPublisherPublicKeys = null; + + /** + * UpdatePublisher removePublisherPublicKeys. + * @member {pyth_lazer_transaction.IRemovePublisherPublicKeys|null|undefined} removePublisherPublicKeys + * @memberof pyth_lazer_transaction.UpdatePublisher + * @instance + */ + UpdatePublisher.prototype.removePublisherPublicKeys = null; + + /** + * UpdatePublisher setPublisherPublicKeys. + * @member {pyth_lazer_transaction.ISetPublisherPublicKeys|null|undefined} setPublisherPublicKeys + * @memberof pyth_lazer_transaction.UpdatePublisher + * @instance + */ + UpdatePublisher.prototype.setPublisherPublicKeys = null; + + /** + * UpdatePublisher setPublisherActive. + * @member {pyth_lazer_transaction.ISetPublisherActive|null|undefined} setPublisherActive + * @memberof pyth_lazer_transaction.UpdatePublisher + * @instance + */ + UpdatePublisher.prototype.setPublisherActive = null; + + /** + * UpdatePublisher removePublisher. + * @member {google.protobuf.IEmpty|null|undefined} removePublisher + * @memberof pyth_lazer_transaction.UpdatePublisher + * @instance + */ + UpdatePublisher.prototype.removePublisher = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * UpdatePublisher _publisherId. + * @member {"publisherId"|undefined} _publisherId + * @memberof pyth_lazer_transaction.UpdatePublisher + * @instance + */ + Object.defineProperty(UpdatePublisher.prototype, "_publisherId", { + get: $util.oneOfGetter($oneOfFields = ["publisherId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * UpdatePublisher action. + * @member {"setPublisherName"|"addPublisherPublicKeys"|"removePublisherPublicKeys"|"setPublisherPublicKeys"|"setPublisherActive"|"removePublisher"|undefined} action + * @memberof pyth_lazer_transaction.UpdatePublisher + * @instance + */ + Object.defineProperty(UpdatePublisher.prototype, "action", { + get: $util.oneOfGetter($oneOfFields = ["setPublisherName", "addPublisherPublicKeys", "removePublisherPublicKeys", "setPublisherPublicKeys", "setPublisherActive", "removePublisher"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new UpdatePublisher instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.UpdatePublisher + * @static + * @param {pyth_lazer_transaction.IUpdatePublisher=} [properties] Properties to set + * @returns {pyth_lazer_transaction.UpdatePublisher} UpdatePublisher instance + */ + UpdatePublisher.create = function create(properties) { + return new UpdatePublisher(properties); + }; + + /** + * Encodes the specified UpdatePublisher message. Does not implicitly {@link pyth_lazer_transaction.UpdatePublisher.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.UpdatePublisher + * @static + * @param {pyth_lazer_transaction.IUpdatePublisher} message UpdatePublisher message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdatePublisher.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.publisherId != null && Object.hasOwnProperty.call(message, "publisherId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.publisherId); + if (message.setPublisherName != null && Object.hasOwnProperty.call(message, "setPublisherName")) + $root.pyth_lazer_transaction.SetPublisherName.encode(message.setPublisherName, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); + if (message.addPublisherPublicKeys != null && Object.hasOwnProperty.call(message, "addPublisherPublicKeys")) + $root.pyth_lazer_transaction.AddPublisherPublicKeys.encode(message.addPublisherPublicKeys, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); + if (message.removePublisherPublicKeys != null && Object.hasOwnProperty.call(message, "removePublisherPublicKeys")) + $root.pyth_lazer_transaction.RemovePublisherPublicKeys.encode(message.removePublisherPublicKeys, writer.uint32(/* id 103, wireType 2 =*/826).fork()).ldelim(); + if (message.setPublisherPublicKeys != null && Object.hasOwnProperty.call(message, "setPublisherPublicKeys")) + $root.pyth_lazer_transaction.SetPublisherPublicKeys.encode(message.setPublisherPublicKeys, writer.uint32(/* id 104, wireType 2 =*/834).fork()).ldelim(); + if (message.setPublisherActive != null && Object.hasOwnProperty.call(message, "setPublisherActive")) + $root.pyth_lazer_transaction.SetPublisherActive.encode(message.setPublisherActive, writer.uint32(/* id 105, wireType 2 =*/842).fork()).ldelim(); + if (message.removePublisher != null && Object.hasOwnProperty.call(message, "removePublisher")) + $root.google.protobuf.Empty.encode(message.removePublisher, writer.uint32(/* id 199, wireType 2 =*/1594).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdatePublisher message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdatePublisher.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.UpdatePublisher + * @static + * @param {pyth_lazer_transaction.IUpdatePublisher} message UpdatePublisher message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdatePublisher.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdatePublisher message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.UpdatePublisher + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.UpdatePublisher} UpdatePublisher + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdatePublisher.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.UpdatePublisher(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.publisherId = reader.uint32(); + break; + } + case 101: { + message.setPublisherName = $root.pyth_lazer_transaction.SetPublisherName.decode(reader, reader.uint32()); + break; + } + case 102: { + message.addPublisherPublicKeys = $root.pyth_lazer_transaction.AddPublisherPublicKeys.decode(reader, reader.uint32()); + break; + } + case 103: { + message.removePublisherPublicKeys = $root.pyth_lazer_transaction.RemovePublisherPublicKeys.decode(reader, reader.uint32()); + break; + } + case 104: { + message.setPublisherPublicKeys = $root.pyth_lazer_transaction.SetPublisherPublicKeys.decode(reader, reader.uint32()); + break; + } + case 105: { + message.setPublisherActive = $root.pyth_lazer_transaction.SetPublisherActive.decode(reader, reader.uint32()); + break; + } + case 199: { + message.removePublisher = $root.google.protobuf.Empty.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdatePublisher message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.UpdatePublisher + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.UpdatePublisher} UpdatePublisher + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdatePublisher.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdatePublisher message. + * @function verify + * @memberof pyth_lazer_transaction.UpdatePublisher + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdatePublisher.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if (message.publisherId != null && message.hasOwnProperty("publisherId")) { + properties._publisherId = 1; + if (!$util.isInteger(message.publisherId)) + return "publisherId: integer expected"; + } + if (message.setPublisherName != null && message.hasOwnProperty("setPublisherName")) { + properties.action = 1; + { + let error = $root.pyth_lazer_transaction.SetPublisherName.verify(message.setPublisherName); + if (error) + return "setPublisherName." + error; + } + } + if (message.addPublisherPublicKeys != null && message.hasOwnProperty("addPublisherPublicKeys")) { + if (properties.action === 1) + return "action: multiple values"; + properties.action = 1; + { + let error = $root.pyth_lazer_transaction.AddPublisherPublicKeys.verify(message.addPublisherPublicKeys); + if (error) + return "addPublisherPublicKeys." + error; + } + } + if (message.removePublisherPublicKeys != null && message.hasOwnProperty("removePublisherPublicKeys")) { + if (properties.action === 1) + return "action: multiple values"; + properties.action = 1; + { + let error = $root.pyth_lazer_transaction.RemovePublisherPublicKeys.verify(message.removePublisherPublicKeys); + if (error) + return "removePublisherPublicKeys." + error; + } + } + if (message.setPublisherPublicKeys != null && message.hasOwnProperty("setPublisherPublicKeys")) { + if (properties.action === 1) + return "action: multiple values"; + properties.action = 1; + { + let error = $root.pyth_lazer_transaction.SetPublisherPublicKeys.verify(message.setPublisherPublicKeys); + if (error) + return "setPublisherPublicKeys." + error; + } + } + if (message.setPublisherActive != null && message.hasOwnProperty("setPublisherActive")) { + if (properties.action === 1) + return "action: multiple values"; + properties.action = 1; + { + let error = $root.pyth_lazer_transaction.SetPublisherActive.verify(message.setPublisherActive); + if (error) + return "setPublisherActive." + error; + } + } + if (message.removePublisher != null && message.hasOwnProperty("removePublisher")) { + if (properties.action === 1) + return "action: multiple values"; + properties.action = 1; + { + let error = $root.google.protobuf.Empty.verify(message.removePublisher); + if (error) + return "removePublisher." + error; + } + } + return null; + }; + + /** + * Creates an UpdatePublisher message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.UpdatePublisher + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.UpdatePublisher} UpdatePublisher + */ + UpdatePublisher.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.UpdatePublisher) + return object; + let message = new $root.pyth_lazer_transaction.UpdatePublisher(); + if (object.publisherId != null) + message.publisherId = object.publisherId >>> 0; + if (object.setPublisherName != null) { + if (typeof object.setPublisherName !== "object") + throw TypeError(".pyth_lazer_transaction.UpdatePublisher.setPublisherName: object expected"); + message.setPublisherName = $root.pyth_lazer_transaction.SetPublisherName.fromObject(object.setPublisherName); + } + if (object.addPublisherPublicKeys != null) { + if (typeof object.addPublisherPublicKeys !== "object") + throw TypeError(".pyth_lazer_transaction.UpdatePublisher.addPublisherPublicKeys: object expected"); + message.addPublisherPublicKeys = $root.pyth_lazer_transaction.AddPublisherPublicKeys.fromObject(object.addPublisherPublicKeys); + } + if (object.removePublisherPublicKeys != null) { + if (typeof object.removePublisherPublicKeys !== "object") + throw TypeError(".pyth_lazer_transaction.UpdatePublisher.removePublisherPublicKeys: object expected"); + message.removePublisherPublicKeys = $root.pyth_lazer_transaction.RemovePublisherPublicKeys.fromObject(object.removePublisherPublicKeys); + } + if (object.setPublisherPublicKeys != null) { + if (typeof object.setPublisherPublicKeys !== "object") + throw TypeError(".pyth_lazer_transaction.UpdatePublisher.setPublisherPublicKeys: object expected"); + message.setPublisherPublicKeys = $root.pyth_lazer_transaction.SetPublisherPublicKeys.fromObject(object.setPublisherPublicKeys); + } + if (object.setPublisherActive != null) { + if (typeof object.setPublisherActive !== "object") + throw TypeError(".pyth_lazer_transaction.UpdatePublisher.setPublisherActive: object expected"); + message.setPublisherActive = $root.pyth_lazer_transaction.SetPublisherActive.fromObject(object.setPublisherActive); + } + if (object.removePublisher != null) { + if (typeof object.removePublisher !== "object") + throw TypeError(".pyth_lazer_transaction.UpdatePublisher.removePublisher: object expected"); + message.removePublisher = $root.google.protobuf.Empty.fromObject(object.removePublisher); + } + return message; + }; + + /** + * Creates a plain object from an UpdatePublisher message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.UpdatePublisher + * @static + * @param {pyth_lazer_transaction.UpdatePublisher} message UpdatePublisher + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdatePublisher.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (message.publisherId != null && message.hasOwnProperty("publisherId")) { + object.publisherId = message.publisherId; + if (options.oneofs) + object._publisherId = "publisherId"; + } + if (message.setPublisherName != null && message.hasOwnProperty("setPublisherName")) { + object.setPublisherName = $root.pyth_lazer_transaction.SetPublisherName.toObject(message.setPublisherName, options); + if (options.oneofs) + object.action = "setPublisherName"; + } + if (message.addPublisherPublicKeys != null && message.hasOwnProperty("addPublisherPublicKeys")) { + object.addPublisherPublicKeys = $root.pyth_lazer_transaction.AddPublisherPublicKeys.toObject(message.addPublisherPublicKeys, options); + if (options.oneofs) + object.action = "addPublisherPublicKeys"; + } + if (message.removePublisherPublicKeys != null && message.hasOwnProperty("removePublisherPublicKeys")) { + object.removePublisherPublicKeys = $root.pyth_lazer_transaction.RemovePublisherPublicKeys.toObject(message.removePublisherPublicKeys, options); + if (options.oneofs) + object.action = "removePublisherPublicKeys"; + } + if (message.setPublisherPublicKeys != null && message.hasOwnProperty("setPublisherPublicKeys")) { + object.setPublisherPublicKeys = $root.pyth_lazer_transaction.SetPublisherPublicKeys.toObject(message.setPublisherPublicKeys, options); + if (options.oneofs) + object.action = "setPublisherPublicKeys"; + } + if (message.setPublisherActive != null && message.hasOwnProperty("setPublisherActive")) { + object.setPublisherActive = $root.pyth_lazer_transaction.SetPublisherActive.toObject(message.setPublisherActive, options); + if (options.oneofs) + object.action = "setPublisherActive"; + } + if (message.removePublisher != null && message.hasOwnProperty("removePublisher")) { + object.removePublisher = $root.google.protobuf.Empty.toObject(message.removePublisher, options); + if (options.oneofs) + object.action = "removePublisher"; + } + return object; + }; + + /** + * Converts this UpdatePublisher to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.UpdatePublisher + * @instance + * @returns {Object.} JSON object + */ + UpdatePublisher.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdatePublisher + * @function getTypeUrl + * @memberof pyth_lazer_transaction.UpdatePublisher + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdatePublisher.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.UpdatePublisher"; + }; + + return UpdatePublisher; + })(); + + pyth_lazer_transaction.SetPublisherName = (function() { + + /** + * Properties of a SetPublisherName. + * @memberof pyth_lazer_transaction + * @interface ISetPublisherName + * @property {string|null} [name] SetPublisherName name + */ + + /** + * Constructs a new SetPublisherName. + * @memberof pyth_lazer_transaction + * @classdesc Represents a SetPublisherName. + * @implements ISetPublisherName + * @constructor + * @param {pyth_lazer_transaction.ISetPublisherName=} [properties] Properties to set + */ + function SetPublisherName(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]]; + } + + /** + * SetPublisherName name. + * @member {string|null|undefined} name + * @memberof pyth_lazer_transaction.SetPublisherName + * @instance + */ + SetPublisherName.prototype.name = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * SetPublisherName _name. + * @member {"name"|undefined} _name + * @memberof pyth_lazer_transaction.SetPublisherName + * @instance + */ + Object.defineProperty(SetPublisherName.prototype, "_name", { + get: $util.oneOfGetter($oneOfFields = ["name"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SetPublisherName instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.SetPublisherName + * @static + * @param {pyth_lazer_transaction.ISetPublisherName=} [properties] Properties to set + * @returns {pyth_lazer_transaction.SetPublisherName} SetPublisherName instance + */ + SetPublisherName.create = function create(properties) { + return new SetPublisherName(properties); + }; + + /** + * Encodes the specified SetPublisherName message. Does not implicitly {@link pyth_lazer_transaction.SetPublisherName.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.SetPublisherName + * @static + * @param {pyth_lazer_transaction.ISetPublisherName} message SetPublisherName message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetPublisherName.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); + return writer; + }; + + /** + * Encodes the specified SetPublisherName message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetPublisherName.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.SetPublisherName + * @static + * @param {pyth_lazer_transaction.ISetPublisherName} message SetPublisherName message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetPublisherName.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetPublisherName message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.SetPublisherName + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.SetPublisherName} SetPublisherName + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetPublisherName.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.SetPublisherName(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetPublisherName message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.SetPublisherName + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.SetPublisherName} SetPublisherName + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetPublisherName.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetPublisherName message. + * @function verify + * @memberof pyth_lazer_transaction.SetPublisherName + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetPublisherName.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if (message.name != null && message.hasOwnProperty("name")) { + properties._name = 1; + if (!$util.isString(message.name)) + return "name: string expected"; + } + return null; + }; + + /** + * Creates a SetPublisherName message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.SetPublisherName + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.SetPublisherName} SetPublisherName + */ + SetPublisherName.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.SetPublisherName) + return object; + let message = new $root.pyth_lazer_transaction.SetPublisherName(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a SetPublisherName message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.SetPublisherName + * @static + * @param {pyth_lazer_transaction.SetPublisherName} message SetPublisherName + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetPublisherName.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (message.name != null && message.hasOwnProperty("name")) { + object.name = message.name; + if (options.oneofs) + object._name = "name"; + } + return object; + }; + + /** + * Converts this SetPublisherName to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.SetPublisherName + * @instance + * @returns {Object.} JSON object + */ + SetPublisherName.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetPublisherName + * @function getTypeUrl + * @memberof pyth_lazer_transaction.SetPublisherName + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetPublisherName.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.SetPublisherName"; + }; + + return SetPublisherName; + })(); + + pyth_lazer_transaction.AddPublisherPublicKeys = (function() { + + /** + * Properties of an AddPublisherPublicKeys. + * @memberof pyth_lazer_transaction + * @interface IAddPublisherPublicKeys + * @property {Array.|null} [publicKeys] AddPublisherPublicKeys publicKeys + */ + + /** + * Constructs a new AddPublisherPublicKeys. + * @memberof pyth_lazer_transaction + * @classdesc Represents an AddPublisherPublicKeys. + * @implements IAddPublisherPublicKeys + * @constructor + * @param {pyth_lazer_transaction.IAddPublisherPublicKeys=} [properties] Properties to set + */ + function AddPublisherPublicKeys(properties) { + this.publicKeys = []; + 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]]; + } + + /** + * AddPublisherPublicKeys publicKeys. + * @member {Array.} publicKeys + * @memberof pyth_lazer_transaction.AddPublisherPublicKeys + * @instance + */ + AddPublisherPublicKeys.prototype.publicKeys = $util.emptyArray; + + /** + * Creates a new AddPublisherPublicKeys instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.AddPublisherPublicKeys + * @static + * @param {pyth_lazer_transaction.IAddPublisherPublicKeys=} [properties] Properties to set + * @returns {pyth_lazer_transaction.AddPublisherPublicKeys} AddPublisherPublicKeys instance + */ + AddPublisherPublicKeys.create = function create(properties) { + return new AddPublisherPublicKeys(properties); + }; + + /** + * Encodes the specified AddPublisherPublicKeys message. Does not implicitly {@link pyth_lazer_transaction.AddPublisherPublicKeys.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.AddPublisherPublicKeys + * @static + * @param {pyth_lazer_transaction.IAddPublisherPublicKeys} message AddPublisherPublicKeys message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddPublisherPublicKeys.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.publicKeys != null && message.publicKeys.length) + for (let i = 0; i < message.publicKeys.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.publicKeys[i]); + return writer; + }; + + /** + * Encodes the specified AddPublisherPublicKeys message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddPublisherPublicKeys.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.AddPublisherPublicKeys + * @static + * @param {pyth_lazer_transaction.IAddPublisherPublicKeys} message AddPublisherPublicKeys message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddPublisherPublicKeys.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AddPublisherPublicKeys message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.AddPublisherPublicKeys + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.AddPublisherPublicKeys} AddPublisherPublicKeys + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddPublisherPublicKeys.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.AddPublisherPublicKeys(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.publicKeys && message.publicKeys.length)) + message.publicKeys = []; + message.publicKeys.push(reader.bytes()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AddPublisherPublicKeys message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.AddPublisherPublicKeys + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.AddPublisherPublicKeys} AddPublisherPublicKeys + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddPublisherPublicKeys.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AddPublisherPublicKeys message. + * @function verify + * @memberof pyth_lazer_transaction.AddPublisherPublicKeys + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AddPublisherPublicKeys.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.publicKeys != null && message.hasOwnProperty("publicKeys")) { + if (!Array.isArray(message.publicKeys)) + return "publicKeys: array expected"; + for (let i = 0; i < message.publicKeys.length; ++i) + if (!(message.publicKeys[i] && typeof message.publicKeys[i].length === "number" || $util.isString(message.publicKeys[i]))) + return "publicKeys: buffer[] expected"; + } + return null; + }; + + /** + * Creates an AddPublisherPublicKeys message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.AddPublisherPublicKeys + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.AddPublisherPublicKeys} AddPublisherPublicKeys + */ + AddPublisherPublicKeys.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.AddPublisherPublicKeys) + return object; + let message = new $root.pyth_lazer_transaction.AddPublisherPublicKeys(); + if (object.publicKeys) { + if (!Array.isArray(object.publicKeys)) + throw TypeError(".pyth_lazer_transaction.AddPublisherPublicKeys.publicKeys: array expected"); + message.publicKeys = []; + for (let i = 0; i < object.publicKeys.length; ++i) + if (typeof object.publicKeys[i] === "string") + $util.base64.decode(object.publicKeys[i], message.publicKeys[i] = $util.newBuffer($util.base64.length(object.publicKeys[i])), 0); + else if (object.publicKeys[i].length >= 0) + message.publicKeys[i] = object.publicKeys[i]; + } + return message; + }; + + /** + * Creates a plain object from an AddPublisherPublicKeys message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.AddPublisherPublicKeys + * @static + * @param {pyth_lazer_transaction.AddPublisherPublicKeys} message AddPublisherPublicKeys + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AddPublisherPublicKeys.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.publicKeys = []; + if (message.publicKeys && message.publicKeys.length) { + object.publicKeys = []; + for (let j = 0; j < message.publicKeys.length; ++j) + object.publicKeys[j] = options.bytes === String ? $util.base64.encode(message.publicKeys[j], 0, message.publicKeys[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.publicKeys[j]) : message.publicKeys[j]; + } + return object; + }; + + /** + * Converts this AddPublisherPublicKeys to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.AddPublisherPublicKeys + * @instance + * @returns {Object.} JSON object + */ + AddPublisherPublicKeys.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AddPublisherPublicKeys + * @function getTypeUrl + * @memberof pyth_lazer_transaction.AddPublisherPublicKeys + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AddPublisherPublicKeys.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.AddPublisherPublicKeys"; + }; + + return AddPublisherPublicKeys; + })(); + + pyth_lazer_transaction.RemovePublisherPublicKeys = (function() { + + /** + * Properties of a RemovePublisherPublicKeys. + * @memberof pyth_lazer_transaction + * @interface IRemovePublisherPublicKeys + * @property {Array.|null} [publicKeys] RemovePublisherPublicKeys publicKeys + */ + + /** + * Constructs a new RemovePublisherPublicKeys. + * @memberof pyth_lazer_transaction + * @classdesc Represents a RemovePublisherPublicKeys. + * @implements IRemovePublisherPublicKeys + * @constructor + * @param {pyth_lazer_transaction.IRemovePublisherPublicKeys=} [properties] Properties to set + */ + function RemovePublisherPublicKeys(properties) { + this.publicKeys = []; + 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]]; + } + + /** + * RemovePublisherPublicKeys publicKeys. + * @member {Array.} publicKeys + * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys + * @instance + */ + RemovePublisherPublicKeys.prototype.publicKeys = $util.emptyArray; + + /** + * Creates a new RemovePublisherPublicKeys instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys + * @static + * @param {pyth_lazer_transaction.IRemovePublisherPublicKeys=} [properties] Properties to set + * @returns {pyth_lazer_transaction.RemovePublisherPublicKeys} RemovePublisherPublicKeys instance + */ + RemovePublisherPublicKeys.create = function create(properties) { + return new RemovePublisherPublicKeys(properties); + }; + + /** + * Encodes the specified RemovePublisherPublicKeys message. Does not implicitly {@link pyth_lazer_transaction.RemovePublisherPublicKeys.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys + * @static + * @param {pyth_lazer_transaction.IRemovePublisherPublicKeys} message RemovePublisherPublicKeys message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemovePublisherPublicKeys.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.publicKeys != null && message.publicKeys.length) + for (let i = 0; i < message.publicKeys.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.publicKeys[i]); + return writer; + }; + + /** + * Encodes the specified RemovePublisherPublicKeys message, length delimited. Does not implicitly {@link pyth_lazer_transaction.RemovePublisherPublicKeys.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys + * @static + * @param {pyth_lazer_transaction.IRemovePublisherPublicKeys} message RemovePublisherPublicKeys message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemovePublisherPublicKeys.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RemovePublisherPublicKeys message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.RemovePublisherPublicKeys} RemovePublisherPublicKeys + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemovePublisherPublicKeys.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.RemovePublisherPublicKeys(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.publicKeys && message.publicKeys.length)) + message.publicKeys = []; + message.publicKeys.push(reader.bytes()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RemovePublisherPublicKeys message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.RemovePublisherPublicKeys} RemovePublisherPublicKeys + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemovePublisherPublicKeys.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RemovePublisherPublicKeys message. + * @function verify + * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RemovePublisherPublicKeys.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.publicKeys != null && message.hasOwnProperty("publicKeys")) { + if (!Array.isArray(message.publicKeys)) + return "publicKeys: array expected"; + for (let i = 0; i < message.publicKeys.length; ++i) + if (!(message.publicKeys[i] && typeof message.publicKeys[i].length === "number" || $util.isString(message.publicKeys[i]))) + return "publicKeys: buffer[] expected"; + } + return null; + }; + + /** + * Creates a RemovePublisherPublicKeys message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.RemovePublisherPublicKeys} RemovePublisherPublicKeys + */ + RemovePublisherPublicKeys.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.RemovePublisherPublicKeys) + return object; + let message = new $root.pyth_lazer_transaction.RemovePublisherPublicKeys(); + if (object.publicKeys) { + if (!Array.isArray(object.publicKeys)) + throw TypeError(".pyth_lazer_transaction.RemovePublisherPublicKeys.publicKeys: array expected"); + message.publicKeys = []; + for (let i = 0; i < object.publicKeys.length; ++i) + if (typeof object.publicKeys[i] === "string") + $util.base64.decode(object.publicKeys[i], message.publicKeys[i] = $util.newBuffer($util.base64.length(object.publicKeys[i])), 0); + else if (object.publicKeys[i].length >= 0) + message.publicKeys[i] = object.publicKeys[i]; + } + return message; + }; + + /** + * Creates a plain object from a RemovePublisherPublicKeys message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys + * @static + * @param {pyth_lazer_transaction.RemovePublisherPublicKeys} message RemovePublisherPublicKeys + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RemovePublisherPublicKeys.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.publicKeys = []; + if (message.publicKeys && message.publicKeys.length) { + object.publicKeys = []; + for (let j = 0; j < message.publicKeys.length; ++j) + object.publicKeys[j] = options.bytes === String ? $util.base64.encode(message.publicKeys[j], 0, message.publicKeys[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.publicKeys[j]) : message.publicKeys[j]; + } + return object; + }; + + /** + * Converts this RemovePublisherPublicKeys to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys + * @instance + * @returns {Object.} JSON object + */ + RemovePublisherPublicKeys.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RemovePublisherPublicKeys + * @function getTypeUrl + * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RemovePublisherPublicKeys.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.RemovePublisherPublicKeys"; + }; + + return RemovePublisherPublicKeys; + })(); + + pyth_lazer_transaction.SetPublisherPublicKeys = (function() { + + /** + * Properties of a SetPublisherPublicKeys. + * @memberof pyth_lazer_transaction + * @interface ISetPublisherPublicKeys + * @property {Array.|null} [publicKeys] SetPublisherPublicKeys publicKeys + */ + + /** + * Constructs a new SetPublisherPublicKeys. + * @memberof pyth_lazer_transaction + * @classdesc Represents a SetPublisherPublicKeys. + * @implements ISetPublisherPublicKeys + * @constructor + * @param {pyth_lazer_transaction.ISetPublisherPublicKeys=} [properties] Properties to set + */ + function SetPublisherPublicKeys(properties) { + this.publicKeys = []; + 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]]; + } + + /** + * SetPublisherPublicKeys publicKeys. + * @member {Array.} publicKeys + * @memberof pyth_lazer_transaction.SetPublisherPublicKeys + * @instance + */ + SetPublisherPublicKeys.prototype.publicKeys = $util.emptyArray; + + /** + * Creates a new SetPublisherPublicKeys instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.SetPublisherPublicKeys + * @static + * @param {pyth_lazer_transaction.ISetPublisherPublicKeys=} [properties] Properties to set + * @returns {pyth_lazer_transaction.SetPublisherPublicKeys} SetPublisherPublicKeys instance + */ + SetPublisherPublicKeys.create = function create(properties) { + return new SetPublisherPublicKeys(properties); + }; + + /** + * Encodes the specified SetPublisherPublicKeys message. Does not implicitly {@link pyth_lazer_transaction.SetPublisherPublicKeys.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.SetPublisherPublicKeys + * @static + * @param {pyth_lazer_transaction.ISetPublisherPublicKeys} message SetPublisherPublicKeys message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetPublisherPublicKeys.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.publicKeys != null && message.publicKeys.length) + for (let i = 0; i < message.publicKeys.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.publicKeys[i]); + return writer; + }; + + /** + * Encodes the specified SetPublisherPublicKeys message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetPublisherPublicKeys.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.SetPublisherPublicKeys + * @static + * @param {pyth_lazer_transaction.ISetPublisherPublicKeys} message SetPublisherPublicKeys message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetPublisherPublicKeys.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetPublisherPublicKeys message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.SetPublisherPublicKeys + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.SetPublisherPublicKeys} SetPublisherPublicKeys + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetPublisherPublicKeys.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.SetPublisherPublicKeys(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.publicKeys && message.publicKeys.length)) + message.publicKeys = []; + message.publicKeys.push(reader.bytes()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetPublisherPublicKeys message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.SetPublisherPublicKeys + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.SetPublisherPublicKeys} SetPublisherPublicKeys + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetPublisherPublicKeys.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetPublisherPublicKeys message. + * @function verify + * @memberof pyth_lazer_transaction.SetPublisherPublicKeys + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetPublisherPublicKeys.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.publicKeys != null && message.hasOwnProperty("publicKeys")) { + if (!Array.isArray(message.publicKeys)) + return "publicKeys: array expected"; + for (let i = 0; i < message.publicKeys.length; ++i) + if (!(message.publicKeys[i] && typeof message.publicKeys[i].length === "number" || $util.isString(message.publicKeys[i]))) + return "publicKeys: buffer[] expected"; + } + return null; + }; + + /** + * Creates a SetPublisherPublicKeys message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.SetPublisherPublicKeys + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.SetPublisherPublicKeys} SetPublisherPublicKeys + */ + SetPublisherPublicKeys.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.SetPublisherPublicKeys) + return object; + let message = new $root.pyth_lazer_transaction.SetPublisherPublicKeys(); + if (object.publicKeys) { + if (!Array.isArray(object.publicKeys)) + throw TypeError(".pyth_lazer_transaction.SetPublisherPublicKeys.publicKeys: array expected"); + message.publicKeys = []; + for (let i = 0; i < object.publicKeys.length; ++i) + if (typeof object.publicKeys[i] === "string") + $util.base64.decode(object.publicKeys[i], message.publicKeys[i] = $util.newBuffer($util.base64.length(object.publicKeys[i])), 0); + else if (object.publicKeys[i].length >= 0) + message.publicKeys[i] = object.publicKeys[i]; + } + return message; + }; + + /** + * Creates a plain object from a SetPublisherPublicKeys message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.SetPublisherPublicKeys + * @static + * @param {pyth_lazer_transaction.SetPublisherPublicKeys} message SetPublisherPublicKeys + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetPublisherPublicKeys.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.publicKeys = []; + if (message.publicKeys && message.publicKeys.length) { + object.publicKeys = []; + for (let j = 0; j < message.publicKeys.length; ++j) + object.publicKeys[j] = options.bytes === String ? $util.base64.encode(message.publicKeys[j], 0, message.publicKeys[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.publicKeys[j]) : message.publicKeys[j]; + } + return object; + }; + + /** + * Converts this SetPublisherPublicKeys to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.SetPublisherPublicKeys + * @instance + * @returns {Object.} JSON object + */ + SetPublisherPublicKeys.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetPublisherPublicKeys + * @function getTypeUrl + * @memberof pyth_lazer_transaction.SetPublisherPublicKeys + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetPublisherPublicKeys.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.SetPublisherPublicKeys"; + }; + + return SetPublisherPublicKeys; + })(); + + pyth_lazer_transaction.SetPublisherActive = (function() { + + /** + * Properties of a SetPublisherActive. + * @memberof pyth_lazer_transaction + * @interface ISetPublisherActive + * @property {boolean|null} [isActive] SetPublisherActive isActive + */ + + /** + * Constructs a new SetPublisherActive. + * @memberof pyth_lazer_transaction + * @classdesc Represents a SetPublisherActive. + * @implements ISetPublisherActive + * @constructor + * @param {pyth_lazer_transaction.ISetPublisherActive=} [properties] Properties to set + */ + function SetPublisherActive(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]]; + } + + /** + * SetPublisherActive isActive. + * @member {boolean|null|undefined} isActive + * @memberof pyth_lazer_transaction.SetPublisherActive + * @instance + */ + SetPublisherActive.prototype.isActive = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * SetPublisherActive _isActive. + * @member {"isActive"|undefined} _isActive + * @memberof pyth_lazer_transaction.SetPublisherActive + * @instance + */ + Object.defineProperty(SetPublisherActive.prototype, "_isActive", { + get: $util.oneOfGetter($oneOfFields = ["isActive"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SetPublisherActive instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.SetPublisherActive + * @static + * @param {pyth_lazer_transaction.ISetPublisherActive=} [properties] Properties to set + * @returns {pyth_lazer_transaction.SetPublisherActive} SetPublisherActive instance + */ + SetPublisherActive.create = function create(properties) { + return new SetPublisherActive(properties); + }; + + /** + * Encodes the specified SetPublisherActive message. Does not implicitly {@link pyth_lazer_transaction.SetPublisherActive.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.SetPublisherActive + * @static + * @param {pyth_lazer_transaction.ISetPublisherActive} message SetPublisherActive message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetPublisherActive.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.isActive != null && Object.hasOwnProperty.call(message, "isActive")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.isActive); + return writer; + }; + + /** + * Encodes the specified SetPublisherActive message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetPublisherActive.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.SetPublisherActive + * @static + * @param {pyth_lazer_transaction.ISetPublisherActive} message SetPublisherActive message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetPublisherActive.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetPublisherActive message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.SetPublisherActive + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.SetPublisherActive} SetPublisherActive + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetPublisherActive.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.SetPublisherActive(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.isActive = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetPublisherActive message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.SetPublisherActive + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.SetPublisherActive} SetPublisherActive + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetPublisherActive.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetPublisherActive message. + * @function verify + * @memberof pyth_lazer_transaction.SetPublisherActive + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetPublisherActive.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if (message.isActive != null && message.hasOwnProperty("isActive")) { + properties._isActive = 1; + if (typeof message.isActive !== "boolean") + return "isActive: boolean expected"; + } + return null; + }; + + /** + * Creates a SetPublisherActive message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.SetPublisherActive + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.SetPublisherActive} SetPublisherActive + */ + SetPublisherActive.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.SetPublisherActive) + return object; + let message = new $root.pyth_lazer_transaction.SetPublisherActive(); + if (object.isActive != null) + message.isActive = Boolean(object.isActive); + return message; + }; + + /** + * Creates a plain object from a SetPublisherActive message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.SetPublisherActive + * @static + * @param {pyth_lazer_transaction.SetPublisherActive} message SetPublisherActive + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetPublisherActive.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (message.isActive != null && message.hasOwnProperty("isActive")) { + object.isActive = message.isActive; + if (options.oneofs) + object._isActive = "isActive"; + } + return object; + }; + + /** + * Converts this SetPublisherActive to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.SetPublisherActive + * @instance + * @returns {Object.} JSON object + */ + SetPublisherActive.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetPublisherActive + * @function getTypeUrl + * @memberof pyth_lazer_transaction.SetPublisherActive + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetPublisherActive.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.SetPublisherActive"; + }; + + return SetPublisherActive; + })(); + + pyth_lazer_transaction.AddFeed = (function() { + + /** + * Properties of an AddFeed. + * @memberof pyth_lazer_transaction + * @interface IAddFeed + * @property {number|null} [priceFeedId] AddFeed priceFeedId + * @property {pyth_lazer_transaction.DynamicValue.IMap|null} [metadata] AddFeed metadata + * @property {Array.|null} [permissionedPublishers] AddFeed permissionedPublishers + */ + + /** + * Constructs a new AddFeed. + * @memberof pyth_lazer_transaction + * @classdesc Represents an AddFeed. + * @implements IAddFeed + * @constructor + * @param {pyth_lazer_transaction.IAddFeed=} [properties] Properties to set + */ + function AddFeed(properties) { + this.permissionedPublishers = []; + 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]]; + } + + /** + * AddFeed priceFeedId. + * @member {number|null|undefined} priceFeedId + * @memberof pyth_lazer_transaction.AddFeed + * @instance + */ + AddFeed.prototype.priceFeedId = null; + + /** + * AddFeed metadata. + * @member {pyth_lazer_transaction.DynamicValue.IMap|null|undefined} metadata + * @memberof pyth_lazer_transaction.AddFeed + * @instance + */ + AddFeed.prototype.metadata = null; + + /** + * AddFeed permissionedPublishers. + * @member {Array.} permissionedPublishers + * @memberof pyth_lazer_transaction.AddFeed + * @instance + */ + AddFeed.prototype.permissionedPublishers = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * AddFeed _priceFeedId. + * @member {"priceFeedId"|undefined} _priceFeedId + * @memberof pyth_lazer_transaction.AddFeed + * @instance + */ + Object.defineProperty(AddFeed.prototype, "_priceFeedId", { + get: $util.oneOfGetter($oneOfFields = ["priceFeedId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AddFeed _metadata. + * @member {"metadata"|undefined} _metadata + * @memberof pyth_lazer_transaction.AddFeed + * @instance + */ + Object.defineProperty(AddFeed.prototype, "_metadata", { + get: $util.oneOfGetter($oneOfFields = ["metadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AddFeed instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.AddFeed + * @static + * @param {pyth_lazer_transaction.IAddFeed=} [properties] Properties to set + * @returns {pyth_lazer_transaction.AddFeed} AddFeed instance + */ + AddFeed.create = function create(properties) { + return new AddFeed(properties); + }; + + /** + * Encodes the specified AddFeed message. Does not implicitly {@link pyth_lazer_transaction.AddFeed.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.AddFeed + * @static + * @param {pyth_lazer_transaction.IAddFeed} message AddFeed message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddFeed.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.priceFeedId != null && Object.hasOwnProperty.call(message, "priceFeedId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.priceFeedId); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.pyth_lazer_transaction.DynamicValue.Map.encode(message.metadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.permissionedPublishers != null && message.permissionedPublishers.length) { + writer.uint32(/* id 3, wireType 2 =*/26).fork(); + for (let i = 0; i < message.permissionedPublishers.length; ++i) + writer.uint32(message.permissionedPublishers[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified AddFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddFeed.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.AddFeed + * @static + * @param {pyth_lazer_transaction.IAddFeed} message AddFeed message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddFeed.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AddFeed message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.AddFeed + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.AddFeed} AddFeed + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddFeed.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.AddFeed(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.priceFeedId = reader.uint32(); + break; + } + case 2: { + message.metadata = $root.pyth_lazer_transaction.DynamicValue.Map.decode(reader, reader.uint32()); + break; + } + case 3: { + if (!(message.permissionedPublishers && message.permissionedPublishers.length)) + message.permissionedPublishers = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.permissionedPublishers.push(reader.uint32()); + } else + message.permissionedPublishers.push(reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AddFeed message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.AddFeed + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.AddFeed} AddFeed + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddFeed.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AddFeed message. + * @function verify + * @memberof pyth_lazer_transaction.AddFeed + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AddFeed.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if (message.priceFeedId != null && message.hasOwnProperty("priceFeedId")) { + properties._priceFeedId = 1; + if (!$util.isInteger(message.priceFeedId)) + return "priceFeedId: integer expected"; + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + properties._metadata = 1; + { + let error = $root.pyth_lazer_transaction.DynamicValue.Map.verify(message.metadata); + if (error) + return "metadata." + error; + } + } + if (message.permissionedPublishers != null && message.hasOwnProperty("permissionedPublishers")) { + if (!Array.isArray(message.permissionedPublishers)) + return "permissionedPublishers: array expected"; + for (let i = 0; i < message.permissionedPublishers.length; ++i) + if (!$util.isInteger(message.permissionedPublishers[i])) + return "permissionedPublishers: integer[] expected"; + } + return null; + }; + + /** + * Creates an AddFeed message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.AddFeed + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.AddFeed} AddFeed + */ + AddFeed.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.AddFeed) + return object; + let message = new $root.pyth_lazer_transaction.AddFeed(); + if (object.priceFeedId != null) + message.priceFeedId = object.priceFeedId >>> 0; + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".pyth_lazer_transaction.AddFeed.metadata: object expected"); + message.metadata = $root.pyth_lazer_transaction.DynamicValue.Map.fromObject(object.metadata); + } + if (object.permissionedPublishers) { + if (!Array.isArray(object.permissionedPublishers)) + throw TypeError(".pyth_lazer_transaction.AddFeed.permissionedPublishers: array expected"); + message.permissionedPublishers = []; + for (let i = 0; i < object.permissionedPublishers.length; ++i) + message.permissionedPublishers[i] = object.permissionedPublishers[i] >>> 0; + } + return message; + }; + + /** + * Creates a plain object from an AddFeed message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.AddFeed + * @static + * @param {pyth_lazer_transaction.AddFeed} message AddFeed + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AddFeed.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.permissionedPublishers = []; + if (message.priceFeedId != null && message.hasOwnProperty("priceFeedId")) { + object.priceFeedId = message.priceFeedId; + if (options.oneofs) + object._priceFeedId = "priceFeedId"; + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + object.metadata = $root.pyth_lazer_transaction.DynamicValue.Map.toObject(message.metadata, options); + if (options.oneofs) + object._metadata = "metadata"; + } + if (message.permissionedPublishers && message.permissionedPublishers.length) { + object.permissionedPublishers = []; + for (let j = 0; j < message.permissionedPublishers.length; ++j) + object.permissionedPublishers[j] = message.permissionedPublishers[j]; + } + return object; + }; + + /** + * Converts this AddFeed to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.AddFeed + * @instance + * @returns {Object.} JSON object + */ + AddFeed.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AddFeed + * @function getTypeUrl + * @memberof pyth_lazer_transaction.AddFeed + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AddFeed.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.AddFeed"; + }; + + return AddFeed; + })(); + + pyth_lazer_transaction.UpdateFeed = (function() { + + /** + * Properties of an UpdateFeed. + * @memberof pyth_lazer_transaction + * @interface IUpdateFeed + * @property {number|null} [priceFeedId] UpdateFeed priceFeedId + * @property {pyth_lazer_transaction.IUpdateFeedMetadata|null} [updateFeedMetadata] UpdateFeed updateFeedMetadata + * @property {pyth_lazer_transaction.IActivateFeed|null} [activateFeed] UpdateFeed activateFeed + * @property {pyth_lazer_transaction.IDeactivateFeed|null} [deactivateFeed] UpdateFeed deactivateFeed + * @property {google.protobuf.IEmpty|null} [removeFeed] UpdateFeed removeFeed + */ + + /** + * Constructs a new UpdateFeed. + * @memberof pyth_lazer_transaction + * @classdesc Represents an UpdateFeed. + * @implements IUpdateFeed + * @constructor + * @param {pyth_lazer_transaction.IUpdateFeed=} [properties] Properties to set + */ + function UpdateFeed(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]]; + } + + /** + * UpdateFeed priceFeedId. + * @member {number|null|undefined} priceFeedId + * @memberof pyth_lazer_transaction.UpdateFeed + * @instance + */ + UpdateFeed.prototype.priceFeedId = null; + + /** + * UpdateFeed updateFeedMetadata. + * @member {pyth_lazer_transaction.IUpdateFeedMetadata|null|undefined} updateFeedMetadata + * @memberof pyth_lazer_transaction.UpdateFeed + * @instance + */ + UpdateFeed.prototype.updateFeedMetadata = null; + + /** + * UpdateFeed activateFeed. + * @member {pyth_lazer_transaction.IActivateFeed|null|undefined} activateFeed + * @memberof pyth_lazer_transaction.UpdateFeed + * @instance + */ + UpdateFeed.prototype.activateFeed = null; + + /** + * UpdateFeed deactivateFeed. + * @member {pyth_lazer_transaction.IDeactivateFeed|null|undefined} deactivateFeed + * @memberof pyth_lazer_transaction.UpdateFeed + * @instance + */ + UpdateFeed.prototype.deactivateFeed = null; + + /** + * UpdateFeed removeFeed. + * @member {google.protobuf.IEmpty|null|undefined} removeFeed + * @memberof pyth_lazer_transaction.UpdateFeed + * @instance + */ + UpdateFeed.prototype.removeFeed = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * UpdateFeed _priceFeedId. + * @member {"priceFeedId"|undefined} _priceFeedId + * @memberof pyth_lazer_transaction.UpdateFeed + * @instance + */ + Object.defineProperty(UpdateFeed.prototype, "_priceFeedId", { + get: $util.oneOfGetter($oneOfFields = ["priceFeedId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * UpdateFeed action. + * @member {"updateFeedMetadata"|"activateFeed"|"deactivateFeed"|"removeFeed"|undefined} action + * @memberof pyth_lazer_transaction.UpdateFeed + * @instance + */ + Object.defineProperty(UpdateFeed.prototype, "action", { + get: $util.oneOfGetter($oneOfFields = ["updateFeedMetadata", "activateFeed", "deactivateFeed", "removeFeed"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new UpdateFeed instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.UpdateFeed + * @static + * @param {pyth_lazer_transaction.IUpdateFeed=} [properties] Properties to set + * @returns {pyth_lazer_transaction.UpdateFeed} UpdateFeed instance + */ + UpdateFeed.create = function create(properties) { + return new UpdateFeed(properties); + }; + + /** + * Encodes the specified UpdateFeed message. Does not implicitly {@link pyth_lazer_transaction.UpdateFeed.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.UpdateFeed + * @static + * @param {pyth_lazer_transaction.IUpdateFeed} message UpdateFeed message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateFeed.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.priceFeedId != null && Object.hasOwnProperty.call(message, "priceFeedId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.priceFeedId); + if (message.updateFeedMetadata != null && Object.hasOwnProperty.call(message, "updateFeedMetadata")) + $root.pyth_lazer_transaction.UpdateFeedMetadata.encode(message.updateFeedMetadata, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); + if (message.activateFeed != null && Object.hasOwnProperty.call(message, "activateFeed")) + $root.pyth_lazer_transaction.ActivateFeed.encode(message.activateFeed, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); + if (message.deactivateFeed != null && Object.hasOwnProperty.call(message, "deactivateFeed")) + $root.pyth_lazer_transaction.DeactivateFeed.encode(message.deactivateFeed, writer.uint32(/* id 103, wireType 2 =*/826).fork()).ldelim(); + if (message.removeFeed != null && Object.hasOwnProperty.call(message, "removeFeed")) + $root.google.protobuf.Empty.encode(message.removeFeed, writer.uint32(/* id 199, wireType 2 =*/1594).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdateFeed.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.UpdateFeed + * @static + * @param {pyth_lazer_transaction.IUpdateFeed} message UpdateFeed message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateFeed.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateFeed message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.UpdateFeed + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.UpdateFeed} UpdateFeed + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateFeed.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.UpdateFeed(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.priceFeedId = reader.uint32(); + break; + } + case 101: { + message.updateFeedMetadata = $root.pyth_lazer_transaction.UpdateFeedMetadata.decode(reader, reader.uint32()); + break; + } + case 102: { + message.activateFeed = $root.pyth_lazer_transaction.ActivateFeed.decode(reader, reader.uint32()); + break; + } + case 103: { + message.deactivateFeed = $root.pyth_lazer_transaction.DeactivateFeed.decode(reader, reader.uint32()); + break; + } + case 199: { + message.removeFeed = $root.google.protobuf.Empty.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateFeed message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.UpdateFeed + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.UpdateFeed} UpdateFeed + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateFeed.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateFeed message. + * @function verify + * @memberof pyth_lazer_transaction.UpdateFeed + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateFeed.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if (message.priceFeedId != null && message.hasOwnProperty("priceFeedId")) { + properties._priceFeedId = 1; + if (!$util.isInteger(message.priceFeedId)) + return "priceFeedId: integer expected"; + } + if (message.updateFeedMetadata != null && message.hasOwnProperty("updateFeedMetadata")) { + properties.action = 1; + { + let error = $root.pyth_lazer_transaction.UpdateFeedMetadata.verify(message.updateFeedMetadata); + if (error) + return "updateFeedMetadata." + error; + } + } + if (message.activateFeed != null && message.hasOwnProperty("activateFeed")) { + if (properties.action === 1) + return "action: multiple values"; + properties.action = 1; + { + let error = $root.pyth_lazer_transaction.ActivateFeed.verify(message.activateFeed); + if (error) + return "activateFeed." + error; + } + } + if (message.deactivateFeed != null && message.hasOwnProperty("deactivateFeed")) { + if (properties.action === 1) + return "action: multiple values"; + properties.action = 1; + { + let error = $root.pyth_lazer_transaction.DeactivateFeed.verify(message.deactivateFeed); + if (error) + return "deactivateFeed." + error; + } + } + if (message.removeFeed != null && message.hasOwnProperty("removeFeed")) { + if (properties.action === 1) + return "action: multiple values"; + properties.action = 1; + { + let error = $root.google.protobuf.Empty.verify(message.removeFeed); + if (error) + return "removeFeed." + error; + } + } + return null; + }; + + /** + * Creates an UpdateFeed message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.UpdateFeed + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.UpdateFeed} UpdateFeed + */ + UpdateFeed.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.UpdateFeed) + return object; + let message = new $root.pyth_lazer_transaction.UpdateFeed(); + if (object.priceFeedId != null) + message.priceFeedId = object.priceFeedId >>> 0; + if (object.updateFeedMetadata != null) { + if (typeof object.updateFeedMetadata !== "object") + throw TypeError(".pyth_lazer_transaction.UpdateFeed.updateFeedMetadata: object expected"); + message.updateFeedMetadata = $root.pyth_lazer_transaction.UpdateFeedMetadata.fromObject(object.updateFeedMetadata); + } + if (object.activateFeed != null) { + if (typeof object.activateFeed !== "object") + throw TypeError(".pyth_lazer_transaction.UpdateFeed.activateFeed: object expected"); + message.activateFeed = $root.pyth_lazer_transaction.ActivateFeed.fromObject(object.activateFeed); + } + if (object.deactivateFeed != null) { + if (typeof object.deactivateFeed !== "object") + throw TypeError(".pyth_lazer_transaction.UpdateFeed.deactivateFeed: object expected"); + message.deactivateFeed = $root.pyth_lazer_transaction.DeactivateFeed.fromObject(object.deactivateFeed); + } + if (object.removeFeed != null) { + if (typeof object.removeFeed !== "object") + throw TypeError(".pyth_lazer_transaction.UpdateFeed.removeFeed: object expected"); + message.removeFeed = $root.google.protobuf.Empty.fromObject(object.removeFeed); + } + return message; + }; + + /** + * Creates a plain object from an UpdateFeed message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.UpdateFeed + * @static + * @param {pyth_lazer_transaction.UpdateFeed} message UpdateFeed + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateFeed.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (message.priceFeedId != null && message.hasOwnProperty("priceFeedId")) { + object.priceFeedId = message.priceFeedId; + if (options.oneofs) + object._priceFeedId = "priceFeedId"; + } + if (message.updateFeedMetadata != null && message.hasOwnProperty("updateFeedMetadata")) { + object.updateFeedMetadata = $root.pyth_lazer_transaction.UpdateFeedMetadata.toObject(message.updateFeedMetadata, options); + if (options.oneofs) + object.action = "updateFeedMetadata"; + } + if (message.activateFeed != null && message.hasOwnProperty("activateFeed")) { + object.activateFeed = $root.pyth_lazer_transaction.ActivateFeed.toObject(message.activateFeed, options); + if (options.oneofs) + object.action = "activateFeed"; + } + if (message.deactivateFeed != null && message.hasOwnProperty("deactivateFeed")) { + object.deactivateFeed = $root.pyth_lazer_transaction.DeactivateFeed.toObject(message.deactivateFeed, options); + if (options.oneofs) + object.action = "deactivateFeed"; + } + if (message.removeFeed != null && message.hasOwnProperty("removeFeed")) { + object.removeFeed = $root.google.protobuf.Empty.toObject(message.removeFeed, options); + if (options.oneofs) + object.action = "removeFeed"; + } + return object; + }; + + /** + * Converts this UpdateFeed to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.UpdateFeed + * @instance + * @returns {Object.} JSON object + */ + UpdateFeed.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateFeed + * @function getTypeUrl + * @memberof pyth_lazer_transaction.UpdateFeed + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateFeed.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.UpdateFeed"; + }; + + return UpdateFeed; + })(); + + pyth_lazer_transaction.UpdateFeedMetadata = (function() { + + /** + * Properties of an UpdateFeedMetadata. + * @memberof pyth_lazer_transaction + * @interface IUpdateFeedMetadata + * @property {string|null} [name] UpdateFeedMetadata name + * @property {pyth_lazer_transaction.IDynamicValue|null} [value] UpdateFeedMetadata value + */ + + /** + * Constructs a new UpdateFeedMetadata. + * @memberof pyth_lazer_transaction + * @classdesc Represents an UpdateFeedMetadata. + * @implements IUpdateFeedMetadata + * @constructor + * @param {pyth_lazer_transaction.IUpdateFeedMetadata=} [properties] Properties to set + */ + function UpdateFeedMetadata(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]]; + } + + /** + * UpdateFeedMetadata name. + * @member {string|null|undefined} name + * @memberof pyth_lazer_transaction.UpdateFeedMetadata + * @instance + */ + UpdateFeedMetadata.prototype.name = null; + + /** + * UpdateFeedMetadata value. + * @member {pyth_lazer_transaction.IDynamicValue|null|undefined} value + * @memberof pyth_lazer_transaction.UpdateFeedMetadata + * @instance + */ + UpdateFeedMetadata.prototype.value = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * UpdateFeedMetadata _name. + * @member {"name"|undefined} _name + * @memberof pyth_lazer_transaction.UpdateFeedMetadata + * @instance + */ + Object.defineProperty(UpdateFeedMetadata.prototype, "_name", { + get: $util.oneOfGetter($oneOfFields = ["name"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * UpdateFeedMetadata _value. + * @member {"value"|undefined} _value + * @memberof pyth_lazer_transaction.UpdateFeedMetadata + * @instance + */ + Object.defineProperty(UpdateFeedMetadata.prototype, "_value", { + get: $util.oneOfGetter($oneOfFields = ["value"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new UpdateFeedMetadata instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.UpdateFeedMetadata + * @static + * @param {pyth_lazer_transaction.IUpdateFeedMetadata=} [properties] Properties to set + * @returns {pyth_lazer_transaction.UpdateFeedMetadata} UpdateFeedMetadata instance + */ + UpdateFeedMetadata.create = function create(properties) { + return new UpdateFeedMetadata(properties); + }; + + /** + * Encodes the specified UpdateFeedMetadata message. Does not implicitly {@link pyth_lazer_transaction.UpdateFeedMetadata.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.UpdateFeedMetadata + * @static + * @param {pyth_lazer_transaction.IUpdateFeedMetadata} message UpdateFeedMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateFeedMetadata.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")) + $root.pyth_lazer_transaction.DynamicValue.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateFeedMetadata message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdateFeedMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.UpdateFeedMetadata + * @static + * @param {pyth_lazer_transaction.IUpdateFeedMetadata} message UpdateFeedMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateFeedMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateFeedMetadata message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.UpdateFeedMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.UpdateFeedMetadata} UpdateFeedMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateFeedMetadata.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.UpdateFeedMetadata(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.value = $root.pyth_lazer_transaction.DynamicValue.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateFeedMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.UpdateFeedMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.UpdateFeedMetadata} UpdateFeedMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateFeedMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateFeedMetadata message. + * @function verify + * @memberof pyth_lazer_transaction.UpdateFeedMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateFeedMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if (message.name != null && message.hasOwnProperty("name")) { + properties._name = 1; + if (!$util.isString(message.name)) + return "name: string expected"; + } + if (message.value != null && message.hasOwnProperty("value")) { + properties._value = 1; + { + let error = $root.pyth_lazer_transaction.DynamicValue.verify(message.value); + if (error) + return "value." + error; + } + } + return null; + }; + + /** + * Creates an UpdateFeedMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.UpdateFeedMetadata + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.UpdateFeedMetadata} UpdateFeedMetadata + */ + UpdateFeedMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.UpdateFeedMetadata) + return object; + let message = new $root.pyth_lazer_transaction.UpdateFeedMetadata(); + if (object.name != null) + message.name = String(object.name); + if (object.value != null) { + if (typeof object.value !== "object") + throw TypeError(".pyth_lazer_transaction.UpdateFeedMetadata.value: object expected"); + message.value = $root.pyth_lazer_transaction.DynamicValue.fromObject(object.value); + } + return message; + }; + + /** + * Creates a plain object from an UpdateFeedMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.UpdateFeedMetadata + * @static + * @param {pyth_lazer_transaction.UpdateFeedMetadata} message UpdateFeedMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateFeedMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (message.name != null && message.hasOwnProperty("name")) { + object.name = message.name; + if (options.oneofs) + object._name = "name"; + } + if (message.value != null && message.hasOwnProperty("value")) { + object.value = $root.pyth_lazer_transaction.DynamicValue.toObject(message.value, options); + if (options.oneofs) + object._value = "value"; + } + return object; + }; + + /** + * Converts this UpdateFeedMetadata to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.UpdateFeedMetadata + * @instance + * @returns {Object.} JSON object + */ + UpdateFeedMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateFeedMetadata + * @function getTypeUrl + * @memberof pyth_lazer_transaction.UpdateFeedMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateFeedMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.UpdateFeedMetadata"; + }; + + return UpdateFeedMetadata; + })(); + + pyth_lazer_transaction.ActivateFeed = (function() { + + /** + * Properties of an ActivateFeed. + * @memberof pyth_lazer_transaction + * @interface IActivateFeed + * @property {google.protobuf.ITimestamp|null} [activationTimestamp] ActivateFeed activationTimestamp + */ + + /** + * Constructs a new ActivateFeed. + * @memberof pyth_lazer_transaction + * @classdesc Represents an ActivateFeed. + * @implements IActivateFeed + * @constructor + * @param {pyth_lazer_transaction.IActivateFeed=} [properties] Properties to set + */ + function ActivateFeed(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]]; + } + + /** + * ActivateFeed activationTimestamp. + * @member {google.protobuf.ITimestamp|null|undefined} activationTimestamp + * @memberof pyth_lazer_transaction.ActivateFeed + * @instance + */ + ActivateFeed.prototype.activationTimestamp = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * ActivateFeed _activationTimestamp. + * @member {"activationTimestamp"|undefined} _activationTimestamp + * @memberof pyth_lazer_transaction.ActivateFeed + * @instance + */ + Object.defineProperty(ActivateFeed.prototype, "_activationTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["activationTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ActivateFeed instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.ActivateFeed + * @static + * @param {pyth_lazer_transaction.IActivateFeed=} [properties] Properties to set + * @returns {pyth_lazer_transaction.ActivateFeed} ActivateFeed instance + */ + ActivateFeed.create = function create(properties) { + return new ActivateFeed(properties); + }; + + /** + * Encodes the specified ActivateFeed message. Does not implicitly {@link pyth_lazer_transaction.ActivateFeed.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.ActivateFeed + * @static + * @param {pyth_lazer_transaction.IActivateFeed} message ActivateFeed message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ActivateFeed.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.activationTimestamp != null && Object.hasOwnProperty.call(message, "activationTimestamp")) + $root.google.protobuf.Timestamp.encode(message.activationTimestamp, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ActivateFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ActivateFeed.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.ActivateFeed + * @static + * @param {pyth_lazer_transaction.IActivateFeed} message ActivateFeed message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ActivateFeed.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ActivateFeed message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.ActivateFeed + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.ActivateFeed} ActivateFeed + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ActivateFeed.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.ActivateFeed(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.activationTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ActivateFeed message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.ActivateFeed + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.ActivateFeed} ActivateFeed + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ActivateFeed.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ActivateFeed message. + * @function verify + * @memberof pyth_lazer_transaction.ActivateFeed + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ActivateFeed.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if (message.activationTimestamp != null && message.hasOwnProperty("activationTimestamp")) { + properties._activationTimestamp = 1; + { + let error = $root.google.protobuf.Timestamp.verify(message.activationTimestamp); + if (error) + return "activationTimestamp." + error; + } + } + return null; + }; + + /** + * Creates an ActivateFeed message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.ActivateFeed + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.ActivateFeed} ActivateFeed + */ + ActivateFeed.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.ActivateFeed) + return object; + let message = new $root.pyth_lazer_transaction.ActivateFeed(); + if (object.activationTimestamp != null) { + if (typeof object.activationTimestamp !== "object") + throw TypeError(".pyth_lazer_transaction.ActivateFeed.activationTimestamp: object expected"); + message.activationTimestamp = $root.google.protobuf.Timestamp.fromObject(object.activationTimestamp); + } + return message; + }; + + /** + * Creates a plain object from an ActivateFeed message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.ActivateFeed + * @static + * @param {pyth_lazer_transaction.ActivateFeed} message ActivateFeed + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ActivateFeed.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (message.activationTimestamp != null && message.hasOwnProperty("activationTimestamp")) { + object.activationTimestamp = $root.google.protobuf.Timestamp.toObject(message.activationTimestamp, options); + if (options.oneofs) + object._activationTimestamp = "activationTimestamp"; + } + return object; + }; + + /** + * Converts this ActivateFeed to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.ActivateFeed + * @instance + * @returns {Object.} JSON object + */ + ActivateFeed.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ActivateFeed + * @function getTypeUrl + * @memberof pyth_lazer_transaction.ActivateFeed + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ActivateFeed.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.ActivateFeed"; + }; + + return ActivateFeed; + })(); + + pyth_lazer_transaction.DeactivateFeed = (function() { + + /** + * Properties of a DeactivateFeed. + * @memberof pyth_lazer_transaction + * @interface IDeactivateFeed + * @property {google.protobuf.ITimestamp|null} [deactivationTimestamp] DeactivateFeed deactivationTimestamp + */ + + /** + * Constructs a new DeactivateFeed. + * @memberof pyth_lazer_transaction + * @classdesc Represents a DeactivateFeed. + * @implements IDeactivateFeed + * @constructor + * @param {pyth_lazer_transaction.IDeactivateFeed=} [properties] Properties to set + */ + function DeactivateFeed(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]]; + } + + /** + * DeactivateFeed deactivationTimestamp. + * @member {google.protobuf.ITimestamp|null|undefined} deactivationTimestamp + * @memberof pyth_lazer_transaction.DeactivateFeed + * @instance + */ + DeactivateFeed.prototype.deactivationTimestamp = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * DeactivateFeed _deactivationTimestamp. + * @member {"deactivationTimestamp"|undefined} _deactivationTimestamp + * @memberof pyth_lazer_transaction.DeactivateFeed + * @instance + */ + Object.defineProperty(DeactivateFeed.prototype, "_deactivationTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["deactivationTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DeactivateFeed instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.DeactivateFeed + * @static + * @param {pyth_lazer_transaction.IDeactivateFeed=} [properties] Properties to set + * @returns {pyth_lazer_transaction.DeactivateFeed} DeactivateFeed instance + */ + DeactivateFeed.create = function create(properties) { + return new DeactivateFeed(properties); + }; + + /** + * Encodes the specified DeactivateFeed message. Does not implicitly {@link pyth_lazer_transaction.DeactivateFeed.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.DeactivateFeed + * @static + * @param {pyth_lazer_transaction.IDeactivateFeed} message DeactivateFeed message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeactivateFeed.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deactivationTimestamp != null && Object.hasOwnProperty.call(message, "deactivationTimestamp")) + $root.google.protobuf.Timestamp.encode(message.deactivationTimestamp, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DeactivateFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DeactivateFeed.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.DeactivateFeed + * @static + * @param {pyth_lazer_transaction.IDeactivateFeed} message DeactivateFeed message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeactivateFeed.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeactivateFeed message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.DeactivateFeed + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.DeactivateFeed} DeactivateFeed + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeactivateFeed.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.DeactivateFeed(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.deactivationTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeactivateFeed message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.DeactivateFeed + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.DeactivateFeed} DeactivateFeed + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeactivateFeed.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeactivateFeed message. + * @function verify + * @memberof pyth_lazer_transaction.DeactivateFeed + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeactivateFeed.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if (message.deactivationTimestamp != null && message.hasOwnProperty("deactivationTimestamp")) { + properties._deactivationTimestamp = 1; + { + let error = $root.google.protobuf.Timestamp.verify(message.deactivationTimestamp); + if (error) + return "deactivationTimestamp." + error; + } + } + return null; + }; + + /** + * Creates a DeactivateFeed message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.DeactivateFeed + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.DeactivateFeed} DeactivateFeed + */ + DeactivateFeed.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.DeactivateFeed) + return object; + let message = new $root.pyth_lazer_transaction.DeactivateFeed(); + if (object.deactivationTimestamp != null) { + if (typeof object.deactivationTimestamp !== "object") + throw TypeError(".pyth_lazer_transaction.DeactivateFeed.deactivationTimestamp: object expected"); + message.deactivationTimestamp = $root.google.protobuf.Timestamp.fromObject(object.deactivationTimestamp); + } + return message; + }; + + /** + * Creates a plain object from a DeactivateFeed message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.DeactivateFeed + * @static + * @param {pyth_lazer_transaction.DeactivateFeed} message DeactivateFeed + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeactivateFeed.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (message.deactivationTimestamp != null && message.hasOwnProperty("deactivationTimestamp")) { + object.deactivationTimestamp = $root.google.protobuf.Timestamp.toObject(message.deactivationTimestamp, options); + if (options.oneofs) + object._deactivationTimestamp = "deactivationTimestamp"; + } + return object; + }; + + /** + * Converts this DeactivateFeed to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.DeactivateFeed + * @instance + * @returns {Object.} JSON object + */ + DeactivateFeed.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeactivateFeed + * @function getTypeUrl + * @memberof pyth_lazer_transaction.DeactivateFeed + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeactivateFeed.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.DeactivateFeed"; + }; + + return DeactivateFeed; + })(); + + pyth_lazer_transaction.DynamicValue = (function() { + + /** + * Properties of a DynamicValue. + * @memberof pyth_lazer_transaction + * @interface IDynamicValue + * @property {string|null} [stringValue] DynamicValue stringValue + * @property {number|null} [doubleValue] DynamicValue doubleValue + * @property {number|Long|null} [uintValue] DynamicValue uintValue + * @property {number|Long|null} [intValue] DynamicValue intValue + * @property {boolean|null} [boolValue] DynamicValue boolValue + * @property {Uint8Array|null} [bytesValue] DynamicValue bytesValue + * @property {google.protobuf.IDuration|null} [durationValue] DynamicValue durationValue + * @property {google.protobuf.ITimestamp|null} [timestampValue] DynamicValue timestampValue + * @property {pyth_lazer_transaction.DynamicValue.IList|null} [list] DynamicValue list + * @property {pyth_lazer_transaction.DynamicValue.IMap|null} [map] DynamicValue map + */ + + /** + * Constructs a new DynamicValue. + * @memberof pyth_lazer_transaction + * @classdesc Represents a DynamicValue. + * @implements IDynamicValue + * @constructor + * @param {pyth_lazer_transaction.IDynamicValue=} [properties] Properties to set + */ + function DynamicValue(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]]; + } + + /** + * DynamicValue stringValue. + * @member {string|null|undefined} stringValue + * @memberof pyth_lazer_transaction.DynamicValue + * @instance + */ + DynamicValue.prototype.stringValue = null; + + /** + * DynamicValue doubleValue. + * @member {number|null|undefined} doubleValue + * @memberof pyth_lazer_transaction.DynamicValue + * @instance + */ + DynamicValue.prototype.doubleValue = null; + + /** + * DynamicValue uintValue. + * @member {number|Long|null|undefined} uintValue + * @memberof pyth_lazer_transaction.DynamicValue + * @instance + */ + DynamicValue.prototype.uintValue = null; + + /** + * DynamicValue intValue. + * @member {number|Long|null|undefined} intValue + * @memberof pyth_lazer_transaction.DynamicValue + * @instance + */ + DynamicValue.prototype.intValue = null; + + /** + * DynamicValue boolValue. + * @member {boolean|null|undefined} boolValue + * @memberof pyth_lazer_transaction.DynamicValue + * @instance + */ + DynamicValue.prototype.boolValue = null; + + /** + * DynamicValue bytesValue. + * @member {Uint8Array|null|undefined} bytesValue + * @memberof pyth_lazer_transaction.DynamicValue + * @instance + */ + DynamicValue.prototype.bytesValue = null; + + /** + * DynamicValue durationValue. + * @member {google.protobuf.IDuration|null|undefined} durationValue + * @memberof pyth_lazer_transaction.DynamicValue + * @instance + */ + DynamicValue.prototype.durationValue = null; + + /** + * DynamicValue timestampValue. + * @member {google.protobuf.ITimestamp|null|undefined} timestampValue + * @memberof pyth_lazer_transaction.DynamicValue + * @instance + */ + DynamicValue.prototype.timestampValue = null; + + /** + * DynamicValue list. + * @member {pyth_lazer_transaction.DynamicValue.IList|null|undefined} list + * @memberof pyth_lazer_transaction.DynamicValue + * @instance + */ + DynamicValue.prototype.list = null; + + /** + * DynamicValue map. + * @member {pyth_lazer_transaction.DynamicValue.IMap|null|undefined} map + * @memberof pyth_lazer_transaction.DynamicValue + * @instance + */ + DynamicValue.prototype.map = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * DynamicValue value. + * @member {"stringValue"|"doubleValue"|"uintValue"|"intValue"|"boolValue"|"bytesValue"|"durationValue"|"timestampValue"|"list"|"map"|undefined} value + * @memberof pyth_lazer_transaction.DynamicValue + * @instance + */ + Object.defineProperty(DynamicValue.prototype, "value", { + get: $util.oneOfGetter($oneOfFields = ["stringValue", "doubleValue", "uintValue", "intValue", "boolValue", "bytesValue", "durationValue", "timestampValue", "list", "map"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DynamicValue instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.DynamicValue + * @static + * @param {pyth_lazer_transaction.IDynamicValue=} [properties] Properties to set + * @returns {pyth_lazer_transaction.DynamicValue} DynamicValue instance + */ + DynamicValue.create = function create(properties) { + return new DynamicValue(properties); + }; + + /** + * Encodes the specified DynamicValue message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.DynamicValue + * @static + * @param {pyth_lazer_transaction.IDynamicValue} message DynamicValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DynamicValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.stringValue); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.doubleValue); + if (message.uintValue != null && Object.hasOwnProperty.call(message, "uintValue")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.uintValue); + if (message.intValue != null && Object.hasOwnProperty.call(message, "intValue")) + writer.uint32(/* id 4, wireType 0 =*/32).sint64(message.intValue); + if (message.boolValue != null && Object.hasOwnProperty.call(message, "boolValue")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.boolValue); + if (message.bytesValue != null && Object.hasOwnProperty.call(message, "bytesValue")) + writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.bytesValue); + if (message.durationValue != null && Object.hasOwnProperty.call(message, "durationValue")) + $root.google.protobuf.Duration.encode(message.durationValue, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.timestampValue != null && Object.hasOwnProperty.call(message, "timestampValue")) + $root.google.protobuf.Timestamp.encode(message.timestampValue, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.list != null && Object.hasOwnProperty.call(message, "list")) + $root.pyth_lazer_transaction.DynamicValue.List.encode(message.list, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.map != null && Object.hasOwnProperty.call(message, "map")) + $root.pyth_lazer_transaction.DynamicValue.Map.encode(message.map, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DynamicValue message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.DynamicValue + * @static + * @param {pyth_lazer_transaction.IDynamicValue} message DynamicValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DynamicValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DynamicValue message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.DynamicValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.DynamicValue} DynamicValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DynamicValue.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.DynamicValue(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.stringValue = reader.string(); + break; + } + case 2: { + message.doubleValue = reader.double(); + break; + } + case 3: { + message.uintValue = reader.uint64(); + break; + } + case 4: { + message.intValue = reader.sint64(); + break; + } + case 5: { + message.boolValue = reader.bool(); + break; + } + case 6: { + message.bytesValue = reader.bytes(); + break; + } + case 7: { + message.durationValue = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 8: { + message.timestampValue = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 9: { + message.list = $root.pyth_lazer_transaction.DynamicValue.List.decode(reader, reader.uint32()); + break; + } + case 10: { + message.map = $root.pyth_lazer_transaction.DynamicValue.Map.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DynamicValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.DynamicValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.DynamicValue} DynamicValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DynamicValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DynamicValue message. + * @function verify + * @memberof pyth_lazer_transaction.DynamicValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DynamicValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + properties.value = 1; + if (!$util.isString(message.stringValue)) + return "stringValue: string expected"; + } + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + } + if (message.uintValue != null && message.hasOwnProperty("uintValue")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + if (!$util.isInteger(message.uintValue) && !(message.uintValue && $util.isInteger(message.uintValue.low) && $util.isInteger(message.uintValue.high))) + return "uintValue: integer|Long expected"; + } + if (message.intValue != null && message.hasOwnProperty("intValue")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + if (!$util.isInteger(message.intValue) && !(message.intValue && $util.isInteger(message.intValue.low) && $util.isInteger(message.intValue.high))) + return "intValue: integer|Long expected"; + } + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + if (typeof message.boolValue !== "boolean") + return "boolValue: boolean expected"; + } + if (message.bytesValue != null && message.hasOwnProperty("bytesValue")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + if (!(message.bytesValue && typeof message.bytesValue.length === "number" || $util.isString(message.bytesValue))) + return "bytesValue: buffer expected"; + } + if (message.durationValue != null && message.hasOwnProperty("durationValue")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + let error = $root.google.protobuf.Duration.verify(message.durationValue); + if (error) + return "durationValue." + error; + } + } + if (message.timestampValue != null && message.hasOwnProperty("timestampValue")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + let error = $root.google.protobuf.Timestamp.verify(message.timestampValue); + if (error) + return "timestampValue." + error; + } + } + if (message.list != null && message.hasOwnProperty("list")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + let error = $root.pyth_lazer_transaction.DynamicValue.List.verify(message.list); + if (error) + return "list." + error; + } + } + if (message.map != null && message.hasOwnProperty("map")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + let error = $root.pyth_lazer_transaction.DynamicValue.Map.verify(message.map); + if (error) + return "map." + error; + } + } + return null; + }; + + /** + * Creates a DynamicValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.DynamicValue + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.DynamicValue} DynamicValue + */ + DynamicValue.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.DynamicValue) + return object; + let message = new $root.pyth_lazer_transaction.DynamicValue(); + if (object.stringValue != null) + message.stringValue = String(object.stringValue); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.uintValue != null) + if ($util.Long) + (message.uintValue = $util.Long.fromValue(object.uintValue)).unsigned = true; + else if (typeof object.uintValue === "string") + message.uintValue = parseInt(object.uintValue, 10); + else if (typeof object.uintValue === "number") + message.uintValue = object.uintValue; + else if (typeof object.uintValue === "object") + message.uintValue = new $util.LongBits(object.uintValue.low >>> 0, object.uintValue.high >>> 0).toNumber(true); + if (object.intValue != null) + if ($util.Long) + (message.intValue = $util.Long.fromValue(object.intValue)).unsigned = false; + else if (typeof object.intValue === "string") + message.intValue = parseInt(object.intValue, 10); + else if (typeof object.intValue === "number") + message.intValue = object.intValue; + else if (typeof object.intValue === "object") + message.intValue = new $util.LongBits(object.intValue.low >>> 0, object.intValue.high >>> 0).toNumber(); + if (object.boolValue != null) + message.boolValue = Boolean(object.boolValue); + if (object.bytesValue != null) + if (typeof object.bytesValue === "string") + $util.base64.decode(object.bytesValue, message.bytesValue = $util.newBuffer($util.base64.length(object.bytesValue)), 0); + else if (object.bytesValue.length >= 0) + message.bytesValue = object.bytesValue; + if (object.durationValue != null) { + if (typeof object.durationValue !== "object") + throw TypeError(".pyth_lazer_transaction.DynamicValue.durationValue: object expected"); + message.durationValue = $root.google.protobuf.Duration.fromObject(object.durationValue); + } + if (object.timestampValue != null) { + if (typeof object.timestampValue !== "object") + throw TypeError(".pyth_lazer_transaction.DynamicValue.timestampValue: object expected"); + message.timestampValue = $root.google.protobuf.Timestamp.fromObject(object.timestampValue); + } + if (object.list != null) { + if (typeof object.list !== "object") + throw TypeError(".pyth_lazer_transaction.DynamicValue.list: object expected"); + message.list = $root.pyth_lazer_transaction.DynamicValue.List.fromObject(object.list); + } + if (object.map != null) { + if (typeof object.map !== "object") + throw TypeError(".pyth_lazer_transaction.DynamicValue.map: object expected"); + message.map = $root.pyth_lazer_transaction.DynamicValue.Map.fromObject(object.map); + } + return message; + }; + + /** + * Creates a plain object from a DynamicValue message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.DynamicValue + * @static + * @param {pyth_lazer_transaction.DynamicValue} message DynamicValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DynamicValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + object.stringValue = message.stringValue; + if (options.oneofs) + object.value = "stringValue"; + } + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (options.oneofs) + object.value = "doubleValue"; + } + if (message.uintValue != null && message.hasOwnProperty("uintValue")) { + if (typeof message.uintValue === "number") + object.uintValue = options.longs === String ? String(message.uintValue) : message.uintValue; + else + object.uintValue = options.longs === String ? $util.Long.prototype.toString.call(message.uintValue) : options.longs === Number ? new $util.LongBits(message.uintValue.low >>> 0, message.uintValue.high >>> 0).toNumber(true) : message.uintValue; + if (options.oneofs) + object.value = "uintValue"; + } + if (message.intValue != null && message.hasOwnProperty("intValue")) { + if (typeof message.intValue === "number") + object.intValue = options.longs === String ? String(message.intValue) : message.intValue; + else + object.intValue = options.longs === String ? $util.Long.prototype.toString.call(message.intValue) : options.longs === Number ? new $util.LongBits(message.intValue.low >>> 0, message.intValue.high >>> 0).toNumber() : message.intValue; + if (options.oneofs) + object.value = "intValue"; + } + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + object.boolValue = message.boolValue; + if (options.oneofs) + object.value = "boolValue"; + } + if (message.bytesValue != null && message.hasOwnProperty("bytesValue")) { + object.bytesValue = options.bytes === String ? $util.base64.encode(message.bytesValue, 0, message.bytesValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.bytesValue) : message.bytesValue; + if (options.oneofs) + object.value = "bytesValue"; + } + if (message.durationValue != null && message.hasOwnProperty("durationValue")) { + object.durationValue = $root.google.protobuf.Duration.toObject(message.durationValue, options); + if (options.oneofs) + object.value = "durationValue"; + } + if (message.timestampValue != null && message.hasOwnProperty("timestampValue")) { + object.timestampValue = $root.google.protobuf.Timestamp.toObject(message.timestampValue, options); + if (options.oneofs) + object.value = "timestampValue"; + } + if (message.list != null && message.hasOwnProperty("list")) { + object.list = $root.pyth_lazer_transaction.DynamicValue.List.toObject(message.list, options); + if (options.oneofs) + object.value = "list"; + } + if (message.map != null && message.hasOwnProperty("map")) { + object.map = $root.pyth_lazer_transaction.DynamicValue.Map.toObject(message.map, options); + if (options.oneofs) + object.value = "map"; + } + return object; + }; + + /** + * Converts this DynamicValue to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.DynamicValue + * @instance + * @returns {Object.} JSON object + */ + DynamicValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DynamicValue + * @function getTypeUrl + * @memberof pyth_lazer_transaction.DynamicValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DynamicValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.DynamicValue"; + }; + + DynamicValue.List = (function() { + + /** + * Properties of a List. + * @memberof pyth_lazer_transaction.DynamicValue + * @interface IList + * @property {Array.|null} [items] List items + */ + + /** + * Constructs a new List. + * @memberof pyth_lazer_transaction.DynamicValue + * @classdesc Represents a List. + * @implements IList + * @constructor + * @param {pyth_lazer_transaction.DynamicValue.IList=} [properties] Properties to set + */ + function List(properties) { + this.items = []; + 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]]; + } + + /** + * List items. + * @member {Array.} items + * @memberof pyth_lazer_transaction.DynamicValue.List + * @instance + */ + List.prototype.items = $util.emptyArray; + + /** + * Creates a new List instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.DynamicValue.List + * @static + * @param {pyth_lazer_transaction.DynamicValue.IList=} [properties] Properties to set + * @returns {pyth_lazer_transaction.DynamicValue.List} List instance + */ + List.create = function create(properties) { + return new List(properties); + }; + + /** + * Encodes the specified List message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.List.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.DynamicValue.List + * @static + * @param {pyth_lazer_transaction.DynamicValue.IList} message List message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + List.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.items != null && message.items.length) + for (let i = 0; i < message.items.length; ++i) + $root.pyth_lazer_transaction.DynamicValue.encode(message.items[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified List message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.List.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.DynamicValue.List + * @static + * @param {pyth_lazer_transaction.DynamicValue.IList} message List message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + List.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a List message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.DynamicValue.List + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.DynamicValue.List} List + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + List.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.DynamicValue.List(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.items && message.items.length)) + message.items = []; + message.items.push($root.pyth_lazer_transaction.DynamicValue.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a List message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.DynamicValue.List + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.DynamicValue.List} List + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + List.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a List message. + * @function verify + * @memberof pyth_lazer_transaction.DynamicValue.List + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + List.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.items != null && message.hasOwnProperty("items")) { + if (!Array.isArray(message.items)) + return "items: array expected"; + for (let i = 0; i < message.items.length; ++i) { + let error = $root.pyth_lazer_transaction.DynamicValue.verify(message.items[i]); + if (error) + return "items." + error; + } + } + return null; + }; + + /** + * Creates a List message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.DynamicValue.List + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.DynamicValue.List} List + */ + List.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.DynamicValue.List) + return object; + let message = new $root.pyth_lazer_transaction.DynamicValue.List(); + if (object.items) { + if (!Array.isArray(object.items)) + throw TypeError(".pyth_lazer_transaction.DynamicValue.List.items: array expected"); + message.items = []; + for (let i = 0; i < object.items.length; ++i) { + if (typeof object.items[i] !== "object") + throw TypeError(".pyth_lazer_transaction.DynamicValue.List.items: object expected"); + message.items[i] = $root.pyth_lazer_transaction.DynamicValue.fromObject(object.items[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a List message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.DynamicValue.List + * @static + * @param {pyth_lazer_transaction.DynamicValue.List} message List + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + List.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.items = []; + if (message.items && message.items.length) { + object.items = []; + for (let j = 0; j < message.items.length; ++j) + object.items[j] = $root.pyth_lazer_transaction.DynamicValue.toObject(message.items[j], options); + } + return object; + }; + + /** + * Converts this List to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.DynamicValue.List + * @instance + * @returns {Object.} JSON object + */ + List.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for List + * @function getTypeUrl + * @memberof pyth_lazer_transaction.DynamicValue.List + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + List.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.DynamicValue.List"; + }; + + return List; + })(); + + DynamicValue.MapItem = (function() { + + /** + * Properties of a MapItem. + * @memberof pyth_lazer_transaction.DynamicValue + * @interface IMapItem + * @property {string|null} [key] MapItem key + * @property {pyth_lazer_transaction.IDynamicValue|null} [value] MapItem value + */ + + /** + * Constructs a new MapItem. + * @memberof pyth_lazer_transaction.DynamicValue + * @classdesc Represents a MapItem. + * @implements IMapItem + * @constructor + * @param {pyth_lazer_transaction.DynamicValue.IMapItem=} [properties] Properties to set + */ + function MapItem(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]]; + } + + /** + * MapItem key. + * @member {string|null|undefined} key + * @memberof pyth_lazer_transaction.DynamicValue.MapItem + * @instance + */ + MapItem.prototype.key = null; + + /** + * MapItem value. + * @member {pyth_lazer_transaction.IDynamicValue|null|undefined} value + * @memberof pyth_lazer_transaction.DynamicValue.MapItem + * @instance + */ + MapItem.prototype.value = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * MapItem _key. + * @member {"key"|undefined} _key + * @memberof pyth_lazer_transaction.DynamicValue.MapItem + * @instance + */ + Object.defineProperty(MapItem.prototype, "_key", { + get: $util.oneOfGetter($oneOfFields = ["key"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * MapItem _value. + * @member {"value"|undefined} _value + * @memberof pyth_lazer_transaction.DynamicValue.MapItem + * @instance + */ + Object.defineProperty(MapItem.prototype, "_value", { + get: $util.oneOfGetter($oneOfFields = ["value"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new MapItem instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.DynamicValue.MapItem + * @static + * @param {pyth_lazer_transaction.DynamicValue.IMapItem=} [properties] Properties to set + * @returns {pyth_lazer_transaction.DynamicValue.MapItem} MapItem instance + */ + MapItem.create = function create(properties) { + return new MapItem(properties); + }; + + /** + * Encodes the specified MapItem message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.MapItem.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.DynamicValue.MapItem + * @static + * @param {pyth_lazer_transaction.DynamicValue.IMapItem} message MapItem message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MapItem.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + $root.pyth_lazer_transaction.DynamicValue.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MapItem message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.MapItem.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.DynamicValue.MapItem + * @static + * @param {pyth_lazer_transaction.DynamicValue.IMapItem} message MapItem message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MapItem.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MapItem message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.DynamicValue.MapItem + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.DynamicValue.MapItem} MapItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MapItem.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.DynamicValue.MapItem(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.key = reader.string(); + break; + } + case 2: { + message.value = $root.pyth_lazer_transaction.DynamicValue.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MapItem message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.DynamicValue.MapItem + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.DynamicValue.MapItem} MapItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MapItem.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MapItem message. + * @function verify + * @memberof pyth_lazer_transaction.DynamicValue.MapItem + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MapItem.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if (message.key != null && message.hasOwnProperty("key")) { + properties._key = 1; + if (!$util.isString(message.key)) + return "key: string expected"; + } + if (message.value != null && message.hasOwnProperty("value")) { + properties._value = 1; + { + let error = $root.pyth_lazer_transaction.DynamicValue.verify(message.value); + if (error) + return "value." + error; + } + } + return null; + }; + + /** + * Creates a MapItem message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.DynamicValue.MapItem + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.DynamicValue.MapItem} MapItem + */ + MapItem.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.DynamicValue.MapItem) + return object; + let message = new $root.pyth_lazer_transaction.DynamicValue.MapItem(); + if (object.key != null) + message.key = String(object.key); + if (object.value != null) { + if (typeof object.value !== "object") + throw TypeError(".pyth_lazer_transaction.DynamicValue.MapItem.value: object expected"); + message.value = $root.pyth_lazer_transaction.DynamicValue.fromObject(object.value); + } + return message; + }; + + /** + * Creates a plain object from a MapItem message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.DynamicValue.MapItem + * @static + * @param {pyth_lazer_transaction.DynamicValue.MapItem} message MapItem + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MapItem.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (message.key != null && message.hasOwnProperty("key")) { + object.key = message.key; + if (options.oneofs) + object._key = "key"; + } + if (message.value != null && message.hasOwnProperty("value")) { + object.value = $root.pyth_lazer_transaction.DynamicValue.toObject(message.value, options); + if (options.oneofs) + object._value = "value"; + } + return object; + }; + + /** + * Converts this MapItem to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.DynamicValue.MapItem + * @instance + * @returns {Object.} JSON object + */ + MapItem.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MapItem + * @function getTypeUrl + * @memberof pyth_lazer_transaction.DynamicValue.MapItem + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MapItem.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.DynamicValue.MapItem"; + }; + + return MapItem; + })(); + + DynamicValue.Map = (function() { + + /** + * Properties of a Map. + * @memberof pyth_lazer_transaction.DynamicValue + * @interface IMap + * @property {Array.|null} [items] Map items + */ + + /** + * Constructs a new Map. + * @memberof pyth_lazer_transaction.DynamicValue + * @classdesc Represents a Map. + * @implements IMap + * @constructor + * @param {pyth_lazer_transaction.DynamicValue.IMap=} [properties] Properties to set + */ + function Map(properties) { + this.items = []; + 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]]; + } + + /** + * Map items. + * @member {Array.} items + * @memberof pyth_lazer_transaction.DynamicValue.Map + * @instance + */ + Map.prototype.items = $util.emptyArray; + + /** + * Creates a new Map instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.DynamicValue.Map + * @static + * @param {pyth_lazer_transaction.DynamicValue.IMap=} [properties] Properties to set + * @returns {pyth_lazer_transaction.DynamicValue.Map} Map instance + */ + Map.create = function create(properties) { + return new Map(properties); + }; + + /** + * Encodes the specified Map message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.Map.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.DynamicValue.Map + * @static + * @param {pyth_lazer_transaction.DynamicValue.IMap} message Map message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Map.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.items != null && message.items.length) + for (let i = 0; i < message.items.length; ++i) + $root.pyth_lazer_transaction.DynamicValue.MapItem.encode(message.items[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Map message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.Map.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.DynamicValue.Map + * @static + * @param {pyth_lazer_transaction.DynamicValue.IMap} message Map message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Map.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Map message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.DynamicValue.Map + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.DynamicValue.Map} Map + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Map.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.DynamicValue.Map(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.items && message.items.length)) + message.items = []; + message.items.push($root.pyth_lazer_transaction.DynamicValue.MapItem.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Map message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.DynamicValue.Map + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.DynamicValue.Map} Map + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Map.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Map message. + * @function verify + * @memberof pyth_lazer_transaction.DynamicValue.Map + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Map.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.items != null && message.hasOwnProperty("items")) { + if (!Array.isArray(message.items)) + return "items: array expected"; + for (let i = 0; i < message.items.length; ++i) { + let error = $root.pyth_lazer_transaction.DynamicValue.MapItem.verify(message.items[i]); + if (error) + return "items." + error; + } + } + return null; + }; + + /** + * Creates a Map message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.DynamicValue.Map + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.DynamicValue.Map} Map + */ + Map.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.DynamicValue.Map) + return object; + let message = new $root.pyth_lazer_transaction.DynamicValue.Map(); + if (object.items) { + if (!Array.isArray(object.items)) + throw TypeError(".pyth_lazer_transaction.DynamicValue.Map.items: array expected"); + message.items = []; + for (let i = 0; i < object.items.length; ++i) { + if (typeof object.items[i] !== "object") + throw TypeError(".pyth_lazer_transaction.DynamicValue.Map.items: object expected"); + message.items[i] = $root.pyth_lazer_transaction.DynamicValue.MapItem.fromObject(object.items[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Map message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.DynamicValue.Map + * @static + * @param {pyth_lazer_transaction.DynamicValue.Map} message Map + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Map.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.items = []; + if (message.items && message.items.length) { + object.items = []; + for (let j = 0; j < message.items.length; ++j) + object.items[j] = $root.pyth_lazer_transaction.DynamicValue.MapItem.toObject(message.items[j], options); + } + return object; + }; + + /** + * Converts this Map to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.DynamicValue.Map + * @instance + * @returns {Object.} JSON object + */ + Map.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Map + * @function getTypeUrl + * @memberof pyth_lazer_transaction.DynamicValue.Map + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Map.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.DynamicValue.Map"; + }; + + return Map; + })(); + + return DynamicValue; + })(); + + return pyth_lazer_transaction; +})(); + +export const google = $root.google = (() => { + + /** + * Namespace google. + * @exports google + * @namespace + */ + const google = {}; + + google.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + const protobuf = {}; + + protobuf.Timestamp = (function() { + + /** + * Properties of a Timestamp. + * @memberof google.protobuf + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos + */ + + /** + * Constructs a new Timestamp. + * @memberof google.protobuf + * @classdesc Represents a Timestamp. + * @implements ITimestamp + * @constructor + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + */ + function Timestamp(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]]; + } + + /** + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.nanos = 0; + + /** + * Creates a new Timestamp instance using the specified properties. + * @function create + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance + */ + Timestamp.create = function create(properties) { + return new Timestamp(properties); + }; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Timestamp message. + * @function verify + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Timestamp.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Timestamp} Timestamp + */ + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) + return object; + let message = new $root.google.protobuf.Timestamp(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.Timestamp} message Timestamp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Timestamp.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Timestamp to JSON. + * @function toJSON + * @memberof google.protobuf.Timestamp + * @instance + * @returns {Object.} JSON object + */ + Timestamp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Timestamp + * @function getTypeUrl + * @memberof google.protobuf.Timestamp + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Timestamp"; + }; + + return Timestamp; + })(); + + protobuf.Duration = (function() { + + /** + * Properties of a Duration. + * @memberof google.protobuf + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos + */ + + /** + * Constructs a new Duration. + * @memberof google.protobuf + * @classdesc Represents a Duration. + * @implements IDuration + * @constructor + * @param {google.protobuf.IDuration=} [properties] Properties to set + */ + function Duration(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]]; + } + + /** + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; + + /** + * Creates a new Duration instance using the specified properties. + * @function create + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance + */ + Duration.create = function create(properties) { + return new Duration(properties); + }; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Duration message. + * @function verify + * @memberof google.protobuf.Duration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Duration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Duration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Duration} Duration + */ + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) + return object; + let message = new $root.google.protobuf.Duration(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.Duration} message Duration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Duration.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Duration to JSON. + * @function toJSON + * @memberof google.protobuf.Duration + * @instance + * @returns {Object.} JSON object + */ + Duration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Duration + * @function getTypeUrl + * @memberof google.protobuf.Duration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Duration"; + }; + + return Duration; + })(); + + 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, error) { + 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(); + if (tag === error) + break; + 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.} 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.} 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.} Plain object + */ + Empty.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Empty to JSON. + * @function toJSON + * @memberof google.protobuf.Empty + * @instance + * @returns {Object.} JSON object + */ + Empty.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Empty + * @function getTypeUrl + * @memberof google.protobuf.Empty + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Empty"; + }; + + return Empty; + })(); + + return protobuf; + })(); + + return google; +})(); + +export { $root as default }; diff --git a/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/governance_payload/AddFeed.ts b/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/governance_payload/AddFeed.ts new file mode 100644 index 0000000000..1631bc5179 --- /dev/null +++ b/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/governance_payload/AddFeed.ts @@ -0,0 +1,46 @@ +import { PublicKey } from "@solana/web3.js"; +import { getProtoTypes } from "./proto_utils"; + +export interface AddFeedParams { + priceFeedId: number; + metadata: Record; // DynamicValue.Map from proto + permissionedPublishers?: number[]; + shardFilter?: { + allShards?: Record; + shardNames?: { shardNames: string[] }; + shardGroups?: { shardGroups: string[] }; + }; + governanceSource: PublicKey; + sequenceNo?: number; +} + +/** Create an AddFeed governance instruction */ +export async function createAddFeed(params: AddFeedParams): Promise { + const { GovernanceInstruction, GovernanceDirective, AddFeed } = getProtoTypes(); + + // Create AddFeed message using proto type + const addFeedMessage = AddFeed.create({ + priceFeedId: params.priceFeedId, + metadata: params.metadata, + permissionedPublishers: params.permissionedPublishers || [] + }); + + // Create GovernanceDirective using proto type + const directive = GovernanceDirective.create({ + shardFilter: params.shardFilter || { allShards: {} }, + addFeed: addFeedMessage + }); + + const governanceInstruction = { + source: { + singleEd25519: { + publicKey: params.governanceSource.toBytes() + } + }, + directives: [directive], + governanceSequenceNo: params.sequenceNo || Date.now() + }; + + const message = GovernanceInstruction.create(governanceInstruction); + return Buffer.from(GovernanceInstruction.encode(message).finish()); +} diff --git a/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/governance_payload/AddPublisher.ts b/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/governance_payload/AddPublisher.ts new file mode 100644 index 0000000000..f427456fdd --- /dev/null +++ b/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/governance_payload/AddPublisher.ts @@ -0,0 +1,48 @@ +import { PublicKey } from "@solana/web3.js"; +import { getProtoTypes } from "./proto_utils"; + +export interface AddPublisherParams { + publisherId: number; + name: string; + publicKeys: Uint8Array[]; + isActive: boolean; + shardFilter?: { + allShards?: Record; + shardNames?: { shardNames: string[] }; + shardGroups?: { shardGroups: string[] }; + }; + governanceSource: PublicKey; + sequenceNo?: number; +} + +/** Create an AddPublisher governance instruction */ +export async function createAddPublisher(params: AddPublisherParams): Promise { + const { GovernanceInstruction, GovernanceDirective, AddPublisher } = getProtoTypes(); + + // Create AddPublisher message using proto type + const addPublisherMessage = AddPublisher.create({ + publisherId: params.publisherId, + name: params.name, + publicKeys: params.publicKeys, + isActive: params.isActive + }); + + // Create GovernanceDirective using proto type + const directive = GovernanceDirective.create({ + shardFilter: params.shardFilter || { allShards: {} }, + addPublisher: addPublisherMessage + }); + + const governanceInstruction = { + source: { + singleEd25519: { + publicKey: params.governanceSource.toBytes() + } + }, + directives: [directive], + governanceSequenceNo: params.sequenceNo || Date.now() + }; + + const message = GovernanceInstruction.create(governanceInstruction); + return Buffer.from(GovernanceInstruction.encode(message).finish()); +} diff --git a/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/governance_payload/UpdateFeed.ts b/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/governance_payload/UpdateFeed.ts new file mode 100644 index 0000000000..324bb7dabb --- /dev/null +++ b/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/governance_payload/UpdateFeed.ts @@ -0,0 +1,71 @@ +import { PublicKey } from "@solana/web3.js"; +import { getProtoTypes } from "./proto_utils"; + +export type UpdateFeedAction = + | { type: "updateFeedMetadata"; name: string; value?: any } + | { type: "activateFeed"; activationTimestamp?: string } + | { type: "deactivateFeed"; deactivationTimestamp?: string } + | { type: "removeFeed" }; + +export interface UpdateFeedParams { + priceFeedId: number; + action: UpdateFeedAction; + shardFilter?: { + allShards?: Record; + shardNames?: { shardNames: string[] }; + shardGroups?: { shardGroups: string[] }; + }; + governanceSource: PublicKey; + sequenceNo?: number; +} + +/** Create an UpdateFeed governance instruction */ +export async function createUpdateFeed(params: UpdateFeedParams): Promise { + const { GovernanceInstruction, GovernanceDirective, UpdateFeed, UpdateFeedMetadata, ActivateFeed, DeactivateFeed } = getProtoTypes(); + + // Create the appropriate action message based on type + let actionMessage: any = {}; + + switch (params.action.type) { + case "updateFeedMetadata": + actionMessage.updateFeedMetadata = UpdateFeedMetadata.create({ + name: params.action.name, + value: params.action.value + }); + break; + case "activateFeed": + actionMessage.activateFeed = ActivateFeed.create({}); + break; + case "deactivateFeed": + actionMessage.deactivateFeed = DeactivateFeed.create({}); + break; + case "removeFeed": + actionMessage.removeFeed = {}; + break; + } + + // Create UpdateFeed message using proto type + const updateFeedMessage = UpdateFeed.create({ + priceFeedId: params.priceFeedId, + ...actionMessage + }); + + // Create GovernanceDirective using proto type + const directive = GovernanceDirective.create({ + shardFilter: params.shardFilter || { allShards: {} }, + updateFeed: updateFeedMessage + }); + + const governanceInstruction = { + source: { + singleEd25519: { + publicKey: params.governanceSource.toBytes() + } + }, + directives: [directive], + governanceSequenceNo: params.sequenceNo || Date.now() + }; + + const message = GovernanceInstruction.create(governanceInstruction); + return Buffer.from(GovernanceInstruction.encode(message).finish()); +} diff --git a/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/governance_payload/UpdatePublisher.ts b/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/governance_payload/UpdatePublisher.ts new file mode 100644 index 0000000000..d1424b09ef --- /dev/null +++ b/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/governance_payload/UpdatePublisher.ts @@ -0,0 +1,95 @@ +import { PublicKey } from "@solana/web3.js"; +import { getProtoTypes } from "./proto_utils"; + +export type UpdatePublisherAction = + | { type: "setPublisherName"; name: string } + | { type: "addPublisherPublicKeys"; publicKeys: Uint8Array[] } + | { type: "removePublisherPublicKeys"; publicKeys: Uint8Array[] } + | { type: "setPublisherPublicKeys"; publicKeys: Uint8Array[] } + | { type: "setPublisherActive"; isActive: boolean } + | { type: "removePublisher" }; + +export interface UpdatePublisherParams { + publisherId: number; + action: UpdatePublisherAction; + shardFilter?: { + allShards?: Record; + shardNames?: { shardNames: string[] }; + shardGroups?: { shardGroups: string[] }; + }; + governanceSource: PublicKey; + sequenceNo?: number; +} + +/** Create an UpdatePublisher governance instruction */ +export async function createUpdatePublisher(params: UpdatePublisherParams): Promise { + const { + GovernanceInstruction, + GovernanceDirective, + UpdatePublisher, + SetPublisherName, + SetPublisherActive, + AddPublisherPublicKeys, + RemovePublisherPublicKeys, + SetPublisherPublicKeys + } = getProtoTypes(); + + // Create the appropriate action message based on type + let actionMessage: any = {}; + + switch (params.action.type) { + case "setPublisherName": + actionMessage.setPublisherName = SetPublisherName.create({ + name: params.action.name + }); + break; + case "addPublisherPublicKeys": + actionMessage.addPublisherPublicKeys = AddPublisherPublicKeys.create({ + publicKeys: params.action.publicKeys + }); + break; + case "removePublisherPublicKeys": + actionMessage.removePublisherPublicKeys = RemovePublisherPublicKeys.create({ + publicKeys: params.action.publicKeys + }); + break; + case "setPublisherPublicKeys": + actionMessage.setPublisherPublicKeys = SetPublisherPublicKeys.create({ + publicKeys: params.action.publicKeys + }); + break; + case "setPublisherActive": + actionMessage.setPublisherActive = SetPublisherActive.create({ + isActive: params.action.isActive + }); + break; + case "removePublisher": + actionMessage.removePublisher = {}; + break; + } + + // Create UpdatePublisher message using proto type + const updatePublisherMessage = UpdatePublisher.create({ + publisherId: params.publisherId, + ...actionMessage + }); + + // Create GovernanceDirective using proto type + const directive = GovernanceDirective.create({ + shardFilter: params.shardFilter || { allShards: {} }, + updatePublisher: updatePublisherMessage + }); + + const governanceInstruction = { + source: { + singleEd25519: { + publicKey: params.governanceSource.toBytes() + } + }, + directives: [directive], + governanceSequenceNo: params.sequenceNo || Date.now() + }; + + const message = GovernanceInstruction.create(governanceInstruction); + return Buffer.from(GovernanceInstruction.encode(message).finish()); +} diff --git a/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/governance_payload/index.ts b/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/governance_payload/index.ts new file mode 100644 index 0000000000..be83e748d6 --- /dev/null +++ b/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/governance_payload/index.ts @@ -0,0 +1,131 @@ +import { PublicKey } from "@solana/web3.js"; +import { getProtoTypes } from "./proto_utils"; + +// Export all the creation functions and types +export * from "./AddPublisher"; +export * from "./UpdatePublisher"; +export * from "./AddFeed"; +export * from "./UpdateFeed"; +export * from "./proto_utils"; + +// Types for decoded actions +export type DecodedLazerGovernanceAction = + | { type: "AddPublisher"; data: AddPublisherData } + | { type: "UpdatePublisher"; data: UpdatePublisherData } + | { type: "AddFeed"; data: AddFeedData } + | { type: "UpdateFeed"; data: UpdateFeedData }; + +export interface AddPublisherData { + publisherId: number; + name: string; + publicKeys: string[]; + isActive: boolean; + shardFilter: any; + governanceSource: PublicKey; + sequenceNo: number; +} + +export interface UpdatePublisherData { + publisherId: number; + action: any; + shardFilter: any; + governanceSource: PublicKey; + sequenceNo: number; +} + +export interface AddFeedData { + priceFeedId: number; + metadata: any; + permissionedPublishers: number[]; + shardFilter: any; + governanceSource: PublicKey; + sequenceNo: number; +} + +export interface UpdateFeedData { + priceFeedId: number; + action: any; + shardFilter: any; + governanceSource: PublicKey; + sequenceNo: number; +} + +/** Decode a Lazer governance payload */ +export async function decodeLazerGovernancePayload( + data: Buffer, +): Promise { + try { + const { GovernanceInstruction } = getProtoTypes(); + + const message = GovernanceInstruction.decode(data); + const decoded = GovernanceInstruction.toObject(message); + + if (!decoded.directives || decoded.directives.length === 0) { + return undefined; + } + + // Get the governance source + const source = decoded.source?.singleEd25519?.publicKey; + if (!source) return undefined; + + const governanceSource = new PublicKey(source); + const sequenceNo = decoded.governanceSequenceNo || 0; + + // Process the first directive (assuming single directive per instruction for now) + const directive = decoded.directives[0]; + const action = directive.action; + + if (action.addPublisher) { + return { + type: "AddPublisher", + data: { + publisherId: action.addPublisher.publisherId, + name: action.addPublisher.name, + publicKeys: action.addPublisher.publicKeys || [], + isActive: action.addPublisher.isActive, + shardFilter: directive.shardFilter, + governanceSource, + sequenceNo + } + }; + } else if (action.updatePublisher) { + return { + type: "UpdatePublisher", + data: { + publisherId: action.updatePublisher.publisherId, + action: action.updatePublisher.action, + shardFilter: directive.shardFilter, + governanceSource, + sequenceNo + } + }; + } else if (action.addFeed) { + return { + type: "AddFeed", + data: { + priceFeedId: action.addFeed.priceFeedId, + metadata: action.addFeed.metadata, + permissionedPublishers: action.addFeed.permissionedPublishers || [], + shardFilter: directive.shardFilter, + governanceSource, + sequenceNo + } + }; + } else if (action.updateFeed) { + return { + type: "UpdateFeed", + data: { + priceFeedId: action.updateFeed.priceFeedId, + action: action.updateFeed.action, + shardFilter: directive.shardFilter, + governanceSource, + sequenceNo + } + }; + } + + return undefined; + } catch { + return undefined; + } +} diff --git a/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/governance_payload/proto_utils.ts b/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/governance_payload/proto_utils.ts new file mode 100644 index 0000000000..3c593bc4fe --- /dev/null +++ b/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/governance_payload/proto_utils.ts @@ -0,0 +1,22 @@ +// Import the generated static module +import { pyth_lazer_transaction } from "../generated/governance_instruction"; + +/** Get commonly used proto types from the generated static module */ +export function getProtoTypes() { + return { + GovernanceInstruction: pyth_lazer_transaction.GovernanceInstruction, + GovernanceDirective: pyth_lazer_transaction.GovernanceDirective, + AddPublisher: pyth_lazer_transaction.AddPublisher, + UpdatePublisher: pyth_lazer_transaction.UpdatePublisher, + AddFeed: pyth_lazer_transaction.AddFeed, + UpdateFeed: pyth_lazer_transaction.UpdateFeed, + UpdateFeedMetadata: pyth_lazer_transaction.UpdateFeedMetadata, + ActivateFeed: pyth_lazer_transaction.ActivateFeed, + DeactivateFeed: pyth_lazer_transaction.DeactivateFeed, + SetPublisherName: pyth_lazer_transaction.SetPublisherName, + SetPublisherActive: pyth_lazer_transaction.SetPublisherActive, + AddPublisherPublicKeys: pyth_lazer_transaction.AddPublisherPublicKeys, + RemovePublisherPublicKeys: pyth_lazer_transaction.RemovePublisherPublicKeys, + SetPublisherPublicKeys: pyth_lazer_transaction.SetPublisherPublicKeys, + }; +} diff --git a/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/lazer_functions.ts b/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/lazer_functions.ts index e73564a47d..e5ef87bd0e 100644 --- a/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/lazer_functions.ts +++ b/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/lazer_functions.ts @@ -6,6 +6,7 @@ import { LazerConfig, LazerState, } from "../types"; +import { createAddFeed, createUpdateFeed, createAddPublisher, createUpdatePublisher } from "./governance_payload"; /** * Parameters for getting Lazer configuration @@ -320,13 +321,85 @@ export async function generateInstructions( cluster: PythCluster, accounts: LazerInstructionAccounts, ): Promise { - // Simple placeholder implementation that returns an empty array of instructions - // In a real implementation, this would transform the changes into Lazer-specific instructions + // This function converts configuration changes into Lazer governance instructions + // using the new governance payload functions that properly encode protobuf messages. - // Example of how this might be implemented: - // 1. For each change, determine if it's an add, update, or delete operation - // 2. Map the DownloadableProduct format to Lazer-specific data structure - // 3. Generate appropriate Lazer instructions based on the operation type + const instructions: TransactionInstruction[] = []; + console.log("changes", changes); - return []; + // Process each change and create corresponding governance instructions + for (const [changeKey, change] of Object.entries(changes)) { + let governanceBuffer: Buffer | null = null; + + if (changeKey.startsWith("feed_")) { + const feedId = parseInt(changeKey.replace("feed_", "")); + + if (!change.prev && change.new) { + // Add new feed + const feed = change.new as any; + governanceBuffer = await createAddFeed({ + priceFeedId: feedId, + metadata: feed.metadata, + permissionedPublishers: [], + governanceSource: accounts.fundingAccount, + }); + } else if (change.prev && change.new) { + // Update existing feed + const feed = change.new as any; + governanceBuffer = await createUpdateFeed({ + priceFeedId: feedId, + action: { + type: "updateFeedMetadata", + name: "metadata", + value: feed.metadata + }, + governanceSource: accounts.fundingAccount, + }); + } + } else if (changeKey.startsWith("publisher_")) { + const publisherId = parseInt(changeKey.replace("publisher_", "")); + + if (!change.prev && change.new) { + // Add new publisher + const publisher = change.new as any; + governanceBuffer = await createAddPublisher({ + publisherId: publisherId, + name: publisher.name, + publicKeys: publisher.publicKeys || [], + isActive: publisher.isActive || false, + governanceSource: accounts.fundingAccount, + }); + } else if (change.prev && change.new) { + // Update existing publisher + const publisher = change.new as any; + governanceBuffer = await createUpdatePublisher({ + publisherId: publisherId, + action: { + type: "setPublisherActive", + isActive: publisher.isActive + }, + governanceSource: accounts.fundingAccount, + }); + } + } + + // Create Solana transaction instruction if we have a governance buffer + if (governanceBuffer) { + const instruction = new TransactionInstruction({ + keys: [ + { + pubkey: accounts.fundingAccount, + isSigner: true, + isWritable: true, + }, + ], + programId: LAZER_PROGRAM_ID, + data: governanceBuffer, + }); + + instructions.push(instruction); + } + } + + return instructions; } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1e5aca631e..660a50e0a8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1753,6 +1753,9 @@ importers: prettier: specifier: 'catalog:' version: 3.5.3 + protobufjs-cli: + specifier: ^1.1.3 + version: 1.1.3(protobufjs@7.5.2) ts-jest: specifier: ^29.0.3 version: 29.3.1(@babel/core@7.27.1)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.27.1))(jest@29.7.0(@types/node@22.14.0)(ts-node@10.9.2(@types/node@22.14.0)(typescript@4.9.5)))(typescript@4.9.5) @@ -6106,6 +6109,10 @@ packages: '@jsdevtools/ono@7.1.3': resolution: {integrity: sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==} + '@jsdoc/salty@0.2.9': + resolution: {integrity: sha512-yYxMVH7Dqw6nO0d5NIV8OQWnitU8k6vXH8NtgqAfIa/IUqRMxRv/NUJJ08VEKbAakwxlgBl5PJdrU0dMPStsnw==} + engines: {node: '>=v12.0.0'} + '@keystonehq/alias-sampling@0.1.2': resolution: {integrity: sha512-5ukLB3bcgltgaFfQfYKYwHDUbwHicekYo53fSEa7xhVkAEqsA74kxdIwoBIURmGUtXe3EVIRm4SYlgcrt2Ri0w==} @@ -10984,6 +10991,9 @@ packages: '@types/keyv@3.1.4': resolution: {integrity: sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==} + '@types/linkify-it@5.0.0': + resolution: {integrity: sha512-sVDA58zAw4eWAffKOaQH5/5j3XeayukzDk+ewSsnv3p4yJEZHCCzMDiZM8e0OUrRvmpGZ85jf4yDHkHsgBNr9Q==} + '@types/lodash.values@4.3.9': resolution: {integrity: sha512-IJ20OEfqNwm3k8ENwoM3q0yOs4UMpgtD4GqxB4lwBHToGthHWqhyh5DdSgQjioocz0QK2SSBkJfCq95ZTV8BTw==} @@ -10996,9 +11006,15 @@ packages: '@types/lru-cache@5.1.1': resolution: {integrity: sha512-ssE3Vlrys7sdIzs5LOxCzTVMsU7i9oa/IaW92wF32JFb3CVczqOkru2xspuKczHEbG3nvmPY7IFqVmGGHdNbYw==} + '@types/markdown-it@14.1.2': + resolution: {integrity: sha512-promo4eFwuiW+TfGxhi+0x3czqTYJkG8qB17ZUJiVF10Xm7NLVRSLUsfRTU/6h1e24VvRnXCx+hG7li58lkzog==} + '@types/mdast@4.0.4': resolution: {integrity: sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==} + '@types/mdurl@2.0.0': + resolution: {integrity: sha512-RGdgjQUZba5p6QEFAVx2OGb8rQDL/cPRG7GiedRzMcJ1tYnUANBncjbSB1NRGwbvjcPeikRABz2nshyPk1bhWg==} + '@types/mdx@2.0.13': resolution: {integrity: sha512-+OWZQfAYyio6YkJb3HLxDrvnx6SWWDbC0zVPfBRzUk0/nqoDyf6dNxQi3eArPe8rJ473nobTMQ/8Zk+LxJ+Yuw==} @@ -12910,6 +12926,10 @@ packages: resolution: {integrity: sha512-K7Qy8O9p76sL3/3m7/zLKbRkyOlSZAgzEaLhyj2mXS8PsCud2Eo4hAb8aLtZqHh0QGqLcb9dlJSu6lHRVENm1w==} engines: {node: '>=6'} + catharsis@0.9.0: + resolution: {integrity: sha512-prMTQVpcns/tzFgFVkVp6ak6RykZyWb3gu8ckUpd6YkTlacOd3DXGJjIpD4Q6zJirizvaiAjSSHlOsA+6sNh2A==} + engines: {node: '>= 10'} + cbor-sync@1.0.4: resolution: {integrity: sha512-GWlXN4wiz0vdWWXBU71Dvc1q3aBo0HytqwAZnXF1wOwjqNnDWA1vZ1gDMFLlqohak31VQzmhiYfiCX5QSSfagA==} @@ -14495,6 +14515,11 @@ packages: resolution: {integrity: sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==} engines: {node: '>=12'} + escodegen@1.14.3: + resolution: {integrity: sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw==} + engines: {node: '>=4.0'} + hasBin: true + escodegen@2.1.0: resolution: {integrity: sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==} engines: {node: '>=6.0'} @@ -16822,6 +16847,9 @@ packages: resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} hasBin: true + js2xmlparser@4.0.2: + resolution: {integrity: sha512-6n4D8gLlLf1n5mNLQPRfViYzu9RATblzPEtm1SthMX1Pjao0r9YI9nw7ZIfRxQMERS87mcswrg+r/OYrPRX6jA==} + jsbi@3.2.5: resolution: {integrity: sha512-aBE4n43IPvjaddScbvWRA2YlTzKEynHzu7MqOyTipdHucf/VxS63ViCjxYRg86M8Rxwbt/GfzHl1kKERkt45fQ==} @@ -16852,6 +16880,11 @@ packages: resolution: {integrity: sha512-Hicd6JK5Njt2QB6XYFS7ok9e37O8AYk3jTcppG4YVQnYjOemymvTcmc7OWsmq/Qqj5TdRFO5/x/tIPmBeRtGHg==} engines: {node: '>=12.0.0'} + jsdoc@4.0.4: + resolution: {integrity: sha512-zeFezwyXeG4syyYHbvh1A967IAqq/67yXtXvuL5wnqCkFZe8I0vKfm+EO+YEvLguo6w9CDUbrAXVtJSHh2E8rw==} + engines: {node: '>=12.0.0'} + hasBin: true + jsdom@20.0.3: resolution: {integrity: sha512-SYhBvTh89tTfCD/CRdSOm13mOBa42iTaTyfyEWBdKcGdPxPtLFBXuHR8XHb33YNYaP+lLbmSvBTsnoesCNJEsQ==} engines: {node: '>=14'} @@ -17023,6 +17056,9 @@ packages: klaw@1.3.1: resolution: {integrity: sha512-TED5xi9gGQjGpNnvRWknrwAB1eL5GciPfVFOt3Vk1OJCVDQbzuSfrF3hkUQKlsgKrG1F+0t5W0m+Fje1jIt8rw==} + klaw@3.0.0: + resolution: {integrity: sha512-0Fo5oir+O9jnXu5EefYbVK+mHMBeEVEy2cmctR1O1NECcCkPRreJKrS6Qt/j3KC2C148Dfo9i3pCmCMsdqGr0g==} + kleur@3.0.3: resolution: {integrity: sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==} engines: {node: '>=6'} @@ -17129,6 +17165,10 @@ packages: resolution: {integrity: sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==} engines: {node: '>=6'} + levn@0.3.0: + resolution: {integrity: sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==} + engines: {node: '>= 0.8.0'} + levn@0.4.1: resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} engines: {node: '>= 0.8.0'} @@ -17454,6 +17494,12 @@ packages: resolution: {integrity: sha512-o5vL7aDWatOTX8LzaS1WMoaoxIiLRQJuIKKe2wAw6IeULDHaqbiqiggmx+pKvZDb1Sj+pE46Sn1T7lCqfFtg1Q==} engines: {node: '>=16'} + markdown-it-anchor@8.6.7: + resolution: {integrity: sha512-FlCHFwNnutLgVTflOYHPW2pPcl2AACqVzExlkGQNsi4CJgqOHN7YTgDd4LuhgN1BFO3TS0vLAruV1Td6dwWPJA==} + peerDependencies: + '@types/markdown-it': '*' + markdown-it: '*' + markdown-it@14.1.0: resolution: {integrity: sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==} hasBin: true @@ -18476,6 +18522,10 @@ packages: optimism@0.18.1: resolution: {integrity: sha512-mLXNwWPa9dgFyDqkNi54sjDyNJ9/fTI6WGBLgnXku1vdKY/jovHfZT5r+aiVeFFLOz+foPNOm5YJ4mqgld2GBQ==} + optionator@0.8.3: + resolution: {integrity: sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==} + engines: {node: '>= 0.8.0'} + optionator@0.9.4: resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} engines: {node: '>= 0.8.0'} @@ -19095,6 +19145,10 @@ packages: resolution: {integrity: sha512-QCYG84SgGyGzqJ/vlMsxeXd/pgL/I94ixdNFyh1PusWmTCyVfPJjZ1K1jvHtsbfnXQs2TSkEP2fR7QiMZAnKFQ==} engines: {node: '>= 0.6'} + prelude-ls@1.1.2: + resolution: {integrity: sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==} + engines: {node: '>= 0.8.0'} + prelude-ls@1.2.1: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} @@ -19234,6 +19288,13 @@ packages: property-information@7.0.0: resolution: {integrity: sha512-7D/qOz/+Y4X/rzSB6jKxKUsQnphO046ei8qxG59mtM3RG3DHgTK81HrxrmoDVINJb8NKT5ZsRbwHvQ6B68Iyhg==} + protobufjs-cli@1.1.3: + resolution: {integrity: sha512-MqD10lqF+FMsOayFiNOdOGNlXc4iKDCf0ZQPkPR+gizYh9gqUeGTWulABUCdI+N67w5RfJ6xhgX4J8pa8qmMXQ==} + engines: {node: '>=12.0.0'} + hasBin: true + peerDependencies: + protobufjs: ^7.0.0 + protobufjs@6.11.4: resolution: {integrity: sha512-5kQWPaJHi1WoCpjTGszzQ32PG2F4+wRY6BmAT4Vfw56Q2FZ4YZzK20xUYQH4YkfehY1e6QSICrJquM6xXZNcrw==} hasBin: true @@ -19242,6 +19303,10 @@ packages: resolution: {integrity: sha512-mRUWCc3KUU4w1jU8sGxICXH/gNS94DvI1gxqDvBzhj1JpcsimQkYiOJfwsPUykUI5ZaspFbSgmBLER8IrQ3tqw==} engines: {node: '>=12.0.0'} + protobufjs@7.5.2: + resolution: {integrity: sha512-f2ls6rpO6G153Cy+o2XQ+Y0sARLOZ17+OGVLHrc3VUKcLHYKEKWbkSujdBWQXM7gKn5NTfp0XnRPZn1MIu8n9w==} + engines: {node: '>=12.0.0'} + proxy-addr@2.0.7: resolution: {integrity: sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==} engines: {node: '>= 0.10'} @@ -19843,6 +19908,9 @@ packages: requires-port@1.0.0: resolution: {integrity: sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==} + requizzle@0.2.4: + resolution: {integrity: sha512-JRrFk1D4OQ4SqovXOgdav+K8EAhSB/LJZqCz8tbX0KObcdeM15Ss59ozWMBWmmINMagCwmqn4ZNryUGpBsl6Jw==} + reselect-tree@1.3.7: resolution: {integrity: sha512-kZN+C1cVJ6fFN2smSb0l4UvYZlRzttgnu183svH4NrU22cBY++ikgr2QT75Uuk4MYpv5gXSVijw4c5U6cx6GKg==} @@ -21371,6 +21439,10 @@ packages: tweetnacl@1.0.3: resolution: {integrity: sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==} + type-check@0.3.2: + resolution: {integrity: sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==} + engines: {node: '>= 0.8.0'} + type-check@0.4.0: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} @@ -21533,6 +21605,9 @@ packages: uncrypto@0.1.3: resolution: {integrity: sha512-Ql87qFHB3s/De2ClA9e0gsnS6zXG27SkTiSJwjCc9MebbfapQfuPzumMIUMi38ezPZVNFcHI9sUIepeQfw8J8Q==} + underscore@1.13.7: + resolution: {integrity: sha512-GMXzWtsc57XAtguZgaQViUOzs0KTkk8ojr3/xAxXLITqf/3EMwxC0inyETfDFjH/Krbhuep0HNbbjI9i/q3F3g==} + undici-types@5.26.5: resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} @@ -22542,6 +22617,9 @@ packages: xmlchars@2.2.0: resolution: {integrity: sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==} + xmlcreate@2.0.4: + resolution: {integrity: sha512-nquOebG4sngPmGPICTS5EnxqhKbCmz5Ox5hsszI2T6U5qdrJizBc+0ilYSEjTSzU0yZcmvppztXe/5Al5fUwdg==} + xmlhttprequest-ssl@2.1.2: resolution: {integrity: sha512-TEU+nJVUUnA4CYJFLvK5X9AOeH4KvDvhIfm0vV1GaQRtchnG0hgK5p8hw/xjv8cunWYCsiPCSDzObPyhEwq3KQ==} engines: {node: '>=0.4.0'} @@ -23426,7 +23504,7 @@ snapshots: '@babel/generator@7.27.0': dependencies: - '@babel/parser': 7.27.0 + '@babel/parser': 7.27.2 '@babel/types': 7.27.1 '@jridgewell/gen-mapping': 0.3.8 '@jridgewell/trace-mapping': 0.3.25 @@ -25113,7 +25191,7 @@ snapshots: '@babel/template@7.27.0': dependencies: '@babel/code-frame': 7.26.2 - '@babel/parser': 7.27.0 + '@babel/parser': 7.27.2 '@babel/types': 7.27.1 '@babel/template@7.27.2': @@ -25205,7 +25283,7 @@ snapshots: '@certusone/wormhole-sdk-proto-web@0.0.6(google-protobuf@3.21.4)': dependencies: '@improbable-eng/grpc-web': 0.15.0(google-protobuf@3.21.4) - protobufjs: 7.4.0 + protobufjs: 7.5.2 rxjs: 7.8.2 transitivePeerDependencies: - google-protobuf @@ -25213,7 +25291,7 @@ snapshots: '@certusone/wormhole-sdk-proto-web@0.0.7(google-protobuf@3.21.4)': dependencies: '@improbable-eng/grpc-web': 0.15.0(google-protobuf@3.21.4) - protobufjs: 7.4.0 + protobufjs: 7.5.2 rxjs: 7.8.2 transitivePeerDependencies: - google-protobuf @@ -27740,7 +27818,7 @@ snapshots: dependencies: lodash.camelcase: 4.3.0 long: 5.3.1 - protobufjs: 7.4.0 + protobufjs: 7.5.2 yargs: 17.7.2 '@hapi/hoek@9.3.0': {} @@ -27952,14 +28030,14 @@ snapshots: dependencies: '@injectivelabs/grpc-web': 0.0.1(google-protobuf@3.21.4) google-protobuf: 3.21.4 - protobufjs: 7.4.0 + protobufjs: 7.5.2 rxjs: 7.8.2 '@injectivelabs/core-proto-ts@0.0.14': dependencies: '@injectivelabs/grpc-web': 0.0.1(google-protobuf@3.21.4) google-protobuf: 3.21.4 - protobufjs: 7.4.0 + protobufjs: 7.5.2 rxjs: 7.8.2 optional: true @@ -27967,21 +28045,21 @@ snapshots: dependencies: '@injectivelabs/grpc-web': 0.0.1(google-protobuf@3.21.4) google-protobuf: 3.21.4 - protobufjs: 7.4.0 + protobufjs: 7.5.2 rxjs: 7.8.2 '@injectivelabs/core-proto-ts@1.14.3': dependencies: '@injectivelabs/grpc-web': 0.0.1(google-protobuf@3.21.4) google-protobuf: 3.21.4 - protobufjs: 7.4.0 + protobufjs: 7.5.2 rxjs: 7.8.2 '@injectivelabs/dmm-proto-ts@1.0.19': dependencies: '@injectivelabs/grpc-web': 0.0.1(google-protobuf@3.21.4) google-protobuf: 3.21.4 - protobufjs: 7.4.0 + protobufjs: 7.5.2 rxjs: 7.8.2 '@injectivelabs/exceptions@1.14.47': @@ -28005,7 +28083,7 @@ snapshots: dependencies: '@injectivelabs/grpc-web': 0.0.1(google-protobuf@3.21.4) google-protobuf: 3.21.4 - protobufjs: 7.4.0 + protobufjs: 7.5.2 rxjs: 7.8.2 optional: true @@ -28013,28 +28091,28 @@ snapshots: dependencies: '@injectivelabs/grpc-web': 0.0.1(google-protobuf@3.21.4) google-protobuf: 3.21.4 - protobufjs: 7.4.0 + protobufjs: 7.5.2 rxjs: 7.8.2 '@injectivelabs/indexer-proto-ts@1.13.9': dependencies: '@injectivelabs/grpc-web': 0.0.1(google-protobuf@3.21.4) google-protobuf: 3.21.4 - protobufjs: 7.4.0 + protobufjs: 7.5.2 rxjs: 7.8.2 '@injectivelabs/mito-proto-ts@1.0.62': dependencies: '@injectivelabs/grpc-web': 0.0.1(google-protobuf@3.21.4) google-protobuf: 3.21.4 - protobufjs: 7.4.0 + protobufjs: 7.5.2 rxjs: 7.8.2 '@injectivelabs/mito-proto-ts@1.0.9': dependencies: '@injectivelabs/grpc-web': 0.0.1(google-protobuf@3.21.4) google-protobuf: 3.21.4 - protobufjs: 7.4.0 + protobufjs: 7.5.2 rxjs: 7.8.2 optional: true @@ -28042,7 +28120,7 @@ snapshots: dependencies: '@injectivelabs/grpc-web': 0.0.1(google-protobuf@3.21.4) google-protobuf: 3.21.4 - protobufjs: 7.4.0 + protobufjs: 7.5.2 rxjs: 7.8.2 '@injectivelabs/networks@1.10.12': @@ -28064,7 +28142,7 @@ snapshots: dependencies: '@injectivelabs/grpc-web': 0.0.1(google-protobuf@3.21.4) google-protobuf: 3.21.4 - protobufjs: 7.4.0 + protobufjs: 7.5.2 rxjs: 7.8.2 '@injectivelabs/sdk-ts@1.10.72(@types/react@19.1.0)(bufferutil@4.0.9)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(utf-8-validate@5.0.10)': @@ -28887,6 +28965,10 @@ snapshots: '@jsdevtools/ono@7.1.3': {} + '@jsdoc/salty@0.2.9': + dependencies: + lodash: 4.17.21 + '@keystonehq/alias-sampling@0.1.2': {} '@keystonehq/bc-ur-registry-sol@0.9.5': @@ -36931,7 +37013,7 @@ snapshots: '@types/babel__core@7.20.5': dependencies: - '@babel/parser': 7.27.0 + '@babel/parser': 7.27.2 '@babel/types': 7.27.1 '@types/babel__generator': 7.6.8 '@types/babel__template': 7.4.4 @@ -36943,7 +37025,7 @@ snapshots: '@types/babel__template@7.4.4': dependencies: - '@babel/parser': 7.27.0 + '@babel/parser': 7.27.2 '@babel/types': 7.27.1 '@types/babel__traverse@7.20.7': @@ -37128,6 +37210,8 @@ snapshots: dependencies: '@types/node': 18.19.86 + '@types/linkify-it@5.0.0': {} + '@types/lodash.values@4.3.9': dependencies: '@types/lodash': 4.17.16 @@ -37138,10 +37222,17 @@ snapshots: '@types/lru-cache@5.1.1': {} + '@types/markdown-it@14.1.2': + dependencies: + '@types/linkify-it': 5.0.0 + '@types/mdurl': 2.0.0 + '@types/mdast@4.0.4': dependencies: '@types/unist': 3.0.3 + '@types/mdurl@2.0.0': {} + '@types/mdx@2.0.13': {} '@types/mime@1.3.5': {} @@ -40309,6 +40400,10 @@ snapshots: catering@2.1.1: {} + catharsis@0.9.0: + dependencies: + lodash: 4.17.21 + cbor-sync@1.0.4: {} cbor@10.0.3: @@ -42175,6 +42270,15 @@ snapshots: escape-string-regexp@5.0.0: {} + escodegen@1.14.3: + dependencies: + esprima: 4.0.1 + estraverse: 4.3.0 + esutils: 2.0.3 + optionator: 0.8.3 + optionalDependencies: + source-map: 0.6.1 + escodegen@2.1.0: dependencies: esprima: 4.0.1 @@ -45248,7 +45352,7 @@ snapshots: istanbul-lib-instrument@5.2.1: dependencies: '@babel/core': 7.27.1 - '@babel/parser': 7.27.0 + '@babel/parser': 7.27.2 '@istanbuljs/schema': 0.1.3 istanbul-lib-coverage: 3.2.2 semver: 6.3.1 @@ -45258,7 +45362,7 @@ snapshots: istanbul-lib-instrument@6.0.3: dependencies: '@babel/core': 7.27.1 - '@babel/parser': 7.27.0 + '@babel/parser': 7.27.2 '@istanbuljs/schema': 0.1.3 istanbul-lib-coverage: 3.2.2 semver: 7.7.1 @@ -46251,6 +46355,10 @@ snapshots: dependencies: argparse: 2.0.1 + js2xmlparser@4.0.2: + dependencies: + xmlcreate: 2.0.4 + jsbi@3.2.5: {} jsbn@0.1.1: {} @@ -46313,6 +46421,24 @@ snapshots: jsdoc-type-pratt-parser@4.1.0: {} + jsdoc@4.0.4: + dependencies: + '@babel/parser': 7.27.2 + '@jsdoc/salty': 0.2.9 + '@types/markdown-it': 14.1.2 + bluebird: 3.7.2 + catharsis: 0.9.0 + escape-string-regexp: 2.0.0 + js2xmlparser: 4.0.2 + klaw: 3.0.0 + markdown-it: 14.1.0 + markdown-it-anchor: 8.6.7(@types/markdown-it@14.1.2)(markdown-it@14.1.0) + marked: 4.3.0 + mkdirp: 1.0.4 + requizzle: 0.2.4 + strip-json-comments: 3.1.1 + underscore: 1.13.7 + jsdom@20.0.3(bufferutil@4.0.9)(utf-8-validate@5.0.10): dependencies: abab: 2.0.6 @@ -46541,6 +46667,10 @@ snapshots: optionalDependencies: graceful-fs: 4.2.11 + klaw@3.0.0: + dependencies: + graceful-fs: 4.2.11 + kleur@3.0.3: {} known-css-properties@0.35.0: {} @@ -46665,6 +46795,11 @@ snapshots: leven@3.1.0: {} + levn@0.3.0: + dependencies: + prelude-ls: 1.1.2 + type-check: 0.3.2 + levn@0.4.1: dependencies: prelude-ls: 1.2.1 @@ -46950,6 +47085,11 @@ snapshots: markdown-extensions@2.0.0: {} + markdown-it-anchor@8.6.7(@types/markdown-it@14.1.2)(markdown-it@14.1.0): + dependencies: + '@types/markdown-it': 14.1.2 + markdown-it: 14.1.0 + markdown-it@14.1.0: dependencies: argparse: 2.0.1 @@ -48477,6 +48617,15 @@ snapshots: '@wry/trie': 0.5.0 tslib: 2.8.1 + optionator@0.8.3: + dependencies: + deep-is: 0.1.4 + fast-levenshtein: 2.0.6 + levn: 0.3.0 + prelude-ls: 1.1.2 + type-check: 0.3.2 + word-wrap: 1.2.5 + optionator@0.9.4: dependencies: deep-is: 0.1.4 @@ -49250,6 +49399,8 @@ snapshots: precond@0.2.3: {} + prelude-ls@1.1.2: {} + prelude-ls@1.2.1: {} prettier-plugin-solidity@1.4.2(prettier@2.8.8): @@ -49343,6 +49494,20 @@ snapshots: property-information@7.0.0: {} + protobufjs-cli@1.1.3(protobufjs@7.5.2): + dependencies: + chalk: 4.1.2 + escodegen: 1.14.3 + espree: 9.6.1 + estraverse: 5.3.0 + glob: 8.1.0 + jsdoc: 4.0.4 + minimist: 1.2.8 + protobufjs: 7.5.2 + semver: 7.7.1 + tmp: 0.2.3 + uglify-js: 3.19.3 + protobufjs@6.11.4: dependencies: '@protobufjs/aspromise': 1.1.2 @@ -49374,6 +49539,21 @@ snapshots: '@types/node': 18.19.86 long: 5.3.1 + protobufjs@7.5.2: + dependencies: + '@protobufjs/aspromise': 1.1.2 + '@protobufjs/base64': 1.1.2 + '@protobufjs/codegen': 2.0.4 + '@protobufjs/eventemitter': 1.1.0 + '@protobufjs/fetch': 1.1.0 + '@protobufjs/float': 1.0.2 + '@protobufjs/inquire': 1.1.0 + '@protobufjs/path': 1.1.2 + '@protobufjs/pool': 1.1.0 + '@protobufjs/utf8': 1.1.0 + '@types/node': 18.19.86 + long: 5.3.1 + proxy-addr@2.0.7: dependencies: forwarded: 0.2.0 @@ -50386,6 +50566,10 @@ snapshots: requires-port@1.0.0: {} + requizzle@0.2.4: + dependencies: + lodash: 4.17.21 + reselect-tree@1.3.7: dependencies: debug: 3.2.7 @@ -52601,6 +52785,10 @@ snapshots: tweetnacl@1.0.3: {} + type-check@0.3.2: + dependencies: + prelude-ls: 1.1.2 + type-check@0.4.0: dependencies: prelude-ls: 1.2.1 @@ -52749,6 +52937,8 @@ snapshots: uncrypto@0.1.3: {} + underscore@1.13.7: {} + undici-types@5.26.5: {} undici-types@6.19.8: {} @@ -54422,6 +54612,8 @@ snapshots: xmlchars@2.2.0: {} + xmlcreate@2.0.4: {} + xmlhttprequest-ssl@2.1.2: {} xmlhttprequest@1.8.0: {} From df0810eec83f2c4f0b67cfe1a51af4cefa3743b5 Mon Sep 17 00:00:00 2001 From: Daniel Chew Date: Mon, 26 May 2025 11:51:42 +0900 Subject: [PATCH 08/27] fix: ci --- governance/xc_admin/packages/xc_admin_common/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/governance/xc_admin/packages/xc_admin_common/package.json b/governance/xc_admin/packages/xc_admin_common/package.json index aae1e08f01..895c6e2317 100644 --- a/governance/xc_admin/packages/xc_admin_common/package.json +++ b/governance/xc_admin/packages/xc_admin_common/package.json @@ -16,7 +16,7 @@ }, "scripts": { "build": "npm run build:proto && tsc", - "build:proto": "pbjs -t static-module -w es6 -o src/programs/lazer/generated/governance_instruction.js ../../../../lazer/publisher_sdk/proto/governance_instruction.proto ../../../../lazer/publisher_sdk/proto/dynamic_value.proto && pbts -o src/programs/lazer/generated/governance_instruction.d.ts src/programs/lazer/generated/governance_instruction.js", + "build:proto": "npx pbjs -t static-module -w es6 -o src/programs/lazer/generated/governance_instruction.js ../../../../lazer/publisher_sdk/proto/governance_instruction.proto ../../../../lazer/publisher_sdk/proto/dynamic_value.proto && npx pbts -o src/programs/lazer/generated/governance_instruction.d.ts src/programs/lazer/generated/governance_instruction.js", "test:unit": "jest", "fix:format": "prettier --write \"src/**/*.ts\"", "test:format": "prettier --check \"src/**/*.ts\"" From 139ab043a16a42e08a53d05a9b13400b2bc80443 Mon Sep 17 00:00:00 2001 From: Daniel Chew Date: Mon, 26 May 2025 12:01:38 +0900 Subject: [PATCH 09/27] revert fix --- governance/xc_admin/packages/xc_admin_common/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/governance/xc_admin/packages/xc_admin_common/package.json b/governance/xc_admin/packages/xc_admin_common/package.json index 895c6e2317..aae1e08f01 100644 --- a/governance/xc_admin/packages/xc_admin_common/package.json +++ b/governance/xc_admin/packages/xc_admin_common/package.json @@ -16,7 +16,7 @@ }, "scripts": { "build": "npm run build:proto && tsc", - "build:proto": "npx pbjs -t static-module -w es6 -o src/programs/lazer/generated/governance_instruction.js ../../../../lazer/publisher_sdk/proto/governance_instruction.proto ../../../../lazer/publisher_sdk/proto/dynamic_value.proto && npx pbts -o src/programs/lazer/generated/governance_instruction.d.ts src/programs/lazer/generated/governance_instruction.js", + "build:proto": "pbjs -t static-module -w es6 -o src/programs/lazer/generated/governance_instruction.js ../../../../lazer/publisher_sdk/proto/governance_instruction.proto ../../../../lazer/publisher_sdk/proto/dynamic_value.proto && pbts -o src/programs/lazer/generated/governance_instruction.d.ts src/programs/lazer/generated/governance_instruction.js", "test:unit": "jest", "fix:format": "prettier --write \"src/**/*.ts\"", "test:format": "prettier --check \"src/**/*.ts\"" From 0183b20aff9f08978cddfecf3f039fed5e93ba1c Mon Sep 17 00:00:00 2001 From: Daniel Chew Date: Mon, 26 May 2025 18:12:59 +0900 Subject: [PATCH 10/27] fix: ci --- .../packages/xc_admin_common/package.json | 5 +- .../lazer/governance_payload/AddFeed.ts | 46 ------ .../lazer/governance_payload/AddPublisher.ts | 48 ------- .../lazer/governance_payload/UpdateFeed.ts | 71 ---------- .../governance_payload/UpdatePublisher.ts | 95 ------------- .../lazer/governance_payload/index.ts | 131 ------------------ .../lazer/governance_payload/proto_utils.ts | 22 --- .../src/programs/lazer/lazer_functions.ts | 94 +++++++------ turbo.json | 19 ++- 9 files changed, 70 insertions(+), 461 deletions(-) delete mode 100644 governance/xc_admin/packages/xc_admin_common/src/programs/lazer/governance_payload/AddFeed.ts delete mode 100644 governance/xc_admin/packages/xc_admin_common/src/programs/lazer/governance_payload/AddPublisher.ts delete mode 100644 governance/xc_admin/packages/xc_admin_common/src/programs/lazer/governance_payload/UpdateFeed.ts delete mode 100644 governance/xc_admin/packages/xc_admin_common/src/programs/lazer/governance_payload/UpdatePublisher.ts delete mode 100644 governance/xc_admin/packages/xc_admin_common/src/programs/lazer/governance_payload/index.ts delete mode 100644 governance/xc_admin/packages/xc_admin_common/src/programs/lazer/governance_payload/proto_utils.ts diff --git a/governance/xc_admin/packages/xc_admin_common/package.json b/governance/xc_admin/packages/xc_admin_common/package.json index aae1e08f01..4a8d63c4b9 100644 --- a/governance/xc_admin/packages/xc_admin_common/package.json +++ b/governance/xc_admin/packages/xc_admin_common/package.json @@ -15,8 +15,9 @@ "url": "https://github.com/pyth-network/pyth-crosschain/issues" }, "scripts": { - "build": "npm run build:proto && tsc", - "build:proto": "pbjs -t static-module -w es6 -o src/programs/lazer/generated/governance_instruction.js ../../../../lazer/publisher_sdk/proto/governance_instruction.proto ../../../../lazer/publisher_sdk/proto/dynamic_value.proto && pbts -o src/programs/lazer/generated/governance_instruction.d.ts src/programs/lazer/generated/governance_instruction.js", + "build": "tsc", + "build:pbjs": "npx pbjs -t static-module -w es6 -o src/programs/lazer/generated/governance_instruction.js ../../../../lazer/publisher_sdk/proto/governance_instruction.proto ../../../../lazer/publisher_sdk/proto/dynamic_value.proto", + "build:pbts": "npx pbts -o src/programs/lazer/generated/governance_instruction.d.ts src/programs/lazer/generated/governance_instruction.js", "test:unit": "jest", "fix:format": "prettier --write \"src/**/*.ts\"", "test:format": "prettier --check \"src/**/*.ts\"" diff --git a/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/governance_payload/AddFeed.ts b/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/governance_payload/AddFeed.ts deleted file mode 100644 index 1631bc5179..0000000000 --- a/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/governance_payload/AddFeed.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { PublicKey } from "@solana/web3.js"; -import { getProtoTypes } from "./proto_utils"; - -export interface AddFeedParams { - priceFeedId: number; - metadata: Record; // DynamicValue.Map from proto - permissionedPublishers?: number[]; - shardFilter?: { - allShards?: Record; - shardNames?: { shardNames: string[] }; - shardGroups?: { shardGroups: string[] }; - }; - governanceSource: PublicKey; - sequenceNo?: number; -} - -/** Create an AddFeed governance instruction */ -export async function createAddFeed(params: AddFeedParams): Promise { - const { GovernanceInstruction, GovernanceDirective, AddFeed } = getProtoTypes(); - - // Create AddFeed message using proto type - const addFeedMessage = AddFeed.create({ - priceFeedId: params.priceFeedId, - metadata: params.metadata, - permissionedPublishers: params.permissionedPublishers || [] - }); - - // Create GovernanceDirective using proto type - const directive = GovernanceDirective.create({ - shardFilter: params.shardFilter || { allShards: {} }, - addFeed: addFeedMessage - }); - - const governanceInstruction = { - source: { - singleEd25519: { - publicKey: params.governanceSource.toBytes() - } - }, - directives: [directive], - governanceSequenceNo: params.sequenceNo || Date.now() - }; - - const message = GovernanceInstruction.create(governanceInstruction); - return Buffer.from(GovernanceInstruction.encode(message).finish()); -} diff --git a/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/governance_payload/AddPublisher.ts b/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/governance_payload/AddPublisher.ts deleted file mode 100644 index f427456fdd..0000000000 --- a/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/governance_payload/AddPublisher.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { PublicKey } from "@solana/web3.js"; -import { getProtoTypes } from "./proto_utils"; - -export interface AddPublisherParams { - publisherId: number; - name: string; - publicKeys: Uint8Array[]; - isActive: boolean; - shardFilter?: { - allShards?: Record; - shardNames?: { shardNames: string[] }; - shardGroups?: { shardGroups: string[] }; - }; - governanceSource: PublicKey; - sequenceNo?: number; -} - -/** Create an AddPublisher governance instruction */ -export async function createAddPublisher(params: AddPublisherParams): Promise { - const { GovernanceInstruction, GovernanceDirective, AddPublisher } = getProtoTypes(); - - // Create AddPublisher message using proto type - const addPublisherMessage = AddPublisher.create({ - publisherId: params.publisherId, - name: params.name, - publicKeys: params.publicKeys, - isActive: params.isActive - }); - - // Create GovernanceDirective using proto type - const directive = GovernanceDirective.create({ - shardFilter: params.shardFilter || { allShards: {} }, - addPublisher: addPublisherMessage - }); - - const governanceInstruction = { - source: { - singleEd25519: { - publicKey: params.governanceSource.toBytes() - } - }, - directives: [directive], - governanceSequenceNo: params.sequenceNo || Date.now() - }; - - const message = GovernanceInstruction.create(governanceInstruction); - return Buffer.from(GovernanceInstruction.encode(message).finish()); -} diff --git a/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/governance_payload/UpdateFeed.ts b/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/governance_payload/UpdateFeed.ts deleted file mode 100644 index 324bb7dabb..0000000000 --- a/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/governance_payload/UpdateFeed.ts +++ /dev/null @@ -1,71 +0,0 @@ -import { PublicKey } from "@solana/web3.js"; -import { getProtoTypes } from "./proto_utils"; - -export type UpdateFeedAction = - | { type: "updateFeedMetadata"; name: string; value?: any } - | { type: "activateFeed"; activationTimestamp?: string } - | { type: "deactivateFeed"; deactivationTimestamp?: string } - | { type: "removeFeed" }; - -export interface UpdateFeedParams { - priceFeedId: number; - action: UpdateFeedAction; - shardFilter?: { - allShards?: Record; - shardNames?: { shardNames: string[] }; - shardGroups?: { shardGroups: string[] }; - }; - governanceSource: PublicKey; - sequenceNo?: number; -} - -/** Create an UpdateFeed governance instruction */ -export async function createUpdateFeed(params: UpdateFeedParams): Promise { - const { GovernanceInstruction, GovernanceDirective, UpdateFeed, UpdateFeedMetadata, ActivateFeed, DeactivateFeed } = getProtoTypes(); - - // Create the appropriate action message based on type - let actionMessage: any = {}; - - switch (params.action.type) { - case "updateFeedMetadata": - actionMessage.updateFeedMetadata = UpdateFeedMetadata.create({ - name: params.action.name, - value: params.action.value - }); - break; - case "activateFeed": - actionMessage.activateFeed = ActivateFeed.create({}); - break; - case "deactivateFeed": - actionMessage.deactivateFeed = DeactivateFeed.create({}); - break; - case "removeFeed": - actionMessage.removeFeed = {}; - break; - } - - // Create UpdateFeed message using proto type - const updateFeedMessage = UpdateFeed.create({ - priceFeedId: params.priceFeedId, - ...actionMessage - }); - - // Create GovernanceDirective using proto type - const directive = GovernanceDirective.create({ - shardFilter: params.shardFilter || { allShards: {} }, - updateFeed: updateFeedMessage - }); - - const governanceInstruction = { - source: { - singleEd25519: { - publicKey: params.governanceSource.toBytes() - } - }, - directives: [directive], - governanceSequenceNo: params.sequenceNo || Date.now() - }; - - const message = GovernanceInstruction.create(governanceInstruction); - return Buffer.from(GovernanceInstruction.encode(message).finish()); -} diff --git a/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/governance_payload/UpdatePublisher.ts b/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/governance_payload/UpdatePublisher.ts deleted file mode 100644 index d1424b09ef..0000000000 --- a/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/governance_payload/UpdatePublisher.ts +++ /dev/null @@ -1,95 +0,0 @@ -import { PublicKey } from "@solana/web3.js"; -import { getProtoTypes } from "./proto_utils"; - -export type UpdatePublisherAction = - | { type: "setPublisherName"; name: string } - | { type: "addPublisherPublicKeys"; publicKeys: Uint8Array[] } - | { type: "removePublisherPublicKeys"; publicKeys: Uint8Array[] } - | { type: "setPublisherPublicKeys"; publicKeys: Uint8Array[] } - | { type: "setPublisherActive"; isActive: boolean } - | { type: "removePublisher" }; - -export interface UpdatePublisherParams { - publisherId: number; - action: UpdatePublisherAction; - shardFilter?: { - allShards?: Record; - shardNames?: { shardNames: string[] }; - shardGroups?: { shardGroups: string[] }; - }; - governanceSource: PublicKey; - sequenceNo?: number; -} - -/** Create an UpdatePublisher governance instruction */ -export async function createUpdatePublisher(params: UpdatePublisherParams): Promise { - const { - GovernanceInstruction, - GovernanceDirective, - UpdatePublisher, - SetPublisherName, - SetPublisherActive, - AddPublisherPublicKeys, - RemovePublisherPublicKeys, - SetPublisherPublicKeys - } = getProtoTypes(); - - // Create the appropriate action message based on type - let actionMessage: any = {}; - - switch (params.action.type) { - case "setPublisherName": - actionMessage.setPublisherName = SetPublisherName.create({ - name: params.action.name - }); - break; - case "addPublisherPublicKeys": - actionMessage.addPublisherPublicKeys = AddPublisherPublicKeys.create({ - publicKeys: params.action.publicKeys - }); - break; - case "removePublisherPublicKeys": - actionMessage.removePublisherPublicKeys = RemovePublisherPublicKeys.create({ - publicKeys: params.action.publicKeys - }); - break; - case "setPublisherPublicKeys": - actionMessage.setPublisherPublicKeys = SetPublisherPublicKeys.create({ - publicKeys: params.action.publicKeys - }); - break; - case "setPublisherActive": - actionMessage.setPublisherActive = SetPublisherActive.create({ - isActive: params.action.isActive - }); - break; - case "removePublisher": - actionMessage.removePublisher = {}; - break; - } - - // Create UpdatePublisher message using proto type - const updatePublisherMessage = UpdatePublisher.create({ - publisherId: params.publisherId, - ...actionMessage - }); - - // Create GovernanceDirective using proto type - const directive = GovernanceDirective.create({ - shardFilter: params.shardFilter || { allShards: {} }, - updatePublisher: updatePublisherMessage - }); - - const governanceInstruction = { - source: { - singleEd25519: { - publicKey: params.governanceSource.toBytes() - } - }, - directives: [directive], - governanceSequenceNo: params.sequenceNo || Date.now() - }; - - const message = GovernanceInstruction.create(governanceInstruction); - return Buffer.from(GovernanceInstruction.encode(message).finish()); -} diff --git a/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/governance_payload/index.ts b/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/governance_payload/index.ts deleted file mode 100644 index be83e748d6..0000000000 --- a/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/governance_payload/index.ts +++ /dev/null @@ -1,131 +0,0 @@ -import { PublicKey } from "@solana/web3.js"; -import { getProtoTypes } from "./proto_utils"; - -// Export all the creation functions and types -export * from "./AddPublisher"; -export * from "./UpdatePublisher"; -export * from "./AddFeed"; -export * from "./UpdateFeed"; -export * from "./proto_utils"; - -// Types for decoded actions -export type DecodedLazerGovernanceAction = - | { type: "AddPublisher"; data: AddPublisherData } - | { type: "UpdatePublisher"; data: UpdatePublisherData } - | { type: "AddFeed"; data: AddFeedData } - | { type: "UpdateFeed"; data: UpdateFeedData }; - -export interface AddPublisherData { - publisherId: number; - name: string; - publicKeys: string[]; - isActive: boolean; - shardFilter: any; - governanceSource: PublicKey; - sequenceNo: number; -} - -export interface UpdatePublisherData { - publisherId: number; - action: any; - shardFilter: any; - governanceSource: PublicKey; - sequenceNo: number; -} - -export interface AddFeedData { - priceFeedId: number; - metadata: any; - permissionedPublishers: number[]; - shardFilter: any; - governanceSource: PublicKey; - sequenceNo: number; -} - -export interface UpdateFeedData { - priceFeedId: number; - action: any; - shardFilter: any; - governanceSource: PublicKey; - sequenceNo: number; -} - -/** Decode a Lazer governance payload */ -export async function decodeLazerGovernancePayload( - data: Buffer, -): Promise { - try { - const { GovernanceInstruction } = getProtoTypes(); - - const message = GovernanceInstruction.decode(data); - const decoded = GovernanceInstruction.toObject(message); - - if (!decoded.directives || decoded.directives.length === 0) { - return undefined; - } - - // Get the governance source - const source = decoded.source?.singleEd25519?.publicKey; - if (!source) return undefined; - - const governanceSource = new PublicKey(source); - const sequenceNo = decoded.governanceSequenceNo || 0; - - // Process the first directive (assuming single directive per instruction for now) - const directive = decoded.directives[0]; - const action = directive.action; - - if (action.addPublisher) { - return { - type: "AddPublisher", - data: { - publisherId: action.addPublisher.publisherId, - name: action.addPublisher.name, - publicKeys: action.addPublisher.publicKeys || [], - isActive: action.addPublisher.isActive, - shardFilter: directive.shardFilter, - governanceSource, - sequenceNo - } - }; - } else if (action.updatePublisher) { - return { - type: "UpdatePublisher", - data: { - publisherId: action.updatePublisher.publisherId, - action: action.updatePublisher.action, - shardFilter: directive.shardFilter, - governanceSource, - sequenceNo - } - }; - } else if (action.addFeed) { - return { - type: "AddFeed", - data: { - priceFeedId: action.addFeed.priceFeedId, - metadata: action.addFeed.metadata, - permissionedPublishers: action.addFeed.permissionedPublishers || [], - shardFilter: directive.shardFilter, - governanceSource, - sequenceNo - } - }; - } else if (action.updateFeed) { - return { - type: "UpdateFeed", - data: { - priceFeedId: action.updateFeed.priceFeedId, - action: action.updateFeed.action, - shardFilter: directive.shardFilter, - governanceSource, - sequenceNo - } - }; - } - - return undefined; - } catch { - return undefined; - } -} diff --git a/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/governance_payload/proto_utils.ts b/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/governance_payload/proto_utils.ts deleted file mode 100644 index 3c593bc4fe..0000000000 --- a/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/governance_payload/proto_utils.ts +++ /dev/null @@ -1,22 +0,0 @@ -// Import the generated static module -import { pyth_lazer_transaction } from "../generated/governance_instruction"; - -/** Get commonly used proto types from the generated static module */ -export function getProtoTypes() { - return { - GovernanceInstruction: pyth_lazer_transaction.GovernanceInstruction, - GovernanceDirective: pyth_lazer_transaction.GovernanceDirective, - AddPublisher: pyth_lazer_transaction.AddPublisher, - UpdatePublisher: pyth_lazer_transaction.UpdatePublisher, - AddFeed: pyth_lazer_transaction.AddFeed, - UpdateFeed: pyth_lazer_transaction.UpdateFeed, - UpdateFeedMetadata: pyth_lazer_transaction.UpdateFeedMetadata, - ActivateFeed: pyth_lazer_transaction.ActivateFeed, - DeactivateFeed: pyth_lazer_transaction.DeactivateFeed, - SetPublisherName: pyth_lazer_transaction.SetPublisherName, - SetPublisherActive: pyth_lazer_transaction.SetPublisherActive, - AddPublisherPublicKeys: pyth_lazer_transaction.AddPublisherPublicKeys, - RemovePublisherPublicKeys: pyth_lazer_transaction.RemovePublisherPublicKeys, - SetPublisherPublicKeys: pyth_lazer_transaction.SetPublisherPublicKeys, - }; -} diff --git a/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/lazer_functions.ts b/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/lazer_functions.ts index e5ef87bd0e..9362f40e35 100644 --- a/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/lazer_functions.ts +++ b/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/lazer_functions.ts @@ -6,7 +6,7 @@ import { LazerConfig, LazerState, } from "../types"; -import { createAddFeed, createUpdateFeed, createAddPublisher, createUpdatePublisher } from "./governance_payload"; +import { pyth_lazer_transaction } from "./generated/governance_instruction"; /** * Parameters for getting Lazer configuration @@ -334,53 +334,57 @@ export async function generateInstructions( if (changeKey.startsWith("feed_")) { const feedId = parseInt(changeKey.replace("feed_", "")); - if (!change.prev && change.new) { - // Add new feed - const feed = change.new as any; - governanceBuffer = await createAddFeed({ - priceFeedId: feedId, - metadata: feed.metadata, - permissionedPublishers: [], - governanceSource: accounts.fundingAccount, - }); - } else if (change.prev && change.new) { - // Update existing feed - const feed = change.new as any; - governanceBuffer = await createUpdateFeed({ - priceFeedId: feedId, - action: { - type: "updateFeedMetadata", - name: "metadata", - value: feed.metadata - }, - governanceSource: accounts.fundingAccount, - }); - } + + // if (!change.prev && change.new) { + // const feedMetadata = change.new.feeds?.[0]?.metadata; + // // Add new feed + // const feed = change.new; + // const addFeedMessage: AddFeed = + // { + // price_feed_id: feedId, + // metadata: feed.metadata, + // permissioned_publishers: [], + // }; + // const encoded = encodeAddFeed(addFeedMessage); + // governanceBuffer = Buffer.from(encoded); + // } else if (change.prev && change.new) { + // // Update existing feed + // const feed = change.new as any; + // governanceBuffer = encodeUpdateFeed({ + // priceFeedId: feedId, + // action: { + // type: "updateFeedMetadata", + // name: "metadata", + // value: feed.metadata + // }, + // governanceSource: accounts.fundingAccount, + // }); + // } } else if (changeKey.startsWith("publisher_")) { const publisherId = parseInt(changeKey.replace("publisher_", "")); - if (!change.prev && change.new) { - // Add new publisher - const publisher = change.new as any; - governanceBuffer = await createAddPublisher({ - publisherId: publisherId, - name: publisher.name, - publicKeys: publisher.publicKeys || [], - isActive: publisher.isActive || false, - governanceSource: accounts.fundingAccount, - }); - } else if (change.prev && change.new) { - // Update existing publisher - const publisher = change.new as any; - governanceBuffer = await createUpdatePublisher({ - publisherId: publisherId, - action: { - type: "setPublisherActive", - isActive: publisher.isActive - }, - governanceSource: accounts.fundingAccount, - }); - } + // if (!change.prev && change.new) { + // // Add new publisher + // const publisher = change.new as any; + // governanceBuffer = encodeAddPublisher({ + // publisherId: publisherId, + // name: publisher.name, + // publicKeys: publisher.publicKeys || [], + // isActive: publisher.isActive || false, + // governanceSource: accounts.fundingAccount, + // }); + // } else if (change.prev && change.new) { + // // Update existing publisher + // const publisher = change.new as any; + // governanceBuffer = encodeUpdatePublisher({ + // publisherId: publisherId, + // action: { + // type: "setPublisherActive", + // isActive: publisher.isActive + // }, + // governanceSource: accounts.fundingAccount, + // }); + // } } // Create Solana transaction instruction if we have a governance buffer diff --git a/turbo.json b/turbo.json index 3a6d425209..6d80bb431e 100644 --- a/turbo.json +++ b/turbo.json @@ -57,7 +57,8 @@ "pull:env", "^build", "build:cjs", - "build:esm" + "build:esm", + "build:pbts" ], "inputs": [ "$TURBO_DEFAULT$", @@ -115,6 +116,22 @@ ], "outputs": ["lib/**", "dist/**", ".next/**", "!.next/cache/**"] }, + "build:pbjs": { + "dependsOn": ["//#install:modules"], + "inputs": [ + "../../../../lazer/publisher_sdk/proto/governance_instruction.proto", + "../../../../lazer/publisher_sdk/proto/dynamic_value.proto" + ], + "outputs": ["src/programs/lazer/generated/governance_instruction.js"] + }, + "build:pbts": { + "dependsOn": ["//#install:modules", "build:pbjs"], + "inputs": [ + "../../../../lazer/publisher_sdk/proto/governance_instruction.proto", + "../../../../lazer/publisher_sdk/proto/dynamic_value.proto" + ], + "outputs": ["src/programs/lazer/generated/governance_instruction.d.ts"] + }, "fix": { "dependsOn": ["fix:lint", "fix:format"], "cache": false From c1127649cbe5d92c293fec98c47b7c0bd4b960a5 Mon Sep 17 00:00:00 2001 From: Daniel Chew Date: Mon, 26 May 2025 18:29:16 +0900 Subject: [PATCH 11/27] fix: format --- .../generated/governance_instruction.d.ts | 8121 +++++++++-------- .../src/programs/lazer/lazer_functions.ts | 1 - 2 files changed, 4350 insertions(+), 3772 deletions(-) diff --git a/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/generated/governance_instruction.d.ts b/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/generated/governance_instruction.d.ts index 69485186c0..0e3f48829c 100644 --- a/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/generated/governance_instruction.d.ts +++ b/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/generated/governance_instruction.d.ts @@ -2,3818 +2,4397 @@ import * as $protobuf from "protobufjs"; import Long = require("long"); /** Namespace pyth_lazer_transaction. */ export namespace pyth_lazer_transaction { - - /** Properties of a GovernanceInstruction. */ - interface IGovernanceInstruction { - - /** GovernanceInstruction source */ - source?: (pyth_lazer_transaction.IGovernanceSource|null); - - /** GovernanceInstruction directives */ - directives?: (pyth_lazer_transaction.IGovernanceDirective[]|null); - - /** GovernanceInstruction minExecutionTimestamp */ - minExecutionTimestamp?: (google.protobuf.ITimestamp|null); - - /** GovernanceInstruction maxExecutionTimestamp */ - maxExecutionTimestamp?: (google.protobuf.ITimestamp|null); - - /** GovernanceInstruction governanceSequenceNo */ - governanceSequenceNo?: (number|null); - } - - /** Represents a GovernanceInstruction. */ - class GovernanceInstruction implements IGovernanceInstruction { - - /** - * Constructs a new GovernanceInstruction. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IGovernanceInstruction); - - /** GovernanceInstruction source. */ - public source?: (pyth_lazer_transaction.IGovernanceSource|null); - - /** GovernanceInstruction directives. */ - public directives: pyth_lazer_transaction.IGovernanceDirective[]; - - /** GovernanceInstruction minExecutionTimestamp. */ - public minExecutionTimestamp?: (google.protobuf.ITimestamp|null); - - /** GovernanceInstruction maxExecutionTimestamp. */ - public maxExecutionTimestamp?: (google.protobuf.ITimestamp|null); - - /** GovernanceInstruction governanceSequenceNo. */ - public governanceSequenceNo?: (number|null); - - /** GovernanceInstruction _source. */ - public _source?: "source"; - - /** GovernanceInstruction _minExecutionTimestamp. */ - public _minExecutionTimestamp?: "minExecutionTimestamp"; - - /** GovernanceInstruction _maxExecutionTimestamp. */ - public _maxExecutionTimestamp?: "maxExecutionTimestamp"; - - /** GovernanceInstruction _governanceSequenceNo. */ - public _governanceSequenceNo?: "governanceSequenceNo"; - - /** - * Creates a new GovernanceInstruction instance using the specified properties. - * @param [properties] Properties to set - * @returns GovernanceInstruction instance - */ - public static create(properties?: pyth_lazer_transaction.IGovernanceInstruction): pyth_lazer_transaction.GovernanceInstruction; - - /** - * Encodes the specified GovernanceInstruction message. Does not implicitly {@link pyth_lazer_transaction.GovernanceInstruction.verify|verify} messages. - * @param message GovernanceInstruction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IGovernanceInstruction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GovernanceInstruction message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceInstruction.verify|verify} messages. - * @param message GovernanceInstruction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IGovernanceInstruction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GovernanceInstruction message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GovernanceInstruction - * @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): pyth_lazer_transaction.GovernanceInstruction; - - /** - * Decodes a GovernanceInstruction message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GovernanceInstruction - * @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)): pyth_lazer_transaction.GovernanceInstruction; - - /** - * Verifies a GovernanceInstruction 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 GovernanceInstruction message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GovernanceInstruction - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.GovernanceInstruction; - - /** - * Creates a plain object from a GovernanceInstruction message. Also converts values to other types if specified. - * @param message GovernanceInstruction - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.GovernanceInstruction, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GovernanceInstruction to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GovernanceInstruction - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ShardFilter. */ - interface IShardFilter { - - /** ShardFilter allShards */ - allShards?: (google.protobuf.IEmpty|null); - - /** ShardFilter shardNames */ - shardNames?: (pyth_lazer_transaction.ShardFilter.IShardNames|null); - - /** ShardFilter shardGroups */ - shardGroups?: (pyth_lazer_transaction.ShardFilter.IShardGroups|null); - } - - /** Represents a ShardFilter. */ - class ShardFilter implements IShardFilter { - - /** - * Constructs a new ShardFilter. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IShardFilter); - - /** ShardFilter allShards. */ - public allShards?: (google.protobuf.IEmpty|null); - - /** ShardFilter shardNames. */ - public shardNames?: (pyth_lazer_transaction.ShardFilter.IShardNames|null); - - /** ShardFilter shardGroups. */ - public shardGroups?: (pyth_lazer_transaction.ShardFilter.IShardGroups|null); - - /** ShardFilter filter. */ - public filter?: ("allShards"|"shardNames"|"shardGroups"); - - /** - * Creates a new ShardFilter instance using the specified properties. - * @param [properties] Properties to set - * @returns ShardFilter instance - */ - public static create(properties?: pyth_lazer_transaction.IShardFilter): pyth_lazer_transaction.ShardFilter; - - /** - * Encodes the specified ShardFilter message. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.verify|verify} messages. - * @param message ShardFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IShardFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ShardFilter message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.verify|verify} messages. - * @param message ShardFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IShardFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ShardFilter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ShardFilter - * @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): pyth_lazer_transaction.ShardFilter; - - /** - * Decodes a ShardFilter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ShardFilter - * @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)): pyth_lazer_transaction.ShardFilter; - - /** - * Verifies a ShardFilter 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 ShardFilter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ShardFilter - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.ShardFilter; - - /** - * Creates a plain object from a ShardFilter message. Also converts values to other types if specified. - * @param message ShardFilter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.ShardFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ShardFilter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ShardFilter - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ShardFilter { - - /** Properties of a ShardNames. */ - interface IShardNames { - - /** ShardNames shardNames */ - shardNames?: (string[]|null); - } - - /** Represents a ShardNames. */ - class ShardNames implements IShardNames { - - /** - * Constructs a new ShardNames. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.ShardFilter.IShardNames); - - /** ShardNames shardNames. */ - public shardNames: string[]; - - /** - * Creates a new ShardNames instance using the specified properties. - * @param [properties] Properties to set - * @returns ShardNames instance - */ - public static create(properties?: pyth_lazer_transaction.ShardFilter.IShardNames): pyth_lazer_transaction.ShardFilter.ShardNames; - - /** - * Encodes the specified ShardNames message. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardNames.verify|verify} messages. - * @param message ShardNames message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.ShardFilter.IShardNames, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ShardNames message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardNames.verify|verify} messages. - * @param message ShardNames message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.ShardFilter.IShardNames, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ShardNames message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ShardNames - * @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): pyth_lazer_transaction.ShardFilter.ShardNames; - - /** - * Decodes a ShardNames message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ShardNames - * @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)): pyth_lazer_transaction.ShardFilter.ShardNames; - - /** - * Verifies a ShardNames 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 ShardNames message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ShardNames - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.ShardFilter.ShardNames; - - /** - * Creates a plain object from a ShardNames message. Also converts values to other types if specified. - * @param message ShardNames - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.ShardFilter.ShardNames, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ShardNames to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ShardNames - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ShardGroups. */ - interface IShardGroups { - - /** ShardGroups shardGroups */ - shardGroups?: (string[]|null); - } - - /** Represents a ShardGroups. */ - class ShardGroups implements IShardGroups { - - /** - * Constructs a new ShardGroups. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.ShardFilter.IShardGroups); - - /** ShardGroups shardGroups. */ - public shardGroups: string[]; - - /** - * Creates a new ShardGroups instance using the specified properties. - * @param [properties] Properties to set - * @returns ShardGroups instance - */ - public static create(properties?: pyth_lazer_transaction.ShardFilter.IShardGroups): pyth_lazer_transaction.ShardFilter.ShardGroups; - - /** - * Encodes the specified ShardGroups message. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardGroups.verify|verify} messages. - * @param message ShardGroups message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.ShardFilter.IShardGroups, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ShardGroups message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardGroups.verify|verify} messages. - * @param message ShardGroups message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.ShardFilter.IShardGroups, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ShardGroups message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ShardGroups - * @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): pyth_lazer_transaction.ShardFilter.ShardGroups; - - /** - * Decodes a ShardGroups message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ShardGroups - * @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)): pyth_lazer_transaction.ShardFilter.ShardGroups; - - /** - * Verifies a ShardGroups 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 ShardGroups message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ShardGroups - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.ShardFilter.ShardGroups; - - /** - * Creates a plain object from a ShardGroups message. Also converts values to other types if specified. - * @param message ShardGroups - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.ShardFilter.ShardGroups, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ShardGroups to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ShardGroups - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a GovernanceDirective. */ - interface IGovernanceDirective { - - /** GovernanceDirective shardFilter */ - shardFilter?: (pyth_lazer_transaction.IShardFilter|null); - - /** GovernanceDirective createShard */ - createShard?: (pyth_lazer_transaction.ICreateShard|null); - - /** GovernanceDirective addGovernanceSource */ - addGovernanceSource?: (pyth_lazer_transaction.IAddGovernanceSource|null); - - /** GovernanceDirective updateGovernanceSource */ - updateGovernanceSource?: (pyth_lazer_transaction.IUpdateGovernanceSource|null); - - /** GovernanceDirective setShardName */ - setShardName?: (pyth_lazer_transaction.ISetShardName|null); - - /** GovernanceDirective setShardGroup */ - setShardGroup?: (pyth_lazer_transaction.ISetShardGroup|null); - - /** GovernanceDirective resetLastSequenceNo */ - resetLastSequenceNo?: (pyth_lazer_transaction.IResetLastSequenceNo|null); - - /** GovernanceDirective addPublisher */ - addPublisher?: (pyth_lazer_transaction.IAddPublisher|null); - - /** GovernanceDirective updatePublisher */ - updatePublisher?: (pyth_lazer_transaction.IUpdatePublisher|null); - - /** GovernanceDirective addFeed */ - addFeed?: (pyth_lazer_transaction.IAddFeed|null); - - /** GovernanceDirective updateFeed */ - updateFeed?: (pyth_lazer_transaction.IUpdateFeed|null); - } - - /** Represents a GovernanceDirective. */ - class GovernanceDirective implements IGovernanceDirective { - - /** - * Constructs a new GovernanceDirective. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IGovernanceDirective); - - /** GovernanceDirective shardFilter. */ - public shardFilter?: (pyth_lazer_transaction.IShardFilter|null); - - /** GovernanceDirective createShard. */ - public createShard?: (pyth_lazer_transaction.ICreateShard|null); - - /** GovernanceDirective addGovernanceSource. */ - public addGovernanceSource?: (pyth_lazer_transaction.IAddGovernanceSource|null); - - /** GovernanceDirective updateGovernanceSource. */ - public updateGovernanceSource?: (pyth_lazer_transaction.IUpdateGovernanceSource|null); - - /** GovernanceDirective setShardName. */ - public setShardName?: (pyth_lazer_transaction.ISetShardName|null); - - /** GovernanceDirective setShardGroup. */ - public setShardGroup?: (pyth_lazer_transaction.ISetShardGroup|null); - - /** GovernanceDirective resetLastSequenceNo. */ - public resetLastSequenceNo?: (pyth_lazer_transaction.IResetLastSequenceNo|null); - - /** GovernanceDirective addPublisher. */ - public addPublisher?: (pyth_lazer_transaction.IAddPublisher|null); - - /** GovernanceDirective updatePublisher. */ - public updatePublisher?: (pyth_lazer_transaction.IUpdatePublisher|null); - - /** GovernanceDirective addFeed. */ - public addFeed?: (pyth_lazer_transaction.IAddFeed|null); - - /** GovernanceDirective updateFeed. */ - public updateFeed?: (pyth_lazer_transaction.IUpdateFeed|null); - - /** GovernanceDirective _shardFilter. */ - public _shardFilter?: "shardFilter"; - - /** GovernanceDirective action. */ - public action?: ("createShard"|"addGovernanceSource"|"updateGovernanceSource"|"setShardName"|"setShardGroup"|"resetLastSequenceNo"|"addPublisher"|"updatePublisher"|"addFeed"|"updateFeed"); - - /** - * Creates a new GovernanceDirective instance using the specified properties. - * @param [properties] Properties to set - * @returns GovernanceDirective instance - */ - public static create(properties?: pyth_lazer_transaction.IGovernanceDirective): pyth_lazer_transaction.GovernanceDirective; - - /** - * Encodes the specified GovernanceDirective message. Does not implicitly {@link pyth_lazer_transaction.GovernanceDirective.verify|verify} messages. - * @param message GovernanceDirective message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IGovernanceDirective, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GovernanceDirective message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceDirective.verify|verify} messages. - * @param message GovernanceDirective message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IGovernanceDirective, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GovernanceDirective message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GovernanceDirective - * @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): pyth_lazer_transaction.GovernanceDirective; - - /** - * Decodes a GovernanceDirective message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GovernanceDirective - * @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)): pyth_lazer_transaction.GovernanceDirective; - - /** - * Verifies a GovernanceDirective 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 GovernanceDirective message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GovernanceDirective - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.GovernanceDirective; - - /** - * Creates a plain object from a GovernanceDirective message. Also converts values to other types if specified. - * @param message GovernanceDirective - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.GovernanceDirective, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GovernanceDirective to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GovernanceDirective - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Permissions. */ - interface IPermissions { - - /** Permissions allActions */ - allActions?: (boolean|null); - - /** Permissions shardActions */ - shardActions?: (pyth_lazer_transaction.Permissions.ShardAction[]|null); - - /** Permissions allUpdateGovernanceSourceActions */ - allUpdateGovernanceSourceActions?: (boolean|null); - - /** Permissions updateGovernanceSourceActions */ - updateGovernanceSourceActions?: (pyth_lazer_transaction.Permissions.UpdateGovernanceSourceAction[]|null); - - /** Permissions allUpdatePublisherAction */ - allUpdatePublisherAction?: (boolean|null); - - /** Permissions updatePublisherActions */ - updatePublisherActions?: (pyth_lazer_transaction.Permissions.UpdatePublisherAction[]|null); - - /** Permissions allUpdateFeedActions */ - allUpdateFeedActions?: (boolean|null); - - /** Permissions updateFeedActions */ - updateFeedActions?: (pyth_lazer_transaction.Permissions.UpdateFeedAction[]|null); - } - - /** Represents a Permissions. */ - class Permissions implements IPermissions { - - /** - * Constructs a new Permissions. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IPermissions); - - /** Permissions allActions. */ - public allActions?: (boolean|null); - - /** Permissions shardActions. */ - public shardActions: pyth_lazer_transaction.Permissions.ShardAction[]; - - /** Permissions allUpdateGovernanceSourceActions. */ - public allUpdateGovernanceSourceActions?: (boolean|null); - - /** Permissions updateGovernanceSourceActions. */ - public updateGovernanceSourceActions: pyth_lazer_transaction.Permissions.UpdateGovernanceSourceAction[]; - - /** Permissions allUpdatePublisherAction. */ - public allUpdatePublisherAction?: (boolean|null); - - /** Permissions updatePublisherActions. */ - public updatePublisherActions: pyth_lazer_transaction.Permissions.UpdatePublisherAction[]; - - /** Permissions allUpdateFeedActions. */ - public allUpdateFeedActions?: (boolean|null); - - /** Permissions updateFeedActions. */ - public updateFeedActions: pyth_lazer_transaction.Permissions.UpdateFeedAction[]; - - /** Permissions _allActions. */ - public _allActions?: "allActions"; - - /** Permissions _allUpdateGovernanceSourceActions. */ - public _allUpdateGovernanceSourceActions?: "allUpdateGovernanceSourceActions"; - - /** Permissions _allUpdatePublisherAction. */ - public _allUpdatePublisherAction?: "allUpdatePublisherAction"; - - /** Permissions _allUpdateFeedActions. */ - public _allUpdateFeedActions?: "allUpdateFeedActions"; - - /** - * Creates a new Permissions instance using the specified properties. - * @param [properties] Properties to set - * @returns Permissions instance - */ - public static create(properties?: pyth_lazer_transaction.IPermissions): pyth_lazer_transaction.Permissions; - - /** - * Encodes the specified Permissions message. Does not implicitly {@link pyth_lazer_transaction.Permissions.verify|verify} messages. - * @param message Permissions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IPermissions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Permissions message, length delimited. Does not implicitly {@link pyth_lazer_transaction.Permissions.verify|verify} messages. - * @param message Permissions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IPermissions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Permissions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Permissions - * @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): pyth_lazer_transaction.Permissions; - - /** - * Decodes a Permissions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Permissions - * @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)): pyth_lazer_transaction.Permissions; - - /** - * Verifies a Permissions 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 Permissions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Permissions - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.Permissions; - - /** - * Creates a plain object from a Permissions message. Also converts values to other types if specified. - * @param message Permissions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.Permissions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Permissions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Permissions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Permissions { - - /** ShardAction enum. */ - enum ShardAction { - SHARD_ACTION_UNSPECIFIED = 0, - CREATE_SHARD = 101, - ADD_GOVERNANCE_SOURCE = 102, - UPDATE_GOVERNANCE_SOURCE = 103, - SET_SHARD_NAME = 104, - SET_SHARD_GROUP = 105, - RESET_LAST_SEQUENCE_NO = 106, - ADD_PUBLISHER = 107, - ADD_FEED = 109 - } - - /** UpdateGovernanceSourceAction enum. */ - enum UpdateGovernanceSourceAction { - UPDATE_GOVERNANCE_SOURCE_ACTION_UNSPECIFIED = 0, - SET_GOVERNANCE_SOURCE_PERMISSIONS = 101, - REMOVE_GOVERNANCE_SOURCE = 199 - } - - /** UpdatePublisherAction enum. */ - enum UpdatePublisherAction { - UPDATE_PUBLISHER_ACTION_UNSPECIFIED = 0, - SET_PUBLISHER_NAME = 101, - ADD_PUBLISHER_PUBLIC_KEYS = 102, - REMOVE_PUBLISHER_PUBLIC_KEYS = 103, - SET_PUBLISHER_PUBLIC_KEYS = 104, - SET_PUBLISHER_ACTIVE = 105, - REMOVE_PUBLISHER = 199 - } - - /** UpdateFeedAction enum. */ - enum UpdateFeedAction { - UPDATE_FEED_ACTION_UNSPECIFIED = 0, - UPDATE_FEED_METADATA = 101, - ACTIVATE_FEED = 102, - DEACTIVATE_FEED = 103, - REMOVE_FEED = 199 - } - } - - /** Properties of a GovernanceSource. */ - interface IGovernanceSource { - - /** GovernanceSource singleEd25519 */ - singleEd25519?: (pyth_lazer_transaction.GovernanceSource.ISingleEd25519|null); - } - - /** Represents a GovernanceSource. */ - class GovernanceSource implements IGovernanceSource { - - /** - * Constructs a new GovernanceSource. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IGovernanceSource); - - /** GovernanceSource singleEd25519. */ - public singleEd25519?: (pyth_lazer_transaction.GovernanceSource.ISingleEd25519|null); - - /** GovernanceSource source. */ - public source?: "singleEd25519"; - - /** - * Creates a new GovernanceSource instance using the specified properties. - * @param [properties] Properties to set - * @returns GovernanceSource instance - */ - public static create(properties?: pyth_lazer_transaction.IGovernanceSource): pyth_lazer_transaction.GovernanceSource; - - /** - * Encodes the specified GovernanceSource message. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.verify|verify} messages. - * @param message GovernanceSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IGovernanceSource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GovernanceSource message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.verify|verify} messages. - * @param message GovernanceSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IGovernanceSource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GovernanceSource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GovernanceSource - * @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): pyth_lazer_transaction.GovernanceSource; - - /** - * Decodes a GovernanceSource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GovernanceSource - * @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)): pyth_lazer_transaction.GovernanceSource; - - /** - * Verifies a GovernanceSource 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 GovernanceSource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GovernanceSource - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.GovernanceSource; - - /** - * Creates a plain object from a GovernanceSource message. Also converts values to other types if specified. - * @param message GovernanceSource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.GovernanceSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GovernanceSource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GovernanceSource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace GovernanceSource { - - /** Properties of a SingleEd25519. */ - interface ISingleEd25519 { - - /** SingleEd25519 publicKey */ - publicKey?: (Uint8Array|null); - } - - /** Represents a SingleEd25519. */ - class SingleEd25519 implements ISingleEd25519 { - - /** - * Constructs a new SingleEd25519. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.GovernanceSource.ISingleEd25519); - - /** SingleEd25519 publicKey. */ - public publicKey?: (Uint8Array|null); - - /** SingleEd25519 _publicKey. */ - public _publicKey?: "publicKey"; - - /** - * Creates a new SingleEd25519 instance using the specified properties. - * @param [properties] Properties to set - * @returns SingleEd25519 instance - */ - public static create(properties?: pyth_lazer_transaction.GovernanceSource.ISingleEd25519): pyth_lazer_transaction.GovernanceSource.SingleEd25519; - - /** - * Encodes the specified SingleEd25519 message. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.SingleEd25519.verify|verify} messages. - * @param message SingleEd25519 message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.GovernanceSource.ISingleEd25519, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SingleEd25519 message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.SingleEd25519.verify|verify} messages. - * @param message SingleEd25519 message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.GovernanceSource.ISingleEd25519, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SingleEd25519 message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SingleEd25519 - * @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): pyth_lazer_transaction.GovernanceSource.SingleEd25519; - - /** - * Decodes a SingleEd25519 message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SingleEd25519 - * @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)): pyth_lazer_transaction.GovernanceSource.SingleEd25519; - - /** - * Verifies a SingleEd25519 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 SingleEd25519 message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SingleEd25519 - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.GovernanceSource.SingleEd25519; - - /** - * Creates a plain object from a SingleEd25519 message. Also converts values to other types if specified. - * @param message SingleEd25519 - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.GovernanceSource.SingleEd25519, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SingleEd25519 to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SingleEd25519 - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a CreateShard. */ - interface ICreateShard { - - /** CreateShard shardId */ - shardId?: (number|null); - - /** CreateShard shardGroup */ - shardGroup?: (string|null); - - /** CreateShard minRate */ - minRate?: (google.protobuf.IDuration|null); - } - - /** Represents a CreateShard. */ - class CreateShard implements ICreateShard { - - /** - * Constructs a new CreateShard. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.ICreateShard); - - /** CreateShard shardId. */ - public shardId?: (number|null); - - /** CreateShard shardGroup. */ - public shardGroup?: (string|null); - - /** CreateShard minRate. */ - public minRate?: (google.protobuf.IDuration|null); - - /** CreateShard _shardId. */ - public _shardId?: "shardId"; - - /** CreateShard _shardGroup. */ - public _shardGroup?: "shardGroup"; - - /** CreateShard _minRate. */ - public _minRate?: "minRate"; - - /** - * Creates a new CreateShard instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateShard instance - */ - public static create(properties?: pyth_lazer_transaction.ICreateShard): pyth_lazer_transaction.CreateShard; - - /** - * Encodes the specified CreateShard message. Does not implicitly {@link pyth_lazer_transaction.CreateShard.verify|verify} messages. - * @param message CreateShard message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.ICreateShard, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateShard message, length delimited. Does not implicitly {@link pyth_lazer_transaction.CreateShard.verify|verify} messages. - * @param message CreateShard message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.ICreateShard, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateShard message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateShard - * @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): pyth_lazer_transaction.CreateShard; - - /** - * Decodes a CreateShard message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateShard - * @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)): pyth_lazer_transaction.CreateShard; - - /** - * Verifies a CreateShard 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 CreateShard message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateShard - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.CreateShard; - - /** - * Creates a plain object from a CreateShard message. Also converts values to other types if specified. - * @param message CreateShard - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.CreateShard, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateShard to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateShard - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AddGovernanceSource. */ - interface IAddGovernanceSource { - - /** AddGovernanceSource newSource */ - newSource?: (pyth_lazer_transaction.IGovernanceSource|null); - - /** AddGovernanceSource permissions */ - permissions?: (pyth_lazer_transaction.IPermissions|null); - } - - /** Represents an AddGovernanceSource. */ - class AddGovernanceSource implements IAddGovernanceSource { - - /** - * Constructs a new AddGovernanceSource. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IAddGovernanceSource); - - /** AddGovernanceSource newSource. */ - public newSource?: (pyth_lazer_transaction.IGovernanceSource|null); - - /** AddGovernanceSource permissions. */ - public permissions?: (pyth_lazer_transaction.IPermissions|null); - - /** AddGovernanceSource _newSource. */ - public _newSource?: "newSource"; - - /** AddGovernanceSource _permissions. */ - public _permissions?: "permissions"; - - /** - * Creates a new AddGovernanceSource instance using the specified properties. - * @param [properties] Properties to set - * @returns AddGovernanceSource instance - */ - public static create(properties?: pyth_lazer_transaction.IAddGovernanceSource): pyth_lazer_transaction.AddGovernanceSource; - - /** - * Encodes the specified AddGovernanceSource message. Does not implicitly {@link pyth_lazer_transaction.AddGovernanceSource.verify|verify} messages. - * @param message AddGovernanceSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IAddGovernanceSource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AddGovernanceSource message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddGovernanceSource.verify|verify} messages. - * @param message AddGovernanceSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IAddGovernanceSource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AddGovernanceSource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AddGovernanceSource - * @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): pyth_lazer_transaction.AddGovernanceSource; - - /** - * Decodes an AddGovernanceSource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AddGovernanceSource - * @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)): pyth_lazer_transaction.AddGovernanceSource; - - /** - * Verifies an AddGovernanceSource 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 AddGovernanceSource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AddGovernanceSource - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.AddGovernanceSource; - - /** - * Creates a plain object from an AddGovernanceSource message. Also converts values to other types if specified. - * @param message AddGovernanceSource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.AddGovernanceSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AddGovernanceSource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AddGovernanceSource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateGovernanceSource. */ - interface IUpdateGovernanceSource { - - /** UpdateGovernanceSource source */ - source?: (pyth_lazer_transaction.IGovernanceSource|null); - - /** UpdateGovernanceSource setGovernanceSourcePermissions */ - setGovernanceSourcePermissions?: (pyth_lazer_transaction.ISetGovernanceSourcePermissions|null); - - /** UpdateGovernanceSource removeGovernanceSource */ - removeGovernanceSource?: (google.protobuf.IEmpty|null); - } - - /** Represents an UpdateGovernanceSource. */ - class UpdateGovernanceSource implements IUpdateGovernanceSource { - - /** - * Constructs a new UpdateGovernanceSource. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IUpdateGovernanceSource); - - /** UpdateGovernanceSource source. */ - public source?: (pyth_lazer_transaction.IGovernanceSource|null); - - /** UpdateGovernanceSource setGovernanceSourcePermissions. */ - public setGovernanceSourcePermissions?: (pyth_lazer_transaction.ISetGovernanceSourcePermissions|null); - - /** UpdateGovernanceSource removeGovernanceSource. */ - public removeGovernanceSource?: (google.protobuf.IEmpty|null); - - /** UpdateGovernanceSource _source. */ - public _source?: "source"; - - /** UpdateGovernanceSource action. */ - public action?: ("setGovernanceSourcePermissions"|"removeGovernanceSource"); - - /** - * Creates a new UpdateGovernanceSource instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateGovernanceSource instance - */ - public static create(properties?: pyth_lazer_transaction.IUpdateGovernanceSource): pyth_lazer_transaction.UpdateGovernanceSource; - - /** - * Encodes the specified UpdateGovernanceSource message. Does not implicitly {@link pyth_lazer_transaction.UpdateGovernanceSource.verify|verify} messages. - * @param message UpdateGovernanceSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IUpdateGovernanceSource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateGovernanceSource message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdateGovernanceSource.verify|verify} messages. - * @param message UpdateGovernanceSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IUpdateGovernanceSource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateGovernanceSource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateGovernanceSource - * @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): pyth_lazer_transaction.UpdateGovernanceSource; - - /** - * Decodes an UpdateGovernanceSource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateGovernanceSource - * @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)): pyth_lazer_transaction.UpdateGovernanceSource; - - /** - * Verifies an UpdateGovernanceSource 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 UpdateGovernanceSource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateGovernanceSource - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.UpdateGovernanceSource; - - /** - * Creates a plain object from an UpdateGovernanceSource message. Also converts values to other types if specified. - * @param message UpdateGovernanceSource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.UpdateGovernanceSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateGovernanceSource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateGovernanceSource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetGovernanceSourcePermissions. */ - interface ISetGovernanceSourcePermissions { - - /** SetGovernanceSourcePermissions permissions */ - permissions?: (pyth_lazer_transaction.IPermissions|null); + /** Properties of a GovernanceInstruction. */ + interface IGovernanceInstruction { + /** GovernanceInstruction source */ + source?: pyth_lazer_transaction.IGovernanceSource | null; + + /** GovernanceInstruction directives */ + directives?: pyth_lazer_transaction.IGovernanceDirective[] | null; + + /** GovernanceInstruction minExecutionTimestamp */ + minExecutionTimestamp?: google.protobuf.ITimestamp | null; + + /** GovernanceInstruction maxExecutionTimestamp */ + maxExecutionTimestamp?: google.protobuf.ITimestamp | null; + + /** GovernanceInstruction governanceSequenceNo */ + governanceSequenceNo?: number | null; + } + + /** Represents a GovernanceInstruction. */ + class GovernanceInstruction implements IGovernanceInstruction { + /** + * Constructs a new GovernanceInstruction. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IGovernanceInstruction); + + /** GovernanceInstruction source. */ + public source?: pyth_lazer_transaction.IGovernanceSource | null; + + /** GovernanceInstruction directives. */ + public directives: pyth_lazer_transaction.IGovernanceDirective[]; + + /** GovernanceInstruction minExecutionTimestamp. */ + public minExecutionTimestamp?: google.protobuf.ITimestamp | null; + + /** GovernanceInstruction maxExecutionTimestamp. */ + public maxExecutionTimestamp?: google.protobuf.ITimestamp | null; + + /** GovernanceInstruction governanceSequenceNo. */ + public governanceSequenceNo?: number | null; + + /** GovernanceInstruction _source. */ + public _source?: "source"; + + /** GovernanceInstruction _minExecutionTimestamp. */ + public _minExecutionTimestamp?: "minExecutionTimestamp"; + + /** GovernanceInstruction _maxExecutionTimestamp. */ + public _maxExecutionTimestamp?: "maxExecutionTimestamp"; + + /** GovernanceInstruction _governanceSequenceNo. */ + public _governanceSequenceNo?: "governanceSequenceNo"; + + /** + * Creates a new GovernanceInstruction instance using the specified properties. + * @param [properties] Properties to set + * @returns GovernanceInstruction instance + */ + public static create( + properties?: pyth_lazer_transaction.IGovernanceInstruction, + ): pyth_lazer_transaction.GovernanceInstruction; + + /** + * Encodes the specified GovernanceInstruction message. Does not implicitly {@link pyth_lazer_transaction.GovernanceInstruction.verify|verify} messages. + * @param message GovernanceInstruction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IGovernanceInstruction, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified GovernanceInstruction message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceInstruction.verify|verify} messages. + * @param message GovernanceInstruction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IGovernanceInstruction, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a GovernanceInstruction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GovernanceInstruction + * @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, + ): pyth_lazer_transaction.GovernanceInstruction; + + /** + * Decodes a GovernanceInstruction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GovernanceInstruction + * @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, + ): pyth_lazer_transaction.GovernanceInstruction; + + /** + * Verifies a GovernanceInstruction 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 GovernanceInstruction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GovernanceInstruction + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.GovernanceInstruction; + + /** + * Creates a plain object from a GovernanceInstruction message. Also converts values to other types if specified. + * @param message GovernanceInstruction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.GovernanceInstruction, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this GovernanceInstruction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GovernanceInstruction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ShardFilter. */ + interface IShardFilter { + /** ShardFilter allShards */ + allShards?: google.protobuf.IEmpty | null; + + /** ShardFilter shardNames */ + shardNames?: pyth_lazer_transaction.ShardFilter.IShardNames | null; + + /** ShardFilter shardGroups */ + shardGroups?: pyth_lazer_transaction.ShardFilter.IShardGroups | null; + } + + /** Represents a ShardFilter. */ + class ShardFilter implements IShardFilter { + /** + * Constructs a new ShardFilter. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IShardFilter); + + /** ShardFilter allShards. */ + public allShards?: google.protobuf.IEmpty | null; + + /** ShardFilter shardNames. */ + public shardNames?: pyth_lazer_transaction.ShardFilter.IShardNames | null; + + /** ShardFilter shardGroups. */ + public shardGroups?: pyth_lazer_transaction.ShardFilter.IShardGroups | null; + + /** ShardFilter filter. */ + public filter?: "allShards" | "shardNames" | "shardGroups"; + + /** + * Creates a new ShardFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns ShardFilter instance + */ + public static create( + properties?: pyth_lazer_transaction.IShardFilter, + ): pyth_lazer_transaction.ShardFilter; + + /** + * Encodes the specified ShardFilter message. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.verify|verify} messages. + * @param message ShardFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IShardFilter, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified ShardFilter message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.verify|verify} messages. + * @param message ShardFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IShardFilter, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ShardFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ShardFilter + * @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, + ): pyth_lazer_transaction.ShardFilter; + + /** + * Decodes a ShardFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ShardFilter + * @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, + ): pyth_lazer_transaction.ShardFilter; + + /** + * Verifies a ShardFilter 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 ShardFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ShardFilter + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.ShardFilter; + + /** + * Creates a plain object from a ShardFilter message. Also converts values to other types if specified. + * @param message ShardFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.ShardFilter, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this ShardFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ShardFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ShardFilter { + /** Properties of a ShardNames. */ + interface IShardNames { + /** ShardNames shardNames */ + shardNames?: string[] | null; } - /** Represents a SetGovernanceSourcePermissions. */ - class SetGovernanceSourcePermissions implements ISetGovernanceSourcePermissions { - - /** - * Constructs a new SetGovernanceSourcePermissions. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.ISetGovernanceSourcePermissions); - - /** SetGovernanceSourcePermissions permissions. */ - public permissions?: (pyth_lazer_transaction.IPermissions|null); - - /** SetGovernanceSourcePermissions _permissions. */ - public _permissions?: "permissions"; - - /** - * Creates a new SetGovernanceSourcePermissions instance using the specified properties. - * @param [properties] Properties to set - * @returns SetGovernanceSourcePermissions instance - */ - public static create(properties?: pyth_lazer_transaction.ISetGovernanceSourcePermissions): pyth_lazer_transaction.SetGovernanceSourcePermissions; - - /** - * Encodes the specified SetGovernanceSourcePermissions message. Does not implicitly {@link pyth_lazer_transaction.SetGovernanceSourcePermissions.verify|verify} messages. - * @param message SetGovernanceSourcePermissions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.ISetGovernanceSourcePermissions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetGovernanceSourcePermissions message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetGovernanceSourcePermissions.verify|verify} messages. - * @param message SetGovernanceSourcePermissions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.ISetGovernanceSourcePermissions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetGovernanceSourcePermissions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetGovernanceSourcePermissions - * @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): pyth_lazer_transaction.SetGovernanceSourcePermissions; - - /** - * Decodes a SetGovernanceSourcePermissions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetGovernanceSourcePermissions - * @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)): pyth_lazer_transaction.SetGovernanceSourcePermissions; - - /** - * Verifies a SetGovernanceSourcePermissions 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 SetGovernanceSourcePermissions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetGovernanceSourcePermissions - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.SetGovernanceSourcePermissions; - - /** - * Creates a plain object from a SetGovernanceSourcePermissions message. Also converts values to other types if specified. - * @param message SetGovernanceSourcePermissions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.SetGovernanceSourcePermissions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetGovernanceSourcePermissions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetGovernanceSourcePermissions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** Represents a ShardNames. */ + class ShardNames implements IShardNames { + /** + * Constructs a new ShardNames. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ShardFilter.IShardNames); + + /** ShardNames shardNames. */ + public shardNames: string[]; + + /** + * Creates a new ShardNames instance using the specified properties. + * @param [properties] Properties to set + * @returns ShardNames instance + */ + public static create( + properties?: pyth_lazer_transaction.ShardFilter.IShardNames, + ): pyth_lazer_transaction.ShardFilter.ShardNames; + + /** + * Encodes the specified ShardNames message. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardNames.verify|verify} messages. + * @param message ShardNames message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.ShardFilter.IShardNames, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified ShardNames message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardNames.verify|verify} messages. + * @param message ShardNames message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.ShardFilter.IShardNames, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ShardNames message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ShardNames + * @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, + ): pyth_lazer_transaction.ShardFilter.ShardNames; + + /** + * Decodes a ShardNames message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ShardNames + * @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, + ): pyth_lazer_transaction.ShardFilter.ShardNames; + + /** + * Verifies a ShardNames 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 ShardNames message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ShardNames + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.ShardFilter.ShardNames; + + /** + * Creates a plain object from a ShardNames message. Also converts values to other types if specified. + * @param message ShardNames + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.ShardFilter.ShardNames, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this ShardNames to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ShardNames + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SetShardName. */ - interface ISetShardName { - - /** SetShardName shardName */ - shardName?: (string|null); - } - - /** Represents a SetShardName. */ - class SetShardName implements ISetShardName { - - /** - * Constructs a new SetShardName. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.ISetShardName); - - /** SetShardName shardName. */ - public shardName?: (string|null); - - /** SetShardName _shardName. */ - public _shardName?: "shardName"; - - /** - * Creates a new SetShardName instance using the specified properties. - * @param [properties] Properties to set - * @returns SetShardName instance - */ - public static create(properties?: pyth_lazer_transaction.ISetShardName): pyth_lazer_transaction.SetShardName; - - /** - * Encodes the specified SetShardName message. Does not implicitly {@link pyth_lazer_transaction.SetShardName.verify|verify} messages. - * @param message SetShardName message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.ISetShardName, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetShardName message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetShardName.verify|verify} messages. - * @param message SetShardName message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.ISetShardName, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetShardName message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetShardName - * @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): pyth_lazer_transaction.SetShardName; - - /** - * Decodes a SetShardName message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetShardName - * @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)): pyth_lazer_transaction.SetShardName; - - /** - * Verifies a SetShardName 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 SetShardName message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetShardName - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.SetShardName; - - /** - * Creates a plain object from a SetShardName message. Also converts values to other types if specified. - * @param message SetShardName - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.SetShardName, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetShardName to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetShardName - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetShardGroup. */ - interface ISetShardGroup { - - /** SetShardGroup shardGroup */ - shardGroup?: (string|null); - } - - /** Represents a SetShardGroup. */ - class SetShardGroup implements ISetShardGroup { - - /** - * Constructs a new SetShardGroup. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.ISetShardGroup); - - /** SetShardGroup shardGroup. */ - public shardGroup?: (string|null); - - /** SetShardGroup _shardGroup. */ - public _shardGroup?: "shardGroup"; - - /** - * Creates a new SetShardGroup instance using the specified properties. - * @param [properties] Properties to set - * @returns SetShardGroup instance - */ - public static create(properties?: pyth_lazer_transaction.ISetShardGroup): pyth_lazer_transaction.SetShardGroup; - - /** - * Encodes the specified SetShardGroup message. Does not implicitly {@link pyth_lazer_transaction.SetShardGroup.verify|verify} messages. - * @param message SetShardGroup message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.ISetShardGroup, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetShardGroup message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetShardGroup.verify|verify} messages. - * @param message SetShardGroup message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.ISetShardGroup, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetShardGroup message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetShardGroup - * @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): pyth_lazer_transaction.SetShardGroup; - - /** - * Decodes a SetShardGroup message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetShardGroup - * @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)): pyth_lazer_transaction.SetShardGroup; - - /** - * Verifies a SetShardGroup 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 SetShardGroup message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetShardGroup - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.SetShardGroup; - - /** - * Creates a plain object from a SetShardGroup message. Also converts values to other types if specified. - * @param message SetShardGroup - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.SetShardGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetShardGroup to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetShardGroup - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ResetLastSequenceNo. */ - interface IResetLastSequenceNo { - - /** ResetLastSequenceNo lastSequenceNo */ - lastSequenceNo?: (number|Long|null); - } - - /** Represents a ResetLastSequenceNo. */ - class ResetLastSequenceNo implements IResetLastSequenceNo { - - /** - * Constructs a new ResetLastSequenceNo. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IResetLastSequenceNo); - - /** ResetLastSequenceNo lastSequenceNo. */ - public lastSequenceNo?: (number|Long|null); - - /** ResetLastSequenceNo _lastSequenceNo. */ - public _lastSequenceNo?: "lastSequenceNo"; - - /** - * Creates a new ResetLastSequenceNo instance using the specified properties. - * @param [properties] Properties to set - * @returns ResetLastSequenceNo instance - */ - public static create(properties?: pyth_lazer_transaction.IResetLastSequenceNo): pyth_lazer_transaction.ResetLastSequenceNo; - - /** - * Encodes the specified ResetLastSequenceNo message. Does not implicitly {@link pyth_lazer_transaction.ResetLastSequenceNo.verify|verify} messages. - * @param message ResetLastSequenceNo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IResetLastSequenceNo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResetLastSequenceNo message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ResetLastSequenceNo.verify|verify} messages. - * @param message ResetLastSequenceNo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IResetLastSequenceNo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResetLastSequenceNo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResetLastSequenceNo - * @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): pyth_lazer_transaction.ResetLastSequenceNo; - - /** - * Decodes a ResetLastSequenceNo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResetLastSequenceNo - * @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)): pyth_lazer_transaction.ResetLastSequenceNo; - - /** - * Verifies a ResetLastSequenceNo 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 ResetLastSequenceNo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResetLastSequenceNo - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.ResetLastSequenceNo; - - /** - * Creates a plain object from a ResetLastSequenceNo message. Also converts values to other types if specified. - * @param message ResetLastSequenceNo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.ResetLastSequenceNo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResetLastSequenceNo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResetLastSequenceNo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AddPublisher. */ - interface IAddPublisher { - - /** AddPublisher publisherId */ - publisherId?: (number|null); - - /** AddPublisher name */ - name?: (string|null); - - /** AddPublisher publicKeys */ - publicKeys?: (Uint8Array[]|null); - - /** AddPublisher isActive */ - isActive?: (boolean|null); - } - - /** Represents an AddPublisher. */ - class AddPublisher implements IAddPublisher { - - /** - * Constructs a new AddPublisher. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IAddPublisher); - - /** AddPublisher publisherId. */ - public publisherId?: (number|null); - - /** AddPublisher name. */ - public name?: (string|null); - - /** AddPublisher publicKeys. */ - public publicKeys: Uint8Array[]; - - /** AddPublisher isActive. */ - public isActive?: (boolean|null); - - /** AddPublisher _publisherId. */ - public _publisherId?: "publisherId"; - - /** AddPublisher _name. */ - public _name?: "name"; - - /** AddPublisher _isActive. */ - public _isActive?: "isActive"; - - /** - * Creates a new AddPublisher instance using the specified properties. - * @param [properties] Properties to set - * @returns AddPublisher instance - */ - public static create(properties?: pyth_lazer_transaction.IAddPublisher): pyth_lazer_transaction.AddPublisher; - - /** - * Encodes the specified AddPublisher message. Does not implicitly {@link pyth_lazer_transaction.AddPublisher.verify|verify} messages. - * @param message AddPublisher message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IAddPublisher, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AddPublisher message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddPublisher.verify|verify} messages. - * @param message AddPublisher message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IAddPublisher, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AddPublisher message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AddPublisher - * @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): pyth_lazer_transaction.AddPublisher; - - /** - * Decodes an AddPublisher message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AddPublisher - * @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)): pyth_lazer_transaction.AddPublisher; - - /** - * Verifies an AddPublisher 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 AddPublisher message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AddPublisher - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.AddPublisher; - - /** - * Creates a plain object from an AddPublisher message. Also converts values to other types if specified. - * @param message AddPublisher - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.AddPublisher, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AddPublisher to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AddPublisher - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdatePublisher. */ - interface IUpdatePublisher { - - /** UpdatePublisher publisherId */ - publisherId?: (number|null); - - /** UpdatePublisher setPublisherName */ - setPublisherName?: (pyth_lazer_transaction.ISetPublisherName|null); - - /** UpdatePublisher addPublisherPublicKeys */ - addPublisherPublicKeys?: (pyth_lazer_transaction.IAddPublisherPublicKeys|null); - - /** UpdatePublisher removePublisherPublicKeys */ - removePublisherPublicKeys?: (pyth_lazer_transaction.IRemovePublisherPublicKeys|null); - - /** UpdatePublisher setPublisherPublicKeys */ - setPublisherPublicKeys?: (pyth_lazer_transaction.ISetPublisherPublicKeys|null); - - /** UpdatePublisher setPublisherActive */ - setPublisherActive?: (pyth_lazer_transaction.ISetPublisherActive|null); - - /** UpdatePublisher removePublisher */ - removePublisher?: (google.protobuf.IEmpty|null); - } - - /** Represents an UpdatePublisher. */ - class UpdatePublisher implements IUpdatePublisher { - - /** - * Constructs a new UpdatePublisher. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IUpdatePublisher); - - /** UpdatePublisher publisherId. */ - public publisherId?: (number|null); - - /** UpdatePublisher setPublisherName. */ - public setPublisherName?: (pyth_lazer_transaction.ISetPublisherName|null); - - /** UpdatePublisher addPublisherPublicKeys. */ - public addPublisherPublicKeys?: (pyth_lazer_transaction.IAddPublisherPublicKeys|null); - - /** UpdatePublisher removePublisherPublicKeys. */ - public removePublisherPublicKeys?: (pyth_lazer_transaction.IRemovePublisherPublicKeys|null); - - /** UpdatePublisher setPublisherPublicKeys. */ - public setPublisherPublicKeys?: (pyth_lazer_transaction.ISetPublisherPublicKeys|null); - - /** UpdatePublisher setPublisherActive. */ - public setPublisherActive?: (pyth_lazer_transaction.ISetPublisherActive|null); - - /** UpdatePublisher removePublisher. */ - public removePublisher?: (google.protobuf.IEmpty|null); - - /** UpdatePublisher _publisherId. */ - public _publisherId?: "publisherId"; - - /** UpdatePublisher action. */ - public action?: ("setPublisherName"|"addPublisherPublicKeys"|"removePublisherPublicKeys"|"setPublisherPublicKeys"|"setPublisherActive"|"removePublisher"); - - /** - * Creates a new UpdatePublisher instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdatePublisher instance - */ - public static create(properties?: pyth_lazer_transaction.IUpdatePublisher): pyth_lazer_transaction.UpdatePublisher; - - /** - * Encodes the specified UpdatePublisher message. Does not implicitly {@link pyth_lazer_transaction.UpdatePublisher.verify|verify} messages. - * @param message UpdatePublisher message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IUpdatePublisher, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdatePublisher message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdatePublisher.verify|verify} messages. - * @param message UpdatePublisher message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IUpdatePublisher, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdatePublisher message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdatePublisher - * @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): pyth_lazer_transaction.UpdatePublisher; - - /** - * Decodes an UpdatePublisher message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdatePublisher - * @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)): pyth_lazer_transaction.UpdatePublisher; - - /** - * Verifies an UpdatePublisher 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 UpdatePublisher message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdatePublisher - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.UpdatePublisher; - - /** - * Creates a plain object from an UpdatePublisher message. Also converts values to other types if specified. - * @param message UpdatePublisher - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.UpdatePublisher, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdatePublisher to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdatePublisher - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetPublisherName. */ - interface ISetPublisherName { - - /** SetPublisherName name */ - name?: (string|null); - } - - /** Represents a SetPublisherName. */ - class SetPublisherName implements ISetPublisherName { - - /** - * Constructs a new SetPublisherName. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.ISetPublisherName); - - /** SetPublisherName name. */ - public name?: (string|null); - - /** SetPublisherName _name. */ - public _name?: "name"; - - /** - * Creates a new SetPublisherName instance using the specified properties. - * @param [properties] Properties to set - * @returns SetPublisherName instance - */ - public static create(properties?: pyth_lazer_transaction.ISetPublisherName): pyth_lazer_transaction.SetPublisherName; - - /** - * Encodes the specified SetPublisherName message. Does not implicitly {@link pyth_lazer_transaction.SetPublisherName.verify|verify} messages. - * @param message SetPublisherName message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.ISetPublisherName, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetPublisherName message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetPublisherName.verify|verify} messages. - * @param message SetPublisherName message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.ISetPublisherName, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetPublisherName message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetPublisherName - * @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): pyth_lazer_transaction.SetPublisherName; - - /** - * Decodes a SetPublisherName message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetPublisherName - * @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)): pyth_lazer_transaction.SetPublisherName; - - /** - * Verifies a SetPublisherName 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 SetPublisherName message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetPublisherName - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.SetPublisherName; - - /** - * Creates a plain object from a SetPublisherName message. Also converts values to other types if specified. - * @param message SetPublisherName - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.SetPublisherName, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetPublisherName to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetPublisherName - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AddPublisherPublicKeys. */ - interface IAddPublisherPublicKeys { - - /** AddPublisherPublicKeys publicKeys */ - publicKeys?: (Uint8Array[]|null); + /** Properties of a ShardGroups. */ + interface IShardGroups { + /** ShardGroups shardGroups */ + shardGroups?: string[] | null; } - /** Represents an AddPublisherPublicKeys. */ - class AddPublisherPublicKeys implements IAddPublisherPublicKeys { - - /** - * Constructs a new AddPublisherPublicKeys. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IAddPublisherPublicKeys); - - /** AddPublisherPublicKeys publicKeys. */ - public publicKeys: Uint8Array[]; - - /** - * Creates a new AddPublisherPublicKeys instance using the specified properties. - * @param [properties] Properties to set - * @returns AddPublisherPublicKeys instance - */ - public static create(properties?: pyth_lazer_transaction.IAddPublisherPublicKeys): pyth_lazer_transaction.AddPublisherPublicKeys; - - /** - * Encodes the specified AddPublisherPublicKeys message. Does not implicitly {@link pyth_lazer_transaction.AddPublisherPublicKeys.verify|verify} messages. - * @param message AddPublisherPublicKeys message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IAddPublisherPublicKeys, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AddPublisherPublicKeys message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddPublisherPublicKeys.verify|verify} messages. - * @param message AddPublisherPublicKeys message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IAddPublisherPublicKeys, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AddPublisherPublicKeys message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AddPublisherPublicKeys - * @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): pyth_lazer_transaction.AddPublisherPublicKeys; - - /** - * Decodes an AddPublisherPublicKeys message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AddPublisherPublicKeys - * @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)): pyth_lazer_transaction.AddPublisherPublicKeys; - - /** - * Verifies an AddPublisherPublicKeys 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 AddPublisherPublicKeys message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AddPublisherPublicKeys - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.AddPublisherPublicKeys; - - /** - * Creates a plain object from an AddPublisherPublicKeys message. Also converts values to other types if specified. - * @param message AddPublisherPublicKeys - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.AddPublisherPublicKeys, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AddPublisherPublicKeys to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AddPublisherPublicKeys - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** Represents a ShardGroups. */ + class ShardGroups implements IShardGroups { + /** + * Constructs a new ShardGroups. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ShardFilter.IShardGroups); + + /** ShardGroups shardGroups. */ + public shardGroups: string[]; + + /** + * Creates a new ShardGroups instance using the specified properties. + * @param [properties] Properties to set + * @returns ShardGroups instance + */ + public static create( + properties?: pyth_lazer_transaction.ShardFilter.IShardGroups, + ): pyth_lazer_transaction.ShardFilter.ShardGroups; + + /** + * Encodes the specified ShardGroups message. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardGroups.verify|verify} messages. + * @param message ShardGroups message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.ShardFilter.IShardGroups, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified ShardGroups message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardGroups.verify|verify} messages. + * @param message ShardGroups message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.ShardFilter.IShardGroups, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ShardGroups message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ShardGroups + * @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, + ): pyth_lazer_transaction.ShardFilter.ShardGroups; + + /** + * Decodes a ShardGroups message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ShardGroups + * @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, + ): pyth_lazer_transaction.ShardFilter.ShardGroups; + + /** + * Verifies a ShardGroups 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 ShardGroups message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ShardGroups + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.ShardFilter.ShardGroups; + + /** + * Creates a plain object from a ShardGroups message. Also converts values to other types if specified. + * @param message ShardGroups + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.ShardFilter.ShardGroups, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this ShardGroups to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ShardGroups + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } + } - /** Properties of a RemovePublisherPublicKeys. */ - interface IRemovePublisherPublicKeys { + /** Properties of a GovernanceDirective. */ + interface IGovernanceDirective { + /** GovernanceDirective shardFilter */ + shardFilter?: pyth_lazer_transaction.IShardFilter | null; - /** RemovePublisherPublicKeys publicKeys */ - publicKeys?: (Uint8Array[]|null); - } + /** GovernanceDirective createShard */ + createShard?: pyth_lazer_transaction.ICreateShard | null; - /** Represents a RemovePublisherPublicKeys. */ - class RemovePublisherPublicKeys implements IRemovePublisherPublicKeys { - - /** - * Constructs a new RemovePublisherPublicKeys. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IRemovePublisherPublicKeys); - - /** RemovePublisherPublicKeys publicKeys. */ - public publicKeys: Uint8Array[]; - - /** - * Creates a new RemovePublisherPublicKeys instance using the specified properties. - * @param [properties] Properties to set - * @returns RemovePublisherPublicKeys instance - */ - public static create(properties?: pyth_lazer_transaction.IRemovePublisherPublicKeys): pyth_lazer_transaction.RemovePublisherPublicKeys; - - /** - * Encodes the specified RemovePublisherPublicKeys message. Does not implicitly {@link pyth_lazer_transaction.RemovePublisherPublicKeys.verify|verify} messages. - * @param message RemovePublisherPublicKeys message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IRemovePublisherPublicKeys, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RemovePublisherPublicKeys message, length delimited. Does not implicitly {@link pyth_lazer_transaction.RemovePublisherPublicKeys.verify|verify} messages. - * @param message RemovePublisherPublicKeys message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IRemovePublisherPublicKeys, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RemovePublisherPublicKeys message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RemovePublisherPublicKeys - * @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): pyth_lazer_transaction.RemovePublisherPublicKeys; - - /** - * Decodes a RemovePublisherPublicKeys message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RemovePublisherPublicKeys - * @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)): pyth_lazer_transaction.RemovePublisherPublicKeys; - - /** - * Verifies a RemovePublisherPublicKeys 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 RemovePublisherPublicKeys message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RemovePublisherPublicKeys - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.RemovePublisherPublicKeys; - - /** - * Creates a plain object from a RemovePublisherPublicKeys message. Also converts values to other types if specified. - * @param message RemovePublisherPublicKeys - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.RemovePublisherPublicKeys, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RemovePublisherPublicKeys to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RemovePublisherPublicKeys - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** GovernanceDirective addGovernanceSource */ + addGovernanceSource?: pyth_lazer_transaction.IAddGovernanceSource | null; + + /** GovernanceDirective updateGovernanceSource */ + updateGovernanceSource?: pyth_lazer_transaction.IUpdateGovernanceSource | null; + + /** GovernanceDirective setShardName */ + setShardName?: pyth_lazer_transaction.ISetShardName | null; + + /** GovernanceDirective setShardGroup */ + setShardGroup?: pyth_lazer_transaction.ISetShardGroup | null; + + /** GovernanceDirective resetLastSequenceNo */ + resetLastSequenceNo?: pyth_lazer_transaction.IResetLastSequenceNo | null; + + /** GovernanceDirective addPublisher */ + addPublisher?: pyth_lazer_transaction.IAddPublisher | null; + + /** GovernanceDirective updatePublisher */ + updatePublisher?: pyth_lazer_transaction.IUpdatePublisher | null; + + /** GovernanceDirective addFeed */ + addFeed?: pyth_lazer_transaction.IAddFeed | null; + + /** GovernanceDirective updateFeed */ + updateFeed?: pyth_lazer_transaction.IUpdateFeed | null; + } + + /** Represents a GovernanceDirective. */ + class GovernanceDirective implements IGovernanceDirective { + /** + * Constructs a new GovernanceDirective. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IGovernanceDirective); + + /** GovernanceDirective shardFilter. */ + public shardFilter?: pyth_lazer_transaction.IShardFilter | null; + + /** GovernanceDirective createShard. */ + public createShard?: pyth_lazer_transaction.ICreateShard | null; + + /** GovernanceDirective addGovernanceSource. */ + public addGovernanceSource?: pyth_lazer_transaction.IAddGovernanceSource | null; + + /** GovernanceDirective updateGovernanceSource. */ + public updateGovernanceSource?: pyth_lazer_transaction.IUpdateGovernanceSource | null; + + /** GovernanceDirective setShardName. */ + public setShardName?: pyth_lazer_transaction.ISetShardName | null; + + /** GovernanceDirective setShardGroup. */ + public setShardGroup?: pyth_lazer_transaction.ISetShardGroup | null; + + /** GovernanceDirective resetLastSequenceNo. */ + public resetLastSequenceNo?: pyth_lazer_transaction.IResetLastSequenceNo | null; + + /** GovernanceDirective addPublisher. */ + public addPublisher?: pyth_lazer_transaction.IAddPublisher | null; + + /** GovernanceDirective updatePublisher. */ + public updatePublisher?: pyth_lazer_transaction.IUpdatePublisher | null; + + /** GovernanceDirective addFeed. */ + public addFeed?: pyth_lazer_transaction.IAddFeed | null; + + /** GovernanceDirective updateFeed. */ + public updateFeed?: pyth_lazer_transaction.IUpdateFeed | null; + + /** GovernanceDirective _shardFilter. */ + public _shardFilter?: "shardFilter"; + + /** GovernanceDirective action. */ + public action?: + | "createShard" + | "addGovernanceSource" + | "updateGovernanceSource" + | "setShardName" + | "setShardGroup" + | "resetLastSequenceNo" + | "addPublisher" + | "updatePublisher" + | "addFeed" + | "updateFeed"; + + /** + * Creates a new GovernanceDirective instance using the specified properties. + * @param [properties] Properties to set + * @returns GovernanceDirective instance + */ + public static create( + properties?: pyth_lazer_transaction.IGovernanceDirective, + ): pyth_lazer_transaction.GovernanceDirective; + + /** + * Encodes the specified GovernanceDirective message. Does not implicitly {@link pyth_lazer_transaction.GovernanceDirective.verify|verify} messages. + * @param message GovernanceDirective message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IGovernanceDirective, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified GovernanceDirective message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceDirective.verify|verify} messages. + * @param message GovernanceDirective message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IGovernanceDirective, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a GovernanceDirective message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GovernanceDirective + * @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, + ): pyth_lazer_transaction.GovernanceDirective; + + /** + * Decodes a GovernanceDirective message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GovernanceDirective + * @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, + ): pyth_lazer_transaction.GovernanceDirective; + + /** + * Verifies a GovernanceDirective 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 GovernanceDirective message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GovernanceDirective + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.GovernanceDirective; + + /** + * Creates a plain object from a GovernanceDirective message. Also converts values to other types if specified. + * @param message GovernanceDirective + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.GovernanceDirective, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this GovernanceDirective to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GovernanceDirective + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Permissions. */ + interface IPermissions { + /** Permissions allActions */ + allActions?: boolean | null; + + /** Permissions shardActions */ + shardActions?: pyth_lazer_transaction.Permissions.ShardAction[] | null; + + /** Permissions allUpdateGovernanceSourceActions */ + allUpdateGovernanceSourceActions?: boolean | null; + + /** Permissions updateGovernanceSourceActions */ + updateGovernanceSourceActions?: + | pyth_lazer_transaction.Permissions.UpdateGovernanceSourceAction[] + | null; + + /** Permissions allUpdatePublisherAction */ + allUpdatePublisherAction?: boolean | null; + + /** Permissions updatePublisherActions */ + updatePublisherActions?: + | pyth_lazer_transaction.Permissions.UpdatePublisherAction[] + | null; + + /** Permissions allUpdateFeedActions */ + allUpdateFeedActions?: boolean | null; + + /** Permissions updateFeedActions */ + updateFeedActions?: + | pyth_lazer_transaction.Permissions.UpdateFeedAction[] + | null; + } + + /** Represents a Permissions. */ + class Permissions implements IPermissions { + /** + * Constructs a new Permissions. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IPermissions); + + /** Permissions allActions. */ + public allActions?: boolean | null; + + /** Permissions shardActions. */ + public shardActions: pyth_lazer_transaction.Permissions.ShardAction[]; + + /** Permissions allUpdateGovernanceSourceActions. */ + public allUpdateGovernanceSourceActions?: boolean | null; + + /** Permissions updateGovernanceSourceActions. */ + public updateGovernanceSourceActions: pyth_lazer_transaction.Permissions.UpdateGovernanceSourceAction[]; + + /** Permissions allUpdatePublisherAction. */ + public allUpdatePublisherAction?: boolean | null; + + /** Permissions updatePublisherActions. */ + public updatePublisherActions: pyth_lazer_transaction.Permissions.UpdatePublisherAction[]; + + /** Permissions allUpdateFeedActions. */ + public allUpdateFeedActions?: boolean | null; + + /** Permissions updateFeedActions. */ + public updateFeedActions: pyth_lazer_transaction.Permissions.UpdateFeedAction[]; + + /** Permissions _allActions. */ + public _allActions?: "allActions"; + + /** Permissions _allUpdateGovernanceSourceActions. */ + public _allUpdateGovernanceSourceActions?: "allUpdateGovernanceSourceActions"; + + /** Permissions _allUpdatePublisherAction. */ + public _allUpdatePublisherAction?: "allUpdatePublisherAction"; + + /** Permissions _allUpdateFeedActions. */ + public _allUpdateFeedActions?: "allUpdateFeedActions"; + + /** + * Creates a new Permissions instance using the specified properties. + * @param [properties] Properties to set + * @returns Permissions instance + */ + public static create( + properties?: pyth_lazer_transaction.IPermissions, + ): pyth_lazer_transaction.Permissions; + + /** + * Encodes the specified Permissions message. Does not implicitly {@link pyth_lazer_transaction.Permissions.verify|verify} messages. + * @param message Permissions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IPermissions, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified Permissions message, length delimited. Does not implicitly {@link pyth_lazer_transaction.Permissions.verify|verify} messages. + * @param message Permissions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IPermissions, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a Permissions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Permissions + * @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, + ): pyth_lazer_transaction.Permissions; + + /** + * Decodes a Permissions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Permissions + * @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, + ): pyth_lazer_transaction.Permissions; + + /** + * Verifies a Permissions 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 Permissions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Permissions + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.Permissions; + + /** + * Creates a plain object from a Permissions message. Also converts values to other types if specified. + * @param message Permissions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.Permissions, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Permissions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Permissions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Permissions { + /** ShardAction enum. */ + enum ShardAction { + SHARD_ACTION_UNSPECIFIED = 0, + CREATE_SHARD = 101, + ADD_GOVERNANCE_SOURCE = 102, + UPDATE_GOVERNANCE_SOURCE = 103, + SET_SHARD_NAME = 104, + SET_SHARD_GROUP = 105, + RESET_LAST_SEQUENCE_NO = 106, + ADD_PUBLISHER = 107, + ADD_FEED = 109, } - /** Properties of a SetPublisherPublicKeys. */ - interface ISetPublisherPublicKeys { - - /** SetPublisherPublicKeys publicKeys */ - publicKeys?: (Uint8Array[]|null); + /** UpdateGovernanceSourceAction enum. */ + enum UpdateGovernanceSourceAction { + UPDATE_GOVERNANCE_SOURCE_ACTION_UNSPECIFIED = 0, + SET_GOVERNANCE_SOURCE_PERMISSIONS = 101, + REMOVE_GOVERNANCE_SOURCE = 199, } - /** Represents a SetPublisherPublicKeys. */ - class SetPublisherPublicKeys implements ISetPublisherPublicKeys { - - /** - * Constructs a new SetPublisherPublicKeys. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.ISetPublisherPublicKeys); - - /** SetPublisherPublicKeys publicKeys. */ - public publicKeys: Uint8Array[]; - - /** - * Creates a new SetPublisherPublicKeys instance using the specified properties. - * @param [properties] Properties to set - * @returns SetPublisherPublicKeys instance - */ - public static create(properties?: pyth_lazer_transaction.ISetPublisherPublicKeys): pyth_lazer_transaction.SetPublisherPublicKeys; - - /** - * Encodes the specified SetPublisherPublicKeys message. Does not implicitly {@link pyth_lazer_transaction.SetPublisherPublicKeys.verify|verify} messages. - * @param message SetPublisherPublicKeys message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.ISetPublisherPublicKeys, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetPublisherPublicKeys message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetPublisherPublicKeys.verify|verify} messages. - * @param message SetPublisherPublicKeys message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.ISetPublisherPublicKeys, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetPublisherPublicKeys message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetPublisherPublicKeys - * @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): pyth_lazer_transaction.SetPublisherPublicKeys; - - /** - * Decodes a SetPublisherPublicKeys message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetPublisherPublicKeys - * @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)): pyth_lazer_transaction.SetPublisherPublicKeys; - - /** - * Verifies a SetPublisherPublicKeys 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 SetPublisherPublicKeys message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetPublisherPublicKeys - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.SetPublisherPublicKeys; - - /** - * Creates a plain object from a SetPublisherPublicKeys message. Also converts values to other types if specified. - * @param message SetPublisherPublicKeys - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.SetPublisherPublicKeys, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetPublisherPublicKeys to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetPublisherPublicKeys - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** UpdatePublisherAction enum. */ + enum UpdatePublisherAction { + UPDATE_PUBLISHER_ACTION_UNSPECIFIED = 0, + SET_PUBLISHER_NAME = 101, + ADD_PUBLISHER_PUBLIC_KEYS = 102, + REMOVE_PUBLISHER_PUBLIC_KEYS = 103, + SET_PUBLISHER_PUBLIC_KEYS = 104, + SET_PUBLISHER_ACTIVE = 105, + REMOVE_PUBLISHER = 199, } - /** Properties of a SetPublisherActive. */ - interface ISetPublisherActive { - - /** SetPublisherActive isActive */ - isActive?: (boolean|null); + /** UpdateFeedAction enum. */ + enum UpdateFeedAction { + UPDATE_FEED_ACTION_UNSPECIFIED = 0, + UPDATE_FEED_METADATA = 101, + ACTIVATE_FEED = 102, + DEACTIVATE_FEED = 103, + REMOVE_FEED = 199, } - - /** Represents a SetPublisherActive. */ - class SetPublisherActive implements ISetPublisherActive { - - /** - * Constructs a new SetPublisherActive. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.ISetPublisherActive); - - /** SetPublisherActive isActive. */ - public isActive?: (boolean|null); - - /** SetPublisherActive _isActive. */ - public _isActive?: "isActive"; - - /** - * Creates a new SetPublisherActive instance using the specified properties. - * @param [properties] Properties to set - * @returns SetPublisherActive instance - */ - public static create(properties?: pyth_lazer_transaction.ISetPublisherActive): pyth_lazer_transaction.SetPublisherActive; - - /** - * Encodes the specified SetPublisherActive message. Does not implicitly {@link pyth_lazer_transaction.SetPublisherActive.verify|verify} messages. - * @param message SetPublisherActive message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.ISetPublisherActive, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetPublisherActive message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetPublisherActive.verify|verify} messages. - * @param message SetPublisherActive message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.ISetPublisherActive, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetPublisherActive message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetPublisherActive - * @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): pyth_lazer_transaction.SetPublisherActive; - - /** - * Decodes a SetPublisherActive message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetPublisherActive - * @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)): pyth_lazer_transaction.SetPublisherActive; - - /** - * Verifies a SetPublisherActive 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 SetPublisherActive message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetPublisherActive - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.SetPublisherActive; - - /** - * Creates a plain object from a SetPublisherActive message. Also converts values to other types if specified. - * @param message SetPublisherActive - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.SetPublisherActive, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetPublisherActive to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetPublisherActive - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GovernanceSource. */ + interface IGovernanceSource { + /** GovernanceSource singleEd25519 */ + singleEd25519?: pyth_lazer_transaction.GovernanceSource.ISingleEd25519 | null; + } + + /** Represents a GovernanceSource. */ + class GovernanceSource implements IGovernanceSource { + /** + * Constructs a new GovernanceSource. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IGovernanceSource); + + /** GovernanceSource singleEd25519. */ + public singleEd25519?: pyth_lazer_transaction.GovernanceSource.ISingleEd25519 | null; + + /** GovernanceSource source. */ + public source?: "singleEd25519"; + + /** + * Creates a new GovernanceSource instance using the specified properties. + * @param [properties] Properties to set + * @returns GovernanceSource instance + */ + public static create( + properties?: pyth_lazer_transaction.IGovernanceSource, + ): pyth_lazer_transaction.GovernanceSource; + + /** + * Encodes the specified GovernanceSource message. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.verify|verify} messages. + * @param message GovernanceSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IGovernanceSource, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified GovernanceSource message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.verify|verify} messages. + * @param message GovernanceSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IGovernanceSource, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a GovernanceSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GovernanceSource + * @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, + ): pyth_lazer_transaction.GovernanceSource; + + /** + * Decodes a GovernanceSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GovernanceSource + * @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, + ): pyth_lazer_transaction.GovernanceSource; + + /** + * Verifies a GovernanceSource 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 GovernanceSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GovernanceSource + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.GovernanceSource; + + /** + * Creates a plain object from a GovernanceSource message. Also converts values to other types if specified. + * @param message GovernanceSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.GovernanceSource, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this GovernanceSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GovernanceSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GovernanceSource { + /** Properties of a SingleEd25519. */ + interface ISingleEd25519 { + /** SingleEd25519 publicKey */ + publicKey?: Uint8Array | null; } - /** Properties of an AddFeed. */ - interface IAddFeed { - - /** AddFeed priceFeedId */ - priceFeedId?: (number|null); - - /** AddFeed metadata */ - metadata?: (pyth_lazer_transaction.DynamicValue.IMap|null); - - /** AddFeed permissionedPublishers */ - permissionedPublishers?: (number[]|null); + /** Represents a SingleEd25519. */ + class SingleEd25519 implements ISingleEd25519 { + /** + * Constructs a new SingleEd25519. + * @param [properties] Properties to set + */ + constructor( + properties?: pyth_lazer_transaction.GovernanceSource.ISingleEd25519, + ); + + /** SingleEd25519 publicKey. */ + public publicKey?: Uint8Array | null; + + /** SingleEd25519 _publicKey. */ + public _publicKey?: "publicKey"; + + /** + * Creates a new SingleEd25519 instance using the specified properties. + * @param [properties] Properties to set + * @returns SingleEd25519 instance + */ + public static create( + properties?: pyth_lazer_transaction.GovernanceSource.ISingleEd25519, + ): pyth_lazer_transaction.GovernanceSource.SingleEd25519; + + /** + * Encodes the specified SingleEd25519 message. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.SingleEd25519.verify|verify} messages. + * @param message SingleEd25519 message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.GovernanceSource.ISingleEd25519, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified SingleEd25519 message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.SingleEd25519.verify|verify} messages. + * @param message SingleEd25519 message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.GovernanceSource.ISingleEd25519, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a SingleEd25519 message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SingleEd25519 + * @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, + ): pyth_lazer_transaction.GovernanceSource.SingleEd25519; + + /** + * Decodes a SingleEd25519 message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SingleEd25519 + * @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, + ): pyth_lazer_transaction.GovernanceSource.SingleEd25519; + + /** + * Verifies a SingleEd25519 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 SingleEd25519 message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SingleEd25519 + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.GovernanceSource.SingleEd25519; + + /** + * Creates a plain object from a SingleEd25519 message. Also converts values to other types if specified. + * @param message SingleEd25519 + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.GovernanceSource.SingleEd25519, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this SingleEd25519 to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SingleEd25519 + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - - /** Represents an AddFeed. */ - class AddFeed implements IAddFeed { - - /** - * Constructs a new AddFeed. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IAddFeed); - - /** AddFeed priceFeedId. */ - public priceFeedId?: (number|null); - - /** AddFeed metadata. */ - public metadata?: (pyth_lazer_transaction.DynamicValue.IMap|null); - - /** AddFeed permissionedPublishers. */ - public permissionedPublishers: number[]; - - /** AddFeed _priceFeedId. */ - public _priceFeedId?: "priceFeedId"; - - /** AddFeed _metadata. */ - public _metadata?: "metadata"; - - /** - * Creates a new AddFeed instance using the specified properties. - * @param [properties] Properties to set - * @returns AddFeed instance - */ - public static create(properties?: pyth_lazer_transaction.IAddFeed): pyth_lazer_transaction.AddFeed; - - /** - * Encodes the specified AddFeed message. Does not implicitly {@link pyth_lazer_transaction.AddFeed.verify|verify} messages. - * @param message AddFeed message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IAddFeed, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AddFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddFeed.verify|verify} messages. - * @param message AddFeed message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IAddFeed, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AddFeed message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AddFeed - * @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): pyth_lazer_transaction.AddFeed; - - /** - * Decodes an AddFeed message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AddFeed - * @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)): pyth_lazer_transaction.AddFeed; - - /** - * Verifies an AddFeed 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 AddFeed message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AddFeed - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.AddFeed; - - /** - * Creates a plain object from an AddFeed message. Also converts values to other types if specified. - * @param message AddFeed - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.AddFeed, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AddFeed to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AddFeed - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateShard. */ + interface ICreateShard { + /** CreateShard shardId */ + shardId?: number | null; + + /** CreateShard shardGroup */ + shardGroup?: string | null; + + /** CreateShard minRate */ + minRate?: google.protobuf.IDuration | null; + } + + /** Represents a CreateShard. */ + class CreateShard implements ICreateShard { + /** + * Constructs a new CreateShard. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ICreateShard); + + /** CreateShard shardId. */ + public shardId?: number | null; + + /** CreateShard shardGroup. */ + public shardGroup?: string | null; + + /** CreateShard minRate. */ + public minRate?: google.protobuf.IDuration | null; + + /** CreateShard _shardId. */ + public _shardId?: "shardId"; + + /** CreateShard _shardGroup. */ + public _shardGroup?: "shardGroup"; + + /** CreateShard _minRate. */ + public _minRate?: "minRate"; + + /** + * Creates a new CreateShard instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateShard instance + */ + public static create( + properties?: pyth_lazer_transaction.ICreateShard, + ): pyth_lazer_transaction.CreateShard; + + /** + * Encodes the specified CreateShard message. Does not implicitly {@link pyth_lazer_transaction.CreateShard.verify|verify} messages. + * @param message CreateShard message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.ICreateShard, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified CreateShard message, length delimited. Does not implicitly {@link pyth_lazer_transaction.CreateShard.verify|verify} messages. + * @param message CreateShard message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.ICreateShard, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a CreateShard message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateShard + * @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, + ): pyth_lazer_transaction.CreateShard; + + /** + * Decodes a CreateShard message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateShard + * @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, + ): pyth_lazer_transaction.CreateShard; + + /** + * Verifies a CreateShard 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 CreateShard message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateShard + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.CreateShard; + + /** + * Creates a plain object from a CreateShard message. Also converts values to other types if specified. + * @param message CreateShard + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.CreateShard, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this CreateShard to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateShard + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AddGovernanceSource. */ + interface IAddGovernanceSource { + /** AddGovernanceSource newSource */ + newSource?: pyth_lazer_transaction.IGovernanceSource | null; + + /** AddGovernanceSource permissions */ + permissions?: pyth_lazer_transaction.IPermissions | null; + } + + /** Represents an AddGovernanceSource. */ + class AddGovernanceSource implements IAddGovernanceSource { + /** + * Constructs a new AddGovernanceSource. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IAddGovernanceSource); + + /** AddGovernanceSource newSource. */ + public newSource?: pyth_lazer_transaction.IGovernanceSource | null; + + /** AddGovernanceSource permissions. */ + public permissions?: pyth_lazer_transaction.IPermissions | null; + + /** AddGovernanceSource _newSource. */ + public _newSource?: "newSource"; + + /** AddGovernanceSource _permissions. */ + public _permissions?: "permissions"; + + /** + * Creates a new AddGovernanceSource instance using the specified properties. + * @param [properties] Properties to set + * @returns AddGovernanceSource instance + */ + public static create( + properties?: pyth_lazer_transaction.IAddGovernanceSource, + ): pyth_lazer_transaction.AddGovernanceSource; + + /** + * Encodes the specified AddGovernanceSource message. Does not implicitly {@link pyth_lazer_transaction.AddGovernanceSource.verify|verify} messages. + * @param message AddGovernanceSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IAddGovernanceSource, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified AddGovernanceSource message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddGovernanceSource.verify|verify} messages. + * @param message AddGovernanceSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IAddGovernanceSource, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes an AddGovernanceSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AddGovernanceSource + * @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, + ): pyth_lazer_transaction.AddGovernanceSource; + + /** + * Decodes an AddGovernanceSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AddGovernanceSource + * @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, + ): pyth_lazer_transaction.AddGovernanceSource; + + /** + * Verifies an AddGovernanceSource 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 AddGovernanceSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AddGovernanceSource + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.AddGovernanceSource; + + /** + * Creates a plain object from an AddGovernanceSource message. Also converts values to other types if specified. + * @param message AddGovernanceSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.AddGovernanceSource, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this AddGovernanceSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AddGovernanceSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateGovernanceSource. */ + interface IUpdateGovernanceSource { + /** UpdateGovernanceSource source */ + source?: pyth_lazer_transaction.IGovernanceSource | null; + + /** UpdateGovernanceSource setGovernanceSourcePermissions */ + setGovernanceSourcePermissions?: pyth_lazer_transaction.ISetGovernanceSourcePermissions | null; + + /** UpdateGovernanceSource removeGovernanceSource */ + removeGovernanceSource?: google.protobuf.IEmpty | null; + } + + /** Represents an UpdateGovernanceSource. */ + class UpdateGovernanceSource implements IUpdateGovernanceSource { + /** + * Constructs a new UpdateGovernanceSource. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IUpdateGovernanceSource); + + /** UpdateGovernanceSource source. */ + public source?: pyth_lazer_transaction.IGovernanceSource | null; + + /** UpdateGovernanceSource setGovernanceSourcePermissions. */ + public setGovernanceSourcePermissions?: pyth_lazer_transaction.ISetGovernanceSourcePermissions | null; + + /** UpdateGovernanceSource removeGovernanceSource. */ + public removeGovernanceSource?: google.protobuf.IEmpty | null; + + /** UpdateGovernanceSource _source. */ + public _source?: "source"; + + /** UpdateGovernanceSource action. */ + public action?: "setGovernanceSourcePermissions" | "removeGovernanceSource"; + + /** + * Creates a new UpdateGovernanceSource instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateGovernanceSource instance + */ + public static create( + properties?: pyth_lazer_transaction.IUpdateGovernanceSource, + ): pyth_lazer_transaction.UpdateGovernanceSource; + + /** + * Encodes the specified UpdateGovernanceSource message. Does not implicitly {@link pyth_lazer_transaction.UpdateGovernanceSource.verify|verify} messages. + * @param message UpdateGovernanceSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IUpdateGovernanceSource, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified UpdateGovernanceSource message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdateGovernanceSource.verify|verify} messages. + * @param message UpdateGovernanceSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IUpdateGovernanceSource, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes an UpdateGovernanceSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateGovernanceSource + * @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, + ): pyth_lazer_transaction.UpdateGovernanceSource; + + /** + * Decodes an UpdateGovernanceSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateGovernanceSource + * @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, + ): pyth_lazer_transaction.UpdateGovernanceSource; + + /** + * Verifies an UpdateGovernanceSource 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 UpdateGovernanceSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateGovernanceSource + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.UpdateGovernanceSource; + + /** + * Creates a plain object from an UpdateGovernanceSource message. Also converts values to other types if specified. + * @param message UpdateGovernanceSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.UpdateGovernanceSource, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this UpdateGovernanceSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateGovernanceSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetGovernanceSourcePermissions. */ + interface ISetGovernanceSourcePermissions { + /** SetGovernanceSourcePermissions permissions */ + permissions?: pyth_lazer_transaction.IPermissions | null; + } + + /** Represents a SetGovernanceSourcePermissions. */ + class SetGovernanceSourcePermissions + implements ISetGovernanceSourcePermissions + { + /** + * Constructs a new SetGovernanceSourcePermissions. + * @param [properties] Properties to set + */ + constructor( + properties?: pyth_lazer_transaction.ISetGovernanceSourcePermissions, + ); + + /** SetGovernanceSourcePermissions permissions. */ + public permissions?: pyth_lazer_transaction.IPermissions | null; + + /** SetGovernanceSourcePermissions _permissions. */ + public _permissions?: "permissions"; + + /** + * Creates a new SetGovernanceSourcePermissions instance using the specified properties. + * @param [properties] Properties to set + * @returns SetGovernanceSourcePermissions instance + */ + public static create( + properties?: pyth_lazer_transaction.ISetGovernanceSourcePermissions, + ): pyth_lazer_transaction.SetGovernanceSourcePermissions; + + /** + * Encodes the specified SetGovernanceSourcePermissions message. Does not implicitly {@link pyth_lazer_transaction.SetGovernanceSourcePermissions.verify|verify} messages. + * @param message SetGovernanceSourcePermissions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.ISetGovernanceSourcePermissions, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified SetGovernanceSourcePermissions message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetGovernanceSourcePermissions.verify|verify} messages. + * @param message SetGovernanceSourcePermissions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.ISetGovernanceSourcePermissions, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a SetGovernanceSourcePermissions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetGovernanceSourcePermissions + * @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, + ): pyth_lazer_transaction.SetGovernanceSourcePermissions; + + /** + * Decodes a SetGovernanceSourcePermissions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetGovernanceSourcePermissions + * @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, + ): pyth_lazer_transaction.SetGovernanceSourcePermissions; + + /** + * Verifies a SetGovernanceSourcePermissions 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 SetGovernanceSourcePermissions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetGovernanceSourcePermissions + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.SetGovernanceSourcePermissions; + + /** + * Creates a plain object from a SetGovernanceSourcePermissions message. Also converts values to other types if specified. + * @param message SetGovernanceSourcePermissions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.SetGovernanceSourcePermissions, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this SetGovernanceSourcePermissions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetGovernanceSourcePermissions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetShardName. */ + interface ISetShardName { + /** SetShardName shardName */ + shardName?: string | null; + } + + /** Represents a SetShardName. */ + class SetShardName implements ISetShardName { + /** + * Constructs a new SetShardName. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ISetShardName); + + /** SetShardName shardName. */ + public shardName?: string | null; + + /** SetShardName _shardName. */ + public _shardName?: "shardName"; + + /** + * Creates a new SetShardName instance using the specified properties. + * @param [properties] Properties to set + * @returns SetShardName instance + */ + public static create( + properties?: pyth_lazer_transaction.ISetShardName, + ): pyth_lazer_transaction.SetShardName; + + /** + * Encodes the specified SetShardName message. Does not implicitly {@link pyth_lazer_transaction.SetShardName.verify|verify} messages. + * @param message SetShardName message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.ISetShardName, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified SetShardName message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetShardName.verify|verify} messages. + * @param message SetShardName message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.ISetShardName, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a SetShardName message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetShardName + * @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, + ): pyth_lazer_transaction.SetShardName; + + /** + * Decodes a SetShardName message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetShardName + * @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, + ): pyth_lazer_transaction.SetShardName; + + /** + * Verifies a SetShardName 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 SetShardName message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetShardName + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.SetShardName; + + /** + * Creates a plain object from a SetShardName message. Also converts values to other types if specified. + * @param message SetShardName + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.SetShardName, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this SetShardName to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetShardName + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetShardGroup. */ + interface ISetShardGroup { + /** SetShardGroup shardGroup */ + shardGroup?: string | null; + } + + /** Represents a SetShardGroup. */ + class SetShardGroup implements ISetShardGroup { + /** + * Constructs a new SetShardGroup. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ISetShardGroup); + + /** SetShardGroup shardGroup. */ + public shardGroup?: string | null; + + /** SetShardGroup _shardGroup. */ + public _shardGroup?: "shardGroup"; + + /** + * Creates a new SetShardGroup instance using the specified properties. + * @param [properties] Properties to set + * @returns SetShardGroup instance + */ + public static create( + properties?: pyth_lazer_transaction.ISetShardGroup, + ): pyth_lazer_transaction.SetShardGroup; + + /** + * Encodes the specified SetShardGroup message. Does not implicitly {@link pyth_lazer_transaction.SetShardGroup.verify|verify} messages. + * @param message SetShardGroup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.ISetShardGroup, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified SetShardGroup message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetShardGroup.verify|verify} messages. + * @param message SetShardGroup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.ISetShardGroup, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a SetShardGroup message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetShardGroup + * @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, + ): pyth_lazer_transaction.SetShardGroup; + + /** + * Decodes a SetShardGroup message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetShardGroup + * @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, + ): pyth_lazer_transaction.SetShardGroup; + + /** + * Verifies a SetShardGroup 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 SetShardGroup message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetShardGroup + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.SetShardGroup; + + /** + * Creates a plain object from a SetShardGroup message. Also converts values to other types if specified. + * @param message SetShardGroup + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.SetShardGroup, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this SetShardGroup to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetShardGroup + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ResetLastSequenceNo. */ + interface IResetLastSequenceNo { + /** ResetLastSequenceNo lastSequenceNo */ + lastSequenceNo?: number | Long | null; + } + + /** Represents a ResetLastSequenceNo. */ + class ResetLastSequenceNo implements IResetLastSequenceNo { + /** + * Constructs a new ResetLastSequenceNo. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IResetLastSequenceNo); + + /** ResetLastSequenceNo lastSequenceNo. */ + public lastSequenceNo?: number | Long | null; + + /** ResetLastSequenceNo _lastSequenceNo. */ + public _lastSequenceNo?: "lastSequenceNo"; + + /** + * Creates a new ResetLastSequenceNo instance using the specified properties. + * @param [properties] Properties to set + * @returns ResetLastSequenceNo instance + */ + public static create( + properties?: pyth_lazer_transaction.IResetLastSequenceNo, + ): pyth_lazer_transaction.ResetLastSequenceNo; + + /** + * Encodes the specified ResetLastSequenceNo message. Does not implicitly {@link pyth_lazer_transaction.ResetLastSequenceNo.verify|verify} messages. + * @param message ResetLastSequenceNo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IResetLastSequenceNo, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified ResetLastSequenceNo message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ResetLastSequenceNo.verify|verify} messages. + * @param message ResetLastSequenceNo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IResetLastSequenceNo, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ResetLastSequenceNo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResetLastSequenceNo + * @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, + ): pyth_lazer_transaction.ResetLastSequenceNo; + + /** + * Decodes a ResetLastSequenceNo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResetLastSequenceNo + * @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, + ): pyth_lazer_transaction.ResetLastSequenceNo; + + /** + * Verifies a ResetLastSequenceNo 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 ResetLastSequenceNo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResetLastSequenceNo + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.ResetLastSequenceNo; + + /** + * Creates a plain object from a ResetLastSequenceNo message. Also converts values to other types if specified. + * @param message ResetLastSequenceNo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.ResetLastSequenceNo, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this ResetLastSequenceNo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResetLastSequenceNo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AddPublisher. */ + interface IAddPublisher { + /** AddPublisher publisherId */ + publisherId?: number | null; + + /** AddPublisher name */ + name?: string | null; + + /** AddPublisher publicKeys */ + publicKeys?: Uint8Array[] | null; + + /** AddPublisher isActive */ + isActive?: boolean | null; + } + + /** Represents an AddPublisher. */ + class AddPublisher implements IAddPublisher { + /** + * Constructs a new AddPublisher. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IAddPublisher); + + /** AddPublisher publisherId. */ + public publisherId?: number | null; + + /** AddPublisher name. */ + public name?: string | null; + + /** AddPublisher publicKeys. */ + public publicKeys: Uint8Array[]; + + /** AddPublisher isActive. */ + public isActive?: boolean | null; + + /** AddPublisher _publisherId. */ + public _publisherId?: "publisherId"; + + /** AddPublisher _name. */ + public _name?: "name"; + + /** AddPublisher _isActive. */ + public _isActive?: "isActive"; + + /** + * Creates a new AddPublisher instance using the specified properties. + * @param [properties] Properties to set + * @returns AddPublisher instance + */ + public static create( + properties?: pyth_lazer_transaction.IAddPublisher, + ): pyth_lazer_transaction.AddPublisher; + + /** + * Encodes the specified AddPublisher message. Does not implicitly {@link pyth_lazer_transaction.AddPublisher.verify|verify} messages. + * @param message AddPublisher message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IAddPublisher, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified AddPublisher message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddPublisher.verify|verify} messages. + * @param message AddPublisher message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IAddPublisher, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes an AddPublisher message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AddPublisher + * @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, + ): pyth_lazer_transaction.AddPublisher; + + /** + * Decodes an AddPublisher message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AddPublisher + * @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, + ): pyth_lazer_transaction.AddPublisher; + + /** + * Verifies an AddPublisher 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 AddPublisher message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AddPublisher + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.AddPublisher; + + /** + * Creates a plain object from an AddPublisher message. Also converts values to other types if specified. + * @param message AddPublisher + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.AddPublisher, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this AddPublisher to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AddPublisher + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdatePublisher. */ + interface IUpdatePublisher { + /** UpdatePublisher publisherId */ + publisherId?: number | null; + + /** UpdatePublisher setPublisherName */ + setPublisherName?: pyth_lazer_transaction.ISetPublisherName | null; + + /** UpdatePublisher addPublisherPublicKeys */ + addPublisherPublicKeys?: pyth_lazer_transaction.IAddPublisherPublicKeys | null; + + /** UpdatePublisher removePublisherPublicKeys */ + removePublisherPublicKeys?: pyth_lazer_transaction.IRemovePublisherPublicKeys | null; + + /** UpdatePublisher setPublisherPublicKeys */ + setPublisherPublicKeys?: pyth_lazer_transaction.ISetPublisherPublicKeys | null; + + /** UpdatePublisher setPublisherActive */ + setPublisherActive?: pyth_lazer_transaction.ISetPublisherActive | null; + + /** UpdatePublisher removePublisher */ + removePublisher?: google.protobuf.IEmpty | null; + } + + /** Represents an UpdatePublisher. */ + class UpdatePublisher implements IUpdatePublisher { + /** + * Constructs a new UpdatePublisher. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IUpdatePublisher); + + /** UpdatePublisher publisherId. */ + public publisherId?: number | null; + + /** UpdatePublisher setPublisherName. */ + public setPublisherName?: pyth_lazer_transaction.ISetPublisherName | null; + + /** UpdatePublisher addPublisherPublicKeys. */ + public addPublisherPublicKeys?: pyth_lazer_transaction.IAddPublisherPublicKeys | null; + + /** UpdatePublisher removePublisherPublicKeys. */ + public removePublisherPublicKeys?: pyth_lazer_transaction.IRemovePublisherPublicKeys | null; + + /** UpdatePublisher setPublisherPublicKeys. */ + public setPublisherPublicKeys?: pyth_lazer_transaction.ISetPublisherPublicKeys | null; + + /** UpdatePublisher setPublisherActive. */ + public setPublisherActive?: pyth_lazer_transaction.ISetPublisherActive | null; + + /** UpdatePublisher removePublisher. */ + public removePublisher?: google.protobuf.IEmpty | null; + + /** UpdatePublisher _publisherId. */ + public _publisherId?: "publisherId"; + + /** UpdatePublisher action. */ + public action?: + | "setPublisherName" + | "addPublisherPublicKeys" + | "removePublisherPublicKeys" + | "setPublisherPublicKeys" + | "setPublisherActive" + | "removePublisher"; + + /** + * Creates a new UpdatePublisher instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdatePublisher instance + */ + public static create( + properties?: pyth_lazer_transaction.IUpdatePublisher, + ): pyth_lazer_transaction.UpdatePublisher; + + /** + * Encodes the specified UpdatePublisher message. Does not implicitly {@link pyth_lazer_transaction.UpdatePublisher.verify|verify} messages. + * @param message UpdatePublisher message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IUpdatePublisher, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified UpdatePublisher message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdatePublisher.verify|verify} messages. + * @param message UpdatePublisher message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IUpdatePublisher, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes an UpdatePublisher message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdatePublisher + * @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, + ): pyth_lazer_transaction.UpdatePublisher; + + /** + * Decodes an UpdatePublisher message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdatePublisher + * @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, + ): pyth_lazer_transaction.UpdatePublisher; + + /** + * Verifies an UpdatePublisher 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 UpdatePublisher message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdatePublisher + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.UpdatePublisher; + + /** + * Creates a plain object from an UpdatePublisher message. Also converts values to other types if specified. + * @param message UpdatePublisher + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.UpdatePublisher, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this UpdatePublisher to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdatePublisher + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetPublisherName. */ + interface ISetPublisherName { + /** SetPublisherName name */ + name?: string | null; + } + + /** Represents a SetPublisherName. */ + class SetPublisherName implements ISetPublisherName { + /** + * Constructs a new SetPublisherName. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ISetPublisherName); + + /** SetPublisherName name. */ + public name?: string | null; + + /** SetPublisherName _name. */ + public _name?: "name"; + + /** + * Creates a new SetPublisherName instance using the specified properties. + * @param [properties] Properties to set + * @returns SetPublisherName instance + */ + public static create( + properties?: pyth_lazer_transaction.ISetPublisherName, + ): pyth_lazer_transaction.SetPublisherName; + + /** + * Encodes the specified SetPublisherName message. Does not implicitly {@link pyth_lazer_transaction.SetPublisherName.verify|verify} messages. + * @param message SetPublisherName message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.ISetPublisherName, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified SetPublisherName message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetPublisherName.verify|verify} messages. + * @param message SetPublisherName message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.ISetPublisherName, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a SetPublisherName message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetPublisherName + * @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, + ): pyth_lazer_transaction.SetPublisherName; + + /** + * Decodes a SetPublisherName message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetPublisherName + * @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, + ): pyth_lazer_transaction.SetPublisherName; + + /** + * Verifies a SetPublisherName 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 SetPublisherName message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetPublisherName + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.SetPublisherName; + + /** + * Creates a plain object from a SetPublisherName message. Also converts values to other types if specified. + * @param message SetPublisherName + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.SetPublisherName, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this SetPublisherName to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetPublisherName + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AddPublisherPublicKeys. */ + interface IAddPublisherPublicKeys { + /** AddPublisherPublicKeys publicKeys */ + publicKeys?: Uint8Array[] | null; + } + + /** Represents an AddPublisherPublicKeys. */ + class AddPublisherPublicKeys implements IAddPublisherPublicKeys { + /** + * Constructs a new AddPublisherPublicKeys. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IAddPublisherPublicKeys); + + /** AddPublisherPublicKeys publicKeys. */ + public publicKeys: Uint8Array[]; + + /** + * Creates a new AddPublisherPublicKeys instance using the specified properties. + * @param [properties] Properties to set + * @returns AddPublisherPublicKeys instance + */ + public static create( + properties?: pyth_lazer_transaction.IAddPublisherPublicKeys, + ): pyth_lazer_transaction.AddPublisherPublicKeys; + + /** + * Encodes the specified AddPublisherPublicKeys message. Does not implicitly {@link pyth_lazer_transaction.AddPublisherPublicKeys.verify|verify} messages. + * @param message AddPublisherPublicKeys message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IAddPublisherPublicKeys, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified AddPublisherPublicKeys message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddPublisherPublicKeys.verify|verify} messages. + * @param message AddPublisherPublicKeys message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IAddPublisherPublicKeys, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes an AddPublisherPublicKeys message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AddPublisherPublicKeys + * @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, + ): pyth_lazer_transaction.AddPublisherPublicKeys; + + /** + * Decodes an AddPublisherPublicKeys message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AddPublisherPublicKeys + * @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, + ): pyth_lazer_transaction.AddPublisherPublicKeys; + + /** + * Verifies an AddPublisherPublicKeys 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 AddPublisherPublicKeys message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AddPublisherPublicKeys + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.AddPublisherPublicKeys; + + /** + * Creates a plain object from an AddPublisherPublicKeys message. Also converts values to other types if specified. + * @param message AddPublisherPublicKeys + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.AddPublisherPublicKeys, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this AddPublisherPublicKeys to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AddPublisherPublicKeys + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RemovePublisherPublicKeys. */ + interface IRemovePublisherPublicKeys { + /** RemovePublisherPublicKeys publicKeys */ + publicKeys?: Uint8Array[] | null; + } + + /** Represents a RemovePublisherPublicKeys. */ + class RemovePublisherPublicKeys implements IRemovePublisherPublicKeys { + /** + * Constructs a new RemovePublisherPublicKeys. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IRemovePublisherPublicKeys); + + /** RemovePublisherPublicKeys publicKeys. */ + public publicKeys: Uint8Array[]; + + /** + * Creates a new RemovePublisherPublicKeys instance using the specified properties. + * @param [properties] Properties to set + * @returns RemovePublisherPublicKeys instance + */ + public static create( + properties?: pyth_lazer_transaction.IRemovePublisherPublicKeys, + ): pyth_lazer_transaction.RemovePublisherPublicKeys; + + /** + * Encodes the specified RemovePublisherPublicKeys message. Does not implicitly {@link pyth_lazer_transaction.RemovePublisherPublicKeys.verify|verify} messages. + * @param message RemovePublisherPublicKeys message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IRemovePublisherPublicKeys, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified RemovePublisherPublicKeys message, length delimited. Does not implicitly {@link pyth_lazer_transaction.RemovePublisherPublicKeys.verify|verify} messages. + * @param message RemovePublisherPublicKeys message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IRemovePublisherPublicKeys, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a RemovePublisherPublicKeys message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RemovePublisherPublicKeys + * @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, + ): pyth_lazer_transaction.RemovePublisherPublicKeys; + + /** + * Decodes a RemovePublisherPublicKeys message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RemovePublisherPublicKeys + * @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, + ): pyth_lazer_transaction.RemovePublisherPublicKeys; + + /** + * Verifies a RemovePublisherPublicKeys 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 RemovePublisherPublicKeys message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RemovePublisherPublicKeys + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.RemovePublisherPublicKeys; + + /** + * Creates a plain object from a RemovePublisherPublicKeys message. Also converts values to other types if specified. + * @param message RemovePublisherPublicKeys + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.RemovePublisherPublicKeys, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this RemovePublisherPublicKeys to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RemovePublisherPublicKeys + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetPublisherPublicKeys. */ + interface ISetPublisherPublicKeys { + /** SetPublisherPublicKeys publicKeys */ + publicKeys?: Uint8Array[] | null; + } + + /** Represents a SetPublisherPublicKeys. */ + class SetPublisherPublicKeys implements ISetPublisherPublicKeys { + /** + * Constructs a new SetPublisherPublicKeys. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ISetPublisherPublicKeys); + + /** SetPublisherPublicKeys publicKeys. */ + public publicKeys: Uint8Array[]; + + /** + * Creates a new SetPublisherPublicKeys instance using the specified properties. + * @param [properties] Properties to set + * @returns SetPublisherPublicKeys instance + */ + public static create( + properties?: pyth_lazer_transaction.ISetPublisherPublicKeys, + ): pyth_lazer_transaction.SetPublisherPublicKeys; + + /** + * Encodes the specified SetPublisherPublicKeys message. Does not implicitly {@link pyth_lazer_transaction.SetPublisherPublicKeys.verify|verify} messages. + * @param message SetPublisherPublicKeys message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.ISetPublisherPublicKeys, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified SetPublisherPublicKeys message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetPublisherPublicKeys.verify|verify} messages. + * @param message SetPublisherPublicKeys message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.ISetPublisherPublicKeys, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a SetPublisherPublicKeys message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetPublisherPublicKeys + * @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, + ): pyth_lazer_transaction.SetPublisherPublicKeys; + + /** + * Decodes a SetPublisherPublicKeys message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetPublisherPublicKeys + * @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, + ): pyth_lazer_transaction.SetPublisherPublicKeys; + + /** + * Verifies a SetPublisherPublicKeys 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 SetPublisherPublicKeys message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetPublisherPublicKeys + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.SetPublisherPublicKeys; + + /** + * Creates a plain object from a SetPublisherPublicKeys message. Also converts values to other types if specified. + * @param message SetPublisherPublicKeys + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.SetPublisherPublicKeys, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this SetPublisherPublicKeys to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetPublisherPublicKeys + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetPublisherActive. */ + interface ISetPublisherActive { + /** SetPublisherActive isActive */ + isActive?: boolean | null; + } + + /** Represents a SetPublisherActive. */ + class SetPublisherActive implements ISetPublisherActive { + /** + * Constructs a new SetPublisherActive. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ISetPublisherActive); + + /** SetPublisherActive isActive. */ + public isActive?: boolean | null; + + /** SetPublisherActive _isActive. */ + public _isActive?: "isActive"; + + /** + * Creates a new SetPublisherActive instance using the specified properties. + * @param [properties] Properties to set + * @returns SetPublisherActive instance + */ + public static create( + properties?: pyth_lazer_transaction.ISetPublisherActive, + ): pyth_lazer_transaction.SetPublisherActive; + + /** + * Encodes the specified SetPublisherActive message. Does not implicitly {@link pyth_lazer_transaction.SetPublisherActive.verify|verify} messages. + * @param message SetPublisherActive message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.ISetPublisherActive, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified SetPublisherActive message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetPublisherActive.verify|verify} messages. + * @param message SetPublisherActive message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.ISetPublisherActive, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a SetPublisherActive message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetPublisherActive + * @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, + ): pyth_lazer_transaction.SetPublisherActive; + + /** + * Decodes a SetPublisherActive message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetPublisherActive + * @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, + ): pyth_lazer_transaction.SetPublisherActive; + + /** + * Verifies a SetPublisherActive 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 SetPublisherActive message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetPublisherActive + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.SetPublisherActive; + + /** + * Creates a plain object from a SetPublisherActive message. Also converts values to other types if specified. + * @param message SetPublisherActive + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.SetPublisherActive, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this SetPublisherActive to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetPublisherActive + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AddFeed. */ + interface IAddFeed { + /** AddFeed priceFeedId */ + priceFeedId?: number | null; + + /** AddFeed metadata */ + metadata?: pyth_lazer_transaction.DynamicValue.IMap | null; + + /** AddFeed permissionedPublishers */ + permissionedPublishers?: number[] | null; + } + + /** Represents an AddFeed. */ + class AddFeed implements IAddFeed { + /** + * Constructs a new AddFeed. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IAddFeed); + + /** AddFeed priceFeedId. */ + public priceFeedId?: number | null; + + /** AddFeed metadata. */ + public metadata?: pyth_lazer_transaction.DynamicValue.IMap | null; + + /** AddFeed permissionedPublishers. */ + public permissionedPublishers: number[]; + + /** AddFeed _priceFeedId. */ + public _priceFeedId?: "priceFeedId"; + + /** AddFeed _metadata. */ + public _metadata?: "metadata"; + + /** + * Creates a new AddFeed instance using the specified properties. + * @param [properties] Properties to set + * @returns AddFeed instance + */ + public static create( + properties?: pyth_lazer_transaction.IAddFeed, + ): pyth_lazer_transaction.AddFeed; + + /** + * Encodes the specified AddFeed message. Does not implicitly {@link pyth_lazer_transaction.AddFeed.verify|verify} messages. + * @param message AddFeed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IAddFeed, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified AddFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddFeed.verify|verify} messages. + * @param message AddFeed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IAddFeed, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes an AddFeed message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AddFeed + * @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, + ): pyth_lazer_transaction.AddFeed; + + /** + * Decodes an AddFeed message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AddFeed + * @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, + ): pyth_lazer_transaction.AddFeed; + + /** + * Verifies an AddFeed 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 AddFeed message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AddFeed + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.AddFeed; + + /** + * Creates a plain object from an AddFeed message. Also converts values to other types if specified. + * @param message AddFeed + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.AddFeed, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this AddFeed to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AddFeed + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateFeed. */ + interface IUpdateFeed { + /** UpdateFeed priceFeedId */ + priceFeedId?: number | null; + + /** UpdateFeed updateFeedMetadata */ + updateFeedMetadata?: pyth_lazer_transaction.IUpdateFeedMetadata | null; + + /** UpdateFeed activateFeed */ + activateFeed?: pyth_lazer_transaction.IActivateFeed | null; + + /** UpdateFeed deactivateFeed */ + deactivateFeed?: pyth_lazer_transaction.IDeactivateFeed | null; + + /** UpdateFeed removeFeed */ + removeFeed?: google.protobuf.IEmpty | null; + } + + /** Represents an UpdateFeed. */ + class UpdateFeed implements IUpdateFeed { + /** + * Constructs a new UpdateFeed. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IUpdateFeed); + + /** UpdateFeed priceFeedId. */ + public priceFeedId?: number | null; + + /** UpdateFeed updateFeedMetadata. */ + public updateFeedMetadata?: pyth_lazer_transaction.IUpdateFeedMetadata | null; + + /** UpdateFeed activateFeed. */ + public activateFeed?: pyth_lazer_transaction.IActivateFeed | null; + + /** UpdateFeed deactivateFeed. */ + public deactivateFeed?: pyth_lazer_transaction.IDeactivateFeed | null; + + /** UpdateFeed removeFeed. */ + public removeFeed?: google.protobuf.IEmpty | null; + + /** UpdateFeed _priceFeedId. */ + public _priceFeedId?: "priceFeedId"; + + /** UpdateFeed action. */ + public action?: + | "updateFeedMetadata" + | "activateFeed" + | "deactivateFeed" + | "removeFeed"; + + /** + * Creates a new UpdateFeed instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateFeed instance + */ + public static create( + properties?: pyth_lazer_transaction.IUpdateFeed, + ): pyth_lazer_transaction.UpdateFeed; + + /** + * Encodes the specified UpdateFeed message. Does not implicitly {@link pyth_lazer_transaction.UpdateFeed.verify|verify} messages. + * @param message UpdateFeed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IUpdateFeed, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified UpdateFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdateFeed.verify|verify} messages. + * @param message UpdateFeed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IUpdateFeed, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes an UpdateFeed message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateFeed + * @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, + ): pyth_lazer_transaction.UpdateFeed; + + /** + * Decodes an UpdateFeed message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateFeed + * @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, + ): pyth_lazer_transaction.UpdateFeed; + + /** + * Verifies an UpdateFeed 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 UpdateFeed message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateFeed + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.UpdateFeed; + + /** + * Creates a plain object from an UpdateFeed message. Also converts values to other types if specified. + * @param message UpdateFeed + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.UpdateFeed, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this UpdateFeed to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateFeed + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateFeedMetadata. */ + interface IUpdateFeedMetadata { + /** UpdateFeedMetadata name */ + name?: string | null; + + /** UpdateFeedMetadata value */ + value?: pyth_lazer_transaction.IDynamicValue | null; + } + + /** Represents an UpdateFeedMetadata. */ + class UpdateFeedMetadata implements IUpdateFeedMetadata { + /** + * Constructs a new UpdateFeedMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IUpdateFeedMetadata); + + /** UpdateFeedMetadata name. */ + public name?: string | null; + + /** UpdateFeedMetadata value. */ + public value?: pyth_lazer_transaction.IDynamicValue | null; + + /** UpdateFeedMetadata _name. */ + public _name?: "name"; + + /** UpdateFeedMetadata _value. */ + public _value?: "value"; + + /** + * Creates a new UpdateFeedMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateFeedMetadata instance + */ + public static create( + properties?: pyth_lazer_transaction.IUpdateFeedMetadata, + ): pyth_lazer_transaction.UpdateFeedMetadata; + + /** + * Encodes the specified UpdateFeedMetadata message. Does not implicitly {@link pyth_lazer_transaction.UpdateFeedMetadata.verify|verify} messages. + * @param message UpdateFeedMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IUpdateFeedMetadata, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified UpdateFeedMetadata message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdateFeedMetadata.verify|verify} messages. + * @param message UpdateFeedMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IUpdateFeedMetadata, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes an UpdateFeedMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateFeedMetadata + * @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, + ): pyth_lazer_transaction.UpdateFeedMetadata; + + /** + * Decodes an UpdateFeedMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateFeedMetadata + * @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, + ): pyth_lazer_transaction.UpdateFeedMetadata; + + /** + * Verifies an UpdateFeedMetadata 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 UpdateFeedMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateFeedMetadata + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.UpdateFeedMetadata; + + /** + * Creates a plain object from an UpdateFeedMetadata message. Also converts values to other types if specified. + * @param message UpdateFeedMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.UpdateFeedMetadata, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this UpdateFeedMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateFeedMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ActivateFeed. */ + interface IActivateFeed { + /** ActivateFeed activationTimestamp */ + activationTimestamp?: google.protobuf.ITimestamp | null; + } + + /** Represents an ActivateFeed. */ + class ActivateFeed implements IActivateFeed { + /** + * Constructs a new ActivateFeed. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IActivateFeed); + + /** ActivateFeed activationTimestamp. */ + public activationTimestamp?: google.protobuf.ITimestamp | null; + + /** ActivateFeed _activationTimestamp. */ + public _activationTimestamp?: "activationTimestamp"; + + /** + * Creates a new ActivateFeed instance using the specified properties. + * @param [properties] Properties to set + * @returns ActivateFeed instance + */ + public static create( + properties?: pyth_lazer_transaction.IActivateFeed, + ): pyth_lazer_transaction.ActivateFeed; + + /** + * Encodes the specified ActivateFeed message. Does not implicitly {@link pyth_lazer_transaction.ActivateFeed.verify|verify} messages. + * @param message ActivateFeed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IActivateFeed, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified ActivateFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ActivateFeed.verify|verify} messages. + * @param message ActivateFeed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IActivateFeed, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes an ActivateFeed message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ActivateFeed + * @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, + ): pyth_lazer_transaction.ActivateFeed; + + /** + * Decodes an ActivateFeed message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ActivateFeed + * @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, + ): pyth_lazer_transaction.ActivateFeed; + + /** + * Verifies an ActivateFeed 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 ActivateFeed message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ActivateFeed + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.ActivateFeed; + + /** + * Creates a plain object from an ActivateFeed message. Also converts values to other types if specified. + * @param message ActivateFeed + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.ActivateFeed, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this ActivateFeed to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ActivateFeed + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeactivateFeed. */ + interface IDeactivateFeed { + /** DeactivateFeed deactivationTimestamp */ + deactivationTimestamp?: google.protobuf.ITimestamp | null; + } + + /** Represents a DeactivateFeed. */ + class DeactivateFeed implements IDeactivateFeed { + /** + * Constructs a new DeactivateFeed. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IDeactivateFeed); + + /** DeactivateFeed deactivationTimestamp. */ + public deactivationTimestamp?: google.protobuf.ITimestamp | null; + + /** DeactivateFeed _deactivationTimestamp. */ + public _deactivationTimestamp?: "deactivationTimestamp"; + + /** + * Creates a new DeactivateFeed instance using the specified properties. + * @param [properties] Properties to set + * @returns DeactivateFeed instance + */ + public static create( + properties?: pyth_lazer_transaction.IDeactivateFeed, + ): pyth_lazer_transaction.DeactivateFeed; + + /** + * Encodes the specified DeactivateFeed message. Does not implicitly {@link pyth_lazer_transaction.DeactivateFeed.verify|verify} messages. + * @param message DeactivateFeed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IDeactivateFeed, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified DeactivateFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DeactivateFeed.verify|verify} messages. + * @param message DeactivateFeed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IDeactivateFeed, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a DeactivateFeed message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeactivateFeed + * @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, + ): pyth_lazer_transaction.DeactivateFeed; + + /** + * Decodes a DeactivateFeed message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeactivateFeed + * @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, + ): pyth_lazer_transaction.DeactivateFeed; + + /** + * Verifies a DeactivateFeed 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 DeactivateFeed message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeactivateFeed + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.DeactivateFeed; + + /** + * Creates a plain object from a DeactivateFeed message. Also converts values to other types if specified. + * @param message DeactivateFeed + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.DeactivateFeed, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this DeactivateFeed to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeactivateFeed + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DynamicValue. */ + interface IDynamicValue { + /** DynamicValue stringValue */ + stringValue?: string | null; + + /** DynamicValue doubleValue */ + doubleValue?: number | null; + + /** DynamicValue uintValue */ + uintValue?: number | Long | null; + + /** DynamicValue intValue */ + intValue?: number | Long | null; + + /** DynamicValue boolValue */ + boolValue?: boolean | null; + + /** DynamicValue bytesValue */ + bytesValue?: Uint8Array | null; + + /** DynamicValue durationValue */ + durationValue?: google.protobuf.IDuration | null; + + /** DynamicValue timestampValue */ + timestampValue?: google.protobuf.ITimestamp | null; + + /** DynamicValue list */ + list?: pyth_lazer_transaction.DynamicValue.IList | null; + + /** DynamicValue map */ + map?: pyth_lazer_transaction.DynamicValue.IMap | null; + } + + /** Represents a DynamicValue. */ + class DynamicValue implements IDynamicValue { + /** + * Constructs a new DynamicValue. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IDynamicValue); + + /** DynamicValue stringValue. */ + public stringValue?: string | null; + + /** DynamicValue doubleValue. */ + public doubleValue?: number | null; + + /** DynamicValue uintValue. */ + public uintValue?: number | Long | null; + + /** DynamicValue intValue. */ + public intValue?: number | Long | null; + + /** DynamicValue boolValue. */ + public boolValue?: boolean | null; + + /** DynamicValue bytesValue. */ + public bytesValue?: Uint8Array | null; + + /** DynamicValue durationValue. */ + public durationValue?: google.protobuf.IDuration | null; + + /** DynamicValue timestampValue. */ + public timestampValue?: google.protobuf.ITimestamp | null; + + /** DynamicValue list. */ + public list?: pyth_lazer_transaction.DynamicValue.IList | null; + + /** DynamicValue map. */ + public map?: pyth_lazer_transaction.DynamicValue.IMap | null; + + /** DynamicValue value. */ + public value?: + | "stringValue" + | "doubleValue" + | "uintValue" + | "intValue" + | "boolValue" + | "bytesValue" + | "durationValue" + | "timestampValue" + | "list" + | "map"; + + /** + * Creates a new DynamicValue instance using the specified properties. + * @param [properties] Properties to set + * @returns DynamicValue instance + */ + public static create( + properties?: pyth_lazer_transaction.IDynamicValue, + ): pyth_lazer_transaction.DynamicValue; + + /** + * Encodes the specified DynamicValue message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.verify|verify} messages. + * @param message DynamicValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IDynamicValue, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified DynamicValue message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.verify|verify} messages. + * @param message DynamicValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IDynamicValue, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a DynamicValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DynamicValue + * @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, + ): pyth_lazer_transaction.DynamicValue; + + /** + * Decodes a DynamicValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DynamicValue + * @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, + ): pyth_lazer_transaction.DynamicValue; + + /** + * Verifies a DynamicValue 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 DynamicValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DynamicValue + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.DynamicValue; + + /** + * Creates a plain object from a DynamicValue message. Also converts values to other types if specified. + * @param message DynamicValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.DynamicValue, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this DynamicValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DynamicValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DynamicValue { + /** Properties of a List. */ + interface IList { + /** List items */ + items?: pyth_lazer_transaction.IDynamicValue[] | null; } - /** Properties of an UpdateFeed. */ - interface IUpdateFeed { - - /** UpdateFeed priceFeedId */ - priceFeedId?: (number|null); - - /** UpdateFeed updateFeedMetadata */ - updateFeedMetadata?: (pyth_lazer_transaction.IUpdateFeedMetadata|null); - - /** UpdateFeed activateFeed */ - activateFeed?: (pyth_lazer_transaction.IActivateFeed|null); - - /** UpdateFeed deactivateFeed */ - deactivateFeed?: (pyth_lazer_transaction.IDeactivateFeed|null); - - /** UpdateFeed removeFeed */ - removeFeed?: (google.protobuf.IEmpty|null); + /** Represents a List. */ + class List implements IList { + /** + * Constructs a new List. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.DynamicValue.IList); + + /** List items. */ + public items: pyth_lazer_transaction.IDynamicValue[]; + + /** + * Creates a new List instance using the specified properties. + * @param [properties] Properties to set + * @returns List instance + */ + public static create( + properties?: pyth_lazer_transaction.DynamicValue.IList, + ): pyth_lazer_transaction.DynamicValue.List; + + /** + * Encodes the specified List message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.List.verify|verify} messages. + * @param message List message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.DynamicValue.IList, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified List message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.List.verify|verify} messages. + * @param message List message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.DynamicValue.IList, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a List message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns List + * @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, + ): pyth_lazer_transaction.DynamicValue.List; + + /** + * Decodes a List message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns List + * @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, + ): pyth_lazer_transaction.DynamicValue.List; + + /** + * Verifies a List 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 List message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns List + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.DynamicValue.List; + + /** + * Creates a plain object from a List message. Also converts values to other types if specified. + * @param message List + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.DynamicValue.List, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this List to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for List + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Represents an UpdateFeed. */ - class UpdateFeed implements IUpdateFeed { - - /** - * Constructs a new UpdateFeed. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IUpdateFeed); - - /** UpdateFeed priceFeedId. */ - public priceFeedId?: (number|null); - - /** UpdateFeed updateFeedMetadata. */ - public updateFeedMetadata?: (pyth_lazer_transaction.IUpdateFeedMetadata|null); - - /** UpdateFeed activateFeed. */ - public activateFeed?: (pyth_lazer_transaction.IActivateFeed|null); - - /** UpdateFeed deactivateFeed. */ - public deactivateFeed?: (pyth_lazer_transaction.IDeactivateFeed|null); - - /** UpdateFeed removeFeed. */ - public removeFeed?: (google.protobuf.IEmpty|null); - - /** UpdateFeed _priceFeedId. */ - public _priceFeedId?: "priceFeedId"; - - /** UpdateFeed action. */ - public action?: ("updateFeedMetadata"|"activateFeed"|"deactivateFeed"|"removeFeed"); - - /** - * Creates a new UpdateFeed instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateFeed instance - */ - public static create(properties?: pyth_lazer_transaction.IUpdateFeed): pyth_lazer_transaction.UpdateFeed; - - /** - * Encodes the specified UpdateFeed message. Does not implicitly {@link pyth_lazer_transaction.UpdateFeed.verify|verify} messages. - * @param message UpdateFeed message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IUpdateFeed, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdateFeed.verify|verify} messages. - * @param message UpdateFeed message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IUpdateFeed, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateFeed message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateFeed - * @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): pyth_lazer_transaction.UpdateFeed; - - /** - * Decodes an UpdateFeed message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateFeed - * @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)): pyth_lazer_transaction.UpdateFeed; - - /** - * Verifies an UpdateFeed 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 UpdateFeed message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateFeed - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.UpdateFeed; - - /** - * Creates a plain object from an UpdateFeed message. Also converts values to other types if specified. - * @param message UpdateFeed - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.UpdateFeed, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateFeed to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateFeed - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateFeedMetadata. */ - interface IUpdateFeedMetadata { + /** Properties of a MapItem. */ + interface IMapItem { + /** MapItem key */ + key?: string | null; - /** UpdateFeedMetadata name */ - name?: (string|null); - - /** UpdateFeedMetadata value */ - value?: (pyth_lazer_transaction.IDynamicValue|null); + /** MapItem value */ + value?: pyth_lazer_transaction.IDynamicValue | null; } - /** Represents an UpdateFeedMetadata. */ - class UpdateFeedMetadata implements IUpdateFeedMetadata { - - /** - * Constructs a new UpdateFeedMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IUpdateFeedMetadata); - - /** UpdateFeedMetadata name. */ - public name?: (string|null); - - /** UpdateFeedMetadata value. */ - public value?: (pyth_lazer_transaction.IDynamicValue|null); - - /** UpdateFeedMetadata _name. */ - public _name?: "name"; - - /** UpdateFeedMetadata _value. */ - public _value?: "value"; - - /** - * Creates a new UpdateFeedMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateFeedMetadata instance - */ - public static create(properties?: pyth_lazer_transaction.IUpdateFeedMetadata): pyth_lazer_transaction.UpdateFeedMetadata; - - /** - * Encodes the specified UpdateFeedMetadata message. Does not implicitly {@link pyth_lazer_transaction.UpdateFeedMetadata.verify|verify} messages. - * @param message UpdateFeedMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IUpdateFeedMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateFeedMetadata message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdateFeedMetadata.verify|verify} messages. - * @param message UpdateFeedMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IUpdateFeedMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateFeedMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateFeedMetadata - * @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): pyth_lazer_transaction.UpdateFeedMetadata; - - /** - * Decodes an UpdateFeedMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateFeedMetadata - * @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)): pyth_lazer_transaction.UpdateFeedMetadata; - - /** - * Verifies an UpdateFeedMetadata 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 UpdateFeedMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateFeedMetadata - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.UpdateFeedMetadata; - - /** - * Creates a plain object from an UpdateFeedMetadata message. Also converts values to other types if specified. - * @param message UpdateFeedMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.UpdateFeedMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateFeedMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateFeedMetadata - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** Represents a MapItem. */ + class MapItem implements IMapItem { + /** + * Constructs a new MapItem. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.DynamicValue.IMapItem); + + /** MapItem key. */ + public key?: string | null; + + /** MapItem value. */ + public value?: pyth_lazer_transaction.IDynamicValue | null; + + /** MapItem _key. */ + public _key?: "key"; + + /** MapItem _value. */ + public _value?: "value"; + + /** + * Creates a new MapItem instance using the specified properties. + * @param [properties] Properties to set + * @returns MapItem instance + */ + public static create( + properties?: pyth_lazer_transaction.DynamicValue.IMapItem, + ): pyth_lazer_transaction.DynamicValue.MapItem; + + /** + * Encodes the specified MapItem message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.MapItem.verify|verify} messages. + * @param message MapItem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.DynamicValue.IMapItem, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified MapItem message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.MapItem.verify|verify} messages. + * @param message MapItem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.DynamicValue.IMapItem, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a MapItem message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MapItem + * @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, + ): pyth_lazer_transaction.DynamicValue.MapItem; + + /** + * Decodes a MapItem message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MapItem + * @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, + ): pyth_lazer_transaction.DynamicValue.MapItem; + + /** + * Verifies a MapItem 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 MapItem message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MapItem + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.DynamicValue.MapItem; + + /** + * Creates a plain object from a MapItem message. Also converts values to other types if specified. + * @param message MapItem + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.DynamicValue.MapItem, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this MapItem to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MapItem + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an ActivateFeed. */ - interface IActivateFeed { - - /** ActivateFeed activationTimestamp */ - activationTimestamp?: (google.protobuf.ITimestamp|null); + /** Properties of a Map. */ + interface IMap { + /** Map items */ + items?: pyth_lazer_transaction.DynamicValue.IMapItem[] | null; } - /** Represents an ActivateFeed. */ - class ActivateFeed implements IActivateFeed { - - /** - * Constructs a new ActivateFeed. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IActivateFeed); - - /** ActivateFeed activationTimestamp. */ - public activationTimestamp?: (google.protobuf.ITimestamp|null); - - /** ActivateFeed _activationTimestamp. */ - public _activationTimestamp?: "activationTimestamp"; - - /** - * Creates a new ActivateFeed instance using the specified properties. - * @param [properties] Properties to set - * @returns ActivateFeed instance - */ - public static create(properties?: pyth_lazer_transaction.IActivateFeed): pyth_lazer_transaction.ActivateFeed; - - /** - * Encodes the specified ActivateFeed message. Does not implicitly {@link pyth_lazer_transaction.ActivateFeed.verify|verify} messages. - * @param message ActivateFeed message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IActivateFeed, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ActivateFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ActivateFeed.verify|verify} messages. - * @param message ActivateFeed message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IActivateFeed, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ActivateFeed message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ActivateFeed - * @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): pyth_lazer_transaction.ActivateFeed; - - /** - * Decodes an ActivateFeed message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ActivateFeed - * @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)): pyth_lazer_transaction.ActivateFeed; - - /** - * Verifies an ActivateFeed 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 ActivateFeed message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ActivateFeed - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.ActivateFeed; - - /** - * Creates a plain object from an ActivateFeed message. Also converts values to other types if specified. - * @param message ActivateFeed - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.ActivateFeed, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ActivateFeed to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ActivateFeed - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** Represents a Map. */ + class Map implements IMap { + /** + * Constructs a new Map. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.DynamicValue.IMap); + + /** Map items. */ + public items: pyth_lazer_transaction.DynamicValue.IMapItem[]; + + /** + * Creates a new Map instance using the specified properties. + * @param [properties] Properties to set + * @returns Map instance + */ + public static create( + properties?: pyth_lazer_transaction.DynamicValue.IMap, + ): pyth_lazer_transaction.DynamicValue.Map; + + /** + * Encodes the specified Map message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.Map.verify|verify} messages. + * @param message Map message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.DynamicValue.IMap, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified Map message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.Map.verify|verify} messages. + * @param message Map message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.DynamicValue.IMap, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a Map message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Map + * @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, + ): pyth_lazer_transaction.DynamicValue.Map; + + /** + * Decodes a Map message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Map + * @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, + ): pyth_lazer_transaction.DynamicValue.Map; + + /** + * Verifies a Map 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 Map message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Map + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.DynamicValue.Map; + + /** + * Creates a plain object from a Map message. Also converts values to other types if specified. + * @param message Map + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.DynamicValue.Map, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Map to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Map + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } + } +} - /** Properties of a DeactivateFeed. */ - interface IDeactivateFeed { - - /** DeactivateFeed deactivationTimestamp */ - deactivationTimestamp?: (google.protobuf.ITimestamp|null); +/** Namespace google. */ +export namespace google { + /** Namespace protobuf. */ + namespace protobuf { + /** Properties of a Timestamp. */ + interface ITimestamp { + /** Timestamp seconds */ + seconds?: number | Long | null; + + /** Timestamp nanos */ + nanos?: number | null; } - /** Represents a DeactivateFeed. */ - class DeactivateFeed implements IDeactivateFeed { - - /** - * Constructs a new DeactivateFeed. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IDeactivateFeed); - - /** DeactivateFeed deactivationTimestamp. */ - public deactivationTimestamp?: (google.protobuf.ITimestamp|null); - - /** DeactivateFeed _deactivationTimestamp. */ - public _deactivationTimestamp?: "deactivationTimestamp"; - - /** - * Creates a new DeactivateFeed instance using the specified properties. - * @param [properties] Properties to set - * @returns DeactivateFeed instance - */ - public static create(properties?: pyth_lazer_transaction.IDeactivateFeed): pyth_lazer_transaction.DeactivateFeed; - - /** - * Encodes the specified DeactivateFeed message. Does not implicitly {@link pyth_lazer_transaction.DeactivateFeed.verify|verify} messages. - * @param message DeactivateFeed message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IDeactivateFeed, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeactivateFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DeactivateFeed.verify|verify} messages. - * @param message DeactivateFeed message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IDeactivateFeed, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeactivateFeed message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeactivateFeed - * @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): pyth_lazer_transaction.DeactivateFeed; - - /** - * Decodes a DeactivateFeed message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeactivateFeed - * @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)): pyth_lazer_transaction.DeactivateFeed; - - /** - * Verifies a DeactivateFeed 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 DeactivateFeed message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeactivateFeed - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.DeactivateFeed; - - /** - * Creates a plain object from a DeactivateFeed message. Also converts values to other types if specified. - * @param message DeactivateFeed - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.DeactivateFeed, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeactivateFeed to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeactivateFeed - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { + /** + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ITimestamp); + + /** Timestamp seconds. */ + public seconds: number | Long; + + /** Timestamp nanos. */ + public nanos: number; + + /** + * Creates a new Timestamp instance using the specified properties. + * @param [properties] Properties to set + * @returns Timestamp instance + */ + public static create( + properties?: google.protobuf.ITimestamp, + ): google.protobuf.Timestamp; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: google.protobuf.ITimestamp, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: google.protobuf.ITimestamp, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Timestamp + * @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.Timestamp; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Timestamp + * @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.Timestamp; + + /** + * Verifies a Timestamp 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 Timestamp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Timestamp + */ + public static fromObject(object: { + [k: string]: any; + }): google.protobuf.Timestamp; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @param message Timestamp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: google.protobuf.Timestamp, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Timestamp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Timestamp + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DynamicValue. */ - interface IDynamicValue { - - /** DynamicValue stringValue */ - stringValue?: (string|null); - - /** DynamicValue doubleValue */ - doubleValue?: (number|null); - - /** DynamicValue uintValue */ - uintValue?: (number|Long|null); - - /** DynamicValue intValue */ - intValue?: (number|Long|null); - - /** DynamicValue boolValue */ - boolValue?: (boolean|null); - - /** DynamicValue bytesValue */ - bytesValue?: (Uint8Array|null); + /** Properties of a Duration. */ + interface IDuration { + /** Duration seconds */ + seconds?: number | Long | null; - /** DynamicValue durationValue */ - durationValue?: (google.protobuf.IDuration|null); - - /** DynamicValue timestampValue */ - timestampValue?: (google.protobuf.ITimestamp|null); - - /** DynamicValue list */ - list?: (pyth_lazer_transaction.DynamicValue.IList|null); - - /** DynamicValue map */ - map?: (pyth_lazer_transaction.DynamicValue.IMap|null); - } - - /** Represents a DynamicValue. */ - class DynamicValue implements IDynamicValue { - - /** - * Constructs a new DynamicValue. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IDynamicValue); - - /** DynamicValue stringValue. */ - public stringValue?: (string|null); - - /** DynamicValue doubleValue. */ - public doubleValue?: (number|null); - - /** DynamicValue uintValue. */ - public uintValue?: (number|Long|null); - - /** DynamicValue intValue. */ - public intValue?: (number|Long|null); - - /** DynamicValue boolValue. */ - public boolValue?: (boolean|null); - - /** DynamicValue bytesValue. */ - public bytesValue?: (Uint8Array|null); - - /** DynamicValue durationValue. */ - public durationValue?: (google.protobuf.IDuration|null); - - /** DynamicValue timestampValue. */ - public timestampValue?: (google.protobuf.ITimestamp|null); - - /** DynamicValue list. */ - public list?: (pyth_lazer_transaction.DynamicValue.IList|null); - - /** DynamicValue map. */ - public map?: (pyth_lazer_transaction.DynamicValue.IMap|null); - - /** DynamicValue value. */ - public value?: ("stringValue"|"doubleValue"|"uintValue"|"intValue"|"boolValue"|"bytesValue"|"durationValue"|"timestampValue"|"list"|"map"); - - /** - * Creates a new DynamicValue instance using the specified properties. - * @param [properties] Properties to set - * @returns DynamicValue instance - */ - public static create(properties?: pyth_lazer_transaction.IDynamicValue): pyth_lazer_transaction.DynamicValue; - - /** - * Encodes the specified DynamicValue message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.verify|verify} messages. - * @param message DynamicValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IDynamicValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DynamicValue message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.verify|verify} messages. - * @param message DynamicValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IDynamicValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DynamicValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DynamicValue - * @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): pyth_lazer_transaction.DynamicValue; - - /** - * Decodes a DynamicValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DynamicValue - * @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)): pyth_lazer_transaction.DynamicValue; - - /** - * Verifies a DynamicValue 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 DynamicValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DynamicValue - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.DynamicValue; - - /** - * Creates a plain object from a DynamicValue message. Also converts values to other types if specified. - * @param message DynamicValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.DynamicValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DynamicValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DynamicValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** Duration nanos */ + nanos?: number | null; } - namespace DynamicValue { - - /** Properties of a List. */ - interface IList { - - /** List items */ - items?: (pyth_lazer_transaction.IDynamicValue[]|null); - } - - /** Represents a List. */ - class List implements IList { - - /** - * Constructs a new List. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.DynamicValue.IList); - - /** List items. */ - public items: pyth_lazer_transaction.IDynamicValue[]; - - /** - * Creates a new List instance using the specified properties. - * @param [properties] Properties to set - * @returns List instance - */ - public static create(properties?: pyth_lazer_transaction.DynamicValue.IList): pyth_lazer_transaction.DynamicValue.List; - - /** - * Encodes the specified List message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.List.verify|verify} messages. - * @param message List message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.DynamicValue.IList, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified List message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.List.verify|verify} messages. - * @param message List message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.DynamicValue.IList, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a List message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns List - * @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): pyth_lazer_transaction.DynamicValue.List; - - /** - * Decodes a List message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns List - * @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)): pyth_lazer_transaction.DynamicValue.List; - - /** - * Verifies a List 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 List message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns List - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.DynamicValue.List; - - /** - * Creates a plain object from a List message. Also converts values to other types if specified. - * @param message List - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.DynamicValue.List, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this List to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for List - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MapItem. */ - interface IMapItem { - - /** MapItem key */ - key?: (string|null); - - /** MapItem value */ - value?: (pyth_lazer_transaction.IDynamicValue|null); - } - - /** Represents a MapItem. */ - class MapItem implements IMapItem { - - /** - * Constructs a new MapItem. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.DynamicValue.IMapItem); - - /** MapItem key. */ - public key?: (string|null); - - /** MapItem value. */ - public value?: (pyth_lazer_transaction.IDynamicValue|null); - - /** MapItem _key. */ - public _key?: "key"; - - /** MapItem _value. */ - public _value?: "value"; - - /** - * Creates a new MapItem instance using the specified properties. - * @param [properties] Properties to set - * @returns MapItem instance - */ - public static create(properties?: pyth_lazer_transaction.DynamicValue.IMapItem): pyth_lazer_transaction.DynamicValue.MapItem; - - /** - * Encodes the specified MapItem message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.MapItem.verify|verify} messages. - * @param message MapItem message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.DynamicValue.IMapItem, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MapItem message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.MapItem.verify|verify} messages. - * @param message MapItem message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.DynamicValue.IMapItem, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MapItem message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MapItem - * @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): pyth_lazer_transaction.DynamicValue.MapItem; - - /** - * Decodes a MapItem message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MapItem - * @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)): pyth_lazer_transaction.DynamicValue.MapItem; - - /** - * Verifies a MapItem 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 MapItem message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MapItem - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.DynamicValue.MapItem; - - /** - * Creates a plain object from a MapItem message. Also converts values to other types if specified. - * @param message MapItem - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.DynamicValue.MapItem, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MapItem to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MapItem - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Map. */ - interface IMap { - - /** Map items */ - items?: (pyth_lazer_transaction.DynamicValue.IMapItem[]|null); - } - - /** Represents a Map. */ - class Map implements IMap { - - /** - * Constructs a new Map. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.DynamicValue.IMap); - - /** Map items. */ - public items: pyth_lazer_transaction.DynamicValue.IMapItem[]; - - /** - * Creates a new Map instance using the specified properties. - * @param [properties] Properties to set - * @returns Map instance - */ - public static create(properties?: pyth_lazer_transaction.DynamicValue.IMap): pyth_lazer_transaction.DynamicValue.Map; - - /** - * Encodes the specified Map message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.Map.verify|verify} messages. - * @param message Map message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.DynamicValue.IMap, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Map message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.Map.verify|verify} messages. - * @param message Map message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.DynamicValue.IMap, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Map message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Map - * @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): pyth_lazer_transaction.DynamicValue.Map; - - /** - * Decodes a Map message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Map - * @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)): pyth_lazer_transaction.DynamicValue.Map; - - /** - * Verifies a Map 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 Map message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Map - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.DynamicValue.Map; - - /** - * Creates a plain object from a Map message. Also converts values to other types if specified. - * @param message Map - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.DynamicValue.Map, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Map to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Map - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** Represents a Duration. */ + class Duration implements IDuration { + /** + * Constructs a new Duration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDuration); + + /** Duration seconds. */ + public seconds: number | Long; + + /** Duration nanos. */ + public nanos: number; + + /** + * Creates a new Duration instance using the specified properties. + * @param [properties] Properties to set + * @returns Duration instance + */ + public static create( + properties?: google.protobuf.IDuration, + ): google.protobuf.Duration; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: google.protobuf.IDuration, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: google.protobuf.IDuration, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Duration + * @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.Duration; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Duration + * @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.Duration; + + /** + * Verifies a Duration 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 Duration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Duration + */ + public static fromObject(object: { + [k: string]: any; + }): google.protobuf.Duration; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @param message Duration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: google.protobuf.Duration, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Duration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Duration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } -} - -/** Namespace google. */ -export namespace google { - /** Namespace protobuf. */ - namespace protobuf { - - /** Properties of a Timestamp. */ - interface ITimestamp { - - /** Timestamp seconds */ - seconds?: (number|Long|null); - - /** Timestamp nanos */ - nanos?: (number|null); - } - - /** Represents a Timestamp. */ - class Timestamp implements ITimestamp { - - /** - * Constructs a new Timestamp. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ITimestamp); - - /** Timestamp seconds. */ - public seconds: (number|Long); - - /** Timestamp nanos. */ - public nanos: number; - - /** - * Creates a new Timestamp instance using the specified properties. - * @param [properties] Properties to set - * @returns Timestamp instance - */ - public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; - - /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Timestamp message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Timestamp - * @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.Timestamp; - - /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Timestamp - * @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.Timestamp; - - /** - * Verifies a Timestamp 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 Timestamp message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Timestamp - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; - - /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @param message Timestamp - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Timestamp to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Timestamp - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Duration. */ - interface IDuration { - - /** Duration seconds */ - seconds?: (number|Long|null); - - /** Duration nanos */ - nanos?: (number|null); - } - - /** Represents a Duration. */ - class Duration implements IDuration { - - /** - * Constructs a new Duration. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDuration); - - /** Duration seconds. */ - public seconds: (number|Long); - - /** Duration nanos. */ - public nanos: number; - - /** - * Creates a new Duration instance using the specified properties. - * @param [properties] Properties to set - * @returns Duration instance - */ - public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; - - /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Duration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Duration - * @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.Duration; - - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Duration - * @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.Duration; - - /** - * Verifies a Duration 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 Duration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Duration - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; - - /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @param message Duration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Duration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Duration - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** 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 }; - - /** - * Gets the default type url for Empty - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** 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 }; + + /** + * Gets the default type url for Empty + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } + } } diff --git a/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/lazer_functions.ts b/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/lazer_functions.ts index 9362f40e35..dfc7e5ce12 100644 --- a/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/lazer_functions.ts +++ b/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/lazer_functions.ts @@ -334,7 +334,6 @@ export async function generateInstructions( if (changeKey.startsWith("feed_")) { const feedId = parseInt(changeKey.replace("feed_", "")); - // if (!change.prev && change.new) { // const feedMetadata = change.new.feeds?.[0]?.metadata; // // Add new feed From 40b21cdd7d700ea042746d2c7d6e4ed69b83dd70 Mon Sep 17 00:00:00 2001 From: Daniel Chew Date: Tue, 27 May 2025 16:38:05 +0900 Subject: [PATCH 12/27] fix: update LazerFeedMetadata type and add conversion function for protobuf --- .../generated/governance_instruction.d.ts | 8227 ++++++++--------- .../lazer/generated/governance_instruction.js | 427 +- .../src/programs/lazer/lazer_functions.ts | 46 +- .../xc_admin_common/src/programs/types.ts | 2 +- 4 files changed, 4261 insertions(+), 4441 deletions(-) diff --git a/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/generated/governance_instruction.d.ts b/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/generated/governance_instruction.d.ts index 0e3f48829c..66c941628b 100644 --- a/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/generated/governance_instruction.d.ts +++ b/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/generated/governance_instruction.d.ts @@ -2,4397 +2,3924 @@ import * as $protobuf from "protobufjs"; import Long = require("long"); /** Namespace pyth_lazer_transaction. */ export namespace pyth_lazer_transaction { - /** Properties of a GovernanceInstruction. */ - interface IGovernanceInstruction { - /** GovernanceInstruction source */ - source?: pyth_lazer_transaction.IGovernanceSource | null; - - /** GovernanceInstruction directives */ - directives?: pyth_lazer_transaction.IGovernanceDirective[] | null; - - /** GovernanceInstruction minExecutionTimestamp */ - minExecutionTimestamp?: google.protobuf.ITimestamp | null; - - /** GovernanceInstruction maxExecutionTimestamp */ - maxExecutionTimestamp?: google.protobuf.ITimestamp | null; - - /** GovernanceInstruction governanceSequenceNo */ - governanceSequenceNo?: number | null; - } - - /** Represents a GovernanceInstruction. */ - class GovernanceInstruction implements IGovernanceInstruction { - /** - * Constructs a new GovernanceInstruction. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IGovernanceInstruction); - - /** GovernanceInstruction source. */ - public source?: pyth_lazer_transaction.IGovernanceSource | null; - - /** GovernanceInstruction directives. */ - public directives: pyth_lazer_transaction.IGovernanceDirective[]; - - /** GovernanceInstruction minExecutionTimestamp. */ - public minExecutionTimestamp?: google.protobuf.ITimestamp | null; - - /** GovernanceInstruction maxExecutionTimestamp. */ - public maxExecutionTimestamp?: google.protobuf.ITimestamp | null; - - /** GovernanceInstruction governanceSequenceNo. */ - public governanceSequenceNo?: number | null; - - /** GovernanceInstruction _source. */ - public _source?: "source"; - - /** GovernanceInstruction _minExecutionTimestamp. */ - public _minExecutionTimestamp?: "minExecutionTimestamp"; - - /** GovernanceInstruction _maxExecutionTimestamp. */ - public _maxExecutionTimestamp?: "maxExecutionTimestamp"; - - /** GovernanceInstruction _governanceSequenceNo. */ - public _governanceSequenceNo?: "governanceSequenceNo"; - - /** - * Creates a new GovernanceInstruction instance using the specified properties. - * @param [properties] Properties to set - * @returns GovernanceInstruction instance - */ - public static create( - properties?: pyth_lazer_transaction.IGovernanceInstruction, - ): pyth_lazer_transaction.GovernanceInstruction; - - /** - * Encodes the specified GovernanceInstruction message. Does not implicitly {@link pyth_lazer_transaction.GovernanceInstruction.verify|verify} messages. - * @param message GovernanceInstruction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.IGovernanceInstruction, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified GovernanceInstruction message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceInstruction.verify|verify} messages. - * @param message GovernanceInstruction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.IGovernanceInstruction, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a GovernanceInstruction message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GovernanceInstruction - * @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, - ): pyth_lazer_transaction.GovernanceInstruction; - - /** - * Decodes a GovernanceInstruction message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GovernanceInstruction - * @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, - ): pyth_lazer_transaction.GovernanceInstruction; - - /** - * Verifies a GovernanceInstruction 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 GovernanceInstruction message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GovernanceInstruction - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.GovernanceInstruction; - - /** - * Creates a plain object from a GovernanceInstruction message. Also converts values to other types if specified. - * @param message GovernanceInstruction - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.GovernanceInstruction, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this GovernanceInstruction to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GovernanceInstruction - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ShardFilter. */ - interface IShardFilter { - /** ShardFilter allShards */ - allShards?: google.protobuf.IEmpty | null; - - /** ShardFilter shardNames */ - shardNames?: pyth_lazer_transaction.ShardFilter.IShardNames | null; - - /** ShardFilter shardGroups */ - shardGroups?: pyth_lazer_transaction.ShardFilter.IShardGroups | null; - } - - /** Represents a ShardFilter. */ - class ShardFilter implements IShardFilter { - /** - * Constructs a new ShardFilter. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IShardFilter); - - /** ShardFilter allShards. */ - public allShards?: google.protobuf.IEmpty | null; - - /** ShardFilter shardNames. */ - public shardNames?: pyth_lazer_transaction.ShardFilter.IShardNames | null; - - /** ShardFilter shardGroups. */ - public shardGroups?: pyth_lazer_transaction.ShardFilter.IShardGroups | null; - - /** ShardFilter filter. */ - public filter?: "allShards" | "shardNames" | "shardGroups"; - - /** - * Creates a new ShardFilter instance using the specified properties. - * @param [properties] Properties to set - * @returns ShardFilter instance - */ - public static create( - properties?: pyth_lazer_transaction.IShardFilter, - ): pyth_lazer_transaction.ShardFilter; - - /** - * Encodes the specified ShardFilter message. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.verify|verify} messages. - * @param message ShardFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.IShardFilter, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified ShardFilter message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.verify|verify} messages. - * @param message ShardFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.IShardFilter, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a ShardFilter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ShardFilter - * @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, - ): pyth_lazer_transaction.ShardFilter; - - /** - * Decodes a ShardFilter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ShardFilter - * @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, - ): pyth_lazer_transaction.ShardFilter; - - /** - * Verifies a ShardFilter 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 ShardFilter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ShardFilter - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.ShardFilter; - - /** - * Creates a plain object from a ShardFilter message. Also converts values to other types if specified. - * @param message ShardFilter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.ShardFilter, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this ShardFilter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ShardFilter - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ShardFilter { - /** Properties of a ShardNames. */ - interface IShardNames { - /** ShardNames shardNames */ - shardNames?: string[] | null; + + /** Properties of a GovernanceInstruction. */ + interface IGovernanceInstruction { + + /** GovernanceInstruction directives */ + directives?: (pyth_lazer_transaction.IGovernanceDirective[]|null); + + /** GovernanceInstruction minExecutionTimestamp */ + minExecutionTimestamp?: (google.protobuf.ITimestamp|null); + + /** GovernanceInstruction maxExecutionTimestamp */ + maxExecutionTimestamp?: (google.protobuf.ITimestamp|null); + + /** GovernanceInstruction governanceSequenceNo */ + governanceSequenceNo?: (number|null); } - /** Represents a ShardNames. */ - class ShardNames implements IShardNames { - /** - * Constructs a new ShardNames. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.ShardFilter.IShardNames); - - /** ShardNames shardNames. */ - public shardNames: string[]; - - /** - * Creates a new ShardNames instance using the specified properties. - * @param [properties] Properties to set - * @returns ShardNames instance - */ - public static create( - properties?: pyth_lazer_transaction.ShardFilter.IShardNames, - ): pyth_lazer_transaction.ShardFilter.ShardNames; - - /** - * Encodes the specified ShardNames message. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardNames.verify|verify} messages. - * @param message ShardNames message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.ShardFilter.IShardNames, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified ShardNames message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardNames.verify|verify} messages. - * @param message ShardNames message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.ShardFilter.IShardNames, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a ShardNames message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ShardNames - * @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, - ): pyth_lazer_transaction.ShardFilter.ShardNames; - - /** - * Decodes a ShardNames message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ShardNames - * @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, - ): pyth_lazer_transaction.ShardFilter.ShardNames; - - /** - * Verifies a ShardNames 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 ShardNames message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ShardNames - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.ShardFilter.ShardNames; - - /** - * Creates a plain object from a ShardNames message. Also converts values to other types if specified. - * @param message ShardNames - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.ShardFilter.ShardNames, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this ShardNames to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ShardNames - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** Represents a GovernanceInstruction. */ + class GovernanceInstruction implements IGovernanceInstruction { + + /** + * Constructs a new GovernanceInstruction. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IGovernanceInstruction); + + /** GovernanceInstruction directives. */ + public directives: pyth_lazer_transaction.IGovernanceDirective[]; + + /** GovernanceInstruction minExecutionTimestamp. */ + public minExecutionTimestamp?: (google.protobuf.ITimestamp|null); + + /** GovernanceInstruction maxExecutionTimestamp. */ + public maxExecutionTimestamp?: (google.protobuf.ITimestamp|null); + + /** GovernanceInstruction governanceSequenceNo. */ + public governanceSequenceNo?: (number|null); + + /** GovernanceInstruction _minExecutionTimestamp. */ + public _minExecutionTimestamp?: "minExecutionTimestamp"; + + /** GovernanceInstruction _maxExecutionTimestamp. */ + public _maxExecutionTimestamp?: "maxExecutionTimestamp"; + + /** GovernanceInstruction _governanceSequenceNo. */ + public _governanceSequenceNo?: "governanceSequenceNo"; + + /** + * Creates a new GovernanceInstruction instance using the specified properties. + * @param [properties] Properties to set + * @returns GovernanceInstruction instance + */ + public static create(properties?: pyth_lazer_transaction.IGovernanceInstruction): pyth_lazer_transaction.GovernanceInstruction; + + /** + * Encodes the specified GovernanceInstruction message. Does not implicitly {@link pyth_lazer_transaction.GovernanceInstruction.verify|verify} messages. + * @param message GovernanceInstruction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IGovernanceInstruction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GovernanceInstruction message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceInstruction.verify|verify} messages. + * @param message GovernanceInstruction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IGovernanceInstruction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GovernanceInstruction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GovernanceInstruction + * @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): pyth_lazer_transaction.GovernanceInstruction; + + /** + * Decodes a GovernanceInstruction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GovernanceInstruction + * @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)): pyth_lazer_transaction.GovernanceInstruction; + + /** + * Verifies a GovernanceInstruction 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 GovernanceInstruction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GovernanceInstruction + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.GovernanceInstruction; + + /** + * Creates a plain object from a GovernanceInstruction message. Also converts values to other types if specified. + * @param message GovernanceInstruction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.GovernanceInstruction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GovernanceInstruction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GovernanceInstruction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ShardFilter. */ + interface IShardFilter { + + /** ShardFilter allShards */ + allShards?: (google.protobuf.IEmpty|null); + + /** ShardFilter shardNames */ + shardNames?: (pyth_lazer_transaction.ShardFilter.IShardNames|null); + + /** ShardFilter shardGroups */ + shardGroups?: (pyth_lazer_transaction.ShardFilter.IShardGroups|null); } - /** Properties of a ShardGroups. */ - interface IShardGroups { - /** ShardGroups shardGroups */ - shardGroups?: string[] | null; + /** Represents a ShardFilter. */ + class ShardFilter implements IShardFilter { + + /** + * Constructs a new ShardFilter. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IShardFilter); + + /** ShardFilter allShards. */ + public allShards?: (google.protobuf.IEmpty|null); + + /** ShardFilter shardNames. */ + public shardNames?: (pyth_lazer_transaction.ShardFilter.IShardNames|null); + + /** ShardFilter shardGroups. */ + public shardGroups?: (pyth_lazer_transaction.ShardFilter.IShardGroups|null); + + /** ShardFilter filter. */ + public filter?: ("allShards"|"shardNames"|"shardGroups"); + + /** + * Creates a new ShardFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns ShardFilter instance + */ + public static create(properties?: pyth_lazer_transaction.IShardFilter): pyth_lazer_transaction.ShardFilter; + + /** + * Encodes the specified ShardFilter message. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.verify|verify} messages. + * @param message ShardFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IShardFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ShardFilter message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.verify|verify} messages. + * @param message ShardFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IShardFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ShardFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ShardFilter + * @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): pyth_lazer_transaction.ShardFilter; + + /** + * Decodes a ShardFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ShardFilter + * @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)): pyth_lazer_transaction.ShardFilter; + + /** + * Verifies a ShardFilter 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 ShardFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ShardFilter + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.ShardFilter; + + /** + * Creates a plain object from a ShardFilter message. Also converts values to other types if specified. + * @param message ShardFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.ShardFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ShardFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ShardFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Represents a ShardGroups. */ - class ShardGroups implements IShardGroups { - /** - * Constructs a new ShardGroups. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.ShardFilter.IShardGroups); - - /** ShardGroups shardGroups. */ - public shardGroups: string[]; - - /** - * Creates a new ShardGroups instance using the specified properties. - * @param [properties] Properties to set - * @returns ShardGroups instance - */ - public static create( - properties?: pyth_lazer_transaction.ShardFilter.IShardGroups, - ): pyth_lazer_transaction.ShardFilter.ShardGroups; - - /** - * Encodes the specified ShardGroups message. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardGroups.verify|verify} messages. - * @param message ShardGroups message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.ShardFilter.IShardGroups, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified ShardGroups message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardGroups.verify|verify} messages. - * @param message ShardGroups message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.ShardFilter.IShardGroups, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a ShardGroups message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ShardGroups - * @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, - ): pyth_lazer_transaction.ShardFilter.ShardGroups; - - /** - * Decodes a ShardGroups message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ShardGroups - * @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, - ): pyth_lazer_transaction.ShardFilter.ShardGroups; - - /** - * Verifies a ShardGroups 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 ShardGroups message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ShardGroups - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.ShardFilter.ShardGroups; - - /** - * Creates a plain object from a ShardGroups message. Also converts values to other types if specified. - * @param message ShardGroups - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.ShardFilter.ShardGroups, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this ShardGroups to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ShardGroups - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + namespace ShardFilter { + + /** Properties of a ShardNames. */ + interface IShardNames { + + /** ShardNames shardNames */ + shardNames?: (string[]|null); + } + + /** Represents a ShardNames. */ + class ShardNames implements IShardNames { + + /** + * Constructs a new ShardNames. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ShardFilter.IShardNames); + + /** ShardNames shardNames. */ + public shardNames: string[]; + + /** + * Creates a new ShardNames instance using the specified properties. + * @param [properties] Properties to set + * @returns ShardNames instance + */ + public static create(properties?: pyth_lazer_transaction.ShardFilter.IShardNames): pyth_lazer_transaction.ShardFilter.ShardNames; + + /** + * Encodes the specified ShardNames message. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardNames.verify|verify} messages. + * @param message ShardNames message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.ShardFilter.IShardNames, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ShardNames message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardNames.verify|verify} messages. + * @param message ShardNames message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.ShardFilter.IShardNames, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ShardNames message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ShardNames + * @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): pyth_lazer_transaction.ShardFilter.ShardNames; + + /** + * Decodes a ShardNames message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ShardNames + * @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)): pyth_lazer_transaction.ShardFilter.ShardNames; + + /** + * Verifies a ShardNames 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 ShardNames message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ShardNames + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.ShardFilter.ShardNames; + + /** + * Creates a plain object from a ShardNames message. Also converts values to other types if specified. + * @param message ShardNames + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.ShardFilter.ShardNames, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ShardNames to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ShardNames + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ShardGroups. */ + interface IShardGroups { + + /** ShardGroups shardGroups */ + shardGroups?: (string[]|null); + } + + /** Represents a ShardGroups. */ + class ShardGroups implements IShardGroups { + + /** + * Constructs a new ShardGroups. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ShardFilter.IShardGroups); + + /** ShardGroups shardGroups. */ + public shardGroups: string[]; + + /** + * Creates a new ShardGroups instance using the specified properties. + * @param [properties] Properties to set + * @returns ShardGroups instance + */ + public static create(properties?: pyth_lazer_transaction.ShardFilter.IShardGroups): pyth_lazer_transaction.ShardFilter.ShardGroups; + + /** + * Encodes the specified ShardGroups message. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardGroups.verify|verify} messages. + * @param message ShardGroups message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.ShardFilter.IShardGroups, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ShardGroups message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardGroups.verify|verify} messages. + * @param message ShardGroups message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.ShardFilter.IShardGroups, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ShardGroups message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ShardGroups + * @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): pyth_lazer_transaction.ShardFilter.ShardGroups; + + /** + * Decodes a ShardGroups message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ShardGroups + * @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)): pyth_lazer_transaction.ShardFilter.ShardGroups; + + /** + * Verifies a ShardGroups 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 ShardGroups message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ShardGroups + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.ShardFilter.ShardGroups; + + /** + * Creates a plain object from a ShardGroups message. Also converts values to other types if specified. + * @param message ShardGroups + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.ShardFilter.ShardGroups, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ShardGroups to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ShardGroups + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } - } - /** Properties of a GovernanceDirective. */ - interface IGovernanceDirective { - /** GovernanceDirective shardFilter */ - shardFilter?: pyth_lazer_transaction.IShardFilter | null; + /** Properties of a GovernanceDirective. */ + interface IGovernanceDirective { + + /** GovernanceDirective shardFilter */ + shardFilter?: (pyth_lazer_transaction.IShardFilter|null); + + /** GovernanceDirective createShard */ + createShard?: (pyth_lazer_transaction.ICreateShard|null); + + /** GovernanceDirective addGovernanceSource */ + addGovernanceSource?: (pyth_lazer_transaction.IAddGovernanceSource|null); + + /** GovernanceDirective updateGovernanceSource */ + updateGovernanceSource?: (pyth_lazer_transaction.IUpdateGovernanceSource|null); + + /** GovernanceDirective setShardName */ + setShardName?: (pyth_lazer_transaction.ISetShardName|null); + + /** GovernanceDirective setShardGroup */ + setShardGroup?: (pyth_lazer_transaction.ISetShardGroup|null); + + /** GovernanceDirective resetLastSequenceNo */ + resetLastSequenceNo?: (pyth_lazer_transaction.IResetLastSequenceNo|null); + + /** GovernanceDirective addPublisher */ + addPublisher?: (pyth_lazer_transaction.IAddPublisher|null); + + /** GovernanceDirective updatePublisher */ + updatePublisher?: (pyth_lazer_transaction.IUpdatePublisher|null); - /** GovernanceDirective createShard */ - createShard?: pyth_lazer_transaction.ICreateShard | null; + /** GovernanceDirective addFeed */ + addFeed?: (pyth_lazer_transaction.IAddFeed|null); - /** GovernanceDirective addGovernanceSource */ - addGovernanceSource?: pyth_lazer_transaction.IAddGovernanceSource | null; - - /** GovernanceDirective updateGovernanceSource */ - updateGovernanceSource?: pyth_lazer_transaction.IUpdateGovernanceSource | null; - - /** GovernanceDirective setShardName */ - setShardName?: pyth_lazer_transaction.ISetShardName | null; - - /** GovernanceDirective setShardGroup */ - setShardGroup?: pyth_lazer_transaction.ISetShardGroup | null; - - /** GovernanceDirective resetLastSequenceNo */ - resetLastSequenceNo?: pyth_lazer_transaction.IResetLastSequenceNo | null; - - /** GovernanceDirective addPublisher */ - addPublisher?: pyth_lazer_transaction.IAddPublisher | null; - - /** GovernanceDirective updatePublisher */ - updatePublisher?: pyth_lazer_transaction.IUpdatePublisher | null; - - /** GovernanceDirective addFeed */ - addFeed?: pyth_lazer_transaction.IAddFeed | null; - - /** GovernanceDirective updateFeed */ - updateFeed?: pyth_lazer_transaction.IUpdateFeed | null; - } - - /** Represents a GovernanceDirective. */ - class GovernanceDirective implements IGovernanceDirective { - /** - * Constructs a new GovernanceDirective. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IGovernanceDirective); - - /** GovernanceDirective shardFilter. */ - public shardFilter?: pyth_lazer_transaction.IShardFilter | null; - - /** GovernanceDirective createShard. */ - public createShard?: pyth_lazer_transaction.ICreateShard | null; - - /** GovernanceDirective addGovernanceSource. */ - public addGovernanceSource?: pyth_lazer_transaction.IAddGovernanceSource | null; - - /** GovernanceDirective updateGovernanceSource. */ - public updateGovernanceSource?: pyth_lazer_transaction.IUpdateGovernanceSource | null; - - /** GovernanceDirective setShardName. */ - public setShardName?: pyth_lazer_transaction.ISetShardName | null; - - /** GovernanceDirective setShardGroup. */ - public setShardGroup?: pyth_lazer_transaction.ISetShardGroup | null; - - /** GovernanceDirective resetLastSequenceNo. */ - public resetLastSequenceNo?: pyth_lazer_transaction.IResetLastSequenceNo | null; - - /** GovernanceDirective addPublisher. */ - public addPublisher?: pyth_lazer_transaction.IAddPublisher | null; - - /** GovernanceDirective updatePublisher. */ - public updatePublisher?: pyth_lazer_transaction.IUpdatePublisher | null; - - /** GovernanceDirective addFeed. */ - public addFeed?: pyth_lazer_transaction.IAddFeed | null; - - /** GovernanceDirective updateFeed. */ - public updateFeed?: pyth_lazer_transaction.IUpdateFeed | null; - - /** GovernanceDirective _shardFilter. */ - public _shardFilter?: "shardFilter"; - - /** GovernanceDirective action. */ - public action?: - | "createShard" - | "addGovernanceSource" - | "updateGovernanceSource" - | "setShardName" - | "setShardGroup" - | "resetLastSequenceNo" - | "addPublisher" - | "updatePublisher" - | "addFeed" - | "updateFeed"; - - /** - * Creates a new GovernanceDirective instance using the specified properties. - * @param [properties] Properties to set - * @returns GovernanceDirective instance - */ - public static create( - properties?: pyth_lazer_transaction.IGovernanceDirective, - ): pyth_lazer_transaction.GovernanceDirective; - - /** - * Encodes the specified GovernanceDirective message. Does not implicitly {@link pyth_lazer_transaction.GovernanceDirective.verify|verify} messages. - * @param message GovernanceDirective message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.IGovernanceDirective, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified GovernanceDirective message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceDirective.verify|verify} messages. - * @param message GovernanceDirective message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.IGovernanceDirective, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a GovernanceDirective message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GovernanceDirective - * @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, - ): pyth_lazer_transaction.GovernanceDirective; - - /** - * Decodes a GovernanceDirective message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GovernanceDirective - * @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, - ): pyth_lazer_transaction.GovernanceDirective; - - /** - * Verifies a GovernanceDirective 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 GovernanceDirective message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GovernanceDirective - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.GovernanceDirective; - - /** - * Creates a plain object from a GovernanceDirective message. Also converts values to other types if specified. - * @param message GovernanceDirective - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.GovernanceDirective, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this GovernanceDirective to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GovernanceDirective - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Permissions. */ - interface IPermissions { - /** Permissions allActions */ - allActions?: boolean | null; - - /** Permissions shardActions */ - shardActions?: pyth_lazer_transaction.Permissions.ShardAction[] | null; - - /** Permissions allUpdateGovernanceSourceActions */ - allUpdateGovernanceSourceActions?: boolean | null; - - /** Permissions updateGovernanceSourceActions */ - updateGovernanceSourceActions?: - | pyth_lazer_transaction.Permissions.UpdateGovernanceSourceAction[] - | null; - - /** Permissions allUpdatePublisherAction */ - allUpdatePublisherAction?: boolean | null; - - /** Permissions updatePublisherActions */ - updatePublisherActions?: - | pyth_lazer_transaction.Permissions.UpdatePublisherAction[] - | null; - - /** Permissions allUpdateFeedActions */ - allUpdateFeedActions?: boolean | null; - - /** Permissions updateFeedActions */ - updateFeedActions?: - | pyth_lazer_transaction.Permissions.UpdateFeedAction[] - | null; - } - - /** Represents a Permissions. */ - class Permissions implements IPermissions { - /** - * Constructs a new Permissions. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IPermissions); - - /** Permissions allActions. */ - public allActions?: boolean | null; - - /** Permissions shardActions. */ - public shardActions: pyth_lazer_transaction.Permissions.ShardAction[]; - - /** Permissions allUpdateGovernanceSourceActions. */ - public allUpdateGovernanceSourceActions?: boolean | null; - - /** Permissions updateGovernanceSourceActions. */ - public updateGovernanceSourceActions: pyth_lazer_transaction.Permissions.UpdateGovernanceSourceAction[]; - - /** Permissions allUpdatePublisherAction. */ - public allUpdatePublisherAction?: boolean | null; - - /** Permissions updatePublisherActions. */ - public updatePublisherActions: pyth_lazer_transaction.Permissions.UpdatePublisherAction[]; - - /** Permissions allUpdateFeedActions. */ - public allUpdateFeedActions?: boolean | null; - - /** Permissions updateFeedActions. */ - public updateFeedActions: pyth_lazer_transaction.Permissions.UpdateFeedAction[]; - - /** Permissions _allActions. */ - public _allActions?: "allActions"; - - /** Permissions _allUpdateGovernanceSourceActions. */ - public _allUpdateGovernanceSourceActions?: "allUpdateGovernanceSourceActions"; - - /** Permissions _allUpdatePublisherAction. */ - public _allUpdatePublisherAction?: "allUpdatePublisherAction"; - - /** Permissions _allUpdateFeedActions. */ - public _allUpdateFeedActions?: "allUpdateFeedActions"; - - /** - * Creates a new Permissions instance using the specified properties. - * @param [properties] Properties to set - * @returns Permissions instance - */ - public static create( - properties?: pyth_lazer_transaction.IPermissions, - ): pyth_lazer_transaction.Permissions; - - /** - * Encodes the specified Permissions message. Does not implicitly {@link pyth_lazer_transaction.Permissions.verify|verify} messages. - * @param message Permissions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.IPermissions, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified Permissions message, length delimited. Does not implicitly {@link pyth_lazer_transaction.Permissions.verify|verify} messages. - * @param message Permissions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.IPermissions, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a Permissions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Permissions - * @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, - ): pyth_lazer_transaction.Permissions; - - /** - * Decodes a Permissions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Permissions - * @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, - ): pyth_lazer_transaction.Permissions; - - /** - * Verifies a Permissions 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 Permissions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Permissions - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.Permissions; - - /** - * Creates a plain object from a Permissions message. Also converts values to other types if specified. - * @param message Permissions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.Permissions, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this Permissions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Permissions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Permissions { - /** ShardAction enum. */ - enum ShardAction { - SHARD_ACTION_UNSPECIFIED = 0, - CREATE_SHARD = 101, - ADD_GOVERNANCE_SOURCE = 102, - UPDATE_GOVERNANCE_SOURCE = 103, - SET_SHARD_NAME = 104, - SET_SHARD_GROUP = 105, - RESET_LAST_SEQUENCE_NO = 106, - ADD_PUBLISHER = 107, - ADD_FEED = 109, + /** GovernanceDirective updateFeed */ + updateFeed?: (pyth_lazer_transaction.IUpdateFeed|null); } - /** UpdateGovernanceSourceAction enum. */ - enum UpdateGovernanceSourceAction { - UPDATE_GOVERNANCE_SOURCE_ACTION_UNSPECIFIED = 0, - SET_GOVERNANCE_SOURCE_PERMISSIONS = 101, - REMOVE_GOVERNANCE_SOURCE = 199, + /** Represents a GovernanceDirective. */ + class GovernanceDirective implements IGovernanceDirective { + + /** + * Constructs a new GovernanceDirective. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IGovernanceDirective); + + /** GovernanceDirective shardFilter. */ + public shardFilter?: (pyth_lazer_transaction.IShardFilter|null); + + /** GovernanceDirective createShard. */ + public createShard?: (pyth_lazer_transaction.ICreateShard|null); + + /** GovernanceDirective addGovernanceSource. */ + public addGovernanceSource?: (pyth_lazer_transaction.IAddGovernanceSource|null); + + /** GovernanceDirective updateGovernanceSource. */ + public updateGovernanceSource?: (pyth_lazer_transaction.IUpdateGovernanceSource|null); + + /** GovernanceDirective setShardName. */ + public setShardName?: (pyth_lazer_transaction.ISetShardName|null); + + /** GovernanceDirective setShardGroup. */ + public setShardGroup?: (pyth_lazer_transaction.ISetShardGroup|null); + + /** GovernanceDirective resetLastSequenceNo. */ + public resetLastSequenceNo?: (pyth_lazer_transaction.IResetLastSequenceNo|null); + + /** GovernanceDirective addPublisher. */ + public addPublisher?: (pyth_lazer_transaction.IAddPublisher|null); + + /** GovernanceDirective updatePublisher. */ + public updatePublisher?: (pyth_lazer_transaction.IUpdatePublisher|null); + + /** GovernanceDirective addFeed. */ + public addFeed?: (pyth_lazer_transaction.IAddFeed|null); + + /** GovernanceDirective updateFeed. */ + public updateFeed?: (pyth_lazer_transaction.IUpdateFeed|null); + + /** GovernanceDirective _shardFilter. */ + public _shardFilter?: "shardFilter"; + + /** GovernanceDirective action. */ + public action?: ("createShard"|"addGovernanceSource"|"updateGovernanceSource"|"setShardName"|"setShardGroup"|"resetLastSequenceNo"|"addPublisher"|"updatePublisher"|"addFeed"|"updateFeed"); + + /** + * Creates a new GovernanceDirective instance using the specified properties. + * @param [properties] Properties to set + * @returns GovernanceDirective instance + */ + public static create(properties?: pyth_lazer_transaction.IGovernanceDirective): pyth_lazer_transaction.GovernanceDirective; + + /** + * Encodes the specified GovernanceDirective message. Does not implicitly {@link pyth_lazer_transaction.GovernanceDirective.verify|verify} messages. + * @param message GovernanceDirective message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IGovernanceDirective, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GovernanceDirective message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceDirective.verify|verify} messages. + * @param message GovernanceDirective message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IGovernanceDirective, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GovernanceDirective message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GovernanceDirective + * @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): pyth_lazer_transaction.GovernanceDirective; + + /** + * Decodes a GovernanceDirective message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GovernanceDirective + * @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)): pyth_lazer_transaction.GovernanceDirective; + + /** + * Verifies a GovernanceDirective 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 GovernanceDirective message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GovernanceDirective + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.GovernanceDirective; + + /** + * Creates a plain object from a GovernanceDirective message. Also converts values to other types if specified. + * @param message GovernanceDirective + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.GovernanceDirective, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GovernanceDirective to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GovernanceDirective + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** UpdatePublisherAction enum. */ - enum UpdatePublisherAction { - UPDATE_PUBLISHER_ACTION_UNSPECIFIED = 0, - SET_PUBLISHER_NAME = 101, - ADD_PUBLISHER_PUBLIC_KEYS = 102, - REMOVE_PUBLISHER_PUBLIC_KEYS = 103, - SET_PUBLISHER_PUBLIC_KEYS = 104, - SET_PUBLISHER_ACTIVE = 105, - REMOVE_PUBLISHER = 199, + /** Properties of a Permissions. */ + interface IPermissions { + + /** Permissions allActions */ + allActions?: (boolean|null); + + /** Permissions shardActions */ + shardActions?: (pyth_lazer_transaction.Permissions.ShardAction[]|null); + + /** Permissions allUpdateGovernanceSourceActions */ + allUpdateGovernanceSourceActions?: (boolean|null); + + /** Permissions updateGovernanceSourceActions */ + updateGovernanceSourceActions?: (pyth_lazer_transaction.Permissions.UpdateGovernanceSourceAction[]|null); + + /** Permissions allUpdatePublisherAction */ + allUpdatePublisherAction?: (boolean|null); + + /** Permissions updatePublisherActions */ + updatePublisherActions?: (pyth_lazer_transaction.Permissions.UpdatePublisherAction[]|null); + + /** Permissions allUpdateFeedActions */ + allUpdateFeedActions?: (boolean|null); + + /** Permissions updateFeedActions */ + updateFeedActions?: (pyth_lazer_transaction.Permissions.UpdateFeedAction[]|null); } - /** UpdateFeedAction enum. */ - enum UpdateFeedAction { - UPDATE_FEED_ACTION_UNSPECIFIED = 0, - UPDATE_FEED_METADATA = 101, - ACTIVATE_FEED = 102, - DEACTIVATE_FEED = 103, - REMOVE_FEED = 199, + /** Represents a Permissions. */ + class Permissions implements IPermissions { + + /** + * Constructs a new Permissions. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IPermissions); + + /** Permissions allActions. */ + public allActions?: (boolean|null); + + /** Permissions shardActions. */ + public shardActions: pyth_lazer_transaction.Permissions.ShardAction[]; + + /** Permissions allUpdateGovernanceSourceActions. */ + public allUpdateGovernanceSourceActions?: (boolean|null); + + /** Permissions updateGovernanceSourceActions. */ + public updateGovernanceSourceActions: pyth_lazer_transaction.Permissions.UpdateGovernanceSourceAction[]; + + /** Permissions allUpdatePublisherAction. */ + public allUpdatePublisherAction?: (boolean|null); + + /** Permissions updatePublisherActions. */ + public updatePublisherActions: pyth_lazer_transaction.Permissions.UpdatePublisherAction[]; + + /** Permissions allUpdateFeedActions. */ + public allUpdateFeedActions?: (boolean|null); + + /** Permissions updateFeedActions. */ + public updateFeedActions: pyth_lazer_transaction.Permissions.UpdateFeedAction[]; + + /** Permissions _allActions. */ + public _allActions?: "allActions"; + + /** Permissions _allUpdateGovernanceSourceActions. */ + public _allUpdateGovernanceSourceActions?: "allUpdateGovernanceSourceActions"; + + /** Permissions _allUpdatePublisherAction. */ + public _allUpdatePublisherAction?: "allUpdatePublisherAction"; + + /** Permissions _allUpdateFeedActions. */ + public _allUpdateFeedActions?: "allUpdateFeedActions"; + + /** + * Creates a new Permissions instance using the specified properties. + * @param [properties] Properties to set + * @returns Permissions instance + */ + public static create(properties?: pyth_lazer_transaction.IPermissions): pyth_lazer_transaction.Permissions; + + /** + * Encodes the specified Permissions message. Does not implicitly {@link pyth_lazer_transaction.Permissions.verify|verify} messages. + * @param message Permissions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IPermissions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Permissions message, length delimited. Does not implicitly {@link pyth_lazer_transaction.Permissions.verify|verify} messages. + * @param message Permissions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IPermissions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Permissions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Permissions + * @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): pyth_lazer_transaction.Permissions; + + /** + * Decodes a Permissions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Permissions + * @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)): pyth_lazer_transaction.Permissions; + + /** + * Verifies a Permissions 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 Permissions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Permissions + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.Permissions; + + /** + * Creates a plain object from a Permissions message. Also converts values to other types if specified. + * @param message Permissions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.Permissions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Permissions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Permissions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - } - - /** Properties of a GovernanceSource. */ - interface IGovernanceSource { - /** GovernanceSource singleEd25519 */ - singleEd25519?: pyth_lazer_transaction.GovernanceSource.ISingleEd25519 | null; - } - - /** Represents a GovernanceSource. */ - class GovernanceSource implements IGovernanceSource { - /** - * Constructs a new GovernanceSource. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IGovernanceSource); - - /** GovernanceSource singleEd25519. */ - public singleEd25519?: pyth_lazer_transaction.GovernanceSource.ISingleEd25519 | null; - - /** GovernanceSource source. */ - public source?: "singleEd25519"; - - /** - * Creates a new GovernanceSource instance using the specified properties. - * @param [properties] Properties to set - * @returns GovernanceSource instance - */ - public static create( - properties?: pyth_lazer_transaction.IGovernanceSource, - ): pyth_lazer_transaction.GovernanceSource; - - /** - * Encodes the specified GovernanceSource message. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.verify|verify} messages. - * @param message GovernanceSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.IGovernanceSource, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified GovernanceSource message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.verify|verify} messages. - * @param message GovernanceSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.IGovernanceSource, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a GovernanceSource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GovernanceSource - * @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, - ): pyth_lazer_transaction.GovernanceSource; - - /** - * Decodes a GovernanceSource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GovernanceSource - * @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, - ): pyth_lazer_transaction.GovernanceSource; - - /** - * Verifies a GovernanceSource 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 GovernanceSource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GovernanceSource - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.GovernanceSource; - - /** - * Creates a plain object from a GovernanceSource message. Also converts values to other types if specified. - * @param message GovernanceSource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.GovernanceSource, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this GovernanceSource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GovernanceSource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace GovernanceSource { - /** Properties of a SingleEd25519. */ - interface ISingleEd25519 { - /** SingleEd25519 publicKey */ - publicKey?: Uint8Array | null; + + namespace Permissions { + + /** ShardAction enum. */ + enum ShardAction { + SHARD_ACTION_UNSPECIFIED = 0, + CREATE_SHARD = 101, + ADD_GOVERNANCE_SOURCE = 102, + UPDATE_GOVERNANCE_SOURCE = 103, + SET_SHARD_NAME = 104, + SET_SHARD_GROUP = 105, + RESET_LAST_SEQUENCE_NO = 106, + ADD_PUBLISHER = 107, + ADD_FEED = 109 + } + + /** UpdateGovernanceSourceAction enum. */ + enum UpdateGovernanceSourceAction { + UPDATE_GOVERNANCE_SOURCE_ACTION_UNSPECIFIED = 0, + SET_GOVERNANCE_SOURCE_PERMISSIONS = 101, + REMOVE_GOVERNANCE_SOURCE = 199 + } + + /** UpdatePublisherAction enum. */ + enum UpdatePublisherAction { + UPDATE_PUBLISHER_ACTION_UNSPECIFIED = 0, + SET_PUBLISHER_NAME = 101, + ADD_PUBLISHER_PUBLIC_KEYS = 102, + REMOVE_PUBLISHER_PUBLIC_KEYS = 103, + SET_PUBLISHER_PUBLIC_KEYS = 104, + SET_PUBLISHER_ACTIVE = 105, + REMOVE_PUBLISHER = 199 + } + + /** UpdateFeedAction enum. */ + enum UpdateFeedAction { + UPDATE_FEED_ACTION_UNSPECIFIED = 0, + UPDATE_FEED_METADATA = 101, + ACTIVATE_FEED = 102, + DEACTIVATE_FEED = 103, + REMOVE_FEED = 199 + } } - /** Represents a SingleEd25519. */ - class SingleEd25519 implements ISingleEd25519 { - /** - * Constructs a new SingleEd25519. - * @param [properties] Properties to set - */ - constructor( - properties?: pyth_lazer_transaction.GovernanceSource.ISingleEd25519, - ); - - /** SingleEd25519 publicKey. */ - public publicKey?: Uint8Array | null; - - /** SingleEd25519 _publicKey. */ - public _publicKey?: "publicKey"; - - /** - * Creates a new SingleEd25519 instance using the specified properties. - * @param [properties] Properties to set - * @returns SingleEd25519 instance - */ - public static create( - properties?: pyth_lazer_transaction.GovernanceSource.ISingleEd25519, - ): pyth_lazer_transaction.GovernanceSource.SingleEd25519; - - /** - * Encodes the specified SingleEd25519 message. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.SingleEd25519.verify|verify} messages. - * @param message SingleEd25519 message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.GovernanceSource.ISingleEd25519, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified SingleEd25519 message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.SingleEd25519.verify|verify} messages. - * @param message SingleEd25519 message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.GovernanceSource.ISingleEd25519, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a SingleEd25519 message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SingleEd25519 - * @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, - ): pyth_lazer_transaction.GovernanceSource.SingleEd25519; - - /** - * Decodes a SingleEd25519 message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SingleEd25519 - * @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, - ): pyth_lazer_transaction.GovernanceSource.SingleEd25519; - - /** - * Verifies a SingleEd25519 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 SingleEd25519 message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SingleEd25519 - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.GovernanceSource.SingleEd25519; - - /** - * Creates a plain object from a SingleEd25519 message. Also converts values to other types if specified. - * @param message SingleEd25519 - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.GovernanceSource.SingleEd25519, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this SingleEd25519 to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SingleEd25519 - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** Properties of a GovernanceSource. */ + interface IGovernanceSource { + + /** GovernanceSource singleEd25519 */ + singleEd25519?: (pyth_lazer_transaction.GovernanceSource.ISingleEd25519|null); + + /** GovernanceSource wormholeEmitter */ + wormholeEmitter?: (pyth_lazer_transaction.GovernanceSource.IWormholeEmitter|null); } - } - - /** Properties of a CreateShard. */ - interface ICreateShard { - /** CreateShard shardId */ - shardId?: number | null; - - /** CreateShard shardGroup */ - shardGroup?: string | null; - - /** CreateShard minRate */ - minRate?: google.protobuf.IDuration | null; - } - - /** Represents a CreateShard. */ - class CreateShard implements ICreateShard { - /** - * Constructs a new CreateShard. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.ICreateShard); - - /** CreateShard shardId. */ - public shardId?: number | null; - - /** CreateShard shardGroup. */ - public shardGroup?: string | null; - - /** CreateShard minRate. */ - public minRate?: google.protobuf.IDuration | null; - - /** CreateShard _shardId. */ - public _shardId?: "shardId"; - - /** CreateShard _shardGroup. */ - public _shardGroup?: "shardGroup"; - - /** CreateShard _minRate. */ - public _minRate?: "minRate"; - - /** - * Creates a new CreateShard instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateShard instance - */ - public static create( - properties?: pyth_lazer_transaction.ICreateShard, - ): pyth_lazer_transaction.CreateShard; - - /** - * Encodes the specified CreateShard message. Does not implicitly {@link pyth_lazer_transaction.CreateShard.verify|verify} messages. - * @param message CreateShard message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.ICreateShard, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified CreateShard message, length delimited. Does not implicitly {@link pyth_lazer_transaction.CreateShard.verify|verify} messages. - * @param message CreateShard message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.ICreateShard, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a CreateShard message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateShard - * @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, - ): pyth_lazer_transaction.CreateShard; - - /** - * Decodes a CreateShard message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateShard - * @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, - ): pyth_lazer_transaction.CreateShard; - - /** - * Verifies a CreateShard 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 CreateShard message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateShard - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.CreateShard; - - /** - * Creates a plain object from a CreateShard message. Also converts values to other types if specified. - * @param message CreateShard - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.CreateShard, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this CreateShard to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateShard - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AddGovernanceSource. */ - interface IAddGovernanceSource { - /** AddGovernanceSource newSource */ - newSource?: pyth_lazer_transaction.IGovernanceSource | null; - - /** AddGovernanceSource permissions */ - permissions?: pyth_lazer_transaction.IPermissions | null; - } - - /** Represents an AddGovernanceSource. */ - class AddGovernanceSource implements IAddGovernanceSource { - /** - * Constructs a new AddGovernanceSource. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IAddGovernanceSource); - - /** AddGovernanceSource newSource. */ - public newSource?: pyth_lazer_transaction.IGovernanceSource | null; - - /** AddGovernanceSource permissions. */ - public permissions?: pyth_lazer_transaction.IPermissions | null; - - /** AddGovernanceSource _newSource. */ - public _newSource?: "newSource"; - - /** AddGovernanceSource _permissions. */ - public _permissions?: "permissions"; - - /** - * Creates a new AddGovernanceSource instance using the specified properties. - * @param [properties] Properties to set - * @returns AddGovernanceSource instance - */ - public static create( - properties?: pyth_lazer_transaction.IAddGovernanceSource, - ): pyth_lazer_transaction.AddGovernanceSource; - - /** - * Encodes the specified AddGovernanceSource message. Does not implicitly {@link pyth_lazer_transaction.AddGovernanceSource.verify|verify} messages. - * @param message AddGovernanceSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.IAddGovernanceSource, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified AddGovernanceSource message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddGovernanceSource.verify|verify} messages. - * @param message AddGovernanceSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.IAddGovernanceSource, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes an AddGovernanceSource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AddGovernanceSource - * @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, - ): pyth_lazer_transaction.AddGovernanceSource; - - /** - * Decodes an AddGovernanceSource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AddGovernanceSource - * @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, - ): pyth_lazer_transaction.AddGovernanceSource; - - /** - * Verifies an AddGovernanceSource 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 AddGovernanceSource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AddGovernanceSource - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.AddGovernanceSource; - - /** - * Creates a plain object from an AddGovernanceSource message. Also converts values to other types if specified. - * @param message AddGovernanceSource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.AddGovernanceSource, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this AddGovernanceSource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AddGovernanceSource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateGovernanceSource. */ - interface IUpdateGovernanceSource { - /** UpdateGovernanceSource source */ - source?: pyth_lazer_transaction.IGovernanceSource | null; - - /** UpdateGovernanceSource setGovernanceSourcePermissions */ - setGovernanceSourcePermissions?: pyth_lazer_transaction.ISetGovernanceSourcePermissions | null; - - /** UpdateGovernanceSource removeGovernanceSource */ - removeGovernanceSource?: google.protobuf.IEmpty | null; - } - - /** Represents an UpdateGovernanceSource. */ - class UpdateGovernanceSource implements IUpdateGovernanceSource { - /** - * Constructs a new UpdateGovernanceSource. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IUpdateGovernanceSource); - - /** UpdateGovernanceSource source. */ - public source?: pyth_lazer_transaction.IGovernanceSource | null; - - /** UpdateGovernanceSource setGovernanceSourcePermissions. */ - public setGovernanceSourcePermissions?: pyth_lazer_transaction.ISetGovernanceSourcePermissions | null; - - /** UpdateGovernanceSource removeGovernanceSource. */ - public removeGovernanceSource?: google.protobuf.IEmpty | null; - - /** UpdateGovernanceSource _source. */ - public _source?: "source"; - - /** UpdateGovernanceSource action. */ - public action?: "setGovernanceSourcePermissions" | "removeGovernanceSource"; - - /** - * Creates a new UpdateGovernanceSource instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateGovernanceSource instance - */ - public static create( - properties?: pyth_lazer_transaction.IUpdateGovernanceSource, - ): pyth_lazer_transaction.UpdateGovernanceSource; - - /** - * Encodes the specified UpdateGovernanceSource message. Does not implicitly {@link pyth_lazer_transaction.UpdateGovernanceSource.verify|verify} messages. - * @param message UpdateGovernanceSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.IUpdateGovernanceSource, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified UpdateGovernanceSource message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdateGovernanceSource.verify|verify} messages. - * @param message UpdateGovernanceSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.IUpdateGovernanceSource, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes an UpdateGovernanceSource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateGovernanceSource - * @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, - ): pyth_lazer_transaction.UpdateGovernanceSource; - - /** - * Decodes an UpdateGovernanceSource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateGovernanceSource - * @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, - ): pyth_lazer_transaction.UpdateGovernanceSource; - - /** - * Verifies an UpdateGovernanceSource 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 UpdateGovernanceSource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateGovernanceSource - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.UpdateGovernanceSource; - - /** - * Creates a plain object from an UpdateGovernanceSource message. Also converts values to other types if specified. - * @param message UpdateGovernanceSource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.UpdateGovernanceSource, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this UpdateGovernanceSource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateGovernanceSource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetGovernanceSourcePermissions. */ - interface ISetGovernanceSourcePermissions { - /** SetGovernanceSourcePermissions permissions */ - permissions?: pyth_lazer_transaction.IPermissions | null; - } - - /** Represents a SetGovernanceSourcePermissions. */ - class SetGovernanceSourcePermissions - implements ISetGovernanceSourcePermissions - { - /** - * Constructs a new SetGovernanceSourcePermissions. - * @param [properties] Properties to set - */ - constructor( - properties?: pyth_lazer_transaction.ISetGovernanceSourcePermissions, - ); - - /** SetGovernanceSourcePermissions permissions. */ - public permissions?: pyth_lazer_transaction.IPermissions | null; - - /** SetGovernanceSourcePermissions _permissions. */ - public _permissions?: "permissions"; - - /** - * Creates a new SetGovernanceSourcePermissions instance using the specified properties. - * @param [properties] Properties to set - * @returns SetGovernanceSourcePermissions instance - */ - public static create( - properties?: pyth_lazer_transaction.ISetGovernanceSourcePermissions, - ): pyth_lazer_transaction.SetGovernanceSourcePermissions; - - /** - * Encodes the specified SetGovernanceSourcePermissions message. Does not implicitly {@link pyth_lazer_transaction.SetGovernanceSourcePermissions.verify|verify} messages. - * @param message SetGovernanceSourcePermissions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.ISetGovernanceSourcePermissions, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified SetGovernanceSourcePermissions message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetGovernanceSourcePermissions.verify|verify} messages. - * @param message SetGovernanceSourcePermissions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.ISetGovernanceSourcePermissions, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a SetGovernanceSourcePermissions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetGovernanceSourcePermissions - * @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, - ): pyth_lazer_transaction.SetGovernanceSourcePermissions; - - /** - * Decodes a SetGovernanceSourcePermissions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetGovernanceSourcePermissions - * @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, - ): pyth_lazer_transaction.SetGovernanceSourcePermissions; - - /** - * Verifies a SetGovernanceSourcePermissions 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 SetGovernanceSourcePermissions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetGovernanceSourcePermissions - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.SetGovernanceSourcePermissions; - - /** - * Creates a plain object from a SetGovernanceSourcePermissions message. Also converts values to other types if specified. - * @param message SetGovernanceSourcePermissions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.SetGovernanceSourcePermissions, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this SetGovernanceSourcePermissions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetGovernanceSourcePermissions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetShardName. */ - interface ISetShardName { - /** SetShardName shardName */ - shardName?: string | null; - } - - /** Represents a SetShardName. */ - class SetShardName implements ISetShardName { - /** - * Constructs a new SetShardName. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.ISetShardName); - - /** SetShardName shardName. */ - public shardName?: string | null; - - /** SetShardName _shardName. */ - public _shardName?: "shardName"; - - /** - * Creates a new SetShardName instance using the specified properties. - * @param [properties] Properties to set - * @returns SetShardName instance - */ - public static create( - properties?: pyth_lazer_transaction.ISetShardName, - ): pyth_lazer_transaction.SetShardName; - - /** - * Encodes the specified SetShardName message. Does not implicitly {@link pyth_lazer_transaction.SetShardName.verify|verify} messages. - * @param message SetShardName message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.ISetShardName, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified SetShardName message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetShardName.verify|verify} messages. - * @param message SetShardName message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.ISetShardName, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a SetShardName message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetShardName - * @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, - ): pyth_lazer_transaction.SetShardName; - - /** - * Decodes a SetShardName message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetShardName - * @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, - ): pyth_lazer_transaction.SetShardName; - - /** - * Verifies a SetShardName 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 SetShardName message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetShardName - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.SetShardName; - - /** - * Creates a plain object from a SetShardName message. Also converts values to other types if specified. - * @param message SetShardName - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.SetShardName, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this SetShardName to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetShardName - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetShardGroup. */ - interface ISetShardGroup { - /** SetShardGroup shardGroup */ - shardGroup?: string | null; - } - - /** Represents a SetShardGroup. */ - class SetShardGroup implements ISetShardGroup { - /** - * Constructs a new SetShardGroup. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.ISetShardGroup); - - /** SetShardGroup shardGroup. */ - public shardGroup?: string | null; - - /** SetShardGroup _shardGroup. */ - public _shardGroup?: "shardGroup"; - - /** - * Creates a new SetShardGroup instance using the specified properties. - * @param [properties] Properties to set - * @returns SetShardGroup instance - */ - public static create( - properties?: pyth_lazer_transaction.ISetShardGroup, - ): pyth_lazer_transaction.SetShardGroup; - - /** - * Encodes the specified SetShardGroup message. Does not implicitly {@link pyth_lazer_transaction.SetShardGroup.verify|verify} messages. - * @param message SetShardGroup message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.ISetShardGroup, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified SetShardGroup message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetShardGroup.verify|verify} messages. - * @param message SetShardGroup message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.ISetShardGroup, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a SetShardGroup message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetShardGroup - * @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, - ): pyth_lazer_transaction.SetShardGroup; - - /** - * Decodes a SetShardGroup message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetShardGroup - * @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, - ): pyth_lazer_transaction.SetShardGroup; - - /** - * Verifies a SetShardGroup 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 SetShardGroup message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetShardGroup - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.SetShardGroup; - - /** - * Creates a plain object from a SetShardGroup message. Also converts values to other types if specified. - * @param message SetShardGroup - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.SetShardGroup, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this SetShardGroup to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetShardGroup - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ResetLastSequenceNo. */ - interface IResetLastSequenceNo { - /** ResetLastSequenceNo lastSequenceNo */ - lastSequenceNo?: number | Long | null; - } - - /** Represents a ResetLastSequenceNo. */ - class ResetLastSequenceNo implements IResetLastSequenceNo { - /** - * Constructs a new ResetLastSequenceNo. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IResetLastSequenceNo); - - /** ResetLastSequenceNo lastSequenceNo. */ - public lastSequenceNo?: number | Long | null; - - /** ResetLastSequenceNo _lastSequenceNo. */ - public _lastSequenceNo?: "lastSequenceNo"; - - /** - * Creates a new ResetLastSequenceNo instance using the specified properties. - * @param [properties] Properties to set - * @returns ResetLastSequenceNo instance - */ - public static create( - properties?: pyth_lazer_transaction.IResetLastSequenceNo, - ): pyth_lazer_transaction.ResetLastSequenceNo; - - /** - * Encodes the specified ResetLastSequenceNo message. Does not implicitly {@link pyth_lazer_transaction.ResetLastSequenceNo.verify|verify} messages. - * @param message ResetLastSequenceNo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.IResetLastSequenceNo, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified ResetLastSequenceNo message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ResetLastSequenceNo.verify|verify} messages. - * @param message ResetLastSequenceNo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.IResetLastSequenceNo, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a ResetLastSequenceNo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResetLastSequenceNo - * @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, - ): pyth_lazer_transaction.ResetLastSequenceNo; - - /** - * Decodes a ResetLastSequenceNo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResetLastSequenceNo - * @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, - ): pyth_lazer_transaction.ResetLastSequenceNo; - - /** - * Verifies a ResetLastSequenceNo 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 ResetLastSequenceNo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResetLastSequenceNo - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.ResetLastSequenceNo; - - /** - * Creates a plain object from a ResetLastSequenceNo message. Also converts values to other types if specified. - * @param message ResetLastSequenceNo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.ResetLastSequenceNo, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this ResetLastSequenceNo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResetLastSequenceNo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AddPublisher. */ - interface IAddPublisher { - /** AddPublisher publisherId */ - publisherId?: number | null; - - /** AddPublisher name */ - name?: string | null; - - /** AddPublisher publicKeys */ - publicKeys?: Uint8Array[] | null; - - /** AddPublisher isActive */ - isActive?: boolean | null; - } - - /** Represents an AddPublisher. */ - class AddPublisher implements IAddPublisher { - /** - * Constructs a new AddPublisher. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IAddPublisher); - - /** AddPublisher publisherId. */ - public publisherId?: number | null; - - /** AddPublisher name. */ - public name?: string | null; - - /** AddPublisher publicKeys. */ - public publicKeys: Uint8Array[]; - - /** AddPublisher isActive. */ - public isActive?: boolean | null; - - /** AddPublisher _publisherId. */ - public _publisherId?: "publisherId"; - - /** AddPublisher _name. */ - public _name?: "name"; - - /** AddPublisher _isActive. */ - public _isActive?: "isActive"; - - /** - * Creates a new AddPublisher instance using the specified properties. - * @param [properties] Properties to set - * @returns AddPublisher instance - */ - public static create( - properties?: pyth_lazer_transaction.IAddPublisher, - ): pyth_lazer_transaction.AddPublisher; - - /** - * Encodes the specified AddPublisher message. Does not implicitly {@link pyth_lazer_transaction.AddPublisher.verify|verify} messages. - * @param message AddPublisher message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.IAddPublisher, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified AddPublisher message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddPublisher.verify|verify} messages. - * @param message AddPublisher message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.IAddPublisher, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes an AddPublisher message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AddPublisher - * @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, - ): pyth_lazer_transaction.AddPublisher; - - /** - * Decodes an AddPublisher message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AddPublisher - * @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, - ): pyth_lazer_transaction.AddPublisher; - - /** - * Verifies an AddPublisher 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 AddPublisher message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AddPublisher - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.AddPublisher; - - /** - * Creates a plain object from an AddPublisher message. Also converts values to other types if specified. - * @param message AddPublisher - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.AddPublisher, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this AddPublisher to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AddPublisher - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdatePublisher. */ - interface IUpdatePublisher { - /** UpdatePublisher publisherId */ - publisherId?: number | null; - - /** UpdatePublisher setPublisherName */ - setPublisherName?: pyth_lazer_transaction.ISetPublisherName | null; - - /** UpdatePublisher addPublisherPublicKeys */ - addPublisherPublicKeys?: pyth_lazer_transaction.IAddPublisherPublicKeys | null; - - /** UpdatePublisher removePublisherPublicKeys */ - removePublisherPublicKeys?: pyth_lazer_transaction.IRemovePublisherPublicKeys | null; - - /** UpdatePublisher setPublisherPublicKeys */ - setPublisherPublicKeys?: pyth_lazer_transaction.ISetPublisherPublicKeys | null; - - /** UpdatePublisher setPublisherActive */ - setPublisherActive?: pyth_lazer_transaction.ISetPublisherActive | null; - - /** UpdatePublisher removePublisher */ - removePublisher?: google.protobuf.IEmpty | null; - } - - /** Represents an UpdatePublisher. */ - class UpdatePublisher implements IUpdatePublisher { - /** - * Constructs a new UpdatePublisher. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IUpdatePublisher); - - /** UpdatePublisher publisherId. */ - public publisherId?: number | null; - - /** UpdatePublisher setPublisherName. */ - public setPublisherName?: pyth_lazer_transaction.ISetPublisherName | null; - - /** UpdatePublisher addPublisherPublicKeys. */ - public addPublisherPublicKeys?: pyth_lazer_transaction.IAddPublisherPublicKeys | null; - - /** UpdatePublisher removePublisherPublicKeys. */ - public removePublisherPublicKeys?: pyth_lazer_transaction.IRemovePublisherPublicKeys | null; - - /** UpdatePublisher setPublisherPublicKeys. */ - public setPublisherPublicKeys?: pyth_lazer_transaction.ISetPublisherPublicKeys | null; - - /** UpdatePublisher setPublisherActive. */ - public setPublisherActive?: pyth_lazer_transaction.ISetPublisherActive | null; - - /** UpdatePublisher removePublisher. */ - public removePublisher?: google.protobuf.IEmpty | null; - - /** UpdatePublisher _publisherId. */ - public _publisherId?: "publisherId"; - - /** UpdatePublisher action. */ - public action?: - | "setPublisherName" - | "addPublisherPublicKeys" - | "removePublisherPublicKeys" - | "setPublisherPublicKeys" - | "setPublisherActive" - | "removePublisher"; - - /** - * Creates a new UpdatePublisher instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdatePublisher instance - */ - public static create( - properties?: pyth_lazer_transaction.IUpdatePublisher, - ): pyth_lazer_transaction.UpdatePublisher; - - /** - * Encodes the specified UpdatePublisher message. Does not implicitly {@link pyth_lazer_transaction.UpdatePublisher.verify|verify} messages. - * @param message UpdatePublisher message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.IUpdatePublisher, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified UpdatePublisher message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdatePublisher.verify|verify} messages. - * @param message UpdatePublisher message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.IUpdatePublisher, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes an UpdatePublisher message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdatePublisher - * @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, - ): pyth_lazer_transaction.UpdatePublisher; - - /** - * Decodes an UpdatePublisher message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdatePublisher - * @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, - ): pyth_lazer_transaction.UpdatePublisher; - - /** - * Verifies an UpdatePublisher 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 UpdatePublisher message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdatePublisher - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.UpdatePublisher; - - /** - * Creates a plain object from an UpdatePublisher message. Also converts values to other types if specified. - * @param message UpdatePublisher - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.UpdatePublisher, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this UpdatePublisher to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdatePublisher - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetPublisherName. */ - interface ISetPublisherName { - /** SetPublisherName name */ - name?: string | null; - } - - /** Represents a SetPublisherName. */ - class SetPublisherName implements ISetPublisherName { - /** - * Constructs a new SetPublisherName. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.ISetPublisherName); - - /** SetPublisherName name. */ - public name?: string | null; - - /** SetPublisherName _name. */ - public _name?: "name"; - - /** - * Creates a new SetPublisherName instance using the specified properties. - * @param [properties] Properties to set - * @returns SetPublisherName instance - */ - public static create( - properties?: pyth_lazer_transaction.ISetPublisherName, - ): pyth_lazer_transaction.SetPublisherName; - - /** - * Encodes the specified SetPublisherName message. Does not implicitly {@link pyth_lazer_transaction.SetPublisherName.verify|verify} messages. - * @param message SetPublisherName message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.ISetPublisherName, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified SetPublisherName message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetPublisherName.verify|verify} messages. - * @param message SetPublisherName message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.ISetPublisherName, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a SetPublisherName message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetPublisherName - * @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, - ): pyth_lazer_transaction.SetPublisherName; - - /** - * Decodes a SetPublisherName message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetPublisherName - * @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, - ): pyth_lazer_transaction.SetPublisherName; - - /** - * Verifies a SetPublisherName 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 SetPublisherName message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetPublisherName - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.SetPublisherName; - - /** - * Creates a plain object from a SetPublisherName message. Also converts values to other types if specified. - * @param message SetPublisherName - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.SetPublisherName, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this SetPublisherName to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetPublisherName - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AddPublisherPublicKeys. */ - interface IAddPublisherPublicKeys { - /** AddPublisherPublicKeys publicKeys */ - publicKeys?: Uint8Array[] | null; - } - - /** Represents an AddPublisherPublicKeys. */ - class AddPublisherPublicKeys implements IAddPublisherPublicKeys { - /** - * Constructs a new AddPublisherPublicKeys. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IAddPublisherPublicKeys); - - /** AddPublisherPublicKeys publicKeys. */ - public publicKeys: Uint8Array[]; - - /** - * Creates a new AddPublisherPublicKeys instance using the specified properties. - * @param [properties] Properties to set - * @returns AddPublisherPublicKeys instance - */ - public static create( - properties?: pyth_lazer_transaction.IAddPublisherPublicKeys, - ): pyth_lazer_transaction.AddPublisherPublicKeys; - - /** - * Encodes the specified AddPublisherPublicKeys message. Does not implicitly {@link pyth_lazer_transaction.AddPublisherPublicKeys.verify|verify} messages. - * @param message AddPublisherPublicKeys message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.IAddPublisherPublicKeys, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified AddPublisherPublicKeys message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddPublisherPublicKeys.verify|verify} messages. - * @param message AddPublisherPublicKeys message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.IAddPublisherPublicKeys, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes an AddPublisherPublicKeys message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AddPublisherPublicKeys - * @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, - ): pyth_lazer_transaction.AddPublisherPublicKeys; - - /** - * Decodes an AddPublisherPublicKeys message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AddPublisherPublicKeys - * @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, - ): pyth_lazer_transaction.AddPublisherPublicKeys; - - /** - * Verifies an AddPublisherPublicKeys 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 AddPublisherPublicKeys message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AddPublisherPublicKeys - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.AddPublisherPublicKeys; - - /** - * Creates a plain object from an AddPublisherPublicKeys message. Also converts values to other types if specified. - * @param message AddPublisherPublicKeys - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.AddPublisherPublicKeys, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this AddPublisherPublicKeys to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AddPublisherPublicKeys - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RemovePublisherPublicKeys. */ - interface IRemovePublisherPublicKeys { - /** RemovePublisherPublicKeys publicKeys */ - publicKeys?: Uint8Array[] | null; - } - - /** Represents a RemovePublisherPublicKeys. */ - class RemovePublisherPublicKeys implements IRemovePublisherPublicKeys { - /** - * Constructs a new RemovePublisherPublicKeys. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IRemovePublisherPublicKeys); - - /** RemovePublisherPublicKeys publicKeys. */ - public publicKeys: Uint8Array[]; - - /** - * Creates a new RemovePublisherPublicKeys instance using the specified properties. - * @param [properties] Properties to set - * @returns RemovePublisherPublicKeys instance - */ - public static create( - properties?: pyth_lazer_transaction.IRemovePublisherPublicKeys, - ): pyth_lazer_transaction.RemovePublisherPublicKeys; - - /** - * Encodes the specified RemovePublisherPublicKeys message. Does not implicitly {@link pyth_lazer_transaction.RemovePublisherPublicKeys.verify|verify} messages. - * @param message RemovePublisherPublicKeys message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.IRemovePublisherPublicKeys, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified RemovePublisherPublicKeys message, length delimited. Does not implicitly {@link pyth_lazer_transaction.RemovePublisherPublicKeys.verify|verify} messages. - * @param message RemovePublisherPublicKeys message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.IRemovePublisherPublicKeys, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a RemovePublisherPublicKeys message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RemovePublisherPublicKeys - * @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, - ): pyth_lazer_transaction.RemovePublisherPublicKeys; - - /** - * Decodes a RemovePublisherPublicKeys message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RemovePublisherPublicKeys - * @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, - ): pyth_lazer_transaction.RemovePublisherPublicKeys; - - /** - * Verifies a RemovePublisherPublicKeys 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 RemovePublisherPublicKeys message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RemovePublisherPublicKeys - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.RemovePublisherPublicKeys; - - /** - * Creates a plain object from a RemovePublisherPublicKeys message. Also converts values to other types if specified. - * @param message RemovePublisherPublicKeys - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.RemovePublisherPublicKeys, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this RemovePublisherPublicKeys to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RemovePublisherPublicKeys - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetPublisherPublicKeys. */ - interface ISetPublisherPublicKeys { - /** SetPublisherPublicKeys publicKeys */ - publicKeys?: Uint8Array[] | null; - } - - /** Represents a SetPublisherPublicKeys. */ - class SetPublisherPublicKeys implements ISetPublisherPublicKeys { - /** - * Constructs a new SetPublisherPublicKeys. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.ISetPublisherPublicKeys); - - /** SetPublisherPublicKeys publicKeys. */ - public publicKeys: Uint8Array[]; - - /** - * Creates a new SetPublisherPublicKeys instance using the specified properties. - * @param [properties] Properties to set - * @returns SetPublisherPublicKeys instance - */ - public static create( - properties?: pyth_lazer_transaction.ISetPublisherPublicKeys, - ): pyth_lazer_transaction.SetPublisherPublicKeys; - - /** - * Encodes the specified SetPublisherPublicKeys message. Does not implicitly {@link pyth_lazer_transaction.SetPublisherPublicKeys.verify|verify} messages. - * @param message SetPublisherPublicKeys message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.ISetPublisherPublicKeys, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified SetPublisherPublicKeys message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetPublisherPublicKeys.verify|verify} messages. - * @param message SetPublisherPublicKeys message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.ISetPublisherPublicKeys, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a SetPublisherPublicKeys message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetPublisherPublicKeys - * @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, - ): pyth_lazer_transaction.SetPublisherPublicKeys; - - /** - * Decodes a SetPublisherPublicKeys message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetPublisherPublicKeys - * @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, - ): pyth_lazer_transaction.SetPublisherPublicKeys; - - /** - * Verifies a SetPublisherPublicKeys 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 SetPublisherPublicKeys message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetPublisherPublicKeys - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.SetPublisherPublicKeys; - - /** - * Creates a plain object from a SetPublisherPublicKeys message. Also converts values to other types if specified. - * @param message SetPublisherPublicKeys - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.SetPublisherPublicKeys, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this SetPublisherPublicKeys to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetPublisherPublicKeys - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetPublisherActive. */ - interface ISetPublisherActive { - /** SetPublisherActive isActive */ - isActive?: boolean | null; - } - - /** Represents a SetPublisherActive. */ - class SetPublisherActive implements ISetPublisherActive { - /** - * Constructs a new SetPublisherActive. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.ISetPublisherActive); - - /** SetPublisherActive isActive. */ - public isActive?: boolean | null; - - /** SetPublisherActive _isActive. */ - public _isActive?: "isActive"; - - /** - * Creates a new SetPublisherActive instance using the specified properties. - * @param [properties] Properties to set - * @returns SetPublisherActive instance - */ - public static create( - properties?: pyth_lazer_transaction.ISetPublisherActive, - ): pyth_lazer_transaction.SetPublisherActive; - - /** - * Encodes the specified SetPublisherActive message. Does not implicitly {@link pyth_lazer_transaction.SetPublisherActive.verify|verify} messages. - * @param message SetPublisherActive message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.ISetPublisherActive, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified SetPublisherActive message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetPublisherActive.verify|verify} messages. - * @param message SetPublisherActive message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.ISetPublisherActive, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a SetPublisherActive message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetPublisherActive - * @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, - ): pyth_lazer_transaction.SetPublisherActive; - - /** - * Decodes a SetPublisherActive message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetPublisherActive - * @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, - ): pyth_lazer_transaction.SetPublisherActive; - - /** - * Verifies a SetPublisherActive 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 SetPublisherActive message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetPublisherActive - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.SetPublisherActive; - - /** - * Creates a plain object from a SetPublisherActive message. Also converts values to other types if specified. - * @param message SetPublisherActive - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.SetPublisherActive, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this SetPublisherActive to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetPublisherActive - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AddFeed. */ - interface IAddFeed { - /** AddFeed priceFeedId */ - priceFeedId?: number | null; - - /** AddFeed metadata */ - metadata?: pyth_lazer_transaction.DynamicValue.IMap | null; - - /** AddFeed permissionedPublishers */ - permissionedPublishers?: number[] | null; - } - - /** Represents an AddFeed. */ - class AddFeed implements IAddFeed { - /** - * Constructs a new AddFeed. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IAddFeed); - - /** AddFeed priceFeedId. */ - public priceFeedId?: number | null; - - /** AddFeed metadata. */ - public metadata?: pyth_lazer_transaction.DynamicValue.IMap | null; - - /** AddFeed permissionedPublishers. */ - public permissionedPublishers: number[]; - - /** AddFeed _priceFeedId. */ - public _priceFeedId?: "priceFeedId"; - - /** AddFeed _metadata. */ - public _metadata?: "metadata"; - - /** - * Creates a new AddFeed instance using the specified properties. - * @param [properties] Properties to set - * @returns AddFeed instance - */ - public static create( - properties?: pyth_lazer_transaction.IAddFeed, - ): pyth_lazer_transaction.AddFeed; - - /** - * Encodes the specified AddFeed message. Does not implicitly {@link pyth_lazer_transaction.AddFeed.verify|verify} messages. - * @param message AddFeed message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.IAddFeed, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified AddFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddFeed.verify|verify} messages. - * @param message AddFeed message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.IAddFeed, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes an AddFeed message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AddFeed - * @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, - ): pyth_lazer_transaction.AddFeed; - - /** - * Decodes an AddFeed message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AddFeed - * @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, - ): pyth_lazer_transaction.AddFeed; - - /** - * Verifies an AddFeed 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 AddFeed message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AddFeed - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.AddFeed; - - /** - * Creates a plain object from an AddFeed message. Also converts values to other types if specified. - * @param message AddFeed - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.AddFeed, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this AddFeed to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AddFeed - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateFeed. */ - interface IUpdateFeed { - /** UpdateFeed priceFeedId */ - priceFeedId?: number | null; - - /** UpdateFeed updateFeedMetadata */ - updateFeedMetadata?: pyth_lazer_transaction.IUpdateFeedMetadata | null; - - /** UpdateFeed activateFeed */ - activateFeed?: pyth_lazer_transaction.IActivateFeed | null; - - /** UpdateFeed deactivateFeed */ - deactivateFeed?: pyth_lazer_transaction.IDeactivateFeed | null; - - /** UpdateFeed removeFeed */ - removeFeed?: google.protobuf.IEmpty | null; - } - - /** Represents an UpdateFeed. */ - class UpdateFeed implements IUpdateFeed { - /** - * Constructs a new UpdateFeed. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IUpdateFeed); - - /** UpdateFeed priceFeedId. */ - public priceFeedId?: number | null; - - /** UpdateFeed updateFeedMetadata. */ - public updateFeedMetadata?: pyth_lazer_transaction.IUpdateFeedMetadata | null; - - /** UpdateFeed activateFeed. */ - public activateFeed?: pyth_lazer_transaction.IActivateFeed | null; - - /** UpdateFeed deactivateFeed. */ - public deactivateFeed?: pyth_lazer_transaction.IDeactivateFeed | null; - - /** UpdateFeed removeFeed. */ - public removeFeed?: google.protobuf.IEmpty | null; - - /** UpdateFeed _priceFeedId. */ - public _priceFeedId?: "priceFeedId"; - - /** UpdateFeed action. */ - public action?: - | "updateFeedMetadata" - | "activateFeed" - | "deactivateFeed" - | "removeFeed"; - - /** - * Creates a new UpdateFeed instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateFeed instance - */ - public static create( - properties?: pyth_lazer_transaction.IUpdateFeed, - ): pyth_lazer_transaction.UpdateFeed; - - /** - * Encodes the specified UpdateFeed message. Does not implicitly {@link pyth_lazer_transaction.UpdateFeed.verify|verify} messages. - * @param message UpdateFeed message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.IUpdateFeed, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified UpdateFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdateFeed.verify|verify} messages. - * @param message UpdateFeed message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.IUpdateFeed, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes an UpdateFeed message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateFeed - * @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, - ): pyth_lazer_transaction.UpdateFeed; - - /** - * Decodes an UpdateFeed message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateFeed - * @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, - ): pyth_lazer_transaction.UpdateFeed; - - /** - * Verifies an UpdateFeed 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 UpdateFeed message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateFeed - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.UpdateFeed; - - /** - * Creates a plain object from an UpdateFeed message. Also converts values to other types if specified. - * @param message UpdateFeed - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.UpdateFeed, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this UpdateFeed to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateFeed - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateFeedMetadata. */ - interface IUpdateFeedMetadata { - /** UpdateFeedMetadata name */ - name?: string | null; - - /** UpdateFeedMetadata value */ - value?: pyth_lazer_transaction.IDynamicValue | null; - } - - /** Represents an UpdateFeedMetadata. */ - class UpdateFeedMetadata implements IUpdateFeedMetadata { - /** - * Constructs a new UpdateFeedMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IUpdateFeedMetadata); - - /** UpdateFeedMetadata name. */ - public name?: string | null; - - /** UpdateFeedMetadata value. */ - public value?: pyth_lazer_transaction.IDynamicValue | null; - - /** UpdateFeedMetadata _name. */ - public _name?: "name"; - - /** UpdateFeedMetadata _value. */ - public _value?: "value"; - - /** - * Creates a new UpdateFeedMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateFeedMetadata instance - */ - public static create( - properties?: pyth_lazer_transaction.IUpdateFeedMetadata, - ): pyth_lazer_transaction.UpdateFeedMetadata; - - /** - * Encodes the specified UpdateFeedMetadata message. Does not implicitly {@link pyth_lazer_transaction.UpdateFeedMetadata.verify|verify} messages. - * @param message UpdateFeedMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.IUpdateFeedMetadata, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified UpdateFeedMetadata message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdateFeedMetadata.verify|verify} messages. - * @param message UpdateFeedMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.IUpdateFeedMetadata, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes an UpdateFeedMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateFeedMetadata - * @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, - ): pyth_lazer_transaction.UpdateFeedMetadata; - - /** - * Decodes an UpdateFeedMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateFeedMetadata - * @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, - ): pyth_lazer_transaction.UpdateFeedMetadata; - - /** - * Verifies an UpdateFeedMetadata 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 UpdateFeedMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateFeedMetadata - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.UpdateFeedMetadata; - - /** - * Creates a plain object from an UpdateFeedMetadata message. Also converts values to other types if specified. - * @param message UpdateFeedMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.UpdateFeedMetadata, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this UpdateFeedMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateFeedMetadata - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ActivateFeed. */ - interface IActivateFeed { - /** ActivateFeed activationTimestamp */ - activationTimestamp?: google.protobuf.ITimestamp | null; - } - - /** Represents an ActivateFeed. */ - class ActivateFeed implements IActivateFeed { - /** - * Constructs a new ActivateFeed. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IActivateFeed); - - /** ActivateFeed activationTimestamp. */ - public activationTimestamp?: google.protobuf.ITimestamp | null; - - /** ActivateFeed _activationTimestamp. */ - public _activationTimestamp?: "activationTimestamp"; - - /** - * Creates a new ActivateFeed instance using the specified properties. - * @param [properties] Properties to set - * @returns ActivateFeed instance - */ - public static create( - properties?: pyth_lazer_transaction.IActivateFeed, - ): pyth_lazer_transaction.ActivateFeed; - - /** - * Encodes the specified ActivateFeed message. Does not implicitly {@link pyth_lazer_transaction.ActivateFeed.verify|verify} messages. - * @param message ActivateFeed message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.IActivateFeed, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified ActivateFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ActivateFeed.verify|verify} messages. - * @param message ActivateFeed message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.IActivateFeed, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes an ActivateFeed message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ActivateFeed - * @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, - ): pyth_lazer_transaction.ActivateFeed; - - /** - * Decodes an ActivateFeed message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ActivateFeed - * @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, - ): pyth_lazer_transaction.ActivateFeed; - - /** - * Verifies an ActivateFeed 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 ActivateFeed message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ActivateFeed - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.ActivateFeed; - - /** - * Creates a plain object from an ActivateFeed message. Also converts values to other types if specified. - * @param message ActivateFeed - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.ActivateFeed, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this ActivateFeed to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ActivateFeed - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeactivateFeed. */ - interface IDeactivateFeed { - /** DeactivateFeed deactivationTimestamp */ - deactivationTimestamp?: google.protobuf.ITimestamp | null; - } - - /** Represents a DeactivateFeed. */ - class DeactivateFeed implements IDeactivateFeed { - /** - * Constructs a new DeactivateFeed. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IDeactivateFeed); - - /** DeactivateFeed deactivationTimestamp. */ - public deactivationTimestamp?: google.protobuf.ITimestamp | null; - - /** DeactivateFeed _deactivationTimestamp. */ - public _deactivationTimestamp?: "deactivationTimestamp"; - - /** - * Creates a new DeactivateFeed instance using the specified properties. - * @param [properties] Properties to set - * @returns DeactivateFeed instance - */ - public static create( - properties?: pyth_lazer_transaction.IDeactivateFeed, - ): pyth_lazer_transaction.DeactivateFeed; - - /** - * Encodes the specified DeactivateFeed message. Does not implicitly {@link pyth_lazer_transaction.DeactivateFeed.verify|verify} messages. - * @param message DeactivateFeed message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.IDeactivateFeed, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified DeactivateFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DeactivateFeed.verify|verify} messages. - * @param message DeactivateFeed message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.IDeactivateFeed, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a DeactivateFeed message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeactivateFeed - * @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, - ): pyth_lazer_transaction.DeactivateFeed; - - /** - * Decodes a DeactivateFeed message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeactivateFeed - * @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, - ): pyth_lazer_transaction.DeactivateFeed; - - /** - * Verifies a DeactivateFeed 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 DeactivateFeed message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeactivateFeed - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.DeactivateFeed; - - /** - * Creates a plain object from a DeactivateFeed message. Also converts values to other types if specified. - * @param message DeactivateFeed - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.DeactivateFeed, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this DeactivateFeed to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeactivateFeed - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DynamicValue. */ - interface IDynamicValue { - /** DynamicValue stringValue */ - stringValue?: string | null; - - /** DynamicValue doubleValue */ - doubleValue?: number | null; - - /** DynamicValue uintValue */ - uintValue?: number | Long | null; - - /** DynamicValue intValue */ - intValue?: number | Long | null; - - /** DynamicValue boolValue */ - boolValue?: boolean | null; - - /** DynamicValue bytesValue */ - bytesValue?: Uint8Array | null; - - /** DynamicValue durationValue */ - durationValue?: google.protobuf.IDuration | null; - - /** DynamicValue timestampValue */ - timestampValue?: google.protobuf.ITimestamp | null; - - /** DynamicValue list */ - list?: pyth_lazer_transaction.DynamicValue.IList | null; - - /** DynamicValue map */ - map?: pyth_lazer_transaction.DynamicValue.IMap | null; - } - - /** Represents a DynamicValue. */ - class DynamicValue implements IDynamicValue { - /** - * Constructs a new DynamicValue. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IDynamicValue); - - /** DynamicValue stringValue. */ - public stringValue?: string | null; - - /** DynamicValue doubleValue. */ - public doubleValue?: number | null; - - /** DynamicValue uintValue. */ - public uintValue?: number | Long | null; - - /** DynamicValue intValue. */ - public intValue?: number | Long | null; - - /** DynamicValue boolValue. */ - public boolValue?: boolean | null; - - /** DynamicValue bytesValue. */ - public bytesValue?: Uint8Array | null; - - /** DynamicValue durationValue. */ - public durationValue?: google.protobuf.IDuration | null; - - /** DynamicValue timestampValue. */ - public timestampValue?: google.protobuf.ITimestamp | null; - - /** DynamicValue list. */ - public list?: pyth_lazer_transaction.DynamicValue.IList | null; - - /** DynamicValue map. */ - public map?: pyth_lazer_transaction.DynamicValue.IMap | null; - - /** DynamicValue value. */ - public value?: - | "stringValue" - | "doubleValue" - | "uintValue" - | "intValue" - | "boolValue" - | "bytesValue" - | "durationValue" - | "timestampValue" - | "list" - | "map"; - - /** - * Creates a new DynamicValue instance using the specified properties. - * @param [properties] Properties to set - * @returns DynamicValue instance - */ - public static create( - properties?: pyth_lazer_transaction.IDynamicValue, - ): pyth_lazer_transaction.DynamicValue; - - /** - * Encodes the specified DynamicValue message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.verify|verify} messages. - * @param message DynamicValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.IDynamicValue, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified DynamicValue message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.verify|verify} messages. - * @param message DynamicValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.IDynamicValue, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a DynamicValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DynamicValue - * @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, - ): pyth_lazer_transaction.DynamicValue; - - /** - * Decodes a DynamicValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DynamicValue - * @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, - ): pyth_lazer_transaction.DynamicValue; - - /** - * Verifies a DynamicValue 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 DynamicValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DynamicValue - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.DynamicValue; - - /** - * Creates a plain object from a DynamicValue message. Also converts values to other types if specified. - * @param message DynamicValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.DynamicValue, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this DynamicValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DynamicValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DynamicValue { - /** Properties of a List. */ - interface IList { - /** List items */ - items?: pyth_lazer_transaction.IDynamicValue[] | null; + + /** Represents a GovernanceSource. */ + class GovernanceSource implements IGovernanceSource { + + /** + * Constructs a new GovernanceSource. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IGovernanceSource); + + /** GovernanceSource singleEd25519. */ + public singleEd25519?: (pyth_lazer_transaction.GovernanceSource.ISingleEd25519|null); + + /** GovernanceSource wormholeEmitter. */ + public wormholeEmitter?: (pyth_lazer_transaction.GovernanceSource.IWormholeEmitter|null); + + /** GovernanceSource source. */ + public source?: ("singleEd25519"|"wormholeEmitter"); + + /** + * Creates a new GovernanceSource instance using the specified properties. + * @param [properties] Properties to set + * @returns GovernanceSource instance + */ + public static create(properties?: pyth_lazer_transaction.IGovernanceSource): pyth_lazer_transaction.GovernanceSource; + + /** + * Encodes the specified GovernanceSource message. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.verify|verify} messages. + * @param message GovernanceSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IGovernanceSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GovernanceSource message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.verify|verify} messages. + * @param message GovernanceSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IGovernanceSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GovernanceSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GovernanceSource + * @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): pyth_lazer_transaction.GovernanceSource; + + /** + * Decodes a GovernanceSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GovernanceSource + * @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)): pyth_lazer_transaction.GovernanceSource; + + /** + * Verifies a GovernanceSource 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 GovernanceSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GovernanceSource + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.GovernanceSource; + + /** + * Creates a plain object from a GovernanceSource message. Also converts values to other types if specified. + * @param message GovernanceSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.GovernanceSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GovernanceSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GovernanceSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Represents a List. */ - class List implements IList { - /** - * Constructs a new List. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.DynamicValue.IList); - - /** List items. */ - public items: pyth_lazer_transaction.IDynamicValue[]; - - /** - * Creates a new List instance using the specified properties. - * @param [properties] Properties to set - * @returns List instance - */ - public static create( - properties?: pyth_lazer_transaction.DynamicValue.IList, - ): pyth_lazer_transaction.DynamicValue.List; - - /** - * Encodes the specified List message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.List.verify|verify} messages. - * @param message List message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.DynamicValue.IList, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified List message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.List.verify|verify} messages. - * @param message List message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.DynamicValue.IList, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a List message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns List - * @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, - ): pyth_lazer_transaction.DynamicValue.List; - - /** - * Decodes a List message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns List - * @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, - ): pyth_lazer_transaction.DynamicValue.List; - - /** - * Verifies a List 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 List message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns List - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.DynamicValue.List; - - /** - * Creates a plain object from a List message. Also converts values to other types if specified. - * @param message List - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.DynamicValue.List, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this List to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for List - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + namespace GovernanceSource { + + /** Properties of a SingleEd25519. */ + interface ISingleEd25519 { + + /** SingleEd25519 publicKey */ + publicKey?: (Uint8Array|null); + } + + /** Represents a SingleEd25519. */ + class SingleEd25519 implements ISingleEd25519 { + + /** + * Constructs a new SingleEd25519. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.GovernanceSource.ISingleEd25519); + + /** SingleEd25519 publicKey. */ + public publicKey?: (Uint8Array|null); + + /** SingleEd25519 _publicKey. */ + public _publicKey?: "publicKey"; + + /** + * Creates a new SingleEd25519 instance using the specified properties. + * @param [properties] Properties to set + * @returns SingleEd25519 instance + */ + public static create(properties?: pyth_lazer_transaction.GovernanceSource.ISingleEd25519): pyth_lazer_transaction.GovernanceSource.SingleEd25519; + + /** + * Encodes the specified SingleEd25519 message. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.SingleEd25519.verify|verify} messages. + * @param message SingleEd25519 message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.GovernanceSource.ISingleEd25519, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SingleEd25519 message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.SingleEd25519.verify|verify} messages. + * @param message SingleEd25519 message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.GovernanceSource.ISingleEd25519, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SingleEd25519 message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SingleEd25519 + * @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): pyth_lazer_transaction.GovernanceSource.SingleEd25519; + + /** + * Decodes a SingleEd25519 message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SingleEd25519 + * @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)): pyth_lazer_transaction.GovernanceSource.SingleEd25519; + + /** + * Verifies a SingleEd25519 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 SingleEd25519 message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SingleEd25519 + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.GovernanceSource.SingleEd25519; + + /** + * Creates a plain object from a SingleEd25519 message. Also converts values to other types if specified. + * @param message SingleEd25519 + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.GovernanceSource.SingleEd25519, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SingleEd25519 to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SingleEd25519 + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a WormholeEmitter. */ + interface IWormholeEmitter { + + /** WormholeEmitter address */ + address?: (Uint8Array|null); + + /** WormholeEmitter chainId */ + chainId?: (number|null); + } + + /** Represents a WormholeEmitter. */ + class WormholeEmitter implements IWormholeEmitter { + + /** + * Constructs a new WormholeEmitter. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.GovernanceSource.IWormholeEmitter); + + /** WormholeEmitter address. */ + public address?: (Uint8Array|null); + + /** WormholeEmitter chainId. */ + public chainId?: (number|null); + + /** WormholeEmitter _address. */ + public _address?: "address"; + + /** WormholeEmitter _chainId. */ + public _chainId?: "chainId"; + + /** + * Creates a new WormholeEmitter instance using the specified properties. + * @param [properties] Properties to set + * @returns WormholeEmitter instance + */ + public static create(properties?: pyth_lazer_transaction.GovernanceSource.IWormholeEmitter): pyth_lazer_transaction.GovernanceSource.WormholeEmitter; + + /** + * Encodes the specified WormholeEmitter message. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.WormholeEmitter.verify|verify} messages. + * @param message WormholeEmitter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.GovernanceSource.IWormholeEmitter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WormholeEmitter message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.WormholeEmitter.verify|verify} messages. + * @param message WormholeEmitter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.GovernanceSource.IWormholeEmitter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WormholeEmitter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WormholeEmitter + * @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): pyth_lazer_transaction.GovernanceSource.WormholeEmitter; + + /** + * Decodes a WormholeEmitter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WormholeEmitter + * @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)): pyth_lazer_transaction.GovernanceSource.WormholeEmitter; + + /** + * Verifies a WormholeEmitter 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 WormholeEmitter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WormholeEmitter + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.GovernanceSource.WormholeEmitter; + + /** + * Creates a plain object from a WormholeEmitter message. Also converts values to other types if specified. + * @param message WormholeEmitter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.GovernanceSource.WormholeEmitter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WormholeEmitter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WormholeEmitter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } - /** Properties of a MapItem. */ - interface IMapItem { - /** MapItem key */ - key?: string | null; + /** Properties of a CreateShard. */ + interface ICreateShard { + + /** CreateShard shardId */ + shardId?: (number|null); - /** MapItem value */ - value?: pyth_lazer_transaction.IDynamicValue | null; + /** CreateShard shardGroup */ + shardGroup?: (string|null); + + /** CreateShard minRate */ + minRate?: (google.protobuf.IDuration|null); } - /** Represents a MapItem. */ - class MapItem implements IMapItem { - /** - * Constructs a new MapItem. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.DynamicValue.IMapItem); - - /** MapItem key. */ - public key?: string | null; - - /** MapItem value. */ - public value?: pyth_lazer_transaction.IDynamicValue | null; - - /** MapItem _key. */ - public _key?: "key"; - - /** MapItem _value. */ - public _value?: "value"; - - /** - * Creates a new MapItem instance using the specified properties. - * @param [properties] Properties to set - * @returns MapItem instance - */ - public static create( - properties?: pyth_lazer_transaction.DynamicValue.IMapItem, - ): pyth_lazer_transaction.DynamicValue.MapItem; - - /** - * Encodes the specified MapItem message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.MapItem.verify|verify} messages. - * @param message MapItem message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.DynamicValue.IMapItem, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified MapItem message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.MapItem.verify|verify} messages. - * @param message MapItem message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.DynamicValue.IMapItem, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a MapItem message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MapItem - * @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, - ): pyth_lazer_transaction.DynamicValue.MapItem; - - /** - * Decodes a MapItem message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MapItem - * @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, - ): pyth_lazer_transaction.DynamicValue.MapItem; - - /** - * Verifies a MapItem 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 MapItem message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MapItem - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.DynamicValue.MapItem; - - /** - * Creates a plain object from a MapItem message. Also converts values to other types if specified. - * @param message MapItem - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.DynamicValue.MapItem, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this MapItem to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MapItem - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** Represents a CreateShard. */ + class CreateShard implements ICreateShard { + + /** + * Constructs a new CreateShard. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ICreateShard); + + /** CreateShard shardId. */ + public shardId?: (number|null); + + /** CreateShard shardGroup. */ + public shardGroup?: (string|null); + + /** CreateShard minRate. */ + public minRate?: (google.protobuf.IDuration|null); + + /** CreateShard _shardId. */ + public _shardId?: "shardId"; + + /** CreateShard _shardGroup. */ + public _shardGroup?: "shardGroup"; + + /** CreateShard _minRate. */ + public _minRate?: "minRate"; + + /** + * Creates a new CreateShard instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateShard instance + */ + public static create(properties?: pyth_lazer_transaction.ICreateShard): pyth_lazer_transaction.CreateShard; + + /** + * Encodes the specified CreateShard message. Does not implicitly {@link pyth_lazer_transaction.CreateShard.verify|verify} messages. + * @param message CreateShard message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.ICreateShard, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateShard message, length delimited. Does not implicitly {@link pyth_lazer_transaction.CreateShard.verify|verify} messages. + * @param message CreateShard message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.ICreateShard, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateShard message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateShard + * @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): pyth_lazer_transaction.CreateShard; + + /** + * Decodes a CreateShard message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateShard + * @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)): pyth_lazer_transaction.CreateShard; + + /** + * Verifies a CreateShard 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 CreateShard message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateShard + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.CreateShard; + + /** + * Creates a plain object from a CreateShard message. Also converts values to other types if specified. + * @param message CreateShard + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.CreateShard, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateShard to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateShard + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Map. */ - interface IMap { - /** Map items */ - items?: pyth_lazer_transaction.DynamicValue.IMapItem[] | null; + /** Properties of an AddGovernanceSource. */ + interface IAddGovernanceSource { + + /** AddGovernanceSource newSource */ + newSource?: (pyth_lazer_transaction.IGovernanceSource|null); + + /** AddGovernanceSource permissions */ + permissions?: (pyth_lazer_transaction.IPermissions|null); } - /** Represents a Map. */ - class Map implements IMap { - /** - * Constructs a new Map. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.DynamicValue.IMap); - - /** Map items. */ - public items: pyth_lazer_transaction.DynamicValue.IMapItem[]; - - /** - * Creates a new Map instance using the specified properties. - * @param [properties] Properties to set - * @returns Map instance - */ - public static create( - properties?: pyth_lazer_transaction.DynamicValue.IMap, - ): pyth_lazer_transaction.DynamicValue.Map; - - /** - * Encodes the specified Map message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.Map.verify|verify} messages. - * @param message Map message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.DynamicValue.IMap, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified Map message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.Map.verify|verify} messages. - * @param message Map message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.DynamicValue.IMap, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a Map message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Map - * @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, - ): pyth_lazer_transaction.DynamicValue.Map; - - /** - * Decodes a Map message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Map - * @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, - ): pyth_lazer_transaction.DynamicValue.Map; - - /** - * Verifies a Map 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 Map message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Map - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.DynamicValue.Map; - - /** - * Creates a plain object from a Map message. Also converts values to other types if specified. - * @param message Map - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.DynamicValue.Map, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this Map to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Map - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** Represents an AddGovernanceSource. */ + class AddGovernanceSource implements IAddGovernanceSource { + + /** + * Constructs a new AddGovernanceSource. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IAddGovernanceSource); + + /** AddGovernanceSource newSource. */ + public newSource?: (pyth_lazer_transaction.IGovernanceSource|null); + + /** AddGovernanceSource permissions. */ + public permissions?: (pyth_lazer_transaction.IPermissions|null); + + /** AddGovernanceSource _newSource. */ + public _newSource?: "newSource"; + + /** AddGovernanceSource _permissions. */ + public _permissions?: "permissions"; + + /** + * Creates a new AddGovernanceSource instance using the specified properties. + * @param [properties] Properties to set + * @returns AddGovernanceSource instance + */ + public static create(properties?: pyth_lazer_transaction.IAddGovernanceSource): pyth_lazer_transaction.AddGovernanceSource; + + /** + * Encodes the specified AddGovernanceSource message. Does not implicitly {@link pyth_lazer_transaction.AddGovernanceSource.verify|verify} messages. + * @param message AddGovernanceSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IAddGovernanceSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AddGovernanceSource message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddGovernanceSource.verify|verify} messages. + * @param message AddGovernanceSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IAddGovernanceSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AddGovernanceSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AddGovernanceSource + * @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): pyth_lazer_transaction.AddGovernanceSource; + + /** + * Decodes an AddGovernanceSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AddGovernanceSource + * @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)): pyth_lazer_transaction.AddGovernanceSource; + + /** + * Verifies an AddGovernanceSource 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 AddGovernanceSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AddGovernanceSource + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.AddGovernanceSource; + + /** + * Creates a plain object from an AddGovernanceSource message. Also converts values to other types if specified. + * @param message AddGovernanceSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.AddGovernanceSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AddGovernanceSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AddGovernanceSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - } -} -/** Namespace google. */ -export namespace google { - /** Namespace protobuf. */ - namespace protobuf { - /** Properties of a Timestamp. */ - interface ITimestamp { - /** Timestamp seconds */ - seconds?: number | Long | null; - - /** Timestamp nanos */ - nanos?: number | null; + /** Properties of an UpdateGovernanceSource. */ + interface IUpdateGovernanceSource { + + /** UpdateGovernanceSource source */ + source?: (pyth_lazer_transaction.IGovernanceSource|null); + + /** UpdateGovernanceSource setGovernanceSourcePermissions */ + setGovernanceSourcePermissions?: (pyth_lazer_transaction.ISetGovernanceSourcePermissions|null); + + /** UpdateGovernanceSource removeGovernanceSource */ + removeGovernanceSource?: (google.protobuf.IEmpty|null); + } + + /** Represents an UpdateGovernanceSource. */ + class UpdateGovernanceSource implements IUpdateGovernanceSource { + + /** + * Constructs a new UpdateGovernanceSource. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IUpdateGovernanceSource); + + /** UpdateGovernanceSource source. */ + public source?: (pyth_lazer_transaction.IGovernanceSource|null); + + /** UpdateGovernanceSource setGovernanceSourcePermissions. */ + public setGovernanceSourcePermissions?: (pyth_lazer_transaction.ISetGovernanceSourcePermissions|null); + + /** UpdateGovernanceSource removeGovernanceSource. */ + public removeGovernanceSource?: (google.protobuf.IEmpty|null); + + /** UpdateGovernanceSource _source. */ + public _source?: "source"; + + /** UpdateGovernanceSource action. */ + public action?: ("setGovernanceSourcePermissions"|"removeGovernanceSource"); + + /** + * Creates a new UpdateGovernanceSource instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateGovernanceSource instance + */ + public static create(properties?: pyth_lazer_transaction.IUpdateGovernanceSource): pyth_lazer_transaction.UpdateGovernanceSource; + + /** + * Encodes the specified UpdateGovernanceSource message. Does not implicitly {@link pyth_lazer_transaction.UpdateGovernanceSource.verify|verify} messages. + * @param message UpdateGovernanceSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IUpdateGovernanceSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateGovernanceSource message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdateGovernanceSource.verify|verify} messages. + * @param message UpdateGovernanceSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IUpdateGovernanceSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateGovernanceSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateGovernanceSource + * @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): pyth_lazer_transaction.UpdateGovernanceSource; + + /** + * Decodes an UpdateGovernanceSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateGovernanceSource + * @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)): pyth_lazer_transaction.UpdateGovernanceSource; + + /** + * Verifies an UpdateGovernanceSource 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 UpdateGovernanceSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateGovernanceSource + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.UpdateGovernanceSource; + + /** + * Creates a plain object from an UpdateGovernanceSource message. Also converts values to other types if specified. + * @param message UpdateGovernanceSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.UpdateGovernanceSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateGovernanceSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateGovernanceSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetGovernanceSourcePermissions. */ + interface ISetGovernanceSourcePermissions { + + /** SetGovernanceSourcePermissions permissions */ + permissions?: (pyth_lazer_transaction.IPermissions|null); + } + + /** Represents a SetGovernanceSourcePermissions. */ + class SetGovernanceSourcePermissions implements ISetGovernanceSourcePermissions { + + /** + * Constructs a new SetGovernanceSourcePermissions. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ISetGovernanceSourcePermissions); + + /** SetGovernanceSourcePermissions permissions. */ + public permissions?: (pyth_lazer_transaction.IPermissions|null); + + /** SetGovernanceSourcePermissions _permissions. */ + public _permissions?: "permissions"; + + /** + * Creates a new SetGovernanceSourcePermissions instance using the specified properties. + * @param [properties] Properties to set + * @returns SetGovernanceSourcePermissions instance + */ + public static create(properties?: pyth_lazer_transaction.ISetGovernanceSourcePermissions): pyth_lazer_transaction.SetGovernanceSourcePermissions; + + /** + * Encodes the specified SetGovernanceSourcePermissions message. Does not implicitly {@link pyth_lazer_transaction.SetGovernanceSourcePermissions.verify|verify} messages. + * @param message SetGovernanceSourcePermissions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.ISetGovernanceSourcePermissions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetGovernanceSourcePermissions message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetGovernanceSourcePermissions.verify|verify} messages. + * @param message SetGovernanceSourcePermissions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.ISetGovernanceSourcePermissions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetGovernanceSourcePermissions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetGovernanceSourcePermissions + * @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): pyth_lazer_transaction.SetGovernanceSourcePermissions; + + /** + * Decodes a SetGovernanceSourcePermissions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetGovernanceSourcePermissions + * @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)): pyth_lazer_transaction.SetGovernanceSourcePermissions; + + /** + * Verifies a SetGovernanceSourcePermissions 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 SetGovernanceSourcePermissions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetGovernanceSourcePermissions + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.SetGovernanceSourcePermissions; + + /** + * Creates a plain object from a SetGovernanceSourcePermissions message. Also converts values to other types if specified. + * @param message SetGovernanceSourcePermissions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.SetGovernanceSourcePermissions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetGovernanceSourcePermissions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetGovernanceSourcePermissions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetShardName. */ + interface ISetShardName { + + /** SetShardName shardName */ + shardName?: (string|null); + } + + /** Represents a SetShardName. */ + class SetShardName implements ISetShardName { + + /** + * Constructs a new SetShardName. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ISetShardName); + + /** SetShardName shardName. */ + public shardName?: (string|null); + + /** SetShardName _shardName. */ + public _shardName?: "shardName"; + + /** + * Creates a new SetShardName instance using the specified properties. + * @param [properties] Properties to set + * @returns SetShardName instance + */ + public static create(properties?: pyth_lazer_transaction.ISetShardName): pyth_lazer_transaction.SetShardName; + + /** + * Encodes the specified SetShardName message. Does not implicitly {@link pyth_lazer_transaction.SetShardName.verify|verify} messages. + * @param message SetShardName message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.ISetShardName, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetShardName message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetShardName.verify|verify} messages. + * @param message SetShardName message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.ISetShardName, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetShardName message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetShardName + * @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): pyth_lazer_transaction.SetShardName; + + /** + * Decodes a SetShardName message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetShardName + * @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)): pyth_lazer_transaction.SetShardName; + + /** + * Verifies a SetShardName 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 SetShardName message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetShardName + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.SetShardName; + + /** + * Creates a plain object from a SetShardName message. Also converts values to other types if specified. + * @param message SetShardName + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.SetShardName, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetShardName to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetShardName + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetShardGroup. */ + interface ISetShardGroup { + + /** SetShardGroup shardGroup */ + shardGroup?: (string|null); + } + + /** Represents a SetShardGroup. */ + class SetShardGroup implements ISetShardGroup { + + /** + * Constructs a new SetShardGroup. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ISetShardGroup); + + /** SetShardGroup shardGroup. */ + public shardGroup?: (string|null); + + /** SetShardGroup _shardGroup. */ + public _shardGroup?: "shardGroup"; + + /** + * Creates a new SetShardGroup instance using the specified properties. + * @param [properties] Properties to set + * @returns SetShardGroup instance + */ + public static create(properties?: pyth_lazer_transaction.ISetShardGroup): pyth_lazer_transaction.SetShardGroup; + + /** + * Encodes the specified SetShardGroup message. Does not implicitly {@link pyth_lazer_transaction.SetShardGroup.verify|verify} messages. + * @param message SetShardGroup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.ISetShardGroup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetShardGroup message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetShardGroup.verify|verify} messages. + * @param message SetShardGroup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.ISetShardGroup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetShardGroup message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetShardGroup + * @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): pyth_lazer_transaction.SetShardGroup; + + /** + * Decodes a SetShardGroup message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetShardGroup + * @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)): pyth_lazer_transaction.SetShardGroup; + + /** + * Verifies a SetShardGroup 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 SetShardGroup message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetShardGroup + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.SetShardGroup; + + /** + * Creates a plain object from a SetShardGroup message. Also converts values to other types if specified. + * @param message SetShardGroup + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.SetShardGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetShardGroup to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetShardGroup + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ResetLastSequenceNo. */ + interface IResetLastSequenceNo { + + /** ResetLastSequenceNo lastSequenceNo */ + lastSequenceNo?: (number|Long|null); + } + + /** Represents a ResetLastSequenceNo. */ + class ResetLastSequenceNo implements IResetLastSequenceNo { + + /** + * Constructs a new ResetLastSequenceNo. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IResetLastSequenceNo); + + /** ResetLastSequenceNo lastSequenceNo. */ + public lastSequenceNo?: (number|Long|null); + + /** ResetLastSequenceNo _lastSequenceNo. */ + public _lastSequenceNo?: "lastSequenceNo"; + + /** + * Creates a new ResetLastSequenceNo instance using the specified properties. + * @param [properties] Properties to set + * @returns ResetLastSequenceNo instance + */ + public static create(properties?: pyth_lazer_transaction.IResetLastSequenceNo): pyth_lazer_transaction.ResetLastSequenceNo; + + /** + * Encodes the specified ResetLastSequenceNo message. Does not implicitly {@link pyth_lazer_transaction.ResetLastSequenceNo.verify|verify} messages. + * @param message ResetLastSequenceNo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IResetLastSequenceNo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResetLastSequenceNo message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ResetLastSequenceNo.verify|verify} messages. + * @param message ResetLastSequenceNo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IResetLastSequenceNo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResetLastSequenceNo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResetLastSequenceNo + * @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): pyth_lazer_transaction.ResetLastSequenceNo; + + /** + * Decodes a ResetLastSequenceNo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResetLastSequenceNo + * @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)): pyth_lazer_transaction.ResetLastSequenceNo; + + /** + * Verifies a ResetLastSequenceNo 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 ResetLastSequenceNo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResetLastSequenceNo + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.ResetLastSequenceNo; + + /** + * Creates a plain object from a ResetLastSequenceNo message. Also converts values to other types if specified. + * @param message ResetLastSequenceNo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.ResetLastSequenceNo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResetLastSequenceNo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResetLastSequenceNo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AddPublisher. */ + interface IAddPublisher { + + /** AddPublisher publisherId */ + publisherId?: (number|null); + + /** AddPublisher name */ + name?: (string|null); + + /** AddPublisher publicKeys */ + publicKeys?: (Uint8Array[]|null); + + /** AddPublisher isActive */ + isActive?: (boolean|null); + } + + /** Represents an AddPublisher. */ + class AddPublisher implements IAddPublisher { + + /** + * Constructs a new AddPublisher. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IAddPublisher); + + /** AddPublisher publisherId. */ + public publisherId?: (number|null); + + /** AddPublisher name. */ + public name?: (string|null); + + /** AddPublisher publicKeys. */ + public publicKeys: Uint8Array[]; + + /** AddPublisher isActive. */ + public isActive?: (boolean|null); + + /** AddPublisher _publisherId. */ + public _publisherId?: "publisherId"; + + /** AddPublisher _name. */ + public _name?: "name"; + + /** AddPublisher _isActive. */ + public _isActive?: "isActive"; + + /** + * Creates a new AddPublisher instance using the specified properties. + * @param [properties] Properties to set + * @returns AddPublisher instance + */ + public static create(properties?: pyth_lazer_transaction.IAddPublisher): pyth_lazer_transaction.AddPublisher; + + /** + * Encodes the specified AddPublisher message. Does not implicitly {@link pyth_lazer_transaction.AddPublisher.verify|verify} messages. + * @param message AddPublisher message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IAddPublisher, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AddPublisher message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddPublisher.verify|verify} messages. + * @param message AddPublisher message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IAddPublisher, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AddPublisher message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AddPublisher + * @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): pyth_lazer_transaction.AddPublisher; + + /** + * Decodes an AddPublisher message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AddPublisher + * @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)): pyth_lazer_transaction.AddPublisher; + + /** + * Verifies an AddPublisher 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 AddPublisher message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AddPublisher + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.AddPublisher; + + /** + * Creates a plain object from an AddPublisher message. Also converts values to other types if specified. + * @param message AddPublisher + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.AddPublisher, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AddPublisher to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AddPublisher + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdatePublisher. */ + interface IUpdatePublisher { + + /** UpdatePublisher publisherId */ + publisherId?: (number|null); + + /** UpdatePublisher setPublisherName */ + setPublisherName?: (pyth_lazer_transaction.ISetPublisherName|null); + + /** UpdatePublisher addPublisherPublicKeys */ + addPublisherPublicKeys?: (pyth_lazer_transaction.IAddPublisherPublicKeys|null); + + /** UpdatePublisher removePublisherPublicKeys */ + removePublisherPublicKeys?: (pyth_lazer_transaction.IRemovePublisherPublicKeys|null); + + /** UpdatePublisher setPublisherPublicKeys */ + setPublisherPublicKeys?: (pyth_lazer_transaction.ISetPublisherPublicKeys|null); + + /** UpdatePublisher setPublisherActive */ + setPublisherActive?: (pyth_lazer_transaction.ISetPublisherActive|null); + + /** UpdatePublisher removePublisher */ + removePublisher?: (google.protobuf.IEmpty|null); + } + + /** Represents an UpdatePublisher. */ + class UpdatePublisher implements IUpdatePublisher { + + /** + * Constructs a new UpdatePublisher. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IUpdatePublisher); + + /** UpdatePublisher publisherId. */ + public publisherId?: (number|null); + + /** UpdatePublisher setPublisherName. */ + public setPublisherName?: (pyth_lazer_transaction.ISetPublisherName|null); + + /** UpdatePublisher addPublisherPublicKeys. */ + public addPublisherPublicKeys?: (pyth_lazer_transaction.IAddPublisherPublicKeys|null); + + /** UpdatePublisher removePublisherPublicKeys. */ + public removePublisherPublicKeys?: (pyth_lazer_transaction.IRemovePublisherPublicKeys|null); + + /** UpdatePublisher setPublisherPublicKeys. */ + public setPublisherPublicKeys?: (pyth_lazer_transaction.ISetPublisherPublicKeys|null); + + /** UpdatePublisher setPublisherActive. */ + public setPublisherActive?: (pyth_lazer_transaction.ISetPublisherActive|null); + + /** UpdatePublisher removePublisher. */ + public removePublisher?: (google.protobuf.IEmpty|null); + + /** UpdatePublisher _publisherId. */ + public _publisherId?: "publisherId"; + + /** UpdatePublisher action. */ + public action?: ("setPublisherName"|"addPublisherPublicKeys"|"removePublisherPublicKeys"|"setPublisherPublicKeys"|"setPublisherActive"|"removePublisher"); + + /** + * Creates a new UpdatePublisher instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdatePublisher instance + */ + public static create(properties?: pyth_lazer_transaction.IUpdatePublisher): pyth_lazer_transaction.UpdatePublisher; + + /** + * Encodes the specified UpdatePublisher message. Does not implicitly {@link pyth_lazer_transaction.UpdatePublisher.verify|verify} messages. + * @param message UpdatePublisher message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IUpdatePublisher, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdatePublisher message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdatePublisher.verify|verify} messages. + * @param message UpdatePublisher message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IUpdatePublisher, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdatePublisher message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdatePublisher + * @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): pyth_lazer_transaction.UpdatePublisher; + + /** + * Decodes an UpdatePublisher message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdatePublisher + * @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)): pyth_lazer_transaction.UpdatePublisher; + + /** + * Verifies an UpdatePublisher 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 UpdatePublisher message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdatePublisher + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.UpdatePublisher; + + /** + * Creates a plain object from an UpdatePublisher message. Also converts values to other types if specified. + * @param message UpdatePublisher + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.UpdatePublisher, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdatePublisher to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdatePublisher + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetPublisherName. */ + interface ISetPublisherName { + + /** SetPublisherName name */ + name?: (string|null); + } + + /** Represents a SetPublisherName. */ + class SetPublisherName implements ISetPublisherName { + + /** + * Constructs a new SetPublisherName. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ISetPublisherName); + + /** SetPublisherName name. */ + public name?: (string|null); + + /** SetPublisherName _name. */ + public _name?: "name"; + + /** + * Creates a new SetPublisherName instance using the specified properties. + * @param [properties] Properties to set + * @returns SetPublisherName instance + */ + public static create(properties?: pyth_lazer_transaction.ISetPublisherName): pyth_lazer_transaction.SetPublisherName; + + /** + * Encodes the specified SetPublisherName message. Does not implicitly {@link pyth_lazer_transaction.SetPublisherName.verify|verify} messages. + * @param message SetPublisherName message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.ISetPublisherName, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetPublisherName message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetPublisherName.verify|verify} messages. + * @param message SetPublisherName message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.ISetPublisherName, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetPublisherName message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetPublisherName + * @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): pyth_lazer_transaction.SetPublisherName; + + /** + * Decodes a SetPublisherName message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetPublisherName + * @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)): pyth_lazer_transaction.SetPublisherName; + + /** + * Verifies a SetPublisherName 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 SetPublisherName message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetPublisherName + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.SetPublisherName; + + /** + * Creates a plain object from a SetPublisherName message. Also converts values to other types if specified. + * @param message SetPublisherName + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.SetPublisherName, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetPublisherName to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetPublisherName + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AddPublisherPublicKeys. */ + interface IAddPublisherPublicKeys { + + /** AddPublisherPublicKeys publicKeys */ + publicKeys?: (Uint8Array[]|null); + } + + /** Represents an AddPublisherPublicKeys. */ + class AddPublisherPublicKeys implements IAddPublisherPublicKeys { + + /** + * Constructs a new AddPublisherPublicKeys. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IAddPublisherPublicKeys); + + /** AddPublisherPublicKeys publicKeys. */ + public publicKeys: Uint8Array[]; + + /** + * Creates a new AddPublisherPublicKeys instance using the specified properties. + * @param [properties] Properties to set + * @returns AddPublisherPublicKeys instance + */ + public static create(properties?: pyth_lazer_transaction.IAddPublisherPublicKeys): pyth_lazer_transaction.AddPublisherPublicKeys; + + /** + * Encodes the specified AddPublisherPublicKeys message. Does not implicitly {@link pyth_lazer_transaction.AddPublisherPublicKeys.verify|verify} messages. + * @param message AddPublisherPublicKeys message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IAddPublisherPublicKeys, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AddPublisherPublicKeys message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddPublisherPublicKeys.verify|verify} messages. + * @param message AddPublisherPublicKeys message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IAddPublisherPublicKeys, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AddPublisherPublicKeys message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AddPublisherPublicKeys + * @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): pyth_lazer_transaction.AddPublisherPublicKeys; + + /** + * Decodes an AddPublisherPublicKeys message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AddPublisherPublicKeys + * @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)): pyth_lazer_transaction.AddPublisherPublicKeys; + + /** + * Verifies an AddPublisherPublicKeys 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 AddPublisherPublicKeys message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AddPublisherPublicKeys + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.AddPublisherPublicKeys; + + /** + * Creates a plain object from an AddPublisherPublicKeys message. Also converts values to other types if specified. + * @param message AddPublisherPublicKeys + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.AddPublisherPublicKeys, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AddPublisherPublicKeys to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AddPublisherPublicKeys + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RemovePublisherPublicKeys. */ + interface IRemovePublisherPublicKeys { + + /** RemovePublisherPublicKeys publicKeys */ + publicKeys?: (Uint8Array[]|null); + } + + /** Represents a RemovePublisherPublicKeys. */ + class RemovePublisherPublicKeys implements IRemovePublisherPublicKeys { + + /** + * Constructs a new RemovePublisherPublicKeys. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IRemovePublisherPublicKeys); + + /** RemovePublisherPublicKeys publicKeys. */ + public publicKeys: Uint8Array[]; + + /** + * Creates a new RemovePublisherPublicKeys instance using the specified properties. + * @param [properties] Properties to set + * @returns RemovePublisherPublicKeys instance + */ + public static create(properties?: pyth_lazer_transaction.IRemovePublisherPublicKeys): pyth_lazer_transaction.RemovePublisherPublicKeys; + + /** + * Encodes the specified RemovePublisherPublicKeys message. Does not implicitly {@link pyth_lazer_transaction.RemovePublisherPublicKeys.verify|verify} messages. + * @param message RemovePublisherPublicKeys message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IRemovePublisherPublicKeys, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RemovePublisherPublicKeys message, length delimited. Does not implicitly {@link pyth_lazer_transaction.RemovePublisherPublicKeys.verify|verify} messages. + * @param message RemovePublisherPublicKeys message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IRemovePublisherPublicKeys, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RemovePublisherPublicKeys message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RemovePublisherPublicKeys + * @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): pyth_lazer_transaction.RemovePublisherPublicKeys; + + /** + * Decodes a RemovePublisherPublicKeys message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RemovePublisherPublicKeys + * @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)): pyth_lazer_transaction.RemovePublisherPublicKeys; + + /** + * Verifies a RemovePublisherPublicKeys 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 RemovePublisherPublicKeys message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RemovePublisherPublicKeys + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.RemovePublisherPublicKeys; + + /** + * Creates a plain object from a RemovePublisherPublicKeys message. Also converts values to other types if specified. + * @param message RemovePublisherPublicKeys + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.RemovePublisherPublicKeys, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RemovePublisherPublicKeys to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RemovePublisherPublicKeys + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetPublisherPublicKeys. */ + interface ISetPublisherPublicKeys { + + /** SetPublisherPublicKeys publicKeys */ + publicKeys?: (Uint8Array[]|null); + } + + /** Represents a SetPublisherPublicKeys. */ + class SetPublisherPublicKeys implements ISetPublisherPublicKeys { + + /** + * Constructs a new SetPublisherPublicKeys. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ISetPublisherPublicKeys); + + /** SetPublisherPublicKeys publicKeys. */ + public publicKeys: Uint8Array[]; + + /** + * Creates a new SetPublisherPublicKeys instance using the specified properties. + * @param [properties] Properties to set + * @returns SetPublisherPublicKeys instance + */ + public static create(properties?: pyth_lazer_transaction.ISetPublisherPublicKeys): pyth_lazer_transaction.SetPublisherPublicKeys; + + /** + * Encodes the specified SetPublisherPublicKeys message. Does not implicitly {@link pyth_lazer_transaction.SetPublisherPublicKeys.verify|verify} messages. + * @param message SetPublisherPublicKeys message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.ISetPublisherPublicKeys, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetPublisherPublicKeys message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetPublisherPublicKeys.verify|verify} messages. + * @param message SetPublisherPublicKeys message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.ISetPublisherPublicKeys, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetPublisherPublicKeys message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetPublisherPublicKeys + * @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): pyth_lazer_transaction.SetPublisherPublicKeys; + + /** + * Decodes a SetPublisherPublicKeys message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetPublisherPublicKeys + * @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)): pyth_lazer_transaction.SetPublisherPublicKeys; + + /** + * Verifies a SetPublisherPublicKeys 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 SetPublisherPublicKeys message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetPublisherPublicKeys + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.SetPublisherPublicKeys; + + /** + * Creates a plain object from a SetPublisherPublicKeys message. Also converts values to other types if specified. + * @param message SetPublisherPublicKeys + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.SetPublisherPublicKeys, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetPublisherPublicKeys to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetPublisherPublicKeys + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetPublisherActive. */ + interface ISetPublisherActive { + + /** SetPublisherActive isActive */ + isActive?: (boolean|null); + } + + /** Represents a SetPublisherActive. */ + class SetPublisherActive implements ISetPublisherActive { + + /** + * Constructs a new SetPublisherActive. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ISetPublisherActive); + + /** SetPublisherActive isActive. */ + public isActive?: (boolean|null); + + /** SetPublisherActive _isActive. */ + public _isActive?: "isActive"; + + /** + * Creates a new SetPublisherActive instance using the specified properties. + * @param [properties] Properties to set + * @returns SetPublisherActive instance + */ + public static create(properties?: pyth_lazer_transaction.ISetPublisherActive): pyth_lazer_transaction.SetPublisherActive; + + /** + * Encodes the specified SetPublisherActive message. Does not implicitly {@link pyth_lazer_transaction.SetPublisherActive.verify|verify} messages. + * @param message SetPublisherActive message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.ISetPublisherActive, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetPublisherActive message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetPublisherActive.verify|verify} messages. + * @param message SetPublisherActive message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.ISetPublisherActive, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetPublisherActive message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetPublisherActive + * @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): pyth_lazer_transaction.SetPublisherActive; + + /** + * Decodes a SetPublisherActive message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetPublisherActive + * @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)): pyth_lazer_transaction.SetPublisherActive; + + /** + * Verifies a SetPublisherActive 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 SetPublisherActive message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetPublisherActive + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.SetPublisherActive; + + /** + * Creates a plain object from a SetPublisherActive message. Also converts values to other types if specified. + * @param message SetPublisherActive + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.SetPublisherActive, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetPublisherActive to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetPublisherActive + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AddFeed. */ + interface IAddFeed { + + /** AddFeed feedId */ + feedId?: (number|null); + + /** AddFeed metadata */ + metadata?: (pyth_lazer_transaction.DynamicValue.IMap|null); + + /** AddFeed permissionedPublishers */ + permissionedPublishers?: (number[]|null); + } + + /** Represents an AddFeed. */ + class AddFeed implements IAddFeed { + + /** + * Constructs a new AddFeed. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IAddFeed); + + /** AddFeed feedId. */ + public feedId?: (number|null); + + /** AddFeed metadata. */ + public metadata?: (pyth_lazer_transaction.DynamicValue.IMap|null); + + /** AddFeed permissionedPublishers. */ + public permissionedPublishers: number[]; + + /** AddFeed _feedId. */ + public _feedId?: "feedId"; + + /** AddFeed _metadata. */ + public _metadata?: "metadata"; + + /** + * Creates a new AddFeed instance using the specified properties. + * @param [properties] Properties to set + * @returns AddFeed instance + */ + public static create(properties?: pyth_lazer_transaction.IAddFeed): pyth_lazer_transaction.AddFeed; + + /** + * Encodes the specified AddFeed message. Does not implicitly {@link pyth_lazer_transaction.AddFeed.verify|verify} messages. + * @param message AddFeed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IAddFeed, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AddFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddFeed.verify|verify} messages. + * @param message AddFeed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IAddFeed, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AddFeed message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AddFeed + * @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): pyth_lazer_transaction.AddFeed; + + /** + * Decodes an AddFeed message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AddFeed + * @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)): pyth_lazer_transaction.AddFeed; + + /** + * Verifies an AddFeed 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 AddFeed message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AddFeed + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.AddFeed; + + /** + * Creates a plain object from an AddFeed message. Also converts values to other types if specified. + * @param message AddFeed + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.AddFeed, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AddFeed to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AddFeed + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Represents a Timestamp. */ - class Timestamp implements ITimestamp { - /** - * Constructs a new Timestamp. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ITimestamp); - - /** Timestamp seconds. */ - public seconds: number | Long; - - /** Timestamp nanos. */ - public nanos: number; - - /** - * Creates a new Timestamp instance using the specified properties. - * @param [properties] Properties to set - * @returns Timestamp instance - */ - public static create( - properties?: google.protobuf.ITimestamp, - ): google.protobuf.Timestamp; - - /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: google.protobuf.ITimestamp, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: google.protobuf.ITimestamp, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a Timestamp message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Timestamp - * @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.Timestamp; - - /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Timestamp - * @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.Timestamp; - - /** - * Verifies a Timestamp 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 Timestamp message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Timestamp - */ - public static fromObject(object: { - [k: string]: any; - }): google.protobuf.Timestamp; - - /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @param message Timestamp - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: google.protobuf.Timestamp, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this Timestamp to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Timestamp - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** Properties of an UpdateFeed. */ + interface IUpdateFeed { + + /** UpdateFeed feedId */ + feedId?: (number|null); + + /** UpdateFeed updateFeedMetadata */ + updateFeedMetadata?: (pyth_lazer_transaction.IUpdateFeedMetadata|null); + + /** UpdateFeed activateFeed */ + activateFeed?: (pyth_lazer_transaction.IActivateFeed|null); + + /** UpdateFeed deactivateFeed */ + deactivateFeed?: (pyth_lazer_transaction.IDeactivateFeed|null); + + /** UpdateFeed removeFeed */ + removeFeed?: (google.protobuf.IEmpty|null); + } + + /** Represents an UpdateFeed. */ + class UpdateFeed implements IUpdateFeed { + + /** + * Constructs a new UpdateFeed. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IUpdateFeed); + + /** UpdateFeed feedId. */ + public feedId?: (number|null); + + /** UpdateFeed updateFeedMetadata. */ + public updateFeedMetadata?: (pyth_lazer_transaction.IUpdateFeedMetadata|null); + + /** UpdateFeed activateFeed. */ + public activateFeed?: (pyth_lazer_transaction.IActivateFeed|null); + + /** UpdateFeed deactivateFeed. */ + public deactivateFeed?: (pyth_lazer_transaction.IDeactivateFeed|null); + + /** UpdateFeed removeFeed. */ + public removeFeed?: (google.protobuf.IEmpty|null); + + /** UpdateFeed _feedId. */ + public _feedId?: "feedId"; + + /** UpdateFeed action. */ + public action?: ("updateFeedMetadata"|"activateFeed"|"deactivateFeed"|"removeFeed"); + + /** + * Creates a new UpdateFeed instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateFeed instance + */ + public static create(properties?: pyth_lazer_transaction.IUpdateFeed): pyth_lazer_transaction.UpdateFeed; + + /** + * Encodes the specified UpdateFeed message. Does not implicitly {@link pyth_lazer_transaction.UpdateFeed.verify|verify} messages. + * @param message UpdateFeed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IUpdateFeed, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdateFeed.verify|verify} messages. + * @param message UpdateFeed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IUpdateFeed, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateFeed message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateFeed + * @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): pyth_lazer_transaction.UpdateFeed; + + /** + * Decodes an UpdateFeed message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateFeed + * @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)): pyth_lazer_transaction.UpdateFeed; + + /** + * Verifies an UpdateFeed 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 UpdateFeed message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateFeed + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.UpdateFeed; + + /** + * Creates a plain object from an UpdateFeed message. Also converts values to other types if specified. + * @param message UpdateFeed + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.UpdateFeed, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateFeed to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateFeed + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateFeedMetadata. */ + interface IUpdateFeedMetadata { + + /** UpdateFeedMetadata name */ + name?: (string|null); + + /** UpdateFeedMetadata value */ + value?: (pyth_lazer_transaction.IDynamicValue|null); + } + + /** Represents an UpdateFeedMetadata. */ + class UpdateFeedMetadata implements IUpdateFeedMetadata { + + /** + * Constructs a new UpdateFeedMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IUpdateFeedMetadata); + + /** UpdateFeedMetadata name. */ + public name?: (string|null); + + /** UpdateFeedMetadata value. */ + public value?: (pyth_lazer_transaction.IDynamicValue|null); + + /** UpdateFeedMetadata _name. */ + public _name?: "name"; + + /** UpdateFeedMetadata _value. */ + public _value?: "value"; + + /** + * Creates a new UpdateFeedMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateFeedMetadata instance + */ + public static create(properties?: pyth_lazer_transaction.IUpdateFeedMetadata): pyth_lazer_transaction.UpdateFeedMetadata; + + /** + * Encodes the specified UpdateFeedMetadata message. Does not implicitly {@link pyth_lazer_transaction.UpdateFeedMetadata.verify|verify} messages. + * @param message UpdateFeedMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IUpdateFeedMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateFeedMetadata message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdateFeedMetadata.verify|verify} messages. + * @param message UpdateFeedMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IUpdateFeedMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateFeedMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateFeedMetadata + * @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): pyth_lazer_transaction.UpdateFeedMetadata; + + /** + * Decodes an UpdateFeedMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateFeedMetadata + * @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)): pyth_lazer_transaction.UpdateFeedMetadata; + + /** + * Verifies an UpdateFeedMetadata 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 UpdateFeedMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateFeedMetadata + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.UpdateFeedMetadata; + + /** + * Creates a plain object from an UpdateFeedMetadata message. Also converts values to other types if specified. + * @param message UpdateFeedMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.UpdateFeedMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateFeedMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateFeedMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ActivateFeed. */ + interface IActivateFeed { + + /** ActivateFeed activationTimestamp */ + activationTimestamp?: (google.protobuf.ITimestamp|null); + } + + /** Represents an ActivateFeed. */ + class ActivateFeed implements IActivateFeed { + + /** + * Constructs a new ActivateFeed. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IActivateFeed); + + /** ActivateFeed activationTimestamp. */ + public activationTimestamp?: (google.protobuf.ITimestamp|null); + + /** ActivateFeed _activationTimestamp. */ + public _activationTimestamp?: "activationTimestamp"; + + /** + * Creates a new ActivateFeed instance using the specified properties. + * @param [properties] Properties to set + * @returns ActivateFeed instance + */ + public static create(properties?: pyth_lazer_transaction.IActivateFeed): pyth_lazer_transaction.ActivateFeed; + + /** + * Encodes the specified ActivateFeed message. Does not implicitly {@link pyth_lazer_transaction.ActivateFeed.verify|verify} messages. + * @param message ActivateFeed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IActivateFeed, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ActivateFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ActivateFeed.verify|verify} messages. + * @param message ActivateFeed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IActivateFeed, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ActivateFeed message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ActivateFeed + * @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): pyth_lazer_transaction.ActivateFeed; + + /** + * Decodes an ActivateFeed message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ActivateFeed + * @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)): pyth_lazer_transaction.ActivateFeed; + + /** + * Verifies an ActivateFeed 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 ActivateFeed message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ActivateFeed + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.ActivateFeed; + + /** + * Creates a plain object from an ActivateFeed message. Also converts values to other types if specified. + * @param message ActivateFeed + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.ActivateFeed, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ActivateFeed to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ActivateFeed + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeactivateFeed. */ + interface IDeactivateFeed { + + /** DeactivateFeed deactivationTimestamp */ + deactivationTimestamp?: (google.protobuf.ITimestamp|null); } - /** Properties of a Duration. */ - interface IDuration { - /** Duration seconds */ - seconds?: number | Long | null; + /** Represents a DeactivateFeed. */ + class DeactivateFeed implements IDeactivateFeed { + + /** + * Constructs a new DeactivateFeed. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IDeactivateFeed); + + /** DeactivateFeed deactivationTimestamp. */ + public deactivationTimestamp?: (google.protobuf.ITimestamp|null); + + /** DeactivateFeed _deactivationTimestamp. */ + public _deactivationTimestamp?: "deactivationTimestamp"; + + /** + * Creates a new DeactivateFeed instance using the specified properties. + * @param [properties] Properties to set + * @returns DeactivateFeed instance + */ + public static create(properties?: pyth_lazer_transaction.IDeactivateFeed): pyth_lazer_transaction.DeactivateFeed; + + /** + * Encodes the specified DeactivateFeed message. Does not implicitly {@link pyth_lazer_transaction.DeactivateFeed.verify|verify} messages. + * @param message DeactivateFeed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IDeactivateFeed, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeactivateFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DeactivateFeed.verify|verify} messages. + * @param message DeactivateFeed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IDeactivateFeed, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeactivateFeed message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeactivateFeed + * @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): pyth_lazer_transaction.DeactivateFeed; + + /** + * Decodes a DeactivateFeed message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeactivateFeed + * @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)): pyth_lazer_transaction.DeactivateFeed; + + /** + * Verifies a DeactivateFeed 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 DeactivateFeed message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeactivateFeed + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.DeactivateFeed; + + /** + * Creates a plain object from a DeactivateFeed message. Also converts values to other types if specified. + * @param message DeactivateFeed + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.DeactivateFeed, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeactivateFeed to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeactivateFeed + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DynamicValue. */ + interface IDynamicValue { + + /** DynamicValue stringValue */ + stringValue?: (string|null); + + /** DynamicValue doubleValue */ + doubleValue?: (number|null); + + /** DynamicValue uintValue */ + uintValue?: (number|Long|null); + + /** DynamicValue intValue */ + intValue?: (number|Long|null); + + /** DynamicValue boolValue */ + boolValue?: (boolean|null); + + /** DynamicValue bytesValue */ + bytesValue?: (Uint8Array|null); - /** Duration nanos */ - nanos?: number | null; + /** DynamicValue durationValue */ + durationValue?: (google.protobuf.IDuration|null); + + /** DynamicValue timestampValue */ + timestampValue?: (google.protobuf.ITimestamp|null); + + /** DynamicValue list */ + list?: (pyth_lazer_transaction.DynamicValue.IList|null); + + /** DynamicValue map */ + map?: (pyth_lazer_transaction.DynamicValue.IMap|null); + } + + /** Represents a DynamicValue. */ + class DynamicValue implements IDynamicValue { + + /** + * Constructs a new DynamicValue. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IDynamicValue); + + /** DynamicValue stringValue. */ + public stringValue?: (string|null); + + /** DynamicValue doubleValue. */ + public doubleValue?: (number|null); + + /** DynamicValue uintValue. */ + public uintValue?: (number|Long|null); + + /** DynamicValue intValue. */ + public intValue?: (number|Long|null); + + /** DynamicValue boolValue. */ + public boolValue?: (boolean|null); + + /** DynamicValue bytesValue. */ + public bytesValue?: (Uint8Array|null); + + /** DynamicValue durationValue. */ + public durationValue?: (google.protobuf.IDuration|null); + + /** DynamicValue timestampValue. */ + public timestampValue?: (google.protobuf.ITimestamp|null); + + /** DynamicValue list. */ + public list?: (pyth_lazer_transaction.DynamicValue.IList|null); + + /** DynamicValue map. */ + public map?: (pyth_lazer_transaction.DynamicValue.IMap|null); + + /** DynamicValue value. */ + public value?: ("stringValue"|"doubleValue"|"uintValue"|"intValue"|"boolValue"|"bytesValue"|"durationValue"|"timestampValue"|"list"|"map"); + + /** + * Creates a new DynamicValue instance using the specified properties. + * @param [properties] Properties to set + * @returns DynamicValue instance + */ + public static create(properties?: pyth_lazer_transaction.IDynamicValue): pyth_lazer_transaction.DynamicValue; + + /** + * Encodes the specified DynamicValue message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.verify|verify} messages. + * @param message DynamicValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IDynamicValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DynamicValue message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.verify|verify} messages. + * @param message DynamicValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IDynamicValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DynamicValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DynamicValue + * @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): pyth_lazer_transaction.DynamicValue; + + /** + * Decodes a DynamicValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DynamicValue + * @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)): pyth_lazer_transaction.DynamicValue; + + /** + * Verifies a DynamicValue 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 DynamicValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DynamicValue + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.DynamicValue; + + /** + * Creates a plain object from a DynamicValue message. Also converts values to other types if specified. + * @param message DynamicValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.DynamicValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DynamicValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DynamicValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Represents a Duration. */ - class Duration implements IDuration { - /** - * Constructs a new Duration. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDuration); - - /** Duration seconds. */ - public seconds: number | Long; - - /** Duration nanos. */ - public nanos: number; - - /** - * Creates a new Duration instance using the specified properties. - * @param [properties] Properties to set - * @returns Duration instance - */ - public static create( - properties?: google.protobuf.IDuration, - ): google.protobuf.Duration; - - /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: google.protobuf.IDuration, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: google.protobuf.IDuration, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a Duration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Duration - * @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.Duration; - - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Duration - * @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.Duration; - - /** - * Verifies a Duration 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 Duration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Duration - */ - public static fromObject(object: { - [k: string]: any; - }): google.protobuf.Duration; - - /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @param message Duration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: google.protobuf.Duration, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this Duration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Duration - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + namespace DynamicValue { + + /** Properties of a List. */ + interface IList { + + /** List items */ + items?: (pyth_lazer_transaction.IDynamicValue[]|null); + } + + /** Represents a List. */ + class List implements IList { + + /** + * Constructs a new List. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.DynamicValue.IList); + + /** List items. */ + public items: pyth_lazer_transaction.IDynamicValue[]; + + /** + * Creates a new List instance using the specified properties. + * @param [properties] Properties to set + * @returns List instance + */ + public static create(properties?: pyth_lazer_transaction.DynamicValue.IList): pyth_lazer_transaction.DynamicValue.List; + + /** + * Encodes the specified List message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.List.verify|verify} messages. + * @param message List message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.DynamicValue.IList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified List message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.List.verify|verify} messages. + * @param message List message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.DynamicValue.IList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a List message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns List + * @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): pyth_lazer_transaction.DynamicValue.List; + + /** + * Decodes a List message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns List + * @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)): pyth_lazer_transaction.DynamicValue.List; + + /** + * Verifies a List 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 List message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns List + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.DynamicValue.List; + + /** + * Creates a plain object from a List message. Also converts values to other types if specified. + * @param message List + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.DynamicValue.List, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this List to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for List + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MapItem. */ + interface IMapItem { + + /** MapItem key */ + key?: (string|null); + + /** MapItem value */ + value?: (pyth_lazer_transaction.IDynamicValue|null); + } + + /** Represents a MapItem. */ + class MapItem implements IMapItem { + + /** + * Constructs a new MapItem. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.DynamicValue.IMapItem); + + /** MapItem key. */ + public key?: (string|null); + + /** MapItem value. */ + public value?: (pyth_lazer_transaction.IDynamicValue|null); + + /** MapItem _key. */ + public _key?: "key"; + + /** MapItem _value. */ + public _value?: "value"; + + /** + * Creates a new MapItem instance using the specified properties. + * @param [properties] Properties to set + * @returns MapItem instance + */ + public static create(properties?: pyth_lazer_transaction.DynamicValue.IMapItem): pyth_lazer_transaction.DynamicValue.MapItem; + + /** + * Encodes the specified MapItem message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.MapItem.verify|verify} messages. + * @param message MapItem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.DynamicValue.IMapItem, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MapItem message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.MapItem.verify|verify} messages. + * @param message MapItem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.DynamicValue.IMapItem, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MapItem message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MapItem + * @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): pyth_lazer_transaction.DynamicValue.MapItem; + + /** + * Decodes a MapItem message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MapItem + * @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)): pyth_lazer_transaction.DynamicValue.MapItem; + + /** + * Verifies a MapItem 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 MapItem message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MapItem + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.DynamicValue.MapItem; + + /** + * Creates a plain object from a MapItem message. Also converts values to other types if specified. + * @param message MapItem + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.DynamicValue.MapItem, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MapItem to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MapItem + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Map. */ + interface IMap { + + /** Map items */ + items?: (pyth_lazer_transaction.DynamicValue.IMapItem[]|null); + } + + /** Represents a Map. */ + class Map implements IMap { + + /** + * Constructs a new Map. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.DynamicValue.IMap); + + /** Map items. */ + public items: pyth_lazer_transaction.DynamicValue.IMapItem[]; + + /** + * Creates a new Map instance using the specified properties. + * @param [properties] Properties to set + * @returns Map instance + */ + public static create(properties?: pyth_lazer_transaction.DynamicValue.IMap): pyth_lazer_transaction.DynamicValue.Map; + + /** + * Encodes the specified Map message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.Map.verify|verify} messages. + * @param message Map message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.DynamicValue.IMap, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Map message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.Map.verify|verify} messages. + * @param message Map message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.DynamicValue.IMap, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Map message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Map + * @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): pyth_lazer_transaction.DynamicValue.Map; + + /** + * Decodes a Map message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Map + * @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)): pyth_lazer_transaction.DynamicValue.Map; + + /** + * Verifies a Map 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 Map message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Map + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.DynamicValue.Map; + + /** + * Creates a plain object from a Map message. Also converts values to other types if specified. + * @param message Map + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.DynamicValue.Map, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Map to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Map + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } +} + +/** Namespace google. */ +export namespace google { - /** 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 }; - - /** - * Gets the default type url for Empty - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** Namespace protobuf. */ + namespace protobuf { + + /** Properties of a Timestamp. */ + interface ITimestamp { + + /** Timestamp seconds */ + seconds?: (number|Long|null); + + /** Timestamp nanos */ + nanos?: (number|null); + } + + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { + + /** + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ITimestamp); + + /** Timestamp seconds. */ + public seconds: (number|Long); + + /** Timestamp nanos. */ + public nanos: number; + + /** + * Creates a new Timestamp instance using the specified properties. + * @param [properties] Properties to set + * @returns Timestamp instance + */ + public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Timestamp + * @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.Timestamp; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Timestamp + * @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.Timestamp; + + /** + * Verifies a Timestamp 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 Timestamp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Timestamp + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @param message Timestamp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Timestamp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Timestamp + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Duration. */ + interface IDuration { + + /** Duration seconds */ + seconds?: (number|Long|null); + + /** Duration nanos */ + nanos?: (number|null); + } + + /** Represents a Duration. */ + class Duration implements IDuration { + + /** + * Constructs a new Duration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDuration); + + /** Duration seconds. */ + public seconds: (number|Long); + + /** Duration nanos. */ + public nanos: number; + + /** + * Creates a new Duration instance using the specified properties. + * @param [properties] Properties to set + * @returns Duration instance + */ + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Duration + * @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.Duration; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Duration + * @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.Duration; + + /** + * Verifies a Duration 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 Duration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Duration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @param message Duration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Duration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Duration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** 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 }; + + /** + * Gets the default type url for Empty + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } - } } diff --git a/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/generated/governance_instruction.js b/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/generated/governance_instruction.js index 74b76e45d3..180772d1b9 100644 --- a/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/generated/governance_instruction.js +++ b/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/generated/governance_instruction.js @@ -22,7 +22,6 @@ export const pyth_lazer_transaction = $root.pyth_lazer_transaction = (() => { * Properties of a GovernanceInstruction. * @memberof pyth_lazer_transaction * @interface IGovernanceInstruction - * @property {pyth_lazer_transaction.IGovernanceSource|null} [source] GovernanceInstruction source * @property {Array.|null} [directives] GovernanceInstruction directives * @property {google.protobuf.ITimestamp|null} [minExecutionTimestamp] GovernanceInstruction minExecutionTimestamp * @property {google.protobuf.ITimestamp|null} [maxExecutionTimestamp] GovernanceInstruction maxExecutionTimestamp @@ -45,14 +44,6 @@ export const pyth_lazer_transaction = $root.pyth_lazer_transaction = (() => { this[keys[i]] = properties[keys[i]]; } - /** - * GovernanceInstruction source. - * @member {pyth_lazer_transaction.IGovernanceSource|null|undefined} source - * @memberof pyth_lazer_transaction.GovernanceInstruction - * @instance - */ - GovernanceInstruction.prototype.source = null; - /** * GovernanceInstruction directives. * @member {Array.} directives @@ -88,17 +79,6 @@ export const pyth_lazer_transaction = $root.pyth_lazer_transaction = (() => { // OneOf field names bound to virtual getters and setters let $oneOfFields; - /** - * GovernanceInstruction _source. - * @member {"source"|undefined} _source - * @memberof pyth_lazer_transaction.GovernanceInstruction - * @instance - */ - Object.defineProperty(GovernanceInstruction.prototype, "_source", { - get: $util.oneOfGetter($oneOfFields = ["source"]), - set: $util.oneOfSetter($oneOfFields) - }); - /** * GovernanceInstruction _minExecutionTimestamp. * @member {"minExecutionTimestamp"|undefined} _minExecutionTimestamp @@ -156,8 +136,6 @@ export const pyth_lazer_transaction = $root.pyth_lazer_transaction = (() => { GovernanceInstruction.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.source != null && Object.hasOwnProperty.call(message, "source")) - $root.pyth_lazer_transaction.GovernanceSource.encode(message.source, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.directives != null && message.directives.length) for (let i = 0; i < message.directives.length; ++i) $root.pyth_lazer_transaction.GovernanceDirective.encode(message.directives[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); @@ -203,10 +181,6 @@ export const pyth_lazer_transaction = $root.pyth_lazer_transaction = (() => { if (tag === error) break; switch (tag >>> 3) { - case 1: { - message.source = $root.pyth_lazer_transaction.GovernanceSource.decode(reader, reader.uint32()); - break; - } case 2: { if (!(message.directives && message.directives.length)) message.directives = []; @@ -261,14 +235,6 @@ export const pyth_lazer_transaction = $root.pyth_lazer_transaction = (() => { if (typeof message !== "object" || message === null) return "object expected"; let properties = {}; - if (message.source != null && message.hasOwnProperty("source")) { - properties._source = 1; - { - let error = $root.pyth_lazer_transaction.GovernanceSource.verify(message.source); - if (error) - return "source." + error; - } - } if (message.directives != null && message.hasOwnProperty("directives")) { if (!Array.isArray(message.directives)) return "directives: array expected"; @@ -314,11 +280,6 @@ export const pyth_lazer_transaction = $root.pyth_lazer_transaction = (() => { if (object instanceof $root.pyth_lazer_transaction.GovernanceInstruction) return object; let message = new $root.pyth_lazer_transaction.GovernanceInstruction(); - if (object.source != null) { - if (typeof object.source !== "object") - throw TypeError(".pyth_lazer_transaction.GovernanceInstruction.source: object expected"); - message.source = $root.pyth_lazer_transaction.GovernanceSource.fromObject(object.source); - } if (object.directives) { if (!Array.isArray(object.directives)) throw TypeError(".pyth_lazer_transaction.GovernanceInstruction.directives: array expected"); @@ -359,11 +320,6 @@ export const pyth_lazer_transaction = $root.pyth_lazer_transaction = (() => { let object = {}; if (options.arrays || options.defaults) object.directives = []; - if (message.source != null && message.hasOwnProperty("source")) { - object.source = $root.pyth_lazer_transaction.GovernanceSource.toObject(message.source, options); - if (options.oneofs) - object._source = "source"; - } if (message.directives && message.directives.length) { object.directives = []; for (let j = 0; j < message.directives.length; ++j) @@ -2523,6 +2479,7 @@ export const pyth_lazer_transaction = $root.pyth_lazer_transaction = (() => { * @memberof pyth_lazer_transaction * @interface IGovernanceSource * @property {pyth_lazer_transaction.GovernanceSource.ISingleEd25519|null} [singleEd25519] GovernanceSource singleEd25519 + * @property {pyth_lazer_transaction.GovernanceSource.IWormholeEmitter|null} [wormholeEmitter] GovernanceSource wormholeEmitter */ /** @@ -2548,17 +2505,25 @@ export const pyth_lazer_transaction = $root.pyth_lazer_transaction = (() => { */ GovernanceSource.prototype.singleEd25519 = null; + /** + * GovernanceSource wormholeEmitter. + * @member {pyth_lazer_transaction.GovernanceSource.IWormholeEmitter|null|undefined} wormholeEmitter + * @memberof pyth_lazer_transaction.GovernanceSource + * @instance + */ + GovernanceSource.prototype.wormholeEmitter = null; + // OneOf field names bound to virtual getters and setters let $oneOfFields; /** * GovernanceSource source. - * @member {"singleEd25519"|undefined} source + * @member {"singleEd25519"|"wormholeEmitter"|undefined} source * @memberof pyth_lazer_transaction.GovernanceSource * @instance */ Object.defineProperty(GovernanceSource.prototype, "source", { - get: $util.oneOfGetter($oneOfFields = ["singleEd25519"]), + get: $util.oneOfGetter($oneOfFields = ["singleEd25519", "wormholeEmitter"]), set: $util.oneOfSetter($oneOfFields) }); @@ -2588,6 +2553,8 @@ export const pyth_lazer_transaction = $root.pyth_lazer_transaction = (() => { writer = $Writer.create(); if (message.singleEd25519 != null && Object.hasOwnProperty.call(message, "singleEd25519")) $root.pyth_lazer_transaction.GovernanceSource.SingleEd25519.encode(message.singleEd25519, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.wormholeEmitter != null && Object.hasOwnProperty.call(message, "wormholeEmitter")) + $root.pyth_lazer_transaction.GovernanceSource.WormholeEmitter.encode(message.wormholeEmitter, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -2628,6 +2595,10 @@ export const pyth_lazer_transaction = $root.pyth_lazer_transaction = (() => { message.singleEd25519 = $root.pyth_lazer_transaction.GovernanceSource.SingleEd25519.decode(reader, reader.uint32()); break; } + case 2: { + message.wormholeEmitter = $root.pyth_lazer_transaction.GovernanceSource.WormholeEmitter.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -2672,6 +2643,16 @@ export const pyth_lazer_transaction = $root.pyth_lazer_transaction = (() => { return "singleEd25519." + error; } } + if (message.wormholeEmitter != null && message.hasOwnProperty("wormholeEmitter")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + { + let error = $root.pyth_lazer_transaction.GovernanceSource.WormholeEmitter.verify(message.wormholeEmitter); + if (error) + return "wormholeEmitter." + error; + } + } return null; }; @@ -2692,6 +2673,11 @@ export const pyth_lazer_transaction = $root.pyth_lazer_transaction = (() => { throw TypeError(".pyth_lazer_transaction.GovernanceSource.singleEd25519: object expected"); message.singleEd25519 = $root.pyth_lazer_transaction.GovernanceSource.SingleEd25519.fromObject(object.singleEd25519); } + if (object.wormholeEmitter != null) { + if (typeof object.wormholeEmitter !== "object") + throw TypeError(".pyth_lazer_transaction.GovernanceSource.wormholeEmitter: object expected"); + message.wormholeEmitter = $root.pyth_lazer_transaction.GovernanceSource.WormholeEmitter.fromObject(object.wormholeEmitter); + } return message; }; @@ -2713,6 +2699,11 @@ export const pyth_lazer_transaction = $root.pyth_lazer_transaction = (() => { if (options.oneofs) object.source = "singleEd25519"; } + if (message.wormholeEmitter != null && message.hasOwnProperty("wormholeEmitter")) { + object.wormholeEmitter = $root.pyth_lazer_transaction.GovernanceSource.WormholeEmitter.toObject(message.wormholeEmitter, options); + if (options.oneofs) + object.source = "wormholeEmitter"; + } return object; }; @@ -2968,6 +2959,270 @@ export const pyth_lazer_transaction = $root.pyth_lazer_transaction = (() => { return SingleEd25519; })(); + GovernanceSource.WormholeEmitter = (function() { + + /** + * Properties of a WormholeEmitter. + * @memberof pyth_lazer_transaction.GovernanceSource + * @interface IWormholeEmitter + * @property {Uint8Array|null} [address] WormholeEmitter address + * @property {number|null} [chainId] WormholeEmitter chainId + */ + + /** + * Constructs a new WormholeEmitter. + * @memberof pyth_lazer_transaction.GovernanceSource + * @classdesc Represents a WormholeEmitter. + * @implements IWormholeEmitter + * @constructor + * @param {pyth_lazer_transaction.GovernanceSource.IWormholeEmitter=} [properties] Properties to set + */ + function WormholeEmitter(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]]; + } + + /** + * WormholeEmitter address. + * @member {Uint8Array|null|undefined} address + * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter + * @instance + */ + WormholeEmitter.prototype.address = null; + + /** + * WormholeEmitter chainId. + * @member {number|null|undefined} chainId + * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter + * @instance + */ + WormholeEmitter.prototype.chainId = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * WormholeEmitter _address. + * @member {"address"|undefined} _address + * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter + * @instance + */ + Object.defineProperty(WormholeEmitter.prototype, "_address", { + get: $util.oneOfGetter($oneOfFields = ["address"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * WormholeEmitter _chainId. + * @member {"chainId"|undefined} _chainId + * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter + * @instance + */ + Object.defineProperty(WormholeEmitter.prototype, "_chainId", { + get: $util.oneOfGetter($oneOfFields = ["chainId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new WormholeEmitter instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter + * @static + * @param {pyth_lazer_transaction.GovernanceSource.IWormholeEmitter=} [properties] Properties to set + * @returns {pyth_lazer_transaction.GovernanceSource.WormholeEmitter} WormholeEmitter instance + */ + WormholeEmitter.create = function create(properties) { + return new WormholeEmitter(properties); + }; + + /** + * Encodes the specified WormholeEmitter message. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.WormholeEmitter.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter + * @static + * @param {pyth_lazer_transaction.GovernanceSource.IWormholeEmitter} message WormholeEmitter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WormholeEmitter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.address != null && Object.hasOwnProperty.call(message, "address")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.address); + if (message.chainId != null && Object.hasOwnProperty.call(message, "chainId")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.chainId); + return writer; + }; + + /** + * Encodes the specified WormholeEmitter message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.WormholeEmitter.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter + * @static + * @param {pyth_lazer_transaction.GovernanceSource.IWormholeEmitter} message WormholeEmitter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WormholeEmitter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WormholeEmitter message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.GovernanceSource.WormholeEmitter} WormholeEmitter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WormholeEmitter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.GovernanceSource.WormholeEmitter(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.address = reader.bytes(); + break; + } + case 2: { + message.chainId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WormholeEmitter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.GovernanceSource.WormholeEmitter} WormholeEmitter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WormholeEmitter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WormholeEmitter message. + * @function verify + * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WormholeEmitter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if (message.address != null && message.hasOwnProperty("address")) { + properties._address = 1; + if (!(message.address && typeof message.address.length === "number" || $util.isString(message.address))) + return "address: buffer expected"; + } + if (message.chainId != null && message.hasOwnProperty("chainId")) { + properties._chainId = 1; + if (!$util.isInteger(message.chainId)) + return "chainId: integer expected"; + } + return null; + }; + + /** + * Creates a WormholeEmitter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.GovernanceSource.WormholeEmitter} WormholeEmitter + */ + WormholeEmitter.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.GovernanceSource.WormholeEmitter) + return object; + let message = new $root.pyth_lazer_transaction.GovernanceSource.WormholeEmitter(); + if (object.address != null) + if (typeof object.address === "string") + $util.base64.decode(object.address, message.address = $util.newBuffer($util.base64.length(object.address)), 0); + else if (object.address.length >= 0) + message.address = object.address; + if (object.chainId != null) + message.chainId = object.chainId >>> 0; + return message; + }; + + /** + * Creates a plain object from a WormholeEmitter message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter + * @static + * @param {pyth_lazer_transaction.GovernanceSource.WormholeEmitter} message WormholeEmitter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WormholeEmitter.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (message.address != null && message.hasOwnProperty("address")) { + object.address = options.bytes === String ? $util.base64.encode(message.address, 0, message.address.length) : options.bytes === Array ? Array.prototype.slice.call(message.address) : message.address; + if (options.oneofs) + object._address = "address"; + } + if (message.chainId != null && message.hasOwnProperty("chainId")) { + object.chainId = message.chainId; + if (options.oneofs) + object._chainId = "chainId"; + } + return object; + }; + + /** + * Converts this WormholeEmitter to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter + * @instance + * @returns {Object.} JSON object + */ + WormholeEmitter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WormholeEmitter + * @function getTypeUrl + * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WormholeEmitter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.GovernanceSource.WormholeEmitter"; + }; + + return WormholeEmitter; + })(); + return GovernanceSource; })(); @@ -6673,7 +6928,7 @@ export const pyth_lazer_transaction = $root.pyth_lazer_transaction = (() => { * Properties of an AddFeed. * @memberof pyth_lazer_transaction * @interface IAddFeed - * @property {number|null} [priceFeedId] AddFeed priceFeedId + * @property {number|null} [feedId] AddFeed feedId * @property {pyth_lazer_transaction.DynamicValue.IMap|null} [metadata] AddFeed metadata * @property {Array.|null} [permissionedPublishers] AddFeed permissionedPublishers */ @@ -6695,12 +6950,12 @@ export const pyth_lazer_transaction = $root.pyth_lazer_transaction = (() => { } /** - * AddFeed priceFeedId. - * @member {number|null|undefined} priceFeedId + * AddFeed feedId. + * @member {number|null|undefined} feedId * @memberof pyth_lazer_transaction.AddFeed * @instance */ - AddFeed.prototype.priceFeedId = null; + AddFeed.prototype.feedId = null; /** * AddFeed metadata. @@ -6722,13 +6977,13 @@ export const pyth_lazer_transaction = $root.pyth_lazer_transaction = (() => { let $oneOfFields; /** - * AddFeed _priceFeedId. - * @member {"priceFeedId"|undefined} _priceFeedId + * AddFeed _feedId. + * @member {"feedId"|undefined} _feedId * @memberof pyth_lazer_transaction.AddFeed * @instance */ - Object.defineProperty(AddFeed.prototype, "_priceFeedId", { - get: $util.oneOfGetter($oneOfFields = ["priceFeedId"]), + Object.defineProperty(AddFeed.prototype, "_feedId", { + get: $util.oneOfGetter($oneOfFields = ["feedId"]), set: $util.oneOfSetter($oneOfFields) }); @@ -6767,8 +7022,8 @@ export const pyth_lazer_transaction = $root.pyth_lazer_transaction = (() => { AddFeed.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.priceFeedId != null && Object.hasOwnProperty.call(message, "priceFeedId")) - writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.priceFeedId); + if (message.feedId != null && Object.hasOwnProperty.call(message, "feedId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.feedId); if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) $root.pyth_lazer_transaction.DynamicValue.Map.encode(message.metadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.permissionedPublishers != null && message.permissionedPublishers.length) { @@ -6814,7 +7069,7 @@ export const pyth_lazer_transaction = $root.pyth_lazer_transaction = (() => { break; switch (tag >>> 3) { case 1: { - message.priceFeedId = reader.uint32(); + message.feedId = reader.uint32(); break; } case 2: { @@ -6868,10 +7123,10 @@ export const pyth_lazer_transaction = $root.pyth_lazer_transaction = (() => { if (typeof message !== "object" || message === null) return "object expected"; let properties = {}; - if (message.priceFeedId != null && message.hasOwnProperty("priceFeedId")) { - properties._priceFeedId = 1; - if (!$util.isInteger(message.priceFeedId)) - return "priceFeedId: integer expected"; + if (message.feedId != null && message.hasOwnProperty("feedId")) { + properties._feedId = 1; + if (!$util.isInteger(message.feedId)) + return "feedId: integer expected"; } if (message.metadata != null && message.hasOwnProperty("metadata")) { properties._metadata = 1; @@ -6903,8 +7158,8 @@ export const pyth_lazer_transaction = $root.pyth_lazer_transaction = (() => { if (object instanceof $root.pyth_lazer_transaction.AddFeed) return object; let message = new $root.pyth_lazer_transaction.AddFeed(); - if (object.priceFeedId != null) - message.priceFeedId = object.priceFeedId >>> 0; + if (object.feedId != null) + message.feedId = object.feedId >>> 0; if (object.metadata != null) { if (typeof object.metadata !== "object") throw TypeError(".pyth_lazer_transaction.AddFeed.metadata: object expected"); @@ -6935,10 +7190,10 @@ export const pyth_lazer_transaction = $root.pyth_lazer_transaction = (() => { let object = {}; if (options.arrays || options.defaults) object.permissionedPublishers = []; - if (message.priceFeedId != null && message.hasOwnProperty("priceFeedId")) { - object.priceFeedId = message.priceFeedId; + if (message.feedId != null && message.hasOwnProperty("feedId")) { + object.feedId = message.feedId; if (options.oneofs) - object._priceFeedId = "priceFeedId"; + object._feedId = "feedId"; } if (message.metadata != null && message.hasOwnProperty("metadata")) { object.metadata = $root.pyth_lazer_transaction.DynamicValue.Map.toObject(message.metadata, options); @@ -6988,7 +7243,7 @@ export const pyth_lazer_transaction = $root.pyth_lazer_transaction = (() => { * Properties of an UpdateFeed. * @memberof pyth_lazer_transaction * @interface IUpdateFeed - * @property {number|null} [priceFeedId] UpdateFeed priceFeedId + * @property {number|null} [feedId] UpdateFeed feedId * @property {pyth_lazer_transaction.IUpdateFeedMetadata|null} [updateFeedMetadata] UpdateFeed updateFeedMetadata * @property {pyth_lazer_transaction.IActivateFeed|null} [activateFeed] UpdateFeed activateFeed * @property {pyth_lazer_transaction.IDeactivateFeed|null} [deactivateFeed] UpdateFeed deactivateFeed @@ -7011,12 +7266,12 @@ export const pyth_lazer_transaction = $root.pyth_lazer_transaction = (() => { } /** - * UpdateFeed priceFeedId. - * @member {number|null|undefined} priceFeedId + * UpdateFeed feedId. + * @member {number|null|undefined} feedId * @memberof pyth_lazer_transaction.UpdateFeed * @instance */ - UpdateFeed.prototype.priceFeedId = null; + UpdateFeed.prototype.feedId = null; /** * UpdateFeed updateFeedMetadata. @@ -7054,13 +7309,13 @@ export const pyth_lazer_transaction = $root.pyth_lazer_transaction = (() => { let $oneOfFields; /** - * UpdateFeed _priceFeedId. - * @member {"priceFeedId"|undefined} _priceFeedId + * UpdateFeed _feedId. + * @member {"feedId"|undefined} _feedId * @memberof pyth_lazer_transaction.UpdateFeed * @instance */ - Object.defineProperty(UpdateFeed.prototype, "_priceFeedId", { - get: $util.oneOfGetter($oneOfFields = ["priceFeedId"]), + Object.defineProperty(UpdateFeed.prototype, "_feedId", { + get: $util.oneOfGetter($oneOfFields = ["feedId"]), set: $util.oneOfSetter($oneOfFields) }); @@ -7099,8 +7354,8 @@ export const pyth_lazer_transaction = $root.pyth_lazer_transaction = (() => { UpdateFeed.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.priceFeedId != null && Object.hasOwnProperty.call(message, "priceFeedId")) - writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.priceFeedId); + if (message.feedId != null && Object.hasOwnProperty.call(message, "feedId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.feedId); if (message.updateFeedMetadata != null && Object.hasOwnProperty.call(message, "updateFeedMetadata")) $root.pyth_lazer_transaction.UpdateFeedMetadata.encode(message.updateFeedMetadata, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); if (message.activateFeed != null && Object.hasOwnProperty.call(message, "activateFeed")) @@ -7146,7 +7401,7 @@ export const pyth_lazer_transaction = $root.pyth_lazer_transaction = (() => { break; switch (tag >>> 3) { case 1: { - message.priceFeedId = reader.uint32(); + message.feedId = reader.uint32(); break; } case 101: { @@ -7201,10 +7456,10 @@ export const pyth_lazer_transaction = $root.pyth_lazer_transaction = (() => { if (typeof message !== "object" || message === null) return "object expected"; let properties = {}; - if (message.priceFeedId != null && message.hasOwnProperty("priceFeedId")) { - properties._priceFeedId = 1; - if (!$util.isInteger(message.priceFeedId)) - return "priceFeedId: integer expected"; + if (message.feedId != null && message.hasOwnProperty("feedId")) { + properties._feedId = 1; + if (!$util.isInteger(message.feedId)) + return "feedId: integer expected"; } if (message.updateFeedMetadata != null && message.hasOwnProperty("updateFeedMetadata")) { properties.action = 1; @@ -7259,8 +7514,8 @@ export const pyth_lazer_transaction = $root.pyth_lazer_transaction = (() => { if (object instanceof $root.pyth_lazer_transaction.UpdateFeed) return object; let message = new $root.pyth_lazer_transaction.UpdateFeed(); - if (object.priceFeedId != null) - message.priceFeedId = object.priceFeedId >>> 0; + if (object.feedId != null) + message.feedId = object.feedId >>> 0; if (object.updateFeedMetadata != null) { if (typeof object.updateFeedMetadata !== "object") throw TypeError(".pyth_lazer_transaction.UpdateFeed.updateFeedMetadata: object expected"); @@ -7297,10 +7552,10 @@ export const pyth_lazer_transaction = $root.pyth_lazer_transaction = (() => { if (!options) options = {}; let object = {}; - if (message.priceFeedId != null && message.hasOwnProperty("priceFeedId")) { - object.priceFeedId = message.priceFeedId; + if (message.feedId != null && message.hasOwnProperty("feedId")) { + object.feedId = message.feedId; if (options.oneofs) - object._priceFeedId = "priceFeedId"; + object._feedId = "feedId"; } if (message.updateFeedMetadata != null && message.hasOwnProperty("updateFeedMetadata")) { object.updateFeedMetadata = $root.pyth_lazer_transaction.UpdateFeedMetadata.toObject(message.updateFeedMetadata, options); diff --git a/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/lazer_functions.ts b/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/lazer_functions.ts index dfc7e5ce12..eb5718dc20 100644 --- a/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/lazer_functions.ts +++ b/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/lazer_functions.ts @@ -5,9 +5,33 @@ import { ProgramType, LazerConfig, LazerState, + LazerFeedMetadata, } from "../types"; import { pyth_lazer_transaction } from "./generated/governance_instruction"; +/** + * Converts LazerFeedMetadata to protobuf IMap format using protobufjs fromObject + * This leverages the built-in protobufjs conversion capabilities + * + * @param metadata The LazerFeedMetadata to convert + * @returns IMap compatible object for protobuf + */ +export function convertLazerFeedMetadataToMap( + metadata: LazerFeedMetadata +): pyth_lazer_transaction.DynamicValue.IMap { + // Use protobufjs fromObject to handle the conversion automatically + const mapData = { + items: Object.entries(metadata) + .filter(([_, value]) => value !== undefined) + .map(([key, value]) => ({ + key, + value + })) + }; + + return pyth_lazer_transaction.DynamicValue.Map.fromObject(mapData); +} + /** * Parameters for getting Lazer configuration */ @@ -40,7 +64,7 @@ const sampleLazerState: LazerState = { feeds: [ { metadata: { - priceFeedId: 1, + feedId: 1, name: "CATCOIN", symbol: "CAT", description: "desc1", @@ -56,7 +80,7 @@ const sampleLazerState: LazerState = { }, { metadata: { - priceFeedId: 2, + feedId: 2, name: "DUCKCOIN", symbol: "DUCKY", description: "desc2", @@ -208,10 +232,10 @@ export function validateUploadedConfig( // Compare feeds const existingFeeds = new Map( - existingConfig.feeds.map((feed) => [feed.metadata.priceFeedId, feed]), + existingConfig.feeds.map((feed) => [feed.metadata.feedId, feed]), ); const uploadedFeeds = new Map( - uploadedLazerState.feeds.map((feed) => [feed.metadata.priceFeedId, feed]), + uploadedLazerState.feeds.map((feed) => [feed.metadata.feedId, feed]), ); // Find added, removed, and modified feeds @@ -334,6 +358,20 @@ export async function generateInstructions( if (changeKey.startsWith("feed_")) { const feedId = parseInt(changeKey.replace("feed_", "")); + if (!change.prev && change.new) { + const feedMetadata = change.new.feeds?.[0]?.metadata; + console.log("feedMetadata", feedMetadata); + if (feedMetadata) { + const addFeedMessage = pyth_lazer_transaction.AddFeed.create({ + feedId: feedId, + metadata: convertLazerFeedMetadataToMap(feedMetadata), + permissionedPublishers: [], + }); + const encoded = pyth_lazer_transaction.AddFeed.encode(addFeedMessage).finish(); + governanceBuffer = Buffer.from(encoded); + } + } + // if (!change.prev && change.new) { // const feedMetadata = change.new.feeds?.[0]?.metadata; // // Add new feed diff --git a/governance/xc_admin/packages/xc_admin_common/src/programs/types.ts b/governance/xc_admin/packages/xc_admin_common/src/programs/types.ts index 31fc764865..45fc5db2ee 100644 --- a/governance/xc_admin/packages/xc_admin_common/src/programs/types.ts +++ b/governance/xc_admin/packages/xc_admin_common/src/programs/types.ts @@ -124,7 +124,7 @@ export interface ValidationResult { * Lazer feed metadata type */ export type LazerFeedMetadata = { - priceFeedId: number; + feedId: number; name: string; symbol: string; description: string; From 8bcdf9c5599f6650e13a0c04766bdab50961d9eb Mon Sep 17 00:00:00 2001 From: Daniel Chew Date: Tue, 27 May 2025 16:41:30 +0900 Subject: [PATCH 13/27] fix: format --- .../generated/governance_instruction.d.ts | 8341 +++++++++-------- .../src/programs/lazer/lazer_functions.ts | 9 +- 2 files changed, 4474 insertions(+), 3876 deletions(-) diff --git a/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/generated/governance_instruction.d.ts b/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/generated/governance_instruction.d.ts index 66c941628b..144f35e0d0 100644 --- a/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/generated/governance_instruction.d.ts +++ b/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/generated/governance_instruction.d.ts @@ -2,3924 +2,4521 @@ import * as $protobuf from "protobufjs"; import Long = require("long"); /** Namespace pyth_lazer_transaction. */ export namespace pyth_lazer_transaction { - - /** Properties of a GovernanceInstruction. */ - interface IGovernanceInstruction { - - /** GovernanceInstruction directives */ - directives?: (pyth_lazer_transaction.IGovernanceDirective[]|null); - - /** GovernanceInstruction minExecutionTimestamp */ - minExecutionTimestamp?: (google.protobuf.ITimestamp|null); - - /** GovernanceInstruction maxExecutionTimestamp */ - maxExecutionTimestamp?: (google.protobuf.ITimestamp|null); - - /** GovernanceInstruction governanceSequenceNo */ - governanceSequenceNo?: (number|null); - } - - /** Represents a GovernanceInstruction. */ - class GovernanceInstruction implements IGovernanceInstruction { - - /** - * Constructs a new GovernanceInstruction. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IGovernanceInstruction); - - /** GovernanceInstruction directives. */ - public directives: pyth_lazer_transaction.IGovernanceDirective[]; - - /** GovernanceInstruction minExecutionTimestamp. */ - public minExecutionTimestamp?: (google.protobuf.ITimestamp|null); - - /** GovernanceInstruction maxExecutionTimestamp. */ - public maxExecutionTimestamp?: (google.protobuf.ITimestamp|null); - - /** GovernanceInstruction governanceSequenceNo. */ - public governanceSequenceNo?: (number|null); - - /** GovernanceInstruction _minExecutionTimestamp. */ - public _minExecutionTimestamp?: "minExecutionTimestamp"; - - /** GovernanceInstruction _maxExecutionTimestamp. */ - public _maxExecutionTimestamp?: "maxExecutionTimestamp"; - - /** GovernanceInstruction _governanceSequenceNo. */ - public _governanceSequenceNo?: "governanceSequenceNo"; - - /** - * Creates a new GovernanceInstruction instance using the specified properties. - * @param [properties] Properties to set - * @returns GovernanceInstruction instance - */ - public static create(properties?: pyth_lazer_transaction.IGovernanceInstruction): pyth_lazer_transaction.GovernanceInstruction; - - /** - * Encodes the specified GovernanceInstruction message. Does not implicitly {@link pyth_lazer_transaction.GovernanceInstruction.verify|verify} messages. - * @param message GovernanceInstruction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IGovernanceInstruction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GovernanceInstruction message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceInstruction.verify|verify} messages. - * @param message GovernanceInstruction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IGovernanceInstruction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GovernanceInstruction message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GovernanceInstruction - * @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): pyth_lazer_transaction.GovernanceInstruction; - - /** - * Decodes a GovernanceInstruction message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GovernanceInstruction - * @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)): pyth_lazer_transaction.GovernanceInstruction; - - /** - * Verifies a GovernanceInstruction 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 GovernanceInstruction message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GovernanceInstruction - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.GovernanceInstruction; - - /** - * Creates a plain object from a GovernanceInstruction message. Also converts values to other types if specified. - * @param message GovernanceInstruction - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.GovernanceInstruction, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GovernanceInstruction to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GovernanceInstruction - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ShardFilter. */ - interface IShardFilter { - - /** ShardFilter allShards */ - allShards?: (google.protobuf.IEmpty|null); - - /** ShardFilter shardNames */ - shardNames?: (pyth_lazer_transaction.ShardFilter.IShardNames|null); - - /** ShardFilter shardGroups */ - shardGroups?: (pyth_lazer_transaction.ShardFilter.IShardGroups|null); - } - - /** Represents a ShardFilter. */ - class ShardFilter implements IShardFilter { - - /** - * Constructs a new ShardFilter. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IShardFilter); - - /** ShardFilter allShards. */ - public allShards?: (google.protobuf.IEmpty|null); - - /** ShardFilter shardNames. */ - public shardNames?: (pyth_lazer_transaction.ShardFilter.IShardNames|null); - - /** ShardFilter shardGroups. */ - public shardGroups?: (pyth_lazer_transaction.ShardFilter.IShardGroups|null); - - /** ShardFilter filter. */ - public filter?: ("allShards"|"shardNames"|"shardGroups"); - - /** - * Creates a new ShardFilter instance using the specified properties. - * @param [properties] Properties to set - * @returns ShardFilter instance - */ - public static create(properties?: pyth_lazer_transaction.IShardFilter): pyth_lazer_transaction.ShardFilter; - - /** - * Encodes the specified ShardFilter message. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.verify|verify} messages. - * @param message ShardFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IShardFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ShardFilter message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.verify|verify} messages. - * @param message ShardFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IShardFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ShardFilter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ShardFilter - * @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): pyth_lazer_transaction.ShardFilter; - - /** - * Decodes a ShardFilter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ShardFilter - * @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)): pyth_lazer_transaction.ShardFilter; - - /** - * Verifies a ShardFilter 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 ShardFilter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ShardFilter - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.ShardFilter; - - /** - * Creates a plain object from a ShardFilter message. Also converts values to other types if specified. - * @param message ShardFilter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.ShardFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ShardFilter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ShardFilter - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ShardFilter { - - /** Properties of a ShardNames. */ - interface IShardNames { - - /** ShardNames shardNames */ - shardNames?: (string[]|null); - } - - /** Represents a ShardNames. */ - class ShardNames implements IShardNames { - - /** - * Constructs a new ShardNames. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.ShardFilter.IShardNames); - - /** ShardNames shardNames. */ - public shardNames: string[]; - - /** - * Creates a new ShardNames instance using the specified properties. - * @param [properties] Properties to set - * @returns ShardNames instance - */ - public static create(properties?: pyth_lazer_transaction.ShardFilter.IShardNames): pyth_lazer_transaction.ShardFilter.ShardNames; - - /** - * Encodes the specified ShardNames message. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardNames.verify|verify} messages. - * @param message ShardNames message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.ShardFilter.IShardNames, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ShardNames message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardNames.verify|verify} messages. - * @param message ShardNames message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.ShardFilter.IShardNames, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ShardNames message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ShardNames - * @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): pyth_lazer_transaction.ShardFilter.ShardNames; - - /** - * Decodes a ShardNames message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ShardNames - * @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)): pyth_lazer_transaction.ShardFilter.ShardNames; - - /** - * Verifies a ShardNames 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 ShardNames message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ShardNames - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.ShardFilter.ShardNames; - - /** - * Creates a plain object from a ShardNames message. Also converts values to other types if specified. - * @param message ShardNames - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.ShardFilter.ShardNames, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ShardNames to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ShardNames - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ShardGroups. */ - interface IShardGroups { - - /** ShardGroups shardGroups */ - shardGroups?: (string[]|null); - } - - /** Represents a ShardGroups. */ - class ShardGroups implements IShardGroups { - - /** - * Constructs a new ShardGroups. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.ShardFilter.IShardGroups); - - /** ShardGroups shardGroups. */ - public shardGroups: string[]; - - /** - * Creates a new ShardGroups instance using the specified properties. - * @param [properties] Properties to set - * @returns ShardGroups instance - */ - public static create(properties?: pyth_lazer_transaction.ShardFilter.IShardGroups): pyth_lazer_transaction.ShardFilter.ShardGroups; - - /** - * Encodes the specified ShardGroups message. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardGroups.verify|verify} messages. - * @param message ShardGroups message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.ShardFilter.IShardGroups, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ShardGroups message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardGroups.verify|verify} messages. - * @param message ShardGroups message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.ShardFilter.IShardGroups, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ShardGroups message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ShardGroups - * @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): pyth_lazer_transaction.ShardFilter.ShardGroups; - - /** - * Decodes a ShardGroups message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ShardGroups - * @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)): pyth_lazer_transaction.ShardFilter.ShardGroups; - - /** - * Verifies a ShardGroups 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 ShardGroups message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ShardGroups - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.ShardFilter.ShardGroups; - - /** - * Creates a plain object from a ShardGroups message. Also converts values to other types if specified. - * @param message ShardGroups - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.ShardFilter.ShardGroups, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ShardGroups to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ShardGroups - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a GovernanceDirective. */ - interface IGovernanceDirective { - - /** GovernanceDirective shardFilter */ - shardFilter?: (pyth_lazer_transaction.IShardFilter|null); - - /** GovernanceDirective createShard */ - createShard?: (pyth_lazer_transaction.ICreateShard|null); - - /** GovernanceDirective addGovernanceSource */ - addGovernanceSource?: (pyth_lazer_transaction.IAddGovernanceSource|null); - - /** GovernanceDirective updateGovernanceSource */ - updateGovernanceSource?: (pyth_lazer_transaction.IUpdateGovernanceSource|null); - - /** GovernanceDirective setShardName */ - setShardName?: (pyth_lazer_transaction.ISetShardName|null); - - /** GovernanceDirective setShardGroup */ - setShardGroup?: (pyth_lazer_transaction.ISetShardGroup|null); - - /** GovernanceDirective resetLastSequenceNo */ - resetLastSequenceNo?: (pyth_lazer_transaction.IResetLastSequenceNo|null); - - /** GovernanceDirective addPublisher */ - addPublisher?: (pyth_lazer_transaction.IAddPublisher|null); - - /** GovernanceDirective updatePublisher */ - updatePublisher?: (pyth_lazer_transaction.IUpdatePublisher|null); - - /** GovernanceDirective addFeed */ - addFeed?: (pyth_lazer_transaction.IAddFeed|null); - - /** GovernanceDirective updateFeed */ - updateFeed?: (pyth_lazer_transaction.IUpdateFeed|null); - } - - /** Represents a GovernanceDirective. */ - class GovernanceDirective implements IGovernanceDirective { - - /** - * Constructs a new GovernanceDirective. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IGovernanceDirective); - - /** GovernanceDirective shardFilter. */ - public shardFilter?: (pyth_lazer_transaction.IShardFilter|null); - - /** GovernanceDirective createShard. */ - public createShard?: (pyth_lazer_transaction.ICreateShard|null); - - /** GovernanceDirective addGovernanceSource. */ - public addGovernanceSource?: (pyth_lazer_transaction.IAddGovernanceSource|null); - - /** GovernanceDirective updateGovernanceSource. */ - public updateGovernanceSource?: (pyth_lazer_transaction.IUpdateGovernanceSource|null); - - /** GovernanceDirective setShardName. */ - public setShardName?: (pyth_lazer_transaction.ISetShardName|null); - - /** GovernanceDirective setShardGroup. */ - public setShardGroup?: (pyth_lazer_transaction.ISetShardGroup|null); - - /** GovernanceDirective resetLastSequenceNo. */ - public resetLastSequenceNo?: (pyth_lazer_transaction.IResetLastSequenceNo|null); - - /** GovernanceDirective addPublisher. */ - public addPublisher?: (pyth_lazer_transaction.IAddPublisher|null); - - /** GovernanceDirective updatePublisher. */ - public updatePublisher?: (pyth_lazer_transaction.IUpdatePublisher|null); - - /** GovernanceDirective addFeed. */ - public addFeed?: (pyth_lazer_transaction.IAddFeed|null); - - /** GovernanceDirective updateFeed. */ - public updateFeed?: (pyth_lazer_transaction.IUpdateFeed|null); - - /** GovernanceDirective _shardFilter. */ - public _shardFilter?: "shardFilter"; - - /** GovernanceDirective action. */ - public action?: ("createShard"|"addGovernanceSource"|"updateGovernanceSource"|"setShardName"|"setShardGroup"|"resetLastSequenceNo"|"addPublisher"|"updatePublisher"|"addFeed"|"updateFeed"); - - /** - * Creates a new GovernanceDirective instance using the specified properties. - * @param [properties] Properties to set - * @returns GovernanceDirective instance - */ - public static create(properties?: pyth_lazer_transaction.IGovernanceDirective): pyth_lazer_transaction.GovernanceDirective; - - /** - * Encodes the specified GovernanceDirective message. Does not implicitly {@link pyth_lazer_transaction.GovernanceDirective.verify|verify} messages. - * @param message GovernanceDirective message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IGovernanceDirective, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GovernanceDirective message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceDirective.verify|verify} messages. - * @param message GovernanceDirective message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IGovernanceDirective, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GovernanceDirective message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GovernanceDirective - * @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): pyth_lazer_transaction.GovernanceDirective; - - /** - * Decodes a GovernanceDirective message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GovernanceDirective - * @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)): pyth_lazer_transaction.GovernanceDirective; - - /** - * Verifies a GovernanceDirective 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 GovernanceDirective message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GovernanceDirective - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.GovernanceDirective; - - /** - * Creates a plain object from a GovernanceDirective message. Also converts values to other types if specified. - * @param message GovernanceDirective - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.GovernanceDirective, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GovernanceDirective to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GovernanceDirective - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Permissions. */ - interface IPermissions { - - /** Permissions allActions */ - allActions?: (boolean|null); - - /** Permissions shardActions */ - shardActions?: (pyth_lazer_transaction.Permissions.ShardAction[]|null); - - /** Permissions allUpdateGovernanceSourceActions */ - allUpdateGovernanceSourceActions?: (boolean|null); - - /** Permissions updateGovernanceSourceActions */ - updateGovernanceSourceActions?: (pyth_lazer_transaction.Permissions.UpdateGovernanceSourceAction[]|null); - - /** Permissions allUpdatePublisherAction */ - allUpdatePublisherAction?: (boolean|null); - - /** Permissions updatePublisherActions */ - updatePublisherActions?: (pyth_lazer_transaction.Permissions.UpdatePublisherAction[]|null); - - /** Permissions allUpdateFeedActions */ - allUpdateFeedActions?: (boolean|null); - - /** Permissions updateFeedActions */ - updateFeedActions?: (pyth_lazer_transaction.Permissions.UpdateFeedAction[]|null); - } - - /** Represents a Permissions. */ - class Permissions implements IPermissions { - - /** - * Constructs a new Permissions. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IPermissions); - - /** Permissions allActions. */ - public allActions?: (boolean|null); - - /** Permissions shardActions. */ - public shardActions: pyth_lazer_transaction.Permissions.ShardAction[]; - - /** Permissions allUpdateGovernanceSourceActions. */ - public allUpdateGovernanceSourceActions?: (boolean|null); - - /** Permissions updateGovernanceSourceActions. */ - public updateGovernanceSourceActions: pyth_lazer_transaction.Permissions.UpdateGovernanceSourceAction[]; - - /** Permissions allUpdatePublisherAction. */ - public allUpdatePublisherAction?: (boolean|null); - - /** Permissions updatePublisherActions. */ - public updatePublisherActions: pyth_lazer_transaction.Permissions.UpdatePublisherAction[]; - - /** Permissions allUpdateFeedActions. */ - public allUpdateFeedActions?: (boolean|null); - - /** Permissions updateFeedActions. */ - public updateFeedActions: pyth_lazer_transaction.Permissions.UpdateFeedAction[]; - - /** Permissions _allActions. */ - public _allActions?: "allActions"; - - /** Permissions _allUpdateGovernanceSourceActions. */ - public _allUpdateGovernanceSourceActions?: "allUpdateGovernanceSourceActions"; - - /** Permissions _allUpdatePublisherAction. */ - public _allUpdatePublisherAction?: "allUpdatePublisherAction"; - - /** Permissions _allUpdateFeedActions. */ - public _allUpdateFeedActions?: "allUpdateFeedActions"; - - /** - * Creates a new Permissions instance using the specified properties. - * @param [properties] Properties to set - * @returns Permissions instance - */ - public static create(properties?: pyth_lazer_transaction.IPermissions): pyth_lazer_transaction.Permissions; - - /** - * Encodes the specified Permissions message. Does not implicitly {@link pyth_lazer_transaction.Permissions.verify|verify} messages. - * @param message Permissions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IPermissions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Permissions message, length delimited. Does not implicitly {@link pyth_lazer_transaction.Permissions.verify|verify} messages. - * @param message Permissions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IPermissions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Permissions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Permissions - * @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): pyth_lazer_transaction.Permissions; - - /** - * Decodes a Permissions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Permissions - * @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)): pyth_lazer_transaction.Permissions; - - /** - * Verifies a Permissions 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 Permissions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Permissions - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.Permissions; - - /** - * Creates a plain object from a Permissions message. Also converts values to other types if specified. - * @param message Permissions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.Permissions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Permissions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Permissions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Permissions { - - /** ShardAction enum. */ - enum ShardAction { - SHARD_ACTION_UNSPECIFIED = 0, - CREATE_SHARD = 101, - ADD_GOVERNANCE_SOURCE = 102, - UPDATE_GOVERNANCE_SOURCE = 103, - SET_SHARD_NAME = 104, - SET_SHARD_GROUP = 105, - RESET_LAST_SEQUENCE_NO = 106, - ADD_PUBLISHER = 107, - ADD_FEED = 109 - } - - /** UpdateGovernanceSourceAction enum. */ - enum UpdateGovernanceSourceAction { - UPDATE_GOVERNANCE_SOURCE_ACTION_UNSPECIFIED = 0, - SET_GOVERNANCE_SOURCE_PERMISSIONS = 101, - REMOVE_GOVERNANCE_SOURCE = 199 - } - - /** UpdatePublisherAction enum. */ - enum UpdatePublisherAction { - UPDATE_PUBLISHER_ACTION_UNSPECIFIED = 0, - SET_PUBLISHER_NAME = 101, - ADD_PUBLISHER_PUBLIC_KEYS = 102, - REMOVE_PUBLISHER_PUBLIC_KEYS = 103, - SET_PUBLISHER_PUBLIC_KEYS = 104, - SET_PUBLISHER_ACTIVE = 105, - REMOVE_PUBLISHER = 199 - } - - /** UpdateFeedAction enum. */ - enum UpdateFeedAction { - UPDATE_FEED_ACTION_UNSPECIFIED = 0, - UPDATE_FEED_METADATA = 101, - ACTIVATE_FEED = 102, - DEACTIVATE_FEED = 103, - REMOVE_FEED = 199 - } + /** Properties of a GovernanceInstruction. */ + interface IGovernanceInstruction { + /** GovernanceInstruction directives */ + directives?: pyth_lazer_transaction.IGovernanceDirective[] | null; + + /** GovernanceInstruction minExecutionTimestamp */ + minExecutionTimestamp?: google.protobuf.ITimestamp | null; + + /** GovernanceInstruction maxExecutionTimestamp */ + maxExecutionTimestamp?: google.protobuf.ITimestamp | null; + + /** GovernanceInstruction governanceSequenceNo */ + governanceSequenceNo?: number | null; + } + + /** Represents a GovernanceInstruction. */ + class GovernanceInstruction implements IGovernanceInstruction { + /** + * Constructs a new GovernanceInstruction. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IGovernanceInstruction); + + /** GovernanceInstruction directives. */ + public directives: pyth_lazer_transaction.IGovernanceDirective[]; + + /** GovernanceInstruction minExecutionTimestamp. */ + public minExecutionTimestamp?: google.protobuf.ITimestamp | null; + + /** GovernanceInstruction maxExecutionTimestamp. */ + public maxExecutionTimestamp?: google.protobuf.ITimestamp | null; + + /** GovernanceInstruction governanceSequenceNo. */ + public governanceSequenceNo?: number | null; + + /** GovernanceInstruction _minExecutionTimestamp. */ + public _minExecutionTimestamp?: "minExecutionTimestamp"; + + /** GovernanceInstruction _maxExecutionTimestamp. */ + public _maxExecutionTimestamp?: "maxExecutionTimestamp"; + + /** GovernanceInstruction _governanceSequenceNo. */ + public _governanceSequenceNo?: "governanceSequenceNo"; + + /** + * Creates a new GovernanceInstruction instance using the specified properties. + * @param [properties] Properties to set + * @returns GovernanceInstruction instance + */ + public static create( + properties?: pyth_lazer_transaction.IGovernanceInstruction, + ): pyth_lazer_transaction.GovernanceInstruction; + + /** + * Encodes the specified GovernanceInstruction message. Does not implicitly {@link pyth_lazer_transaction.GovernanceInstruction.verify|verify} messages. + * @param message GovernanceInstruction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IGovernanceInstruction, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified GovernanceInstruction message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceInstruction.verify|verify} messages. + * @param message GovernanceInstruction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IGovernanceInstruction, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a GovernanceInstruction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GovernanceInstruction + * @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, + ): pyth_lazer_transaction.GovernanceInstruction; + + /** + * Decodes a GovernanceInstruction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GovernanceInstruction + * @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, + ): pyth_lazer_transaction.GovernanceInstruction; + + /** + * Verifies a GovernanceInstruction 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 GovernanceInstruction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GovernanceInstruction + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.GovernanceInstruction; + + /** + * Creates a plain object from a GovernanceInstruction message. Also converts values to other types if specified. + * @param message GovernanceInstruction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.GovernanceInstruction, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this GovernanceInstruction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GovernanceInstruction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ShardFilter. */ + interface IShardFilter { + /** ShardFilter allShards */ + allShards?: google.protobuf.IEmpty | null; + + /** ShardFilter shardNames */ + shardNames?: pyth_lazer_transaction.ShardFilter.IShardNames | null; + + /** ShardFilter shardGroups */ + shardGroups?: pyth_lazer_transaction.ShardFilter.IShardGroups | null; + } + + /** Represents a ShardFilter. */ + class ShardFilter implements IShardFilter { + /** + * Constructs a new ShardFilter. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IShardFilter); + + /** ShardFilter allShards. */ + public allShards?: google.protobuf.IEmpty | null; + + /** ShardFilter shardNames. */ + public shardNames?: pyth_lazer_transaction.ShardFilter.IShardNames | null; + + /** ShardFilter shardGroups. */ + public shardGroups?: pyth_lazer_transaction.ShardFilter.IShardGroups | null; + + /** ShardFilter filter. */ + public filter?: "allShards" | "shardNames" | "shardGroups"; + + /** + * Creates a new ShardFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns ShardFilter instance + */ + public static create( + properties?: pyth_lazer_transaction.IShardFilter, + ): pyth_lazer_transaction.ShardFilter; + + /** + * Encodes the specified ShardFilter message. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.verify|verify} messages. + * @param message ShardFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IShardFilter, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified ShardFilter message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.verify|verify} messages. + * @param message ShardFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IShardFilter, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ShardFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ShardFilter + * @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, + ): pyth_lazer_transaction.ShardFilter; + + /** + * Decodes a ShardFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ShardFilter + * @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, + ): pyth_lazer_transaction.ShardFilter; + + /** + * Verifies a ShardFilter 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 ShardFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ShardFilter + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.ShardFilter; + + /** + * Creates a plain object from a ShardFilter message. Also converts values to other types if specified. + * @param message ShardFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.ShardFilter, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this ShardFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ShardFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ShardFilter { + /** Properties of a ShardNames. */ + interface IShardNames { + /** ShardNames shardNames */ + shardNames?: string[] | null; } - /** Properties of a GovernanceSource. */ - interface IGovernanceSource { - - /** GovernanceSource singleEd25519 */ - singleEd25519?: (pyth_lazer_transaction.GovernanceSource.ISingleEd25519|null); - - /** GovernanceSource wormholeEmitter */ - wormholeEmitter?: (pyth_lazer_transaction.GovernanceSource.IWormholeEmitter|null); + /** Represents a ShardNames. */ + class ShardNames implements IShardNames { + /** + * Constructs a new ShardNames. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ShardFilter.IShardNames); + + /** ShardNames shardNames. */ + public shardNames: string[]; + + /** + * Creates a new ShardNames instance using the specified properties. + * @param [properties] Properties to set + * @returns ShardNames instance + */ + public static create( + properties?: pyth_lazer_transaction.ShardFilter.IShardNames, + ): pyth_lazer_transaction.ShardFilter.ShardNames; + + /** + * Encodes the specified ShardNames message. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardNames.verify|verify} messages. + * @param message ShardNames message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.ShardFilter.IShardNames, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified ShardNames message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardNames.verify|verify} messages. + * @param message ShardNames message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.ShardFilter.IShardNames, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ShardNames message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ShardNames + * @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, + ): pyth_lazer_transaction.ShardFilter.ShardNames; + + /** + * Decodes a ShardNames message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ShardNames + * @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, + ): pyth_lazer_transaction.ShardFilter.ShardNames; + + /** + * Verifies a ShardNames 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 ShardNames message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ShardNames + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.ShardFilter.ShardNames; + + /** + * Creates a plain object from a ShardNames message. Also converts values to other types if specified. + * @param message ShardNames + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.ShardFilter.ShardNames, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this ShardNames to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ShardNames + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Represents a GovernanceSource. */ - class GovernanceSource implements IGovernanceSource { - - /** - * Constructs a new GovernanceSource. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IGovernanceSource); - - /** GovernanceSource singleEd25519. */ - public singleEd25519?: (pyth_lazer_transaction.GovernanceSource.ISingleEd25519|null); - - /** GovernanceSource wormholeEmitter. */ - public wormholeEmitter?: (pyth_lazer_transaction.GovernanceSource.IWormholeEmitter|null); - - /** GovernanceSource source. */ - public source?: ("singleEd25519"|"wormholeEmitter"); - - /** - * Creates a new GovernanceSource instance using the specified properties. - * @param [properties] Properties to set - * @returns GovernanceSource instance - */ - public static create(properties?: pyth_lazer_transaction.IGovernanceSource): pyth_lazer_transaction.GovernanceSource; - - /** - * Encodes the specified GovernanceSource message. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.verify|verify} messages. - * @param message GovernanceSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IGovernanceSource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GovernanceSource message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.verify|verify} messages. - * @param message GovernanceSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IGovernanceSource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GovernanceSource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GovernanceSource - * @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): pyth_lazer_transaction.GovernanceSource; - - /** - * Decodes a GovernanceSource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GovernanceSource - * @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)): pyth_lazer_transaction.GovernanceSource; - - /** - * Verifies a GovernanceSource 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 GovernanceSource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GovernanceSource - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.GovernanceSource; - - /** - * Creates a plain object from a GovernanceSource message. Also converts values to other types if specified. - * @param message GovernanceSource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.GovernanceSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GovernanceSource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GovernanceSource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** Properties of a ShardGroups. */ + interface IShardGroups { + /** ShardGroups shardGroups */ + shardGroups?: string[] | null; } - namespace GovernanceSource { - - /** Properties of a SingleEd25519. */ - interface ISingleEd25519 { - - /** SingleEd25519 publicKey */ - publicKey?: (Uint8Array|null); - } - - /** Represents a SingleEd25519. */ - class SingleEd25519 implements ISingleEd25519 { - - /** - * Constructs a new SingleEd25519. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.GovernanceSource.ISingleEd25519); - - /** SingleEd25519 publicKey. */ - public publicKey?: (Uint8Array|null); - - /** SingleEd25519 _publicKey. */ - public _publicKey?: "publicKey"; - - /** - * Creates a new SingleEd25519 instance using the specified properties. - * @param [properties] Properties to set - * @returns SingleEd25519 instance - */ - public static create(properties?: pyth_lazer_transaction.GovernanceSource.ISingleEd25519): pyth_lazer_transaction.GovernanceSource.SingleEd25519; - - /** - * Encodes the specified SingleEd25519 message. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.SingleEd25519.verify|verify} messages. - * @param message SingleEd25519 message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.GovernanceSource.ISingleEd25519, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SingleEd25519 message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.SingleEd25519.verify|verify} messages. - * @param message SingleEd25519 message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.GovernanceSource.ISingleEd25519, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SingleEd25519 message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SingleEd25519 - * @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): pyth_lazer_transaction.GovernanceSource.SingleEd25519; - - /** - * Decodes a SingleEd25519 message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SingleEd25519 - * @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)): pyth_lazer_transaction.GovernanceSource.SingleEd25519; - - /** - * Verifies a SingleEd25519 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 SingleEd25519 message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SingleEd25519 - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.GovernanceSource.SingleEd25519; - - /** - * Creates a plain object from a SingleEd25519 message. Also converts values to other types if specified. - * @param message SingleEd25519 - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.GovernanceSource.SingleEd25519, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SingleEd25519 to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SingleEd25519 - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WormholeEmitter. */ - interface IWormholeEmitter { - - /** WormholeEmitter address */ - address?: (Uint8Array|null); - - /** WormholeEmitter chainId */ - chainId?: (number|null); - } - - /** Represents a WormholeEmitter. */ - class WormholeEmitter implements IWormholeEmitter { - - /** - * Constructs a new WormholeEmitter. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.GovernanceSource.IWormholeEmitter); - - /** WormholeEmitter address. */ - public address?: (Uint8Array|null); - - /** WormholeEmitter chainId. */ - public chainId?: (number|null); - - /** WormholeEmitter _address. */ - public _address?: "address"; - - /** WormholeEmitter _chainId. */ - public _chainId?: "chainId"; - - /** - * Creates a new WormholeEmitter instance using the specified properties. - * @param [properties] Properties to set - * @returns WormholeEmitter instance - */ - public static create(properties?: pyth_lazer_transaction.GovernanceSource.IWormholeEmitter): pyth_lazer_transaction.GovernanceSource.WormholeEmitter; - - /** - * Encodes the specified WormholeEmitter message. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.WormholeEmitter.verify|verify} messages. - * @param message WormholeEmitter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.GovernanceSource.IWormholeEmitter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WormholeEmitter message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.WormholeEmitter.verify|verify} messages. - * @param message WormholeEmitter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.GovernanceSource.IWormholeEmitter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WormholeEmitter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WormholeEmitter - * @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): pyth_lazer_transaction.GovernanceSource.WormholeEmitter; - - /** - * Decodes a WormholeEmitter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WormholeEmitter - * @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)): pyth_lazer_transaction.GovernanceSource.WormholeEmitter; - - /** - * Verifies a WormholeEmitter 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 WormholeEmitter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WormholeEmitter - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.GovernanceSource.WormholeEmitter; - - /** - * Creates a plain object from a WormholeEmitter message. Also converts values to other types if specified. - * @param message WormholeEmitter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.GovernanceSource.WormholeEmitter, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WormholeEmitter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WormholeEmitter - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** Represents a ShardGroups. */ + class ShardGroups implements IShardGroups { + /** + * Constructs a new ShardGroups. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ShardFilter.IShardGroups); + + /** ShardGroups shardGroups. */ + public shardGroups: string[]; + + /** + * Creates a new ShardGroups instance using the specified properties. + * @param [properties] Properties to set + * @returns ShardGroups instance + */ + public static create( + properties?: pyth_lazer_transaction.ShardFilter.IShardGroups, + ): pyth_lazer_transaction.ShardFilter.ShardGroups; + + /** + * Encodes the specified ShardGroups message. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardGroups.verify|verify} messages. + * @param message ShardGroups message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.ShardFilter.IShardGroups, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified ShardGroups message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardGroups.verify|verify} messages. + * @param message ShardGroups message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.ShardFilter.IShardGroups, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ShardGroups message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ShardGroups + * @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, + ): pyth_lazer_transaction.ShardFilter.ShardGroups; + + /** + * Decodes a ShardGroups message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ShardGroups + * @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, + ): pyth_lazer_transaction.ShardFilter.ShardGroups; + + /** + * Verifies a ShardGroups 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 ShardGroups message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ShardGroups + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.ShardFilter.ShardGroups; + + /** + * Creates a plain object from a ShardGroups message. Also converts values to other types if specified. + * @param message ShardGroups + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.ShardFilter.ShardGroups, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this ShardGroups to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ShardGroups + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } + } - /** Properties of a CreateShard. */ - interface ICreateShard { + /** Properties of a GovernanceDirective. */ + interface IGovernanceDirective { + /** GovernanceDirective shardFilter */ + shardFilter?: pyth_lazer_transaction.IShardFilter | null; - /** CreateShard shardId */ - shardId?: (number|null); + /** GovernanceDirective createShard */ + createShard?: pyth_lazer_transaction.ICreateShard | null; - /** CreateShard shardGroup */ - shardGroup?: (string|null); - - /** CreateShard minRate */ - minRate?: (google.protobuf.IDuration|null); + /** GovernanceDirective addGovernanceSource */ + addGovernanceSource?: pyth_lazer_transaction.IAddGovernanceSource | null; + + /** GovernanceDirective updateGovernanceSource */ + updateGovernanceSource?: pyth_lazer_transaction.IUpdateGovernanceSource | null; + + /** GovernanceDirective setShardName */ + setShardName?: pyth_lazer_transaction.ISetShardName | null; + + /** GovernanceDirective setShardGroup */ + setShardGroup?: pyth_lazer_transaction.ISetShardGroup | null; + + /** GovernanceDirective resetLastSequenceNo */ + resetLastSequenceNo?: pyth_lazer_transaction.IResetLastSequenceNo | null; + + /** GovernanceDirective addPublisher */ + addPublisher?: pyth_lazer_transaction.IAddPublisher | null; + + /** GovernanceDirective updatePublisher */ + updatePublisher?: pyth_lazer_transaction.IUpdatePublisher | null; + + /** GovernanceDirective addFeed */ + addFeed?: pyth_lazer_transaction.IAddFeed | null; + + /** GovernanceDirective updateFeed */ + updateFeed?: pyth_lazer_transaction.IUpdateFeed | null; + } + + /** Represents a GovernanceDirective. */ + class GovernanceDirective implements IGovernanceDirective { + /** + * Constructs a new GovernanceDirective. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IGovernanceDirective); + + /** GovernanceDirective shardFilter. */ + public shardFilter?: pyth_lazer_transaction.IShardFilter | null; + + /** GovernanceDirective createShard. */ + public createShard?: pyth_lazer_transaction.ICreateShard | null; + + /** GovernanceDirective addGovernanceSource. */ + public addGovernanceSource?: pyth_lazer_transaction.IAddGovernanceSource | null; + + /** GovernanceDirective updateGovernanceSource. */ + public updateGovernanceSource?: pyth_lazer_transaction.IUpdateGovernanceSource | null; + + /** GovernanceDirective setShardName. */ + public setShardName?: pyth_lazer_transaction.ISetShardName | null; + + /** GovernanceDirective setShardGroup. */ + public setShardGroup?: pyth_lazer_transaction.ISetShardGroup | null; + + /** GovernanceDirective resetLastSequenceNo. */ + public resetLastSequenceNo?: pyth_lazer_transaction.IResetLastSequenceNo | null; + + /** GovernanceDirective addPublisher. */ + public addPublisher?: pyth_lazer_transaction.IAddPublisher | null; + + /** GovernanceDirective updatePublisher. */ + public updatePublisher?: pyth_lazer_transaction.IUpdatePublisher | null; + + /** GovernanceDirective addFeed. */ + public addFeed?: pyth_lazer_transaction.IAddFeed | null; + + /** GovernanceDirective updateFeed. */ + public updateFeed?: pyth_lazer_transaction.IUpdateFeed | null; + + /** GovernanceDirective _shardFilter. */ + public _shardFilter?: "shardFilter"; + + /** GovernanceDirective action. */ + public action?: + | "createShard" + | "addGovernanceSource" + | "updateGovernanceSource" + | "setShardName" + | "setShardGroup" + | "resetLastSequenceNo" + | "addPublisher" + | "updatePublisher" + | "addFeed" + | "updateFeed"; + + /** + * Creates a new GovernanceDirective instance using the specified properties. + * @param [properties] Properties to set + * @returns GovernanceDirective instance + */ + public static create( + properties?: pyth_lazer_transaction.IGovernanceDirective, + ): pyth_lazer_transaction.GovernanceDirective; + + /** + * Encodes the specified GovernanceDirective message. Does not implicitly {@link pyth_lazer_transaction.GovernanceDirective.verify|verify} messages. + * @param message GovernanceDirective message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IGovernanceDirective, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified GovernanceDirective message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceDirective.verify|verify} messages. + * @param message GovernanceDirective message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IGovernanceDirective, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a GovernanceDirective message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GovernanceDirective + * @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, + ): pyth_lazer_transaction.GovernanceDirective; + + /** + * Decodes a GovernanceDirective message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GovernanceDirective + * @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, + ): pyth_lazer_transaction.GovernanceDirective; + + /** + * Verifies a GovernanceDirective 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 GovernanceDirective message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GovernanceDirective + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.GovernanceDirective; + + /** + * Creates a plain object from a GovernanceDirective message. Also converts values to other types if specified. + * @param message GovernanceDirective + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.GovernanceDirective, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this GovernanceDirective to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GovernanceDirective + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Permissions. */ + interface IPermissions { + /** Permissions allActions */ + allActions?: boolean | null; + + /** Permissions shardActions */ + shardActions?: pyth_lazer_transaction.Permissions.ShardAction[] | null; + + /** Permissions allUpdateGovernanceSourceActions */ + allUpdateGovernanceSourceActions?: boolean | null; + + /** Permissions updateGovernanceSourceActions */ + updateGovernanceSourceActions?: + | pyth_lazer_transaction.Permissions.UpdateGovernanceSourceAction[] + | null; + + /** Permissions allUpdatePublisherAction */ + allUpdatePublisherAction?: boolean | null; + + /** Permissions updatePublisherActions */ + updatePublisherActions?: + | pyth_lazer_transaction.Permissions.UpdatePublisherAction[] + | null; + + /** Permissions allUpdateFeedActions */ + allUpdateFeedActions?: boolean | null; + + /** Permissions updateFeedActions */ + updateFeedActions?: + | pyth_lazer_transaction.Permissions.UpdateFeedAction[] + | null; + } + + /** Represents a Permissions. */ + class Permissions implements IPermissions { + /** + * Constructs a new Permissions. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IPermissions); + + /** Permissions allActions. */ + public allActions?: boolean | null; + + /** Permissions shardActions. */ + public shardActions: pyth_lazer_transaction.Permissions.ShardAction[]; + + /** Permissions allUpdateGovernanceSourceActions. */ + public allUpdateGovernanceSourceActions?: boolean | null; + + /** Permissions updateGovernanceSourceActions. */ + public updateGovernanceSourceActions: pyth_lazer_transaction.Permissions.UpdateGovernanceSourceAction[]; + + /** Permissions allUpdatePublisherAction. */ + public allUpdatePublisherAction?: boolean | null; + + /** Permissions updatePublisherActions. */ + public updatePublisherActions: pyth_lazer_transaction.Permissions.UpdatePublisherAction[]; + + /** Permissions allUpdateFeedActions. */ + public allUpdateFeedActions?: boolean | null; + + /** Permissions updateFeedActions. */ + public updateFeedActions: pyth_lazer_transaction.Permissions.UpdateFeedAction[]; + + /** Permissions _allActions. */ + public _allActions?: "allActions"; + + /** Permissions _allUpdateGovernanceSourceActions. */ + public _allUpdateGovernanceSourceActions?: "allUpdateGovernanceSourceActions"; + + /** Permissions _allUpdatePublisherAction. */ + public _allUpdatePublisherAction?: "allUpdatePublisherAction"; + + /** Permissions _allUpdateFeedActions. */ + public _allUpdateFeedActions?: "allUpdateFeedActions"; + + /** + * Creates a new Permissions instance using the specified properties. + * @param [properties] Properties to set + * @returns Permissions instance + */ + public static create( + properties?: pyth_lazer_transaction.IPermissions, + ): pyth_lazer_transaction.Permissions; + + /** + * Encodes the specified Permissions message. Does not implicitly {@link pyth_lazer_transaction.Permissions.verify|verify} messages. + * @param message Permissions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IPermissions, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified Permissions message, length delimited. Does not implicitly {@link pyth_lazer_transaction.Permissions.verify|verify} messages. + * @param message Permissions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IPermissions, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a Permissions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Permissions + * @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, + ): pyth_lazer_transaction.Permissions; + + /** + * Decodes a Permissions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Permissions + * @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, + ): pyth_lazer_transaction.Permissions; + + /** + * Verifies a Permissions 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 Permissions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Permissions + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.Permissions; + + /** + * Creates a plain object from a Permissions message. Also converts values to other types if specified. + * @param message Permissions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.Permissions, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Permissions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Permissions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Permissions { + /** ShardAction enum. */ + enum ShardAction { + SHARD_ACTION_UNSPECIFIED = 0, + CREATE_SHARD = 101, + ADD_GOVERNANCE_SOURCE = 102, + UPDATE_GOVERNANCE_SOURCE = 103, + SET_SHARD_NAME = 104, + SET_SHARD_GROUP = 105, + RESET_LAST_SEQUENCE_NO = 106, + ADD_PUBLISHER = 107, + ADD_FEED = 109, } - /** Represents a CreateShard. */ - class CreateShard implements ICreateShard { - - /** - * Constructs a new CreateShard. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.ICreateShard); - - /** CreateShard shardId. */ - public shardId?: (number|null); - - /** CreateShard shardGroup. */ - public shardGroup?: (string|null); - - /** CreateShard minRate. */ - public minRate?: (google.protobuf.IDuration|null); - - /** CreateShard _shardId. */ - public _shardId?: "shardId"; - - /** CreateShard _shardGroup. */ - public _shardGroup?: "shardGroup"; - - /** CreateShard _minRate. */ - public _minRate?: "minRate"; - - /** - * Creates a new CreateShard instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateShard instance - */ - public static create(properties?: pyth_lazer_transaction.ICreateShard): pyth_lazer_transaction.CreateShard; - - /** - * Encodes the specified CreateShard message. Does not implicitly {@link pyth_lazer_transaction.CreateShard.verify|verify} messages. - * @param message CreateShard message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.ICreateShard, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateShard message, length delimited. Does not implicitly {@link pyth_lazer_transaction.CreateShard.verify|verify} messages. - * @param message CreateShard message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.ICreateShard, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateShard message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateShard - * @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): pyth_lazer_transaction.CreateShard; - - /** - * Decodes a CreateShard message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateShard - * @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)): pyth_lazer_transaction.CreateShard; - - /** - * Verifies a CreateShard 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 CreateShard message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateShard - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.CreateShard; - - /** - * Creates a plain object from a CreateShard message. Also converts values to other types if specified. - * @param message CreateShard - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.CreateShard, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateShard to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateShard - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** UpdateGovernanceSourceAction enum. */ + enum UpdateGovernanceSourceAction { + UPDATE_GOVERNANCE_SOURCE_ACTION_UNSPECIFIED = 0, + SET_GOVERNANCE_SOURCE_PERMISSIONS = 101, + REMOVE_GOVERNANCE_SOURCE = 199, } - /** Properties of an AddGovernanceSource. */ - interface IAddGovernanceSource { - - /** AddGovernanceSource newSource */ - newSource?: (pyth_lazer_transaction.IGovernanceSource|null); - - /** AddGovernanceSource permissions */ - permissions?: (pyth_lazer_transaction.IPermissions|null); + /** UpdatePublisherAction enum. */ + enum UpdatePublisherAction { + UPDATE_PUBLISHER_ACTION_UNSPECIFIED = 0, + SET_PUBLISHER_NAME = 101, + ADD_PUBLISHER_PUBLIC_KEYS = 102, + REMOVE_PUBLISHER_PUBLIC_KEYS = 103, + SET_PUBLISHER_PUBLIC_KEYS = 104, + SET_PUBLISHER_ACTIVE = 105, + REMOVE_PUBLISHER = 199, } - /** Represents an AddGovernanceSource. */ - class AddGovernanceSource implements IAddGovernanceSource { - - /** - * Constructs a new AddGovernanceSource. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IAddGovernanceSource); - - /** AddGovernanceSource newSource. */ - public newSource?: (pyth_lazer_transaction.IGovernanceSource|null); - - /** AddGovernanceSource permissions. */ - public permissions?: (pyth_lazer_transaction.IPermissions|null); - - /** AddGovernanceSource _newSource. */ - public _newSource?: "newSource"; - - /** AddGovernanceSource _permissions. */ - public _permissions?: "permissions"; - - /** - * Creates a new AddGovernanceSource instance using the specified properties. - * @param [properties] Properties to set - * @returns AddGovernanceSource instance - */ - public static create(properties?: pyth_lazer_transaction.IAddGovernanceSource): pyth_lazer_transaction.AddGovernanceSource; - - /** - * Encodes the specified AddGovernanceSource message. Does not implicitly {@link pyth_lazer_transaction.AddGovernanceSource.verify|verify} messages. - * @param message AddGovernanceSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IAddGovernanceSource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AddGovernanceSource message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddGovernanceSource.verify|verify} messages. - * @param message AddGovernanceSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IAddGovernanceSource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AddGovernanceSource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AddGovernanceSource - * @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): pyth_lazer_transaction.AddGovernanceSource; - - /** - * Decodes an AddGovernanceSource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AddGovernanceSource - * @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)): pyth_lazer_transaction.AddGovernanceSource; - - /** - * Verifies an AddGovernanceSource 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 AddGovernanceSource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AddGovernanceSource - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.AddGovernanceSource; - - /** - * Creates a plain object from an AddGovernanceSource message. Also converts values to other types if specified. - * @param message AddGovernanceSource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.AddGovernanceSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AddGovernanceSource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AddGovernanceSource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** UpdateFeedAction enum. */ + enum UpdateFeedAction { + UPDATE_FEED_ACTION_UNSPECIFIED = 0, + UPDATE_FEED_METADATA = 101, + ACTIVATE_FEED = 102, + DEACTIVATE_FEED = 103, + REMOVE_FEED = 199, } - - /** Properties of an UpdateGovernanceSource. */ - interface IUpdateGovernanceSource { - - /** UpdateGovernanceSource source */ - source?: (pyth_lazer_transaction.IGovernanceSource|null); - - /** UpdateGovernanceSource setGovernanceSourcePermissions */ - setGovernanceSourcePermissions?: (pyth_lazer_transaction.ISetGovernanceSourcePermissions|null); - - /** UpdateGovernanceSource removeGovernanceSource */ - removeGovernanceSource?: (google.protobuf.IEmpty|null); + } + + /** Properties of a GovernanceSource. */ + interface IGovernanceSource { + /** GovernanceSource singleEd25519 */ + singleEd25519?: pyth_lazer_transaction.GovernanceSource.ISingleEd25519 | null; + + /** GovernanceSource wormholeEmitter */ + wormholeEmitter?: pyth_lazer_transaction.GovernanceSource.IWormholeEmitter | null; + } + + /** Represents a GovernanceSource. */ + class GovernanceSource implements IGovernanceSource { + /** + * Constructs a new GovernanceSource. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IGovernanceSource); + + /** GovernanceSource singleEd25519. */ + public singleEd25519?: pyth_lazer_transaction.GovernanceSource.ISingleEd25519 | null; + + /** GovernanceSource wormholeEmitter. */ + public wormholeEmitter?: pyth_lazer_transaction.GovernanceSource.IWormholeEmitter | null; + + /** GovernanceSource source. */ + public source?: "singleEd25519" | "wormholeEmitter"; + + /** + * Creates a new GovernanceSource instance using the specified properties. + * @param [properties] Properties to set + * @returns GovernanceSource instance + */ + public static create( + properties?: pyth_lazer_transaction.IGovernanceSource, + ): pyth_lazer_transaction.GovernanceSource; + + /** + * Encodes the specified GovernanceSource message. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.verify|verify} messages. + * @param message GovernanceSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IGovernanceSource, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified GovernanceSource message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.verify|verify} messages. + * @param message GovernanceSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IGovernanceSource, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a GovernanceSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GovernanceSource + * @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, + ): pyth_lazer_transaction.GovernanceSource; + + /** + * Decodes a GovernanceSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GovernanceSource + * @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, + ): pyth_lazer_transaction.GovernanceSource; + + /** + * Verifies a GovernanceSource 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 GovernanceSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GovernanceSource + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.GovernanceSource; + + /** + * Creates a plain object from a GovernanceSource message. Also converts values to other types if specified. + * @param message GovernanceSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.GovernanceSource, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this GovernanceSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GovernanceSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GovernanceSource { + /** Properties of a SingleEd25519. */ + interface ISingleEd25519 { + /** SingleEd25519 publicKey */ + publicKey?: Uint8Array | null; } - /** Represents an UpdateGovernanceSource. */ - class UpdateGovernanceSource implements IUpdateGovernanceSource { - - /** - * Constructs a new UpdateGovernanceSource. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IUpdateGovernanceSource); - - /** UpdateGovernanceSource source. */ - public source?: (pyth_lazer_transaction.IGovernanceSource|null); - - /** UpdateGovernanceSource setGovernanceSourcePermissions. */ - public setGovernanceSourcePermissions?: (pyth_lazer_transaction.ISetGovernanceSourcePermissions|null); - - /** UpdateGovernanceSource removeGovernanceSource. */ - public removeGovernanceSource?: (google.protobuf.IEmpty|null); - - /** UpdateGovernanceSource _source. */ - public _source?: "source"; - - /** UpdateGovernanceSource action. */ - public action?: ("setGovernanceSourcePermissions"|"removeGovernanceSource"); - - /** - * Creates a new UpdateGovernanceSource instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateGovernanceSource instance - */ - public static create(properties?: pyth_lazer_transaction.IUpdateGovernanceSource): pyth_lazer_transaction.UpdateGovernanceSource; - - /** - * Encodes the specified UpdateGovernanceSource message. Does not implicitly {@link pyth_lazer_transaction.UpdateGovernanceSource.verify|verify} messages. - * @param message UpdateGovernanceSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IUpdateGovernanceSource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateGovernanceSource message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdateGovernanceSource.verify|verify} messages. - * @param message UpdateGovernanceSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IUpdateGovernanceSource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateGovernanceSource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateGovernanceSource - * @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): pyth_lazer_transaction.UpdateGovernanceSource; - - /** - * Decodes an UpdateGovernanceSource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateGovernanceSource - * @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)): pyth_lazer_transaction.UpdateGovernanceSource; - - /** - * Verifies an UpdateGovernanceSource 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 UpdateGovernanceSource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateGovernanceSource - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.UpdateGovernanceSource; - - /** - * Creates a plain object from an UpdateGovernanceSource message. Also converts values to other types if specified. - * @param message UpdateGovernanceSource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.UpdateGovernanceSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateGovernanceSource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateGovernanceSource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** Represents a SingleEd25519. */ + class SingleEd25519 implements ISingleEd25519 { + /** + * Constructs a new SingleEd25519. + * @param [properties] Properties to set + */ + constructor( + properties?: pyth_lazer_transaction.GovernanceSource.ISingleEd25519, + ); + + /** SingleEd25519 publicKey. */ + public publicKey?: Uint8Array | null; + + /** SingleEd25519 _publicKey. */ + public _publicKey?: "publicKey"; + + /** + * Creates a new SingleEd25519 instance using the specified properties. + * @param [properties] Properties to set + * @returns SingleEd25519 instance + */ + public static create( + properties?: pyth_lazer_transaction.GovernanceSource.ISingleEd25519, + ): pyth_lazer_transaction.GovernanceSource.SingleEd25519; + + /** + * Encodes the specified SingleEd25519 message. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.SingleEd25519.verify|verify} messages. + * @param message SingleEd25519 message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.GovernanceSource.ISingleEd25519, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified SingleEd25519 message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.SingleEd25519.verify|verify} messages. + * @param message SingleEd25519 message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.GovernanceSource.ISingleEd25519, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a SingleEd25519 message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SingleEd25519 + * @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, + ): pyth_lazer_transaction.GovernanceSource.SingleEd25519; + + /** + * Decodes a SingleEd25519 message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SingleEd25519 + * @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, + ): pyth_lazer_transaction.GovernanceSource.SingleEd25519; + + /** + * Verifies a SingleEd25519 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 SingleEd25519 message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SingleEd25519 + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.GovernanceSource.SingleEd25519; + + /** + * Creates a plain object from a SingleEd25519 message. Also converts values to other types if specified. + * @param message SingleEd25519 + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.GovernanceSource.SingleEd25519, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this SingleEd25519 to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SingleEd25519 + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SetGovernanceSourcePermissions. */ - interface ISetGovernanceSourcePermissions { + /** Properties of a WormholeEmitter. */ + interface IWormholeEmitter { + /** WormholeEmitter address */ + address?: Uint8Array | null; - /** SetGovernanceSourcePermissions permissions */ - permissions?: (pyth_lazer_transaction.IPermissions|null); + /** WormholeEmitter chainId */ + chainId?: number | null; } - /** Represents a SetGovernanceSourcePermissions. */ - class SetGovernanceSourcePermissions implements ISetGovernanceSourcePermissions { - - /** - * Constructs a new SetGovernanceSourcePermissions. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.ISetGovernanceSourcePermissions); - - /** SetGovernanceSourcePermissions permissions. */ - public permissions?: (pyth_lazer_transaction.IPermissions|null); - - /** SetGovernanceSourcePermissions _permissions. */ - public _permissions?: "permissions"; - - /** - * Creates a new SetGovernanceSourcePermissions instance using the specified properties. - * @param [properties] Properties to set - * @returns SetGovernanceSourcePermissions instance - */ - public static create(properties?: pyth_lazer_transaction.ISetGovernanceSourcePermissions): pyth_lazer_transaction.SetGovernanceSourcePermissions; - - /** - * Encodes the specified SetGovernanceSourcePermissions message. Does not implicitly {@link pyth_lazer_transaction.SetGovernanceSourcePermissions.verify|verify} messages. - * @param message SetGovernanceSourcePermissions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.ISetGovernanceSourcePermissions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetGovernanceSourcePermissions message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetGovernanceSourcePermissions.verify|verify} messages. - * @param message SetGovernanceSourcePermissions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.ISetGovernanceSourcePermissions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetGovernanceSourcePermissions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetGovernanceSourcePermissions - * @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): pyth_lazer_transaction.SetGovernanceSourcePermissions; - - /** - * Decodes a SetGovernanceSourcePermissions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetGovernanceSourcePermissions - * @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)): pyth_lazer_transaction.SetGovernanceSourcePermissions; - - /** - * Verifies a SetGovernanceSourcePermissions 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 SetGovernanceSourcePermissions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetGovernanceSourcePermissions - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.SetGovernanceSourcePermissions; - - /** - * Creates a plain object from a SetGovernanceSourcePermissions message. Also converts values to other types if specified. - * @param message SetGovernanceSourcePermissions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.SetGovernanceSourcePermissions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetGovernanceSourcePermissions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetGovernanceSourcePermissions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** Represents a WormholeEmitter. */ + class WormholeEmitter implements IWormholeEmitter { + /** + * Constructs a new WormholeEmitter. + * @param [properties] Properties to set + */ + constructor( + properties?: pyth_lazer_transaction.GovernanceSource.IWormholeEmitter, + ); + + /** WormholeEmitter address. */ + public address?: Uint8Array | null; + + /** WormholeEmitter chainId. */ + public chainId?: number | null; + + /** WormholeEmitter _address. */ + public _address?: "address"; + + /** WormholeEmitter _chainId. */ + public _chainId?: "chainId"; + + /** + * Creates a new WormholeEmitter instance using the specified properties. + * @param [properties] Properties to set + * @returns WormholeEmitter instance + */ + public static create( + properties?: pyth_lazer_transaction.GovernanceSource.IWormholeEmitter, + ): pyth_lazer_transaction.GovernanceSource.WormholeEmitter; + + /** + * Encodes the specified WormholeEmitter message. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.WormholeEmitter.verify|verify} messages. + * @param message WormholeEmitter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.GovernanceSource.IWormholeEmitter, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified WormholeEmitter message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.WormholeEmitter.verify|verify} messages. + * @param message WormholeEmitter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.GovernanceSource.IWormholeEmitter, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a WormholeEmitter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WormholeEmitter + * @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, + ): pyth_lazer_transaction.GovernanceSource.WormholeEmitter; + + /** + * Decodes a WormholeEmitter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WormholeEmitter + * @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, + ): pyth_lazer_transaction.GovernanceSource.WormholeEmitter; + + /** + * Verifies a WormholeEmitter 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 WormholeEmitter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WormholeEmitter + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.GovernanceSource.WormholeEmitter; + + /** + * Creates a plain object from a WormholeEmitter message. Also converts values to other types if specified. + * @param message WormholeEmitter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.GovernanceSource.WormholeEmitter, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this WormholeEmitter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WormholeEmitter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - - /** Properties of a SetShardName. */ - interface ISetShardName { - - /** SetShardName shardName */ - shardName?: (string|null); + } + + /** Properties of a CreateShard. */ + interface ICreateShard { + /** CreateShard shardId */ + shardId?: number | null; + + /** CreateShard shardGroup */ + shardGroup?: string | null; + + /** CreateShard minRate */ + minRate?: google.protobuf.IDuration | null; + } + + /** Represents a CreateShard. */ + class CreateShard implements ICreateShard { + /** + * Constructs a new CreateShard. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ICreateShard); + + /** CreateShard shardId. */ + public shardId?: number | null; + + /** CreateShard shardGroup. */ + public shardGroup?: string | null; + + /** CreateShard minRate. */ + public minRate?: google.protobuf.IDuration | null; + + /** CreateShard _shardId. */ + public _shardId?: "shardId"; + + /** CreateShard _shardGroup. */ + public _shardGroup?: "shardGroup"; + + /** CreateShard _minRate. */ + public _minRate?: "minRate"; + + /** + * Creates a new CreateShard instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateShard instance + */ + public static create( + properties?: pyth_lazer_transaction.ICreateShard, + ): pyth_lazer_transaction.CreateShard; + + /** + * Encodes the specified CreateShard message. Does not implicitly {@link pyth_lazer_transaction.CreateShard.verify|verify} messages. + * @param message CreateShard message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.ICreateShard, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified CreateShard message, length delimited. Does not implicitly {@link pyth_lazer_transaction.CreateShard.verify|verify} messages. + * @param message CreateShard message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.ICreateShard, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a CreateShard message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateShard + * @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, + ): pyth_lazer_transaction.CreateShard; + + /** + * Decodes a CreateShard message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateShard + * @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, + ): pyth_lazer_transaction.CreateShard; + + /** + * Verifies a CreateShard 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 CreateShard message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateShard + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.CreateShard; + + /** + * Creates a plain object from a CreateShard message. Also converts values to other types if specified. + * @param message CreateShard + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.CreateShard, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this CreateShard to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateShard + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AddGovernanceSource. */ + interface IAddGovernanceSource { + /** AddGovernanceSource newSource */ + newSource?: pyth_lazer_transaction.IGovernanceSource | null; + + /** AddGovernanceSource permissions */ + permissions?: pyth_lazer_transaction.IPermissions | null; + } + + /** Represents an AddGovernanceSource. */ + class AddGovernanceSource implements IAddGovernanceSource { + /** + * Constructs a new AddGovernanceSource. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IAddGovernanceSource); + + /** AddGovernanceSource newSource. */ + public newSource?: pyth_lazer_transaction.IGovernanceSource | null; + + /** AddGovernanceSource permissions. */ + public permissions?: pyth_lazer_transaction.IPermissions | null; + + /** AddGovernanceSource _newSource. */ + public _newSource?: "newSource"; + + /** AddGovernanceSource _permissions. */ + public _permissions?: "permissions"; + + /** + * Creates a new AddGovernanceSource instance using the specified properties. + * @param [properties] Properties to set + * @returns AddGovernanceSource instance + */ + public static create( + properties?: pyth_lazer_transaction.IAddGovernanceSource, + ): pyth_lazer_transaction.AddGovernanceSource; + + /** + * Encodes the specified AddGovernanceSource message. Does not implicitly {@link pyth_lazer_transaction.AddGovernanceSource.verify|verify} messages. + * @param message AddGovernanceSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IAddGovernanceSource, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified AddGovernanceSource message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddGovernanceSource.verify|verify} messages. + * @param message AddGovernanceSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IAddGovernanceSource, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes an AddGovernanceSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AddGovernanceSource + * @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, + ): pyth_lazer_transaction.AddGovernanceSource; + + /** + * Decodes an AddGovernanceSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AddGovernanceSource + * @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, + ): pyth_lazer_transaction.AddGovernanceSource; + + /** + * Verifies an AddGovernanceSource 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 AddGovernanceSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AddGovernanceSource + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.AddGovernanceSource; + + /** + * Creates a plain object from an AddGovernanceSource message. Also converts values to other types if specified. + * @param message AddGovernanceSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.AddGovernanceSource, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this AddGovernanceSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AddGovernanceSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateGovernanceSource. */ + interface IUpdateGovernanceSource { + /** UpdateGovernanceSource source */ + source?: pyth_lazer_transaction.IGovernanceSource | null; + + /** UpdateGovernanceSource setGovernanceSourcePermissions */ + setGovernanceSourcePermissions?: pyth_lazer_transaction.ISetGovernanceSourcePermissions | null; + + /** UpdateGovernanceSource removeGovernanceSource */ + removeGovernanceSource?: google.protobuf.IEmpty | null; + } + + /** Represents an UpdateGovernanceSource. */ + class UpdateGovernanceSource implements IUpdateGovernanceSource { + /** + * Constructs a new UpdateGovernanceSource. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IUpdateGovernanceSource); + + /** UpdateGovernanceSource source. */ + public source?: pyth_lazer_transaction.IGovernanceSource | null; + + /** UpdateGovernanceSource setGovernanceSourcePermissions. */ + public setGovernanceSourcePermissions?: pyth_lazer_transaction.ISetGovernanceSourcePermissions | null; + + /** UpdateGovernanceSource removeGovernanceSource. */ + public removeGovernanceSource?: google.protobuf.IEmpty | null; + + /** UpdateGovernanceSource _source. */ + public _source?: "source"; + + /** UpdateGovernanceSource action. */ + public action?: "setGovernanceSourcePermissions" | "removeGovernanceSource"; + + /** + * Creates a new UpdateGovernanceSource instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateGovernanceSource instance + */ + public static create( + properties?: pyth_lazer_transaction.IUpdateGovernanceSource, + ): pyth_lazer_transaction.UpdateGovernanceSource; + + /** + * Encodes the specified UpdateGovernanceSource message. Does not implicitly {@link pyth_lazer_transaction.UpdateGovernanceSource.verify|verify} messages. + * @param message UpdateGovernanceSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IUpdateGovernanceSource, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified UpdateGovernanceSource message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdateGovernanceSource.verify|verify} messages. + * @param message UpdateGovernanceSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IUpdateGovernanceSource, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes an UpdateGovernanceSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateGovernanceSource + * @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, + ): pyth_lazer_transaction.UpdateGovernanceSource; + + /** + * Decodes an UpdateGovernanceSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateGovernanceSource + * @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, + ): pyth_lazer_transaction.UpdateGovernanceSource; + + /** + * Verifies an UpdateGovernanceSource 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 UpdateGovernanceSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateGovernanceSource + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.UpdateGovernanceSource; + + /** + * Creates a plain object from an UpdateGovernanceSource message. Also converts values to other types if specified. + * @param message UpdateGovernanceSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.UpdateGovernanceSource, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this UpdateGovernanceSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateGovernanceSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetGovernanceSourcePermissions. */ + interface ISetGovernanceSourcePermissions { + /** SetGovernanceSourcePermissions permissions */ + permissions?: pyth_lazer_transaction.IPermissions | null; + } + + /** Represents a SetGovernanceSourcePermissions. */ + class SetGovernanceSourcePermissions + implements ISetGovernanceSourcePermissions + { + /** + * Constructs a new SetGovernanceSourcePermissions. + * @param [properties] Properties to set + */ + constructor( + properties?: pyth_lazer_transaction.ISetGovernanceSourcePermissions, + ); + + /** SetGovernanceSourcePermissions permissions. */ + public permissions?: pyth_lazer_transaction.IPermissions | null; + + /** SetGovernanceSourcePermissions _permissions. */ + public _permissions?: "permissions"; + + /** + * Creates a new SetGovernanceSourcePermissions instance using the specified properties. + * @param [properties] Properties to set + * @returns SetGovernanceSourcePermissions instance + */ + public static create( + properties?: pyth_lazer_transaction.ISetGovernanceSourcePermissions, + ): pyth_lazer_transaction.SetGovernanceSourcePermissions; + + /** + * Encodes the specified SetGovernanceSourcePermissions message. Does not implicitly {@link pyth_lazer_transaction.SetGovernanceSourcePermissions.verify|verify} messages. + * @param message SetGovernanceSourcePermissions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.ISetGovernanceSourcePermissions, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified SetGovernanceSourcePermissions message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetGovernanceSourcePermissions.verify|verify} messages. + * @param message SetGovernanceSourcePermissions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.ISetGovernanceSourcePermissions, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a SetGovernanceSourcePermissions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetGovernanceSourcePermissions + * @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, + ): pyth_lazer_transaction.SetGovernanceSourcePermissions; + + /** + * Decodes a SetGovernanceSourcePermissions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetGovernanceSourcePermissions + * @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, + ): pyth_lazer_transaction.SetGovernanceSourcePermissions; + + /** + * Verifies a SetGovernanceSourcePermissions 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 SetGovernanceSourcePermissions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetGovernanceSourcePermissions + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.SetGovernanceSourcePermissions; + + /** + * Creates a plain object from a SetGovernanceSourcePermissions message. Also converts values to other types if specified. + * @param message SetGovernanceSourcePermissions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.SetGovernanceSourcePermissions, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this SetGovernanceSourcePermissions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetGovernanceSourcePermissions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetShardName. */ + interface ISetShardName { + /** SetShardName shardName */ + shardName?: string | null; + } + + /** Represents a SetShardName. */ + class SetShardName implements ISetShardName { + /** + * Constructs a new SetShardName. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ISetShardName); + + /** SetShardName shardName. */ + public shardName?: string | null; + + /** SetShardName _shardName. */ + public _shardName?: "shardName"; + + /** + * Creates a new SetShardName instance using the specified properties. + * @param [properties] Properties to set + * @returns SetShardName instance + */ + public static create( + properties?: pyth_lazer_transaction.ISetShardName, + ): pyth_lazer_transaction.SetShardName; + + /** + * Encodes the specified SetShardName message. Does not implicitly {@link pyth_lazer_transaction.SetShardName.verify|verify} messages. + * @param message SetShardName message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.ISetShardName, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified SetShardName message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetShardName.verify|verify} messages. + * @param message SetShardName message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.ISetShardName, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a SetShardName message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetShardName + * @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, + ): pyth_lazer_transaction.SetShardName; + + /** + * Decodes a SetShardName message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetShardName + * @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, + ): pyth_lazer_transaction.SetShardName; + + /** + * Verifies a SetShardName 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 SetShardName message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetShardName + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.SetShardName; + + /** + * Creates a plain object from a SetShardName message. Also converts values to other types if specified. + * @param message SetShardName + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.SetShardName, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this SetShardName to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetShardName + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetShardGroup. */ + interface ISetShardGroup { + /** SetShardGroup shardGroup */ + shardGroup?: string | null; + } + + /** Represents a SetShardGroup. */ + class SetShardGroup implements ISetShardGroup { + /** + * Constructs a new SetShardGroup. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ISetShardGroup); + + /** SetShardGroup shardGroup. */ + public shardGroup?: string | null; + + /** SetShardGroup _shardGroup. */ + public _shardGroup?: "shardGroup"; + + /** + * Creates a new SetShardGroup instance using the specified properties. + * @param [properties] Properties to set + * @returns SetShardGroup instance + */ + public static create( + properties?: pyth_lazer_transaction.ISetShardGroup, + ): pyth_lazer_transaction.SetShardGroup; + + /** + * Encodes the specified SetShardGroup message. Does not implicitly {@link pyth_lazer_transaction.SetShardGroup.verify|verify} messages. + * @param message SetShardGroup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.ISetShardGroup, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified SetShardGroup message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetShardGroup.verify|verify} messages. + * @param message SetShardGroup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.ISetShardGroup, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a SetShardGroup message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetShardGroup + * @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, + ): pyth_lazer_transaction.SetShardGroup; + + /** + * Decodes a SetShardGroup message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetShardGroup + * @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, + ): pyth_lazer_transaction.SetShardGroup; + + /** + * Verifies a SetShardGroup 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 SetShardGroup message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetShardGroup + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.SetShardGroup; + + /** + * Creates a plain object from a SetShardGroup message. Also converts values to other types if specified. + * @param message SetShardGroup + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.SetShardGroup, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this SetShardGroup to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetShardGroup + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ResetLastSequenceNo. */ + interface IResetLastSequenceNo { + /** ResetLastSequenceNo lastSequenceNo */ + lastSequenceNo?: number | Long | null; + } + + /** Represents a ResetLastSequenceNo. */ + class ResetLastSequenceNo implements IResetLastSequenceNo { + /** + * Constructs a new ResetLastSequenceNo. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IResetLastSequenceNo); + + /** ResetLastSequenceNo lastSequenceNo. */ + public lastSequenceNo?: number | Long | null; + + /** ResetLastSequenceNo _lastSequenceNo. */ + public _lastSequenceNo?: "lastSequenceNo"; + + /** + * Creates a new ResetLastSequenceNo instance using the specified properties. + * @param [properties] Properties to set + * @returns ResetLastSequenceNo instance + */ + public static create( + properties?: pyth_lazer_transaction.IResetLastSequenceNo, + ): pyth_lazer_transaction.ResetLastSequenceNo; + + /** + * Encodes the specified ResetLastSequenceNo message. Does not implicitly {@link pyth_lazer_transaction.ResetLastSequenceNo.verify|verify} messages. + * @param message ResetLastSequenceNo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IResetLastSequenceNo, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified ResetLastSequenceNo message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ResetLastSequenceNo.verify|verify} messages. + * @param message ResetLastSequenceNo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IResetLastSequenceNo, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ResetLastSequenceNo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResetLastSequenceNo + * @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, + ): pyth_lazer_transaction.ResetLastSequenceNo; + + /** + * Decodes a ResetLastSequenceNo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResetLastSequenceNo + * @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, + ): pyth_lazer_transaction.ResetLastSequenceNo; + + /** + * Verifies a ResetLastSequenceNo 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 ResetLastSequenceNo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResetLastSequenceNo + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.ResetLastSequenceNo; + + /** + * Creates a plain object from a ResetLastSequenceNo message. Also converts values to other types if specified. + * @param message ResetLastSequenceNo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.ResetLastSequenceNo, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this ResetLastSequenceNo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResetLastSequenceNo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AddPublisher. */ + interface IAddPublisher { + /** AddPublisher publisherId */ + publisherId?: number | null; + + /** AddPublisher name */ + name?: string | null; + + /** AddPublisher publicKeys */ + publicKeys?: Uint8Array[] | null; + + /** AddPublisher isActive */ + isActive?: boolean | null; + } + + /** Represents an AddPublisher. */ + class AddPublisher implements IAddPublisher { + /** + * Constructs a new AddPublisher. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IAddPublisher); + + /** AddPublisher publisherId. */ + public publisherId?: number | null; + + /** AddPublisher name. */ + public name?: string | null; + + /** AddPublisher publicKeys. */ + public publicKeys: Uint8Array[]; + + /** AddPublisher isActive. */ + public isActive?: boolean | null; + + /** AddPublisher _publisherId. */ + public _publisherId?: "publisherId"; + + /** AddPublisher _name. */ + public _name?: "name"; + + /** AddPublisher _isActive. */ + public _isActive?: "isActive"; + + /** + * Creates a new AddPublisher instance using the specified properties. + * @param [properties] Properties to set + * @returns AddPublisher instance + */ + public static create( + properties?: pyth_lazer_transaction.IAddPublisher, + ): pyth_lazer_transaction.AddPublisher; + + /** + * Encodes the specified AddPublisher message. Does not implicitly {@link pyth_lazer_transaction.AddPublisher.verify|verify} messages. + * @param message AddPublisher message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IAddPublisher, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified AddPublisher message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddPublisher.verify|verify} messages. + * @param message AddPublisher message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IAddPublisher, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes an AddPublisher message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AddPublisher + * @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, + ): pyth_lazer_transaction.AddPublisher; + + /** + * Decodes an AddPublisher message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AddPublisher + * @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, + ): pyth_lazer_transaction.AddPublisher; + + /** + * Verifies an AddPublisher 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 AddPublisher message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AddPublisher + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.AddPublisher; + + /** + * Creates a plain object from an AddPublisher message. Also converts values to other types if specified. + * @param message AddPublisher + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.AddPublisher, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this AddPublisher to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AddPublisher + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdatePublisher. */ + interface IUpdatePublisher { + /** UpdatePublisher publisherId */ + publisherId?: number | null; + + /** UpdatePublisher setPublisherName */ + setPublisherName?: pyth_lazer_transaction.ISetPublisherName | null; + + /** UpdatePublisher addPublisherPublicKeys */ + addPublisherPublicKeys?: pyth_lazer_transaction.IAddPublisherPublicKeys | null; + + /** UpdatePublisher removePublisherPublicKeys */ + removePublisherPublicKeys?: pyth_lazer_transaction.IRemovePublisherPublicKeys | null; + + /** UpdatePublisher setPublisherPublicKeys */ + setPublisherPublicKeys?: pyth_lazer_transaction.ISetPublisherPublicKeys | null; + + /** UpdatePublisher setPublisherActive */ + setPublisherActive?: pyth_lazer_transaction.ISetPublisherActive | null; + + /** UpdatePublisher removePublisher */ + removePublisher?: google.protobuf.IEmpty | null; + } + + /** Represents an UpdatePublisher. */ + class UpdatePublisher implements IUpdatePublisher { + /** + * Constructs a new UpdatePublisher. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IUpdatePublisher); + + /** UpdatePublisher publisherId. */ + public publisherId?: number | null; + + /** UpdatePublisher setPublisherName. */ + public setPublisherName?: pyth_lazer_transaction.ISetPublisherName | null; + + /** UpdatePublisher addPublisherPublicKeys. */ + public addPublisherPublicKeys?: pyth_lazer_transaction.IAddPublisherPublicKeys | null; + + /** UpdatePublisher removePublisherPublicKeys. */ + public removePublisherPublicKeys?: pyth_lazer_transaction.IRemovePublisherPublicKeys | null; + + /** UpdatePublisher setPublisherPublicKeys. */ + public setPublisherPublicKeys?: pyth_lazer_transaction.ISetPublisherPublicKeys | null; + + /** UpdatePublisher setPublisherActive. */ + public setPublisherActive?: pyth_lazer_transaction.ISetPublisherActive | null; + + /** UpdatePublisher removePublisher. */ + public removePublisher?: google.protobuf.IEmpty | null; + + /** UpdatePublisher _publisherId. */ + public _publisherId?: "publisherId"; + + /** UpdatePublisher action. */ + public action?: + | "setPublisherName" + | "addPublisherPublicKeys" + | "removePublisherPublicKeys" + | "setPublisherPublicKeys" + | "setPublisherActive" + | "removePublisher"; + + /** + * Creates a new UpdatePublisher instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdatePublisher instance + */ + public static create( + properties?: pyth_lazer_transaction.IUpdatePublisher, + ): pyth_lazer_transaction.UpdatePublisher; + + /** + * Encodes the specified UpdatePublisher message. Does not implicitly {@link pyth_lazer_transaction.UpdatePublisher.verify|verify} messages. + * @param message UpdatePublisher message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IUpdatePublisher, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified UpdatePublisher message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdatePublisher.verify|verify} messages. + * @param message UpdatePublisher message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IUpdatePublisher, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes an UpdatePublisher message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdatePublisher + * @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, + ): pyth_lazer_transaction.UpdatePublisher; + + /** + * Decodes an UpdatePublisher message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdatePublisher + * @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, + ): pyth_lazer_transaction.UpdatePublisher; + + /** + * Verifies an UpdatePublisher 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 UpdatePublisher message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdatePublisher + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.UpdatePublisher; + + /** + * Creates a plain object from an UpdatePublisher message. Also converts values to other types if specified. + * @param message UpdatePublisher + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.UpdatePublisher, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this UpdatePublisher to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdatePublisher + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetPublisherName. */ + interface ISetPublisherName { + /** SetPublisherName name */ + name?: string | null; + } + + /** Represents a SetPublisherName. */ + class SetPublisherName implements ISetPublisherName { + /** + * Constructs a new SetPublisherName. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ISetPublisherName); + + /** SetPublisherName name. */ + public name?: string | null; + + /** SetPublisherName _name. */ + public _name?: "name"; + + /** + * Creates a new SetPublisherName instance using the specified properties. + * @param [properties] Properties to set + * @returns SetPublisherName instance + */ + public static create( + properties?: pyth_lazer_transaction.ISetPublisherName, + ): pyth_lazer_transaction.SetPublisherName; + + /** + * Encodes the specified SetPublisherName message. Does not implicitly {@link pyth_lazer_transaction.SetPublisherName.verify|verify} messages. + * @param message SetPublisherName message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.ISetPublisherName, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified SetPublisherName message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetPublisherName.verify|verify} messages. + * @param message SetPublisherName message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.ISetPublisherName, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a SetPublisherName message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetPublisherName + * @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, + ): pyth_lazer_transaction.SetPublisherName; + + /** + * Decodes a SetPublisherName message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetPublisherName + * @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, + ): pyth_lazer_transaction.SetPublisherName; + + /** + * Verifies a SetPublisherName 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 SetPublisherName message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetPublisherName + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.SetPublisherName; + + /** + * Creates a plain object from a SetPublisherName message. Also converts values to other types if specified. + * @param message SetPublisherName + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.SetPublisherName, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this SetPublisherName to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetPublisherName + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AddPublisherPublicKeys. */ + interface IAddPublisherPublicKeys { + /** AddPublisherPublicKeys publicKeys */ + publicKeys?: Uint8Array[] | null; + } + + /** Represents an AddPublisherPublicKeys. */ + class AddPublisherPublicKeys implements IAddPublisherPublicKeys { + /** + * Constructs a new AddPublisherPublicKeys. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IAddPublisherPublicKeys); + + /** AddPublisherPublicKeys publicKeys. */ + public publicKeys: Uint8Array[]; + + /** + * Creates a new AddPublisherPublicKeys instance using the specified properties. + * @param [properties] Properties to set + * @returns AddPublisherPublicKeys instance + */ + public static create( + properties?: pyth_lazer_transaction.IAddPublisherPublicKeys, + ): pyth_lazer_transaction.AddPublisherPublicKeys; + + /** + * Encodes the specified AddPublisherPublicKeys message. Does not implicitly {@link pyth_lazer_transaction.AddPublisherPublicKeys.verify|verify} messages. + * @param message AddPublisherPublicKeys message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IAddPublisherPublicKeys, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified AddPublisherPublicKeys message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddPublisherPublicKeys.verify|verify} messages. + * @param message AddPublisherPublicKeys message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IAddPublisherPublicKeys, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes an AddPublisherPublicKeys message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AddPublisherPublicKeys + * @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, + ): pyth_lazer_transaction.AddPublisherPublicKeys; + + /** + * Decodes an AddPublisherPublicKeys message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AddPublisherPublicKeys + * @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, + ): pyth_lazer_transaction.AddPublisherPublicKeys; + + /** + * Verifies an AddPublisherPublicKeys 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 AddPublisherPublicKeys message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AddPublisherPublicKeys + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.AddPublisherPublicKeys; + + /** + * Creates a plain object from an AddPublisherPublicKeys message. Also converts values to other types if specified. + * @param message AddPublisherPublicKeys + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.AddPublisherPublicKeys, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this AddPublisherPublicKeys to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AddPublisherPublicKeys + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RemovePublisherPublicKeys. */ + interface IRemovePublisherPublicKeys { + /** RemovePublisherPublicKeys publicKeys */ + publicKeys?: Uint8Array[] | null; + } + + /** Represents a RemovePublisherPublicKeys. */ + class RemovePublisherPublicKeys implements IRemovePublisherPublicKeys { + /** + * Constructs a new RemovePublisherPublicKeys. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IRemovePublisherPublicKeys); + + /** RemovePublisherPublicKeys publicKeys. */ + public publicKeys: Uint8Array[]; + + /** + * Creates a new RemovePublisherPublicKeys instance using the specified properties. + * @param [properties] Properties to set + * @returns RemovePublisherPublicKeys instance + */ + public static create( + properties?: pyth_lazer_transaction.IRemovePublisherPublicKeys, + ): pyth_lazer_transaction.RemovePublisherPublicKeys; + + /** + * Encodes the specified RemovePublisherPublicKeys message. Does not implicitly {@link pyth_lazer_transaction.RemovePublisherPublicKeys.verify|verify} messages. + * @param message RemovePublisherPublicKeys message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IRemovePublisherPublicKeys, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified RemovePublisherPublicKeys message, length delimited. Does not implicitly {@link pyth_lazer_transaction.RemovePublisherPublicKeys.verify|verify} messages. + * @param message RemovePublisherPublicKeys message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IRemovePublisherPublicKeys, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a RemovePublisherPublicKeys message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RemovePublisherPublicKeys + * @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, + ): pyth_lazer_transaction.RemovePublisherPublicKeys; + + /** + * Decodes a RemovePublisherPublicKeys message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RemovePublisherPublicKeys + * @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, + ): pyth_lazer_transaction.RemovePublisherPublicKeys; + + /** + * Verifies a RemovePublisherPublicKeys 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 RemovePublisherPublicKeys message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RemovePublisherPublicKeys + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.RemovePublisherPublicKeys; + + /** + * Creates a plain object from a RemovePublisherPublicKeys message. Also converts values to other types if specified. + * @param message RemovePublisherPublicKeys + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.RemovePublisherPublicKeys, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this RemovePublisherPublicKeys to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RemovePublisherPublicKeys + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetPublisherPublicKeys. */ + interface ISetPublisherPublicKeys { + /** SetPublisherPublicKeys publicKeys */ + publicKeys?: Uint8Array[] | null; + } + + /** Represents a SetPublisherPublicKeys. */ + class SetPublisherPublicKeys implements ISetPublisherPublicKeys { + /** + * Constructs a new SetPublisherPublicKeys. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ISetPublisherPublicKeys); + + /** SetPublisherPublicKeys publicKeys. */ + public publicKeys: Uint8Array[]; + + /** + * Creates a new SetPublisherPublicKeys instance using the specified properties. + * @param [properties] Properties to set + * @returns SetPublisherPublicKeys instance + */ + public static create( + properties?: pyth_lazer_transaction.ISetPublisherPublicKeys, + ): pyth_lazer_transaction.SetPublisherPublicKeys; + + /** + * Encodes the specified SetPublisherPublicKeys message. Does not implicitly {@link pyth_lazer_transaction.SetPublisherPublicKeys.verify|verify} messages. + * @param message SetPublisherPublicKeys message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.ISetPublisherPublicKeys, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified SetPublisherPublicKeys message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetPublisherPublicKeys.verify|verify} messages. + * @param message SetPublisherPublicKeys message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.ISetPublisherPublicKeys, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a SetPublisherPublicKeys message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetPublisherPublicKeys + * @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, + ): pyth_lazer_transaction.SetPublisherPublicKeys; + + /** + * Decodes a SetPublisherPublicKeys message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetPublisherPublicKeys + * @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, + ): pyth_lazer_transaction.SetPublisherPublicKeys; + + /** + * Verifies a SetPublisherPublicKeys 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 SetPublisherPublicKeys message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetPublisherPublicKeys + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.SetPublisherPublicKeys; + + /** + * Creates a plain object from a SetPublisherPublicKeys message. Also converts values to other types if specified. + * @param message SetPublisherPublicKeys + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.SetPublisherPublicKeys, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this SetPublisherPublicKeys to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetPublisherPublicKeys + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetPublisherActive. */ + interface ISetPublisherActive { + /** SetPublisherActive isActive */ + isActive?: boolean | null; + } + + /** Represents a SetPublisherActive. */ + class SetPublisherActive implements ISetPublisherActive { + /** + * Constructs a new SetPublisherActive. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ISetPublisherActive); + + /** SetPublisherActive isActive. */ + public isActive?: boolean | null; + + /** SetPublisherActive _isActive. */ + public _isActive?: "isActive"; + + /** + * Creates a new SetPublisherActive instance using the specified properties. + * @param [properties] Properties to set + * @returns SetPublisherActive instance + */ + public static create( + properties?: pyth_lazer_transaction.ISetPublisherActive, + ): pyth_lazer_transaction.SetPublisherActive; + + /** + * Encodes the specified SetPublisherActive message. Does not implicitly {@link pyth_lazer_transaction.SetPublisherActive.verify|verify} messages. + * @param message SetPublisherActive message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.ISetPublisherActive, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified SetPublisherActive message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetPublisherActive.verify|verify} messages. + * @param message SetPublisherActive message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.ISetPublisherActive, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a SetPublisherActive message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetPublisherActive + * @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, + ): pyth_lazer_transaction.SetPublisherActive; + + /** + * Decodes a SetPublisherActive message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetPublisherActive + * @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, + ): pyth_lazer_transaction.SetPublisherActive; + + /** + * Verifies a SetPublisherActive 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 SetPublisherActive message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetPublisherActive + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.SetPublisherActive; + + /** + * Creates a plain object from a SetPublisherActive message. Also converts values to other types if specified. + * @param message SetPublisherActive + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.SetPublisherActive, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this SetPublisherActive to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetPublisherActive + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AddFeed. */ + interface IAddFeed { + /** AddFeed feedId */ + feedId?: number | null; + + /** AddFeed metadata */ + metadata?: pyth_lazer_transaction.DynamicValue.IMap | null; + + /** AddFeed permissionedPublishers */ + permissionedPublishers?: number[] | null; + } + + /** Represents an AddFeed. */ + class AddFeed implements IAddFeed { + /** + * Constructs a new AddFeed. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IAddFeed); + + /** AddFeed feedId. */ + public feedId?: number | null; + + /** AddFeed metadata. */ + public metadata?: pyth_lazer_transaction.DynamicValue.IMap | null; + + /** AddFeed permissionedPublishers. */ + public permissionedPublishers: number[]; + + /** AddFeed _feedId. */ + public _feedId?: "feedId"; + + /** AddFeed _metadata. */ + public _metadata?: "metadata"; + + /** + * Creates a new AddFeed instance using the specified properties. + * @param [properties] Properties to set + * @returns AddFeed instance + */ + public static create( + properties?: pyth_lazer_transaction.IAddFeed, + ): pyth_lazer_transaction.AddFeed; + + /** + * Encodes the specified AddFeed message. Does not implicitly {@link pyth_lazer_transaction.AddFeed.verify|verify} messages. + * @param message AddFeed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IAddFeed, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified AddFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddFeed.verify|verify} messages. + * @param message AddFeed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IAddFeed, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes an AddFeed message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AddFeed + * @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, + ): pyth_lazer_transaction.AddFeed; + + /** + * Decodes an AddFeed message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AddFeed + * @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, + ): pyth_lazer_transaction.AddFeed; + + /** + * Verifies an AddFeed 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 AddFeed message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AddFeed + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.AddFeed; + + /** + * Creates a plain object from an AddFeed message. Also converts values to other types if specified. + * @param message AddFeed + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.AddFeed, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this AddFeed to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AddFeed + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateFeed. */ + interface IUpdateFeed { + /** UpdateFeed feedId */ + feedId?: number | null; + + /** UpdateFeed updateFeedMetadata */ + updateFeedMetadata?: pyth_lazer_transaction.IUpdateFeedMetadata | null; + + /** UpdateFeed activateFeed */ + activateFeed?: pyth_lazer_transaction.IActivateFeed | null; + + /** UpdateFeed deactivateFeed */ + deactivateFeed?: pyth_lazer_transaction.IDeactivateFeed | null; + + /** UpdateFeed removeFeed */ + removeFeed?: google.protobuf.IEmpty | null; + } + + /** Represents an UpdateFeed. */ + class UpdateFeed implements IUpdateFeed { + /** + * Constructs a new UpdateFeed. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IUpdateFeed); + + /** UpdateFeed feedId. */ + public feedId?: number | null; + + /** UpdateFeed updateFeedMetadata. */ + public updateFeedMetadata?: pyth_lazer_transaction.IUpdateFeedMetadata | null; + + /** UpdateFeed activateFeed. */ + public activateFeed?: pyth_lazer_transaction.IActivateFeed | null; + + /** UpdateFeed deactivateFeed. */ + public deactivateFeed?: pyth_lazer_transaction.IDeactivateFeed | null; + + /** UpdateFeed removeFeed. */ + public removeFeed?: google.protobuf.IEmpty | null; + + /** UpdateFeed _feedId. */ + public _feedId?: "feedId"; + + /** UpdateFeed action. */ + public action?: + | "updateFeedMetadata" + | "activateFeed" + | "deactivateFeed" + | "removeFeed"; + + /** + * Creates a new UpdateFeed instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateFeed instance + */ + public static create( + properties?: pyth_lazer_transaction.IUpdateFeed, + ): pyth_lazer_transaction.UpdateFeed; + + /** + * Encodes the specified UpdateFeed message. Does not implicitly {@link pyth_lazer_transaction.UpdateFeed.verify|verify} messages. + * @param message UpdateFeed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IUpdateFeed, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified UpdateFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdateFeed.verify|verify} messages. + * @param message UpdateFeed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IUpdateFeed, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes an UpdateFeed message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateFeed + * @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, + ): pyth_lazer_transaction.UpdateFeed; + + /** + * Decodes an UpdateFeed message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateFeed + * @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, + ): pyth_lazer_transaction.UpdateFeed; + + /** + * Verifies an UpdateFeed 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 UpdateFeed message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateFeed + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.UpdateFeed; + + /** + * Creates a plain object from an UpdateFeed message. Also converts values to other types if specified. + * @param message UpdateFeed + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.UpdateFeed, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this UpdateFeed to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateFeed + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateFeedMetadata. */ + interface IUpdateFeedMetadata { + /** UpdateFeedMetadata name */ + name?: string | null; + + /** UpdateFeedMetadata value */ + value?: pyth_lazer_transaction.IDynamicValue | null; + } + + /** Represents an UpdateFeedMetadata. */ + class UpdateFeedMetadata implements IUpdateFeedMetadata { + /** + * Constructs a new UpdateFeedMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IUpdateFeedMetadata); + + /** UpdateFeedMetadata name. */ + public name?: string | null; + + /** UpdateFeedMetadata value. */ + public value?: pyth_lazer_transaction.IDynamicValue | null; + + /** UpdateFeedMetadata _name. */ + public _name?: "name"; + + /** UpdateFeedMetadata _value. */ + public _value?: "value"; + + /** + * Creates a new UpdateFeedMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateFeedMetadata instance + */ + public static create( + properties?: pyth_lazer_transaction.IUpdateFeedMetadata, + ): pyth_lazer_transaction.UpdateFeedMetadata; + + /** + * Encodes the specified UpdateFeedMetadata message. Does not implicitly {@link pyth_lazer_transaction.UpdateFeedMetadata.verify|verify} messages. + * @param message UpdateFeedMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IUpdateFeedMetadata, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified UpdateFeedMetadata message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdateFeedMetadata.verify|verify} messages. + * @param message UpdateFeedMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IUpdateFeedMetadata, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes an UpdateFeedMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateFeedMetadata + * @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, + ): pyth_lazer_transaction.UpdateFeedMetadata; + + /** + * Decodes an UpdateFeedMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateFeedMetadata + * @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, + ): pyth_lazer_transaction.UpdateFeedMetadata; + + /** + * Verifies an UpdateFeedMetadata 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 UpdateFeedMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateFeedMetadata + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.UpdateFeedMetadata; + + /** + * Creates a plain object from an UpdateFeedMetadata message. Also converts values to other types if specified. + * @param message UpdateFeedMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.UpdateFeedMetadata, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this UpdateFeedMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateFeedMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ActivateFeed. */ + interface IActivateFeed { + /** ActivateFeed activationTimestamp */ + activationTimestamp?: google.protobuf.ITimestamp | null; + } + + /** Represents an ActivateFeed. */ + class ActivateFeed implements IActivateFeed { + /** + * Constructs a new ActivateFeed. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IActivateFeed); + + /** ActivateFeed activationTimestamp. */ + public activationTimestamp?: google.protobuf.ITimestamp | null; + + /** ActivateFeed _activationTimestamp. */ + public _activationTimestamp?: "activationTimestamp"; + + /** + * Creates a new ActivateFeed instance using the specified properties. + * @param [properties] Properties to set + * @returns ActivateFeed instance + */ + public static create( + properties?: pyth_lazer_transaction.IActivateFeed, + ): pyth_lazer_transaction.ActivateFeed; + + /** + * Encodes the specified ActivateFeed message. Does not implicitly {@link pyth_lazer_transaction.ActivateFeed.verify|verify} messages. + * @param message ActivateFeed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IActivateFeed, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified ActivateFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ActivateFeed.verify|verify} messages. + * @param message ActivateFeed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IActivateFeed, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes an ActivateFeed message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ActivateFeed + * @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, + ): pyth_lazer_transaction.ActivateFeed; + + /** + * Decodes an ActivateFeed message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ActivateFeed + * @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, + ): pyth_lazer_transaction.ActivateFeed; + + /** + * Verifies an ActivateFeed 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 ActivateFeed message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ActivateFeed + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.ActivateFeed; + + /** + * Creates a plain object from an ActivateFeed message. Also converts values to other types if specified. + * @param message ActivateFeed + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.ActivateFeed, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this ActivateFeed to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ActivateFeed + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeactivateFeed. */ + interface IDeactivateFeed { + /** DeactivateFeed deactivationTimestamp */ + deactivationTimestamp?: google.protobuf.ITimestamp | null; + } + + /** Represents a DeactivateFeed. */ + class DeactivateFeed implements IDeactivateFeed { + /** + * Constructs a new DeactivateFeed. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IDeactivateFeed); + + /** DeactivateFeed deactivationTimestamp. */ + public deactivationTimestamp?: google.protobuf.ITimestamp | null; + + /** DeactivateFeed _deactivationTimestamp. */ + public _deactivationTimestamp?: "deactivationTimestamp"; + + /** + * Creates a new DeactivateFeed instance using the specified properties. + * @param [properties] Properties to set + * @returns DeactivateFeed instance + */ + public static create( + properties?: pyth_lazer_transaction.IDeactivateFeed, + ): pyth_lazer_transaction.DeactivateFeed; + + /** + * Encodes the specified DeactivateFeed message. Does not implicitly {@link pyth_lazer_transaction.DeactivateFeed.verify|verify} messages. + * @param message DeactivateFeed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IDeactivateFeed, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified DeactivateFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DeactivateFeed.verify|verify} messages. + * @param message DeactivateFeed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IDeactivateFeed, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a DeactivateFeed message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeactivateFeed + * @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, + ): pyth_lazer_transaction.DeactivateFeed; + + /** + * Decodes a DeactivateFeed message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeactivateFeed + * @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, + ): pyth_lazer_transaction.DeactivateFeed; + + /** + * Verifies a DeactivateFeed 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 DeactivateFeed message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeactivateFeed + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.DeactivateFeed; + + /** + * Creates a plain object from a DeactivateFeed message. Also converts values to other types if specified. + * @param message DeactivateFeed + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.DeactivateFeed, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this DeactivateFeed to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeactivateFeed + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DynamicValue. */ + interface IDynamicValue { + /** DynamicValue stringValue */ + stringValue?: string | null; + + /** DynamicValue doubleValue */ + doubleValue?: number | null; + + /** DynamicValue uintValue */ + uintValue?: number | Long | null; + + /** DynamicValue intValue */ + intValue?: number | Long | null; + + /** DynamicValue boolValue */ + boolValue?: boolean | null; + + /** DynamicValue bytesValue */ + bytesValue?: Uint8Array | null; + + /** DynamicValue durationValue */ + durationValue?: google.protobuf.IDuration | null; + + /** DynamicValue timestampValue */ + timestampValue?: google.protobuf.ITimestamp | null; + + /** DynamicValue list */ + list?: pyth_lazer_transaction.DynamicValue.IList | null; + + /** DynamicValue map */ + map?: pyth_lazer_transaction.DynamicValue.IMap | null; + } + + /** Represents a DynamicValue. */ + class DynamicValue implements IDynamicValue { + /** + * Constructs a new DynamicValue. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IDynamicValue); + + /** DynamicValue stringValue. */ + public stringValue?: string | null; + + /** DynamicValue doubleValue. */ + public doubleValue?: number | null; + + /** DynamicValue uintValue. */ + public uintValue?: number | Long | null; + + /** DynamicValue intValue. */ + public intValue?: number | Long | null; + + /** DynamicValue boolValue. */ + public boolValue?: boolean | null; + + /** DynamicValue bytesValue. */ + public bytesValue?: Uint8Array | null; + + /** DynamicValue durationValue. */ + public durationValue?: google.protobuf.IDuration | null; + + /** DynamicValue timestampValue. */ + public timestampValue?: google.protobuf.ITimestamp | null; + + /** DynamicValue list. */ + public list?: pyth_lazer_transaction.DynamicValue.IList | null; + + /** DynamicValue map. */ + public map?: pyth_lazer_transaction.DynamicValue.IMap | null; + + /** DynamicValue value. */ + public value?: + | "stringValue" + | "doubleValue" + | "uintValue" + | "intValue" + | "boolValue" + | "bytesValue" + | "durationValue" + | "timestampValue" + | "list" + | "map"; + + /** + * Creates a new DynamicValue instance using the specified properties. + * @param [properties] Properties to set + * @returns DynamicValue instance + */ + public static create( + properties?: pyth_lazer_transaction.IDynamicValue, + ): pyth_lazer_transaction.DynamicValue; + + /** + * Encodes the specified DynamicValue message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.verify|verify} messages. + * @param message DynamicValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IDynamicValue, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified DynamicValue message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.verify|verify} messages. + * @param message DynamicValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IDynamicValue, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a DynamicValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DynamicValue + * @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, + ): pyth_lazer_transaction.DynamicValue; + + /** + * Decodes a DynamicValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DynamicValue + * @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, + ): pyth_lazer_transaction.DynamicValue; + + /** + * Verifies a DynamicValue 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 DynamicValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DynamicValue + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.DynamicValue; + + /** + * Creates a plain object from a DynamicValue message. Also converts values to other types if specified. + * @param message DynamicValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.DynamicValue, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this DynamicValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DynamicValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DynamicValue { + /** Properties of a List. */ + interface IList { + /** List items */ + items?: pyth_lazer_transaction.IDynamicValue[] | null; } - /** Represents a SetShardName. */ - class SetShardName implements ISetShardName { - - /** - * Constructs a new SetShardName. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.ISetShardName); - - /** SetShardName shardName. */ - public shardName?: (string|null); - - /** SetShardName _shardName. */ - public _shardName?: "shardName"; - - /** - * Creates a new SetShardName instance using the specified properties. - * @param [properties] Properties to set - * @returns SetShardName instance - */ - public static create(properties?: pyth_lazer_transaction.ISetShardName): pyth_lazer_transaction.SetShardName; - - /** - * Encodes the specified SetShardName message. Does not implicitly {@link pyth_lazer_transaction.SetShardName.verify|verify} messages. - * @param message SetShardName message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.ISetShardName, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetShardName message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetShardName.verify|verify} messages. - * @param message SetShardName message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.ISetShardName, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetShardName message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetShardName - * @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): pyth_lazer_transaction.SetShardName; - - /** - * Decodes a SetShardName message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetShardName - * @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)): pyth_lazer_transaction.SetShardName; - - /** - * Verifies a SetShardName 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 SetShardName message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetShardName - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.SetShardName; - - /** - * Creates a plain object from a SetShardName message. Also converts values to other types if specified. - * @param message SetShardName - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.SetShardName, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetShardName to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetShardName - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** Represents a List. */ + class List implements IList { + /** + * Constructs a new List. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.DynamicValue.IList); + + /** List items. */ + public items: pyth_lazer_transaction.IDynamicValue[]; + + /** + * Creates a new List instance using the specified properties. + * @param [properties] Properties to set + * @returns List instance + */ + public static create( + properties?: pyth_lazer_transaction.DynamicValue.IList, + ): pyth_lazer_transaction.DynamicValue.List; + + /** + * Encodes the specified List message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.List.verify|verify} messages. + * @param message List message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.DynamicValue.IList, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified List message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.List.verify|verify} messages. + * @param message List message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.DynamicValue.IList, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a List message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns List + * @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, + ): pyth_lazer_transaction.DynamicValue.List; + + /** + * Decodes a List message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns List + * @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, + ): pyth_lazer_transaction.DynamicValue.List; + + /** + * Verifies a List 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 List message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns List + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.DynamicValue.List; + + /** + * Creates a plain object from a List message. Also converts values to other types if specified. + * @param message List + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.DynamicValue.List, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this List to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for List + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SetShardGroup. */ - interface ISetShardGroup { + /** Properties of a MapItem. */ + interface IMapItem { + /** MapItem key */ + key?: string | null; - /** SetShardGroup shardGroup */ - shardGroup?: (string|null); + /** MapItem value */ + value?: pyth_lazer_transaction.IDynamicValue | null; } - /** Represents a SetShardGroup. */ - class SetShardGroup implements ISetShardGroup { - - /** - * Constructs a new SetShardGroup. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.ISetShardGroup); - - /** SetShardGroup shardGroup. */ - public shardGroup?: (string|null); - - /** SetShardGroup _shardGroup. */ - public _shardGroup?: "shardGroup"; - - /** - * Creates a new SetShardGroup instance using the specified properties. - * @param [properties] Properties to set - * @returns SetShardGroup instance - */ - public static create(properties?: pyth_lazer_transaction.ISetShardGroup): pyth_lazer_transaction.SetShardGroup; - - /** - * Encodes the specified SetShardGroup message. Does not implicitly {@link pyth_lazer_transaction.SetShardGroup.verify|verify} messages. - * @param message SetShardGroup message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.ISetShardGroup, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetShardGroup message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetShardGroup.verify|verify} messages. - * @param message SetShardGroup message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.ISetShardGroup, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetShardGroup message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetShardGroup - * @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): pyth_lazer_transaction.SetShardGroup; - - /** - * Decodes a SetShardGroup message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetShardGroup - * @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)): pyth_lazer_transaction.SetShardGroup; - - /** - * Verifies a SetShardGroup 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 SetShardGroup message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetShardGroup - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.SetShardGroup; - - /** - * Creates a plain object from a SetShardGroup message. Also converts values to other types if specified. - * @param message SetShardGroup - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.SetShardGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetShardGroup to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetShardGroup - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** Represents a MapItem. */ + class MapItem implements IMapItem { + /** + * Constructs a new MapItem. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.DynamicValue.IMapItem); + + /** MapItem key. */ + public key?: string | null; + + /** MapItem value. */ + public value?: pyth_lazer_transaction.IDynamicValue | null; + + /** MapItem _key. */ + public _key?: "key"; + + /** MapItem _value. */ + public _value?: "value"; + + /** + * Creates a new MapItem instance using the specified properties. + * @param [properties] Properties to set + * @returns MapItem instance + */ + public static create( + properties?: pyth_lazer_transaction.DynamicValue.IMapItem, + ): pyth_lazer_transaction.DynamicValue.MapItem; + + /** + * Encodes the specified MapItem message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.MapItem.verify|verify} messages. + * @param message MapItem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.DynamicValue.IMapItem, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified MapItem message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.MapItem.verify|verify} messages. + * @param message MapItem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.DynamicValue.IMapItem, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a MapItem message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MapItem + * @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, + ): pyth_lazer_transaction.DynamicValue.MapItem; + + /** + * Decodes a MapItem message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MapItem + * @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, + ): pyth_lazer_transaction.DynamicValue.MapItem; + + /** + * Verifies a MapItem 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 MapItem message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MapItem + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.DynamicValue.MapItem; + + /** + * Creates a plain object from a MapItem message. Also converts values to other types if specified. + * @param message MapItem + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.DynamicValue.MapItem, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this MapItem to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MapItem + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ResetLastSequenceNo. */ - interface IResetLastSequenceNo { - - /** ResetLastSequenceNo lastSequenceNo */ - lastSequenceNo?: (number|Long|null); - } - - /** Represents a ResetLastSequenceNo. */ - class ResetLastSequenceNo implements IResetLastSequenceNo { - - /** - * Constructs a new ResetLastSequenceNo. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IResetLastSequenceNo); - - /** ResetLastSequenceNo lastSequenceNo. */ - public lastSequenceNo?: (number|Long|null); - - /** ResetLastSequenceNo _lastSequenceNo. */ - public _lastSequenceNo?: "lastSequenceNo"; - - /** - * Creates a new ResetLastSequenceNo instance using the specified properties. - * @param [properties] Properties to set - * @returns ResetLastSequenceNo instance - */ - public static create(properties?: pyth_lazer_transaction.IResetLastSequenceNo): pyth_lazer_transaction.ResetLastSequenceNo; - - /** - * Encodes the specified ResetLastSequenceNo message. Does not implicitly {@link pyth_lazer_transaction.ResetLastSequenceNo.verify|verify} messages. - * @param message ResetLastSequenceNo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IResetLastSequenceNo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResetLastSequenceNo message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ResetLastSequenceNo.verify|verify} messages. - * @param message ResetLastSequenceNo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IResetLastSequenceNo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResetLastSequenceNo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResetLastSequenceNo - * @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): pyth_lazer_transaction.ResetLastSequenceNo; - - /** - * Decodes a ResetLastSequenceNo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResetLastSequenceNo - * @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)): pyth_lazer_transaction.ResetLastSequenceNo; - - /** - * Verifies a ResetLastSequenceNo 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 ResetLastSequenceNo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResetLastSequenceNo - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.ResetLastSequenceNo; - - /** - * Creates a plain object from a ResetLastSequenceNo message. Also converts values to other types if specified. - * @param message ResetLastSequenceNo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.ResetLastSequenceNo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResetLastSequenceNo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResetLastSequenceNo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AddPublisher. */ - interface IAddPublisher { - - /** AddPublisher publisherId */ - publisherId?: (number|null); - - /** AddPublisher name */ - name?: (string|null); - - /** AddPublisher publicKeys */ - publicKeys?: (Uint8Array[]|null); - - /** AddPublisher isActive */ - isActive?: (boolean|null); + /** Properties of a Map. */ + interface IMap { + /** Map items */ + items?: pyth_lazer_transaction.DynamicValue.IMapItem[] | null; } - /** Represents an AddPublisher. */ - class AddPublisher implements IAddPublisher { - - /** - * Constructs a new AddPublisher. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IAddPublisher); - - /** AddPublisher publisherId. */ - public publisherId?: (number|null); - - /** AddPublisher name. */ - public name?: (string|null); - - /** AddPublisher publicKeys. */ - public publicKeys: Uint8Array[]; - - /** AddPublisher isActive. */ - public isActive?: (boolean|null); - - /** AddPublisher _publisherId. */ - public _publisherId?: "publisherId"; - - /** AddPublisher _name. */ - public _name?: "name"; - - /** AddPublisher _isActive. */ - public _isActive?: "isActive"; - - /** - * Creates a new AddPublisher instance using the specified properties. - * @param [properties] Properties to set - * @returns AddPublisher instance - */ - public static create(properties?: pyth_lazer_transaction.IAddPublisher): pyth_lazer_transaction.AddPublisher; - - /** - * Encodes the specified AddPublisher message. Does not implicitly {@link pyth_lazer_transaction.AddPublisher.verify|verify} messages. - * @param message AddPublisher message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IAddPublisher, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AddPublisher message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddPublisher.verify|verify} messages. - * @param message AddPublisher message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IAddPublisher, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AddPublisher message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AddPublisher - * @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): pyth_lazer_transaction.AddPublisher; - - /** - * Decodes an AddPublisher message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AddPublisher - * @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)): pyth_lazer_transaction.AddPublisher; - - /** - * Verifies an AddPublisher 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 AddPublisher message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AddPublisher - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.AddPublisher; - - /** - * Creates a plain object from an AddPublisher message. Also converts values to other types if specified. - * @param message AddPublisher - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.AddPublisher, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AddPublisher to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AddPublisher - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdatePublisher. */ - interface IUpdatePublisher { - - /** UpdatePublisher publisherId */ - publisherId?: (number|null); - - /** UpdatePublisher setPublisherName */ - setPublisherName?: (pyth_lazer_transaction.ISetPublisherName|null); - - /** UpdatePublisher addPublisherPublicKeys */ - addPublisherPublicKeys?: (pyth_lazer_transaction.IAddPublisherPublicKeys|null); - - /** UpdatePublisher removePublisherPublicKeys */ - removePublisherPublicKeys?: (pyth_lazer_transaction.IRemovePublisherPublicKeys|null); - - /** UpdatePublisher setPublisherPublicKeys */ - setPublisherPublicKeys?: (pyth_lazer_transaction.ISetPublisherPublicKeys|null); - - /** UpdatePublisher setPublisherActive */ - setPublisherActive?: (pyth_lazer_transaction.ISetPublisherActive|null); - - /** UpdatePublisher removePublisher */ - removePublisher?: (google.protobuf.IEmpty|null); + /** Represents a Map. */ + class Map implements IMap { + /** + * Constructs a new Map. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.DynamicValue.IMap); + + /** Map items. */ + public items: pyth_lazer_transaction.DynamicValue.IMapItem[]; + + /** + * Creates a new Map instance using the specified properties. + * @param [properties] Properties to set + * @returns Map instance + */ + public static create( + properties?: pyth_lazer_transaction.DynamicValue.IMap, + ): pyth_lazer_transaction.DynamicValue.Map; + + /** + * Encodes the specified Map message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.Map.verify|verify} messages. + * @param message Map message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.DynamicValue.IMap, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified Map message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.Map.verify|verify} messages. + * @param message Map message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.DynamicValue.IMap, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a Map message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Map + * @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, + ): pyth_lazer_transaction.DynamicValue.Map; + + /** + * Decodes a Map message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Map + * @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, + ): pyth_lazer_transaction.DynamicValue.Map; + + /** + * Verifies a Map 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 Map message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Map + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.DynamicValue.Map; + + /** + * Creates a plain object from a Map message. Also converts values to other types if specified. + * @param message Map + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.DynamicValue.Map, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Map to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Map + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } + } +} - /** Represents an UpdatePublisher. */ - class UpdatePublisher implements IUpdatePublisher { - - /** - * Constructs a new UpdatePublisher. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IUpdatePublisher); - - /** UpdatePublisher publisherId. */ - public publisherId?: (number|null); - - /** UpdatePublisher setPublisherName. */ - public setPublisherName?: (pyth_lazer_transaction.ISetPublisherName|null); - - /** UpdatePublisher addPublisherPublicKeys. */ - public addPublisherPublicKeys?: (pyth_lazer_transaction.IAddPublisherPublicKeys|null); - - /** UpdatePublisher removePublisherPublicKeys. */ - public removePublisherPublicKeys?: (pyth_lazer_transaction.IRemovePublisherPublicKeys|null); - - /** UpdatePublisher setPublisherPublicKeys. */ - public setPublisherPublicKeys?: (pyth_lazer_transaction.ISetPublisherPublicKeys|null); - - /** UpdatePublisher setPublisherActive. */ - public setPublisherActive?: (pyth_lazer_transaction.ISetPublisherActive|null); - - /** UpdatePublisher removePublisher. */ - public removePublisher?: (google.protobuf.IEmpty|null); - - /** UpdatePublisher _publisherId. */ - public _publisherId?: "publisherId"; - - /** UpdatePublisher action. */ - public action?: ("setPublisherName"|"addPublisherPublicKeys"|"removePublisherPublicKeys"|"setPublisherPublicKeys"|"setPublisherActive"|"removePublisher"); - - /** - * Creates a new UpdatePublisher instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdatePublisher instance - */ - public static create(properties?: pyth_lazer_transaction.IUpdatePublisher): pyth_lazer_transaction.UpdatePublisher; - - /** - * Encodes the specified UpdatePublisher message. Does not implicitly {@link pyth_lazer_transaction.UpdatePublisher.verify|verify} messages. - * @param message UpdatePublisher message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IUpdatePublisher, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdatePublisher message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdatePublisher.verify|verify} messages. - * @param message UpdatePublisher message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IUpdatePublisher, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdatePublisher message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdatePublisher - * @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): pyth_lazer_transaction.UpdatePublisher; - - /** - * Decodes an UpdatePublisher message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdatePublisher - * @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)): pyth_lazer_transaction.UpdatePublisher; - - /** - * Verifies an UpdatePublisher 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 UpdatePublisher message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdatePublisher - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.UpdatePublisher; - - /** - * Creates a plain object from an UpdatePublisher message. Also converts values to other types if specified. - * @param message UpdatePublisher - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.UpdatePublisher, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdatePublisher to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdatePublisher - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetPublisherName. */ - interface ISetPublisherName { - - /** SetPublisherName name */ - name?: (string|null); - } - - /** Represents a SetPublisherName. */ - class SetPublisherName implements ISetPublisherName { - - /** - * Constructs a new SetPublisherName. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.ISetPublisherName); - - /** SetPublisherName name. */ - public name?: (string|null); - - /** SetPublisherName _name. */ - public _name?: "name"; - - /** - * Creates a new SetPublisherName instance using the specified properties. - * @param [properties] Properties to set - * @returns SetPublisherName instance - */ - public static create(properties?: pyth_lazer_transaction.ISetPublisherName): pyth_lazer_transaction.SetPublisherName; - - /** - * Encodes the specified SetPublisherName message. Does not implicitly {@link pyth_lazer_transaction.SetPublisherName.verify|verify} messages. - * @param message SetPublisherName message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.ISetPublisherName, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetPublisherName message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetPublisherName.verify|verify} messages. - * @param message SetPublisherName message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.ISetPublisherName, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetPublisherName message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetPublisherName - * @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): pyth_lazer_transaction.SetPublisherName; - - /** - * Decodes a SetPublisherName message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetPublisherName - * @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)): pyth_lazer_transaction.SetPublisherName; - - /** - * Verifies a SetPublisherName 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 SetPublisherName message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetPublisherName - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.SetPublisherName; - - /** - * Creates a plain object from a SetPublisherName message. Also converts values to other types if specified. - * @param message SetPublisherName - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.SetPublisherName, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetPublisherName to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetPublisherName - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AddPublisherPublicKeys. */ - interface IAddPublisherPublicKeys { - - /** AddPublisherPublicKeys publicKeys */ - publicKeys?: (Uint8Array[]|null); - } - - /** Represents an AddPublisherPublicKeys. */ - class AddPublisherPublicKeys implements IAddPublisherPublicKeys { - - /** - * Constructs a new AddPublisherPublicKeys. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IAddPublisherPublicKeys); - - /** AddPublisherPublicKeys publicKeys. */ - public publicKeys: Uint8Array[]; - - /** - * Creates a new AddPublisherPublicKeys instance using the specified properties. - * @param [properties] Properties to set - * @returns AddPublisherPublicKeys instance - */ - public static create(properties?: pyth_lazer_transaction.IAddPublisherPublicKeys): pyth_lazer_transaction.AddPublisherPublicKeys; - - /** - * Encodes the specified AddPublisherPublicKeys message. Does not implicitly {@link pyth_lazer_transaction.AddPublisherPublicKeys.verify|verify} messages. - * @param message AddPublisherPublicKeys message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IAddPublisherPublicKeys, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AddPublisherPublicKeys message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddPublisherPublicKeys.verify|verify} messages. - * @param message AddPublisherPublicKeys message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IAddPublisherPublicKeys, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AddPublisherPublicKeys message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AddPublisherPublicKeys - * @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): pyth_lazer_transaction.AddPublisherPublicKeys; - - /** - * Decodes an AddPublisherPublicKeys message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AddPublisherPublicKeys - * @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)): pyth_lazer_transaction.AddPublisherPublicKeys; - - /** - * Verifies an AddPublisherPublicKeys 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 AddPublisherPublicKeys message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AddPublisherPublicKeys - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.AddPublisherPublicKeys; - - /** - * Creates a plain object from an AddPublisherPublicKeys message. Also converts values to other types if specified. - * @param message AddPublisherPublicKeys - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.AddPublisherPublicKeys, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AddPublisherPublicKeys to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AddPublisherPublicKeys - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RemovePublisherPublicKeys. */ - interface IRemovePublisherPublicKeys { - - /** RemovePublisherPublicKeys publicKeys */ - publicKeys?: (Uint8Array[]|null); - } - - /** Represents a RemovePublisherPublicKeys. */ - class RemovePublisherPublicKeys implements IRemovePublisherPublicKeys { - - /** - * Constructs a new RemovePublisherPublicKeys. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IRemovePublisherPublicKeys); - - /** RemovePublisherPublicKeys publicKeys. */ - public publicKeys: Uint8Array[]; - - /** - * Creates a new RemovePublisherPublicKeys instance using the specified properties. - * @param [properties] Properties to set - * @returns RemovePublisherPublicKeys instance - */ - public static create(properties?: pyth_lazer_transaction.IRemovePublisherPublicKeys): pyth_lazer_transaction.RemovePublisherPublicKeys; - - /** - * Encodes the specified RemovePublisherPublicKeys message. Does not implicitly {@link pyth_lazer_transaction.RemovePublisherPublicKeys.verify|verify} messages. - * @param message RemovePublisherPublicKeys message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IRemovePublisherPublicKeys, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RemovePublisherPublicKeys message, length delimited. Does not implicitly {@link pyth_lazer_transaction.RemovePublisherPublicKeys.verify|verify} messages. - * @param message RemovePublisherPublicKeys message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IRemovePublisherPublicKeys, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RemovePublisherPublicKeys message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RemovePublisherPublicKeys - * @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): pyth_lazer_transaction.RemovePublisherPublicKeys; - - /** - * Decodes a RemovePublisherPublicKeys message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RemovePublisherPublicKeys - * @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)): pyth_lazer_transaction.RemovePublisherPublicKeys; - - /** - * Verifies a RemovePublisherPublicKeys 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 RemovePublisherPublicKeys message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RemovePublisherPublicKeys - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.RemovePublisherPublicKeys; - - /** - * Creates a plain object from a RemovePublisherPublicKeys message. Also converts values to other types if specified. - * @param message RemovePublisherPublicKeys - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.RemovePublisherPublicKeys, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RemovePublisherPublicKeys to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RemovePublisherPublicKeys - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetPublisherPublicKeys. */ - interface ISetPublisherPublicKeys { - - /** SetPublisherPublicKeys publicKeys */ - publicKeys?: (Uint8Array[]|null); - } - - /** Represents a SetPublisherPublicKeys. */ - class SetPublisherPublicKeys implements ISetPublisherPublicKeys { - - /** - * Constructs a new SetPublisherPublicKeys. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.ISetPublisherPublicKeys); - - /** SetPublisherPublicKeys publicKeys. */ - public publicKeys: Uint8Array[]; - - /** - * Creates a new SetPublisherPublicKeys instance using the specified properties. - * @param [properties] Properties to set - * @returns SetPublisherPublicKeys instance - */ - public static create(properties?: pyth_lazer_transaction.ISetPublisherPublicKeys): pyth_lazer_transaction.SetPublisherPublicKeys; - - /** - * Encodes the specified SetPublisherPublicKeys message. Does not implicitly {@link pyth_lazer_transaction.SetPublisherPublicKeys.verify|verify} messages. - * @param message SetPublisherPublicKeys message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.ISetPublisherPublicKeys, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetPublisherPublicKeys message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetPublisherPublicKeys.verify|verify} messages. - * @param message SetPublisherPublicKeys message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.ISetPublisherPublicKeys, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetPublisherPublicKeys message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetPublisherPublicKeys - * @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): pyth_lazer_transaction.SetPublisherPublicKeys; - - /** - * Decodes a SetPublisherPublicKeys message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetPublisherPublicKeys - * @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)): pyth_lazer_transaction.SetPublisherPublicKeys; - - /** - * Verifies a SetPublisherPublicKeys 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 SetPublisherPublicKeys message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetPublisherPublicKeys - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.SetPublisherPublicKeys; - - /** - * Creates a plain object from a SetPublisherPublicKeys message. Also converts values to other types if specified. - * @param message SetPublisherPublicKeys - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.SetPublisherPublicKeys, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetPublisherPublicKeys to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetPublisherPublicKeys - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetPublisherActive. */ - interface ISetPublisherActive { - - /** SetPublisherActive isActive */ - isActive?: (boolean|null); - } - - /** Represents a SetPublisherActive. */ - class SetPublisherActive implements ISetPublisherActive { - - /** - * Constructs a new SetPublisherActive. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.ISetPublisherActive); - - /** SetPublisherActive isActive. */ - public isActive?: (boolean|null); - - /** SetPublisherActive _isActive. */ - public _isActive?: "isActive"; - - /** - * Creates a new SetPublisherActive instance using the specified properties. - * @param [properties] Properties to set - * @returns SetPublisherActive instance - */ - public static create(properties?: pyth_lazer_transaction.ISetPublisherActive): pyth_lazer_transaction.SetPublisherActive; - - /** - * Encodes the specified SetPublisherActive message. Does not implicitly {@link pyth_lazer_transaction.SetPublisherActive.verify|verify} messages. - * @param message SetPublisherActive message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.ISetPublisherActive, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetPublisherActive message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetPublisherActive.verify|verify} messages. - * @param message SetPublisherActive message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.ISetPublisherActive, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetPublisherActive message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetPublisherActive - * @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): pyth_lazer_transaction.SetPublisherActive; - - /** - * Decodes a SetPublisherActive message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetPublisherActive - * @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)): pyth_lazer_transaction.SetPublisherActive; - - /** - * Verifies a SetPublisherActive 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 SetPublisherActive message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetPublisherActive - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.SetPublisherActive; - - /** - * Creates a plain object from a SetPublisherActive message. Also converts values to other types if specified. - * @param message SetPublisherActive - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.SetPublisherActive, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetPublisherActive to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetPublisherActive - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AddFeed. */ - interface IAddFeed { - - /** AddFeed feedId */ - feedId?: (number|null); - - /** AddFeed metadata */ - metadata?: (pyth_lazer_transaction.DynamicValue.IMap|null); - - /** AddFeed permissionedPublishers */ - permissionedPublishers?: (number[]|null); - } - - /** Represents an AddFeed. */ - class AddFeed implements IAddFeed { - - /** - * Constructs a new AddFeed. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IAddFeed); - - /** AddFeed feedId. */ - public feedId?: (number|null); - - /** AddFeed metadata. */ - public metadata?: (pyth_lazer_transaction.DynamicValue.IMap|null); - - /** AddFeed permissionedPublishers. */ - public permissionedPublishers: number[]; - - /** AddFeed _feedId. */ - public _feedId?: "feedId"; - - /** AddFeed _metadata. */ - public _metadata?: "metadata"; - - /** - * Creates a new AddFeed instance using the specified properties. - * @param [properties] Properties to set - * @returns AddFeed instance - */ - public static create(properties?: pyth_lazer_transaction.IAddFeed): pyth_lazer_transaction.AddFeed; - - /** - * Encodes the specified AddFeed message. Does not implicitly {@link pyth_lazer_transaction.AddFeed.verify|verify} messages. - * @param message AddFeed message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IAddFeed, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AddFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddFeed.verify|verify} messages. - * @param message AddFeed message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IAddFeed, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AddFeed message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AddFeed - * @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): pyth_lazer_transaction.AddFeed; - - /** - * Decodes an AddFeed message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AddFeed - * @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)): pyth_lazer_transaction.AddFeed; - - /** - * Verifies an AddFeed 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 AddFeed message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AddFeed - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.AddFeed; - - /** - * Creates a plain object from an AddFeed message. Also converts values to other types if specified. - * @param message AddFeed - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.AddFeed, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AddFeed to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AddFeed - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateFeed. */ - interface IUpdateFeed { - - /** UpdateFeed feedId */ - feedId?: (number|null); - - /** UpdateFeed updateFeedMetadata */ - updateFeedMetadata?: (pyth_lazer_transaction.IUpdateFeedMetadata|null); - - /** UpdateFeed activateFeed */ - activateFeed?: (pyth_lazer_transaction.IActivateFeed|null); - - /** UpdateFeed deactivateFeed */ - deactivateFeed?: (pyth_lazer_transaction.IDeactivateFeed|null); - - /** UpdateFeed removeFeed */ - removeFeed?: (google.protobuf.IEmpty|null); - } - - /** Represents an UpdateFeed. */ - class UpdateFeed implements IUpdateFeed { - - /** - * Constructs a new UpdateFeed. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IUpdateFeed); - - /** UpdateFeed feedId. */ - public feedId?: (number|null); - - /** UpdateFeed updateFeedMetadata. */ - public updateFeedMetadata?: (pyth_lazer_transaction.IUpdateFeedMetadata|null); - - /** UpdateFeed activateFeed. */ - public activateFeed?: (pyth_lazer_transaction.IActivateFeed|null); - - /** UpdateFeed deactivateFeed. */ - public deactivateFeed?: (pyth_lazer_transaction.IDeactivateFeed|null); - - /** UpdateFeed removeFeed. */ - public removeFeed?: (google.protobuf.IEmpty|null); - - /** UpdateFeed _feedId. */ - public _feedId?: "feedId"; - - /** UpdateFeed action. */ - public action?: ("updateFeedMetadata"|"activateFeed"|"deactivateFeed"|"removeFeed"); - - /** - * Creates a new UpdateFeed instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateFeed instance - */ - public static create(properties?: pyth_lazer_transaction.IUpdateFeed): pyth_lazer_transaction.UpdateFeed; - - /** - * Encodes the specified UpdateFeed message. Does not implicitly {@link pyth_lazer_transaction.UpdateFeed.verify|verify} messages. - * @param message UpdateFeed message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IUpdateFeed, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdateFeed.verify|verify} messages. - * @param message UpdateFeed message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IUpdateFeed, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateFeed message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateFeed - * @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): pyth_lazer_transaction.UpdateFeed; - - /** - * Decodes an UpdateFeed message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateFeed - * @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)): pyth_lazer_transaction.UpdateFeed; - - /** - * Verifies an UpdateFeed 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 UpdateFeed message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateFeed - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.UpdateFeed; - - /** - * Creates a plain object from an UpdateFeed message. Also converts values to other types if specified. - * @param message UpdateFeed - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.UpdateFeed, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateFeed to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateFeed - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateFeedMetadata. */ - interface IUpdateFeedMetadata { - - /** UpdateFeedMetadata name */ - name?: (string|null); - - /** UpdateFeedMetadata value */ - value?: (pyth_lazer_transaction.IDynamicValue|null); - } - - /** Represents an UpdateFeedMetadata. */ - class UpdateFeedMetadata implements IUpdateFeedMetadata { - - /** - * Constructs a new UpdateFeedMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IUpdateFeedMetadata); - - /** UpdateFeedMetadata name. */ - public name?: (string|null); - - /** UpdateFeedMetadata value. */ - public value?: (pyth_lazer_transaction.IDynamicValue|null); - - /** UpdateFeedMetadata _name. */ - public _name?: "name"; - - /** UpdateFeedMetadata _value. */ - public _value?: "value"; - - /** - * Creates a new UpdateFeedMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateFeedMetadata instance - */ - public static create(properties?: pyth_lazer_transaction.IUpdateFeedMetadata): pyth_lazer_transaction.UpdateFeedMetadata; - - /** - * Encodes the specified UpdateFeedMetadata message. Does not implicitly {@link pyth_lazer_transaction.UpdateFeedMetadata.verify|verify} messages. - * @param message UpdateFeedMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IUpdateFeedMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateFeedMetadata message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdateFeedMetadata.verify|verify} messages. - * @param message UpdateFeedMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IUpdateFeedMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateFeedMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateFeedMetadata - * @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): pyth_lazer_transaction.UpdateFeedMetadata; - - /** - * Decodes an UpdateFeedMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateFeedMetadata - * @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)): pyth_lazer_transaction.UpdateFeedMetadata; - - /** - * Verifies an UpdateFeedMetadata 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 UpdateFeedMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateFeedMetadata - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.UpdateFeedMetadata; - - /** - * Creates a plain object from an UpdateFeedMetadata message. Also converts values to other types if specified. - * @param message UpdateFeedMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.UpdateFeedMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateFeedMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateFeedMetadata - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ActivateFeed. */ - interface IActivateFeed { - - /** ActivateFeed activationTimestamp */ - activationTimestamp?: (google.protobuf.ITimestamp|null); - } - - /** Represents an ActivateFeed. */ - class ActivateFeed implements IActivateFeed { - - /** - * Constructs a new ActivateFeed. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IActivateFeed); - - /** ActivateFeed activationTimestamp. */ - public activationTimestamp?: (google.protobuf.ITimestamp|null); - - /** ActivateFeed _activationTimestamp. */ - public _activationTimestamp?: "activationTimestamp"; - - /** - * Creates a new ActivateFeed instance using the specified properties. - * @param [properties] Properties to set - * @returns ActivateFeed instance - */ - public static create(properties?: pyth_lazer_transaction.IActivateFeed): pyth_lazer_transaction.ActivateFeed; - - /** - * Encodes the specified ActivateFeed message. Does not implicitly {@link pyth_lazer_transaction.ActivateFeed.verify|verify} messages. - * @param message ActivateFeed message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IActivateFeed, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ActivateFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ActivateFeed.verify|verify} messages. - * @param message ActivateFeed message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IActivateFeed, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ActivateFeed message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ActivateFeed - * @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): pyth_lazer_transaction.ActivateFeed; - - /** - * Decodes an ActivateFeed message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ActivateFeed - * @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)): pyth_lazer_transaction.ActivateFeed; - - /** - * Verifies an ActivateFeed 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 ActivateFeed message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ActivateFeed - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.ActivateFeed; - - /** - * Creates a plain object from an ActivateFeed message. Also converts values to other types if specified. - * @param message ActivateFeed - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.ActivateFeed, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ActivateFeed to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ActivateFeed - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeactivateFeed. */ - interface IDeactivateFeed { - - /** DeactivateFeed deactivationTimestamp */ - deactivationTimestamp?: (google.protobuf.ITimestamp|null); +/** Namespace google. */ +export namespace google { + /** Namespace protobuf. */ + namespace protobuf { + /** Properties of a Timestamp. */ + interface ITimestamp { + /** Timestamp seconds */ + seconds?: number | Long | null; + + /** Timestamp nanos */ + nanos?: number | null; } - /** Represents a DeactivateFeed. */ - class DeactivateFeed implements IDeactivateFeed { - - /** - * Constructs a new DeactivateFeed. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IDeactivateFeed); - - /** DeactivateFeed deactivationTimestamp. */ - public deactivationTimestamp?: (google.protobuf.ITimestamp|null); - - /** DeactivateFeed _deactivationTimestamp. */ - public _deactivationTimestamp?: "deactivationTimestamp"; - - /** - * Creates a new DeactivateFeed instance using the specified properties. - * @param [properties] Properties to set - * @returns DeactivateFeed instance - */ - public static create(properties?: pyth_lazer_transaction.IDeactivateFeed): pyth_lazer_transaction.DeactivateFeed; - - /** - * Encodes the specified DeactivateFeed message. Does not implicitly {@link pyth_lazer_transaction.DeactivateFeed.verify|verify} messages. - * @param message DeactivateFeed message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IDeactivateFeed, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeactivateFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DeactivateFeed.verify|verify} messages. - * @param message DeactivateFeed message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IDeactivateFeed, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeactivateFeed message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeactivateFeed - * @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): pyth_lazer_transaction.DeactivateFeed; - - /** - * Decodes a DeactivateFeed message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeactivateFeed - * @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)): pyth_lazer_transaction.DeactivateFeed; - - /** - * Verifies a DeactivateFeed 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 DeactivateFeed message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeactivateFeed - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.DeactivateFeed; - - /** - * Creates a plain object from a DeactivateFeed message. Also converts values to other types if specified. - * @param message DeactivateFeed - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.DeactivateFeed, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeactivateFeed to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeactivateFeed - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { + /** + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ITimestamp); + + /** Timestamp seconds. */ + public seconds: number | Long; + + /** Timestamp nanos. */ + public nanos: number; + + /** + * Creates a new Timestamp instance using the specified properties. + * @param [properties] Properties to set + * @returns Timestamp instance + */ + public static create( + properties?: google.protobuf.ITimestamp, + ): google.protobuf.Timestamp; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: google.protobuf.ITimestamp, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: google.protobuf.ITimestamp, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Timestamp + * @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.Timestamp; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Timestamp + * @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.Timestamp; + + /** + * Verifies a Timestamp 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 Timestamp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Timestamp + */ + public static fromObject(object: { + [k: string]: any; + }): google.protobuf.Timestamp; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @param message Timestamp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: google.protobuf.Timestamp, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Timestamp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Timestamp + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DynamicValue. */ - interface IDynamicValue { - - /** DynamicValue stringValue */ - stringValue?: (string|null); - - /** DynamicValue doubleValue */ - doubleValue?: (number|null); - - /** DynamicValue uintValue */ - uintValue?: (number|Long|null); - - /** DynamicValue intValue */ - intValue?: (number|Long|null); - - /** DynamicValue boolValue */ - boolValue?: (boolean|null); - - /** DynamicValue bytesValue */ - bytesValue?: (Uint8Array|null); + /** Properties of a Duration. */ + interface IDuration { + /** Duration seconds */ + seconds?: number | Long | null; - /** DynamicValue durationValue */ - durationValue?: (google.protobuf.IDuration|null); - - /** DynamicValue timestampValue */ - timestampValue?: (google.protobuf.ITimestamp|null); - - /** DynamicValue list */ - list?: (pyth_lazer_transaction.DynamicValue.IList|null); - - /** DynamicValue map */ - map?: (pyth_lazer_transaction.DynamicValue.IMap|null); - } - - /** Represents a DynamicValue. */ - class DynamicValue implements IDynamicValue { - - /** - * Constructs a new DynamicValue. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IDynamicValue); - - /** DynamicValue stringValue. */ - public stringValue?: (string|null); - - /** DynamicValue doubleValue. */ - public doubleValue?: (number|null); - - /** DynamicValue uintValue. */ - public uintValue?: (number|Long|null); - - /** DynamicValue intValue. */ - public intValue?: (number|Long|null); - - /** DynamicValue boolValue. */ - public boolValue?: (boolean|null); - - /** DynamicValue bytesValue. */ - public bytesValue?: (Uint8Array|null); - - /** DynamicValue durationValue. */ - public durationValue?: (google.protobuf.IDuration|null); - - /** DynamicValue timestampValue. */ - public timestampValue?: (google.protobuf.ITimestamp|null); - - /** DynamicValue list. */ - public list?: (pyth_lazer_transaction.DynamicValue.IList|null); - - /** DynamicValue map. */ - public map?: (pyth_lazer_transaction.DynamicValue.IMap|null); - - /** DynamicValue value. */ - public value?: ("stringValue"|"doubleValue"|"uintValue"|"intValue"|"boolValue"|"bytesValue"|"durationValue"|"timestampValue"|"list"|"map"); - - /** - * Creates a new DynamicValue instance using the specified properties. - * @param [properties] Properties to set - * @returns DynamicValue instance - */ - public static create(properties?: pyth_lazer_transaction.IDynamicValue): pyth_lazer_transaction.DynamicValue; - - /** - * Encodes the specified DynamicValue message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.verify|verify} messages. - * @param message DynamicValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IDynamicValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DynamicValue message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.verify|verify} messages. - * @param message DynamicValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IDynamicValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DynamicValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DynamicValue - * @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): pyth_lazer_transaction.DynamicValue; - - /** - * Decodes a DynamicValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DynamicValue - * @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)): pyth_lazer_transaction.DynamicValue; - - /** - * Verifies a DynamicValue 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 DynamicValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DynamicValue - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.DynamicValue; - - /** - * Creates a plain object from a DynamicValue message. Also converts values to other types if specified. - * @param message DynamicValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.DynamicValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DynamicValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DynamicValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** Duration nanos */ + nanos?: number | null; } - namespace DynamicValue { - - /** Properties of a List. */ - interface IList { - - /** List items */ - items?: (pyth_lazer_transaction.IDynamicValue[]|null); - } - - /** Represents a List. */ - class List implements IList { - - /** - * Constructs a new List. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.DynamicValue.IList); - - /** List items. */ - public items: pyth_lazer_transaction.IDynamicValue[]; - - /** - * Creates a new List instance using the specified properties. - * @param [properties] Properties to set - * @returns List instance - */ - public static create(properties?: pyth_lazer_transaction.DynamicValue.IList): pyth_lazer_transaction.DynamicValue.List; - - /** - * Encodes the specified List message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.List.verify|verify} messages. - * @param message List message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.DynamicValue.IList, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified List message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.List.verify|verify} messages. - * @param message List message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.DynamicValue.IList, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a List message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns List - * @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): pyth_lazer_transaction.DynamicValue.List; - - /** - * Decodes a List message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns List - * @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)): pyth_lazer_transaction.DynamicValue.List; - - /** - * Verifies a List 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 List message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns List - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.DynamicValue.List; - - /** - * Creates a plain object from a List message. Also converts values to other types if specified. - * @param message List - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.DynamicValue.List, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this List to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for List - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MapItem. */ - interface IMapItem { - - /** MapItem key */ - key?: (string|null); - - /** MapItem value */ - value?: (pyth_lazer_transaction.IDynamicValue|null); - } - - /** Represents a MapItem. */ - class MapItem implements IMapItem { - - /** - * Constructs a new MapItem. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.DynamicValue.IMapItem); - - /** MapItem key. */ - public key?: (string|null); - - /** MapItem value. */ - public value?: (pyth_lazer_transaction.IDynamicValue|null); - - /** MapItem _key. */ - public _key?: "key"; - - /** MapItem _value. */ - public _value?: "value"; - - /** - * Creates a new MapItem instance using the specified properties. - * @param [properties] Properties to set - * @returns MapItem instance - */ - public static create(properties?: pyth_lazer_transaction.DynamicValue.IMapItem): pyth_lazer_transaction.DynamicValue.MapItem; - - /** - * Encodes the specified MapItem message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.MapItem.verify|verify} messages. - * @param message MapItem message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.DynamicValue.IMapItem, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MapItem message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.MapItem.verify|verify} messages. - * @param message MapItem message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.DynamicValue.IMapItem, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MapItem message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MapItem - * @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): pyth_lazer_transaction.DynamicValue.MapItem; - - /** - * Decodes a MapItem message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MapItem - * @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)): pyth_lazer_transaction.DynamicValue.MapItem; - - /** - * Verifies a MapItem 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 MapItem message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MapItem - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.DynamicValue.MapItem; - - /** - * Creates a plain object from a MapItem message. Also converts values to other types if specified. - * @param message MapItem - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.DynamicValue.MapItem, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MapItem to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MapItem - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Map. */ - interface IMap { - - /** Map items */ - items?: (pyth_lazer_transaction.DynamicValue.IMapItem[]|null); - } - - /** Represents a Map. */ - class Map implements IMap { - - /** - * Constructs a new Map. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.DynamicValue.IMap); - - /** Map items. */ - public items: pyth_lazer_transaction.DynamicValue.IMapItem[]; - - /** - * Creates a new Map instance using the specified properties. - * @param [properties] Properties to set - * @returns Map instance - */ - public static create(properties?: pyth_lazer_transaction.DynamicValue.IMap): pyth_lazer_transaction.DynamicValue.Map; - - /** - * Encodes the specified Map message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.Map.verify|verify} messages. - * @param message Map message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.DynamicValue.IMap, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Map message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.Map.verify|verify} messages. - * @param message Map message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.DynamicValue.IMap, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Map message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Map - * @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): pyth_lazer_transaction.DynamicValue.Map; - - /** - * Decodes a Map message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Map - * @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)): pyth_lazer_transaction.DynamicValue.Map; - - /** - * Verifies a Map 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 Map message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Map - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.DynamicValue.Map; - - /** - * Creates a plain object from a Map message. Also converts values to other types if specified. - * @param message Map - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.DynamicValue.Map, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Map to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Map - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** Represents a Duration. */ + class Duration implements IDuration { + /** + * Constructs a new Duration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDuration); + + /** Duration seconds. */ + public seconds: number | Long; + + /** Duration nanos. */ + public nanos: number; + + /** + * Creates a new Duration instance using the specified properties. + * @param [properties] Properties to set + * @returns Duration instance + */ + public static create( + properties?: google.protobuf.IDuration, + ): google.protobuf.Duration; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: google.protobuf.IDuration, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: google.protobuf.IDuration, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Duration + * @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.Duration; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Duration + * @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.Duration; + + /** + * Verifies a Duration 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 Duration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Duration + */ + public static fromObject(object: { + [k: string]: any; + }): google.protobuf.Duration; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @param message Duration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: google.protobuf.Duration, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Duration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Duration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } -} - -/** Namespace google. */ -export namespace google { - /** Namespace protobuf. */ - namespace protobuf { - - /** Properties of a Timestamp. */ - interface ITimestamp { - - /** Timestamp seconds */ - seconds?: (number|Long|null); - - /** Timestamp nanos */ - nanos?: (number|null); - } - - /** Represents a Timestamp. */ - class Timestamp implements ITimestamp { - - /** - * Constructs a new Timestamp. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ITimestamp); - - /** Timestamp seconds. */ - public seconds: (number|Long); - - /** Timestamp nanos. */ - public nanos: number; - - /** - * Creates a new Timestamp instance using the specified properties. - * @param [properties] Properties to set - * @returns Timestamp instance - */ - public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; - - /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Timestamp message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Timestamp - * @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.Timestamp; - - /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Timestamp - * @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.Timestamp; - - /** - * Verifies a Timestamp 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 Timestamp message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Timestamp - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; - - /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @param message Timestamp - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Timestamp to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Timestamp - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Duration. */ - interface IDuration { - - /** Duration seconds */ - seconds?: (number|Long|null); - - /** Duration nanos */ - nanos?: (number|null); - } - - /** Represents a Duration. */ - class Duration implements IDuration { - - /** - * Constructs a new Duration. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDuration); - - /** Duration seconds. */ - public seconds: (number|Long); - - /** Duration nanos. */ - public nanos: number; - - /** - * Creates a new Duration instance using the specified properties. - * @param [properties] Properties to set - * @returns Duration instance - */ - public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; - - /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Duration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Duration - * @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.Duration; - - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Duration - * @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.Duration; - - /** - * Verifies a Duration 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 Duration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Duration - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; - - /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @param message Duration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Duration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Duration - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** 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 }; - - /** - * Gets the default type url for Empty - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** 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 }; + + /** + * Gets the default type url for Empty + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } + } } diff --git a/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/lazer_functions.ts b/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/lazer_functions.ts index eb5718dc20..d4618a480c 100644 --- a/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/lazer_functions.ts +++ b/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/lazer_functions.ts @@ -17,7 +17,7 @@ import { pyth_lazer_transaction } from "./generated/governance_instruction"; * @returns IMap compatible object for protobuf */ export function convertLazerFeedMetadataToMap( - metadata: LazerFeedMetadata + metadata: LazerFeedMetadata, ): pyth_lazer_transaction.DynamicValue.IMap { // Use protobufjs fromObject to handle the conversion automatically const mapData = { @@ -25,8 +25,8 @@ export function convertLazerFeedMetadataToMap( .filter(([_, value]) => value !== undefined) .map(([key, value]) => ({ key, - value - })) + value, + })), }; return pyth_lazer_transaction.DynamicValue.Map.fromObject(mapData); @@ -367,7 +367,8 @@ export async function generateInstructions( metadata: convertLazerFeedMetadataToMap(feedMetadata), permissionedPublishers: [], }); - const encoded = pyth_lazer_transaction.AddFeed.encode(addFeedMessage).finish(); + const encoded = + pyth_lazer_transaction.AddFeed.encode(addFeedMessage).finish(); governanceBuffer = Buffer.from(encoded); } } From 16b278af0c4111f91097a50b3414943865dedc50 Mon Sep 17 00:00:00 2001 From: Daniel Chew Date: Tue, 27 May 2025 20:35:17 +0900 Subject: [PATCH 14/27] fix: ci --- governance/xc_admin/packages/xc_admin_common/package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/governance/xc_admin/packages/xc_admin_common/package.json b/governance/xc_admin/packages/xc_admin_common/package.json index 4a8d63c4b9..37d62065d2 100644 --- a/governance/xc_admin/packages/xc_admin_common/package.json +++ b/governance/xc_admin/packages/xc_admin_common/package.json @@ -15,9 +15,10 @@ "url": "https://github.com/pyth-network/pyth-crosschain/issues" }, "scripts": { - "build": "tsc", + "build": "tsc && pnpm build:copy-generated", "build:pbjs": "npx pbjs -t static-module -w es6 -o src/programs/lazer/generated/governance_instruction.js ../../../../lazer/publisher_sdk/proto/governance_instruction.proto ../../../../lazer/publisher_sdk/proto/dynamic_value.proto", "build:pbts": "npx pbts -o src/programs/lazer/generated/governance_instruction.d.ts src/programs/lazer/generated/governance_instruction.js", + "build:copy-generated": "mkdir -p lib/programs/lazer/generated && cp src/programs/lazer/generated/governance_instruction.* lib/programs/lazer/generated/", "test:unit": "jest", "fix:format": "prettier --write \"src/**/*.ts\"", "test:format": "prettier --check \"src/**/*.ts\"" From 166cad3288fe23cdb4240b777e6d91e7719b076b Mon Sep 17 00:00:00 2001 From: Daniel Chew Date: Tue, 27 May 2025 20:52:14 +0900 Subject: [PATCH 15/27] fix: ci --- .../xc_admin/packages/xc_admin_common/package.json | 2 +- turbo.json | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/governance/xc_admin/packages/xc_admin_common/package.json b/governance/xc_admin/packages/xc_admin_common/package.json index 37d62065d2..900688e94d 100644 --- a/governance/xc_admin/packages/xc_admin_common/package.json +++ b/governance/xc_admin/packages/xc_admin_common/package.json @@ -15,7 +15,7 @@ "url": "https://github.com/pyth-network/pyth-crosschain/issues" }, "scripts": { - "build": "tsc && pnpm build:copy-generated", + "build": "tsc", "build:pbjs": "npx pbjs -t static-module -w es6 -o src/programs/lazer/generated/governance_instruction.js ../../../../lazer/publisher_sdk/proto/governance_instruction.proto ../../../../lazer/publisher_sdk/proto/dynamic_value.proto", "build:pbts": "npx pbts -o src/programs/lazer/generated/governance_instruction.d.ts src/programs/lazer/generated/governance_instruction.js", "build:copy-generated": "mkdir -p lib/programs/lazer/generated && cp src/programs/lazer/generated/governance_instruction.* lib/programs/lazer/generated/", diff --git a/turbo.json b/turbo.json index 6d80bb431e..8693154525 100644 --- a/turbo.json +++ b/turbo.json @@ -58,7 +58,7 @@ "^build", "build:cjs", "build:esm", - "build:pbts" + "build:copy-generated" ], "inputs": [ "$TURBO_DEFAULT$", @@ -132,6 +132,14 @@ ], "outputs": ["src/programs/lazer/generated/governance_instruction.d.ts"] }, + "build:copy-generated": { + "dependsOn": ["//#install:modules", "build:pbts"], + "inputs": [ + "src/programs/lazer/generated/governance_instruction.d.ts", + "src/programs/lazer/generated/governance_instruction.js" + ], + "outputs": ["lib/programs/lazer/generated/governance_instruction.d.ts", "lib/programs/lazer/generated/governance_instruction.js"] + }, "fix": { "dependsOn": ["fix:lint", "fix:format"], "cache": false From cdc2f33c81aab5a63cfd78a97e88956441296972 Mon Sep 17 00:00:00 2001 From: Daniel Chew Date: Tue, 27 May 2025 21:04:50 +0900 Subject: [PATCH 16/27] fix: ci --- turbo.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/turbo.json b/turbo.json index 8693154525..854b817fd7 100644 --- a/turbo.json +++ b/turbo.json @@ -138,7 +138,10 @@ "src/programs/lazer/generated/governance_instruction.d.ts", "src/programs/lazer/generated/governance_instruction.js" ], - "outputs": ["lib/programs/lazer/generated/governance_instruction.d.ts", "lib/programs/lazer/generated/governance_instruction.js"] + "outputs": [ + "lib/programs/lazer/generated/governance_instruction.d.ts", + "lib/programs/lazer/generated/governance_instruction.js" + ] }, "fix": { "dependsOn": ["fix:lint", "fix:format"], From 77e6f4a2d988a13ce6a5edf53de843aca31101e1 Mon Sep 17 00:00:00 2001 From: Daniel Chew Date: Thu, 29 May 2025 17:14:48 +0900 Subject: [PATCH 17/27] feat: add Lazer State SDK and update TypeScript configurations --- .../packages/xc_admin_common/package.json | 5 +- .../generated/governance_instruction.d.ts | 4522 ------- .../src/programs/lazer/lazer_functions.ts | 2 +- .../packages/xc_admin_common/tsconfig.json | 4 +- .../packages/xc_admin_frontend/package.json | 1 + .../packages/xc_admin_frontend/tsconfig.json | 4 +- lazer/state_sdk/js/package.json | 43 + .../src/generated/governance_instruction.cjs | 10279 ++++++++++++++++ .../src/generated/governance_instruction.d.ts | 3925 ++++++ .../src}/generated/governance_instruction.js | 0 lazer/state_sdk/js/src/generated/state.cjs | 3407 +++++ lazer/state_sdk/js/src/generated/state.d.ts | 1127 ++ lazer/state_sdk/js/src/generated/state.js | 3405 +++++ lazer/state_sdk/js/tsconfig.json | 10 + pnpm-lock.yaml | 21 +- pnpm-workspace.yaml | 1 + turbo.json | 32 +- 17 files changed, 22234 insertions(+), 4554 deletions(-) delete mode 100644 governance/xc_admin/packages/xc_admin_common/src/programs/lazer/generated/governance_instruction.d.ts create mode 100644 lazer/state_sdk/js/package.json create mode 100644 lazer/state_sdk/js/src/generated/governance_instruction.cjs create mode 100644 lazer/state_sdk/js/src/generated/governance_instruction.d.ts rename {governance/xc_admin/packages/xc_admin_common/src/programs/lazer => lazer/state_sdk/js/src}/generated/governance_instruction.js (100%) create mode 100644 lazer/state_sdk/js/src/generated/state.cjs create mode 100644 lazer/state_sdk/js/src/generated/state.d.ts create mode 100644 lazer/state_sdk/js/src/generated/state.js create mode 100644 lazer/state_sdk/js/tsconfig.json diff --git a/governance/xc_admin/packages/xc_admin_common/package.json b/governance/xc_admin/packages/xc_admin_common/package.json index 900688e94d..d0ffa22284 100644 --- a/governance/xc_admin/packages/xc_admin_common/package.json +++ b/governance/xc_admin/packages/xc_admin_common/package.json @@ -16,9 +16,6 @@ }, "scripts": { "build": "tsc", - "build:pbjs": "npx pbjs -t static-module -w es6 -o src/programs/lazer/generated/governance_instruction.js ../../../../lazer/publisher_sdk/proto/governance_instruction.proto ../../../../lazer/publisher_sdk/proto/dynamic_value.proto", - "build:pbts": "npx pbts -o src/programs/lazer/generated/governance_instruction.d.ts src/programs/lazer/generated/governance_instruction.js", - "build:copy-generated": "mkdir -p lib/programs/lazer/generated && cp src/programs/lazer/generated/governance_instruction.* lib/programs/lazer/generated/", "test:unit": "jest", "fix:format": "prettier --write \"src/**/*.ts\"", "test:format": "prettier --check \"src/**/*.ts\"" @@ -37,6 +34,7 @@ "@pythnetwork/pyth-lazer-sdk": "workspace:*", "@pythnetwork/pyth-solana-receiver": "workspace:*", "@pythnetwork/solana-utils": "workspace:*", + "@pythnetwork/pyth-lazer-state-sdk": "workspace:*", "@solana/buffer-layout": "^4.0.1", "@solana/web3.js": "^1.73.0", "@sqds/mesh": "^1.0.6", @@ -54,7 +52,6 @@ "fast-check": "^3.10.0", "jest": "^29.3.1", "prettier": "catalog:", - "protobufjs-cli": "^1.1.3", "ts-jest": "^29.0.3" } } diff --git a/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/generated/governance_instruction.d.ts b/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/generated/governance_instruction.d.ts deleted file mode 100644 index 144f35e0d0..0000000000 --- a/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/generated/governance_instruction.d.ts +++ /dev/null @@ -1,4522 +0,0 @@ -import * as $protobuf from "protobufjs"; -import Long = require("long"); -/** Namespace pyth_lazer_transaction. */ -export namespace pyth_lazer_transaction { - /** Properties of a GovernanceInstruction. */ - interface IGovernanceInstruction { - /** GovernanceInstruction directives */ - directives?: pyth_lazer_transaction.IGovernanceDirective[] | null; - - /** GovernanceInstruction minExecutionTimestamp */ - minExecutionTimestamp?: google.protobuf.ITimestamp | null; - - /** GovernanceInstruction maxExecutionTimestamp */ - maxExecutionTimestamp?: google.protobuf.ITimestamp | null; - - /** GovernanceInstruction governanceSequenceNo */ - governanceSequenceNo?: number | null; - } - - /** Represents a GovernanceInstruction. */ - class GovernanceInstruction implements IGovernanceInstruction { - /** - * Constructs a new GovernanceInstruction. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IGovernanceInstruction); - - /** GovernanceInstruction directives. */ - public directives: pyth_lazer_transaction.IGovernanceDirective[]; - - /** GovernanceInstruction minExecutionTimestamp. */ - public minExecutionTimestamp?: google.protobuf.ITimestamp | null; - - /** GovernanceInstruction maxExecutionTimestamp. */ - public maxExecutionTimestamp?: google.protobuf.ITimestamp | null; - - /** GovernanceInstruction governanceSequenceNo. */ - public governanceSequenceNo?: number | null; - - /** GovernanceInstruction _minExecutionTimestamp. */ - public _minExecutionTimestamp?: "minExecutionTimestamp"; - - /** GovernanceInstruction _maxExecutionTimestamp. */ - public _maxExecutionTimestamp?: "maxExecutionTimestamp"; - - /** GovernanceInstruction _governanceSequenceNo. */ - public _governanceSequenceNo?: "governanceSequenceNo"; - - /** - * Creates a new GovernanceInstruction instance using the specified properties. - * @param [properties] Properties to set - * @returns GovernanceInstruction instance - */ - public static create( - properties?: pyth_lazer_transaction.IGovernanceInstruction, - ): pyth_lazer_transaction.GovernanceInstruction; - - /** - * Encodes the specified GovernanceInstruction message. Does not implicitly {@link pyth_lazer_transaction.GovernanceInstruction.verify|verify} messages. - * @param message GovernanceInstruction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.IGovernanceInstruction, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified GovernanceInstruction message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceInstruction.verify|verify} messages. - * @param message GovernanceInstruction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.IGovernanceInstruction, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a GovernanceInstruction message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GovernanceInstruction - * @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, - ): pyth_lazer_transaction.GovernanceInstruction; - - /** - * Decodes a GovernanceInstruction message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GovernanceInstruction - * @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, - ): pyth_lazer_transaction.GovernanceInstruction; - - /** - * Verifies a GovernanceInstruction 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 GovernanceInstruction message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GovernanceInstruction - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.GovernanceInstruction; - - /** - * Creates a plain object from a GovernanceInstruction message. Also converts values to other types if specified. - * @param message GovernanceInstruction - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.GovernanceInstruction, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this GovernanceInstruction to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GovernanceInstruction - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ShardFilter. */ - interface IShardFilter { - /** ShardFilter allShards */ - allShards?: google.protobuf.IEmpty | null; - - /** ShardFilter shardNames */ - shardNames?: pyth_lazer_transaction.ShardFilter.IShardNames | null; - - /** ShardFilter shardGroups */ - shardGroups?: pyth_lazer_transaction.ShardFilter.IShardGroups | null; - } - - /** Represents a ShardFilter. */ - class ShardFilter implements IShardFilter { - /** - * Constructs a new ShardFilter. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IShardFilter); - - /** ShardFilter allShards. */ - public allShards?: google.protobuf.IEmpty | null; - - /** ShardFilter shardNames. */ - public shardNames?: pyth_lazer_transaction.ShardFilter.IShardNames | null; - - /** ShardFilter shardGroups. */ - public shardGroups?: pyth_lazer_transaction.ShardFilter.IShardGroups | null; - - /** ShardFilter filter. */ - public filter?: "allShards" | "shardNames" | "shardGroups"; - - /** - * Creates a new ShardFilter instance using the specified properties. - * @param [properties] Properties to set - * @returns ShardFilter instance - */ - public static create( - properties?: pyth_lazer_transaction.IShardFilter, - ): pyth_lazer_transaction.ShardFilter; - - /** - * Encodes the specified ShardFilter message. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.verify|verify} messages. - * @param message ShardFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.IShardFilter, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified ShardFilter message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.verify|verify} messages. - * @param message ShardFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.IShardFilter, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a ShardFilter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ShardFilter - * @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, - ): pyth_lazer_transaction.ShardFilter; - - /** - * Decodes a ShardFilter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ShardFilter - * @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, - ): pyth_lazer_transaction.ShardFilter; - - /** - * Verifies a ShardFilter 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 ShardFilter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ShardFilter - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.ShardFilter; - - /** - * Creates a plain object from a ShardFilter message. Also converts values to other types if specified. - * @param message ShardFilter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.ShardFilter, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this ShardFilter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ShardFilter - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ShardFilter { - /** Properties of a ShardNames. */ - interface IShardNames { - /** ShardNames shardNames */ - shardNames?: string[] | null; - } - - /** Represents a ShardNames. */ - class ShardNames implements IShardNames { - /** - * Constructs a new ShardNames. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.ShardFilter.IShardNames); - - /** ShardNames shardNames. */ - public shardNames: string[]; - - /** - * Creates a new ShardNames instance using the specified properties. - * @param [properties] Properties to set - * @returns ShardNames instance - */ - public static create( - properties?: pyth_lazer_transaction.ShardFilter.IShardNames, - ): pyth_lazer_transaction.ShardFilter.ShardNames; - - /** - * Encodes the specified ShardNames message. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardNames.verify|verify} messages. - * @param message ShardNames message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.ShardFilter.IShardNames, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified ShardNames message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardNames.verify|verify} messages. - * @param message ShardNames message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.ShardFilter.IShardNames, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a ShardNames message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ShardNames - * @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, - ): pyth_lazer_transaction.ShardFilter.ShardNames; - - /** - * Decodes a ShardNames message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ShardNames - * @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, - ): pyth_lazer_transaction.ShardFilter.ShardNames; - - /** - * Verifies a ShardNames 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 ShardNames message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ShardNames - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.ShardFilter.ShardNames; - - /** - * Creates a plain object from a ShardNames message. Also converts values to other types if specified. - * @param message ShardNames - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.ShardFilter.ShardNames, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this ShardNames to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ShardNames - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ShardGroups. */ - interface IShardGroups { - /** ShardGroups shardGroups */ - shardGroups?: string[] | null; - } - - /** Represents a ShardGroups. */ - class ShardGroups implements IShardGroups { - /** - * Constructs a new ShardGroups. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.ShardFilter.IShardGroups); - - /** ShardGroups shardGroups. */ - public shardGroups: string[]; - - /** - * Creates a new ShardGroups instance using the specified properties. - * @param [properties] Properties to set - * @returns ShardGroups instance - */ - public static create( - properties?: pyth_lazer_transaction.ShardFilter.IShardGroups, - ): pyth_lazer_transaction.ShardFilter.ShardGroups; - - /** - * Encodes the specified ShardGroups message. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardGroups.verify|verify} messages. - * @param message ShardGroups message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.ShardFilter.IShardGroups, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified ShardGroups message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardGroups.verify|verify} messages. - * @param message ShardGroups message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.ShardFilter.IShardGroups, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a ShardGroups message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ShardGroups - * @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, - ): pyth_lazer_transaction.ShardFilter.ShardGroups; - - /** - * Decodes a ShardGroups message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ShardGroups - * @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, - ): pyth_lazer_transaction.ShardFilter.ShardGroups; - - /** - * Verifies a ShardGroups 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 ShardGroups message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ShardGroups - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.ShardFilter.ShardGroups; - - /** - * Creates a plain object from a ShardGroups message. Also converts values to other types if specified. - * @param message ShardGroups - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.ShardFilter.ShardGroups, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this ShardGroups to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ShardGroups - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a GovernanceDirective. */ - interface IGovernanceDirective { - /** GovernanceDirective shardFilter */ - shardFilter?: pyth_lazer_transaction.IShardFilter | null; - - /** GovernanceDirective createShard */ - createShard?: pyth_lazer_transaction.ICreateShard | null; - - /** GovernanceDirective addGovernanceSource */ - addGovernanceSource?: pyth_lazer_transaction.IAddGovernanceSource | null; - - /** GovernanceDirective updateGovernanceSource */ - updateGovernanceSource?: pyth_lazer_transaction.IUpdateGovernanceSource | null; - - /** GovernanceDirective setShardName */ - setShardName?: pyth_lazer_transaction.ISetShardName | null; - - /** GovernanceDirective setShardGroup */ - setShardGroup?: pyth_lazer_transaction.ISetShardGroup | null; - - /** GovernanceDirective resetLastSequenceNo */ - resetLastSequenceNo?: pyth_lazer_transaction.IResetLastSequenceNo | null; - - /** GovernanceDirective addPublisher */ - addPublisher?: pyth_lazer_transaction.IAddPublisher | null; - - /** GovernanceDirective updatePublisher */ - updatePublisher?: pyth_lazer_transaction.IUpdatePublisher | null; - - /** GovernanceDirective addFeed */ - addFeed?: pyth_lazer_transaction.IAddFeed | null; - - /** GovernanceDirective updateFeed */ - updateFeed?: pyth_lazer_transaction.IUpdateFeed | null; - } - - /** Represents a GovernanceDirective. */ - class GovernanceDirective implements IGovernanceDirective { - /** - * Constructs a new GovernanceDirective. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IGovernanceDirective); - - /** GovernanceDirective shardFilter. */ - public shardFilter?: pyth_lazer_transaction.IShardFilter | null; - - /** GovernanceDirective createShard. */ - public createShard?: pyth_lazer_transaction.ICreateShard | null; - - /** GovernanceDirective addGovernanceSource. */ - public addGovernanceSource?: pyth_lazer_transaction.IAddGovernanceSource | null; - - /** GovernanceDirective updateGovernanceSource. */ - public updateGovernanceSource?: pyth_lazer_transaction.IUpdateGovernanceSource | null; - - /** GovernanceDirective setShardName. */ - public setShardName?: pyth_lazer_transaction.ISetShardName | null; - - /** GovernanceDirective setShardGroup. */ - public setShardGroup?: pyth_lazer_transaction.ISetShardGroup | null; - - /** GovernanceDirective resetLastSequenceNo. */ - public resetLastSequenceNo?: pyth_lazer_transaction.IResetLastSequenceNo | null; - - /** GovernanceDirective addPublisher. */ - public addPublisher?: pyth_lazer_transaction.IAddPublisher | null; - - /** GovernanceDirective updatePublisher. */ - public updatePublisher?: pyth_lazer_transaction.IUpdatePublisher | null; - - /** GovernanceDirective addFeed. */ - public addFeed?: pyth_lazer_transaction.IAddFeed | null; - - /** GovernanceDirective updateFeed. */ - public updateFeed?: pyth_lazer_transaction.IUpdateFeed | null; - - /** GovernanceDirective _shardFilter. */ - public _shardFilter?: "shardFilter"; - - /** GovernanceDirective action. */ - public action?: - | "createShard" - | "addGovernanceSource" - | "updateGovernanceSource" - | "setShardName" - | "setShardGroup" - | "resetLastSequenceNo" - | "addPublisher" - | "updatePublisher" - | "addFeed" - | "updateFeed"; - - /** - * Creates a new GovernanceDirective instance using the specified properties. - * @param [properties] Properties to set - * @returns GovernanceDirective instance - */ - public static create( - properties?: pyth_lazer_transaction.IGovernanceDirective, - ): pyth_lazer_transaction.GovernanceDirective; - - /** - * Encodes the specified GovernanceDirective message. Does not implicitly {@link pyth_lazer_transaction.GovernanceDirective.verify|verify} messages. - * @param message GovernanceDirective message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.IGovernanceDirective, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified GovernanceDirective message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceDirective.verify|verify} messages. - * @param message GovernanceDirective message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.IGovernanceDirective, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a GovernanceDirective message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GovernanceDirective - * @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, - ): pyth_lazer_transaction.GovernanceDirective; - - /** - * Decodes a GovernanceDirective message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GovernanceDirective - * @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, - ): pyth_lazer_transaction.GovernanceDirective; - - /** - * Verifies a GovernanceDirective 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 GovernanceDirective message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GovernanceDirective - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.GovernanceDirective; - - /** - * Creates a plain object from a GovernanceDirective message. Also converts values to other types if specified. - * @param message GovernanceDirective - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.GovernanceDirective, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this GovernanceDirective to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GovernanceDirective - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Permissions. */ - interface IPermissions { - /** Permissions allActions */ - allActions?: boolean | null; - - /** Permissions shardActions */ - shardActions?: pyth_lazer_transaction.Permissions.ShardAction[] | null; - - /** Permissions allUpdateGovernanceSourceActions */ - allUpdateGovernanceSourceActions?: boolean | null; - - /** Permissions updateGovernanceSourceActions */ - updateGovernanceSourceActions?: - | pyth_lazer_transaction.Permissions.UpdateGovernanceSourceAction[] - | null; - - /** Permissions allUpdatePublisherAction */ - allUpdatePublisherAction?: boolean | null; - - /** Permissions updatePublisherActions */ - updatePublisherActions?: - | pyth_lazer_transaction.Permissions.UpdatePublisherAction[] - | null; - - /** Permissions allUpdateFeedActions */ - allUpdateFeedActions?: boolean | null; - - /** Permissions updateFeedActions */ - updateFeedActions?: - | pyth_lazer_transaction.Permissions.UpdateFeedAction[] - | null; - } - - /** Represents a Permissions. */ - class Permissions implements IPermissions { - /** - * Constructs a new Permissions. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IPermissions); - - /** Permissions allActions. */ - public allActions?: boolean | null; - - /** Permissions shardActions. */ - public shardActions: pyth_lazer_transaction.Permissions.ShardAction[]; - - /** Permissions allUpdateGovernanceSourceActions. */ - public allUpdateGovernanceSourceActions?: boolean | null; - - /** Permissions updateGovernanceSourceActions. */ - public updateGovernanceSourceActions: pyth_lazer_transaction.Permissions.UpdateGovernanceSourceAction[]; - - /** Permissions allUpdatePublisherAction. */ - public allUpdatePublisherAction?: boolean | null; - - /** Permissions updatePublisherActions. */ - public updatePublisherActions: pyth_lazer_transaction.Permissions.UpdatePublisherAction[]; - - /** Permissions allUpdateFeedActions. */ - public allUpdateFeedActions?: boolean | null; - - /** Permissions updateFeedActions. */ - public updateFeedActions: pyth_lazer_transaction.Permissions.UpdateFeedAction[]; - - /** Permissions _allActions. */ - public _allActions?: "allActions"; - - /** Permissions _allUpdateGovernanceSourceActions. */ - public _allUpdateGovernanceSourceActions?: "allUpdateGovernanceSourceActions"; - - /** Permissions _allUpdatePublisherAction. */ - public _allUpdatePublisherAction?: "allUpdatePublisherAction"; - - /** Permissions _allUpdateFeedActions. */ - public _allUpdateFeedActions?: "allUpdateFeedActions"; - - /** - * Creates a new Permissions instance using the specified properties. - * @param [properties] Properties to set - * @returns Permissions instance - */ - public static create( - properties?: pyth_lazer_transaction.IPermissions, - ): pyth_lazer_transaction.Permissions; - - /** - * Encodes the specified Permissions message. Does not implicitly {@link pyth_lazer_transaction.Permissions.verify|verify} messages. - * @param message Permissions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.IPermissions, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified Permissions message, length delimited. Does not implicitly {@link pyth_lazer_transaction.Permissions.verify|verify} messages. - * @param message Permissions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.IPermissions, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a Permissions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Permissions - * @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, - ): pyth_lazer_transaction.Permissions; - - /** - * Decodes a Permissions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Permissions - * @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, - ): pyth_lazer_transaction.Permissions; - - /** - * Verifies a Permissions 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 Permissions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Permissions - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.Permissions; - - /** - * Creates a plain object from a Permissions message. Also converts values to other types if specified. - * @param message Permissions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.Permissions, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this Permissions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Permissions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Permissions { - /** ShardAction enum. */ - enum ShardAction { - SHARD_ACTION_UNSPECIFIED = 0, - CREATE_SHARD = 101, - ADD_GOVERNANCE_SOURCE = 102, - UPDATE_GOVERNANCE_SOURCE = 103, - SET_SHARD_NAME = 104, - SET_SHARD_GROUP = 105, - RESET_LAST_SEQUENCE_NO = 106, - ADD_PUBLISHER = 107, - ADD_FEED = 109, - } - - /** UpdateGovernanceSourceAction enum. */ - enum UpdateGovernanceSourceAction { - UPDATE_GOVERNANCE_SOURCE_ACTION_UNSPECIFIED = 0, - SET_GOVERNANCE_SOURCE_PERMISSIONS = 101, - REMOVE_GOVERNANCE_SOURCE = 199, - } - - /** UpdatePublisherAction enum. */ - enum UpdatePublisherAction { - UPDATE_PUBLISHER_ACTION_UNSPECIFIED = 0, - SET_PUBLISHER_NAME = 101, - ADD_PUBLISHER_PUBLIC_KEYS = 102, - REMOVE_PUBLISHER_PUBLIC_KEYS = 103, - SET_PUBLISHER_PUBLIC_KEYS = 104, - SET_PUBLISHER_ACTIVE = 105, - REMOVE_PUBLISHER = 199, - } - - /** UpdateFeedAction enum. */ - enum UpdateFeedAction { - UPDATE_FEED_ACTION_UNSPECIFIED = 0, - UPDATE_FEED_METADATA = 101, - ACTIVATE_FEED = 102, - DEACTIVATE_FEED = 103, - REMOVE_FEED = 199, - } - } - - /** Properties of a GovernanceSource. */ - interface IGovernanceSource { - /** GovernanceSource singleEd25519 */ - singleEd25519?: pyth_lazer_transaction.GovernanceSource.ISingleEd25519 | null; - - /** GovernanceSource wormholeEmitter */ - wormholeEmitter?: pyth_lazer_transaction.GovernanceSource.IWormholeEmitter | null; - } - - /** Represents a GovernanceSource. */ - class GovernanceSource implements IGovernanceSource { - /** - * Constructs a new GovernanceSource. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IGovernanceSource); - - /** GovernanceSource singleEd25519. */ - public singleEd25519?: pyth_lazer_transaction.GovernanceSource.ISingleEd25519 | null; - - /** GovernanceSource wormholeEmitter. */ - public wormholeEmitter?: pyth_lazer_transaction.GovernanceSource.IWormholeEmitter | null; - - /** GovernanceSource source. */ - public source?: "singleEd25519" | "wormholeEmitter"; - - /** - * Creates a new GovernanceSource instance using the specified properties. - * @param [properties] Properties to set - * @returns GovernanceSource instance - */ - public static create( - properties?: pyth_lazer_transaction.IGovernanceSource, - ): pyth_lazer_transaction.GovernanceSource; - - /** - * Encodes the specified GovernanceSource message. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.verify|verify} messages. - * @param message GovernanceSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.IGovernanceSource, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified GovernanceSource message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.verify|verify} messages. - * @param message GovernanceSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.IGovernanceSource, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a GovernanceSource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GovernanceSource - * @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, - ): pyth_lazer_transaction.GovernanceSource; - - /** - * Decodes a GovernanceSource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GovernanceSource - * @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, - ): pyth_lazer_transaction.GovernanceSource; - - /** - * Verifies a GovernanceSource 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 GovernanceSource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GovernanceSource - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.GovernanceSource; - - /** - * Creates a plain object from a GovernanceSource message. Also converts values to other types if specified. - * @param message GovernanceSource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.GovernanceSource, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this GovernanceSource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GovernanceSource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace GovernanceSource { - /** Properties of a SingleEd25519. */ - interface ISingleEd25519 { - /** SingleEd25519 publicKey */ - publicKey?: Uint8Array | null; - } - - /** Represents a SingleEd25519. */ - class SingleEd25519 implements ISingleEd25519 { - /** - * Constructs a new SingleEd25519. - * @param [properties] Properties to set - */ - constructor( - properties?: pyth_lazer_transaction.GovernanceSource.ISingleEd25519, - ); - - /** SingleEd25519 publicKey. */ - public publicKey?: Uint8Array | null; - - /** SingleEd25519 _publicKey. */ - public _publicKey?: "publicKey"; - - /** - * Creates a new SingleEd25519 instance using the specified properties. - * @param [properties] Properties to set - * @returns SingleEd25519 instance - */ - public static create( - properties?: pyth_lazer_transaction.GovernanceSource.ISingleEd25519, - ): pyth_lazer_transaction.GovernanceSource.SingleEd25519; - - /** - * Encodes the specified SingleEd25519 message. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.SingleEd25519.verify|verify} messages. - * @param message SingleEd25519 message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.GovernanceSource.ISingleEd25519, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified SingleEd25519 message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.SingleEd25519.verify|verify} messages. - * @param message SingleEd25519 message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.GovernanceSource.ISingleEd25519, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a SingleEd25519 message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SingleEd25519 - * @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, - ): pyth_lazer_transaction.GovernanceSource.SingleEd25519; - - /** - * Decodes a SingleEd25519 message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SingleEd25519 - * @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, - ): pyth_lazer_transaction.GovernanceSource.SingleEd25519; - - /** - * Verifies a SingleEd25519 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 SingleEd25519 message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SingleEd25519 - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.GovernanceSource.SingleEd25519; - - /** - * Creates a plain object from a SingleEd25519 message. Also converts values to other types if specified. - * @param message SingleEd25519 - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.GovernanceSource.SingleEd25519, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this SingleEd25519 to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SingleEd25519 - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WormholeEmitter. */ - interface IWormholeEmitter { - /** WormholeEmitter address */ - address?: Uint8Array | null; - - /** WormholeEmitter chainId */ - chainId?: number | null; - } - - /** Represents a WormholeEmitter. */ - class WormholeEmitter implements IWormholeEmitter { - /** - * Constructs a new WormholeEmitter. - * @param [properties] Properties to set - */ - constructor( - properties?: pyth_lazer_transaction.GovernanceSource.IWormholeEmitter, - ); - - /** WormholeEmitter address. */ - public address?: Uint8Array | null; - - /** WormholeEmitter chainId. */ - public chainId?: number | null; - - /** WormholeEmitter _address. */ - public _address?: "address"; - - /** WormholeEmitter _chainId. */ - public _chainId?: "chainId"; - - /** - * Creates a new WormholeEmitter instance using the specified properties. - * @param [properties] Properties to set - * @returns WormholeEmitter instance - */ - public static create( - properties?: pyth_lazer_transaction.GovernanceSource.IWormholeEmitter, - ): pyth_lazer_transaction.GovernanceSource.WormholeEmitter; - - /** - * Encodes the specified WormholeEmitter message. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.WormholeEmitter.verify|verify} messages. - * @param message WormholeEmitter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.GovernanceSource.IWormholeEmitter, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified WormholeEmitter message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.WormholeEmitter.verify|verify} messages. - * @param message WormholeEmitter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.GovernanceSource.IWormholeEmitter, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a WormholeEmitter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WormholeEmitter - * @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, - ): pyth_lazer_transaction.GovernanceSource.WormholeEmitter; - - /** - * Decodes a WormholeEmitter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WormholeEmitter - * @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, - ): pyth_lazer_transaction.GovernanceSource.WormholeEmitter; - - /** - * Verifies a WormholeEmitter 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 WormholeEmitter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WormholeEmitter - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.GovernanceSource.WormholeEmitter; - - /** - * Creates a plain object from a WormholeEmitter message. Also converts values to other types if specified. - * @param message WormholeEmitter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.GovernanceSource.WormholeEmitter, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this WormholeEmitter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WormholeEmitter - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a CreateShard. */ - interface ICreateShard { - /** CreateShard shardId */ - shardId?: number | null; - - /** CreateShard shardGroup */ - shardGroup?: string | null; - - /** CreateShard minRate */ - minRate?: google.protobuf.IDuration | null; - } - - /** Represents a CreateShard. */ - class CreateShard implements ICreateShard { - /** - * Constructs a new CreateShard. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.ICreateShard); - - /** CreateShard shardId. */ - public shardId?: number | null; - - /** CreateShard shardGroup. */ - public shardGroup?: string | null; - - /** CreateShard minRate. */ - public minRate?: google.protobuf.IDuration | null; - - /** CreateShard _shardId. */ - public _shardId?: "shardId"; - - /** CreateShard _shardGroup. */ - public _shardGroup?: "shardGroup"; - - /** CreateShard _minRate. */ - public _minRate?: "minRate"; - - /** - * Creates a new CreateShard instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateShard instance - */ - public static create( - properties?: pyth_lazer_transaction.ICreateShard, - ): pyth_lazer_transaction.CreateShard; - - /** - * Encodes the specified CreateShard message. Does not implicitly {@link pyth_lazer_transaction.CreateShard.verify|verify} messages. - * @param message CreateShard message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.ICreateShard, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified CreateShard message, length delimited. Does not implicitly {@link pyth_lazer_transaction.CreateShard.verify|verify} messages. - * @param message CreateShard message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.ICreateShard, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a CreateShard message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateShard - * @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, - ): pyth_lazer_transaction.CreateShard; - - /** - * Decodes a CreateShard message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateShard - * @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, - ): pyth_lazer_transaction.CreateShard; - - /** - * Verifies a CreateShard 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 CreateShard message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateShard - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.CreateShard; - - /** - * Creates a plain object from a CreateShard message. Also converts values to other types if specified. - * @param message CreateShard - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.CreateShard, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this CreateShard to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateShard - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AddGovernanceSource. */ - interface IAddGovernanceSource { - /** AddGovernanceSource newSource */ - newSource?: pyth_lazer_transaction.IGovernanceSource | null; - - /** AddGovernanceSource permissions */ - permissions?: pyth_lazer_transaction.IPermissions | null; - } - - /** Represents an AddGovernanceSource. */ - class AddGovernanceSource implements IAddGovernanceSource { - /** - * Constructs a new AddGovernanceSource. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IAddGovernanceSource); - - /** AddGovernanceSource newSource. */ - public newSource?: pyth_lazer_transaction.IGovernanceSource | null; - - /** AddGovernanceSource permissions. */ - public permissions?: pyth_lazer_transaction.IPermissions | null; - - /** AddGovernanceSource _newSource. */ - public _newSource?: "newSource"; - - /** AddGovernanceSource _permissions. */ - public _permissions?: "permissions"; - - /** - * Creates a new AddGovernanceSource instance using the specified properties. - * @param [properties] Properties to set - * @returns AddGovernanceSource instance - */ - public static create( - properties?: pyth_lazer_transaction.IAddGovernanceSource, - ): pyth_lazer_transaction.AddGovernanceSource; - - /** - * Encodes the specified AddGovernanceSource message. Does not implicitly {@link pyth_lazer_transaction.AddGovernanceSource.verify|verify} messages. - * @param message AddGovernanceSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.IAddGovernanceSource, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified AddGovernanceSource message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddGovernanceSource.verify|verify} messages. - * @param message AddGovernanceSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.IAddGovernanceSource, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes an AddGovernanceSource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AddGovernanceSource - * @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, - ): pyth_lazer_transaction.AddGovernanceSource; - - /** - * Decodes an AddGovernanceSource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AddGovernanceSource - * @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, - ): pyth_lazer_transaction.AddGovernanceSource; - - /** - * Verifies an AddGovernanceSource 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 AddGovernanceSource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AddGovernanceSource - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.AddGovernanceSource; - - /** - * Creates a plain object from an AddGovernanceSource message. Also converts values to other types if specified. - * @param message AddGovernanceSource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.AddGovernanceSource, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this AddGovernanceSource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AddGovernanceSource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateGovernanceSource. */ - interface IUpdateGovernanceSource { - /** UpdateGovernanceSource source */ - source?: pyth_lazer_transaction.IGovernanceSource | null; - - /** UpdateGovernanceSource setGovernanceSourcePermissions */ - setGovernanceSourcePermissions?: pyth_lazer_transaction.ISetGovernanceSourcePermissions | null; - - /** UpdateGovernanceSource removeGovernanceSource */ - removeGovernanceSource?: google.protobuf.IEmpty | null; - } - - /** Represents an UpdateGovernanceSource. */ - class UpdateGovernanceSource implements IUpdateGovernanceSource { - /** - * Constructs a new UpdateGovernanceSource. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IUpdateGovernanceSource); - - /** UpdateGovernanceSource source. */ - public source?: pyth_lazer_transaction.IGovernanceSource | null; - - /** UpdateGovernanceSource setGovernanceSourcePermissions. */ - public setGovernanceSourcePermissions?: pyth_lazer_transaction.ISetGovernanceSourcePermissions | null; - - /** UpdateGovernanceSource removeGovernanceSource. */ - public removeGovernanceSource?: google.protobuf.IEmpty | null; - - /** UpdateGovernanceSource _source. */ - public _source?: "source"; - - /** UpdateGovernanceSource action. */ - public action?: "setGovernanceSourcePermissions" | "removeGovernanceSource"; - - /** - * Creates a new UpdateGovernanceSource instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateGovernanceSource instance - */ - public static create( - properties?: pyth_lazer_transaction.IUpdateGovernanceSource, - ): pyth_lazer_transaction.UpdateGovernanceSource; - - /** - * Encodes the specified UpdateGovernanceSource message. Does not implicitly {@link pyth_lazer_transaction.UpdateGovernanceSource.verify|verify} messages. - * @param message UpdateGovernanceSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.IUpdateGovernanceSource, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified UpdateGovernanceSource message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdateGovernanceSource.verify|verify} messages. - * @param message UpdateGovernanceSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.IUpdateGovernanceSource, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes an UpdateGovernanceSource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateGovernanceSource - * @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, - ): pyth_lazer_transaction.UpdateGovernanceSource; - - /** - * Decodes an UpdateGovernanceSource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateGovernanceSource - * @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, - ): pyth_lazer_transaction.UpdateGovernanceSource; - - /** - * Verifies an UpdateGovernanceSource 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 UpdateGovernanceSource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateGovernanceSource - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.UpdateGovernanceSource; - - /** - * Creates a plain object from an UpdateGovernanceSource message. Also converts values to other types if specified. - * @param message UpdateGovernanceSource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.UpdateGovernanceSource, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this UpdateGovernanceSource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateGovernanceSource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetGovernanceSourcePermissions. */ - interface ISetGovernanceSourcePermissions { - /** SetGovernanceSourcePermissions permissions */ - permissions?: pyth_lazer_transaction.IPermissions | null; - } - - /** Represents a SetGovernanceSourcePermissions. */ - class SetGovernanceSourcePermissions - implements ISetGovernanceSourcePermissions - { - /** - * Constructs a new SetGovernanceSourcePermissions. - * @param [properties] Properties to set - */ - constructor( - properties?: pyth_lazer_transaction.ISetGovernanceSourcePermissions, - ); - - /** SetGovernanceSourcePermissions permissions. */ - public permissions?: pyth_lazer_transaction.IPermissions | null; - - /** SetGovernanceSourcePermissions _permissions. */ - public _permissions?: "permissions"; - - /** - * Creates a new SetGovernanceSourcePermissions instance using the specified properties. - * @param [properties] Properties to set - * @returns SetGovernanceSourcePermissions instance - */ - public static create( - properties?: pyth_lazer_transaction.ISetGovernanceSourcePermissions, - ): pyth_lazer_transaction.SetGovernanceSourcePermissions; - - /** - * Encodes the specified SetGovernanceSourcePermissions message. Does not implicitly {@link pyth_lazer_transaction.SetGovernanceSourcePermissions.verify|verify} messages. - * @param message SetGovernanceSourcePermissions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.ISetGovernanceSourcePermissions, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified SetGovernanceSourcePermissions message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetGovernanceSourcePermissions.verify|verify} messages. - * @param message SetGovernanceSourcePermissions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.ISetGovernanceSourcePermissions, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a SetGovernanceSourcePermissions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetGovernanceSourcePermissions - * @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, - ): pyth_lazer_transaction.SetGovernanceSourcePermissions; - - /** - * Decodes a SetGovernanceSourcePermissions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetGovernanceSourcePermissions - * @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, - ): pyth_lazer_transaction.SetGovernanceSourcePermissions; - - /** - * Verifies a SetGovernanceSourcePermissions 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 SetGovernanceSourcePermissions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetGovernanceSourcePermissions - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.SetGovernanceSourcePermissions; - - /** - * Creates a plain object from a SetGovernanceSourcePermissions message. Also converts values to other types if specified. - * @param message SetGovernanceSourcePermissions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.SetGovernanceSourcePermissions, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this SetGovernanceSourcePermissions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetGovernanceSourcePermissions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetShardName. */ - interface ISetShardName { - /** SetShardName shardName */ - shardName?: string | null; - } - - /** Represents a SetShardName. */ - class SetShardName implements ISetShardName { - /** - * Constructs a new SetShardName. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.ISetShardName); - - /** SetShardName shardName. */ - public shardName?: string | null; - - /** SetShardName _shardName. */ - public _shardName?: "shardName"; - - /** - * Creates a new SetShardName instance using the specified properties. - * @param [properties] Properties to set - * @returns SetShardName instance - */ - public static create( - properties?: pyth_lazer_transaction.ISetShardName, - ): pyth_lazer_transaction.SetShardName; - - /** - * Encodes the specified SetShardName message. Does not implicitly {@link pyth_lazer_transaction.SetShardName.verify|verify} messages. - * @param message SetShardName message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.ISetShardName, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified SetShardName message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetShardName.verify|verify} messages. - * @param message SetShardName message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.ISetShardName, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a SetShardName message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetShardName - * @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, - ): pyth_lazer_transaction.SetShardName; - - /** - * Decodes a SetShardName message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetShardName - * @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, - ): pyth_lazer_transaction.SetShardName; - - /** - * Verifies a SetShardName 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 SetShardName message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetShardName - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.SetShardName; - - /** - * Creates a plain object from a SetShardName message. Also converts values to other types if specified. - * @param message SetShardName - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.SetShardName, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this SetShardName to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetShardName - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetShardGroup. */ - interface ISetShardGroup { - /** SetShardGroup shardGroup */ - shardGroup?: string | null; - } - - /** Represents a SetShardGroup. */ - class SetShardGroup implements ISetShardGroup { - /** - * Constructs a new SetShardGroup. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.ISetShardGroup); - - /** SetShardGroup shardGroup. */ - public shardGroup?: string | null; - - /** SetShardGroup _shardGroup. */ - public _shardGroup?: "shardGroup"; - - /** - * Creates a new SetShardGroup instance using the specified properties. - * @param [properties] Properties to set - * @returns SetShardGroup instance - */ - public static create( - properties?: pyth_lazer_transaction.ISetShardGroup, - ): pyth_lazer_transaction.SetShardGroup; - - /** - * Encodes the specified SetShardGroup message. Does not implicitly {@link pyth_lazer_transaction.SetShardGroup.verify|verify} messages. - * @param message SetShardGroup message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.ISetShardGroup, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified SetShardGroup message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetShardGroup.verify|verify} messages. - * @param message SetShardGroup message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.ISetShardGroup, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a SetShardGroup message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetShardGroup - * @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, - ): pyth_lazer_transaction.SetShardGroup; - - /** - * Decodes a SetShardGroup message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetShardGroup - * @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, - ): pyth_lazer_transaction.SetShardGroup; - - /** - * Verifies a SetShardGroup 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 SetShardGroup message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetShardGroup - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.SetShardGroup; - - /** - * Creates a plain object from a SetShardGroup message. Also converts values to other types if specified. - * @param message SetShardGroup - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.SetShardGroup, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this SetShardGroup to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetShardGroup - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ResetLastSequenceNo. */ - interface IResetLastSequenceNo { - /** ResetLastSequenceNo lastSequenceNo */ - lastSequenceNo?: number | Long | null; - } - - /** Represents a ResetLastSequenceNo. */ - class ResetLastSequenceNo implements IResetLastSequenceNo { - /** - * Constructs a new ResetLastSequenceNo. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IResetLastSequenceNo); - - /** ResetLastSequenceNo lastSequenceNo. */ - public lastSequenceNo?: number | Long | null; - - /** ResetLastSequenceNo _lastSequenceNo. */ - public _lastSequenceNo?: "lastSequenceNo"; - - /** - * Creates a new ResetLastSequenceNo instance using the specified properties. - * @param [properties] Properties to set - * @returns ResetLastSequenceNo instance - */ - public static create( - properties?: pyth_lazer_transaction.IResetLastSequenceNo, - ): pyth_lazer_transaction.ResetLastSequenceNo; - - /** - * Encodes the specified ResetLastSequenceNo message. Does not implicitly {@link pyth_lazer_transaction.ResetLastSequenceNo.verify|verify} messages. - * @param message ResetLastSequenceNo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.IResetLastSequenceNo, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified ResetLastSequenceNo message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ResetLastSequenceNo.verify|verify} messages. - * @param message ResetLastSequenceNo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.IResetLastSequenceNo, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a ResetLastSequenceNo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResetLastSequenceNo - * @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, - ): pyth_lazer_transaction.ResetLastSequenceNo; - - /** - * Decodes a ResetLastSequenceNo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResetLastSequenceNo - * @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, - ): pyth_lazer_transaction.ResetLastSequenceNo; - - /** - * Verifies a ResetLastSequenceNo 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 ResetLastSequenceNo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResetLastSequenceNo - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.ResetLastSequenceNo; - - /** - * Creates a plain object from a ResetLastSequenceNo message. Also converts values to other types if specified. - * @param message ResetLastSequenceNo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.ResetLastSequenceNo, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this ResetLastSequenceNo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResetLastSequenceNo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AddPublisher. */ - interface IAddPublisher { - /** AddPublisher publisherId */ - publisherId?: number | null; - - /** AddPublisher name */ - name?: string | null; - - /** AddPublisher publicKeys */ - publicKeys?: Uint8Array[] | null; - - /** AddPublisher isActive */ - isActive?: boolean | null; - } - - /** Represents an AddPublisher. */ - class AddPublisher implements IAddPublisher { - /** - * Constructs a new AddPublisher. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IAddPublisher); - - /** AddPublisher publisherId. */ - public publisherId?: number | null; - - /** AddPublisher name. */ - public name?: string | null; - - /** AddPublisher publicKeys. */ - public publicKeys: Uint8Array[]; - - /** AddPublisher isActive. */ - public isActive?: boolean | null; - - /** AddPublisher _publisherId. */ - public _publisherId?: "publisherId"; - - /** AddPublisher _name. */ - public _name?: "name"; - - /** AddPublisher _isActive. */ - public _isActive?: "isActive"; - - /** - * Creates a new AddPublisher instance using the specified properties. - * @param [properties] Properties to set - * @returns AddPublisher instance - */ - public static create( - properties?: pyth_lazer_transaction.IAddPublisher, - ): pyth_lazer_transaction.AddPublisher; - - /** - * Encodes the specified AddPublisher message. Does not implicitly {@link pyth_lazer_transaction.AddPublisher.verify|verify} messages. - * @param message AddPublisher message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.IAddPublisher, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified AddPublisher message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddPublisher.verify|verify} messages. - * @param message AddPublisher message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.IAddPublisher, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes an AddPublisher message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AddPublisher - * @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, - ): pyth_lazer_transaction.AddPublisher; - - /** - * Decodes an AddPublisher message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AddPublisher - * @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, - ): pyth_lazer_transaction.AddPublisher; - - /** - * Verifies an AddPublisher 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 AddPublisher message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AddPublisher - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.AddPublisher; - - /** - * Creates a plain object from an AddPublisher message. Also converts values to other types if specified. - * @param message AddPublisher - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.AddPublisher, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this AddPublisher to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AddPublisher - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdatePublisher. */ - interface IUpdatePublisher { - /** UpdatePublisher publisherId */ - publisherId?: number | null; - - /** UpdatePublisher setPublisherName */ - setPublisherName?: pyth_lazer_transaction.ISetPublisherName | null; - - /** UpdatePublisher addPublisherPublicKeys */ - addPublisherPublicKeys?: pyth_lazer_transaction.IAddPublisherPublicKeys | null; - - /** UpdatePublisher removePublisherPublicKeys */ - removePublisherPublicKeys?: pyth_lazer_transaction.IRemovePublisherPublicKeys | null; - - /** UpdatePublisher setPublisherPublicKeys */ - setPublisherPublicKeys?: pyth_lazer_transaction.ISetPublisherPublicKeys | null; - - /** UpdatePublisher setPublisherActive */ - setPublisherActive?: pyth_lazer_transaction.ISetPublisherActive | null; - - /** UpdatePublisher removePublisher */ - removePublisher?: google.protobuf.IEmpty | null; - } - - /** Represents an UpdatePublisher. */ - class UpdatePublisher implements IUpdatePublisher { - /** - * Constructs a new UpdatePublisher. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IUpdatePublisher); - - /** UpdatePublisher publisherId. */ - public publisherId?: number | null; - - /** UpdatePublisher setPublisherName. */ - public setPublisherName?: pyth_lazer_transaction.ISetPublisherName | null; - - /** UpdatePublisher addPublisherPublicKeys. */ - public addPublisherPublicKeys?: pyth_lazer_transaction.IAddPublisherPublicKeys | null; - - /** UpdatePublisher removePublisherPublicKeys. */ - public removePublisherPublicKeys?: pyth_lazer_transaction.IRemovePublisherPublicKeys | null; - - /** UpdatePublisher setPublisherPublicKeys. */ - public setPublisherPublicKeys?: pyth_lazer_transaction.ISetPublisherPublicKeys | null; - - /** UpdatePublisher setPublisherActive. */ - public setPublisherActive?: pyth_lazer_transaction.ISetPublisherActive | null; - - /** UpdatePublisher removePublisher. */ - public removePublisher?: google.protobuf.IEmpty | null; - - /** UpdatePublisher _publisherId. */ - public _publisherId?: "publisherId"; - - /** UpdatePublisher action. */ - public action?: - | "setPublisherName" - | "addPublisherPublicKeys" - | "removePublisherPublicKeys" - | "setPublisherPublicKeys" - | "setPublisherActive" - | "removePublisher"; - - /** - * Creates a new UpdatePublisher instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdatePublisher instance - */ - public static create( - properties?: pyth_lazer_transaction.IUpdatePublisher, - ): pyth_lazer_transaction.UpdatePublisher; - - /** - * Encodes the specified UpdatePublisher message. Does not implicitly {@link pyth_lazer_transaction.UpdatePublisher.verify|verify} messages. - * @param message UpdatePublisher message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.IUpdatePublisher, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified UpdatePublisher message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdatePublisher.verify|verify} messages. - * @param message UpdatePublisher message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.IUpdatePublisher, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes an UpdatePublisher message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdatePublisher - * @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, - ): pyth_lazer_transaction.UpdatePublisher; - - /** - * Decodes an UpdatePublisher message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdatePublisher - * @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, - ): pyth_lazer_transaction.UpdatePublisher; - - /** - * Verifies an UpdatePublisher 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 UpdatePublisher message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdatePublisher - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.UpdatePublisher; - - /** - * Creates a plain object from an UpdatePublisher message. Also converts values to other types if specified. - * @param message UpdatePublisher - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.UpdatePublisher, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this UpdatePublisher to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdatePublisher - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetPublisherName. */ - interface ISetPublisherName { - /** SetPublisherName name */ - name?: string | null; - } - - /** Represents a SetPublisherName. */ - class SetPublisherName implements ISetPublisherName { - /** - * Constructs a new SetPublisherName. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.ISetPublisherName); - - /** SetPublisherName name. */ - public name?: string | null; - - /** SetPublisherName _name. */ - public _name?: "name"; - - /** - * Creates a new SetPublisherName instance using the specified properties. - * @param [properties] Properties to set - * @returns SetPublisherName instance - */ - public static create( - properties?: pyth_lazer_transaction.ISetPublisherName, - ): pyth_lazer_transaction.SetPublisherName; - - /** - * Encodes the specified SetPublisherName message. Does not implicitly {@link pyth_lazer_transaction.SetPublisherName.verify|verify} messages. - * @param message SetPublisherName message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.ISetPublisherName, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified SetPublisherName message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetPublisherName.verify|verify} messages. - * @param message SetPublisherName message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.ISetPublisherName, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a SetPublisherName message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetPublisherName - * @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, - ): pyth_lazer_transaction.SetPublisherName; - - /** - * Decodes a SetPublisherName message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetPublisherName - * @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, - ): pyth_lazer_transaction.SetPublisherName; - - /** - * Verifies a SetPublisherName 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 SetPublisherName message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetPublisherName - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.SetPublisherName; - - /** - * Creates a plain object from a SetPublisherName message. Also converts values to other types if specified. - * @param message SetPublisherName - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.SetPublisherName, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this SetPublisherName to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetPublisherName - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AddPublisherPublicKeys. */ - interface IAddPublisherPublicKeys { - /** AddPublisherPublicKeys publicKeys */ - publicKeys?: Uint8Array[] | null; - } - - /** Represents an AddPublisherPublicKeys. */ - class AddPublisherPublicKeys implements IAddPublisherPublicKeys { - /** - * Constructs a new AddPublisherPublicKeys. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IAddPublisherPublicKeys); - - /** AddPublisherPublicKeys publicKeys. */ - public publicKeys: Uint8Array[]; - - /** - * Creates a new AddPublisherPublicKeys instance using the specified properties. - * @param [properties] Properties to set - * @returns AddPublisherPublicKeys instance - */ - public static create( - properties?: pyth_lazer_transaction.IAddPublisherPublicKeys, - ): pyth_lazer_transaction.AddPublisherPublicKeys; - - /** - * Encodes the specified AddPublisherPublicKeys message. Does not implicitly {@link pyth_lazer_transaction.AddPublisherPublicKeys.verify|verify} messages. - * @param message AddPublisherPublicKeys message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.IAddPublisherPublicKeys, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified AddPublisherPublicKeys message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddPublisherPublicKeys.verify|verify} messages. - * @param message AddPublisherPublicKeys message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.IAddPublisherPublicKeys, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes an AddPublisherPublicKeys message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AddPublisherPublicKeys - * @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, - ): pyth_lazer_transaction.AddPublisherPublicKeys; - - /** - * Decodes an AddPublisherPublicKeys message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AddPublisherPublicKeys - * @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, - ): pyth_lazer_transaction.AddPublisherPublicKeys; - - /** - * Verifies an AddPublisherPublicKeys 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 AddPublisherPublicKeys message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AddPublisherPublicKeys - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.AddPublisherPublicKeys; - - /** - * Creates a plain object from an AddPublisherPublicKeys message. Also converts values to other types if specified. - * @param message AddPublisherPublicKeys - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.AddPublisherPublicKeys, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this AddPublisherPublicKeys to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AddPublisherPublicKeys - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RemovePublisherPublicKeys. */ - interface IRemovePublisherPublicKeys { - /** RemovePublisherPublicKeys publicKeys */ - publicKeys?: Uint8Array[] | null; - } - - /** Represents a RemovePublisherPublicKeys. */ - class RemovePublisherPublicKeys implements IRemovePublisherPublicKeys { - /** - * Constructs a new RemovePublisherPublicKeys. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IRemovePublisherPublicKeys); - - /** RemovePublisherPublicKeys publicKeys. */ - public publicKeys: Uint8Array[]; - - /** - * Creates a new RemovePublisherPublicKeys instance using the specified properties. - * @param [properties] Properties to set - * @returns RemovePublisherPublicKeys instance - */ - public static create( - properties?: pyth_lazer_transaction.IRemovePublisherPublicKeys, - ): pyth_lazer_transaction.RemovePublisherPublicKeys; - - /** - * Encodes the specified RemovePublisherPublicKeys message. Does not implicitly {@link pyth_lazer_transaction.RemovePublisherPublicKeys.verify|verify} messages. - * @param message RemovePublisherPublicKeys message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.IRemovePublisherPublicKeys, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified RemovePublisherPublicKeys message, length delimited. Does not implicitly {@link pyth_lazer_transaction.RemovePublisherPublicKeys.verify|verify} messages. - * @param message RemovePublisherPublicKeys message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.IRemovePublisherPublicKeys, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a RemovePublisherPublicKeys message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RemovePublisherPublicKeys - * @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, - ): pyth_lazer_transaction.RemovePublisherPublicKeys; - - /** - * Decodes a RemovePublisherPublicKeys message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RemovePublisherPublicKeys - * @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, - ): pyth_lazer_transaction.RemovePublisherPublicKeys; - - /** - * Verifies a RemovePublisherPublicKeys 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 RemovePublisherPublicKeys message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RemovePublisherPublicKeys - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.RemovePublisherPublicKeys; - - /** - * Creates a plain object from a RemovePublisherPublicKeys message. Also converts values to other types if specified. - * @param message RemovePublisherPublicKeys - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.RemovePublisherPublicKeys, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this RemovePublisherPublicKeys to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RemovePublisherPublicKeys - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetPublisherPublicKeys. */ - interface ISetPublisherPublicKeys { - /** SetPublisherPublicKeys publicKeys */ - publicKeys?: Uint8Array[] | null; - } - - /** Represents a SetPublisherPublicKeys. */ - class SetPublisherPublicKeys implements ISetPublisherPublicKeys { - /** - * Constructs a new SetPublisherPublicKeys. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.ISetPublisherPublicKeys); - - /** SetPublisherPublicKeys publicKeys. */ - public publicKeys: Uint8Array[]; - - /** - * Creates a new SetPublisherPublicKeys instance using the specified properties. - * @param [properties] Properties to set - * @returns SetPublisherPublicKeys instance - */ - public static create( - properties?: pyth_lazer_transaction.ISetPublisherPublicKeys, - ): pyth_lazer_transaction.SetPublisherPublicKeys; - - /** - * Encodes the specified SetPublisherPublicKeys message. Does not implicitly {@link pyth_lazer_transaction.SetPublisherPublicKeys.verify|verify} messages. - * @param message SetPublisherPublicKeys message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.ISetPublisherPublicKeys, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified SetPublisherPublicKeys message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetPublisherPublicKeys.verify|verify} messages. - * @param message SetPublisherPublicKeys message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.ISetPublisherPublicKeys, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a SetPublisherPublicKeys message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetPublisherPublicKeys - * @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, - ): pyth_lazer_transaction.SetPublisherPublicKeys; - - /** - * Decodes a SetPublisherPublicKeys message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetPublisherPublicKeys - * @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, - ): pyth_lazer_transaction.SetPublisherPublicKeys; - - /** - * Verifies a SetPublisherPublicKeys 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 SetPublisherPublicKeys message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetPublisherPublicKeys - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.SetPublisherPublicKeys; - - /** - * Creates a plain object from a SetPublisherPublicKeys message. Also converts values to other types if specified. - * @param message SetPublisherPublicKeys - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.SetPublisherPublicKeys, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this SetPublisherPublicKeys to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetPublisherPublicKeys - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetPublisherActive. */ - interface ISetPublisherActive { - /** SetPublisherActive isActive */ - isActive?: boolean | null; - } - - /** Represents a SetPublisherActive. */ - class SetPublisherActive implements ISetPublisherActive { - /** - * Constructs a new SetPublisherActive. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.ISetPublisherActive); - - /** SetPublisherActive isActive. */ - public isActive?: boolean | null; - - /** SetPublisherActive _isActive. */ - public _isActive?: "isActive"; - - /** - * Creates a new SetPublisherActive instance using the specified properties. - * @param [properties] Properties to set - * @returns SetPublisherActive instance - */ - public static create( - properties?: pyth_lazer_transaction.ISetPublisherActive, - ): pyth_lazer_transaction.SetPublisherActive; - - /** - * Encodes the specified SetPublisherActive message. Does not implicitly {@link pyth_lazer_transaction.SetPublisherActive.verify|verify} messages. - * @param message SetPublisherActive message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.ISetPublisherActive, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified SetPublisherActive message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetPublisherActive.verify|verify} messages. - * @param message SetPublisherActive message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.ISetPublisherActive, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a SetPublisherActive message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetPublisherActive - * @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, - ): pyth_lazer_transaction.SetPublisherActive; - - /** - * Decodes a SetPublisherActive message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetPublisherActive - * @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, - ): pyth_lazer_transaction.SetPublisherActive; - - /** - * Verifies a SetPublisherActive 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 SetPublisherActive message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetPublisherActive - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.SetPublisherActive; - - /** - * Creates a plain object from a SetPublisherActive message. Also converts values to other types if specified. - * @param message SetPublisherActive - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.SetPublisherActive, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this SetPublisherActive to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetPublisherActive - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AddFeed. */ - interface IAddFeed { - /** AddFeed feedId */ - feedId?: number | null; - - /** AddFeed metadata */ - metadata?: pyth_lazer_transaction.DynamicValue.IMap | null; - - /** AddFeed permissionedPublishers */ - permissionedPublishers?: number[] | null; - } - - /** Represents an AddFeed. */ - class AddFeed implements IAddFeed { - /** - * Constructs a new AddFeed. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IAddFeed); - - /** AddFeed feedId. */ - public feedId?: number | null; - - /** AddFeed metadata. */ - public metadata?: pyth_lazer_transaction.DynamicValue.IMap | null; - - /** AddFeed permissionedPublishers. */ - public permissionedPublishers: number[]; - - /** AddFeed _feedId. */ - public _feedId?: "feedId"; - - /** AddFeed _metadata. */ - public _metadata?: "metadata"; - - /** - * Creates a new AddFeed instance using the specified properties. - * @param [properties] Properties to set - * @returns AddFeed instance - */ - public static create( - properties?: pyth_lazer_transaction.IAddFeed, - ): pyth_lazer_transaction.AddFeed; - - /** - * Encodes the specified AddFeed message. Does not implicitly {@link pyth_lazer_transaction.AddFeed.verify|verify} messages. - * @param message AddFeed message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.IAddFeed, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified AddFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddFeed.verify|verify} messages. - * @param message AddFeed message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.IAddFeed, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes an AddFeed message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AddFeed - * @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, - ): pyth_lazer_transaction.AddFeed; - - /** - * Decodes an AddFeed message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AddFeed - * @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, - ): pyth_lazer_transaction.AddFeed; - - /** - * Verifies an AddFeed 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 AddFeed message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AddFeed - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.AddFeed; - - /** - * Creates a plain object from an AddFeed message. Also converts values to other types if specified. - * @param message AddFeed - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.AddFeed, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this AddFeed to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AddFeed - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateFeed. */ - interface IUpdateFeed { - /** UpdateFeed feedId */ - feedId?: number | null; - - /** UpdateFeed updateFeedMetadata */ - updateFeedMetadata?: pyth_lazer_transaction.IUpdateFeedMetadata | null; - - /** UpdateFeed activateFeed */ - activateFeed?: pyth_lazer_transaction.IActivateFeed | null; - - /** UpdateFeed deactivateFeed */ - deactivateFeed?: pyth_lazer_transaction.IDeactivateFeed | null; - - /** UpdateFeed removeFeed */ - removeFeed?: google.protobuf.IEmpty | null; - } - - /** Represents an UpdateFeed. */ - class UpdateFeed implements IUpdateFeed { - /** - * Constructs a new UpdateFeed. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IUpdateFeed); - - /** UpdateFeed feedId. */ - public feedId?: number | null; - - /** UpdateFeed updateFeedMetadata. */ - public updateFeedMetadata?: pyth_lazer_transaction.IUpdateFeedMetadata | null; - - /** UpdateFeed activateFeed. */ - public activateFeed?: pyth_lazer_transaction.IActivateFeed | null; - - /** UpdateFeed deactivateFeed. */ - public deactivateFeed?: pyth_lazer_transaction.IDeactivateFeed | null; - - /** UpdateFeed removeFeed. */ - public removeFeed?: google.protobuf.IEmpty | null; - - /** UpdateFeed _feedId. */ - public _feedId?: "feedId"; - - /** UpdateFeed action. */ - public action?: - | "updateFeedMetadata" - | "activateFeed" - | "deactivateFeed" - | "removeFeed"; - - /** - * Creates a new UpdateFeed instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateFeed instance - */ - public static create( - properties?: pyth_lazer_transaction.IUpdateFeed, - ): pyth_lazer_transaction.UpdateFeed; - - /** - * Encodes the specified UpdateFeed message. Does not implicitly {@link pyth_lazer_transaction.UpdateFeed.verify|verify} messages. - * @param message UpdateFeed message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.IUpdateFeed, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified UpdateFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdateFeed.verify|verify} messages. - * @param message UpdateFeed message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.IUpdateFeed, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes an UpdateFeed message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateFeed - * @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, - ): pyth_lazer_transaction.UpdateFeed; - - /** - * Decodes an UpdateFeed message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateFeed - * @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, - ): pyth_lazer_transaction.UpdateFeed; - - /** - * Verifies an UpdateFeed 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 UpdateFeed message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateFeed - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.UpdateFeed; - - /** - * Creates a plain object from an UpdateFeed message. Also converts values to other types if specified. - * @param message UpdateFeed - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.UpdateFeed, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this UpdateFeed to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateFeed - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateFeedMetadata. */ - interface IUpdateFeedMetadata { - /** UpdateFeedMetadata name */ - name?: string | null; - - /** UpdateFeedMetadata value */ - value?: pyth_lazer_transaction.IDynamicValue | null; - } - - /** Represents an UpdateFeedMetadata. */ - class UpdateFeedMetadata implements IUpdateFeedMetadata { - /** - * Constructs a new UpdateFeedMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IUpdateFeedMetadata); - - /** UpdateFeedMetadata name. */ - public name?: string | null; - - /** UpdateFeedMetadata value. */ - public value?: pyth_lazer_transaction.IDynamicValue | null; - - /** UpdateFeedMetadata _name. */ - public _name?: "name"; - - /** UpdateFeedMetadata _value. */ - public _value?: "value"; - - /** - * Creates a new UpdateFeedMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateFeedMetadata instance - */ - public static create( - properties?: pyth_lazer_transaction.IUpdateFeedMetadata, - ): pyth_lazer_transaction.UpdateFeedMetadata; - - /** - * Encodes the specified UpdateFeedMetadata message. Does not implicitly {@link pyth_lazer_transaction.UpdateFeedMetadata.verify|verify} messages. - * @param message UpdateFeedMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.IUpdateFeedMetadata, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified UpdateFeedMetadata message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdateFeedMetadata.verify|verify} messages. - * @param message UpdateFeedMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.IUpdateFeedMetadata, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes an UpdateFeedMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateFeedMetadata - * @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, - ): pyth_lazer_transaction.UpdateFeedMetadata; - - /** - * Decodes an UpdateFeedMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateFeedMetadata - * @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, - ): pyth_lazer_transaction.UpdateFeedMetadata; - - /** - * Verifies an UpdateFeedMetadata 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 UpdateFeedMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateFeedMetadata - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.UpdateFeedMetadata; - - /** - * Creates a plain object from an UpdateFeedMetadata message. Also converts values to other types if specified. - * @param message UpdateFeedMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.UpdateFeedMetadata, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this UpdateFeedMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateFeedMetadata - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ActivateFeed. */ - interface IActivateFeed { - /** ActivateFeed activationTimestamp */ - activationTimestamp?: google.protobuf.ITimestamp | null; - } - - /** Represents an ActivateFeed. */ - class ActivateFeed implements IActivateFeed { - /** - * Constructs a new ActivateFeed. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IActivateFeed); - - /** ActivateFeed activationTimestamp. */ - public activationTimestamp?: google.protobuf.ITimestamp | null; - - /** ActivateFeed _activationTimestamp. */ - public _activationTimestamp?: "activationTimestamp"; - - /** - * Creates a new ActivateFeed instance using the specified properties. - * @param [properties] Properties to set - * @returns ActivateFeed instance - */ - public static create( - properties?: pyth_lazer_transaction.IActivateFeed, - ): pyth_lazer_transaction.ActivateFeed; - - /** - * Encodes the specified ActivateFeed message. Does not implicitly {@link pyth_lazer_transaction.ActivateFeed.verify|verify} messages. - * @param message ActivateFeed message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.IActivateFeed, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified ActivateFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ActivateFeed.verify|verify} messages. - * @param message ActivateFeed message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.IActivateFeed, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes an ActivateFeed message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ActivateFeed - * @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, - ): pyth_lazer_transaction.ActivateFeed; - - /** - * Decodes an ActivateFeed message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ActivateFeed - * @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, - ): pyth_lazer_transaction.ActivateFeed; - - /** - * Verifies an ActivateFeed 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 ActivateFeed message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ActivateFeed - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.ActivateFeed; - - /** - * Creates a plain object from an ActivateFeed message. Also converts values to other types if specified. - * @param message ActivateFeed - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.ActivateFeed, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this ActivateFeed to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ActivateFeed - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeactivateFeed. */ - interface IDeactivateFeed { - /** DeactivateFeed deactivationTimestamp */ - deactivationTimestamp?: google.protobuf.ITimestamp | null; - } - - /** Represents a DeactivateFeed. */ - class DeactivateFeed implements IDeactivateFeed { - /** - * Constructs a new DeactivateFeed. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IDeactivateFeed); - - /** DeactivateFeed deactivationTimestamp. */ - public deactivationTimestamp?: google.protobuf.ITimestamp | null; - - /** DeactivateFeed _deactivationTimestamp. */ - public _deactivationTimestamp?: "deactivationTimestamp"; - - /** - * Creates a new DeactivateFeed instance using the specified properties. - * @param [properties] Properties to set - * @returns DeactivateFeed instance - */ - public static create( - properties?: pyth_lazer_transaction.IDeactivateFeed, - ): pyth_lazer_transaction.DeactivateFeed; - - /** - * Encodes the specified DeactivateFeed message. Does not implicitly {@link pyth_lazer_transaction.DeactivateFeed.verify|verify} messages. - * @param message DeactivateFeed message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.IDeactivateFeed, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified DeactivateFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DeactivateFeed.verify|verify} messages. - * @param message DeactivateFeed message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.IDeactivateFeed, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a DeactivateFeed message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeactivateFeed - * @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, - ): pyth_lazer_transaction.DeactivateFeed; - - /** - * Decodes a DeactivateFeed message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeactivateFeed - * @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, - ): pyth_lazer_transaction.DeactivateFeed; - - /** - * Verifies a DeactivateFeed 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 DeactivateFeed message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeactivateFeed - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.DeactivateFeed; - - /** - * Creates a plain object from a DeactivateFeed message. Also converts values to other types if specified. - * @param message DeactivateFeed - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.DeactivateFeed, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this DeactivateFeed to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeactivateFeed - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DynamicValue. */ - interface IDynamicValue { - /** DynamicValue stringValue */ - stringValue?: string | null; - - /** DynamicValue doubleValue */ - doubleValue?: number | null; - - /** DynamicValue uintValue */ - uintValue?: number | Long | null; - - /** DynamicValue intValue */ - intValue?: number | Long | null; - - /** DynamicValue boolValue */ - boolValue?: boolean | null; - - /** DynamicValue bytesValue */ - bytesValue?: Uint8Array | null; - - /** DynamicValue durationValue */ - durationValue?: google.protobuf.IDuration | null; - - /** DynamicValue timestampValue */ - timestampValue?: google.protobuf.ITimestamp | null; - - /** DynamicValue list */ - list?: pyth_lazer_transaction.DynamicValue.IList | null; - - /** DynamicValue map */ - map?: pyth_lazer_transaction.DynamicValue.IMap | null; - } - - /** Represents a DynamicValue. */ - class DynamicValue implements IDynamicValue { - /** - * Constructs a new DynamicValue. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IDynamicValue); - - /** DynamicValue stringValue. */ - public stringValue?: string | null; - - /** DynamicValue doubleValue. */ - public doubleValue?: number | null; - - /** DynamicValue uintValue. */ - public uintValue?: number | Long | null; - - /** DynamicValue intValue. */ - public intValue?: number | Long | null; - - /** DynamicValue boolValue. */ - public boolValue?: boolean | null; - - /** DynamicValue bytesValue. */ - public bytesValue?: Uint8Array | null; - - /** DynamicValue durationValue. */ - public durationValue?: google.protobuf.IDuration | null; - - /** DynamicValue timestampValue. */ - public timestampValue?: google.protobuf.ITimestamp | null; - - /** DynamicValue list. */ - public list?: pyth_lazer_transaction.DynamicValue.IList | null; - - /** DynamicValue map. */ - public map?: pyth_lazer_transaction.DynamicValue.IMap | null; - - /** DynamicValue value. */ - public value?: - | "stringValue" - | "doubleValue" - | "uintValue" - | "intValue" - | "boolValue" - | "bytesValue" - | "durationValue" - | "timestampValue" - | "list" - | "map"; - - /** - * Creates a new DynamicValue instance using the specified properties. - * @param [properties] Properties to set - * @returns DynamicValue instance - */ - public static create( - properties?: pyth_lazer_transaction.IDynamicValue, - ): pyth_lazer_transaction.DynamicValue; - - /** - * Encodes the specified DynamicValue message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.verify|verify} messages. - * @param message DynamicValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.IDynamicValue, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified DynamicValue message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.verify|verify} messages. - * @param message DynamicValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.IDynamicValue, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a DynamicValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DynamicValue - * @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, - ): pyth_lazer_transaction.DynamicValue; - - /** - * Decodes a DynamicValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DynamicValue - * @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, - ): pyth_lazer_transaction.DynamicValue; - - /** - * Verifies a DynamicValue 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 DynamicValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DynamicValue - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.DynamicValue; - - /** - * Creates a plain object from a DynamicValue message. Also converts values to other types if specified. - * @param message DynamicValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.DynamicValue, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this DynamicValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DynamicValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DynamicValue { - /** Properties of a List. */ - interface IList { - /** List items */ - items?: pyth_lazer_transaction.IDynamicValue[] | null; - } - - /** Represents a List. */ - class List implements IList { - /** - * Constructs a new List. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.DynamicValue.IList); - - /** List items. */ - public items: pyth_lazer_transaction.IDynamicValue[]; - - /** - * Creates a new List instance using the specified properties. - * @param [properties] Properties to set - * @returns List instance - */ - public static create( - properties?: pyth_lazer_transaction.DynamicValue.IList, - ): pyth_lazer_transaction.DynamicValue.List; - - /** - * Encodes the specified List message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.List.verify|verify} messages. - * @param message List message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.DynamicValue.IList, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified List message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.List.verify|verify} messages. - * @param message List message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.DynamicValue.IList, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a List message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns List - * @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, - ): pyth_lazer_transaction.DynamicValue.List; - - /** - * Decodes a List message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns List - * @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, - ): pyth_lazer_transaction.DynamicValue.List; - - /** - * Verifies a List 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 List message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns List - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.DynamicValue.List; - - /** - * Creates a plain object from a List message. Also converts values to other types if specified. - * @param message List - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.DynamicValue.List, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this List to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for List - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MapItem. */ - interface IMapItem { - /** MapItem key */ - key?: string | null; - - /** MapItem value */ - value?: pyth_lazer_transaction.IDynamicValue | null; - } - - /** Represents a MapItem. */ - class MapItem implements IMapItem { - /** - * Constructs a new MapItem. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.DynamicValue.IMapItem); - - /** MapItem key. */ - public key?: string | null; - - /** MapItem value. */ - public value?: pyth_lazer_transaction.IDynamicValue | null; - - /** MapItem _key. */ - public _key?: "key"; - - /** MapItem _value. */ - public _value?: "value"; - - /** - * Creates a new MapItem instance using the specified properties. - * @param [properties] Properties to set - * @returns MapItem instance - */ - public static create( - properties?: pyth_lazer_transaction.DynamicValue.IMapItem, - ): pyth_lazer_transaction.DynamicValue.MapItem; - - /** - * Encodes the specified MapItem message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.MapItem.verify|verify} messages. - * @param message MapItem message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.DynamicValue.IMapItem, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified MapItem message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.MapItem.verify|verify} messages. - * @param message MapItem message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.DynamicValue.IMapItem, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a MapItem message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MapItem - * @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, - ): pyth_lazer_transaction.DynamicValue.MapItem; - - /** - * Decodes a MapItem message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MapItem - * @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, - ): pyth_lazer_transaction.DynamicValue.MapItem; - - /** - * Verifies a MapItem 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 MapItem message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MapItem - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.DynamicValue.MapItem; - - /** - * Creates a plain object from a MapItem message. Also converts values to other types if specified. - * @param message MapItem - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.DynamicValue.MapItem, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this MapItem to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MapItem - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Map. */ - interface IMap { - /** Map items */ - items?: pyth_lazer_transaction.DynamicValue.IMapItem[] | null; - } - - /** Represents a Map. */ - class Map implements IMap { - /** - * Constructs a new Map. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.DynamicValue.IMap); - - /** Map items. */ - public items: pyth_lazer_transaction.DynamicValue.IMapItem[]; - - /** - * Creates a new Map instance using the specified properties. - * @param [properties] Properties to set - * @returns Map instance - */ - public static create( - properties?: pyth_lazer_transaction.DynamicValue.IMap, - ): pyth_lazer_transaction.DynamicValue.Map; - - /** - * Encodes the specified Map message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.Map.verify|verify} messages. - * @param message Map message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.DynamicValue.IMap, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified Map message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.Map.verify|verify} messages. - * @param message Map message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.DynamicValue.IMap, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a Map message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Map - * @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, - ): pyth_lazer_transaction.DynamicValue.Map; - - /** - * Decodes a Map message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Map - * @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, - ): pyth_lazer_transaction.DynamicValue.Map; - - /** - * Verifies a Map 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 Map message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Map - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.DynamicValue.Map; - - /** - * Creates a plain object from a Map message. Also converts values to other types if specified. - * @param message Map - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.DynamicValue.Map, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this Map to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Map - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } -} - -/** Namespace google. */ -export namespace google { - /** Namespace protobuf. */ - namespace protobuf { - /** Properties of a Timestamp. */ - interface ITimestamp { - /** Timestamp seconds */ - seconds?: number | Long | null; - - /** Timestamp nanos */ - nanos?: number | null; - } - - /** Represents a Timestamp. */ - class Timestamp implements ITimestamp { - /** - * Constructs a new Timestamp. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ITimestamp); - - /** Timestamp seconds. */ - public seconds: number | Long; - - /** Timestamp nanos. */ - public nanos: number; - - /** - * Creates a new Timestamp instance using the specified properties. - * @param [properties] Properties to set - * @returns Timestamp instance - */ - public static create( - properties?: google.protobuf.ITimestamp, - ): google.protobuf.Timestamp; - - /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: google.protobuf.ITimestamp, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: google.protobuf.ITimestamp, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a Timestamp message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Timestamp - * @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.Timestamp; - - /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Timestamp - * @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.Timestamp; - - /** - * Verifies a Timestamp 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 Timestamp message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Timestamp - */ - public static fromObject(object: { - [k: string]: any; - }): google.protobuf.Timestamp; - - /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @param message Timestamp - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: google.protobuf.Timestamp, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this Timestamp to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Timestamp - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Duration. */ - interface IDuration { - /** Duration seconds */ - seconds?: number | Long | null; - - /** Duration nanos */ - nanos?: number | null; - } - - /** Represents a Duration. */ - class Duration implements IDuration { - /** - * Constructs a new Duration. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDuration); - - /** Duration seconds. */ - public seconds: number | Long; - - /** Duration nanos. */ - public nanos: number; - - /** - * Creates a new Duration instance using the specified properties. - * @param [properties] Properties to set - * @returns Duration instance - */ - public static create( - properties?: google.protobuf.IDuration, - ): google.protobuf.Duration; - - /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: google.protobuf.IDuration, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: google.protobuf.IDuration, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a Duration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Duration - * @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.Duration; - - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Duration - * @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.Duration; - - /** - * Verifies a Duration 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 Duration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Duration - */ - public static fromObject(object: { - [k: string]: any; - }): google.protobuf.Duration; - - /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @param message Duration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: google.protobuf.Duration, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this Duration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Duration - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** 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 }; - - /** - * Gets the default type url for Empty - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } -} diff --git a/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/lazer_functions.ts b/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/lazer_functions.ts index d4618a480c..d50cccb8d6 100644 --- a/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/lazer_functions.ts +++ b/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/lazer_functions.ts @@ -7,7 +7,7 @@ import { LazerState, LazerFeedMetadata, } from "../types"; -import { pyth_lazer_transaction } from "./generated/governance_instruction"; +import { pyth_lazer_transaction } from "@pythnetwork/pyth-lazer-state-sdk/governance"; /** * Converts LazerFeedMetadata to protobuf IMap format using protobufjs fromObject diff --git a/governance/xc_admin/packages/xc_admin_common/tsconfig.json b/governance/xc_admin/packages/xc_admin_common/tsconfig.json index 54e1265b78..b4ecf3ed8b 100644 --- a/governance/xc_admin/packages/xc_admin_common/tsconfig.json +++ b/governance/xc_admin/packages/xc_admin_common/tsconfig.json @@ -4,6 +4,8 @@ "exclude": ["node_modules", "**/__tests__/*"], "compilerOptions": { "rootDir": "src/", - "outDir": "./lib" + "outDir": "./lib", + "module": "NodeNext", + "moduleResolution": "NodeNext" } } diff --git a/governance/xc_admin/packages/xc_admin_frontend/package.json b/governance/xc_admin/packages/xc_admin_frontend/package.json index f1471e286e..495810dc99 100644 --- a/governance/xc_admin/packages/xc_admin_frontend/package.json +++ b/governance/xc_admin/packages/xc_admin_frontend/package.json @@ -22,6 +22,7 @@ "@pythnetwork/client": "catalog:", "@pythnetwork/solana-utils": "workspace:^", "@pythnetwork/xc-admin-common": "workspace:*", + "@pythnetwork/pyth-lazer-state-sdk": "workspace:*", "@radix-ui/react-label": "^2.0.0", "@radix-ui/react-tooltip": "^1.0.3", "@solana/spl-token": "^0.3.7", diff --git a/governance/xc_admin/packages/xc_admin_frontend/tsconfig.json b/governance/xc_admin/packages/xc_admin_frontend/tsconfig.json index b4165b9d9f..a6c9cd5fb2 100644 --- a/governance/xc_admin/packages/xc_admin_frontend/tsconfig.json +++ b/governance/xc_admin/packages/xc_admin_frontend/tsconfig.json @@ -7,8 +7,8 @@ "forceConsistentCasingInFileNames": true, "noEmit": true, "esModuleInterop": true, - "module": "esnext", - "moduleResolution": "node", + "module": "NodeNext", + "moduleResolution": "NodeNext", "resolveJsonModule": true, "isolatedModules": true, "jsx": "preserve", diff --git a/lazer/state_sdk/js/package.json b/lazer/state_sdk/js/package.json new file mode 100644 index 0000000000..b8c3dbc2c1 --- /dev/null +++ b/lazer/state_sdk/js/package.json @@ -0,0 +1,43 @@ +{ + "name": "@pythnetwork/pyth-lazer-state-sdk", + "version": "0.0.1", + "description": "Pyth Lazer State SDK", + "publishConfig": { + "access": "public" + }, + "exports": { + "./governance": { + "types": "./src/generated/governance_instruction.d.ts", + "default": "./src/generated/governance_instruction.cjs" + }, + "./state": { + "types": "./src/generated/state.d.ts", + "default": "./src/generated/state.cjs" + } + }, + "scripts": { + "build:pbjs-esm": "npx pbjs -t static-module -w es6 -o src/generated/governance_instruction.js ../../publisher_sdk/proto/governance_instruction.proto ../../publisher_sdk/proto/dynamic_value.proto", + "build:pbjs-cjs": "npx pbjs -t static-module -w commonjs -o src/generated/governance_instruction.cjs ../../publisher_sdk/proto/governance_instruction.proto ../../publisher_sdk/proto/dynamic_value.proto", + "build:pbts": "npx pbts -o src/generated/governance_instruction.d.ts src/generated/governance_instruction.js" + }, + "devDependencies": { + "protobufjs-cli": "^1.1.3" + }, + "bugs": { + "url": "https://github.com/pyth-network/pyth-crosschain/issues" + }, + "homepage": "https://github.com/pyth-network/pyth-crosschain/tree/main/lazer/state_sdk/js", + "repository": { + "type": "git", + "url": "https://github.com/pyth-network/pyth-crosschain", + "directory": "lazer/state_sdk/js" + }, + "keywords": [ + "pyth", + "oracle" + ], + "license": "Apache-2.0", + "dependencies": { + + } +} diff --git a/lazer/state_sdk/js/src/generated/governance_instruction.cjs b/lazer/state_sdk/js/src/generated/governance_instruction.cjs new file mode 100644 index 0000000000..d38a727688 --- /dev/null +++ b/lazer/state_sdk/js/src/generated/governance_instruction.cjs @@ -0,0 +1,10279 @@ +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +"use strict"; + +var $protobuf = require("protobufjs/minimal"); + +// Common aliases +var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + +// Exported root namespace +var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); + +$root.pyth_lazer_transaction = (function() { + + /** + * Namespace pyth_lazer_transaction. + * @exports pyth_lazer_transaction + * @namespace + */ + var pyth_lazer_transaction = {}; + + pyth_lazer_transaction.GovernanceInstruction = (function() { + + /** + * Properties of a GovernanceInstruction. + * @memberof pyth_lazer_transaction + * @interface IGovernanceInstruction + * @property {Array.|null} [directives] GovernanceInstruction directives + * @property {google.protobuf.ITimestamp|null} [minExecutionTimestamp] GovernanceInstruction minExecutionTimestamp + * @property {google.protobuf.ITimestamp|null} [maxExecutionTimestamp] GovernanceInstruction maxExecutionTimestamp + * @property {number|null} [governanceSequenceNo] GovernanceInstruction governanceSequenceNo + */ + + /** + * Constructs a new GovernanceInstruction. + * @memberof pyth_lazer_transaction + * @classdesc Represents a GovernanceInstruction. + * @implements IGovernanceInstruction + * @constructor + * @param {pyth_lazer_transaction.IGovernanceInstruction=} [properties] Properties to set + */ + function GovernanceInstruction(properties) { + this.directives = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GovernanceInstruction directives. + * @member {Array.} directives + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @instance + */ + GovernanceInstruction.prototype.directives = $util.emptyArray; + + /** + * GovernanceInstruction minExecutionTimestamp. + * @member {google.protobuf.ITimestamp|null|undefined} minExecutionTimestamp + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @instance + */ + GovernanceInstruction.prototype.minExecutionTimestamp = null; + + /** + * GovernanceInstruction maxExecutionTimestamp. + * @member {google.protobuf.ITimestamp|null|undefined} maxExecutionTimestamp + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @instance + */ + GovernanceInstruction.prototype.maxExecutionTimestamp = null; + + /** + * GovernanceInstruction governanceSequenceNo. + * @member {number|null|undefined} governanceSequenceNo + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @instance + */ + GovernanceInstruction.prototype.governanceSequenceNo = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GovernanceInstruction _minExecutionTimestamp. + * @member {"minExecutionTimestamp"|undefined} _minExecutionTimestamp + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @instance + */ + Object.defineProperty(GovernanceInstruction.prototype, "_minExecutionTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["minExecutionTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * GovernanceInstruction _maxExecutionTimestamp. + * @member {"maxExecutionTimestamp"|undefined} _maxExecutionTimestamp + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @instance + */ + Object.defineProperty(GovernanceInstruction.prototype, "_maxExecutionTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["maxExecutionTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * GovernanceInstruction _governanceSequenceNo. + * @member {"governanceSequenceNo"|undefined} _governanceSequenceNo + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @instance + */ + Object.defineProperty(GovernanceInstruction.prototype, "_governanceSequenceNo", { + get: $util.oneOfGetter($oneOfFields = ["governanceSequenceNo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GovernanceInstruction instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @static + * @param {pyth_lazer_transaction.IGovernanceInstruction=} [properties] Properties to set + * @returns {pyth_lazer_transaction.GovernanceInstruction} GovernanceInstruction instance + */ + GovernanceInstruction.create = function create(properties) { + return new GovernanceInstruction(properties); + }; + + /** + * Encodes the specified GovernanceInstruction message. Does not implicitly {@link pyth_lazer_transaction.GovernanceInstruction.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @static + * @param {pyth_lazer_transaction.IGovernanceInstruction} message GovernanceInstruction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GovernanceInstruction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.directives != null && message.directives.length) + for (var i = 0; i < message.directives.length; ++i) + $root.pyth_lazer_transaction.GovernanceDirective.encode(message.directives[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.minExecutionTimestamp != null && Object.hasOwnProperty.call(message, "minExecutionTimestamp")) + $root.google.protobuf.Timestamp.encode(message.minExecutionTimestamp, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.maxExecutionTimestamp != null && Object.hasOwnProperty.call(message, "maxExecutionTimestamp")) + $root.google.protobuf.Timestamp.encode(message.maxExecutionTimestamp, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.governanceSequenceNo != null && Object.hasOwnProperty.call(message, "governanceSequenceNo")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.governanceSequenceNo); + return writer; + }; + + /** + * Encodes the specified GovernanceInstruction message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceInstruction.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @static + * @param {pyth_lazer_transaction.IGovernanceInstruction} message GovernanceInstruction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GovernanceInstruction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GovernanceInstruction message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.GovernanceInstruction} GovernanceInstruction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GovernanceInstruction.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.GovernanceInstruction(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + if (!(message.directives && message.directives.length)) + message.directives = []; + message.directives.push($root.pyth_lazer_transaction.GovernanceDirective.decode(reader, reader.uint32())); + break; + } + case 3: { + message.minExecutionTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.maxExecutionTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.governanceSequenceNo = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GovernanceInstruction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.GovernanceInstruction} GovernanceInstruction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GovernanceInstruction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GovernanceInstruction message. + * @function verify + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GovernanceInstruction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.directives != null && message.hasOwnProperty("directives")) { + if (!Array.isArray(message.directives)) + return "directives: array expected"; + for (var i = 0; i < message.directives.length; ++i) { + var error = $root.pyth_lazer_transaction.GovernanceDirective.verify(message.directives[i]); + if (error) + return "directives." + error; + } + } + if (message.minExecutionTimestamp != null && message.hasOwnProperty("minExecutionTimestamp")) { + properties._minExecutionTimestamp = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.minExecutionTimestamp); + if (error) + return "minExecutionTimestamp." + error; + } + } + if (message.maxExecutionTimestamp != null && message.hasOwnProperty("maxExecutionTimestamp")) { + properties._maxExecutionTimestamp = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.maxExecutionTimestamp); + if (error) + return "maxExecutionTimestamp." + error; + } + } + if (message.governanceSequenceNo != null && message.hasOwnProperty("governanceSequenceNo")) { + properties._governanceSequenceNo = 1; + if (!$util.isInteger(message.governanceSequenceNo)) + return "governanceSequenceNo: integer expected"; + } + return null; + }; + + /** + * Creates a GovernanceInstruction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.GovernanceInstruction} GovernanceInstruction + */ + GovernanceInstruction.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.GovernanceInstruction) + return object; + var message = new $root.pyth_lazer_transaction.GovernanceInstruction(); + if (object.directives) { + if (!Array.isArray(object.directives)) + throw TypeError(".pyth_lazer_transaction.GovernanceInstruction.directives: array expected"); + message.directives = []; + for (var i = 0; i < object.directives.length; ++i) { + if (typeof object.directives[i] !== "object") + throw TypeError(".pyth_lazer_transaction.GovernanceInstruction.directives: object expected"); + message.directives[i] = $root.pyth_lazer_transaction.GovernanceDirective.fromObject(object.directives[i]); + } + } + if (object.minExecutionTimestamp != null) { + if (typeof object.minExecutionTimestamp !== "object") + throw TypeError(".pyth_lazer_transaction.GovernanceInstruction.minExecutionTimestamp: object expected"); + message.minExecutionTimestamp = $root.google.protobuf.Timestamp.fromObject(object.minExecutionTimestamp); + } + if (object.maxExecutionTimestamp != null) { + if (typeof object.maxExecutionTimestamp !== "object") + throw TypeError(".pyth_lazer_transaction.GovernanceInstruction.maxExecutionTimestamp: object expected"); + message.maxExecutionTimestamp = $root.google.protobuf.Timestamp.fromObject(object.maxExecutionTimestamp); + } + if (object.governanceSequenceNo != null) + message.governanceSequenceNo = object.governanceSequenceNo >>> 0; + return message; + }; + + /** + * Creates a plain object from a GovernanceInstruction message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @static + * @param {pyth_lazer_transaction.GovernanceInstruction} message GovernanceInstruction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GovernanceInstruction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.directives = []; + if (message.directives && message.directives.length) { + object.directives = []; + for (var j = 0; j < message.directives.length; ++j) + object.directives[j] = $root.pyth_lazer_transaction.GovernanceDirective.toObject(message.directives[j], options); + } + if (message.minExecutionTimestamp != null && message.hasOwnProperty("minExecutionTimestamp")) { + object.minExecutionTimestamp = $root.google.protobuf.Timestamp.toObject(message.minExecutionTimestamp, options); + if (options.oneofs) + object._minExecutionTimestamp = "minExecutionTimestamp"; + } + if (message.maxExecutionTimestamp != null && message.hasOwnProperty("maxExecutionTimestamp")) { + object.maxExecutionTimestamp = $root.google.protobuf.Timestamp.toObject(message.maxExecutionTimestamp, options); + if (options.oneofs) + object._maxExecutionTimestamp = "maxExecutionTimestamp"; + } + if (message.governanceSequenceNo != null && message.hasOwnProperty("governanceSequenceNo")) { + object.governanceSequenceNo = message.governanceSequenceNo; + if (options.oneofs) + object._governanceSequenceNo = "governanceSequenceNo"; + } + return object; + }; + + /** + * Converts this GovernanceInstruction to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @instance + * @returns {Object.} JSON object + */ + GovernanceInstruction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GovernanceInstruction + * @function getTypeUrl + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GovernanceInstruction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.GovernanceInstruction"; + }; + + return GovernanceInstruction; + })(); + + pyth_lazer_transaction.ShardFilter = (function() { + + /** + * Properties of a ShardFilter. + * @memberof pyth_lazer_transaction + * @interface IShardFilter + * @property {google.protobuf.IEmpty|null} [allShards] ShardFilter allShards + * @property {pyth_lazer_transaction.ShardFilter.IShardNames|null} [shardNames] ShardFilter shardNames + * @property {pyth_lazer_transaction.ShardFilter.IShardGroups|null} [shardGroups] ShardFilter shardGroups + */ + + /** + * Constructs a new ShardFilter. + * @memberof pyth_lazer_transaction + * @classdesc Represents a ShardFilter. + * @implements IShardFilter + * @constructor + * @param {pyth_lazer_transaction.IShardFilter=} [properties] Properties to set + */ + function ShardFilter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ShardFilter allShards. + * @member {google.protobuf.IEmpty|null|undefined} allShards + * @memberof pyth_lazer_transaction.ShardFilter + * @instance + */ + ShardFilter.prototype.allShards = null; + + /** + * ShardFilter shardNames. + * @member {pyth_lazer_transaction.ShardFilter.IShardNames|null|undefined} shardNames + * @memberof pyth_lazer_transaction.ShardFilter + * @instance + */ + ShardFilter.prototype.shardNames = null; + + /** + * ShardFilter shardGroups. + * @member {pyth_lazer_transaction.ShardFilter.IShardGroups|null|undefined} shardGroups + * @memberof pyth_lazer_transaction.ShardFilter + * @instance + */ + ShardFilter.prototype.shardGroups = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ShardFilter filter. + * @member {"allShards"|"shardNames"|"shardGroups"|undefined} filter + * @memberof pyth_lazer_transaction.ShardFilter + * @instance + */ + Object.defineProperty(ShardFilter.prototype, "filter", { + get: $util.oneOfGetter($oneOfFields = ["allShards", "shardNames", "shardGroups"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ShardFilter instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.ShardFilter + * @static + * @param {pyth_lazer_transaction.IShardFilter=} [properties] Properties to set + * @returns {pyth_lazer_transaction.ShardFilter} ShardFilter instance + */ + ShardFilter.create = function create(properties) { + return new ShardFilter(properties); + }; + + /** + * Encodes the specified ShardFilter message. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.ShardFilter + * @static + * @param {pyth_lazer_transaction.IShardFilter} message ShardFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ShardFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allShards != null && Object.hasOwnProperty.call(message, "allShards")) + $root.google.protobuf.Empty.encode(message.allShards, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.shardNames != null && Object.hasOwnProperty.call(message, "shardNames")) + $root.pyth_lazer_transaction.ShardFilter.ShardNames.encode(message.shardNames, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.shardGroups != null && Object.hasOwnProperty.call(message, "shardGroups")) + $root.pyth_lazer_transaction.ShardFilter.ShardGroups.encode(message.shardGroups, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ShardFilter message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.ShardFilter + * @static + * @param {pyth_lazer_transaction.IShardFilter} message ShardFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ShardFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ShardFilter message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.ShardFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.ShardFilter} ShardFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ShardFilter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.ShardFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.allShards = $root.google.protobuf.Empty.decode(reader, reader.uint32()); + break; + } + case 2: { + message.shardNames = $root.pyth_lazer_transaction.ShardFilter.ShardNames.decode(reader, reader.uint32()); + break; + } + case 3: { + message.shardGroups = $root.pyth_lazer_transaction.ShardFilter.ShardGroups.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ShardFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.ShardFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.ShardFilter} ShardFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ShardFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ShardFilter message. + * @function verify + * @memberof pyth_lazer_transaction.ShardFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ShardFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.allShards != null && message.hasOwnProperty("allShards")) { + properties.filter = 1; + { + var error = $root.google.protobuf.Empty.verify(message.allShards); + if (error) + return "allShards." + error; + } + } + if (message.shardNames != null && message.hasOwnProperty("shardNames")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + { + var error = $root.pyth_lazer_transaction.ShardFilter.ShardNames.verify(message.shardNames); + if (error) + return "shardNames." + error; + } + } + if (message.shardGroups != null && message.hasOwnProperty("shardGroups")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + { + var error = $root.pyth_lazer_transaction.ShardFilter.ShardGroups.verify(message.shardGroups); + if (error) + return "shardGroups." + error; + } + } + return null; + }; + + /** + * Creates a ShardFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.ShardFilter + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.ShardFilter} ShardFilter + */ + ShardFilter.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.ShardFilter) + return object; + var message = new $root.pyth_lazer_transaction.ShardFilter(); + if (object.allShards != null) { + if (typeof object.allShards !== "object") + throw TypeError(".pyth_lazer_transaction.ShardFilter.allShards: object expected"); + message.allShards = $root.google.protobuf.Empty.fromObject(object.allShards); + } + if (object.shardNames != null) { + if (typeof object.shardNames !== "object") + throw TypeError(".pyth_lazer_transaction.ShardFilter.shardNames: object expected"); + message.shardNames = $root.pyth_lazer_transaction.ShardFilter.ShardNames.fromObject(object.shardNames); + } + if (object.shardGroups != null) { + if (typeof object.shardGroups !== "object") + throw TypeError(".pyth_lazer_transaction.ShardFilter.shardGroups: object expected"); + message.shardGroups = $root.pyth_lazer_transaction.ShardFilter.ShardGroups.fromObject(object.shardGroups); + } + return message; + }; + + /** + * Creates a plain object from a ShardFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.ShardFilter + * @static + * @param {pyth_lazer_transaction.ShardFilter} message ShardFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ShardFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.allShards != null && message.hasOwnProperty("allShards")) { + object.allShards = $root.google.protobuf.Empty.toObject(message.allShards, options); + if (options.oneofs) + object.filter = "allShards"; + } + if (message.shardNames != null && message.hasOwnProperty("shardNames")) { + object.shardNames = $root.pyth_lazer_transaction.ShardFilter.ShardNames.toObject(message.shardNames, options); + if (options.oneofs) + object.filter = "shardNames"; + } + if (message.shardGroups != null && message.hasOwnProperty("shardGroups")) { + object.shardGroups = $root.pyth_lazer_transaction.ShardFilter.ShardGroups.toObject(message.shardGroups, options); + if (options.oneofs) + object.filter = "shardGroups"; + } + return object; + }; + + /** + * Converts this ShardFilter to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.ShardFilter + * @instance + * @returns {Object.} JSON object + */ + ShardFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ShardFilter + * @function getTypeUrl + * @memberof pyth_lazer_transaction.ShardFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ShardFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.ShardFilter"; + }; + + ShardFilter.ShardNames = (function() { + + /** + * Properties of a ShardNames. + * @memberof pyth_lazer_transaction.ShardFilter + * @interface IShardNames + * @property {Array.|null} [shardNames] ShardNames shardNames + */ + + /** + * Constructs a new ShardNames. + * @memberof pyth_lazer_transaction.ShardFilter + * @classdesc Represents a ShardNames. + * @implements IShardNames + * @constructor + * @param {pyth_lazer_transaction.ShardFilter.IShardNames=} [properties] Properties to set + */ + function ShardNames(properties) { + this.shardNames = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ShardNames shardNames. + * @member {Array.} shardNames + * @memberof pyth_lazer_transaction.ShardFilter.ShardNames + * @instance + */ + ShardNames.prototype.shardNames = $util.emptyArray; + + /** + * Creates a new ShardNames instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.ShardFilter.ShardNames + * @static + * @param {pyth_lazer_transaction.ShardFilter.IShardNames=} [properties] Properties to set + * @returns {pyth_lazer_transaction.ShardFilter.ShardNames} ShardNames instance + */ + ShardNames.create = function create(properties) { + return new ShardNames(properties); + }; + + /** + * Encodes the specified ShardNames message. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardNames.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.ShardFilter.ShardNames + * @static + * @param {pyth_lazer_transaction.ShardFilter.IShardNames} message ShardNames message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ShardNames.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.shardNames != null && message.shardNames.length) + for (var i = 0; i < message.shardNames.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.shardNames[i]); + return writer; + }; + + /** + * Encodes the specified ShardNames message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardNames.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.ShardFilter.ShardNames + * @static + * @param {pyth_lazer_transaction.ShardFilter.IShardNames} message ShardNames message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ShardNames.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ShardNames message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.ShardFilter.ShardNames + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.ShardFilter.ShardNames} ShardNames + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ShardNames.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.ShardFilter.ShardNames(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.shardNames && message.shardNames.length)) + message.shardNames = []; + message.shardNames.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ShardNames message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.ShardFilter.ShardNames + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.ShardFilter.ShardNames} ShardNames + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ShardNames.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ShardNames message. + * @function verify + * @memberof pyth_lazer_transaction.ShardFilter.ShardNames + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ShardNames.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.shardNames != null && message.hasOwnProperty("shardNames")) { + if (!Array.isArray(message.shardNames)) + return "shardNames: array expected"; + for (var i = 0; i < message.shardNames.length; ++i) + if (!$util.isString(message.shardNames[i])) + return "shardNames: string[] expected"; + } + return null; + }; + + /** + * Creates a ShardNames message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.ShardFilter.ShardNames + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.ShardFilter.ShardNames} ShardNames + */ + ShardNames.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.ShardFilter.ShardNames) + return object; + var message = new $root.pyth_lazer_transaction.ShardFilter.ShardNames(); + if (object.shardNames) { + if (!Array.isArray(object.shardNames)) + throw TypeError(".pyth_lazer_transaction.ShardFilter.ShardNames.shardNames: array expected"); + message.shardNames = []; + for (var i = 0; i < object.shardNames.length; ++i) + message.shardNames[i] = String(object.shardNames[i]); + } + return message; + }; + + /** + * Creates a plain object from a ShardNames message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.ShardFilter.ShardNames + * @static + * @param {pyth_lazer_transaction.ShardFilter.ShardNames} message ShardNames + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ShardNames.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.shardNames = []; + if (message.shardNames && message.shardNames.length) { + object.shardNames = []; + for (var j = 0; j < message.shardNames.length; ++j) + object.shardNames[j] = message.shardNames[j]; + } + return object; + }; + + /** + * Converts this ShardNames to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.ShardFilter.ShardNames + * @instance + * @returns {Object.} JSON object + */ + ShardNames.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ShardNames + * @function getTypeUrl + * @memberof pyth_lazer_transaction.ShardFilter.ShardNames + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ShardNames.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.ShardFilter.ShardNames"; + }; + + return ShardNames; + })(); + + ShardFilter.ShardGroups = (function() { + + /** + * Properties of a ShardGroups. + * @memberof pyth_lazer_transaction.ShardFilter + * @interface IShardGroups + * @property {Array.|null} [shardGroups] ShardGroups shardGroups + */ + + /** + * Constructs a new ShardGroups. + * @memberof pyth_lazer_transaction.ShardFilter + * @classdesc Represents a ShardGroups. + * @implements IShardGroups + * @constructor + * @param {pyth_lazer_transaction.ShardFilter.IShardGroups=} [properties] Properties to set + */ + function ShardGroups(properties) { + this.shardGroups = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ShardGroups shardGroups. + * @member {Array.} shardGroups + * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups + * @instance + */ + ShardGroups.prototype.shardGroups = $util.emptyArray; + + /** + * Creates a new ShardGroups instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups + * @static + * @param {pyth_lazer_transaction.ShardFilter.IShardGroups=} [properties] Properties to set + * @returns {pyth_lazer_transaction.ShardFilter.ShardGroups} ShardGroups instance + */ + ShardGroups.create = function create(properties) { + return new ShardGroups(properties); + }; + + /** + * Encodes the specified ShardGroups message. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardGroups.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups + * @static + * @param {pyth_lazer_transaction.ShardFilter.IShardGroups} message ShardGroups message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ShardGroups.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.shardGroups != null && message.shardGroups.length) + for (var i = 0; i < message.shardGroups.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.shardGroups[i]); + return writer; + }; + + /** + * Encodes the specified ShardGroups message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardGroups.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups + * @static + * @param {pyth_lazer_transaction.ShardFilter.IShardGroups} message ShardGroups message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ShardGroups.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ShardGroups message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.ShardFilter.ShardGroups} ShardGroups + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ShardGroups.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.ShardFilter.ShardGroups(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.shardGroups && message.shardGroups.length)) + message.shardGroups = []; + message.shardGroups.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ShardGroups message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.ShardFilter.ShardGroups} ShardGroups + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ShardGroups.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ShardGroups message. + * @function verify + * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ShardGroups.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.shardGroups != null && message.hasOwnProperty("shardGroups")) { + if (!Array.isArray(message.shardGroups)) + return "shardGroups: array expected"; + for (var i = 0; i < message.shardGroups.length; ++i) + if (!$util.isString(message.shardGroups[i])) + return "shardGroups: string[] expected"; + } + return null; + }; + + /** + * Creates a ShardGroups message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.ShardFilter.ShardGroups} ShardGroups + */ + ShardGroups.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.ShardFilter.ShardGroups) + return object; + var message = new $root.pyth_lazer_transaction.ShardFilter.ShardGroups(); + if (object.shardGroups) { + if (!Array.isArray(object.shardGroups)) + throw TypeError(".pyth_lazer_transaction.ShardFilter.ShardGroups.shardGroups: array expected"); + message.shardGroups = []; + for (var i = 0; i < object.shardGroups.length; ++i) + message.shardGroups[i] = String(object.shardGroups[i]); + } + return message; + }; + + /** + * Creates a plain object from a ShardGroups message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups + * @static + * @param {pyth_lazer_transaction.ShardFilter.ShardGroups} message ShardGroups + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ShardGroups.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.shardGroups = []; + if (message.shardGroups && message.shardGroups.length) { + object.shardGroups = []; + for (var j = 0; j < message.shardGroups.length; ++j) + object.shardGroups[j] = message.shardGroups[j]; + } + return object; + }; + + /** + * Converts this ShardGroups to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups + * @instance + * @returns {Object.} JSON object + */ + ShardGroups.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ShardGroups + * @function getTypeUrl + * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ShardGroups.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.ShardFilter.ShardGroups"; + }; + + return ShardGroups; + })(); + + return ShardFilter; + })(); + + pyth_lazer_transaction.GovernanceDirective = (function() { + + /** + * Properties of a GovernanceDirective. + * @memberof pyth_lazer_transaction + * @interface IGovernanceDirective + * @property {pyth_lazer_transaction.IShardFilter|null} [shardFilter] GovernanceDirective shardFilter + * @property {pyth_lazer_transaction.ICreateShard|null} [createShard] GovernanceDirective createShard + * @property {pyth_lazer_transaction.IAddGovernanceSource|null} [addGovernanceSource] GovernanceDirective addGovernanceSource + * @property {pyth_lazer_transaction.IUpdateGovernanceSource|null} [updateGovernanceSource] GovernanceDirective updateGovernanceSource + * @property {pyth_lazer_transaction.ISetShardName|null} [setShardName] GovernanceDirective setShardName + * @property {pyth_lazer_transaction.ISetShardGroup|null} [setShardGroup] GovernanceDirective setShardGroup + * @property {pyth_lazer_transaction.IResetLastSequenceNo|null} [resetLastSequenceNo] GovernanceDirective resetLastSequenceNo + * @property {pyth_lazer_transaction.IAddPublisher|null} [addPublisher] GovernanceDirective addPublisher + * @property {pyth_lazer_transaction.IUpdatePublisher|null} [updatePublisher] GovernanceDirective updatePublisher + * @property {pyth_lazer_transaction.IAddFeed|null} [addFeed] GovernanceDirective addFeed + * @property {pyth_lazer_transaction.IUpdateFeed|null} [updateFeed] GovernanceDirective updateFeed + */ + + /** + * Constructs a new GovernanceDirective. + * @memberof pyth_lazer_transaction + * @classdesc Represents a GovernanceDirective. + * @implements IGovernanceDirective + * @constructor + * @param {pyth_lazer_transaction.IGovernanceDirective=} [properties] Properties to set + */ + function GovernanceDirective(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GovernanceDirective shardFilter. + * @member {pyth_lazer_transaction.IShardFilter|null|undefined} shardFilter + * @memberof pyth_lazer_transaction.GovernanceDirective + * @instance + */ + GovernanceDirective.prototype.shardFilter = null; + + /** + * GovernanceDirective createShard. + * @member {pyth_lazer_transaction.ICreateShard|null|undefined} createShard + * @memberof pyth_lazer_transaction.GovernanceDirective + * @instance + */ + GovernanceDirective.prototype.createShard = null; + + /** + * GovernanceDirective addGovernanceSource. + * @member {pyth_lazer_transaction.IAddGovernanceSource|null|undefined} addGovernanceSource + * @memberof pyth_lazer_transaction.GovernanceDirective + * @instance + */ + GovernanceDirective.prototype.addGovernanceSource = null; + + /** + * GovernanceDirective updateGovernanceSource. + * @member {pyth_lazer_transaction.IUpdateGovernanceSource|null|undefined} updateGovernanceSource + * @memberof pyth_lazer_transaction.GovernanceDirective + * @instance + */ + GovernanceDirective.prototype.updateGovernanceSource = null; + + /** + * GovernanceDirective setShardName. + * @member {pyth_lazer_transaction.ISetShardName|null|undefined} setShardName + * @memberof pyth_lazer_transaction.GovernanceDirective + * @instance + */ + GovernanceDirective.prototype.setShardName = null; + + /** + * GovernanceDirective setShardGroup. + * @member {pyth_lazer_transaction.ISetShardGroup|null|undefined} setShardGroup + * @memberof pyth_lazer_transaction.GovernanceDirective + * @instance + */ + GovernanceDirective.prototype.setShardGroup = null; + + /** + * GovernanceDirective resetLastSequenceNo. + * @member {pyth_lazer_transaction.IResetLastSequenceNo|null|undefined} resetLastSequenceNo + * @memberof pyth_lazer_transaction.GovernanceDirective + * @instance + */ + GovernanceDirective.prototype.resetLastSequenceNo = null; + + /** + * GovernanceDirective addPublisher. + * @member {pyth_lazer_transaction.IAddPublisher|null|undefined} addPublisher + * @memberof pyth_lazer_transaction.GovernanceDirective + * @instance + */ + GovernanceDirective.prototype.addPublisher = null; + + /** + * GovernanceDirective updatePublisher. + * @member {pyth_lazer_transaction.IUpdatePublisher|null|undefined} updatePublisher + * @memberof pyth_lazer_transaction.GovernanceDirective + * @instance + */ + GovernanceDirective.prototype.updatePublisher = null; + + /** + * GovernanceDirective addFeed. + * @member {pyth_lazer_transaction.IAddFeed|null|undefined} addFeed + * @memberof pyth_lazer_transaction.GovernanceDirective + * @instance + */ + GovernanceDirective.prototype.addFeed = null; + + /** + * GovernanceDirective updateFeed. + * @member {pyth_lazer_transaction.IUpdateFeed|null|undefined} updateFeed + * @memberof pyth_lazer_transaction.GovernanceDirective + * @instance + */ + GovernanceDirective.prototype.updateFeed = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GovernanceDirective _shardFilter. + * @member {"shardFilter"|undefined} _shardFilter + * @memberof pyth_lazer_transaction.GovernanceDirective + * @instance + */ + Object.defineProperty(GovernanceDirective.prototype, "_shardFilter", { + get: $util.oneOfGetter($oneOfFields = ["shardFilter"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * GovernanceDirective action. + * @member {"createShard"|"addGovernanceSource"|"updateGovernanceSource"|"setShardName"|"setShardGroup"|"resetLastSequenceNo"|"addPublisher"|"updatePublisher"|"addFeed"|"updateFeed"|undefined} action + * @memberof pyth_lazer_transaction.GovernanceDirective + * @instance + */ + Object.defineProperty(GovernanceDirective.prototype, "action", { + get: $util.oneOfGetter($oneOfFields = ["createShard", "addGovernanceSource", "updateGovernanceSource", "setShardName", "setShardGroup", "resetLastSequenceNo", "addPublisher", "updatePublisher", "addFeed", "updateFeed"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GovernanceDirective instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.GovernanceDirective + * @static + * @param {pyth_lazer_transaction.IGovernanceDirective=} [properties] Properties to set + * @returns {pyth_lazer_transaction.GovernanceDirective} GovernanceDirective instance + */ + GovernanceDirective.create = function create(properties) { + return new GovernanceDirective(properties); + }; + + /** + * Encodes the specified GovernanceDirective message. Does not implicitly {@link pyth_lazer_transaction.GovernanceDirective.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.GovernanceDirective + * @static + * @param {pyth_lazer_transaction.IGovernanceDirective} message GovernanceDirective message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GovernanceDirective.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.shardFilter != null && Object.hasOwnProperty.call(message, "shardFilter")) + $root.pyth_lazer_transaction.ShardFilter.encode(message.shardFilter, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.createShard != null && Object.hasOwnProperty.call(message, "createShard")) + $root.pyth_lazer_transaction.CreateShard.encode(message.createShard, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); + if (message.addGovernanceSource != null && Object.hasOwnProperty.call(message, "addGovernanceSource")) + $root.pyth_lazer_transaction.AddGovernanceSource.encode(message.addGovernanceSource, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); + if (message.updateGovernanceSource != null && Object.hasOwnProperty.call(message, "updateGovernanceSource")) + $root.pyth_lazer_transaction.UpdateGovernanceSource.encode(message.updateGovernanceSource, writer.uint32(/* id 103, wireType 2 =*/826).fork()).ldelim(); + if (message.setShardName != null && Object.hasOwnProperty.call(message, "setShardName")) + $root.pyth_lazer_transaction.SetShardName.encode(message.setShardName, writer.uint32(/* id 104, wireType 2 =*/834).fork()).ldelim(); + if (message.setShardGroup != null && Object.hasOwnProperty.call(message, "setShardGroup")) + $root.pyth_lazer_transaction.SetShardGroup.encode(message.setShardGroup, writer.uint32(/* id 105, wireType 2 =*/842).fork()).ldelim(); + if (message.resetLastSequenceNo != null && Object.hasOwnProperty.call(message, "resetLastSequenceNo")) + $root.pyth_lazer_transaction.ResetLastSequenceNo.encode(message.resetLastSequenceNo, writer.uint32(/* id 106, wireType 2 =*/850).fork()).ldelim(); + if (message.addPublisher != null && Object.hasOwnProperty.call(message, "addPublisher")) + $root.pyth_lazer_transaction.AddPublisher.encode(message.addPublisher, writer.uint32(/* id 107, wireType 2 =*/858).fork()).ldelim(); + if (message.updatePublisher != null && Object.hasOwnProperty.call(message, "updatePublisher")) + $root.pyth_lazer_transaction.UpdatePublisher.encode(message.updatePublisher, writer.uint32(/* id 108, wireType 2 =*/866).fork()).ldelim(); + if (message.addFeed != null && Object.hasOwnProperty.call(message, "addFeed")) + $root.pyth_lazer_transaction.AddFeed.encode(message.addFeed, writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim(); + if (message.updateFeed != null && Object.hasOwnProperty.call(message, "updateFeed")) + $root.pyth_lazer_transaction.UpdateFeed.encode(message.updateFeed, writer.uint32(/* id 110, wireType 2 =*/882).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GovernanceDirective message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceDirective.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.GovernanceDirective + * @static + * @param {pyth_lazer_transaction.IGovernanceDirective} message GovernanceDirective message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GovernanceDirective.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GovernanceDirective message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.GovernanceDirective + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.GovernanceDirective} GovernanceDirective + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GovernanceDirective.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.GovernanceDirective(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.shardFilter = $root.pyth_lazer_transaction.ShardFilter.decode(reader, reader.uint32()); + break; + } + case 101: { + message.createShard = $root.pyth_lazer_transaction.CreateShard.decode(reader, reader.uint32()); + break; + } + case 102: { + message.addGovernanceSource = $root.pyth_lazer_transaction.AddGovernanceSource.decode(reader, reader.uint32()); + break; + } + case 103: { + message.updateGovernanceSource = $root.pyth_lazer_transaction.UpdateGovernanceSource.decode(reader, reader.uint32()); + break; + } + case 104: { + message.setShardName = $root.pyth_lazer_transaction.SetShardName.decode(reader, reader.uint32()); + break; + } + case 105: { + message.setShardGroup = $root.pyth_lazer_transaction.SetShardGroup.decode(reader, reader.uint32()); + break; + } + case 106: { + message.resetLastSequenceNo = $root.pyth_lazer_transaction.ResetLastSequenceNo.decode(reader, reader.uint32()); + break; + } + case 107: { + message.addPublisher = $root.pyth_lazer_transaction.AddPublisher.decode(reader, reader.uint32()); + break; + } + case 108: { + message.updatePublisher = $root.pyth_lazer_transaction.UpdatePublisher.decode(reader, reader.uint32()); + break; + } + case 109: { + message.addFeed = $root.pyth_lazer_transaction.AddFeed.decode(reader, reader.uint32()); + break; + } + case 110: { + message.updateFeed = $root.pyth_lazer_transaction.UpdateFeed.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GovernanceDirective message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.GovernanceDirective + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.GovernanceDirective} GovernanceDirective + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GovernanceDirective.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GovernanceDirective message. + * @function verify + * @memberof pyth_lazer_transaction.GovernanceDirective + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GovernanceDirective.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.shardFilter != null && message.hasOwnProperty("shardFilter")) { + properties._shardFilter = 1; + { + var error = $root.pyth_lazer_transaction.ShardFilter.verify(message.shardFilter); + if (error) + return "shardFilter." + error; + } + } + if (message.createShard != null && message.hasOwnProperty("createShard")) { + properties.action = 1; + { + var error = $root.pyth_lazer_transaction.CreateShard.verify(message.createShard); + if (error) + return "createShard." + error; + } + } + if (message.addGovernanceSource != null && message.hasOwnProperty("addGovernanceSource")) { + if (properties.action === 1) + return "action: multiple values"; + properties.action = 1; + { + var error = $root.pyth_lazer_transaction.AddGovernanceSource.verify(message.addGovernanceSource); + if (error) + return "addGovernanceSource." + error; + } + } + if (message.updateGovernanceSource != null && message.hasOwnProperty("updateGovernanceSource")) { + if (properties.action === 1) + return "action: multiple values"; + properties.action = 1; + { + var error = $root.pyth_lazer_transaction.UpdateGovernanceSource.verify(message.updateGovernanceSource); + if (error) + return "updateGovernanceSource." + error; + } + } + if (message.setShardName != null && message.hasOwnProperty("setShardName")) { + if (properties.action === 1) + return "action: multiple values"; + properties.action = 1; + { + var error = $root.pyth_lazer_transaction.SetShardName.verify(message.setShardName); + if (error) + return "setShardName." + error; + } + } + if (message.setShardGroup != null && message.hasOwnProperty("setShardGroup")) { + if (properties.action === 1) + return "action: multiple values"; + properties.action = 1; + { + var error = $root.pyth_lazer_transaction.SetShardGroup.verify(message.setShardGroup); + if (error) + return "setShardGroup." + error; + } + } + if (message.resetLastSequenceNo != null && message.hasOwnProperty("resetLastSequenceNo")) { + if (properties.action === 1) + return "action: multiple values"; + properties.action = 1; + { + var error = $root.pyth_lazer_transaction.ResetLastSequenceNo.verify(message.resetLastSequenceNo); + if (error) + return "resetLastSequenceNo." + error; + } + } + if (message.addPublisher != null && message.hasOwnProperty("addPublisher")) { + if (properties.action === 1) + return "action: multiple values"; + properties.action = 1; + { + var error = $root.pyth_lazer_transaction.AddPublisher.verify(message.addPublisher); + if (error) + return "addPublisher." + error; + } + } + if (message.updatePublisher != null && message.hasOwnProperty("updatePublisher")) { + if (properties.action === 1) + return "action: multiple values"; + properties.action = 1; + { + var error = $root.pyth_lazer_transaction.UpdatePublisher.verify(message.updatePublisher); + if (error) + return "updatePublisher." + error; + } + } + if (message.addFeed != null && message.hasOwnProperty("addFeed")) { + if (properties.action === 1) + return "action: multiple values"; + properties.action = 1; + { + var error = $root.pyth_lazer_transaction.AddFeed.verify(message.addFeed); + if (error) + return "addFeed." + error; + } + } + if (message.updateFeed != null && message.hasOwnProperty("updateFeed")) { + if (properties.action === 1) + return "action: multiple values"; + properties.action = 1; + { + var error = $root.pyth_lazer_transaction.UpdateFeed.verify(message.updateFeed); + if (error) + return "updateFeed." + error; + } + } + return null; + }; + + /** + * Creates a GovernanceDirective message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.GovernanceDirective + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.GovernanceDirective} GovernanceDirective + */ + GovernanceDirective.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.GovernanceDirective) + return object; + var message = new $root.pyth_lazer_transaction.GovernanceDirective(); + if (object.shardFilter != null) { + if (typeof object.shardFilter !== "object") + throw TypeError(".pyth_lazer_transaction.GovernanceDirective.shardFilter: object expected"); + message.shardFilter = $root.pyth_lazer_transaction.ShardFilter.fromObject(object.shardFilter); + } + if (object.createShard != null) { + if (typeof object.createShard !== "object") + throw TypeError(".pyth_lazer_transaction.GovernanceDirective.createShard: object expected"); + message.createShard = $root.pyth_lazer_transaction.CreateShard.fromObject(object.createShard); + } + if (object.addGovernanceSource != null) { + if (typeof object.addGovernanceSource !== "object") + throw TypeError(".pyth_lazer_transaction.GovernanceDirective.addGovernanceSource: object expected"); + message.addGovernanceSource = $root.pyth_lazer_transaction.AddGovernanceSource.fromObject(object.addGovernanceSource); + } + if (object.updateGovernanceSource != null) { + if (typeof object.updateGovernanceSource !== "object") + throw TypeError(".pyth_lazer_transaction.GovernanceDirective.updateGovernanceSource: object expected"); + message.updateGovernanceSource = $root.pyth_lazer_transaction.UpdateGovernanceSource.fromObject(object.updateGovernanceSource); + } + if (object.setShardName != null) { + if (typeof object.setShardName !== "object") + throw TypeError(".pyth_lazer_transaction.GovernanceDirective.setShardName: object expected"); + message.setShardName = $root.pyth_lazer_transaction.SetShardName.fromObject(object.setShardName); + } + if (object.setShardGroup != null) { + if (typeof object.setShardGroup !== "object") + throw TypeError(".pyth_lazer_transaction.GovernanceDirective.setShardGroup: object expected"); + message.setShardGroup = $root.pyth_lazer_transaction.SetShardGroup.fromObject(object.setShardGroup); + } + if (object.resetLastSequenceNo != null) { + if (typeof object.resetLastSequenceNo !== "object") + throw TypeError(".pyth_lazer_transaction.GovernanceDirective.resetLastSequenceNo: object expected"); + message.resetLastSequenceNo = $root.pyth_lazer_transaction.ResetLastSequenceNo.fromObject(object.resetLastSequenceNo); + } + if (object.addPublisher != null) { + if (typeof object.addPublisher !== "object") + throw TypeError(".pyth_lazer_transaction.GovernanceDirective.addPublisher: object expected"); + message.addPublisher = $root.pyth_lazer_transaction.AddPublisher.fromObject(object.addPublisher); + } + if (object.updatePublisher != null) { + if (typeof object.updatePublisher !== "object") + throw TypeError(".pyth_lazer_transaction.GovernanceDirective.updatePublisher: object expected"); + message.updatePublisher = $root.pyth_lazer_transaction.UpdatePublisher.fromObject(object.updatePublisher); + } + if (object.addFeed != null) { + if (typeof object.addFeed !== "object") + throw TypeError(".pyth_lazer_transaction.GovernanceDirective.addFeed: object expected"); + message.addFeed = $root.pyth_lazer_transaction.AddFeed.fromObject(object.addFeed); + } + if (object.updateFeed != null) { + if (typeof object.updateFeed !== "object") + throw TypeError(".pyth_lazer_transaction.GovernanceDirective.updateFeed: object expected"); + message.updateFeed = $root.pyth_lazer_transaction.UpdateFeed.fromObject(object.updateFeed); + } + return message; + }; + + /** + * Creates a plain object from a GovernanceDirective message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.GovernanceDirective + * @static + * @param {pyth_lazer_transaction.GovernanceDirective} message GovernanceDirective + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GovernanceDirective.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.shardFilter != null && message.hasOwnProperty("shardFilter")) { + object.shardFilter = $root.pyth_lazer_transaction.ShardFilter.toObject(message.shardFilter, options); + if (options.oneofs) + object._shardFilter = "shardFilter"; + } + if (message.createShard != null && message.hasOwnProperty("createShard")) { + object.createShard = $root.pyth_lazer_transaction.CreateShard.toObject(message.createShard, options); + if (options.oneofs) + object.action = "createShard"; + } + if (message.addGovernanceSource != null && message.hasOwnProperty("addGovernanceSource")) { + object.addGovernanceSource = $root.pyth_lazer_transaction.AddGovernanceSource.toObject(message.addGovernanceSource, options); + if (options.oneofs) + object.action = "addGovernanceSource"; + } + if (message.updateGovernanceSource != null && message.hasOwnProperty("updateGovernanceSource")) { + object.updateGovernanceSource = $root.pyth_lazer_transaction.UpdateGovernanceSource.toObject(message.updateGovernanceSource, options); + if (options.oneofs) + object.action = "updateGovernanceSource"; + } + if (message.setShardName != null && message.hasOwnProperty("setShardName")) { + object.setShardName = $root.pyth_lazer_transaction.SetShardName.toObject(message.setShardName, options); + if (options.oneofs) + object.action = "setShardName"; + } + if (message.setShardGroup != null && message.hasOwnProperty("setShardGroup")) { + object.setShardGroup = $root.pyth_lazer_transaction.SetShardGroup.toObject(message.setShardGroup, options); + if (options.oneofs) + object.action = "setShardGroup"; + } + if (message.resetLastSequenceNo != null && message.hasOwnProperty("resetLastSequenceNo")) { + object.resetLastSequenceNo = $root.pyth_lazer_transaction.ResetLastSequenceNo.toObject(message.resetLastSequenceNo, options); + if (options.oneofs) + object.action = "resetLastSequenceNo"; + } + if (message.addPublisher != null && message.hasOwnProperty("addPublisher")) { + object.addPublisher = $root.pyth_lazer_transaction.AddPublisher.toObject(message.addPublisher, options); + if (options.oneofs) + object.action = "addPublisher"; + } + if (message.updatePublisher != null && message.hasOwnProperty("updatePublisher")) { + object.updatePublisher = $root.pyth_lazer_transaction.UpdatePublisher.toObject(message.updatePublisher, options); + if (options.oneofs) + object.action = "updatePublisher"; + } + if (message.addFeed != null && message.hasOwnProperty("addFeed")) { + object.addFeed = $root.pyth_lazer_transaction.AddFeed.toObject(message.addFeed, options); + if (options.oneofs) + object.action = "addFeed"; + } + if (message.updateFeed != null && message.hasOwnProperty("updateFeed")) { + object.updateFeed = $root.pyth_lazer_transaction.UpdateFeed.toObject(message.updateFeed, options); + if (options.oneofs) + object.action = "updateFeed"; + } + return object; + }; + + /** + * Converts this GovernanceDirective to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.GovernanceDirective + * @instance + * @returns {Object.} JSON object + */ + GovernanceDirective.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GovernanceDirective + * @function getTypeUrl + * @memberof pyth_lazer_transaction.GovernanceDirective + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GovernanceDirective.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.GovernanceDirective"; + }; + + return GovernanceDirective; + })(); + + pyth_lazer_transaction.Permissions = (function() { + + /** + * Properties of a Permissions. + * @memberof pyth_lazer_transaction + * @interface IPermissions + * @property {boolean|null} [allActions] Permissions allActions + * @property {Array.|null} [shardActions] Permissions shardActions + * @property {boolean|null} [allUpdateGovernanceSourceActions] Permissions allUpdateGovernanceSourceActions + * @property {Array.|null} [updateGovernanceSourceActions] Permissions updateGovernanceSourceActions + * @property {boolean|null} [allUpdatePublisherAction] Permissions allUpdatePublisherAction + * @property {Array.|null} [updatePublisherActions] Permissions updatePublisherActions + * @property {boolean|null} [allUpdateFeedActions] Permissions allUpdateFeedActions + * @property {Array.|null} [updateFeedActions] Permissions updateFeedActions + */ + + /** + * Constructs a new Permissions. + * @memberof pyth_lazer_transaction + * @classdesc Represents a Permissions. + * @implements IPermissions + * @constructor + * @param {pyth_lazer_transaction.IPermissions=} [properties] Properties to set + */ + function Permissions(properties) { + this.shardActions = []; + this.updateGovernanceSourceActions = []; + this.updatePublisherActions = []; + this.updateFeedActions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Permissions allActions. + * @member {boolean|null|undefined} allActions + * @memberof pyth_lazer_transaction.Permissions + * @instance + */ + Permissions.prototype.allActions = null; + + /** + * Permissions shardActions. + * @member {Array.} shardActions + * @memberof pyth_lazer_transaction.Permissions + * @instance + */ + Permissions.prototype.shardActions = $util.emptyArray; + + /** + * Permissions allUpdateGovernanceSourceActions. + * @member {boolean|null|undefined} allUpdateGovernanceSourceActions + * @memberof pyth_lazer_transaction.Permissions + * @instance + */ + Permissions.prototype.allUpdateGovernanceSourceActions = null; + + /** + * Permissions updateGovernanceSourceActions. + * @member {Array.} updateGovernanceSourceActions + * @memberof pyth_lazer_transaction.Permissions + * @instance + */ + Permissions.prototype.updateGovernanceSourceActions = $util.emptyArray; + + /** + * Permissions allUpdatePublisherAction. + * @member {boolean|null|undefined} allUpdatePublisherAction + * @memberof pyth_lazer_transaction.Permissions + * @instance + */ + Permissions.prototype.allUpdatePublisherAction = null; + + /** + * Permissions updatePublisherActions. + * @member {Array.} updatePublisherActions + * @memberof pyth_lazer_transaction.Permissions + * @instance + */ + Permissions.prototype.updatePublisherActions = $util.emptyArray; + + /** + * Permissions allUpdateFeedActions. + * @member {boolean|null|undefined} allUpdateFeedActions + * @memberof pyth_lazer_transaction.Permissions + * @instance + */ + Permissions.prototype.allUpdateFeedActions = null; + + /** + * Permissions updateFeedActions. + * @member {Array.} updateFeedActions + * @memberof pyth_lazer_transaction.Permissions + * @instance + */ + Permissions.prototype.updateFeedActions = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Permissions _allActions. + * @member {"allActions"|undefined} _allActions + * @memberof pyth_lazer_transaction.Permissions + * @instance + */ + Object.defineProperty(Permissions.prototype, "_allActions", { + get: $util.oneOfGetter($oneOfFields = ["allActions"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Permissions _allUpdateGovernanceSourceActions. + * @member {"allUpdateGovernanceSourceActions"|undefined} _allUpdateGovernanceSourceActions + * @memberof pyth_lazer_transaction.Permissions + * @instance + */ + Object.defineProperty(Permissions.prototype, "_allUpdateGovernanceSourceActions", { + get: $util.oneOfGetter($oneOfFields = ["allUpdateGovernanceSourceActions"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Permissions _allUpdatePublisherAction. + * @member {"allUpdatePublisherAction"|undefined} _allUpdatePublisherAction + * @memberof pyth_lazer_transaction.Permissions + * @instance + */ + Object.defineProperty(Permissions.prototype, "_allUpdatePublisherAction", { + get: $util.oneOfGetter($oneOfFields = ["allUpdatePublisherAction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Permissions _allUpdateFeedActions. + * @member {"allUpdateFeedActions"|undefined} _allUpdateFeedActions + * @memberof pyth_lazer_transaction.Permissions + * @instance + */ + Object.defineProperty(Permissions.prototype, "_allUpdateFeedActions", { + get: $util.oneOfGetter($oneOfFields = ["allUpdateFeedActions"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Permissions instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.Permissions + * @static + * @param {pyth_lazer_transaction.IPermissions=} [properties] Properties to set + * @returns {pyth_lazer_transaction.Permissions} Permissions instance + */ + Permissions.create = function create(properties) { + return new Permissions(properties); + }; + + /** + * Encodes the specified Permissions message. Does not implicitly {@link pyth_lazer_transaction.Permissions.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.Permissions + * @static + * @param {pyth_lazer_transaction.IPermissions} message Permissions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Permissions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allActions != null && Object.hasOwnProperty.call(message, "allActions")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.allActions); + if (message.shardActions != null && message.shardActions.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.shardActions.length; ++i) + writer.int32(message.shardActions[i]); + writer.ldelim(); + } + if (message.allUpdateGovernanceSourceActions != null && Object.hasOwnProperty.call(message, "allUpdateGovernanceSourceActions")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allUpdateGovernanceSourceActions); + if (message.updateGovernanceSourceActions != null && message.updateGovernanceSourceActions.length) { + writer.uint32(/* id 4, wireType 2 =*/34).fork(); + for (var i = 0; i < message.updateGovernanceSourceActions.length; ++i) + writer.int32(message.updateGovernanceSourceActions[i]); + writer.ldelim(); + } + if (message.allUpdatePublisherAction != null && Object.hasOwnProperty.call(message, "allUpdatePublisherAction")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.allUpdatePublisherAction); + if (message.updatePublisherActions != null && message.updatePublisherActions.length) { + writer.uint32(/* id 6, wireType 2 =*/50).fork(); + for (var i = 0; i < message.updatePublisherActions.length; ++i) + writer.int32(message.updatePublisherActions[i]); + writer.ldelim(); + } + if (message.allUpdateFeedActions != null && Object.hasOwnProperty.call(message, "allUpdateFeedActions")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.allUpdateFeedActions); + if (message.updateFeedActions != null && message.updateFeedActions.length) { + writer.uint32(/* id 8, wireType 2 =*/66).fork(); + for (var i = 0; i < message.updateFeedActions.length; ++i) + writer.int32(message.updateFeedActions[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified Permissions message, length delimited. Does not implicitly {@link pyth_lazer_transaction.Permissions.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.Permissions + * @static + * @param {pyth_lazer_transaction.IPermissions} message Permissions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Permissions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Permissions message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.Permissions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.Permissions} Permissions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Permissions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.Permissions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.allActions = reader.bool(); + break; + } + case 2: { + if (!(message.shardActions && message.shardActions.length)) + message.shardActions = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.shardActions.push(reader.int32()); + } else + message.shardActions.push(reader.int32()); + break; + } + case 3: { + message.allUpdateGovernanceSourceActions = reader.bool(); + break; + } + case 4: { + if (!(message.updateGovernanceSourceActions && message.updateGovernanceSourceActions.length)) + message.updateGovernanceSourceActions = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.updateGovernanceSourceActions.push(reader.int32()); + } else + message.updateGovernanceSourceActions.push(reader.int32()); + break; + } + case 5: { + message.allUpdatePublisherAction = reader.bool(); + break; + } + case 6: { + if (!(message.updatePublisherActions && message.updatePublisherActions.length)) + message.updatePublisherActions = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.updatePublisherActions.push(reader.int32()); + } else + message.updatePublisherActions.push(reader.int32()); + break; + } + case 7: { + message.allUpdateFeedActions = reader.bool(); + break; + } + case 8: { + if (!(message.updateFeedActions && message.updateFeedActions.length)) + message.updateFeedActions = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.updateFeedActions.push(reader.int32()); + } else + message.updateFeedActions.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Permissions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.Permissions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.Permissions} Permissions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Permissions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Permissions message. + * @function verify + * @memberof pyth_lazer_transaction.Permissions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Permissions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.allActions != null && message.hasOwnProperty("allActions")) { + properties._allActions = 1; + if (typeof message.allActions !== "boolean") + return "allActions: boolean expected"; + } + if (message.shardActions != null && message.hasOwnProperty("shardActions")) { + if (!Array.isArray(message.shardActions)) + return "shardActions: array expected"; + for (var i = 0; i < message.shardActions.length; ++i) + switch (message.shardActions[i]) { + default: + return "shardActions: enum value[] expected"; + case 0: + case 101: + case 102: + case 103: + case 104: + case 105: + case 106: + case 107: + case 109: + break; + } + } + if (message.allUpdateGovernanceSourceActions != null && message.hasOwnProperty("allUpdateGovernanceSourceActions")) { + properties._allUpdateGovernanceSourceActions = 1; + if (typeof message.allUpdateGovernanceSourceActions !== "boolean") + return "allUpdateGovernanceSourceActions: boolean expected"; + } + if (message.updateGovernanceSourceActions != null && message.hasOwnProperty("updateGovernanceSourceActions")) { + if (!Array.isArray(message.updateGovernanceSourceActions)) + return "updateGovernanceSourceActions: array expected"; + for (var i = 0; i < message.updateGovernanceSourceActions.length; ++i) + switch (message.updateGovernanceSourceActions[i]) { + default: + return "updateGovernanceSourceActions: enum value[] expected"; + case 0: + case 101: + case 199: + break; + } + } + if (message.allUpdatePublisherAction != null && message.hasOwnProperty("allUpdatePublisherAction")) { + properties._allUpdatePublisherAction = 1; + if (typeof message.allUpdatePublisherAction !== "boolean") + return "allUpdatePublisherAction: boolean expected"; + } + if (message.updatePublisherActions != null && message.hasOwnProperty("updatePublisherActions")) { + if (!Array.isArray(message.updatePublisherActions)) + return "updatePublisherActions: array expected"; + for (var i = 0; i < message.updatePublisherActions.length; ++i) + switch (message.updatePublisherActions[i]) { + default: + return "updatePublisherActions: enum value[] expected"; + case 0: + case 101: + case 102: + case 103: + case 104: + case 105: + case 199: + break; + } + } + if (message.allUpdateFeedActions != null && message.hasOwnProperty("allUpdateFeedActions")) { + properties._allUpdateFeedActions = 1; + if (typeof message.allUpdateFeedActions !== "boolean") + return "allUpdateFeedActions: boolean expected"; + } + if (message.updateFeedActions != null && message.hasOwnProperty("updateFeedActions")) { + if (!Array.isArray(message.updateFeedActions)) + return "updateFeedActions: array expected"; + for (var i = 0; i < message.updateFeedActions.length; ++i) + switch (message.updateFeedActions[i]) { + default: + return "updateFeedActions: enum value[] expected"; + case 0: + case 101: + case 102: + case 103: + case 199: + break; + } + } + return null; + }; + + /** + * Creates a Permissions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.Permissions + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.Permissions} Permissions + */ + Permissions.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.Permissions) + return object; + var message = new $root.pyth_lazer_transaction.Permissions(); + if (object.allActions != null) + message.allActions = Boolean(object.allActions); + if (object.shardActions) { + if (!Array.isArray(object.shardActions)) + throw TypeError(".pyth_lazer_transaction.Permissions.shardActions: array expected"); + message.shardActions = []; + for (var i = 0; i < object.shardActions.length; ++i) + switch (object.shardActions[i]) { + default: + if (typeof object.shardActions[i] === "number") { + message.shardActions[i] = object.shardActions[i]; + break; + } + case "SHARD_ACTION_UNSPECIFIED": + case 0: + message.shardActions[i] = 0; + break; + case "CREATE_SHARD": + case 101: + message.shardActions[i] = 101; + break; + case "ADD_GOVERNANCE_SOURCE": + case 102: + message.shardActions[i] = 102; + break; + case "UPDATE_GOVERNANCE_SOURCE": + case 103: + message.shardActions[i] = 103; + break; + case "SET_SHARD_NAME": + case 104: + message.shardActions[i] = 104; + break; + case "SET_SHARD_GROUP": + case 105: + message.shardActions[i] = 105; + break; + case "RESET_LAST_SEQUENCE_NO": + case 106: + message.shardActions[i] = 106; + break; + case "ADD_PUBLISHER": + case 107: + message.shardActions[i] = 107; + break; + case "ADD_FEED": + case 109: + message.shardActions[i] = 109; + break; + } + } + if (object.allUpdateGovernanceSourceActions != null) + message.allUpdateGovernanceSourceActions = Boolean(object.allUpdateGovernanceSourceActions); + if (object.updateGovernanceSourceActions) { + if (!Array.isArray(object.updateGovernanceSourceActions)) + throw TypeError(".pyth_lazer_transaction.Permissions.updateGovernanceSourceActions: array expected"); + message.updateGovernanceSourceActions = []; + for (var i = 0; i < object.updateGovernanceSourceActions.length; ++i) + switch (object.updateGovernanceSourceActions[i]) { + default: + if (typeof object.updateGovernanceSourceActions[i] === "number") { + message.updateGovernanceSourceActions[i] = object.updateGovernanceSourceActions[i]; + break; + } + case "UPDATE_GOVERNANCE_SOURCE_ACTION_UNSPECIFIED": + case 0: + message.updateGovernanceSourceActions[i] = 0; + break; + case "SET_GOVERNANCE_SOURCE_PERMISSIONS": + case 101: + message.updateGovernanceSourceActions[i] = 101; + break; + case "REMOVE_GOVERNANCE_SOURCE": + case 199: + message.updateGovernanceSourceActions[i] = 199; + break; + } + } + if (object.allUpdatePublisherAction != null) + message.allUpdatePublisherAction = Boolean(object.allUpdatePublisherAction); + if (object.updatePublisherActions) { + if (!Array.isArray(object.updatePublisherActions)) + throw TypeError(".pyth_lazer_transaction.Permissions.updatePublisherActions: array expected"); + message.updatePublisherActions = []; + for (var i = 0; i < object.updatePublisherActions.length; ++i) + switch (object.updatePublisherActions[i]) { + default: + if (typeof object.updatePublisherActions[i] === "number") { + message.updatePublisherActions[i] = object.updatePublisherActions[i]; + break; + } + case "UPDATE_PUBLISHER_ACTION_UNSPECIFIED": + case 0: + message.updatePublisherActions[i] = 0; + break; + case "SET_PUBLISHER_NAME": + case 101: + message.updatePublisherActions[i] = 101; + break; + case "ADD_PUBLISHER_PUBLIC_KEYS": + case 102: + message.updatePublisherActions[i] = 102; + break; + case "REMOVE_PUBLISHER_PUBLIC_KEYS": + case 103: + message.updatePublisherActions[i] = 103; + break; + case "SET_PUBLISHER_PUBLIC_KEYS": + case 104: + message.updatePublisherActions[i] = 104; + break; + case "SET_PUBLISHER_ACTIVE": + case 105: + message.updatePublisherActions[i] = 105; + break; + case "REMOVE_PUBLISHER": + case 199: + message.updatePublisherActions[i] = 199; + break; + } + } + if (object.allUpdateFeedActions != null) + message.allUpdateFeedActions = Boolean(object.allUpdateFeedActions); + if (object.updateFeedActions) { + if (!Array.isArray(object.updateFeedActions)) + throw TypeError(".pyth_lazer_transaction.Permissions.updateFeedActions: array expected"); + message.updateFeedActions = []; + for (var i = 0; i < object.updateFeedActions.length; ++i) + switch (object.updateFeedActions[i]) { + default: + if (typeof object.updateFeedActions[i] === "number") { + message.updateFeedActions[i] = object.updateFeedActions[i]; + break; + } + case "UPDATE_FEED_ACTION_UNSPECIFIED": + case 0: + message.updateFeedActions[i] = 0; + break; + case "UPDATE_FEED_METADATA": + case 101: + message.updateFeedActions[i] = 101; + break; + case "ACTIVATE_FEED": + case 102: + message.updateFeedActions[i] = 102; + break; + case "DEACTIVATE_FEED": + case 103: + message.updateFeedActions[i] = 103; + break; + case "REMOVE_FEED": + case 199: + message.updateFeedActions[i] = 199; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a Permissions message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.Permissions + * @static + * @param {pyth_lazer_transaction.Permissions} message Permissions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Permissions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.shardActions = []; + object.updateGovernanceSourceActions = []; + object.updatePublisherActions = []; + object.updateFeedActions = []; + } + if (message.allActions != null && message.hasOwnProperty("allActions")) { + object.allActions = message.allActions; + if (options.oneofs) + object._allActions = "allActions"; + } + if (message.shardActions && message.shardActions.length) { + object.shardActions = []; + for (var j = 0; j < message.shardActions.length; ++j) + object.shardActions[j] = options.enums === String ? $root.pyth_lazer_transaction.Permissions.ShardAction[message.shardActions[j]] === undefined ? message.shardActions[j] : $root.pyth_lazer_transaction.Permissions.ShardAction[message.shardActions[j]] : message.shardActions[j]; + } + if (message.allUpdateGovernanceSourceActions != null && message.hasOwnProperty("allUpdateGovernanceSourceActions")) { + object.allUpdateGovernanceSourceActions = message.allUpdateGovernanceSourceActions; + if (options.oneofs) + object._allUpdateGovernanceSourceActions = "allUpdateGovernanceSourceActions"; + } + if (message.updateGovernanceSourceActions && message.updateGovernanceSourceActions.length) { + object.updateGovernanceSourceActions = []; + for (var j = 0; j < message.updateGovernanceSourceActions.length; ++j) + object.updateGovernanceSourceActions[j] = options.enums === String ? $root.pyth_lazer_transaction.Permissions.UpdateGovernanceSourceAction[message.updateGovernanceSourceActions[j]] === undefined ? message.updateGovernanceSourceActions[j] : $root.pyth_lazer_transaction.Permissions.UpdateGovernanceSourceAction[message.updateGovernanceSourceActions[j]] : message.updateGovernanceSourceActions[j]; + } + if (message.allUpdatePublisherAction != null && message.hasOwnProperty("allUpdatePublisherAction")) { + object.allUpdatePublisherAction = message.allUpdatePublisherAction; + if (options.oneofs) + object._allUpdatePublisherAction = "allUpdatePublisherAction"; + } + if (message.updatePublisherActions && message.updatePublisherActions.length) { + object.updatePublisherActions = []; + for (var j = 0; j < message.updatePublisherActions.length; ++j) + object.updatePublisherActions[j] = options.enums === String ? $root.pyth_lazer_transaction.Permissions.UpdatePublisherAction[message.updatePublisherActions[j]] === undefined ? message.updatePublisherActions[j] : $root.pyth_lazer_transaction.Permissions.UpdatePublisherAction[message.updatePublisherActions[j]] : message.updatePublisherActions[j]; + } + if (message.allUpdateFeedActions != null && message.hasOwnProperty("allUpdateFeedActions")) { + object.allUpdateFeedActions = message.allUpdateFeedActions; + if (options.oneofs) + object._allUpdateFeedActions = "allUpdateFeedActions"; + } + if (message.updateFeedActions && message.updateFeedActions.length) { + object.updateFeedActions = []; + for (var j = 0; j < message.updateFeedActions.length; ++j) + object.updateFeedActions[j] = options.enums === String ? $root.pyth_lazer_transaction.Permissions.UpdateFeedAction[message.updateFeedActions[j]] === undefined ? message.updateFeedActions[j] : $root.pyth_lazer_transaction.Permissions.UpdateFeedAction[message.updateFeedActions[j]] : message.updateFeedActions[j]; + } + return object; + }; + + /** + * Converts this Permissions to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.Permissions + * @instance + * @returns {Object.} JSON object + */ + Permissions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Permissions + * @function getTypeUrl + * @memberof pyth_lazer_transaction.Permissions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Permissions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.Permissions"; + }; + + /** + * ShardAction enum. + * @name pyth_lazer_transaction.Permissions.ShardAction + * @enum {number} + * @property {number} SHARD_ACTION_UNSPECIFIED=0 SHARD_ACTION_UNSPECIFIED value + * @property {number} CREATE_SHARD=101 CREATE_SHARD value + * @property {number} ADD_GOVERNANCE_SOURCE=102 ADD_GOVERNANCE_SOURCE value + * @property {number} UPDATE_GOVERNANCE_SOURCE=103 UPDATE_GOVERNANCE_SOURCE value + * @property {number} SET_SHARD_NAME=104 SET_SHARD_NAME value + * @property {number} SET_SHARD_GROUP=105 SET_SHARD_GROUP value + * @property {number} RESET_LAST_SEQUENCE_NO=106 RESET_LAST_SEQUENCE_NO value + * @property {number} ADD_PUBLISHER=107 ADD_PUBLISHER value + * @property {number} ADD_FEED=109 ADD_FEED value + */ + Permissions.ShardAction = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SHARD_ACTION_UNSPECIFIED"] = 0; + values[valuesById[101] = "CREATE_SHARD"] = 101; + values[valuesById[102] = "ADD_GOVERNANCE_SOURCE"] = 102; + values[valuesById[103] = "UPDATE_GOVERNANCE_SOURCE"] = 103; + values[valuesById[104] = "SET_SHARD_NAME"] = 104; + values[valuesById[105] = "SET_SHARD_GROUP"] = 105; + values[valuesById[106] = "RESET_LAST_SEQUENCE_NO"] = 106; + values[valuesById[107] = "ADD_PUBLISHER"] = 107; + values[valuesById[109] = "ADD_FEED"] = 109; + return values; + })(); + + /** + * UpdateGovernanceSourceAction enum. + * @name pyth_lazer_transaction.Permissions.UpdateGovernanceSourceAction + * @enum {number} + * @property {number} UPDATE_GOVERNANCE_SOURCE_ACTION_UNSPECIFIED=0 UPDATE_GOVERNANCE_SOURCE_ACTION_UNSPECIFIED value + * @property {number} SET_GOVERNANCE_SOURCE_PERMISSIONS=101 SET_GOVERNANCE_SOURCE_PERMISSIONS value + * @property {number} REMOVE_GOVERNANCE_SOURCE=199 REMOVE_GOVERNANCE_SOURCE value + */ + Permissions.UpdateGovernanceSourceAction = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UPDATE_GOVERNANCE_SOURCE_ACTION_UNSPECIFIED"] = 0; + values[valuesById[101] = "SET_GOVERNANCE_SOURCE_PERMISSIONS"] = 101; + values[valuesById[199] = "REMOVE_GOVERNANCE_SOURCE"] = 199; + return values; + })(); + + /** + * UpdatePublisherAction enum. + * @name pyth_lazer_transaction.Permissions.UpdatePublisherAction + * @enum {number} + * @property {number} UPDATE_PUBLISHER_ACTION_UNSPECIFIED=0 UPDATE_PUBLISHER_ACTION_UNSPECIFIED value + * @property {number} SET_PUBLISHER_NAME=101 SET_PUBLISHER_NAME value + * @property {number} ADD_PUBLISHER_PUBLIC_KEYS=102 ADD_PUBLISHER_PUBLIC_KEYS value + * @property {number} REMOVE_PUBLISHER_PUBLIC_KEYS=103 REMOVE_PUBLISHER_PUBLIC_KEYS value + * @property {number} SET_PUBLISHER_PUBLIC_KEYS=104 SET_PUBLISHER_PUBLIC_KEYS value + * @property {number} SET_PUBLISHER_ACTIVE=105 SET_PUBLISHER_ACTIVE value + * @property {number} REMOVE_PUBLISHER=199 REMOVE_PUBLISHER value + */ + Permissions.UpdatePublisherAction = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UPDATE_PUBLISHER_ACTION_UNSPECIFIED"] = 0; + values[valuesById[101] = "SET_PUBLISHER_NAME"] = 101; + values[valuesById[102] = "ADD_PUBLISHER_PUBLIC_KEYS"] = 102; + values[valuesById[103] = "REMOVE_PUBLISHER_PUBLIC_KEYS"] = 103; + values[valuesById[104] = "SET_PUBLISHER_PUBLIC_KEYS"] = 104; + values[valuesById[105] = "SET_PUBLISHER_ACTIVE"] = 105; + values[valuesById[199] = "REMOVE_PUBLISHER"] = 199; + return values; + })(); + + /** + * UpdateFeedAction enum. + * @name pyth_lazer_transaction.Permissions.UpdateFeedAction + * @enum {number} + * @property {number} UPDATE_FEED_ACTION_UNSPECIFIED=0 UPDATE_FEED_ACTION_UNSPECIFIED value + * @property {number} UPDATE_FEED_METADATA=101 UPDATE_FEED_METADATA value + * @property {number} ACTIVATE_FEED=102 ACTIVATE_FEED value + * @property {number} DEACTIVATE_FEED=103 DEACTIVATE_FEED value + * @property {number} REMOVE_FEED=199 REMOVE_FEED value + */ + Permissions.UpdateFeedAction = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UPDATE_FEED_ACTION_UNSPECIFIED"] = 0; + values[valuesById[101] = "UPDATE_FEED_METADATA"] = 101; + values[valuesById[102] = "ACTIVATE_FEED"] = 102; + values[valuesById[103] = "DEACTIVATE_FEED"] = 103; + values[valuesById[199] = "REMOVE_FEED"] = 199; + return values; + })(); + + return Permissions; + })(); + + pyth_lazer_transaction.GovernanceSource = (function() { + + /** + * Properties of a GovernanceSource. + * @memberof pyth_lazer_transaction + * @interface IGovernanceSource + * @property {pyth_lazer_transaction.GovernanceSource.ISingleEd25519|null} [singleEd25519] GovernanceSource singleEd25519 + * @property {pyth_lazer_transaction.GovernanceSource.IWormholeEmitter|null} [wormholeEmitter] GovernanceSource wormholeEmitter + */ + + /** + * Constructs a new GovernanceSource. + * @memberof pyth_lazer_transaction + * @classdesc Represents a GovernanceSource. + * @implements IGovernanceSource + * @constructor + * @param {pyth_lazer_transaction.IGovernanceSource=} [properties] Properties to set + */ + function GovernanceSource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GovernanceSource singleEd25519. + * @member {pyth_lazer_transaction.GovernanceSource.ISingleEd25519|null|undefined} singleEd25519 + * @memberof pyth_lazer_transaction.GovernanceSource + * @instance + */ + GovernanceSource.prototype.singleEd25519 = null; + + /** + * GovernanceSource wormholeEmitter. + * @member {pyth_lazer_transaction.GovernanceSource.IWormholeEmitter|null|undefined} wormholeEmitter + * @memberof pyth_lazer_transaction.GovernanceSource + * @instance + */ + GovernanceSource.prototype.wormholeEmitter = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GovernanceSource source. + * @member {"singleEd25519"|"wormholeEmitter"|undefined} source + * @memberof pyth_lazer_transaction.GovernanceSource + * @instance + */ + Object.defineProperty(GovernanceSource.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["singleEd25519", "wormholeEmitter"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GovernanceSource instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.GovernanceSource + * @static + * @param {pyth_lazer_transaction.IGovernanceSource=} [properties] Properties to set + * @returns {pyth_lazer_transaction.GovernanceSource} GovernanceSource instance + */ + GovernanceSource.create = function create(properties) { + return new GovernanceSource(properties); + }; + + /** + * Encodes the specified GovernanceSource message. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.GovernanceSource + * @static + * @param {pyth_lazer_transaction.IGovernanceSource} message GovernanceSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GovernanceSource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.singleEd25519 != null && Object.hasOwnProperty.call(message, "singleEd25519")) + $root.pyth_lazer_transaction.GovernanceSource.SingleEd25519.encode(message.singleEd25519, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.wormholeEmitter != null && Object.hasOwnProperty.call(message, "wormholeEmitter")) + $root.pyth_lazer_transaction.GovernanceSource.WormholeEmitter.encode(message.wormholeEmitter, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GovernanceSource message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.GovernanceSource + * @static + * @param {pyth_lazer_transaction.IGovernanceSource} message GovernanceSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GovernanceSource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GovernanceSource message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.GovernanceSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.GovernanceSource} GovernanceSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GovernanceSource.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.GovernanceSource(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.singleEd25519 = $root.pyth_lazer_transaction.GovernanceSource.SingleEd25519.decode(reader, reader.uint32()); + break; + } + case 2: { + message.wormholeEmitter = $root.pyth_lazer_transaction.GovernanceSource.WormholeEmitter.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GovernanceSource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.GovernanceSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.GovernanceSource} GovernanceSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GovernanceSource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GovernanceSource message. + * @function verify + * @memberof pyth_lazer_transaction.GovernanceSource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GovernanceSource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.singleEd25519 != null && message.hasOwnProperty("singleEd25519")) { + properties.source = 1; + { + var error = $root.pyth_lazer_transaction.GovernanceSource.SingleEd25519.verify(message.singleEd25519); + if (error) + return "singleEd25519." + error; + } + } + if (message.wormholeEmitter != null && message.hasOwnProperty("wormholeEmitter")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + { + var error = $root.pyth_lazer_transaction.GovernanceSource.WormholeEmitter.verify(message.wormholeEmitter); + if (error) + return "wormholeEmitter." + error; + } + } + return null; + }; + + /** + * Creates a GovernanceSource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.GovernanceSource + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.GovernanceSource} GovernanceSource + */ + GovernanceSource.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.GovernanceSource) + return object; + var message = new $root.pyth_lazer_transaction.GovernanceSource(); + if (object.singleEd25519 != null) { + if (typeof object.singleEd25519 !== "object") + throw TypeError(".pyth_lazer_transaction.GovernanceSource.singleEd25519: object expected"); + message.singleEd25519 = $root.pyth_lazer_transaction.GovernanceSource.SingleEd25519.fromObject(object.singleEd25519); + } + if (object.wormholeEmitter != null) { + if (typeof object.wormholeEmitter !== "object") + throw TypeError(".pyth_lazer_transaction.GovernanceSource.wormholeEmitter: object expected"); + message.wormholeEmitter = $root.pyth_lazer_transaction.GovernanceSource.WormholeEmitter.fromObject(object.wormholeEmitter); + } + return message; + }; + + /** + * Creates a plain object from a GovernanceSource message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.GovernanceSource + * @static + * @param {pyth_lazer_transaction.GovernanceSource} message GovernanceSource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GovernanceSource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.singleEd25519 != null && message.hasOwnProperty("singleEd25519")) { + object.singleEd25519 = $root.pyth_lazer_transaction.GovernanceSource.SingleEd25519.toObject(message.singleEd25519, options); + if (options.oneofs) + object.source = "singleEd25519"; + } + if (message.wormholeEmitter != null && message.hasOwnProperty("wormholeEmitter")) { + object.wormholeEmitter = $root.pyth_lazer_transaction.GovernanceSource.WormholeEmitter.toObject(message.wormholeEmitter, options); + if (options.oneofs) + object.source = "wormholeEmitter"; + } + return object; + }; + + /** + * Converts this GovernanceSource to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.GovernanceSource + * @instance + * @returns {Object.} JSON object + */ + GovernanceSource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GovernanceSource + * @function getTypeUrl + * @memberof pyth_lazer_transaction.GovernanceSource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GovernanceSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.GovernanceSource"; + }; + + GovernanceSource.SingleEd25519 = (function() { + + /** + * Properties of a SingleEd25519. + * @memberof pyth_lazer_transaction.GovernanceSource + * @interface ISingleEd25519 + * @property {Uint8Array|null} [publicKey] SingleEd25519 publicKey + */ + + /** + * Constructs a new SingleEd25519. + * @memberof pyth_lazer_transaction.GovernanceSource + * @classdesc Represents a SingleEd25519. + * @implements ISingleEd25519 + * @constructor + * @param {pyth_lazer_transaction.GovernanceSource.ISingleEd25519=} [properties] Properties to set + */ + function SingleEd25519(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SingleEd25519 publicKey. + * @member {Uint8Array|null|undefined} publicKey + * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 + * @instance + */ + SingleEd25519.prototype.publicKey = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SingleEd25519 _publicKey. + * @member {"publicKey"|undefined} _publicKey + * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 + * @instance + */ + Object.defineProperty(SingleEd25519.prototype, "_publicKey", { + get: $util.oneOfGetter($oneOfFields = ["publicKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SingleEd25519 instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 + * @static + * @param {pyth_lazer_transaction.GovernanceSource.ISingleEd25519=} [properties] Properties to set + * @returns {pyth_lazer_transaction.GovernanceSource.SingleEd25519} SingleEd25519 instance + */ + SingleEd25519.create = function create(properties) { + return new SingleEd25519(properties); + }; + + /** + * Encodes the specified SingleEd25519 message. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.SingleEd25519.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 + * @static + * @param {pyth_lazer_transaction.GovernanceSource.ISingleEd25519} message SingleEd25519 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SingleEd25519.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 SingleEd25519 message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.SingleEd25519.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 + * @static + * @param {pyth_lazer_transaction.GovernanceSource.ISingleEd25519} message SingleEd25519 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SingleEd25519.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SingleEd25519 message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.GovernanceSource.SingleEd25519} SingleEd25519 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SingleEd25519.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.GovernanceSource.SingleEd25519(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.publicKey = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SingleEd25519 message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.GovernanceSource.SingleEd25519} SingleEd25519 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SingleEd25519.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SingleEd25519 message. + * @function verify + * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SingleEd25519.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.publicKey != null && message.hasOwnProperty("publicKey")) { + properties._publicKey = 1; + if (!(message.publicKey && typeof message.publicKey.length === "number" || $util.isString(message.publicKey))) + return "publicKey: buffer expected"; + } + return null; + }; + + /** + * Creates a SingleEd25519 message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.GovernanceSource.SingleEd25519} SingleEd25519 + */ + SingleEd25519.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.GovernanceSource.SingleEd25519) + return object; + var message = new $root.pyth_lazer_transaction.GovernanceSource.SingleEd25519(); + if (object.publicKey != null) + if (typeof object.publicKey === "string") + $util.base64.decode(object.publicKey, message.publicKey = $util.newBuffer($util.base64.length(object.publicKey)), 0); + else if (object.publicKey.length >= 0) + message.publicKey = object.publicKey; + return message; + }; + + /** + * Creates a plain object from a SingleEd25519 message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 + * @static + * @param {pyth_lazer_transaction.GovernanceSource.SingleEd25519} message SingleEd25519 + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SingleEd25519.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + 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; + if (options.oneofs) + object._publicKey = "publicKey"; + } + return object; + }; + + /** + * Converts this SingleEd25519 to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 + * @instance + * @returns {Object.} JSON object + */ + SingleEd25519.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SingleEd25519 + * @function getTypeUrl + * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SingleEd25519.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.GovernanceSource.SingleEd25519"; + }; + + return SingleEd25519; + })(); + + GovernanceSource.WormholeEmitter = (function() { + + /** + * Properties of a WormholeEmitter. + * @memberof pyth_lazer_transaction.GovernanceSource + * @interface IWormholeEmitter + * @property {Uint8Array|null} [address] WormholeEmitter address + * @property {number|null} [chainId] WormholeEmitter chainId + */ + + /** + * Constructs a new WormholeEmitter. + * @memberof pyth_lazer_transaction.GovernanceSource + * @classdesc Represents a WormholeEmitter. + * @implements IWormholeEmitter + * @constructor + * @param {pyth_lazer_transaction.GovernanceSource.IWormholeEmitter=} [properties] Properties to set + */ + function WormholeEmitter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WormholeEmitter address. + * @member {Uint8Array|null|undefined} address + * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter + * @instance + */ + WormholeEmitter.prototype.address = null; + + /** + * WormholeEmitter chainId. + * @member {number|null|undefined} chainId + * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter + * @instance + */ + WormholeEmitter.prototype.chainId = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * WormholeEmitter _address. + * @member {"address"|undefined} _address + * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter + * @instance + */ + Object.defineProperty(WormholeEmitter.prototype, "_address", { + get: $util.oneOfGetter($oneOfFields = ["address"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * WormholeEmitter _chainId. + * @member {"chainId"|undefined} _chainId + * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter + * @instance + */ + Object.defineProperty(WormholeEmitter.prototype, "_chainId", { + get: $util.oneOfGetter($oneOfFields = ["chainId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new WormholeEmitter instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter + * @static + * @param {pyth_lazer_transaction.GovernanceSource.IWormholeEmitter=} [properties] Properties to set + * @returns {pyth_lazer_transaction.GovernanceSource.WormholeEmitter} WormholeEmitter instance + */ + WormholeEmitter.create = function create(properties) { + return new WormholeEmitter(properties); + }; + + /** + * Encodes the specified WormholeEmitter message. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.WormholeEmitter.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter + * @static + * @param {pyth_lazer_transaction.GovernanceSource.IWormholeEmitter} message WormholeEmitter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WormholeEmitter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.address != null && Object.hasOwnProperty.call(message, "address")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.address); + if (message.chainId != null && Object.hasOwnProperty.call(message, "chainId")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.chainId); + return writer; + }; + + /** + * Encodes the specified WormholeEmitter message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.WormholeEmitter.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter + * @static + * @param {pyth_lazer_transaction.GovernanceSource.IWormholeEmitter} message WormholeEmitter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WormholeEmitter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WormholeEmitter message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.GovernanceSource.WormholeEmitter} WormholeEmitter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WormholeEmitter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.GovernanceSource.WormholeEmitter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.address = reader.bytes(); + break; + } + case 2: { + message.chainId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WormholeEmitter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.GovernanceSource.WormholeEmitter} WormholeEmitter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WormholeEmitter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WormholeEmitter message. + * @function verify + * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WormholeEmitter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.address != null && message.hasOwnProperty("address")) { + properties._address = 1; + if (!(message.address && typeof message.address.length === "number" || $util.isString(message.address))) + return "address: buffer expected"; + } + if (message.chainId != null && message.hasOwnProperty("chainId")) { + properties._chainId = 1; + if (!$util.isInteger(message.chainId)) + return "chainId: integer expected"; + } + return null; + }; + + /** + * Creates a WormholeEmitter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.GovernanceSource.WormholeEmitter} WormholeEmitter + */ + WormholeEmitter.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.GovernanceSource.WormholeEmitter) + return object; + var message = new $root.pyth_lazer_transaction.GovernanceSource.WormholeEmitter(); + if (object.address != null) + if (typeof object.address === "string") + $util.base64.decode(object.address, message.address = $util.newBuffer($util.base64.length(object.address)), 0); + else if (object.address.length >= 0) + message.address = object.address; + if (object.chainId != null) + message.chainId = object.chainId >>> 0; + return message; + }; + + /** + * Creates a plain object from a WormholeEmitter message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter + * @static + * @param {pyth_lazer_transaction.GovernanceSource.WormholeEmitter} message WormholeEmitter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WormholeEmitter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.address != null && message.hasOwnProperty("address")) { + object.address = options.bytes === String ? $util.base64.encode(message.address, 0, message.address.length) : options.bytes === Array ? Array.prototype.slice.call(message.address) : message.address; + if (options.oneofs) + object._address = "address"; + } + if (message.chainId != null && message.hasOwnProperty("chainId")) { + object.chainId = message.chainId; + if (options.oneofs) + object._chainId = "chainId"; + } + return object; + }; + + /** + * Converts this WormholeEmitter to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter + * @instance + * @returns {Object.} JSON object + */ + WormholeEmitter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WormholeEmitter + * @function getTypeUrl + * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WormholeEmitter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.GovernanceSource.WormholeEmitter"; + }; + + return WormholeEmitter; + })(); + + return GovernanceSource; + })(); + + pyth_lazer_transaction.CreateShard = (function() { + + /** + * Properties of a CreateShard. + * @memberof pyth_lazer_transaction + * @interface ICreateShard + * @property {number|null} [shardId] CreateShard shardId + * @property {string|null} [shardGroup] CreateShard shardGroup + * @property {google.protobuf.IDuration|null} [minRate] CreateShard minRate + */ + + /** + * Constructs a new CreateShard. + * @memberof pyth_lazer_transaction + * @classdesc Represents a CreateShard. + * @implements ICreateShard + * @constructor + * @param {pyth_lazer_transaction.ICreateShard=} [properties] Properties to set + */ + function CreateShard(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateShard shardId. + * @member {number|null|undefined} shardId + * @memberof pyth_lazer_transaction.CreateShard + * @instance + */ + CreateShard.prototype.shardId = null; + + /** + * CreateShard shardGroup. + * @member {string|null|undefined} shardGroup + * @memberof pyth_lazer_transaction.CreateShard + * @instance + */ + CreateShard.prototype.shardGroup = null; + + /** + * CreateShard minRate. + * @member {google.protobuf.IDuration|null|undefined} minRate + * @memberof pyth_lazer_transaction.CreateShard + * @instance + */ + CreateShard.prototype.minRate = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CreateShard _shardId. + * @member {"shardId"|undefined} _shardId + * @memberof pyth_lazer_transaction.CreateShard + * @instance + */ + Object.defineProperty(CreateShard.prototype, "_shardId", { + get: $util.oneOfGetter($oneOfFields = ["shardId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * CreateShard _shardGroup. + * @member {"shardGroup"|undefined} _shardGroup + * @memberof pyth_lazer_transaction.CreateShard + * @instance + */ + Object.defineProperty(CreateShard.prototype, "_shardGroup", { + get: $util.oneOfGetter($oneOfFields = ["shardGroup"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * CreateShard _minRate. + * @member {"minRate"|undefined} _minRate + * @memberof pyth_lazer_transaction.CreateShard + * @instance + */ + Object.defineProperty(CreateShard.prototype, "_minRate", { + get: $util.oneOfGetter($oneOfFields = ["minRate"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CreateShard instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.CreateShard + * @static + * @param {pyth_lazer_transaction.ICreateShard=} [properties] Properties to set + * @returns {pyth_lazer_transaction.CreateShard} CreateShard instance + */ + CreateShard.create = function create(properties) { + return new CreateShard(properties); + }; + + /** + * Encodes the specified CreateShard message. Does not implicitly {@link pyth_lazer_transaction.CreateShard.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.CreateShard + * @static + * @param {pyth_lazer_transaction.ICreateShard} message CreateShard message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateShard.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.shardId != null && Object.hasOwnProperty.call(message, "shardId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.shardId); + if (message.shardGroup != null && Object.hasOwnProperty.call(message, "shardGroup")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.shardGroup); + if (message.minRate != null && Object.hasOwnProperty.call(message, "minRate")) + $root.google.protobuf.Duration.encode(message.minRate, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateShard message, length delimited. Does not implicitly {@link pyth_lazer_transaction.CreateShard.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.CreateShard + * @static + * @param {pyth_lazer_transaction.ICreateShard} message CreateShard message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateShard.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateShard message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.CreateShard + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.CreateShard} CreateShard + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateShard.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.CreateShard(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.shardId = reader.uint32(); + break; + } + case 2: { + message.shardGroup = reader.string(); + break; + } + case 3: { + message.minRate = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateShard message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.CreateShard + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.CreateShard} CreateShard + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateShard.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateShard message. + * @function verify + * @memberof pyth_lazer_transaction.CreateShard + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateShard.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.shardId != null && message.hasOwnProperty("shardId")) { + properties._shardId = 1; + if (!$util.isInteger(message.shardId)) + return "shardId: integer expected"; + } + if (message.shardGroup != null && message.hasOwnProperty("shardGroup")) { + properties._shardGroup = 1; + if (!$util.isString(message.shardGroup)) + return "shardGroup: string expected"; + } + if (message.minRate != null && message.hasOwnProperty("minRate")) { + properties._minRate = 1; + { + var error = $root.google.protobuf.Duration.verify(message.minRate); + if (error) + return "minRate." + error; + } + } + return null; + }; + + /** + * Creates a CreateShard message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.CreateShard + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.CreateShard} CreateShard + */ + CreateShard.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.CreateShard) + return object; + var message = new $root.pyth_lazer_transaction.CreateShard(); + if (object.shardId != null) + message.shardId = object.shardId >>> 0; + if (object.shardGroup != null) + message.shardGroup = String(object.shardGroup); + if (object.minRate != null) { + if (typeof object.minRate !== "object") + throw TypeError(".pyth_lazer_transaction.CreateShard.minRate: object expected"); + message.minRate = $root.google.protobuf.Duration.fromObject(object.minRate); + } + return message; + }; + + /** + * Creates a plain object from a CreateShard message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.CreateShard + * @static + * @param {pyth_lazer_transaction.CreateShard} message CreateShard + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateShard.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.shardId != null && message.hasOwnProperty("shardId")) { + object.shardId = message.shardId; + if (options.oneofs) + object._shardId = "shardId"; + } + if (message.shardGroup != null && message.hasOwnProperty("shardGroup")) { + object.shardGroup = message.shardGroup; + if (options.oneofs) + object._shardGroup = "shardGroup"; + } + if (message.minRate != null && message.hasOwnProperty("minRate")) { + object.minRate = $root.google.protobuf.Duration.toObject(message.minRate, options); + if (options.oneofs) + object._minRate = "minRate"; + } + return object; + }; + + /** + * Converts this CreateShard to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.CreateShard + * @instance + * @returns {Object.} JSON object + */ + CreateShard.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateShard + * @function getTypeUrl + * @memberof pyth_lazer_transaction.CreateShard + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateShard.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.CreateShard"; + }; + + return CreateShard; + })(); + + pyth_lazer_transaction.AddGovernanceSource = (function() { + + /** + * Properties of an AddGovernanceSource. + * @memberof pyth_lazer_transaction + * @interface IAddGovernanceSource + * @property {pyth_lazer_transaction.IGovernanceSource|null} [newSource] AddGovernanceSource newSource + * @property {pyth_lazer_transaction.IPermissions|null} [permissions] AddGovernanceSource permissions + */ + + /** + * Constructs a new AddGovernanceSource. + * @memberof pyth_lazer_transaction + * @classdesc Represents an AddGovernanceSource. + * @implements IAddGovernanceSource + * @constructor + * @param {pyth_lazer_transaction.IAddGovernanceSource=} [properties] Properties to set + */ + function AddGovernanceSource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AddGovernanceSource newSource. + * @member {pyth_lazer_transaction.IGovernanceSource|null|undefined} newSource + * @memberof pyth_lazer_transaction.AddGovernanceSource + * @instance + */ + AddGovernanceSource.prototype.newSource = null; + + /** + * AddGovernanceSource permissions. + * @member {pyth_lazer_transaction.IPermissions|null|undefined} permissions + * @memberof pyth_lazer_transaction.AddGovernanceSource + * @instance + */ + AddGovernanceSource.prototype.permissions = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AddGovernanceSource _newSource. + * @member {"newSource"|undefined} _newSource + * @memberof pyth_lazer_transaction.AddGovernanceSource + * @instance + */ + Object.defineProperty(AddGovernanceSource.prototype, "_newSource", { + get: $util.oneOfGetter($oneOfFields = ["newSource"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AddGovernanceSource _permissions. + * @member {"permissions"|undefined} _permissions + * @memberof pyth_lazer_transaction.AddGovernanceSource + * @instance + */ + Object.defineProperty(AddGovernanceSource.prototype, "_permissions", { + get: $util.oneOfGetter($oneOfFields = ["permissions"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AddGovernanceSource instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.AddGovernanceSource + * @static + * @param {pyth_lazer_transaction.IAddGovernanceSource=} [properties] Properties to set + * @returns {pyth_lazer_transaction.AddGovernanceSource} AddGovernanceSource instance + */ + AddGovernanceSource.create = function create(properties) { + return new AddGovernanceSource(properties); + }; + + /** + * Encodes the specified AddGovernanceSource message. Does not implicitly {@link pyth_lazer_transaction.AddGovernanceSource.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.AddGovernanceSource + * @static + * @param {pyth_lazer_transaction.IAddGovernanceSource} message AddGovernanceSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddGovernanceSource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.newSource != null && Object.hasOwnProperty.call(message, "newSource")) + $root.pyth_lazer_transaction.GovernanceSource.encode(message.newSource, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.permissions != null && Object.hasOwnProperty.call(message, "permissions")) + $root.pyth_lazer_transaction.Permissions.encode(message.permissions, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AddGovernanceSource message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddGovernanceSource.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.AddGovernanceSource + * @static + * @param {pyth_lazer_transaction.IAddGovernanceSource} message AddGovernanceSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddGovernanceSource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AddGovernanceSource message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.AddGovernanceSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.AddGovernanceSource} AddGovernanceSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddGovernanceSource.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.AddGovernanceSource(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.newSource = $root.pyth_lazer_transaction.GovernanceSource.decode(reader, reader.uint32()); + break; + } + case 2: { + message.permissions = $root.pyth_lazer_transaction.Permissions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AddGovernanceSource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.AddGovernanceSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.AddGovernanceSource} AddGovernanceSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddGovernanceSource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AddGovernanceSource message. + * @function verify + * @memberof pyth_lazer_transaction.AddGovernanceSource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AddGovernanceSource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.newSource != null && message.hasOwnProperty("newSource")) { + properties._newSource = 1; + { + var error = $root.pyth_lazer_transaction.GovernanceSource.verify(message.newSource); + if (error) + return "newSource." + error; + } + } + if (message.permissions != null && message.hasOwnProperty("permissions")) { + properties._permissions = 1; + { + var error = $root.pyth_lazer_transaction.Permissions.verify(message.permissions); + if (error) + return "permissions." + error; + } + } + return null; + }; + + /** + * Creates an AddGovernanceSource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.AddGovernanceSource + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.AddGovernanceSource} AddGovernanceSource + */ + AddGovernanceSource.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.AddGovernanceSource) + return object; + var message = new $root.pyth_lazer_transaction.AddGovernanceSource(); + if (object.newSource != null) { + if (typeof object.newSource !== "object") + throw TypeError(".pyth_lazer_transaction.AddGovernanceSource.newSource: object expected"); + message.newSource = $root.pyth_lazer_transaction.GovernanceSource.fromObject(object.newSource); + } + if (object.permissions != null) { + if (typeof object.permissions !== "object") + throw TypeError(".pyth_lazer_transaction.AddGovernanceSource.permissions: object expected"); + message.permissions = $root.pyth_lazer_transaction.Permissions.fromObject(object.permissions); + } + return message; + }; + + /** + * Creates a plain object from an AddGovernanceSource message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.AddGovernanceSource + * @static + * @param {pyth_lazer_transaction.AddGovernanceSource} message AddGovernanceSource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AddGovernanceSource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.newSource != null && message.hasOwnProperty("newSource")) { + object.newSource = $root.pyth_lazer_transaction.GovernanceSource.toObject(message.newSource, options); + if (options.oneofs) + object._newSource = "newSource"; + } + if (message.permissions != null && message.hasOwnProperty("permissions")) { + object.permissions = $root.pyth_lazer_transaction.Permissions.toObject(message.permissions, options); + if (options.oneofs) + object._permissions = "permissions"; + } + return object; + }; + + /** + * Converts this AddGovernanceSource to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.AddGovernanceSource + * @instance + * @returns {Object.} JSON object + */ + AddGovernanceSource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AddGovernanceSource + * @function getTypeUrl + * @memberof pyth_lazer_transaction.AddGovernanceSource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AddGovernanceSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.AddGovernanceSource"; + }; + + return AddGovernanceSource; + })(); + + pyth_lazer_transaction.UpdateGovernanceSource = (function() { + + /** + * Properties of an UpdateGovernanceSource. + * @memberof pyth_lazer_transaction + * @interface IUpdateGovernanceSource + * @property {pyth_lazer_transaction.IGovernanceSource|null} [source] UpdateGovernanceSource source + * @property {pyth_lazer_transaction.ISetGovernanceSourcePermissions|null} [setGovernanceSourcePermissions] UpdateGovernanceSource setGovernanceSourcePermissions + * @property {google.protobuf.IEmpty|null} [removeGovernanceSource] UpdateGovernanceSource removeGovernanceSource + */ + + /** + * Constructs a new UpdateGovernanceSource. + * @memberof pyth_lazer_transaction + * @classdesc Represents an UpdateGovernanceSource. + * @implements IUpdateGovernanceSource + * @constructor + * @param {pyth_lazer_transaction.IUpdateGovernanceSource=} [properties] Properties to set + */ + function UpdateGovernanceSource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateGovernanceSource source. + * @member {pyth_lazer_transaction.IGovernanceSource|null|undefined} source + * @memberof pyth_lazer_transaction.UpdateGovernanceSource + * @instance + */ + UpdateGovernanceSource.prototype.source = null; + + /** + * UpdateGovernanceSource setGovernanceSourcePermissions. + * @member {pyth_lazer_transaction.ISetGovernanceSourcePermissions|null|undefined} setGovernanceSourcePermissions + * @memberof pyth_lazer_transaction.UpdateGovernanceSource + * @instance + */ + UpdateGovernanceSource.prototype.setGovernanceSourcePermissions = null; + + /** + * UpdateGovernanceSource removeGovernanceSource. + * @member {google.protobuf.IEmpty|null|undefined} removeGovernanceSource + * @memberof pyth_lazer_transaction.UpdateGovernanceSource + * @instance + */ + UpdateGovernanceSource.prototype.removeGovernanceSource = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * UpdateGovernanceSource _source. + * @member {"source"|undefined} _source + * @memberof pyth_lazer_transaction.UpdateGovernanceSource + * @instance + */ + Object.defineProperty(UpdateGovernanceSource.prototype, "_source", { + get: $util.oneOfGetter($oneOfFields = ["source"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * UpdateGovernanceSource action. + * @member {"setGovernanceSourcePermissions"|"removeGovernanceSource"|undefined} action + * @memberof pyth_lazer_transaction.UpdateGovernanceSource + * @instance + */ + Object.defineProperty(UpdateGovernanceSource.prototype, "action", { + get: $util.oneOfGetter($oneOfFields = ["setGovernanceSourcePermissions", "removeGovernanceSource"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new UpdateGovernanceSource instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.UpdateGovernanceSource + * @static + * @param {pyth_lazer_transaction.IUpdateGovernanceSource=} [properties] Properties to set + * @returns {pyth_lazer_transaction.UpdateGovernanceSource} UpdateGovernanceSource instance + */ + UpdateGovernanceSource.create = function create(properties) { + return new UpdateGovernanceSource(properties); + }; + + /** + * Encodes the specified UpdateGovernanceSource message. Does not implicitly {@link pyth_lazer_transaction.UpdateGovernanceSource.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.UpdateGovernanceSource + * @static + * @param {pyth_lazer_transaction.IUpdateGovernanceSource} message UpdateGovernanceSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateGovernanceSource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.source != null && Object.hasOwnProperty.call(message, "source")) + $root.pyth_lazer_transaction.GovernanceSource.encode(message.source, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.setGovernanceSourcePermissions != null && Object.hasOwnProperty.call(message, "setGovernanceSourcePermissions")) + $root.pyth_lazer_transaction.SetGovernanceSourcePermissions.encode(message.setGovernanceSourcePermissions, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); + if (message.removeGovernanceSource != null && Object.hasOwnProperty.call(message, "removeGovernanceSource")) + $root.google.protobuf.Empty.encode(message.removeGovernanceSource, writer.uint32(/* id 199, wireType 2 =*/1594).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateGovernanceSource message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdateGovernanceSource.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.UpdateGovernanceSource + * @static + * @param {pyth_lazer_transaction.IUpdateGovernanceSource} message UpdateGovernanceSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateGovernanceSource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateGovernanceSource message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.UpdateGovernanceSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.UpdateGovernanceSource} UpdateGovernanceSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateGovernanceSource.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.UpdateGovernanceSource(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.source = $root.pyth_lazer_transaction.GovernanceSource.decode(reader, reader.uint32()); + break; + } + case 101: { + message.setGovernanceSourcePermissions = $root.pyth_lazer_transaction.SetGovernanceSourcePermissions.decode(reader, reader.uint32()); + break; + } + case 199: { + message.removeGovernanceSource = $root.google.protobuf.Empty.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateGovernanceSource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.UpdateGovernanceSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.UpdateGovernanceSource} UpdateGovernanceSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateGovernanceSource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateGovernanceSource message. + * @function verify + * @memberof pyth_lazer_transaction.UpdateGovernanceSource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateGovernanceSource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.source != null && message.hasOwnProperty("source")) { + properties._source = 1; + { + var error = $root.pyth_lazer_transaction.GovernanceSource.verify(message.source); + if (error) + return "source." + error; + } + } + if (message.setGovernanceSourcePermissions != null && message.hasOwnProperty("setGovernanceSourcePermissions")) { + properties.action = 1; + { + var error = $root.pyth_lazer_transaction.SetGovernanceSourcePermissions.verify(message.setGovernanceSourcePermissions); + if (error) + return "setGovernanceSourcePermissions." + error; + } + } + if (message.removeGovernanceSource != null && message.hasOwnProperty("removeGovernanceSource")) { + if (properties.action === 1) + return "action: multiple values"; + properties.action = 1; + { + var error = $root.google.protobuf.Empty.verify(message.removeGovernanceSource); + if (error) + return "removeGovernanceSource." + error; + } + } + return null; + }; + + /** + * Creates an UpdateGovernanceSource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.UpdateGovernanceSource + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.UpdateGovernanceSource} UpdateGovernanceSource + */ + UpdateGovernanceSource.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.UpdateGovernanceSource) + return object; + var message = new $root.pyth_lazer_transaction.UpdateGovernanceSource(); + if (object.source != null) { + if (typeof object.source !== "object") + throw TypeError(".pyth_lazer_transaction.UpdateGovernanceSource.source: object expected"); + message.source = $root.pyth_lazer_transaction.GovernanceSource.fromObject(object.source); + } + if (object.setGovernanceSourcePermissions != null) { + if (typeof object.setGovernanceSourcePermissions !== "object") + throw TypeError(".pyth_lazer_transaction.UpdateGovernanceSource.setGovernanceSourcePermissions: object expected"); + message.setGovernanceSourcePermissions = $root.pyth_lazer_transaction.SetGovernanceSourcePermissions.fromObject(object.setGovernanceSourcePermissions); + } + if (object.removeGovernanceSource != null) { + if (typeof object.removeGovernanceSource !== "object") + throw TypeError(".pyth_lazer_transaction.UpdateGovernanceSource.removeGovernanceSource: object expected"); + message.removeGovernanceSource = $root.google.protobuf.Empty.fromObject(object.removeGovernanceSource); + } + return message; + }; + + /** + * Creates a plain object from an UpdateGovernanceSource message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.UpdateGovernanceSource + * @static + * @param {pyth_lazer_transaction.UpdateGovernanceSource} message UpdateGovernanceSource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateGovernanceSource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.source != null && message.hasOwnProperty("source")) { + object.source = $root.pyth_lazer_transaction.GovernanceSource.toObject(message.source, options); + if (options.oneofs) + object._source = "source"; + } + if (message.setGovernanceSourcePermissions != null && message.hasOwnProperty("setGovernanceSourcePermissions")) { + object.setGovernanceSourcePermissions = $root.pyth_lazer_transaction.SetGovernanceSourcePermissions.toObject(message.setGovernanceSourcePermissions, options); + if (options.oneofs) + object.action = "setGovernanceSourcePermissions"; + } + if (message.removeGovernanceSource != null && message.hasOwnProperty("removeGovernanceSource")) { + object.removeGovernanceSource = $root.google.protobuf.Empty.toObject(message.removeGovernanceSource, options); + if (options.oneofs) + object.action = "removeGovernanceSource"; + } + return object; + }; + + /** + * Converts this UpdateGovernanceSource to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.UpdateGovernanceSource + * @instance + * @returns {Object.} JSON object + */ + UpdateGovernanceSource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateGovernanceSource + * @function getTypeUrl + * @memberof pyth_lazer_transaction.UpdateGovernanceSource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateGovernanceSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.UpdateGovernanceSource"; + }; + + return UpdateGovernanceSource; + })(); + + pyth_lazer_transaction.SetGovernanceSourcePermissions = (function() { + + /** + * Properties of a SetGovernanceSourcePermissions. + * @memberof pyth_lazer_transaction + * @interface ISetGovernanceSourcePermissions + * @property {pyth_lazer_transaction.IPermissions|null} [permissions] SetGovernanceSourcePermissions permissions + */ + + /** + * Constructs a new SetGovernanceSourcePermissions. + * @memberof pyth_lazer_transaction + * @classdesc Represents a SetGovernanceSourcePermissions. + * @implements ISetGovernanceSourcePermissions + * @constructor + * @param {pyth_lazer_transaction.ISetGovernanceSourcePermissions=} [properties] Properties to set + */ + function SetGovernanceSourcePermissions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SetGovernanceSourcePermissions permissions. + * @member {pyth_lazer_transaction.IPermissions|null|undefined} permissions + * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions + * @instance + */ + SetGovernanceSourcePermissions.prototype.permissions = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SetGovernanceSourcePermissions _permissions. + * @member {"permissions"|undefined} _permissions + * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions + * @instance + */ + Object.defineProperty(SetGovernanceSourcePermissions.prototype, "_permissions", { + get: $util.oneOfGetter($oneOfFields = ["permissions"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SetGovernanceSourcePermissions instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions + * @static + * @param {pyth_lazer_transaction.ISetGovernanceSourcePermissions=} [properties] Properties to set + * @returns {pyth_lazer_transaction.SetGovernanceSourcePermissions} SetGovernanceSourcePermissions instance + */ + SetGovernanceSourcePermissions.create = function create(properties) { + return new SetGovernanceSourcePermissions(properties); + }; + + /** + * Encodes the specified SetGovernanceSourcePermissions message. Does not implicitly {@link pyth_lazer_transaction.SetGovernanceSourcePermissions.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions + * @static + * @param {pyth_lazer_transaction.ISetGovernanceSourcePermissions} message SetGovernanceSourcePermissions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetGovernanceSourcePermissions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.permissions != null && Object.hasOwnProperty.call(message, "permissions")) + $root.pyth_lazer_transaction.Permissions.encode(message.permissions, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SetGovernanceSourcePermissions message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetGovernanceSourcePermissions.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions + * @static + * @param {pyth_lazer_transaction.ISetGovernanceSourcePermissions} message SetGovernanceSourcePermissions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetGovernanceSourcePermissions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetGovernanceSourcePermissions message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.SetGovernanceSourcePermissions} SetGovernanceSourcePermissions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetGovernanceSourcePermissions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.SetGovernanceSourcePermissions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.permissions = $root.pyth_lazer_transaction.Permissions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetGovernanceSourcePermissions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.SetGovernanceSourcePermissions} SetGovernanceSourcePermissions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetGovernanceSourcePermissions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetGovernanceSourcePermissions message. + * @function verify + * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetGovernanceSourcePermissions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.permissions != null && message.hasOwnProperty("permissions")) { + properties._permissions = 1; + { + var error = $root.pyth_lazer_transaction.Permissions.verify(message.permissions); + if (error) + return "permissions." + error; + } + } + return null; + }; + + /** + * Creates a SetGovernanceSourcePermissions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.SetGovernanceSourcePermissions} SetGovernanceSourcePermissions + */ + SetGovernanceSourcePermissions.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.SetGovernanceSourcePermissions) + return object; + var message = new $root.pyth_lazer_transaction.SetGovernanceSourcePermissions(); + if (object.permissions != null) { + if (typeof object.permissions !== "object") + throw TypeError(".pyth_lazer_transaction.SetGovernanceSourcePermissions.permissions: object expected"); + message.permissions = $root.pyth_lazer_transaction.Permissions.fromObject(object.permissions); + } + return message; + }; + + /** + * Creates a plain object from a SetGovernanceSourcePermissions message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions + * @static + * @param {pyth_lazer_transaction.SetGovernanceSourcePermissions} message SetGovernanceSourcePermissions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetGovernanceSourcePermissions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.permissions != null && message.hasOwnProperty("permissions")) { + object.permissions = $root.pyth_lazer_transaction.Permissions.toObject(message.permissions, options); + if (options.oneofs) + object._permissions = "permissions"; + } + return object; + }; + + /** + * Converts this SetGovernanceSourcePermissions to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions + * @instance + * @returns {Object.} JSON object + */ + SetGovernanceSourcePermissions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetGovernanceSourcePermissions + * @function getTypeUrl + * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetGovernanceSourcePermissions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.SetGovernanceSourcePermissions"; + }; + + return SetGovernanceSourcePermissions; + })(); + + pyth_lazer_transaction.SetShardName = (function() { + + /** + * Properties of a SetShardName. + * @memberof pyth_lazer_transaction + * @interface ISetShardName + * @property {string|null} [shardName] SetShardName shardName + */ + + /** + * Constructs a new SetShardName. + * @memberof pyth_lazer_transaction + * @classdesc Represents a SetShardName. + * @implements ISetShardName + * @constructor + * @param {pyth_lazer_transaction.ISetShardName=} [properties] Properties to set + */ + function SetShardName(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SetShardName shardName. + * @member {string|null|undefined} shardName + * @memberof pyth_lazer_transaction.SetShardName + * @instance + */ + SetShardName.prototype.shardName = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SetShardName _shardName. + * @member {"shardName"|undefined} _shardName + * @memberof pyth_lazer_transaction.SetShardName + * @instance + */ + Object.defineProperty(SetShardName.prototype, "_shardName", { + get: $util.oneOfGetter($oneOfFields = ["shardName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SetShardName instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.SetShardName + * @static + * @param {pyth_lazer_transaction.ISetShardName=} [properties] Properties to set + * @returns {pyth_lazer_transaction.SetShardName} SetShardName instance + */ + SetShardName.create = function create(properties) { + return new SetShardName(properties); + }; + + /** + * Encodes the specified SetShardName message. Does not implicitly {@link pyth_lazer_transaction.SetShardName.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.SetShardName + * @static + * @param {pyth_lazer_transaction.ISetShardName} message SetShardName message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetShardName.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.shardName != null && Object.hasOwnProperty.call(message, "shardName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.shardName); + return writer; + }; + + /** + * Encodes the specified SetShardName message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetShardName.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.SetShardName + * @static + * @param {pyth_lazer_transaction.ISetShardName} message SetShardName message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetShardName.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetShardName message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.SetShardName + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.SetShardName} SetShardName + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetShardName.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.SetShardName(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.shardName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetShardName message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.SetShardName + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.SetShardName} SetShardName + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetShardName.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetShardName message. + * @function verify + * @memberof pyth_lazer_transaction.SetShardName + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetShardName.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.shardName != null && message.hasOwnProperty("shardName")) { + properties._shardName = 1; + if (!$util.isString(message.shardName)) + return "shardName: string expected"; + } + return null; + }; + + /** + * Creates a SetShardName message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.SetShardName + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.SetShardName} SetShardName + */ + SetShardName.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.SetShardName) + return object; + var message = new $root.pyth_lazer_transaction.SetShardName(); + if (object.shardName != null) + message.shardName = String(object.shardName); + return message; + }; + + /** + * Creates a plain object from a SetShardName message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.SetShardName + * @static + * @param {pyth_lazer_transaction.SetShardName} message SetShardName + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetShardName.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.shardName != null && message.hasOwnProperty("shardName")) { + object.shardName = message.shardName; + if (options.oneofs) + object._shardName = "shardName"; + } + return object; + }; + + /** + * Converts this SetShardName to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.SetShardName + * @instance + * @returns {Object.} JSON object + */ + SetShardName.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetShardName + * @function getTypeUrl + * @memberof pyth_lazer_transaction.SetShardName + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetShardName.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.SetShardName"; + }; + + return SetShardName; + })(); + + pyth_lazer_transaction.SetShardGroup = (function() { + + /** + * Properties of a SetShardGroup. + * @memberof pyth_lazer_transaction + * @interface ISetShardGroup + * @property {string|null} [shardGroup] SetShardGroup shardGroup + */ + + /** + * Constructs a new SetShardGroup. + * @memberof pyth_lazer_transaction + * @classdesc Represents a SetShardGroup. + * @implements ISetShardGroup + * @constructor + * @param {pyth_lazer_transaction.ISetShardGroup=} [properties] Properties to set + */ + function SetShardGroup(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SetShardGroup shardGroup. + * @member {string|null|undefined} shardGroup + * @memberof pyth_lazer_transaction.SetShardGroup + * @instance + */ + SetShardGroup.prototype.shardGroup = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SetShardGroup _shardGroup. + * @member {"shardGroup"|undefined} _shardGroup + * @memberof pyth_lazer_transaction.SetShardGroup + * @instance + */ + Object.defineProperty(SetShardGroup.prototype, "_shardGroup", { + get: $util.oneOfGetter($oneOfFields = ["shardGroup"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SetShardGroup instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.SetShardGroup + * @static + * @param {pyth_lazer_transaction.ISetShardGroup=} [properties] Properties to set + * @returns {pyth_lazer_transaction.SetShardGroup} SetShardGroup instance + */ + SetShardGroup.create = function create(properties) { + return new SetShardGroup(properties); + }; + + /** + * Encodes the specified SetShardGroup message. Does not implicitly {@link pyth_lazer_transaction.SetShardGroup.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.SetShardGroup + * @static + * @param {pyth_lazer_transaction.ISetShardGroup} message SetShardGroup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetShardGroup.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.shardGroup != null && Object.hasOwnProperty.call(message, "shardGroup")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.shardGroup); + return writer; + }; + + /** + * Encodes the specified SetShardGroup message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetShardGroup.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.SetShardGroup + * @static + * @param {pyth_lazer_transaction.ISetShardGroup} message SetShardGroup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetShardGroup.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetShardGroup message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.SetShardGroup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.SetShardGroup} SetShardGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetShardGroup.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.SetShardGroup(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.shardGroup = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetShardGroup message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.SetShardGroup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.SetShardGroup} SetShardGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetShardGroup.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetShardGroup message. + * @function verify + * @memberof pyth_lazer_transaction.SetShardGroup + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetShardGroup.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.shardGroup != null && message.hasOwnProperty("shardGroup")) { + properties._shardGroup = 1; + if (!$util.isString(message.shardGroup)) + return "shardGroup: string expected"; + } + return null; + }; + + /** + * Creates a SetShardGroup message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.SetShardGroup + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.SetShardGroup} SetShardGroup + */ + SetShardGroup.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.SetShardGroup) + return object; + var message = new $root.pyth_lazer_transaction.SetShardGroup(); + if (object.shardGroup != null) + message.shardGroup = String(object.shardGroup); + return message; + }; + + /** + * Creates a plain object from a SetShardGroup message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.SetShardGroup + * @static + * @param {pyth_lazer_transaction.SetShardGroup} message SetShardGroup + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetShardGroup.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.shardGroup != null && message.hasOwnProperty("shardGroup")) { + object.shardGroup = message.shardGroup; + if (options.oneofs) + object._shardGroup = "shardGroup"; + } + return object; + }; + + /** + * Converts this SetShardGroup to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.SetShardGroup + * @instance + * @returns {Object.} JSON object + */ + SetShardGroup.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetShardGroup + * @function getTypeUrl + * @memberof pyth_lazer_transaction.SetShardGroup + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetShardGroup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.SetShardGroup"; + }; + + return SetShardGroup; + })(); + + pyth_lazer_transaction.ResetLastSequenceNo = (function() { + + /** + * Properties of a ResetLastSequenceNo. + * @memberof pyth_lazer_transaction + * @interface IResetLastSequenceNo + * @property {number|Long|null} [lastSequenceNo] ResetLastSequenceNo lastSequenceNo + */ + + /** + * Constructs a new ResetLastSequenceNo. + * @memberof pyth_lazer_transaction + * @classdesc Represents a ResetLastSequenceNo. + * @implements IResetLastSequenceNo + * @constructor + * @param {pyth_lazer_transaction.IResetLastSequenceNo=} [properties] Properties to set + */ + function ResetLastSequenceNo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResetLastSequenceNo lastSequenceNo. + * @member {number|Long|null|undefined} lastSequenceNo + * @memberof pyth_lazer_transaction.ResetLastSequenceNo + * @instance + */ + ResetLastSequenceNo.prototype.lastSequenceNo = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ResetLastSequenceNo _lastSequenceNo. + * @member {"lastSequenceNo"|undefined} _lastSequenceNo + * @memberof pyth_lazer_transaction.ResetLastSequenceNo + * @instance + */ + Object.defineProperty(ResetLastSequenceNo.prototype, "_lastSequenceNo", { + get: $util.oneOfGetter($oneOfFields = ["lastSequenceNo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ResetLastSequenceNo instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.ResetLastSequenceNo + * @static + * @param {pyth_lazer_transaction.IResetLastSequenceNo=} [properties] Properties to set + * @returns {pyth_lazer_transaction.ResetLastSequenceNo} ResetLastSequenceNo instance + */ + ResetLastSequenceNo.create = function create(properties) { + return new ResetLastSequenceNo(properties); + }; + + /** + * Encodes the specified ResetLastSequenceNo message. Does not implicitly {@link pyth_lazer_transaction.ResetLastSequenceNo.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.ResetLastSequenceNo + * @static + * @param {pyth_lazer_transaction.IResetLastSequenceNo} message ResetLastSequenceNo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResetLastSequenceNo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.lastSequenceNo != null && Object.hasOwnProperty.call(message, "lastSequenceNo")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.lastSequenceNo); + return writer; + }; + + /** + * Encodes the specified ResetLastSequenceNo message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ResetLastSequenceNo.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.ResetLastSequenceNo + * @static + * @param {pyth_lazer_transaction.IResetLastSequenceNo} message ResetLastSequenceNo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResetLastSequenceNo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResetLastSequenceNo message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.ResetLastSequenceNo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.ResetLastSequenceNo} ResetLastSequenceNo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResetLastSequenceNo.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.ResetLastSequenceNo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.lastSequenceNo = reader.uint64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResetLastSequenceNo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.ResetLastSequenceNo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.ResetLastSequenceNo} ResetLastSequenceNo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResetLastSequenceNo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResetLastSequenceNo message. + * @function verify + * @memberof pyth_lazer_transaction.ResetLastSequenceNo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResetLastSequenceNo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.lastSequenceNo != null && message.hasOwnProperty("lastSequenceNo")) { + properties._lastSequenceNo = 1; + if (!$util.isInteger(message.lastSequenceNo) && !(message.lastSequenceNo && $util.isInteger(message.lastSequenceNo.low) && $util.isInteger(message.lastSequenceNo.high))) + return "lastSequenceNo: integer|Long expected"; + } + return null; + }; + + /** + * Creates a ResetLastSequenceNo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.ResetLastSequenceNo + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.ResetLastSequenceNo} ResetLastSequenceNo + */ + ResetLastSequenceNo.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.ResetLastSequenceNo) + return object; + var message = new $root.pyth_lazer_transaction.ResetLastSequenceNo(); + if (object.lastSequenceNo != null) + if ($util.Long) + (message.lastSequenceNo = $util.Long.fromValue(object.lastSequenceNo)).unsigned = true; + else if (typeof object.lastSequenceNo === "string") + message.lastSequenceNo = parseInt(object.lastSequenceNo, 10); + else if (typeof object.lastSequenceNo === "number") + message.lastSequenceNo = object.lastSequenceNo; + else if (typeof object.lastSequenceNo === "object") + message.lastSequenceNo = new $util.LongBits(object.lastSequenceNo.low >>> 0, object.lastSequenceNo.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a ResetLastSequenceNo message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.ResetLastSequenceNo + * @static + * @param {pyth_lazer_transaction.ResetLastSequenceNo} message ResetLastSequenceNo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResetLastSequenceNo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.lastSequenceNo != null && message.hasOwnProperty("lastSequenceNo")) { + if (typeof message.lastSequenceNo === "number") + object.lastSequenceNo = options.longs === String ? String(message.lastSequenceNo) : message.lastSequenceNo; + else + object.lastSequenceNo = options.longs === String ? $util.Long.prototype.toString.call(message.lastSequenceNo) : options.longs === Number ? new $util.LongBits(message.lastSequenceNo.low >>> 0, message.lastSequenceNo.high >>> 0).toNumber(true) : message.lastSequenceNo; + if (options.oneofs) + object._lastSequenceNo = "lastSequenceNo"; + } + return object; + }; + + /** + * Converts this ResetLastSequenceNo to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.ResetLastSequenceNo + * @instance + * @returns {Object.} JSON object + */ + ResetLastSequenceNo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResetLastSequenceNo + * @function getTypeUrl + * @memberof pyth_lazer_transaction.ResetLastSequenceNo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResetLastSequenceNo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.ResetLastSequenceNo"; + }; + + return ResetLastSequenceNo; + })(); + + pyth_lazer_transaction.AddPublisher = (function() { + + /** + * Properties of an AddPublisher. + * @memberof pyth_lazer_transaction + * @interface IAddPublisher + * @property {number|null} [publisherId] AddPublisher publisherId + * @property {string|null} [name] AddPublisher name + * @property {Array.|null} [publicKeys] AddPublisher publicKeys + * @property {boolean|null} [isActive] AddPublisher isActive + */ + + /** + * Constructs a new AddPublisher. + * @memberof pyth_lazer_transaction + * @classdesc Represents an AddPublisher. + * @implements IAddPublisher + * @constructor + * @param {pyth_lazer_transaction.IAddPublisher=} [properties] Properties to set + */ + function AddPublisher(properties) { + this.publicKeys = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AddPublisher publisherId. + * @member {number|null|undefined} publisherId + * @memberof pyth_lazer_transaction.AddPublisher + * @instance + */ + AddPublisher.prototype.publisherId = null; + + /** + * AddPublisher name. + * @member {string|null|undefined} name + * @memberof pyth_lazer_transaction.AddPublisher + * @instance + */ + AddPublisher.prototype.name = null; + + /** + * AddPublisher publicKeys. + * @member {Array.} publicKeys + * @memberof pyth_lazer_transaction.AddPublisher + * @instance + */ + AddPublisher.prototype.publicKeys = $util.emptyArray; + + /** + * AddPublisher isActive. + * @member {boolean|null|undefined} isActive + * @memberof pyth_lazer_transaction.AddPublisher + * @instance + */ + AddPublisher.prototype.isActive = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AddPublisher _publisherId. + * @member {"publisherId"|undefined} _publisherId + * @memberof pyth_lazer_transaction.AddPublisher + * @instance + */ + Object.defineProperty(AddPublisher.prototype, "_publisherId", { + get: $util.oneOfGetter($oneOfFields = ["publisherId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AddPublisher _name. + * @member {"name"|undefined} _name + * @memberof pyth_lazer_transaction.AddPublisher + * @instance + */ + Object.defineProperty(AddPublisher.prototype, "_name", { + get: $util.oneOfGetter($oneOfFields = ["name"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AddPublisher _isActive. + * @member {"isActive"|undefined} _isActive + * @memberof pyth_lazer_transaction.AddPublisher + * @instance + */ + Object.defineProperty(AddPublisher.prototype, "_isActive", { + get: $util.oneOfGetter($oneOfFields = ["isActive"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AddPublisher instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.AddPublisher + * @static + * @param {pyth_lazer_transaction.IAddPublisher=} [properties] Properties to set + * @returns {pyth_lazer_transaction.AddPublisher} AddPublisher instance + */ + AddPublisher.create = function create(properties) { + return new AddPublisher(properties); + }; + + /** + * Encodes the specified AddPublisher message. Does not implicitly {@link pyth_lazer_transaction.AddPublisher.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.AddPublisher + * @static + * @param {pyth_lazer_transaction.IAddPublisher} message AddPublisher message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddPublisher.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.publisherId != null && Object.hasOwnProperty.call(message, "publisherId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.publisherId); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); + if (message.publicKeys != null && message.publicKeys.length) + for (var i = 0; i < message.publicKeys.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.publicKeys[i]); + if (message.isActive != null && Object.hasOwnProperty.call(message, "isActive")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.isActive); + return writer; + }; + + /** + * Encodes the specified AddPublisher message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddPublisher.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.AddPublisher + * @static + * @param {pyth_lazer_transaction.IAddPublisher} message AddPublisher message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddPublisher.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AddPublisher message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.AddPublisher + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.AddPublisher} AddPublisher + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddPublisher.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.AddPublisher(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.publisherId = reader.uint32(); + break; + } + case 2: { + message.name = reader.string(); + break; + } + case 3: { + if (!(message.publicKeys && message.publicKeys.length)) + message.publicKeys = []; + message.publicKeys.push(reader.bytes()); + break; + } + case 4: { + message.isActive = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AddPublisher message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.AddPublisher + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.AddPublisher} AddPublisher + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddPublisher.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AddPublisher message. + * @function verify + * @memberof pyth_lazer_transaction.AddPublisher + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AddPublisher.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.publisherId != null && message.hasOwnProperty("publisherId")) { + properties._publisherId = 1; + if (!$util.isInteger(message.publisherId)) + return "publisherId: integer expected"; + } + if (message.name != null && message.hasOwnProperty("name")) { + properties._name = 1; + if (!$util.isString(message.name)) + return "name: string expected"; + } + if (message.publicKeys != null && message.hasOwnProperty("publicKeys")) { + if (!Array.isArray(message.publicKeys)) + return "publicKeys: array expected"; + for (var i = 0; i < message.publicKeys.length; ++i) + if (!(message.publicKeys[i] && typeof message.publicKeys[i].length === "number" || $util.isString(message.publicKeys[i]))) + return "publicKeys: buffer[] expected"; + } + if (message.isActive != null && message.hasOwnProperty("isActive")) { + properties._isActive = 1; + if (typeof message.isActive !== "boolean") + return "isActive: boolean expected"; + } + return null; + }; + + /** + * Creates an AddPublisher message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.AddPublisher + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.AddPublisher} AddPublisher + */ + AddPublisher.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.AddPublisher) + return object; + var message = new $root.pyth_lazer_transaction.AddPublisher(); + if (object.publisherId != null) + message.publisherId = object.publisherId >>> 0; + if (object.name != null) + message.name = String(object.name); + if (object.publicKeys) { + if (!Array.isArray(object.publicKeys)) + throw TypeError(".pyth_lazer_transaction.AddPublisher.publicKeys: array expected"); + message.publicKeys = []; + for (var i = 0; i < object.publicKeys.length; ++i) + if (typeof object.publicKeys[i] === "string") + $util.base64.decode(object.publicKeys[i], message.publicKeys[i] = $util.newBuffer($util.base64.length(object.publicKeys[i])), 0); + else if (object.publicKeys[i].length >= 0) + message.publicKeys[i] = object.publicKeys[i]; + } + if (object.isActive != null) + message.isActive = Boolean(object.isActive); + return message; + }; + + /** + * Creates a plain object from an AddPublisher message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.AddPublisher + * @static + * @param {pyth_lazer_transaction.AddPublisher} message AddPublisher + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AddPublisher.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.publicKeys = []; + if (message.publisherId != null && message.hasOwnProperty("publisherId")) { + object.publisherId = message.publisherId; + if (options.oneofs) + object._publisherId = "publisherId"; + } + if (message.name != null && message.hasOwnProperty("name")) { + object.name = message.name; + if (options.oneofs) + object._name = "name"; + } + if (message.publicKeys && message.publicKeys.length) { + object.publicKeys = []; + for (var j = 0; j < message.publicKeys.length; ++j) + object.publicKeys[j] = options.bytes === String ? $util.base64.encode(message.publicKeys[j], 0, message.publicKeys[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.publicKeys[j]) : message.publicKeys[j]; + } + if (message.isActive != null && message.hasOwnProperty("isActive")) { + object.isActive = message.isActive; + if (options.oneofs) + object._isActive = "isActive"; + } + return object; + }; + + /** + * Converts this AddPublisher to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.AddPublisher + * @instance + * @returns {Object.} JSON object + */ + AddPublisher.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AddPublisher + * @function getTypeUrl + * @memberof pyth_lazer_transaction.AddPublisher + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AddPublisher.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.AddPublisher"; + }; + + return AddPublisher; + })(); + + pyth_lazer_transaction.UpdatePublisher = (function() { + + /** + * Properties of an UpdatePublisher. + * @memberof pyth_lazer_transaction + * @interface IUpdatePublisher + * @property {number|null} [publisherId] UpdatePublisher publisherId + * @property {pyth_lazer_transaction.ISetPublisherName|null} [setPublisherName] UpdatePublisher setPublisherName + * @property {pyth_lazer_transaction.IAddPublisherPublicKeys|null} [addPublisherPublicKeys] UpdatePublisher addPublisherPublicKeys + * @property {pyth_lazer_transaction.IRemovePublisherPublicKeys|null} [removePublisherPublicKeys] UpdatePublisher removePublisherPublicKeys + * @property {pyth_lazer_transaction.ISetPublisherPublicKeys|null} [setPublisherPublicKeys] UpdatePublisher setPublisherPublicKeys + * @property {pyth_lazer_transaction.ISetPublisherActive|null} [setPublisherActive] UpdatePublisher setPublisherActive + * @property {google.protobuf.IEmpty|null} [removePublisher] UpdatePublisher removePublisher + */ + + /** + * Constructs a new UpdatePublisher. + * @memberof pyth_lazer_transaction + * @classdesc Represents an UpdatePublisher. + * @implements IUpdatePublisher + * @constructor + * @param {pyth_lazer_transaction.IUpdatePublisher=} [properties] Properties to set + */ + function UpdatePublisher(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdatePublisher publisherId. + * @member {number|null|undefined} publisherId + * @memberof pyth_lazer_transaction.UpdatePublisher + * @instance + */ + UpdatePublisher.prototype.publisherId = null; + + /** + * UpdatePublisher setPublisherName. + * @member {pyth_lazer_transaction.ISetPublisherName|null|undefined} setPublisherName + * @memberof pyth_lazer_transaction.UpdatePublisher + * @instance + */ + UpdatePublisher.prototype.setPublisherName = null; + + /** + * UpdatePublisher addPublisherPublicKeys. + * @member {pyth_lazer_transaction.IAddPublisherPublicKeys|null|undefined} addPublisherPublicKeys + * @memberof pyth_lazer_transaction.UpdatePublisher + * @instance + */ + UpdatePublisher.prototype.addPublisherPublicKeys = null; + + /** + * UpdatePublisher removePublisherPublicKeys. + * @member {pyth_lazer_transaction.IRemovePublisherPublicKeys|null|undefined} removePublisherPublicKeys + * @memberof pyth_lazer_transaction.UpdatePublisher + * @instance + */ + UpdatePublisher.prototype.removePublisherPublicKeys = null; + + /** + * UpdatePublisher setPublisherPublicKeys. + * @member {pyth_lazer_transaction.ISetPublisherPublicKeys|null|undefined} setPublisherPublicKeys + * @memberof pyth_lazer_transaction.UpdatePublisher + * @instance + */ + UpdatePublisher.prototype.setPublisherPublicKeys = null; + + /** + * UpdatePublisher setPublisherActive. + * @member {pyth_lazer_transaction.ISetPublisherActive|null|undefined} setPublisherActive + * @memberof pyth_lazer_transaction.UpdatePublisher + * @instance + */ + UpdatePublisher.prototype.setPublisherActive = null; + + /** + * UpdatePublisher removePublisher. + * @member {google.protobuf.IEmpty|null|undefined} removePublisher + * @memberof pyth_lazer_transaction.UpdatePublisher + * @instance + */ + UpdatePublisher.prototype.removePublisher = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * UpdatePublisher _publisherId. + * @member {"publisherId"|undefined} _publisherId + * @memberof pyth_lazer_transaction.UpdatePublisher + * @instance + */ + Object.defineProperty(UpdatePublisher.prototype, "_publisherId", { + get: $util.oneOfGetter($oneOfFields = ["publisherId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * UpdatePublisher action. + * @member {"setPublisherName"|"addPublisherPublicKeys"|"removePublisherPublicKeys"|"setPublisherPublicKeys"|"setPublisherActive"|"removePublisher"|undefined} action + * @memberof pyth_lazer_transaction.UpdatePublisher + * @instance + */ + Object.defineProperty(UpdatePublisher.prototype, "action", { + get: $util.oneOfGetter($oneOfFields = ["setPublisherName", "addPublisherPublicKeys", "removePublisherPublicKeys", "setPublisherPublicKeys", "setPublisherActive", "removePublisher"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new UpdatePublisher instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.UpdatePublisher + * @static + * @param {pyth_lazer_transaction.IUpdatePublisher=} [properties] Properties to set + * @returns {pyth_lazer_transaction.UpdatePublisher} UpdatePublisher instance + */ + UpdatePublisher.create = function create(properties) { + return new UpdatePublisher(properties); + }; + + /** + * Encodes the specified UpdatePublisher message. Does not implicitly {@link pyth_lazer_transaction.UpdatePublisher.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.UpdatePublisher + * @static + * @param {pyth_lazer_transaction.IUpdatePublisher} message UpdatePublisher message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdatePublisher.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.publisherId != null && Object.hasOwnProperty.call(message, "publisherId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.publisherId); + if (message.setPublisherName != null && Object.hasOwnProperty.call(message, "setPublisherName")) + $root.pyth_lazer_transaction.SetPublisherName.encode(message.setPublisherName, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); + if (message.addPublisherPublicKeys != null && Object.hasOwnProperty.call(message, "addPublisherPublicKeys")) + $root.pyth_lazer_transaction.AddPublisherPublicKeys.encode(message.addPublisherPublicKeys, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); + if (message.removePublisherPublicKeys != null && Object.hasOwnProperty.call(message, "removePublisherPublicKeys")) + $root.pyth_lazer_transaction.RemovePublisherPublicKeys.encode(message.removePublisherPublicKeys, writer.uint32(/* id 103, wireType 2 =*/826).fork()).ldelim(); + if (message.setPublisherPublicKeys != null && Object.hasOwnProperty.call(message, "setPublisherPublicKeys")) + $root.pyth_lazer_transaction.SetPublisherPublicKeys.encode(message.setPublisherPublicKeys, writer.uint32(/* id 104, wireType 2 =*/834).fork()).ldelim(); + if (message.setPublisherActive != null && Object.hasOwnProperty.call(message, "setPublisherActive")) + $root.pyth_lazer_transaction.SetPublisherActive.encode(message.setPublisherActive, writer.uint32(/* id 105, wireType 2 =*/842).fork()).ldelim(); + if (message.removePublisher != null && Object.hasOwnProperty.call(message, "removePublisher")) + $root.google.protobuf.Empty.encode(message.removePublisher, writer.uint32(/* id 199, wireType 2 =*/1594).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdatePublisher message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdatePublisher.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.UpdatePublisher + * @static + * @param {pyth_lazer_transaction.IUpdatePublisher} message UpdatePublisher message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdatePublisher.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdatePublisher message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.UpdatePublisher + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.UpdatePublisher} UpdatePublisher + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdatePublisher.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.UpdatePublisher(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.publisherId = reader.uint32(); + break; + } + case 101: { + message.setPublisherName = $root.pyth_lazer_transaction.SetPublisherName.decode(reader, reader.uint32()); + break; + } + case 102: { + message.addPublisherPublicKeys = $root.pyth_lazer_transaction.AddPublisherPublicKeys.decode(reader, reader.uint32()); + break; + } + case 103: { + message.removePublisherPublicKeys = $root.pyth_lazer_transaction.RemovePublisherPublicKeys.decode(reader, reader.uint32()); + break; + } + case 104: { + message.setPublisherPublicKeys = $root.pyth_lazer_transaction.SetPublisherPublicKeys.decode(reader, reader.uint32()); + break; + } + case 105: { + message.setPublisherActive = $root.pyth_lazer_transaction.SetPublisherActive.decode(reader, reader.uint32()); + break; + } + case 199: { + message.removePublisher = $root.google.protobuf.Empty.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdatePublisher message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.UpdatePublisher + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.UpdatePublisher} UpdatePublisher + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdatePublisher.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdatePublisher message. + * @function verify + * @memberof pyth_lazer_transaction.UpdatePublisher + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdatePublisher.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.publisherId != null && message.hasOwnProperty("publisherId")) { + properties._publisherId = 1; + if (!$util.isInteger(message.publisherId)) + return "publisherId: integer expected"; + } + if (message.setPublisherName != null && message.hasOwnProperty("setPublisherName")) { + properties.action = 1; + { + var error = $root.pyth_lazer_transaction.SetPublisherName.verify(message.setPublisherName); + if (error) + return "setPublisherName." + error; + } + } + if (message.addPublisherPublicKeys != null && message.hasOwnProperty("addPublisherPublicKeys")) { + if (properties.action === 1) + return "action: multiple values"; + properties.action = 1; + { + var error = $root.pyth_lazer_transaction.AddPublisherPublicKeys.verify(message.addPublisherPublicKeys); + if (error) + return "addPublisherPublicKeys." + error; + } + } + if (message.removePublisherPublicKeys != null && message.hasOwnProperty("removePublisherPublicKeys")) { + if (properties.action === 1) + return "action: multiple values"; + properties.action = 1; + { + var error = $root.pyth_lazer_transaction.RemovePublisherPublicKeys.verify(message.removePublisherPublicKeys); + if (error) + return "removePublisherPublicKeys." + error; + } + } + if (message.setPublisherPublicKeys != null && message.hasOwnProperty("setPublisherPublicKeys")) { + if (properties.action === 1) + return "action: multiple values"; + properties.action = 1; + { + var error = $root.pyth_lazer_transaction.SetPublisherPublicKeys.verify(message.setPublisherPublicKeys); + if (error) + return "setPublisherPublicKeys." + error; + } + } + if (message.setPublisherActive != null && message.hasOwnProperty("setPublisherActive")) { + if (properties.action === 1) + return "action: multiple values"; + properties.action = 1; + { + var error = $root.pyth_lazer_transaction.SetPublisherActive.verify(message.setPublisherActive); + if (error) + return "setPublisherActive." + error; + } + } + if (message.removePublisher != null && message.hasOwnProperty("removePublisher")) { + if (properties.action === 1) + return "action: multiple values"; + properties.action = 1; + { + var error = $root.google.protobuf.Empty.verify(message.removePublisher); + if (error) + return "removePublisher." + error; + } + } + return null; + }; + + /** + * Creates an UpdatePublisher message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.UpdatePublisher + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.UpdatePublisher} UpdatePublisher + */ + UpdatePublisher.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.UpdatePublisher) + return object; + var message = new $root.pyth_lazer_transaction.UpdatePublisher(); + if (object.publisherId != null) + message.publisherId = object.publisherId >>> 0; + if (object.setPublisherName != null) { + if (typeof object.setPublisherName !== "object") + throw TypeError(".pyth_lazer_transaction.UpdatePublisher.setPublisherName: object expected"); + message.setPublisherName = $root.pyth_lazer_transaction.SetPublisherName.fromObject(object.setPublisherName); + } + if (object.addPublisherPublicKeys != null) { + if (typeof object.addPublisherPublicKeys !== "object") + throw TypeError(".pyth_lazer_transaction.UpdatePublisher.addPublisherPublicKeys: object expected"); + message.addPublisherPublicKeys = $root.pyth_lazer_transaction.AddPublisherPublicKeys.fromObject(object.addPublisherPublicKeys); + } + if (object.removePublisherPublicKeys != null) { + if (typeof object.removePublisherPublicKeys !== "object") + throw TypeError(".pyth_lazer_transaction.UpdatePublisher.removePublisherPublicKeys: object expected"); + message.removePublisherPublicKeys = $root.pyth_lazer_transaction.RemovePublisherPublicKeys.fromObject(object.removePublisherPublicKeys); + } + if (object.setPublisherPublicKeys != null) { + if (typeof object.setPublisherPublicKeys !== "object") + throw TypeError(".pyth_lazer_transaction.UpdatePublisher.setPublisherPublicKeys: object expected"); + message.setPublisherPublicKeys = $root.pyth_lazer_transaction.SetPublisherPublicKeys.fromObject(object.setPublisherPublicKeys); + } + if (object.setPublisherActive != null) { + if (typeof object.setPublisherActive !== "object") + throw TypeError(".pyth_lazer_transaction.UpdatePublisher.setPublisherActive: object expected"); + message.setPublisherActive = $root.pyth_lazer_transaction.SetPublisherActive.fromObject(object.setPublisherActive); + } + if (object.removePublisher != null) { + if (typeof object.removePublisher !== "object") + throw TypeError(".pyth_lazer_transaction.UpdatePublisher.removePublisher: object expected"); + message.removePublisher = $root.google.protobuf.Empty.fromObject(object.removePublisher); + } + return message; + }; + + /** + * Creates a plain object from an UpdatePublisher message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.UpdatePublisher + * @static + * @param {pyth_lazer_transaction.UpdatePublisher} message UpdatePublisher + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdatePublisher.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.publisherId != null && message.hasOwnProperty("publisherId")) { + object.publisherId = message.publisherId; + if (options.oneofs) + object._publisherId = "publisherId"; + } + if (message.setPublisherName != null && message.hasOwnProperty("setPublisherName")) { + object.setPublisherName = $root.pyth_lazer_transaction.SetPublisherName.toObject(message.setPublisherName, options); + if (options.oneofs) + object.action = "setPublisherName"; + } + if (message.addPublisherPublicKeys != null && message.hasOwnProperty("addPublisherPublicKeys")) { + object.addPublisherPublicKeys = $root.pyth_lazer_transaction.AddPublisherPublicKeys.toObject(message.addPublisherPublicKeys, options); + if (options.oneofs) + object.action = "addPublisherPublicKeys"; + } + if (message.removePublisherPublicKeys != null && message.hasOwnProperty("removePublisherPublicKeys")) { + object.removePublisherPublicKeys = $root.pyth_lazer_transaction.RemovePublisherPublicKeys.toObject(message.removePublisherPublicKeys, options); + if (options.oneofs) + object.action = "removePublisherPublicKeys"; + } + if (message.setPublisherPublicKeys != null && message.hasOwnProperty("setPublisherPublicKeys")) { + object.setPublisherPublicKeys = $root.pyth_lazer_transaction.SetPublisherPublicKeys.toObject(message.setPublisherPublicKeys, options); + if (options.oneofs) + object.action = "setPublisherPublicKeys"; + } + if (message.setPublisherActive != null && message.hasOwnProperty("setPublisherActive")) { + object.setPublisherActive = $root.pyth_lazer_transaction.SetPublisherActive.toObject(message.setPublisherActive, options); + if (options.oneofs) + object.action = "setPublisherActive"; + } + if (message.removePublisher != null && message.hasOwnProperty("removePublisher")) { + object.removePublisher = $root.google.protobuf.Empty.toObject(message.removePublisher, options); + if (options.oneofs) + object.action = "removePublisher"; + } + return object; + }; + + /** + * Converts this UpdatePublisher to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.UpdatePublisher + * @instance + * @returns {Object.} JSON object + */ + UpdatePublisher.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdatePublisher + * @function getTypeUrl + * @memberof pyth_lazer_transaction.UpdatePublisher + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdatePublisher.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.UpdatePublisher"; + }; + + return UpdatePublisher; + })(); + + pyth_lazer_transaction.SetPublisherName = (function() { + + /** + * Properties of a SetPublisherName. + * @memberof pyth_lazer_transaction + * @interface ISetPublisherName + * @property {string|null} [name] SetPublisherName name + */ + + /** + * Constructs a new SetPublisherName. + * @memberof pyth_lazer_transaction + * @classdesc Represents a SetPublisherName. + * @implements ISetPublisherName + * @constructor + * @param {pyth_lazer_transaction.ISetPublisherName=} [properties] Properties to set + */ + function SetPublisherName(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SetPublisherName name. + * @member {string|null|undefined} name + * @memberof pyth_lazer_transaction.SetPublisherName + * @instance + */ + SetPublisherName.prototype.name = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SetPublisherName _name. + * @member {"name"|undefined} _name + * @memberof pyth_lazer_transaction.SetPublisherName + * @instance + */ + Object.defineProperty(SetPublisherName.prototype, "_name", { + get: $util.oneOfGetter($oneOfFields = ["name"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SetPublisherName instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.SetPublisherName + * @static + * @param {pyth_lazer_transaction.ISetPublisherName=} [properties] Properties to set + * @returns {pyth_lazer_transaction.SetPublisherName} SetPublisherName instance + */ + SetPublisherName.create = function create(properties) { + return new SetPublisherName(properties); + }; + + /** + * Encodes the specified SetPublisherName message. Does not implicitly {@link pyth_lazer_transaction.SetPublisherName.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.SetPublisherName + * @static + * @param {pyth_lazer_transaction.ISetPublisherName} message SetPublisherName message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetPublisherName.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); + return writer; + }; + + /** + * Encodes the specified SetPublisherName message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetPublisherName.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.SetPublisherName + * @static + * @param {pyth_lazer_transaction.ISetPublisherName} message SetPublisherName message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetPublisherName.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetPublisherName message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.SetPublisherName + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.SetPublisherName} SetPublisherName + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetPublisherName.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.SetPublisherName(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetPublisherName message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.SetPublisherName + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.SetPublisherName} SetPublisherName + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetPublisherName.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetPublisherName message. + * @function verify + * @memberof pyth_lazer_transaction.SetPublisherName + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetPublisherName.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) { + properties._name = 1; + if (!$util.isString(message.name)) + return "name: string expected"; + } + return null; + }; + + /** + * Creates a SetPublisherName message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.SetPublisherName + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.SetPublisherName} SetPublisherName + */ + SetPublisherName.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.SetPublisherName) + return object; + var message = new $root.pyth_lazer_transaction.SetPublisherName(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a SetPublisherName message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.SetPublisherName + * @static + * @param {pyth_lazer_transaction.SetPublisherName} message SetPublisherName + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetPublisherName.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.name != null && message.hasOwnProperty("name")) { + object.name = message.name; + if (options.oneofs) + object._name = "name"; + } + return object; + }; + + /** + * Converts this SetPublisherName to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.SetPublisherName + * @instance + * @returns {Object.} JSON object + */ + SetPublisherName.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetPublisherName + * @function getTypeUrl + * @memberof pyth_lazer_transaction.SetPublisherName + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetPublisherName.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.SetPublisherName"; + }; + + return SetPublisherName; + })(); + + pyth_lazer_transaction.AddPublisherPublicKeys = (function() { + + /** + * Properties of an AddPublisherPublicKeys. + * @memberof pyth_lazer_transaction + * @interface IAddPublisherPublicKeys + * @property {Array.|null} [publicKeys] AddPublisherPublicKeys publicKeys + */ + + /** + * Constructs a new AddPublisherPublicKeys. + * @memberof pyth_lazer_transaction + * @classdesc Represents an AddPublisherPublicKeys. + * @implements IAddPublisherPublicKeys + * @constructor + * @param {pyth_lazer_transaction.IAddPublisherPublicKeys=} [properties] Properties to set + */ + function AddPublisherPublicKeys(properties) { + this.publicKeys = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AddPublisherPublicKeys publicKeys. + * @member {Array.} publicKeys + * @memberof pyth_lazer_transaction.AddPublisherPublicKeys + * @instance + */ + AddPublisherPublicKeys.prototype.publicKeys = $util.emptyArray; + + /** + * Creates a new AddPublisherPublicKeys instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.AddPublisherPublicKeys + * @static + * @param {pyth_lazer_transaction.IAddPublisherPublicKeys=} [properties] Properties to set + * @returns {pyth_lazer_transaction.AddPublisherPublicKeys} AddPublisherPublicKeys instance + */ + AddPublisherPublicKeys.create = function create(properties) { + return new AddPublisherPublicKeys(properties); + }; + + /** + * Encodes the specified AddPublisherPublicKeys message. Does not implicitly {@link pyth_lazer_transaction.AddPublisherPublicKeys.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.AddPublisherPublicKeys + * @static + * @param {pyth_lazer_transaction.IAddPublisherPublicKeys} message AddPublisherPublicKeys message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddPublisherPublicKeys.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.publicKeys != null && message.publicKeys.length) + for (var i = 0; i < message.publicKeys.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.publicKeys[i]); + return writer; + }; + + /** + * Encodes the specified AddPublisherPublicKeys message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddPublisherPublicKeys.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.AddPublisherPublicKeys + * @static + * @param {pyth_lazer_transaction.IAddPublisherPublicKeys} message AddPublisherPublicKeys message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddPublisherPublicKeys.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AddPublisherPublicKeys message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.AddPublisherPublicKeys + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.AddPublisherPublicKeys} AddPublisherPublicKeys + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddPublisherPublicKeys.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.AddPublisherPublicKeys(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.publicKeys && message.publicKeys.length)) + message.publicKeys = []; + message.publicKeys.push(reader.bytes()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AddPublisherPublicKeys message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.AddPublisherPublicKeys + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.AddPublisherPublicKeys} AddPublisherPublicKeys + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddPublisherPublicKeys.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AddPublisherPublicKeys message. + * @function verify + * @memberof pyth_lazer_transaction.AddPublisherPublicKeys + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AddPublisherPublicKeys.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.publicKeys != null && message.hasOwnProperty("publicKeys")) { + if (!Array.isArray(message.publicKeys)) + return "publicKeys: array expected"; + for (var i = 0; i < message.publicKeys.length; ++i) + if (!(message.publicKeys[i] && typeof message.publicKeys[i].length === "number" || $util.isString(message.publicKeys[i]))) + return "publicKeys: buffer[] expected"; + } + return null; + }; + + /** + * Creates an AddPublisherPublicKeys message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.AddPublisherPublicKeys + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.AddPublisherPublicKeys} AddPublisherPublicKeys + */ + AddPublisherPublicKeys.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.AddPublisherPublicKeys) + return object; + var message = new $root.pyth_lazer_transaction.AddPublisherPublicKeys(); + if (object.publicKeys) { + if (!Array.isArray(object.publicKeys)) + throw TypeError(".pyth_lazer_transaction.AddPublisherPublicKeys.publicKeys: array expected"); + message.publicKeys = []; + for (var i = 0; i < object.publicKeys.length; ++i) + if (typeof object.publicKeys[i] === "string") + $util.base64.decode(object.publicKeys[i], message.publicKeys[i] = $util.newBuffer($util.base64.length(object.publicKeys[i])), 0); + else if (object.publicKeys[i].length >= 0) + message.publicKeys[i] = object.publicKeys[i]; + } + return message; + }; + + /** + * Creates a plain object from an AddPublisherPublicKeys message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.AddPublisherPublicKeys + * @static + * @param {pyth_lazer_transaction.AddPublisherPublicKeys} message AddPublisherPublicKeys + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AddPublisherPublicKeys.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.publicKeys = []; + if (message.publicKeys && message.publicKeys.length) { + object.publicKeys = []; + for (var j = 0; j < message.publicKeys.length; ++j) + object.publicKeys[j] = options.bytes === String ? $util.base64.encode(message.publicKeys[j], 0, message.publicKeys[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.publicKeys[j]) : message.publicKeys[j]; + } + return object; + }; + + /** + * Converts this AddPublisherPublicKeys to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.AddPublisherPublicKeys + * @instance + * @returns {Object.} JSON object + */ + AddPublisherPublicKeys.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AddPublisherPublicKeys + * @function getTypeUrl + * @memberof pyth_lazer_transaction.AddPublisherPublicKeys + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AddPublisherPublicKeys.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.AddPublisherPublicKeys"; + }; + + return AddPublisherPublicKeys; + })(); + + pyth_lazer_transaction.RemovePublisherPublicKeys = (function() { + + /** + * Properties of a RemovePublisherPublicKeys. + * @memberof pyth_lazer_transaction + * @interface IRemovePublisherPublicKeys + * @property {Array.|null} [publicKeys] RemovePublisherPublicKeys publicKeys + */ + + /** + * Constructs a new RemovePublisherPublicKeys. + * @memberof pyth_lazer_transaction + * @classdesc Represents a RemovePublisherPublicKeys. + * @implements IRemovePublisherPublicKeys + * @constructor + * @param {pyth_lazer_transaction.IRemovePublisherPublicKeys=} [properties] Properties to set + */ + function RemovePublisherPublicKeys(properties) { + this.publicKeys = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RemovePublisherPublicKeys publicKeys. + * @member {Array.} publicKeys + * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys + * @instance + */ + RemovePublisherPublicKeys.prototype.publicKeys = $util.emptyArray; + + /** + * Creates a new RemovePublisherPublicKeys instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys + * @static + * @param {pyth_lazer_transaction.IRemovePublisherPublicKeys=} [properties] Properties to set + * @returns {pyth_lazer_transaction.RemovePublisherPublicKeys} RemovePublisherPublicKeys instance + */ + RemovePublisherPublicKeys.create = function create(properties) { + return new RemovePublisherPublicKeys(properties); + }; + + /** + * Encodes the specified RemovePublisherPublicKeys message. Does not implicitly {@link pyth_lazer_transaction.RemovePublisherPublicKeys.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys + * @static + * @param {pyth_lazer_transaction.IRemovePublisherPublicKeys} message RemovePublisherPublicKeys message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemovePublisherPublicKeys.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.publicKeys != null && message.publicKeys.length) + for (var i = 0; i < message.publicKeys.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.publicKeys[i]); + return writer; + }; + + /** + * Encodes the specified RemovePublisherPublicKeys message, length delimited. Does not implicitly {@link pyth_lazer_transaction.RemovePublisherPublicKeys.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys + * @static + * @param {pyth_lazer_transaction.IRemovePublisherPublicKeys} message RemovePublisherPublicKeys message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemovePublisherPublicKeys.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RemovePublisherPublicKeys message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.RemovePublisherPublicKeys} RemovePublisherPublicKeys + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemovePublisherPublicKeys.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.RemovePublisherPublicKeys(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.publicKeys && message.publicKeys.length)) + message.publicKeys = []; + message.publicKeys.push(reader.bytes()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RemovePublisherPublicKeys message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.RemovePublisherPublicKeys} RemovePublisherPublicKeys + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemovePublisherPublicKeys.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RemovePublisherPublicKeys message. + * @function verify + * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RemovePublisherPublicKeys.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.publicKeys != null && message.hasOwnProperty("publicKeys")) { + if (!Array.isArray(message.publicKeys)) + return "publicKeys: array expected"; + for (var i = 0; i < message.publicKeys.length; ++i) + if (!(message.publicKeys[i] && typeof message.publicKeys[i].length === "number" || $util.isString(message.publicKeys[i]))) + return "publicKeys: buffer[] expected"; + } + return null; + }; + + /** + * Creates a RemovePublisherPublicKeys message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.RemovePublisherPublicKeys} RemovePublisherPublicKeys + */ + RemovePublisherPublicKeys.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.RemovePublisherPublicKeys) + return object; + var message = new $root.pyth_lazer_transaction.RemovePublisherPublicKeys(); + if (object.publicKeys) { + if (!Array.isArray(object.publicKeys)) + throw TypeError(".pyth_lazer_transaction.RemovePublisherPublicKeys.publicKeys: array expected"); + message.publicKeys = []; + for (var i = 0; i < object.publicKeys.length; ++i) + if (typeof object.publicKeys[i] === "string") + $util.base64.decode(object.publicKeys[i], message.publicKeys[i] = $util.newBuffer($util.base64.length(object.publicKeys[i])), 0); + else if (object.publicKeys[i].length >= 0) + message.publicKeys[i] = object.publicKeys[i]; + } + return message; + }; + + /** + * Creates a plain object from a RemovePublisherPublicKeys message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys + * @static + * @param {pyth_lazer_transaction.RemovePublisherPublicKeys} message RemovePublisherPublicKeys + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RemovePublisherPublicKeys.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.publicKeys = []; + if (message.publicKeys && message.publicKeys.length) { + object.publicKeys = []; + for (var j = 0; j < message.publicKeys.length; ++j) + object.publicKeys[j] = options.bytes === String ? $util.base64.encode(message.publicKeys[j], 0, message.publicKeys[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.publicKeys[j]) : message.publicKeys[j]; + } + return object; + }; + + /** + * Converts this RemovePublisherPublicKeys to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys + * @instance + * @returns {Object.} JSON object + */ + RemovePublisherPublicKeys.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RemovePublisherPublicKeys + * @function getTypeUrl + * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RemovePublisherPublicKeys.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.RemovePublisherPublicKeys"; + }; + + return RemovePublisherPublicKeys; + })(); + + pyth_lazer_transaction.SetPublisherPublicKeys = (function() { + + /** + * Properties of a SetPublisherPublicKeys. + * @memberof pyth_lazer_transaction + * @interface ISetPublisherPublicKeys + * @property {Array.|null} [publicKeys] SetPublisherPublicKeys publicKeys + */ + + /** + * Constructs a new SetPublisherPublicKeys. + * @memberof pyth_lazer_transaction + * @classdesc Represents a SetPublisherPublicKeys. + * @implements ISetPublisherPublicKeys + * @constructor + * @param {pyth_lazer_transaction.ISetPublisherPublicKeys=} [properties] Properties to set + */ + function SetPublisherPublicKeys(properties) { + this.publicKeys = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SetPublisherPublicKeys publicKeys. + * @member {Array.} publicKeys + * @memberof pyth_lazer_transaction.SetPublisherPublicKeys + * @instance + */ + SetPublisherPublicKeys.prototype.publicKeys = $util.emptyArray; + + /** + * Creates a new SetPublisherPublicKeys instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.SetPublisherPublicKeys + * @static + * @param {pyth_lazer_transaction.ISetPublisherPublicKeys=} [properties] Properties to set + * @returns {pyth_lazer_transaction.SetPublisherPublicKeys} SetPublisherPublicKeys instance + */ + SetPublisherPublicKeys.create = function create(properties) { + return new SetPublisherPublicKeys(properties); + }; + + /** + * Encodes the specified SetPublisherPublicKeys message. Does not implicitly {@link pyth_lazer_transaction.SetPublisherPublicKeys.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.SetPublisherPublicKeys + * @static + * @param {pyth_lazer_transaction.ISetPublisherPublicKeys} message SetPublisherPublicKeys message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetPublisherPublicKeys.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.publicKeys != null && message.publicKeys.length) + for (var i = 0; i < message.publicKeys.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.publicKeys[i]); + return writer; + }; + + /** + * Encodes the specified SetPublisherPublicKeys message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetPublisherPublicKeys.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.SetPublisherPublicKeys + * @static + * @param {pyth_lazer_transaction.ISetPublisherPublicKeys} message SetPublisherPublicKeys message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetPublisherPublicKeys.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetPublisherPublicKeys message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.SetPublisherPublicKeys + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.SetPublisherPublicKeys} SetPublisherPublicKeys + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetPublisherPublicKeys.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.SetPublisherPublicKeys(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.publicKeys && message.publicKeys.length)) + message.publicKeys = []; + message.publicKeys.push(reader.bytes()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetPublisherPublicKeys message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.SetPublisherPublicKeys + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.SetPublisherPublicKeys} SetPublisherPublicKeys + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetPublisherPublicKeys.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetPublisherPublicKeys message. + * @function verify + * @memberof pyth_lazer_transaction.SetPublisherPublicKeys + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetPublisherPublicKeys.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.publicKeys != null && message.hasOwnProperty("publicKeys")) { + if (!Array.isArray(message.publicKeys)) + return "publicKeys: array expected"; + for (var i = 0; i < message.publicKeys.length; ++i) + if (!(message.publicKeys[i] && typeof message.publicKeys[i].length === "number" || $util.isString(message.publicKeys[i]))) + return "publicKeys: buffer[] expected"; + } + return null; + }; + + /** + * Creates a SetPublisherPublicKeys message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.SetPublisherPublicKeys + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.SetPublisherPublicKeys} SetPublisherPublicKeys + */ + SetPublisherPublicKeys.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.SetPublisherPublicKeys) + return object; + var message = new $root.pyth_lazer_transaction.SetPublisherPublicKeys(); + if (object.publicKeys) { + if (!Array.isArray(object.publicKeys)) + throw TypeError(".pyth_lazer_transaction.SetPublisherPublicKeys.publicKeys: array expected"); + message.publicKeys = []; + for (var i = 0; i < object.publicKeys.length; ++i) + if (typeof object.publicKeys[i] === "string") + $util.base64.decode(object.publicKeys[i], message.publicKeys[i] = $util.newBuffer($util.base64.length(object.publicKeys[i])), 0); + else if (object.publicKeys[i].length >= 0) + message.publicKeys[i] = object.publicKeys[i]; + } + return message; + }; + + /** + * Creates a plain object from a SetPublisherPublicKeys message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.SetPublisherPublicKeys + * @static + * @param {pyth_lazer_transaction.SetPublisherPublicKeys} message SetPublisherPublicKeys + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetPublisherPublicKeys.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.publicKeys = []; + if (message.publicKeys && message.publicKeys.length) { + object.publicKeys = []; + for (var j = 0; j < message.publicKeys.length; ++j) + object.publicKeys[j] = options.bytes === String ? $util.base64.encode(message.publicKeys[j], 0, message.publicKeys[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.publicKeys[j]) : message.publicKeys[j]; + } + return object; + }; + + /** + * Converts this SetPublisherPublicKeys to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.SetPublisherPublicKeys + * @instance + * @returns {Object.} JSON object + */ + SetPublisherPublicKeys.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetPublisherPublicKeys + * @function getTypeUrl + * @memberof pyth_lazer_transaction.SetPublisherPublicKeys + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetPublisherPublicKeys.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.SetPublisherPublicKeys"; + }; + + return SetPublisherPublicKeys; + })(); + + pyth_lazer_transaction.SetPublisherActive = (function() { + + /** + * Properties of a SetPublisherActive. + * @memberof pyth_lazer_transaction + * @interface ISetPublisherActive + * @property {boolean|null} [isActive] SetPublisherActive isActive + */ + + /** + * Constructs a new SetPublisherActive. + * @memberof pyth_lazer_transaction + * @classdesc Represents a SetPublisherActive. + * @implements ISetPublisherActive + * @constructor + * @param {pyth_lazer_transaction.ISetPublisherActive=} [properties] Properties to set + */ + function SetPublisherActive(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SetPublisherActive isActive. + * @member {boolean|null|undefined} isActive + * @memberof pyth_lazer_transaction.SetPublisherActive + * @instance + */ + SetPublisherActive.prototype.isActive = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SetPublisherActive _isActive. + * @member {"isActive"|undefined} _isActive + * @memberof pyth_lazer_transaction.SetPublisherActive + * @instance + */ + Object.defineProperty(SetPublisherActive.prototype, "_isActive", { + get: $util.oneOfGetter($oneOfFields = ["isActive"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SetPublisherActive instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.SetPublisherActive + * @static + * @param {pyth_lazer_transaction.ISetPublisherActive=} [properties] Properties to set + * @returns {pyth_lazer_transaction.SetPublisherActive} SetPublisherActive instance + */ + SetPublisherActive.create = function create(properties) { + return new SetPublisherActive(properties); + }; + + /** + * Encodes the specified SetPublisherActive message. Does not implicitly {@link pyth_lazer_transaction.SetPublisherActive.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.SetPublisherActive + * @static + * @param {pyth_lazer_transaction.ISetPublisherActive} message SetPublisherActive message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetPublisherActive.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.isActive != null && Object.hasOwnProperty.call(message, "isActive")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.isActive); + return writer; + }; + + /** + * Encodes the specified SetPublisherActive message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetPublisherActive.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.SetPublisherActive + * @static + * @param {pyth_lazer_transaction.ISetPublisherActive} message SetPublisherActive message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetPublisherActive.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetPublisherActive message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.SetPublisherActive + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.SetPublisherActive} SetPublisherActive + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetPublisherActive.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.SetPublisherActive(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.isActive = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetPublisherActive message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.SetPublisherActive + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.SetPublisherActive} SetPublisherActive + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetPublisherActive.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetPublisherActive message. + * @function verify + * @memberof pyth_lazer_transaction.SetPublisherActive + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetPublisherActive.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.isActive != null && message.hasOwnProperty("isActive")) { + properties._isActive = 1; + if (typeof message.isActive !== "boolean") + return "isActive: boolean expected"; + } + return null; + }; + + /** + * Creates a SetPublisherActive message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.SetPublisherActive + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.SetPublisherActive} SetPublisherActive + */ + SetPublisherActive.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.SetPublisherActive) + return object; + var message = new $root.pyth_lazer_transaction.SetPublisherActive(); + if (object.isActive != null) + message.isActive = Boolean(object.isActive); + return message; + }; + + /** + * Creates a plain object from a SetPublisherActive message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.SetPublisherActive + * @static + * @param {pyth_lazer_transaction.SetPublisherActive} message SetPublisherActive + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetPublisherActive.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.isActive != null && message.hasOwnProperty("isActive")) { + object.isActive = message.isActive; + if (options.oneofs) + object._isActive = "isActive"; + } + return object; + }; + + /** + * Converts this SetPublisherActive to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.SetPublisherActive + * @instance + * @returns {Object.} JSON object + */ + SetPublisherActive.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetPublisherActive + * @function getTypeUrl + * @memberof pyth_lazer_transaction.SetPublisherActive + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetPublisherActive.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.SetPublisherActive"; + }; + + return SetPublisherActive; + })(); + + pyth_lazer_transaction.AddFeed = (function() { + + /** + * Properties of an AddFeed. + * @memberof pyth_lazer_transaction + * @interface IAddFeed + * @property {number|null} [feedId] AddFeed feedId + * @property {pyth_lazer_transaction.DynamicValue.IMap|null} [metadata] AddFeed metadata + * @property {Array.|null} [permissionedPublishers] AddFeed permissionedPublishers + */ + + /** + * Constructs a new AddFeed. + * @memberof pyth_lazer_transaction + * @classdesc Represents an AddFeed. + * @implements IAddFeed + * @constructor + * @param {pyth_lazer_transaction.IAddFeed=} [properties] Properties to set + */ + function AddFeed(properties) { + this.permissionedPublishers = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AddFeed feedId. + * @member {number|null|undefined} feedId + * @memberof pyth_lazer_transaction.AddFeed + * @instance + */ + AddFeed.prototype.feedId = null; + + /** + * AddFeed metadata. + * @member {pyth_lazer_transaction.DynamicValue.IMap|null|undefined} metadata + * @memberof pyth_lazer_transaction.AddFeed + * @instance + */ + AddFeed.prototype.metadata = null; + + /** + * AddFeed permissionedPublishers. + * @member {Array.} permissionedPublishers + * @memberof pyth_lazer_transaction.AddFeed + * @instance + */ + AddFeed.prototype.permissionedPublishers = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AddFeed _feedId. + * @member {"feedId"|undefined} _feedId + * @memberof pyth_lazer_transaction.AddFeed + * @instance + */ + Object.defineProperty(AddFeed.prototype, "_feedId", { + get: $util.oneOfGetter($oneOfFields = ["feedId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AddFeed _metadata. + * @member {"metadata"|undefined} _metadata + * @memberof pyth_lazer_transaction.AddFeed + * @instance + */ + Object.defineProperty(AddFeed.prototype, "_metadata", { + get: $util.oneOfGetter($oneOfFields = ["metadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AddFeed instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.AddFeed + * @static + * @param {pyth_lazer_transaction.IAddFeed=} [properties] Properties to set + * @returns {pyth_lazer_transaction.AddFeed} AddFeed instance + */ + AddFeed.create = function create(properties) { + return new AddFeed(properties); + }; + + /** + * Encodes the specified AddFeed message. Does not implicitly {@link pyth_lazer_transaction.AddFeed.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.AddFeed + * @static + * @param {pyth_lazer_transaction.IAddFeed} message AddFeed message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddFeed.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.feedId != null && Object.hasOwnProperty.call(message, "feedId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.feedId); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.pyth_lazer_transaction.DynamicValue.Map.encode(message.metadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.permissionedPublishers != null && message.permissionedPublishers.length) { + writer.uint32(/* id 3, wireType 2 =*/26).fork(); + for (var i = 0; i < message.permissionedPublishers.length; ++i) + writer.uint32(message.permissionedPublishers[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified AddFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddFeed.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.AddFeed + * @static + * @param {pyth_lazer_transaction.IAddFeed} message AddFeed message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddFeed.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AddFeed message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.AddFeed + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.AddFeed} AddFeed + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddFeed.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.AddFeed(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.feedId = reader.uint32(); + break; + } + case 2: { + message.metadata = $root.pyth_lazer_transaction.DynamicValue.Map.decode(reader, reader.uint32()); + break; + } + case 3: { + if (!(message.permissionedPublishers && message.permissionedPublishers.length)) + message.permissionedPublishers = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.permissionedPublishers.push(reader.uint32()); + } else + message.permissionedPublishers.push(reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AddFeed message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.AddFeed + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.AddFeed} AddFeed + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddFeed.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AddFeed message. + * @function verify + * @memberof pyth_lazer_transaction.AddFeed + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AddFeed.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.feedId != null && message.hasOwnProperty("feedId")) { + properties._feedId = 1; + if (!$util.isInteger(message.feedId)) + return "feedId: integer expected"; + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + properties._metadata = 1; + { + var error = $root.pyth_lazer_transaction.DynamicValue.Map.verify(message.metadata); + if (error) + return "metadata." + error; + } + } + if (message.permissionedPublishers != null && message.hasOwnProperty("permissionedPublishers")) { + if (!Array.isArray(message.permissionedPublishers)) + return "permissionedPublishers: array expected"; + for (var i = 0; i < message.permissionedPublishers.length; ++i) + if (!$util.isInteger(message.permissionedPublishers[i])) + return "permissionedPublishers: integer[] expected"; + } + return null; + }; + + /** + * Creates an AddFeed message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.AddFeed + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.AddFeed} AddFeed + */ + AddFeed.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.AddFeed) + return object; + var message = new $root.pyth_lazer_transaction.AddFeed(); + if (object.feedId != null) + message.feedId = object.feedId >>> 0; + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".pyth_lazer_transaction.AddFeed.metadata: object expected"); + message.metadata = $root.pyth_lazer_transaction.DynamicValue.Map.fromObject(object.metadata); + } + if (object.permissionedPublishers) { + if (!Array.isArray(object.permissionedPublishers)) + throw TypeError(".pyth_lazer_transaction.AddFeed.permissionedPublishers: array expected"); + message.permissionedPublishers = []; + for (var i = 0; i < object.permissionedPublishers.length; ++i) + message.permissionedPublishers[i] = object.permissionedPublishers[i] >>> 0; + } + return message; + }; + + /** + * Creates a plain object from an AddFeed message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.AddFeed + * @static + * @param {pyth_lazer_transaction.AddFeed} message AddFeed + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AddFeed.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.permissionedPublishers = []; + if (message.feedId != null && message.hasOwnProperty("feedId")) { + object.feedId = message.feedId; + if (options.oneofs) + object._feedId = "feedId"; + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + object.metadata = $root.pyth_lazer_transaction.DynamicValue.Map.toObject(message.metadata, options); + if (options.oneofs) + object._metadata = "metadata"; + } + if (message.permissionedPublishers && message.permissionedPublishers.length) { + object.permissionedPublishers = []; + for (var j = 0; j < message.permissionedPublishers.length; ++j) + object.permissionedPublishers[j] = message.permissionedPublishers[j]; + } + return object; + }; + + /** + * Converts this AddFeed to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.AddFeed + * @instance + * @returns {Object.} JSON object + */ + AddFeed.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AddFeed + * @function getTypeUrl + * @memberof pyth_lazer_transaction.AddFeed + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AddFeed.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.AddFeed"; + }; + + return AddFeed; + })(); + + pyth_lazer_transaction.UpdateFeed = (function() { + + /** + * Properties of an UpdateFeed. + * @memberof pyth_lazer_transaction + * @interface IUpdateFeed + * @property {number|null} [feedId] UpdateFeed feedId + * @property {pyth_lazer_transaction.IUpdateFeedMetadata|null} [updateFeedMetadata] UpdateFeed updateFeedMetadata + * @property {pyth_lazer_transaction.IActivateFeed|null} [activateFeed] UpdateFeed activateFeed + * @property {pyth_lazer_transaction.IDeactivateFeed|null} [deactivateFeed] UpdateFeed deactivateFeed + * @property {google.protobuf.IEmpty|null} [removeFeed] UpdateFeed removeFeed + */ + + /** + * Constructs a new UpdateFeed. + * @memberof pyth_lazer_transaction + * @classdesc Represents an UpdateFeed. + * @implements IUpdateFeed + * @constructor + * @param {pyth_lazer_transaction.IUpdateFeed=} [properties] Properties to set + */ + function UpdateFeed(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateFeed feedId. + * @member {number|null|undefined} feedId + * @memberof pyth_lazer_transaction.UpdateFeed + * @instance + */ + UpdateFeed.prototype.feedId = null; + + /** + * UpdateFeed updateFeedMetadata. + * @member {pyth_lazer_transaction.IUpdateFeedMetadata|null|undefined} updateFeedMetadata + * @memberof pyth_lazer_transaction.UpdateFeed + * @instance + */ + UpdateFeed.prototype.updateFeedMetadata = null; + + /** + * UpdateFeed activateFeed. + * @member {pyth_lazer_transaction.IActivateFeed|null|undefined} activateFeed + * @memberof pyth_lazer_transaction.UpdateFeed + * @instance + */ + UpdateFeed.prototype.activateFeed = null; + + /** + * UpdateFeed deactivateFeed. + * @member {pyth_lazer_transaction.IDeactivateFeed|null|undefined} deactivateFeed + * @memberof pyth_lazer_transaction.UpdateFeed + * @instance + */ + UpdateFeed.prototype.deactivateFeed = null; + + /** + * UpdateFeed removeFeed. + * @member {google.protobuf.IEmpty|null|undefined} removeFeed + * @memberof pyth_lazer_transaction.UpdateFeed + * @instance + */ + UpdateFeed.prototype.removeFeed = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * UpdateFeed _feedId. + * @member {"feedId"|undefined} _feedId + * @memberof pyth_lazer_transaction.UpdateFeed + * @instance + */ + Object.defineProperty(UpdateFeed.prototype, "_feedId", { + get: $util.oneOfGetter($oneOfFields = ["feedId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * UpdateFeed action. + * @member {"updateFeedMetadata"|"activateFeed"|"deactivateFeed"|"removeFeed"|undefined} action + * @memberof pyth_lazer_transaction.UpdateFeed + * @instance + */ + Object.defineProperty(UpdateFeed.prototype, "action", { + get: $util.oneOfGetter($oneOfFields = ["updateFeedMetadata", "activateFeed", "deactivateFeed", "removeFeed"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new UpdateFeed instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.UpdateFeed + * @static + * @param {pyth_lazer_transaction.IUpdateFeed=} [properties] Properties to set + * @returns {pyth_lazer_transaction.UpdateFeed} UpdateFeed instance + */ + UpdateFeed.create = function create(properties) { + return new UpdateFeed(properties); + }; + + /** + * Encodes the specified UpdateFeed message. Does not implicitly {@link pyth_lazer_transaction.UpdateFeed.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.UpdateFeed + * @static + * @param {pyth_lazer_transaction.IUpdateFeed} message UpdateFeed message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateFeed.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.feedId != null && Object.hasOwnProperty.call(message, "feedId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.feedId); + if (message.updateFeedMetadata != null && Object.hasOwnProperty.call(message, "updateFeedMetadata")) + $root.pyth_lazer_transaction.UpdateFeedMetadata.encode(message.updateFeedMetadata, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); + if (message.activateFeed != null && Object.hasOwnProperty.call(message, "activateFeed")) + $root.pyth_lazer_transaction.ActivateFeed.encode(message.activateFeed, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); + if (message.deactivateFeed != null && Object.hasOwnProperty.call(message, "deactivateFeed")) + $root.pyth_lazer_transaction.DeactivateFeed.encode(message.deactivateFeed, writer.uint32(/* id 103, wireType 2 =*/826).fork()).ldelim(); + if (message.removeFeed != null && Object.hasOwnProperty.call(message, "removeFeed")) + $root.google.protobuf.Empty.encode(message.removeFeed, writer.uint32(/* id 199, wireType 2 =*/1594).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdateFeed.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.UpdateFeed + * @static + * @param {pyth_lazer_transaction.IUpdateFeed} message UpdateFeed message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateFeed.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateFeed message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.UpdateFeed + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.UpdateFeed} UpdateFeed + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateFeed.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.UpdateFeed(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.feedId = reader.uint32(); + break; + } + case 101: { + message.updateFeedMetadata = $root.pyth_lazer_transaction.UpdateFeedMetadata.decode(reader, reader.uint32()); + break; + } + case 102: { + message.activateFeed = $root.pyth_lazer_transaction.ActivateFeed.decode(reader, reader.uint32()); + break; + } + case 103: { + message.deactivateFeed = $root.pyth_lazer_transaction.DeactivateFeed.decode(reader, reader.uint32()); + break; + } + case 199: { + message.removeFeed = $root.google.protobuf.Empty.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateFeed message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.UpdateFeed + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.UpdateFeed} UpdateFeed + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateFeed.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateFeed message. + * @function verify + * @memberof pyth_lazer_transaction.UpdateFeed + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateFeed.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.feedId != null && message.hasOwnProperty("feedId")) { + properties._feedId = 1; + if (!$util.isInteger(message.feedId)) + return "feedId: integer expected"; + } + if (message.updateFeedMetadata != null && message.hasOwnProperty("updateFeedMetadata")) { + properties.action = 1; + { + var error = $root.pyth_lazer_transaction.UpdateFeedMetadata.verify(message.updateFeedMetadata); + if (error) + return "updateFeedMetadata." + error; + } + } + if (message.activateFeed != null && message.hasOwnProperty("activateFeed")) { + if (properties.action === 1) + return "action: multiple values"; + properties.action = 1; + { + var error = $root.pyth_lazer_transaction.ActivateFeed.verify(message.activateFeed); + if (error) + return "activateFeed." + error; + } + } + if (message.deactivateFeed != null && message.hasOwnProperty("deactivateFeed")) { + if (properties.action === 1) + return "action: multiple values"; + properties.action = 1; + { + var error = $root.pyth_lazer_transaction.DeactivateFeed.verify(message.deactivateFeed); + if (error) + return "deactivateFeed." + error; + } + } + if (message.removeFeed != null && message.hasOwnProperty("removeFeed")) { + if (properties.action === 1) + return "action: multiple values"; + properties.action = 1; + { + var error = $root.google.protobuf.Empty.verify(message.removeFeed); + if (error) + return "removeFeed." + error; + } + } + return null; + }; + + /** + * Creates an UpdateFeed message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.UpdateFeed + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.UpdateFeed} UpdateFeed + */ + UpdateFeed.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.UpdateFeed) + return object; + var message = new $root.pyth_lazer_transaction.UpdateFeed(); + if (object.feedId != null) + message.feedId = object.feedId >>> 0; + if (object.updateFeedMetadata != null) { + if (typeof object.updateFeedMetadata !== "object") + throw TypeError(".pyth_lazer_transaction.UpdateFeed.updateFeedMetadata: object expected"); + message.updateFeedMetadata = $root.pyth_lazer_transaction.UpdateFeedMetadata.fromObject(object.updateFeedMetadata); + } + if (object.activateFeed != null) { + if (typeof object.activateFeed !== "object") + throw TypeError(".pyth_lazer_transaction.UpdateFeed.activateFeed: object expected"); + message.activateFeed = $root.pyth_lazer_transaction.ActivateFeed.fromObject(object.activateFeed); + } + if (object.deactivateFeed != null) { + if (typeof object.deactivateFeed !== "object") + throw TypeError(".pyth_lazer_transaction.UpdateFeed.deactivateFeed: object expected"); + message.deactivateFeed = $root.pyth_lazer_transaction.DeactivateFeed.fromObject(object.deactivateFeed); + } + if (object.removeFeed != null) { + if (typeof object.removeFeed !== "object") + throw TypeError(".pyth_lazer_transaction.UpdateFeed.removeFeed: object expected"); + message.removeFeed = $root.google.protobuf.Empty.fromObject(object.removeFeed); + } + return message; + }; + + /** + * Creates a plain object from an UpdateFeed message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.UpdateFeed + * @static + * @param {pyth_lazer_transaction.UpdateFeed} message UpdateFeed + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateFeed.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.feedId != null && message.hasOwnProperty("feedId")) { + object.feedId = message.feedId; + if (options.oneofs) + object._feedId = "feedId"; + } + if (message.updateFeedMetadata != null && message.hasOwnProperty("updateFeedMetadata")) { + object.updateFeedMetadata = $root.pyth_lazer_transaction.UpdateFeedMetadata.toObject(message.updateFeedMetadata, options); + if (options.oneofs) + object.action = "updateFeedMetadata"; + } + if (message.activateFeed != null && message.hasOwnProperty("activateFeed")) { + object.activateFeed = $root.pyth_lazer_transaction.ActivateFeed.toObject(message.activateFeed, options); + if (options.oneofs) + object.action = "activateFeed"; + } + if (message.deactivateFeed != null && message.hasOwnProperty("deactivateFeed")) { + object.deactivateFeed = $root.pyth_lazer_transaction.DeactivateFeed.toObject(message.deactivateFeed, options); + if (options.oneofs) + object.action = "deactivateFeed"; + } + if (message.removeFeed != null && message.hasOwnProperty("removeFeed")) { + object.removeFeed = $root.google.protobuf.Empty.toObject(message.removeFeed, options); + if (options.oneofs) + object.action = "removeFeed"; + } + return object; + }; + + /** + * Converts this UpdateFeed to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.UpdateFeed + * @instance + * @returns {Object.} JSON object + */ + UpdateFeed.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateFeed + * @function getTypeUrl + * @memberof pyth_lazer_transaction.UpdateFeed + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateFeed.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.UpdateFeed"; + }; + + return UpdateFeed; + })(); + + pyth_lazer_transaction.UpdateFeedMetadata = (function() { + + /** + * Properties of an UpdateFeedMetadata. + * @memberof pyth_lazer_transaction + * @interface IUpdateFeedMetadata + * @property {string|null} [name] UpdateFeedMetadata name + * @property {pyth_lazer_transaction.IDynamicValue|null} [value] UpdateFeedMetadata value + */ + + /** + * Constructs a new UpdateFeedMetadata. + * @memberof pyth_lazer_transaction + * @classdesc Represents an UpdateFeedMetadata. + * @implements IUpdateFeedMetadata + * @constructor + * @param {pyth_lazer_transaction.IUpdateFeedMetadata=} [properties] Properties to set + */ + function UpdateFeedMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateFeedMetadata name. + * @member {string|null|undefined} name + * @memberof pyth_lazer_transaction.UpdateFeedMetadata + * @instance + */ + UpdateFeedMetadata.prototype.name = null; + + /** + * UpdateFeedMetadata value. + * @member {pyth_lazer_transaction.IDynamicValue|null|undefined} value + * @memberof pyth_lazer_transaction.UpdateFeedMetadata + * @instance + */ + UpdateFeedMetadata.prototype.value = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * UpdateFeedMetadata _name. + * @member {"name"|undefined} _name + * @memberof pyth_lazer_transaction.UpdateFeedMetadata + * @instance + */ + Object.defineProperty(UpdateFeedMetadata.prototype, "_name", { + get: $util.oneOfGetter($oneOfFields = ["name"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * UpdateFeedMetadata _value. + * @member {"value"|undefined} _value + * @memberof pyth_lazer_transaction.UpdateFeedMetadata + * @instance + */ + Object.defineProperty(UpdateFeedMetadata.prototype, "_value", { + get: $util.oneOfGetter($oneOfFields = ["value"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new UpdateFeedMetadata instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.UpdateFeedMetadata + * @static + * @param {pyth_lazer_transaction.IUpdateFeedMetadata=} [properties] Properties to set + * @returns {pyth_lazer_transaction.UpdateFeedMetadata} UpdateFeedMetadata instance + */ + UpdateFeedMetadata.create = function create(properties) { + return new UpdateFeedMetadata(properties); + }; + + /** + * Encodes the specified UpdateFeedMetadata message. Does not implicitly {@link pyth_lazer_transaction.UpdateFeedMetadata.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.UpdateFeedMetadata + * @static + * @param {pyth_lazer_transaction.IUpdateFeedMetadata} message UpdateFeedMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateFeedMetadata.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")) + $root.pyth_lazer_transaction.DynamicValue.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateFeedMetadata message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdateFeedMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.UpdateFeedMetadata + * @static + * @param {pyth_lazer_transaction.IUpdateFeedMetadata} message UpdateFeedMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateFeedMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateFeedMetadata message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.UpdateFeedMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.UpdateFeedMetadata} UpdateFeedMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateFeedMetadata.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.UpdateFeedMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.value = $root.pyth_lazer_transaction.DynamicValue.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateFeedMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.UpdateFeedMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.UpdateFeedMetadata} UpdateFeedMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateFeedMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateFeedMetadata message. + * @function verify + * @memberof pyth_lazer_transaction.UpdateFeedMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateFeedMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) { + properties._name = 1; + if (!$util.isString(message.name)) + return "name: string expected"; + } + if (message.value != null && message.hasOwnProperty("value")) { + properties._value = 1; + { + var error = $root.pyth_lazer_transaction.DynamicValue.verify(message.value); + if (error) + return "value." + error; + } + } + return null; + }; + + /** + * Creates an UpdateFeedMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.UpdateFeedMetadata + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.UpdateFeedMetadata} UpdateFeedMetadata + */ + UpdateFeedMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.UpdateFeedMetadata) + return object; + var message = new $root.pyth_lazer_transaction.UpdateFeedMetadata(); + if (object.name != null) + message.name = String(object.name); + if (object.value != null) { + if (typeof object.value !== "object") + throw TypeError(".pyth_lazer_transaction.UpdateFeedMetadata.value: object expected"); + message.value = $root.pyth_lazer_transaction.DynamicValue.fromObject(object.value); + } + return message; + }; + + /** + * Creates a plain object from an UpdateFeedMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.UpdateFeedMetadata + * @static + * @param {pyth_lazer_transaction.UpdateFeedMetadata} message UpdateFeedMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateFeedMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.name != null && message.hasOwnProperty("name")) { + object.name = message.name; + if (options.oneofs) + object._name = "name"; + } + if (message.value != null && message.hasOwnProperty("value")) { + object.value = $root.pyth_lazer_transaction.DynamicValue.toObject(message.value, options); + if (options.oneofs) + object._value = "value"; + } + return object; + }; + + /** + * Converts this UpdateFeedMetadata to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.UpdateFeedMetadata + * @instance + * @returns {Object.} JSON object + */ + UpdateFeedMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateFeedMetadata + * @function getTypeUrl + * @memberof pyth_lazer_transaction.UpdateFeedMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateFeedMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.UpdateFeedMetadata"; + }; + + return UpdateFeedMetadata; + })(); + + pyth_lazer_transaction.ActivateFeed = (function() { + + /** + * Properties of an ActivateFeed. + * @memberof pyth_lazer_transaction + * @interface IActivateFeed + * @property {google.protobuf.ITimestamp|null} [activationTimestamp] ActivateFeed activationTimestamp + */ + + /** + * Constructs a new ActivateFeed. + * @memberof pyth_lazer_transaction + * @classdesc Represents an ActivateFeed. + * @implements IActivateFeed + * @constructor + * @param {pyth_lazer_transaction.IActivateFeed=} [properties] Properties to set + */ + function ActivateFeed(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ActivateFeed activationTimestamp. + * @member {google.protobuf.ITimestamp|null|undefined} activationTimestamp + * @memberof pyth_lazer_transaction.ActivateFeed + * @instance + */ + ActivateFeed.prototype.activationTimestamp = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ActivateFeed _activationTimestamp. + * @member {"activationTimestamp"|undefined} _activationTimestamp + * @memberof pyth_lazer_transaction.ActivateFeed + * @instance + */ + Object.defineProperty(ActivateFeed.prototype, "_activationTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["activationTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ActivateFeed instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.ActivateFeed + * @static + * @param {pyth_lazer_transaction.IActivateFeed=} [properties] Properties to set + * @returns {pyth_lazer_transaction.ActivateFeed} ActivateFeed instance + */ + ActivateFeed.create = function create(properties) { + return new ActivateFeed(properties); + }; + + /** + * Encodes the specified ActivateFeed message. Does not implicitly {@link pyth_lazer_transaction.ActivateFeed.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.ActivateFeed + * @static + * @param {pyth_lazer_transaction.IActivateFeed} message ActivateFeed message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ActivateFeed.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.activationTimestamp != null && Object.hasOwnProperty.call(message, "activationTimestamp")) + $root.google.protobuf.Timestamp.encode(message.activationTimestamp, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ActivateFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ActivateFeed.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.ActivateFeed + * @static + * @param {pyth_lazer_transaction.IActivateFeed} message ActivateFeed message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ActivateFeed.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ActivateFeed message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.ActivateFeed + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.ActivateFeed} ActivateFeed + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ActivateFeed.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.ActivateFeed(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.activationTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ActivateFeed message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.ActivateFeed + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.ActivateFeed} ActivateFeed + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ActivateFeed.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ActivateFeed message. + * @function verify + * @memberof pyth_lazer_transaction.ActivateFeed + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ActivateFeed.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.activationTimestamp != null && message.hasOwnProperty("activationTimestamp")) { + properties._activationTimestamp = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.activationTimestamp); + if (error) + return "activationTimestamp." + error; + } + } + return null; + }; + + /** + * Creates an ActivateFeed message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.ActivateFeed + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.ActivateFeed} ActivateFeed + */ + ActivateFeed.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.ActivateFeed) + return object; + var message = new $root.pyth_lazer_transaction.ActivateFeed(); + if (object.activationTimestamp != null) { + if (typeof object.activationTimestamp !== "object") + throw TypeError(".pyth_lazer_transaction.ActivateFeed.activationTimestamp: object expected"); + message.activationTimestamp = $root.google.protobuf.Timestamp.fromObject(object.activationTimestamp); + } + return message; + }; + + /** + * Creates a plain object from an ActivateFeed message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.ActivateFeed + * @static + * @param {pyth_lazer_transaction.ActivateFeed} message ActivateFeed + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ActivateFeed.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.activationTimestamp != null && message.hasOwnProperty("activationTimestamp")) { + object.activationTimestamp = $root.google.protobuf.Timestamp.toObject(message.activationTimestamp, options); + if (options.oneofs) + object._activationTimestamp = "activationTimestamp"; + } + return object; + }; + + /** + * Converts this ActivateFeed to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.ActivateFeed + * @instance + * @returns {Object.} JSON object + */ + ActivateFeed.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ActivateFeed + * @function getTypeUrl + * @memberof pyth_lazer_transaction.ActivateFeed + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ActivateFeed.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.ActivateFeed"; + }; + + return ActivateFeed; + })(); + + pyth_lazer_transaction.DeactivateFeed = (function() { + + /** + * Properties of a DeactivateFeed. + * @memberof pyth_lazer_transaction + * @interface IDeactivateFeed + * @property {google.protobuf.ITimestamp|null} [deactivationTimestamp] DeactivateFeed deactivationTimestamp + */ + + /** + * Constructs a new DeactivateFeed. + * @memberof pyth_lazer_transaction + * @classdesc Represents a DeactivateFeed. + * @implements IDeactivateFeed + * @constructor + * @param {pyth_lazer_transaction.IDeactivateFeed=} [properties] Properties to set + */ + function DeactivateFeed(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeactivateFeed deactivationTimestamp. + * @member {google.protobuf.ITimestamp|null|undefined} deactivationTimestamp + * @memberof pyth_lazer_transaction.DeactivateFeed + * @instance + */ + DeactivateFeed.prototype.deactivationTimestamp = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DeactivateFeed _deactivationTimestamp. + * @member {"deactivationTimestamp"|undefined} _deactivationTimestamp + * @memberof pyth_lazer_transaction.DeactivateFeed + * @instance + */ + Object.defineProperty(DeactivateFeed.prototype, "_deactivationTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["deactivationTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DeactivateFeed instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.DeactivateFeed + * @static + * @param {pyth_lazer_transaction.IDeactivateFeed=} [properties] Properties to set + * @returns {pyth_lazer_transaction.DeactivateFeed} DeactivateFeed instance + */ + DeactivateFeed.create = function create(properties) { + return new DeactivateFeed(properties); + }; + + /** + * Encodes the specified DeactivateFeed message. Does not implicitly {@link pyth_lazer_transaction.DeactivateFeed.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.DeactivateFeed + * @static + * @param {pyth_lazer_transaction.IDeactivateFeed} message DeactivateFeed message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeactivateFeed.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deactivationTimestamp != null && Object.hasOwnProperty.call(message, "deactivationTimestamp")) + $root.google.protobuf.Timestamp.encode(message.deactivationTimestamp, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DeactivateFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DeactivateFeed.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.DeactivateFeed + * @static + * @param {pyth_lazer_transaction.IDeactivateFeed} message DeactivateFeed message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeactivateFeed.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeactivateFeed message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.DeactivateFeed + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.DeactivateFeed} DeactivateFeed + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeactivateFeed.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.DeactivateFeed(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.deactivationTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeactivateFeed message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.DeactivateFeed + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.DeactivateFeed} DeactivateFeed + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeactivateFeed.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeactivateFeed message. + * @function verify + * @memberof pyth_lazer_transaction.DeactivateFeed + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeactivateFeed.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.deactivationTimestamp != null && message.hasOwnProperty("deactivationTimestamp")) { + properties._deactivationTimestamp = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.deactivationTimestamp); + if (error) + return "deactivationTimestamp." + error; + } + } + return null; + }; + + /** + * Creates a DeactivateFeed message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.DeactivateFeed + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.DeactivateFeed} DeactivateFeed + */ + DeactivateFeed.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.DeactivateFeed) + return object; + var message = new $root.pyth_lazer_transaction.DeactivateFeed(); + if (object.deactivationTimestamp != null) { + if (typeof object.deactivationTimestamp !== "object") + throw TypeError(".pyth_lazer_transaction.DeactivateFeed.deactivationTimestamp: object expected"); + message.deactivationTimestamp = $root.google.protobuf.Timestamp.fromObject(object.deactivationTimestamp); + } + return message; + }; + + /** + * Creates a plain object from a DeactivateFeed message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.DeactivateFeed + * @static + * @param {pyth_lazer_transaction.DeactivateFeed} message DeactivateFeed + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeactivateFeed.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.deactivationTimestamp != null && message.hasOwnProperty("deactivationTimestamp")) { + object.deactivationTimestamp = $root.google.protobuf.Timestamp.toObject(message.deactivationTimestamp, options); + if (options.oneofs) + object._deactivationTimestamp = "deactivationTimestamp"; + } + return object; + }; + + /** + * Converts this DeactivateFeed to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.DeactivateFeed + * @instance + * @returns {Object.} JSON object + */ + DeactivateFeed.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeactivateFeed + * @function getTypeUrl + * @memberof pyth_lazer_transaction.DeactivateFeed + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeactivateFeed.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.DeactivateFeed"; + }; + + return DeactivateFeed; + })(); + + pyth_lazer_transaction.DynamicValue = (function() { + + /** + * Properties of a DynamicValue. + * @memberof pyth_lazer_transaction + * @interface IDynamicValue + * @property {string|null} [stringValue] DynamicValue stringValue + * @property {number|null} [doubleValue] DynamicValue doubleValue + * @property {number|Long|null} [uintValue] DynamicValue uintValue + * @property {number|Long|null} [intValue] DynamicValue intValue + * @property {boolean|null} [boolValue] DynamicValue boolValue + * @property {Uint8Array|null} [bytesValue] DynamicValue bytesValue + * @property {google.protobuf.IDuration|null} [durationValue] DynamicValue durationValue + * @property {google.protobuf.ITimestamp|null} [timestampValue] DynamicValue timestampValue + * @property {pyth_lazer_transaction.DynamicValue.IList|null} [list] DynamicValue list + * @property {pyth_lazer_transaction.DynamicValue.IMap|null} [map] DynamicValue map + */ + + /** + * Constructs a new DynamicValue. + * @memberof pyth_lazer_transaction + * @classdesc Represents a DynamicValue. + * @implements IDynamicValue + * @constructor + * @param {pyth_lazer_transaction.IDynamicValue=} [properties] Properties to set + */ + function DynamicValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DynamicValue stringValue. + * @member {string|null|undefined} stringValue + * @memberof pyth_lazer_transaction.DynamicValue + * @instance + */ + DynamicValue.prototype.stringValue = null; + + /** + * DynamicValue doubleValue. + * @member {number|null|undefined} doubleValue + * @memberof pyth_lazer_transaction.DynamicValue + * @instance + */ + DynamicValue.prototype.doubleValue = null; + + /** + * DynamicValue uintValue. + * @member {number|Long|null|undefined} uintValue + * @memberof pyth_lazer_transaction.DynamicValue + * @instance + */ + DynamicValue.prototype.uintValue = null; + + /** + * DynamicValue intValue. + * @member {number|Long|null|undefined} intValue + * @memberof pyth_lazer_transaction.DynamicValue + * @instance + */ + DynamicValue.prototype.intValue = null; + + /** + * DynamicValue boolValue. + * @member {boolean|null|undefined} boolValue + * @memberof pyth_lazer_transaction.DynamicValue + * @instance + */ + DynamicValue.prototype.boolValue = null; + + /** + * DynamicValue bytesValue. + * @member {Uint8Array|null|undefined} bytesValue + * @memberof pyth_lazer_transaction.DynamicValue + * @instance + */ + DynamicValue.prototype.bytesValue = null; + + /** + * DynamicValue durationValue. + * @member {google.protobuf.IDuration|null|undefined} durationValue + * @memberof pyth_lazer_transaction.DynamicValue + * @instance + */ + DynamicValue.prototype.durationValue = null; + + /** + * DynamicValue timestampValue. + * @member {google.protobuf.ITimestamp|null|undefined} timestampValue + * @memberof pyth_lazer_transaction.DynamicValue + * @instance + */ + DynamicValue.prototype.timestampValue = null; + + /** + * DynamicValue list. + * @member {pyth_lazer_transaction.DynamicValue.IList|null|undefined} list + * @memberof pyth_lazer_transaction.DynamicValue + * @instance + */ + DynamicValue.prototype.list = null; + + /** + * DynamicValue map. + * @member {pyth_lazer_transaction.DynamicValue.IMap|null|undefined} map + * @memberof pyth_lazer_transaction.DynamicValue + * @instance + */ + DynamicValue.prototype.map = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DynamicValue value. + * @member {"stringValue"|"doubleValue"|"uintValue"|"intValue"|"boolValue"|"bytesValue"|"durationValue"|"timestampValue"|"list"|"map"|undefined} value + * @memberof pyth_lazer_transaction.DynamicValue + * @instance + */ + Object.defineProperty(DynamicValue.prototype, "value", { + get: $util.oneOfGetter($oneOfFields = ["stringValue", "doubleValue", "uintValue", "intValue", "boolValue", "bytesValue", "durationValue", "timestampValue", "list", "map"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DynamicValue instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.DynamicValue + * @static + * @param {pyth_lazer_transaction.IDynamicValue=} [properties] Properties to set + * @returns {pyth_lazer_transaction.DynamicValue} DynamicValue instance + */ + DynamicValue.create = function create(properties) { + return new DynamicValue(properties); + }; + + /** + * Encodes the specified DynamicValue message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.DynamicValue + * @static + * @param {pyth_lazer_transaction.IDynamicValue} message DynamicValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DynamicValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.stringValue); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.doubleValue); + if (message.uintValue != null && Object.hasOwnProperty.call(message, "uintValue")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.uintValue); + if (message.intValue != null && Object.hasOwnProperty.call(message, "intValue")) + writer.uint32(/* id 4, wireType 0 =*/32).sint64(message.intValue); + if (message.boolValue != null && Object.hasOwnProperty.call(message, "boolValue")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.boolValue); + if (message.bytesValue != null && Object.hasOwnProperty.call(message, "bytesValue")) + writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.bytesValue); + if (message.durationValue != null && Object.hasOwnProperty.call(message, "durationValue")) + $root.google.protobuf.Duration.encode(message.durationValue, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.timestampValue != null && Object.hasOwnProperty.call(message, "timestampValue")) + $root.google.protobuf.Timestamp.encode(message.timestampValue, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.list != null && Object.hasOwnProperty.call(message, "list")) + $root.pyth_lazer_transaction.DynamicValue.List.encode(message.list, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.map != null && Object.hasOwnProperty.call(message, "map")) + $root.pyth_lazer_transaction.DynamicValue.Map.encode(message.map, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DynamicValue message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.DynamicValue + * @static + * @param {pyth_lazer_transaction.IDynamicValue} message DynamicValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DynamicValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DynamicValue message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.DynamicValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.DynamicValue} DynamicValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DynamicValue.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.DynamicValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.stringValue = reader.string(); + break; + } + case 2: { + message.doubleValue = reader.double(); + break; + } + case 3: { + message.uintValue = reader.uint64(); + break; + } + case 4: { + message.intValue = reader.sint64(); + break; + } + case 5: { + message.boolValue = reader.bool(); + break; + } + case 6: { + message.bytesValue = reader.bytes(); + break; + } + case 7: { + message.durationValue = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 8: { + message.timestampValue = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 9: { + message.list = $root.pyth_lazer_transaction.DynamicValue.List.decode(reader, reader.uint32()); + break; + } + case 10: { + message.map = $root.pyth_lazer_transaction.DynamicValue.Map.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DynamicValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.DynamicValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.DynamicValue} DynamicValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DynamicValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DynamicValue message. + * @function verify + * @memberof pyth_lazer_transaction.DynamicValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DynamicValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + properties.value = 1; + if (!$util.isString(message.stringValue)) + return "stringValue: string expected"; + } + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + } + if (message.uintValue != null && message.hasOwnProperty("uintValue")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + if (!$util.isInteger(message.uintValue) && !(message.uintValue && $util.isInteger(message.uintValue.low) && $util.isInteger(message.uintValue.high))) + return "uintValue: integer|Long expected"; + } + if (message.intValue != null && message.hasOwnProperty("intValue")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + if (!$util.isInteger(message.intValue) && !(message.intValue && $util.isInteger(message.intValue.low) && $util.isInteger(message.intValue.high))) + return "intValue: integer|Long expected"; + } + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + if (typeof message.boolValue !== "boolean") + return "boolValue: boolean expected"; + } + if (message.bytesValue != null && message.hasOwnProperty("bytesValue")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + if (!(message.bytesValue && typeof message.bytesValue.length === "number" || $util.isString(message.bytesValue))) + return "bytesValue: buffer expected"; + } + if (message.durationValue != null && message.hasOwnProperty("durationValue")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.google.protobuf.Duration.verify(message.durationValue); + if (error) + return "durationValue." + error; + } + } + if (message.timestampValue != null && message.hasOwnProperty("timestampValue")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.timestampValue); + if (error) + return "timestampValue." + error; + } + } + if (message.list != null && message.hasOwnProperty("list")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.pyth_lazer_transaction.DynamicValue.List.verify(message.list); + if (error) + return "list." + error; + } + } + if (message.map != null && message.hasOwnProperty("map")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.pyth_lazer_transaction.DynamicValue.Map.verify(message.map); + if (error) + return "map." + error; + } + } + return null; + }; + + /** + * Creates a DynamicValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.DynamicValue + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.DynamicValue} DynamicValue + */ + DynamicValue.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.DynamicValue) + return object; + var message = new $root.pyth_lazer_transaction.DynamicValue(); + if (object.stringValue != null) + message.stringValue = String(object.stringValue); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.uintValue != null) + if ($util.Long) + (message.uintValue = $util.Long.fromValue(object.uintValue)).unsigned = true; + else if (typeof object.uintValue === "string") + message.uintValue = parseInt(object.uintValue, 10); + else if (typeof object.uintValue === "number") + message.uintValue = object.uintValue; + else if (typeof object.uintValue === "object") + message.uintValue = new $util.LongBits(object.uintValue.low >>> 0, object.uintValue.high >>> 0).toNumber(true); + if (object.intValue != null) + if ($util.Long) + (message.intValue = $util.Long.fromValue(object.intValue)).unsigned = false; + else if (typeof object.intValue === "string") + message.intValue = parseInt(object.intValue, 10); + else if (typeof object.intValue === "number") + message.intValue = object.intValue; + else if (typeof object.intValue === "object") + message.intValue = new $util.LongBits(object.intValue.low >>> 0, object.intValue.high >>> 0).toNumber(); + if (object.boolValue != null) + message.boolValue = Boolean(object.boolValue); + if (object.bytesValue != null) + if (typeof object.bytesValue === "string") + $util.base64.decode(object.bytesValue, message.bytesValue = $util.newBuffer($util.base64.length(object.bytesValue)), 0); + else if (object.bytesValue.length >= 0) + message.bytesValue = object.bytesValue; + if (object.durationValue != null) { + if (typeof object.durationValue !== "object") + throw TypeError(".pyth_lazer_transaction.DynamicValue.durationValue: object expected"); + message.durationValue = $root.google.protobuf.Duration.fromObject(object.durationValue); + } + if (object.timestampValue != null) { + if (typeof object.timestampValue !== "object") + throw TypeError(".pyth_lazer_transaction.DynamicValue.timestampValue: object expected"); + message.timestampValue = $root.google.protobuf.Timestamp.fromObject(object.timestampValue); + } + if (object.list != null) { + if (typeof object.list !== "object") + throw TypeError(".pyth_lazer_transaction.DynamicValue.list: object expected"); + message.list = $root.pyth_lazer_transaction.DynamicValue.List.fromObject(object.list); + } + if (object.map != null) { + if (typeof object.map !== "object") + throw TypeError(".pyth_lazer_transaction.DynamicValue.map: object expected"); + message.map = $root.pyth_lazer_transaction.DynamicValue.Map.fromObject(object.map); + } + return message; + }; + + /** + * Creates a plain object from a DynamicValue message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.DynamicValue + * @static + * @param {pyth_lazer_transaction.DynamicValue} message DynamicValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DynamicValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + object.stringValue = message.stringValue; + if (options.oneofs) + object.value = "stringValue"; + } + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (options.oneofs) + object.value = "doubleValue"; + } + if (message.uintValue != null && message.hasOwnProperty("uintValue")) { + if (typeof message.uintValue === "number") + object.uintValue = options.longs === String ? String(message.uintValue) : message.uintValue; + else + object.uintValue = options.longs === String ? $util.Long.prototype.toString.call(message.uintValue) : options.longs === Number ? new $util.LongBits(message.uintValue.low >>> 0, message.uintValue.high >>> 0).toNumber(true) : message.uintValue; + if (options.oneofs) + object.value = "uintValue"; + } + if (message.intValue != null && message.hasOwnProperty("intValue")) { + if (typeof message.intValue === "number") + object.intValue = options.longs === String ? String(message.intValue) : message.intValue; + else + object.intValue = options.longs === String ? $util.Long.prototype.toString.call(message.intValue) : options.longs === Number ? new $util.LongBits(message.intValue.low >>> 0, message.intValue.high >>> 0).toNumber() : message.intValue; + if (options.oneofs) + object.value = "intValue"; + } + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + object.boolValue = message.boolValue; + if (options.oneofs) + object.value = "boolValue"; + } + if (message.bytesValue != null && message.hasOwnProperty("bytesValue")) { + object.bytesValue = options.bytes === String ? $util.base64.encode(message.bytesValue, 0, message.bytesValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.bytesValue) : message.bytesValue; + if (options.oneofs) + object.value = "bytesValue"; + } + if (message.durationValue != null && message.hasOwnProperty("durationValue")) { + object.durationValue = $root.google.protobuf.Duration.toObject(message.durationValue, options); + if (options.oneofs) + object.value = "durationValue"; + } + if (message.timestampValue != null && message.hasOwnProperty("timestampValue")) { + object.timestampValue = $root.google.protobuf.Timestamp.toObject(message.timestampValue, options); + if (options.oneofs) + object.value = "timestampValue"; + } + if (message.list != null && message.hasOwnProperty("list")) { + object.list = $root.pyth_lazer_transaction.DynamicValue.List.toObject(message.list, options); + if (options.oneofs) + object.value = "list"; + } + if (message.map != null && message.hasOwnProperty("map")) { + object.map = $root.pyth_lazer_transaction.DynamicValue.Map.toObject(message.map, options); + if (options.oneofs) + object.value = "map"; + } + return object; + }; + + /** + * Converts this DynamicValue to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.DynamicValue + * @instance + * @returns {Object.} JSON object + */ + DynamicValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DynamicValue + * @function getTypeUrl + * @memberof pyth_lazer_transaction.DynamicValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DynamicValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.DynamicValue"; + }; + + DynamicValue.List = (function() { + + /** + * Properties of a List. + * @memberof pyth_lazer_transaction.DynamicValue + * @interface IList + * @property {Array.|null} [items] List items + */ + + /** + * Constructs a new List. + * @memberof pyth_lazer_transaction.DynamicValue + * @classdesc Represents a List. + * @implements IList + * @constructor + * @param {pyth_lazer_transaction.DynamicValue.IList=} [properties] Properties to set + */ + function List(properties) { + this.items = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * List items. + * @member {Array.} items + * @memberof pyth_lazer_transaction.DynamicValue.List + * @instance + */ + List.prototype.items = $util.emptyArray; + + /** + * Creates a new List instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.DynamicValue.List + * @static + * @param {pyth_lazer_transaction.DynamicValue.IList=} [properties] Properties to set + * @returns {pyth_lazer_transaction.DynamicValue.List} List instance + */ + List.create = function create(properties) { + return new List(properties); + }; + + /** + * Encodes the specified List message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.List.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.DynamicValue.List + * @static + * @param {pyth_lazer_transaction.DynamicValue.IList} message List message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + List.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.items != null && message.items.length) + for (var i = 0; i < message.items.length; ++i) + $root.pyth_lazer_transaction.DynamicValue.encode(message.items[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified List message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.List.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.DynamicValue.List + * @static + * @param {pyth_lazer_transaction.DynamicValue.IList} message List message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + List.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a List message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.DynamicValue.List + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.DynamicValue.List} List + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + List.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.DynamicValue.List(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.items && message.items.length)) + message.items = []; + message.items.push($root.pyth_lazer_transaction.DynamicValue.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a List message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.DynamicValue.List + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.DynamicValue.List} List + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + List.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a List message. + * @function verify + * @memberof pyth_lazer_transaction.DynamicValue.List + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + List.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.items != null && message.hasOwnProperty("items")) { + if (!Array.isArray(message.items)) + return "items: array expected"; + for (var i = 0; i < message.items.length; ++i) { + var error = $root.pyth_lazer_transaction.DynamicValue.verify(message.items[i]); + if (error) + return "items." + error; + } + } + return null; + }; + + /** + * Creates a List message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.DynamicValue.List + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.DynamicValue.List} List + */ + List.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.DynamicValue.List) + return object; + var message = new $root.pyth_lazer_transaction.DynamicValue.List(); + if (object.items) { + if (!Array.isArray(object.items)) + throw TypeError(".pyth_lazer_transaction.DynamicValue.List.items: array expected"); + message.items = []; + for (var i = 0; i < object.items.length; ++i) { + if (typeof object.items[i] !== "object") + throw TypeError(".pyth_lazer_transaction.DynamicValue.List.items: object expected"); + message.items[i] = $root.pyth_lazer_transaction.DynamicValue.fromObject(object.items[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a List message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.DynamicValue.List + * @static + * @param {pyth_lazer_transaction.DynamicValue.List} message List + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + List.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.items = []; + if (message.items && message.items.length) { + object.items = []; + for (var j = 0; j < message.items.length; ++j) + object.items[j] = $root.pyth_lazer_transaction.DynamicValue.toObject(message.items[j], options); + } + return object; + }; + + /** + * Converts this List to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.DynamicValue.List + * @instance + * @returns {Object.} JSON object + */ + List.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for List + * @function getTypeUrl + * @memberof pyth_lazer_transaction.DynamicValue.List + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + List.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.DynamicValue.List"; + }; + + return List; + })(); + + DynamicValue.MapItem = (function() { + + /** + * Properties of a MapItem. + * @memberof pyth_lazer_transaction.DynamicValue + * @interface IMapItem + * @property {string|null} [key] MapItem key + * @property {pyth_lazer_transaction.IDynamicValue|null} [value] MapItem value + */ + + /** + * Constructs a new MapItem. + * @memberof pyth_lazer_transaction.DynamicValue + * @classdesc Represents a MapItem. + * @implements IMapItem + * @constructor + * @param {pyth_lazer_transaction.DynamicValue.IMapItem=} [properties] Properties to set + */ + function MapItem(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MapItem key. + * @member {string|null|undefined} key + * @memberof pyth_lazer_transaction.DynamicValue.MapItem + * @instance + */ + MapItem.prototype.key = null; + + /** + * MapItem value. + * @member {pyth_lazer_transaction.IDynamicValue|null|undefined} value + * @memberof pyth_lazer_transaction.DynamicValue.MapItem + * @instance + */ + MapItem.prototype.value = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * MapItem _key. + * @member {"key"|undefined} _key + * @memberof pyth_lazer_transaction.DynamicValue.MapItem + * @instance + */ + Object.defineProperty(MapItem.prototype, "_key", { + get: $util.oneOfGetter($oneOfFields = ["key"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * MapItem _value. + * @member {"value"|undefined} _value + * @memberof pyth_lazer_transaction.DynamicValue.MapItem + * @instance + */ + Object.defineProperty(MapItem.prototype, "_value", { + get: $util.oneOfGetter($oneOfFields = ["value"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new MapItem instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.DynamicValue.MapItem + * @static + * @param {pyth_lazer_transaction.DynamicValue.IMapItem=} [properties] Properties to set + * @returns {pyth_lazer_transaction.DynamicValue.MapItem} MapItem instance + */ + MapItem.create = function create(properties) { + return new MapItem(properties); + }; + + /** + * Encodes the specified MapItem message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.MapItem.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.DynamicValue.MapItem + * @static + * @param {pyth_lazer_transaction.DynamicValue.IMapItem} message MapItem message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MapItem.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + $root.pyth_lazer_transaction.DynamicValue.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MapItem message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.MapItem.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.DynamicValue.MapItem + * @static + * @param {pyth_lazer_transaction.DynamicValue.IMapItem} message MapItem message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MapItem.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MapItem message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.DynamicValue.MapItem + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.DynamicValue.MapItem} MapItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MapItem.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.DynamicValue.MapItem(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.key = reader.string(); + break; + } + case 2: { + message.value = $root.pyth_lazer_transaction.DynamicValue.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MapItem message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.DynamicValue.MapItem + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.DynamicValue.MapItem} MapItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MapItem.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MapItem message. + * @function verify + * @memberof pyth_lazer_transaction.DynamicValue.MapItem + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MapItem.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.key != null && message.hasOwnProperty("key")) { + properties._key = 1; + if (!$util.isString(message.key)) + return "key: string expected"; + } + if (message.value != null && message.hasOwnProperty("value")) { + properties._value = 1; + { + var error = $root.pyth_lazer_transaction.DynamicValue.verify(message.value); + if (error) + return "value." + error; + } + } + return null; + }; + + /** + * Creates a MapItem message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.DynamicValue.MapItem + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.DynamicValue.MapItem} MapItem + */ + MapItem.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.DynamicValue.MapItem) + return object; + var message = new $root.pyth_lazer_transaction.DynamicValue.MapItem(); + if (object.key != null) + message.key = String(object.key); + if (object.value != null) { + if (typeof object.value !== "object") + throw TypeError(".pyth_lazer_transaction.DynamicValue.MapItem.value: object expected"); + message.value = $root.pyth_lazer_transaction.DynamicValue.fromObject(object.value); + } + return message; + }; + + /** + * Creates a plain object from a MapItem message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.DynamicValue.MapItem + * @static + * @param {pyth_lazer_transaction.DynamicValue.MapItem} message MapItem + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MapItem.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.key != null && message.hasOwnProperty("key")) { + object.key = message.key; + if (options.oneofs) + object._key = "key"; + } + if (message.value != null && message.hasOwnProperty("value")) { + object.value = $root.pyth_lazer_transaction.DynamicValue.toObject(message.value, options); + if (options.oneofs) + object._value = "value"; + } + return object; + }; + + /** + * Converts this MapItem to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.DynamicValue.MapItem + * @instance + * @returns {Object.} JSON object + */ + MapItem.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MapItem + * @function getTypeUrl + * @memberof pyth_lazer_transaction.DynamicValue.MapItem + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MapItem.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.DynamicValue.MapItem"; + }; + + return MapItem; + })(); + + DynamicValue.Map = (function() { + + /** + * Properties of a Map. + * @memberof pyth_lazer_transaction.DynamicValue + * @interface IMap + * @property {Array.|null} [items] Map items + */ + + /** + * Constructs a new Map. + * @memberof pyth_lazer_transaction.DynamicValue + * @classdesc Represents a Map. + * @implements IMap + * @constructor + * @param {pyth_lazer_transaction.DynamicValue.IMap=} [properties] Properties to set + */ + function Map(properties) { + this.items = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Map items. + * @member {Array.} items + * @memberof pyth_lazer_transaction.DynamicValue.Map + * @instance + */ + Map.prototype.items = $util.emptyArray; + + /** + * Creates a new Map instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.DynamicValue.Map + * @static + * @param {pyth_lazer_transaction.DynamicValue.IMap=} [properties] Properties to set + * @returns {pyth_lazer_transaction.DynamicValue.Map} Map instance + */ + Map.create = function create(properties) { + return new Map(properties); + }; + + /** + * Encodes the specified Map message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.Map.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.DynamicValue.Map + * @static + * @param {pyth_lazer_transaction.DynamicValue.IMap} message Map message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Map.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.items != null && message.items.length) + for (var i = 0; i < message.items.length; ++i) + $root.pyth_lazer_transaction.DynamicValue.MapItem.encode(message.items[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Map message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.Map.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.DynamicValue.Map + * @static + * @param {pyth_lazer_transaction.DynamicValue.IMap} message Map message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Map.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Map message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.DynamicValue.Map + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.DynamicValue.Map} Map + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Map.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.DynamicValue.Map(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.items && message.items.length)) + message.items = []; + message.items.push($root.pyth_lazer_transaction.DynamicValue.MapItem.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Map message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.DynamicValue.Map + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.DynamicValue.Map} Map + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Map.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Map message. + * @function verify + * @memberof pyth_lazer_transaction.DynamicValue.Map + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Map.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.items != null && message.hasOwnProperty("items")) { + if (!Array.isArray(message.items)) + return "items: array expected"; + for (var i = 0; i < message.items.length; ++i) { + var error = $root.pyth_lazer_transaction.DynamicValue.MapItem.verify(message.items[i]); + if (error) + return "items." + error; + } + } + return null; + }; + + /** + * Creates a Map message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.DynamicValue.Map + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.DynamicValue.Map} Map + */ + Map.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.DynamicValue.Map) + return object; + var message = new $root.pyth_lazer_transaction.DynamicValue.Map(); + if (object.items) { + if (!Array.isArray(object.items)) + throw TypeError(".pyth_lazer_transaction.DynamicValue.Map.items: array expected"); + message.items = []; + for (var i = 0; i < object.items.length; ++i) { + if (typeof object.items[i] !== "object") + throw TypeError(".pyth_lazer_transaction.DynamicValue.Map.items: object expected"); + message.items[i] = $root.pyth_lazer_transaction.DynamicValue.MapItem.fromObject(object.items[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Map message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.DynamicValue.Map + * @static + * @param {pyth_lazer_transaction.DynamicValue.Map} message Map + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Map.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.items = []; + if (message.items && message.items.length) { + object.items = []; + for (var j = 0; j < message.items.length; ++j) + object.items[j] = $root.pyth_lazer_transaction.DynamicValue.MapItem.toObject(message.items[j], options); + } + return object; + }; + + /** + * Converts this Map to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.DynamicValue.Map + * @instance + * @returns {Object.} JSON object + */ + Map.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Map + * @function getTypeUrl + * @memberof pyth_lazer_transaction.DynamicValue.Map + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Map.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.DynamicValue.Map"; + }; + + return Map; + })(); + + return DynamicValue; + })(); + + return pyth_lazer_transaction; +})(); + +$root.google = (function() { + + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + + google.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + var protobuf = {}; + + protobuf.Timestamp = (function() { + + /** + * Properties of a Timestamp. + * @memberof google.protobuf + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos + */ + + /** + * Constructs a new Timestamp. + * @memberof google.protobuf + * @classdesc Represents a Timestamp. + * @implements ITimestamp + * @constructor + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + */ + function Timestamp(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.nanos = 0; + + /** + * Creates a new Timestamp instance using the specified properties. + * @function create + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance + */ + Timestamp.create = function create(properties) { + return new Timestamp(properties); + }; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Timestamp message. + * @function verify + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Timestamp.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Timestamp} Timestamp + */ + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) + return object; + var message = new $root.google.protobuf.Timestamp(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.Timestamp} message Timestamp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Timestamp.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Timestamp to JSON. + * @function toJSON + * @memberof google.protobuf.Timestamp + * @instance + * @returns {Object.} JSON object + */ + Timestamp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Timestamp + * @function getTypeUrl + * @memberof google.protobuf.Timestamp + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Timestamp"; + }; + + return Timestamp; + })(); + + protobuf.Duration = (function() { + + /** + * Properties of a Duration. + * @memberof google.protobuf + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos + */ + + /** + * Constructs a new Duration. + * @memberof google.protobuf + * @classdesc Represents a Duration. + * @implements IDuration + * @constructor + * @param {google.protobuf.IDuration=} [properties] Properties to set + */ + function Duration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; + + /** + * Creates a new Duration instance using the specified properties. + * @function create + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance + */ + Duration.create = function create(properties) { + return new Duration(properties); + }; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Duration message. + * @function verify + * @memberof google.protobuf.Duration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Duration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Duration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Duration} Duration + */ + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) + return object; + var message = new $root.google.protobuf.Duration(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.Duration} message Duration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Duration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Duration to JSON. + * @function toJSON + * @memberof google.protobuf.Duration + * @instance + * @returns {Object.} JSON object + */ + Duration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Duration + * @function getTypeUrl + * @memberof google.protobuf.Duration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Duration"; + }; + + return Duration; + })(); + + 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 (var 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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + 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.} 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.} 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.} Plain object + */ + Empty.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Empty to JSON. + * @function toJSON + * @memberof google.protobuf.Empty + * @instance + * @returns {Object.} JSON object + */ + Empty.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Empty + * @function getTypeUrl + * @memberof google.protobuf.Empty + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Empty"; + }; + + return Empty; + })(); + + return protobuf; + })(); + + return google; +})(); + +module.exports = $root; diff --git a/lazer/state_sdk/js/src/generated/governance_instruction.d.ts b/lazer/state_sdk/js/src/generated/governance_instruction.d.ts new file mode 100644 index 0000000000..66c941628b --- /dev/null +++ b/lazer/state_sdk/js/src/generated/governance_instruction.d.ts @@ -0,0 +1,3925 @@ +import * as $protobuf from "protobufjs"; +import Long = require("long"); +/** Namespace pyth_lazer_transaction. */ +export namespace pyth_lazer_transaction { + + /** Properties of a GovernanceInstruction. */ + interface IGovernanceInstruction { + + /** GovernanceInstruction directives */ + directives?: (pyth_lazer_transaction.IGovernanceDirective[]|null); + + /** GovernanceInstruction minExecutionTimestamp */ + minExecutionTimestamp?: (google.protobuf.ITimestamp|null); + + /** GovernanceInstruction maxExecutionTimestamp */ + maxExecutionTimestamp?: (google.protobuf.ITimestamp|null); + + /** GovernanceInstruction governanceSequenceNo */ + governanceSequenceNo?: (number|null); + } + + /** Represents a GovernanceInstruction. */ + class GovernanceInstruction implements IGovernanceInstruction { + + /** + * Constructs a new GovernanceInstruction. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IGovernanceInstruction); + + /** GovernanceInstruction directives. */ + public directives: pyth_lazer_transaction.IGovernanceDirective[]; + + /** GovernanceInstruction minExecutionTimestamp. */ + public minExecutionTimestamp?: (google.protobuf.ITimestamp|null); + + /** GovernanceInstruction maxExecutionTimestamp. */ + public maxExecutionTimestamp?: (google.protobuf.ITimestamp|null); + + /** GovernanceInstruction governanceSequenceNo. */ + public governanceSequenceNo?: (number|null); + + /** GovernanceInstruction _minExecutionTimestamp. */ + public _minExecutionTimestamp?: "minExecutionTimestamp"; + + /** GovernanceInstruction _maxExecutionTimestamp. */ + public _maxExecutionTimestamp?: "maxExecutionTimestamp"; + + /** GovernanceInstruction _governanceSequenceNo. */ + public _governanceSequenceNo?: "governanceSequenceNo"; + + /** + * Creates a new GovernanceInstruction instance using the specified properties. + * @param [properties] Properties to set + * @returns GovernanceInstruction instance + */ + public static create(properties?: pyth_lazer_transaction.IGovernanceInstruction): pyth_lazer_transaction.GovernanceInstruction; + + /** + * Encodes the specified GovernanceInstruction message. Does not implicitly {@link pyth_lazer_transaction.GovernanceInstruction.verify|verify} messages. + * @param message GovernanceInstruction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IGovernanceInstruction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GovernanceInstruction message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceInstruction.verify|verify} messages. + * @param message GovernanceInstruction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IGovernanceInstruction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GovernanceInstruction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GovernanceInstruction + * @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): pyth_lazer_transaction.GovernanceInstruction; + + /** + * Decodes a GovernanceInstruction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GovernanceInstruction + * @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)): pyth_lazer_transaction.GovernanceInstruction; + + /** + * Verifies a GovernanceInstruction 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 GovernanceInstruction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GovernanceInstruction + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.GovernanceInstruction; + + /** + * Creates a plain object from a GovernanceInstruction message. Also converts values to other types if specified. + * @param message GovernanceInstruction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.GovernanceInstruction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GovernanceInstruction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GovernanceInstruction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ShardFilter. */ + interface IShardFilter { + + /** ShardFilter allShards */ + allShards?: (google.protobuf.IEmpty|null); + + /** ShardFilter shardNames */ + shardNames?: (pyth_lazer_transaction.ShardFilter.IShardNames|null); + + /** ShardFilter shardGroups */ + shardGroups?: (pyth_lazer_transaction.ShardFilter.IShardGroups|null); + } + + /** Represents a ShardFilter. */ + class ShardFilter implements IShardFilter { + + /** + * Constructs a new ShardFilter. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IShardFilter); + + /** ShardFilter allShards. */ + public allShards?: (google.protobuf.IEmpty|null); + + /** ShardFilter shardNames. */ + public shardNames?: (pyth_lazer_transaction.ShardFilter.IShardNames|null); + + /** ShardFilter shardGroups. */ + public shardGroups?: (pyth_lazer_transaction.ShardFilter.IShardGroups|null); + + /** ShardFilter filter. */ + public filter?: ("allShards"|"shardNames"|"shardGroups"); + + /** + * Creates a new ShardFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns ShardFilter instance + */ + public static create(properties?: pyth_lazer_transaction.IShardFilter): pyth_lazer_transaction.ShardFilter; + + /** + * Encodes the specified ShardFilter message. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.verify|verify} messages. + * @param message ShardFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IShardFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ShardFilter message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.verify|verify} messages. + * @param message ShardFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IShardFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ShardFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ShardFilter + * @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): pyth_lazer_transaction.ShardFilter; + + /** + * Decodes a ShardFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ShardFilter + * @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)): pyth_lazer_transaction.ShardFilter; + + /** + * Verifies a ShardFilter 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 ShardFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ShardFilter + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.ShardFilter; + + /** + * Creates a plain object from a ShardFilter message. Also converts values to other types if specified. + * @param message ShardFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.ShardFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ShardFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ShardFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ShardFilter { + + /** Properties of a ShardNames. */ + interface IShardNames { + + /** ShardNames shardNames */ + shardNames?: (string[]|null); + } + + /** Represents a ShardNames. */ + class ShardNames implements IShardNames { + + /** + * Constructs a new ShardNames. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ShardFilter.IShardNames); + + /** ShardNames shardNames. */ + public shardNames: string[]; + + /** + * Creates a new ShardNames instance using the specified properties. + * @param [properties] Properties to set + * @returns ShardNames instance + */ + public static create(properties?: pyth_lazer_transaction.ShardFilter.IShardNames): pyth_lazer_transaction.ShardFilter.ShardNames; + + /** + * Encodes the specified ShardNames message. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardNames.verify|verify} messages. + * @param message ShardNames message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.ShardFilter.IShardNames, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ShardNames message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardNames.verify|verify} messages. + * @param message ShardNames message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.ShardFilter.IShardNames, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ShardNames message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ShardNames + * @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): pyth_lazer_transaction.ShardFilter.ShardNames; + + /** + * Decodes a ShardNames message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ShardNames + * @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)): pyth_lazer_transaction.ShardFilter.ShardNames; + + /** + * Verifies a ShardNames 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 ShardNames message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ShardNames + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.ShardFilter.ShardNames; + + /** + * Creates a plain object from a ShardNames message. Also converts values to other types if specified. + * @param message ShardNames + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.ShardFilter.ShardNames, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ShardNames to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ShardNames + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ShardGroups. */ + interface IShardGroups { + + /** ShardGroups shardGroups */ + shardGroups?: (string[]|null); + } + + /** Represents a ShardGroups. */ + class ShardGroups implements IShardGroups { + + /** + * Constructs a new ShardGroups. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ShardFilter.IShardGroups); + + /** ShardGroups shardGroups. */ + public shardGroups: string[]; + + /** + * Creates a new ShardGroups instance using the specified properties. + * @param [properties] Properties to set + * @returns ShardGroups instance + */ + public static create(properties?: pyth_lazer_transaction.ShardFilter.IShardGroups): pyth_lazer_transaction.ShardFilter.ShardGroups; + + /** + * Encodes the specified ShardGroups message. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardGroups.verify|verify} messages. + * @param message ShardGroups message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.ShardFilter.IShardGroups, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ShardGroups message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardGroups.verify|verify} messages. + * @param message ShardGroups message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.ShardFilter.IShardGroups, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ShardGroups message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ShardGroups + * @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): pyth_lazer_transaction.ShardFilter.ShardGroups; + + /** + * Decodes a ShardGroups message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ShardGroups + * @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)): pyth_lazer_transaction.ShardFilter.ShardGroups; + + /** + * Verifies a ShardGroups 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 ShardGroups message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ShardGroups + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.ShardFilter.ShardGroups; + + /** + * Creates a plain object from a ShardGroups message. Also converts values to other types if specified. + * @param message ShardGroups + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.ShardFilter.ShardGroups, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ShardGroups to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ShardGroups + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a GovernanceDirective. */ + interface IGovernanceDirective { + + /** GovernanceDirective shardFilter */ + shardFilter?: (pyth_lazer_transaction.IShardFilter|null); + + /** GovernanceDirective createShard */ + createShard?: (pyth_lazer_transaction.ICreateShard|null); + + /** GovernanceDirective addGovernanceSource */ + addGovernanceSource?: (pyth_lazer_transaction.IAddGovernanceSource|null); + + /** GovernanceDirective updateGovernanceSource */ + updateGovernanceSource?: (pyth_lazer_transaction.IUpdateGovernanceSource|null); + + /** GovernanceDirective setShardName */ + setShardName?: (pyth_lazer_transaction.ISetShardName|null); + + /** GovernanceDirective setShardGroup */ + setShardGroup?: (pyth_lazer_transaction.ISetShardGroup|null); + + /** GovernanceDirective resetLastSequenceNo */ + resetLastSequenceNo?: (pyth_lazer_transaction.IResetLastSequenceNo|null); + + /** GovernanceDirective addPublisher */ + addPublisher?: (pyth_lazer_transaction.IAddPublisher|null); + + /** GovernanceDirective updatePublisher */ + updatePublisher?: (pyth_lazer_transaction.IUpdatePublisher|null); + + /** GovernanceDirective addFeed */ + addFeed?: (pyth_lazer_transaction.IAddFeed|null); + + /** GovernanceDirective updateFeed */ + updateFeed?: (pyth_lazer_transaction.IUpdateFeed|null); + } + + /** Represents a GovernanceDirective. */ + class GovernanceDirective implements IGovernanceDirective { + + /** + * Constructs a new GovernanceDirective. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IGovernanceDirective); + + /** GovernanceDirective shardFilter. */ + public shardFilter?: (pyth_lazer_transaction.IShardFilter|null); + + /** GovernanceDirective createShard. */ + public createShard?: (pyth_lazer_transaction.ICreateShard|null); + + /** GovernanceDirective addGovernanceSource. */ + public addGovernanceSource?: (pyth_lazer_transaction.IAddGovernanceSource|null); + + /** GovernanceDirective updateGovernanceSource. */ + public updateGovernanceSource?: (pyth_lazer_transaction.IUpdateGovernanceSource|null); + + /** GovernanceDirective setShardName. */ + public setShardName?: (pyth_lazer_transaction.ISetShardName|null); + + /** GovernanceDirective setShardGroup. */ + public setShardGroup?: (pyth_lazer_transaction.ISetShardGroup|null); + + /** GovernanceDirective resetLastSequenceNo. */ + public resetLastSequenceNo?: (pyth_lazer_transaction.IResetLastSequenceNo|null); + + /** GovernanceDirective addPublisher. */ + public addPublisher?: (pyth_lazer_transaction.IAddPublisher|null); + + /** GovernanceDirective updatePublisher. */ + public updatePublisher?: (pyth_lazer_transaction.IUpdatePublisher|null); + + /** GovernanceDirective addFeed. */ + public addFeed?: (pyth_lazer_transaction.IAddFeed|null); + + /** GovernanceDirective updateFeed. */ + public updateFeed?: (pyth_lazer_transaction.IUpdateFeed|null); + + /** GovernanceDirective _shardFilter. */ + public _shardFilter?: "shardFilter"; + + /** GovernanceDirective action. */ + public action?: ("createShard"|"addGovernanceSource"|"updateGovernanceSource"|"setShardName"|"setShardGroup"|"resetLastSequenceNo"|"addPublisher"|"updatePublisher"|"addFeed"|"updateFeed"); + + /** + * Creates a new GovernanceDirective instance using the specified properties. + * @param [properties] Properties to set + * @returns GovernanceDirective instance + */ + public static create(properties?: pyth_lazer_transaction.IGovernanceDirective): pyth_lazer_transaction.GovernanceDirective; + + /** + * Encodes the specified GovernanceDirective message. Does not implicitly {@link pyth_lazer_transaction.GovernanceDirective.verify|verify} messages. + * @param message GovernanceDirective message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IGovernanceDirective, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GovernanceDirective message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceDirective.verify|verify} messages. + * @param message GovernanceDirective message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IGovernanceDirective, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GovernanceDirective message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GovernanceDirective + * @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): pyth_lazer_transaction.GovernanceDirective; + + /** + * Decodes a GovernanceDirective message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GovernanceDirective + * @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)): pyth_lazer_transaction.GovernanceDirective; + + /** + * Verifies a GovernanceDirective 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 GovernanceDirective message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GovernanceDirective + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.GovernanceDirective; + + /** + * Creates a plain object from a GovernanceDirective message. Also converts values to other types if specified. + * @param message GovernanceDirective + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.GovernanceDirective, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GovernanceDirective to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GovernanceDirective + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Permissions. */ + interface IPermissions { + + /** Permissions allActions */ + allActions?: (boolean|null); + + /** Permissions shardActions */ + shardActions?: (pyth_lazer_transaction.Permissions.ShardAction[]|null); + + /** Permissions allUpdateGovernanceSourceActions */ + allUpdateGovernanceSourceActions?: (boolean|null); + + /** Permissions updateGovernanceSourceActions */ + updateGovernanceSourceActions?: (pyth_lazer_transaction.Permissions.UpdateGovernanceSourceAction[]|null); + + /** Permissions allUpdatePublisherAction */ + allUpdatePublisherAction?: (boolean|null); + + /** Permissions updatePublisherActions */ + updatePublisherActions?: (pyth_lazer_transaction.Permissions.UpdatePublisherAction[]|null); + + /** Permissions allUpdateFeedActions */ + allUpdateFeedActions?: (boolean|null); + + /** Permissions updateFeedActions */ + updateFeedActions?: (pyth_lazer_transaction.Permissions.UpdateFeedAction[]|null); + } + + /** Represents a Permissions. */ + class Permissions implements IPermissions { + + /** + * Constructs a new Permissions. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IPermissions); + + /** Permissions allActions. */ + public allActions?: (boolean|null); + + /** Permissions shardActions. */ + public shardActions: pyth_lazer_transaction.Permissions.ShardAction[]; + + /** Permissions allUpdateGovernanceSourceActions. */ + public allUpdateGovernanceSourceActions?: (boolean|null); + + /** Permissions updateGovernanceSourceActions. */ + public updateGovernanceSourceActions: pyth_lazer_transaction.Permissions.UpdateGovernanceSourceAction[]; + + /** Permissions allUpdatePublisherAction. */ + public allUpdatePublisherAction?: (boolean|null); + + /** Permissions updatePublisherActions. */ + public updatePublisherActions: pyth_lazer_transaction.Permissions.UpdatePublisherAction[]; + + /** Permissions allUpdateFeedActions. */ + public allUpdateFeedActions?: (boolean|null); + + /** Permissions updateFeedActions. */ + public updateFeedActions: pyth_lazer_transaction.Permissions.UpdateFeedAction[]; + + /** Permissions _allActions. */ + public _allActions?: "allActions"; + + /** Permissions _allUpdateGovernanceSourceActions. */ + public _allUpdateGovernanceSourceActions?: "allUpdateGovernanceSourceActions"; + + /** Permissions _allUpdatePublisherAction. */ + public _allUpdatePublisherAction?: "allUpdatePublisherAction"; + + /** Permissions _allUpdateFeedActions. */ + public _allUpdateFeedActions?: "allUpdateFeedActions"; + + /** + * Creates a new Permissions instance using the specified properties. + * @param [properties] Properties to set + * @returns Permissions instance + */ + public static create(properties?: pyth_lazer_transaction.IPermissions): pyth_lazer_transaction.Permissions; + + /** + * Encodes the specified Permissions message. Does not implicitly {@link pyth_lazer_transaction.Permissions.verify|verify} messages. + * @param message Permissions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IPermissions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Permissions message, length delimited. Does not implicitly {@link pyth_lazer_transaction.Permissions.verify|verify} messages. + * @param message Permissions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IPermissions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Permissions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Permissions + * @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): pyth_lazer_transaction.Permissions; + + /** + * Decodes a Permissions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Permissions + * @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)): pyth_lazer_transaction.Permissions; + + /** + * Verifies a Permissions 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 Permissions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Permissions + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.Permissions; + + /** + * Creates a plain object from a Permissions message. Also converts values to other types if specified. + * @param message Permissions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.Permissions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Permissions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Permissions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Permissions { + + /** ShardAction enum. */ + enum ShardAction { + SHARD_ACTION_UNSPECIFIED = 0, + CREATE_SHARD = 101, + ADD_GOVERNANCE_SOURCE = 102, + UPDATE_GOVERNANCE_SOURCE = 103, + SET_SHARD_NAME = 104, + SET_SHARD_GROUP = 105, + RESET_LAST_SEQUENCE_NO = 106, + ADD_PUBLISHER = 107, + ADD_FEED = 109 + } + + /** UpdateGovernanceSourceAction enum. */ + enum UpdateGovernanceSourceAction { + UPDATE_GOVERNANCE_SOURCE_ACTION_UNSPECIFIED = 0, + SET_GOVERNANCE_SOURCE_PERMISSIONS = 101, + REMOVE_GOVERNANCE_SOURCE = 199 + } + + /** UpdatePublisherAction enum. */ + enum UpdatePublisherAction { + UPDATE_PUBLISHER_ACTION_UNSPECIFIED = 0, + SET_PUBLISHER_NAME = 101, + ADD_PUBLISHER_PUBLIC_KEYS = 102, + REMOVE_PUBLISHER_PUBLIC_KEYS = 103, + SET_PUBLISHER_PUBLIC_KEYS = 104, + SET_PUBLISHER_ACTIVE = 105, + REMOVE_PUBLISHER = 199 + } + + /** UpdateFeedAction enum. */ + enum UpdateFeedAction { + UPDATE_FEED_ACTION_UNSPECIFIED = 0, + UPDATE_FEED_METADATA = 101, + ACTIVATE_FEED = 102, + DEACTIVATE_FEED = 103, + REMOVE_FEED = 199 + } + } + + /** Properties of a GovernanceSource. */ + interface IGovernanceSource { + + /** GovernanceSource singleEd25519 */ + singleEd25519?: (pyth_lazer_transaction.GovernanceSource.ISingleEd25519|null); + + /** GovernanceSource wormholeEmitter */ + wormholeEmitter?: (pyth_lazer_transaction.GovernanceSource.IWormholeEmitter|null); + } + + /** Represents a GovernanceSource. */ + class GovernanceSource implements IGovernanceSource { + + /** + * Constructs a new GovernanceSource. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IGovernanceSource); + + /** GovernanceSource singleEd25519. */ + public singleEd25519?: (pyth_lazer_transaction.GovernanceSource.ISingleEd25519|null); + + /** GovernanceSource wormholeEmitter. */ + public wormholeEmitter?: (pyth_lazer_transaction.GovernanceSource.IWormholeEmitter|null); + + /** GovernanceSource source. */ + public source?: ("singleEd25519"|"wormholeEmitter"); + + /** + * Creates a new GovernanceSource instance using the specified properties. + * @param [properties] Properties to set + * @returns GovernanceSource instance + */ + public static create(properties?: pyth_lazer_transaction.IGovernanceSource): pyth_lazer_transaction.GovernanceSource; + + /** + * Encodes the specified GovernanceSource message. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.verify|verify} messages. + * @param message GovernanceSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IGovernanceSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GovernanceSource message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.verify|verify} messages. + * @param message GovernanceSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IGovernanceSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GovernanceSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GovernanceSource + * @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): pyth_lazer_transaction.GovernanceSource; + + /** + * Decodes a GovernanceSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GovernanceSource + * @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)): pyth_lazer_transaction.GovernanceSource; + + /** + * Verifies a GovernanceSource 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 GovernanceSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GovernanceSource + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.GovernanceSource; + + /** + * Creates a plain object from a GovernanceSource message. Also converts values to other types if specified. + * @param message GovernanceSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.GovernanceSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GovernanceSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GovernanceSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GovernanceSource { + + /** Properties of a SingleEd25519. */ + interface ISingleEd25519 { + + /** SingleEd25519 publicKey */ + publicKey?: (Uint8Array|null); + } + + /** Represents a SingleEd25519. */ + class SingleEd25519 implements ISingleEd25519 { + + /** + * Constructs a new SingleEd25519. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.GovernanceSource.ISingleEd25519); + + /** SingleEd25519 publicKey. */ + public publicKey?: (Uint8Array|null); + + /** SingleEd25519 _publicKey. */ + public _publicKey?: "publicKey"; + + /** + * Creates a new SingleEd25519 instance using the specified properties. + * @param [properties] Properties to set + * @returns SingleEd25519 instance + */ + public static create(properties?: pyth_lazer_transaction.GovernanceSource.ISingleEd25519): pyth_lazer_transaction.GovernanceSource.SingleEd25519; + + /** + * Encodes the specified SingleEd25519 message. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.SingleEd25519.verify|verify} messages. + * @param message SingleEd25519 message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.GovernanceSource.ISingleEd25519, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SingleEd25519 message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.SingleEd25519.verify|verify} messages. + * @param message SingleEd25519 message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.GovernanceSource.ISingleEd25519, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SingleEd25519 message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SingleEd25519 + * @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): pyth_lazer_transaction.GovernanceSource.SingleEd25519; + + /** + * Decodes a SingleEd25519 message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SingleEd25519 + * @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)): pyth_lazer_transaction.GovernanceSource.SingleEd25519; + + /** + * Verifies a SingleEd25519 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 SingleEd25519 message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SingleEd25519 + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.GovernanceSource.SingleEd25519; + + /** + * Creates a plain object from a SingleEd25519 message. Also converts values to other types if specified. + * @param message SingleEd25519 + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.GovernanceSource.SingleEd25519, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SingleEd25519 to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SingleEd25519 + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a WormholeEmitter. */ + interface IWormholeEmitter { + + /** WormholeEmitter address */ + address?: (Uint8Array|null); + + /** WormholeEmitter chainId */ + chainId?: (number|null); + } + + /** Represents a WormholeEmitter. */ + class WormholeEmitter implements IWormholeEmitter { + + /** + * Constructs a new WormholeEmitter. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.GovernanceSource.IWormholeEmitter); + + /** WormholeEmitter address. */ + public address?: (Uint8Array|null); + + /** WormholeEmitter chainId. */ + public chainId?: (number|null); + + /** WormholeEmitter _address. */ + public _address?: "address"; + + /** WormholeEmitter _chainId. */ + public _chainId?: "chainId"; + + /** + * Creates a new WormholeEmitter instance using the specified properties. + * @param [properties] Properties to set + * @returns WormholeEmitter instance + */ + public static create(properties?: pyth_lazer_transaction.GovernanceSource.IWormholeEmitter): pyth_lazer_transaction.GovernanceSource.WormholeEmitter; + + /** + * Encodes the specified WormholeEmitter message. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.WormholeEmitter.verify|verify} messages. + * @param message WormholeEmitter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.GovernanceSource.IWormholeEmitter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WormholeEmitter message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.WormholeEmitter.verify|verify} messages. + * @param message WormholeEmitter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.GovernanceSource.IWormholeEmitter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WormholeEmitter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WormholeEmitter + * @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): pyth_lazer_transaction.GovernanceSource.WormholeEmitter; + + /** + * Decodes a WormholeEmitter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WormholeEmitter + * @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)): pyth_lazer_transaction.GovernanceSource.WormholeEmitter; + + /** + * Verifies a WormholeEmitter 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 WormholeEmitter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WormholeEmitter + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.GovernanceSource.WormholeEmitter; + + /** + * Creates a plain object from a WormholeEmitter message. Also converts values to other types if specified. + * @param message WormholeEmitter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.GovernanceSource.WormholeEmitter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WormholeEmitter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WormholeEmitter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a CreateShard. */ + interface ICreateShard { + + /** CreateShard shardId */ + shardId?: (number|null); + + /** CreateShard shardGroup */ + shardGroup?: (string|null); + + /** CreateShard minRate */ + minRate?: (google.protobuf.IDuration|null); + } + + /** Represents a CreateShard. */ + class CreateShard implements ICreateShard { + + /** + * Constructs a new CreateShard. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ICreateShard); + + /** CreateShard shardId. */ + public shardId?: (number|null); + + /** CreateShard shardGroup. */ + public shardGroup?: (string|null); + + /** CreateShard minRate. */ + public minRate?: (google.protobuf.IDuration|null); + + /** CreateShard _shardId. */ + public _shardId?: "shardId"; + + /** CreateShard _shardGroup. */ + public _shardGroup?: "shardGroup"; + + /** CreateShard _minRate. */ + public _minRate?: "minRate"; + + /** + * Creates a new CreateShard instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateShard instance + */ + public static create(properties?: pyth_lazer_transaction.ICreateShard): pyth_lazer_transaction.CreateShard; + + /** + * Encodes the specified CreateShard message. Does not implicitly {@link pyth_lazer_transaction.CreateShard.verify|verify} messages. + * @param message CreateShard message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.ICreateShard, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateShard message, length delimited. Does not implicitly {@link pyth_lazer_transaction.CreateShard.verify|verify} messages. + * @param message CreateShard message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.ICreateShard, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateShard message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateShard + * @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): pyth_lazer_transaction.CreateShard; + + /** + * Decodes a CreateShard message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateShard + * @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)): pyth_lazer_transaction.CreateShard; + + /** + * Verifies a CreateShard 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 CreateShard message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateShard + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.CreateShard; + + /** + * Creates a plain object from a CreateShard message. Also converts values to other types if specified. + * @param message CreateShard + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.CreateShard, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateShard to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateShard + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AddGovernanceSource. */ + interface IAddGovernanceSource { + + /** AddGovernanceSource newSource */ + newSource?: (pyth_lazer_transaction.IGovernanceSource|null); + + /** AddGovernanceSource permissions */ + permissions?: (pyth_lazer_transaction.IPermissions|null); + } + + /** Represents an AddGovernanceSource. */ + class AddGovernanceSource implements IAddGovernanceSource { + + /** + * Constructs a new AddGovernanceSource. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IAddGovernanceSource); + + /** AddGovernanceSource newSource. */ + public newSource?: (pyth_lazer_transaction.IGovernanceSource|null); + + /** AddGovernanceSource permissions. */ + public permissions?: (pyth_lazer_transaction.IPermissions|null); + + /** AddGovernanceSource _newSource. */ + public _newSource?: "newSource"; + + /** AddGovernanceSource _permissions. */ + public _permissions?: "permissions"; + + /** + * Creates a new AddGovernanceSource instance using the specified properties. + * @param [properties] Properties to set + * @returns AddGovernanceSource instance + */ + public static create(properties?: pyth_lazer_transaction.IAddGovernanceSource): pyth_lazer_transaction.AddGovernanceSource; + + /** + * Encodes the specified AddGovernanceSource message. Does not implicitly {@link pyth_lazer_transaction.AddGovernanceSource.verify|verify} messages. + * @param message AddGovernanceSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IAddGovernanceSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AddGovernanceSource message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddGovernanceSource.verify|verify} messages. + * @param message AddGovernanceSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IAddGovernanceSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AddGovernanceSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AddGovernanceSource + * @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): pyth_lazer_transaction.AddGovernanceSource; + + /** + * Decodes an AddGovernanceSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AddGovernanceSource + * @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)): pyth_lazer_transaction.AddGovernanceSource; + + /** + * Verifies an AddGovernanceSource 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 AddGovernanceSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AddGovernanceSource + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.AddGovernanceSource; + + /** + * Creates a plain object from an AddGovernanceSource message. Also converts values to other types if specified. + * @param message AddGovernanceSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.AddGovernanceSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AddGovernanceSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AddGovernanceSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateGovernanceSource. */ + interface IUpdateGovernanceSource { + + /** UpdateGovernanceSource source */ + source?: (pyth_lazer_transaction.IGovernanceSource|null); + + /** UpdateGovernanceSource setGovernanceSourcePermissions */ + setGovernanceSourcePermissions?: (pyth_lazer_transaction.ISetGovernanceSourcePermissions|null); + + /** UpdateGovernanceSource removeGovernanceSource */ + removeGovernanceSource?: (google.protobuf.IEmpty|null); + } + + /** Represents an UpdateGovernanceSource. */ + class UpdateGovernanceSource implements IUpdateGovernanceSource { + + /** + * Constructs a new UpdateGovernanceSource. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IUpdateGovernanceSource); + + /** UpdateGovernanceSource source. */ + public source?: (pyth_lazer_transaction.IGovernanceSource|null); + + /** UpdateGovernanceSource setGovernanceSourcePermissions. */ + public setGovernanceSourcePermissions?: (pyth_lazer_transaction.ISetGovernanceSourcePermissions|null); + + /** UpdateGovernanceSource removeGovernanceSource. */ + public removeGovernanceSource?: (google.protobuf.IEmpty|null); + + /** UpdateGovernanceSource _source. */ + public _source?: "source"; + + /** UpdateGovernanceSource action. */ + public action?: ("setGovernanceSourcePermissions"|"removeGovernanceSource"); + + /** + * Creates a new UpdateGovernanceSource instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateGovernanceSource instance + */ + public static create(properties?: pyth_lazer_transaction.IUpdateGovernanceSource): pyth_lazer_transaction.UpdateGovernanceSource; + + /** + * Encodes the specified UpdateGovernanceSource message. Does not implicitly {@link pyth_lazer_transaction.UpdateGovernanceSource.verify|verify} messages. + * @param message UpdateGovernanceSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IUpdateGovernanceSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateGovernanceSource message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdateGovernanceSource.verify|verify} messages. + * @param message UpdateGovernanceSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IUpdateGovernanceSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateGovernanceSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateGovernanceSource + * @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): pyth_lazer_transaction.UpdateGovernanceSource; + + /** + * Decodes an UpdateGovernanceSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateGovernanceSource + * @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)): pyth_lazer_transaction.UpdateGovernanceSource; + + /** + * Verifies an UpdateGovernanceSource 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 UpdateGovernanceSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateGovernanceSource + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.UpdateGovernanceSource; + + /** + * Creates a plain object from an UpdateGovernanceSource message. Also converts values to other types if specified. + * @param message UpdateGovernanceSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.UpdateGovernanceSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateGovernanceSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateGovernanceSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetGovernanceSourcePermissions. */ + interface ISetGovernanceSourcePermissions { + + /** SetGovernanceSourcePermissions permissions */ + permissions?: (pyth_lazer_transaction.IPermissions|null); + } + + /** Represents a SetGovernanceSourcePermissions. */ + class SetGovernanceSourcePermissions implements ISetGovernanceSourcePermissions { + + /** + * Constructs a new SetGovernanceSourcePermissions. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ISetGovernanceSourcePermissions); + + /** SetGovernanceSourcePermissions permissions. */ + public permissions?: (pyth_lazer_transaction.IPermissions|null); + + /** SetGovernanceSourcePermissions _permissions. */ + public _permissions?: "permissions"; + + /** + * Creates a new SetGovernanceSourcePermissions instance using the specified properties. + * @param [properties] Properties to set + * @returns SetGovernanceSourcePermissions instance + */ + public static create(properties?: pyth_lazer_transaction.ISetGovernanceSourcePermissions): pyth_lazer_transaction.SetGovernanceSourcePermissions; + + /** + * Encodes the specified SetGovernanceSourcePermissions message. Does not implicitly {@link pyth_lazer_transaction.SetGovernanceSourcePermissions.verify|verify} messages. + * @param message SetGovernanceSourcePermissions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.ISetGovernanceSourcePermissions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetGovernanceSourcePermissions message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetGovernanceSourcePermissions.verify|verify} messages. + * @param message SetGovernanceSourcePermissions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.ISetGovernanceSourcePermissions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetGovernanceSourcePermissions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetGovernanceSourcePermissions + * @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): pyth_lazer_transaction.SetGovernanceSourcePermissions; + + /** + * Decodes a SetGovernanceSourcePermissions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetGovernanceSourcePermissions + * @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)): pyth_lazer_transaction.SetGovernanceSourcePermissions; + + /** + * Verifies a SetGovernanceSourcePermissions 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 SetGovernanceSourcePermissions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetGovernanceSourcePermissions + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.SetGovernanceSourcePermissions; + + /** + * Creates a plain object from a SetGovernanceSourcePermissions message. Also converts values to other types if specified. + * @param message SetGovernanceSourcePermissions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.SetGovernanceSourcePermissions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetGovernanceSourcePermissions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetGovernanceSourcePermissions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetShardName. */ + interface ISetShardName { + + /** SetShardName shardName */ + shardName?: (string|null); + } + + /** Represents a SetShardName. */ + class SetShardName implements ISetShardName { + + /** + * Constructs a new SetShardName. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ISetShardName); + + /** SetShardName shardName. */ + public shardName?: (string|null); + + /** SetShardName _shardName. */ + public _shardName?: "shardName"; + + /** + * Creates a new SetShardName instance using the specified properties. + * @param [properties] Properties to set + * @returns SetShardName instance + */ + public static create(properties?: pyth_lazer_transaction.ISetShardName): pyth_lazer_transaction.SetShardName; + + /** + * Encodes the specified SetShardName message. Does not implicitly {@link pyth_lazer_transaction.SetShardName.verify|verify} messages. + * @param message SetShardName message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.ISetShardName, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetShardName message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetShardName.verify|verify} messages. + * @param message SetShardName message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.ISetShardName, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetShardName message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetShardName + * @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): pyth_lazer_transaction.SetShardName; + + /** + * Decodes a SetShardName message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetShardName + * @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)): pyth_lazer_transaction.SetShardName; + + /** + * Verifies a SetShardName 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 SetShardName message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetShardName + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.SetShardName; + + /** + * Creates a plain object from a SetShardName message. Also converts values to other types if specified. + * @param message SetShardName + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.SetShardName, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetShardName to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetShardName + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetShardGroup. */ + interface ISetShardGroup { + + /** SetShardGroup shardGroup */ + shardGroup?: (string|null); + } + + /** Represents a SetShardGroup. */ + class SetShardGroup implements ISetShardGroup { + + /** + * Constructs a new SetShardGroup. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ISetShardGroup); + + /** SetShardGroup shardGroup. */ + public shardGroup?: (string|null); + + /** SetShardGroup _shardGroup. */ + public _shardGroup?: "shardGroup"; + + /** + * Creates a new SetShardGroup instance using the specified properties. + * @param [properties] Properties to set + * @returns SetShardGroup instance + */ + public static create(properties?: pyth_lazer_transaction.ISetShardGroup): pyth_lazer_transaction.SetShardGroup; + + /** + * Encodes the specified SetShardGroup message. Does not implicitly {@link pyth_lazer_transaction.SetShardGroup.verify|verify} messages. + * @param message SetShardGroup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.ISetShardGroup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetShardGroup message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetShardGroup.verify|verify} messages. + * @param message SetShardGroup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.ISetShardGroup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetShardGroup message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetShardGroup + * @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): pyth_lazer_transaction.SetShardGroup; + + /** + * Decodes a SetShardGroup message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetShardGroup + * @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)): pyth_lazer_transaction.SetShardGroup; + + /** + * Verifies a SetShardGroup 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 SetShardGroup message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetShardGroup + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.SetShardGroup; + + /** + * Creates a plain object from a SetShardGroup message. Also converts values to other types if specified. + * @param message SetShardGroup + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.SetShardGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetShardGroup to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetShardGroup + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ResetLastSequenceNo. */ + interface IResetLastSequenceNo { + + /** ResetLastSequenceNo lastSequenceNo */ + lastSequenceNo?: (number|Long|null); + } + + /** Represents a ResetLastSequenceNo. */ + class ResetLastSequenceNo implements IResetLastSequenceNo { + + /** + * Constructs a new ResetLastSequenceNo. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IResetLastSequenceNo); + + /** ResetLastSequenceNo lastSequenceNo. */ + public lastSequenceNo?: (number|Long|null); + + /** ResetLastSequenceNo _lastSequenceNo. */ + public _lastSequenceNo?: "lastSequenceNo"; + + /** + * Creates a new ResetLastSequenceNo instance using the specified properties. + * @param [properties] Properties to set + * @returns ResetLastSequenceNo instance + */ + public static create(properties?: pyth_lazer_transaction.IResetLastSequenceNo): pyth_lazer_transaction.ResetLastSequenceNo; + + /** + * Encodes the specified ResetLastSequenceNo message. Does not implicitly {@link pyth_lazer_transaction.ResetLastSequenceNo.verify|verify} messages. + * @param message ResetLastSequenceNo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IResetLastSequenceNo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResetLastSequenceNo message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ResetLastSequenceNo.verify|verify} messages. + * @param message ResetLastSequenceNo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IResetLastSequenceNo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResetLastSequenceNo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResetLastSequenceNo + * @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): pyth_lazer_transaction.ResetLastSequenceNo; + + /** + * Decodes a ResetLastSequenceNo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResetLastSequenceNo + * @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)): pyth_lazer_transaction.ResetLastSequenceNo; + + /** + * Verifies a ResetLastSequenceNo 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 ResetLastSequenceNo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResetLastSequenceNo + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.ResetLastSequenceNo; + + /** + * Creates a plain object from a ResetLastSequenceNo message. Also converts values to other types if specified. + * @param message ResetLastSequenceNo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.ResetLastSequenceNo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResetLastSequenceNo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResetLastSequenceNo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AddPublisher. */ + interface IAddPublisher { + + /** AddPublisher publisherId */ + publisherId?: (number|null); + + /** AddPublisher name */ + name?: (string|null); + + /** AddPublisher publicKeys */ + publicKeys?: (Uint8Array[]|null); + + /** AddPublisher isActive */ + isActive?: (boolean|null); + } + + /** Represents an AddPublisher. */ + class AddPublisher implements IAddPublisher { + + /** + * Constructs a new AddPublisher. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IAddPublisher); + + /** AddPublisher publisherId. */ + public publisherId?: (number|null); + + /** AddPublisher name. */ + public name?: (string|null); + + /** AddPublisher publicKeys. */ + public publicKeys: Uint8Array[]; + + /** AddPublisher isActive. */ + public isActive?: (boolean|null); + + /** AddPublisher _publisherId. */ + public _publisherId?: "publisherId"; + + /** AddPublisher _name. */ + public _name?: "name"; + + /** AddPublisher _isActive. */ + public _isActive?: "isActive"; + + /** + * Creates a new AddPublisher instance using the specified properties. + * @param [properties] Properties to set + * @returns AddPublisher instance + */ + public static create(properties?: pyth_lazer_transaction.IAddPublisher): pyth_lazer_transaction.AddPublisher; + + /** + * Encodes the specified AddPublisher message. Does not implicitly {@link pyth_lazer_transaction.AddPublisher.verify|verify} messages. + * @param message AddPublisher message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IAddPublisher, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AddPublisher message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddPublisher.verify|verify} messages. + * @param message AddPublisher message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IAddPublisher, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AddPublisher message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AddPublisher + * @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): pyth_lazer_transaction.AddPublisher; + + /** + * Decodes an AddPublisher message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AddPublisher + * @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)): pyth_lazer_transaction.AddPublisher; + + /** + * Verifies an AddPublisher 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 AddPublisher message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AddPublisher + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.AddPublisher; + + /** + * Creates a plain object from an AddPublisher message. Also converts values to other types if specified. + * @param message AddPublisher + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.AddPublisher, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AddPublisher to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AddPublisher + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdatePublisher. */ + interface IUpdatePublisher { + + /** UpdatePublisher publisherId */ + publisherId?: (number|null); + + /** UpdatePublisher setPublisherName */ + setPublisherName?: (pyth_lazer_transaction.ISetPublisherName|null); + + /** UpdatePublisher addPublisherPublicKeys */ + addPublisherPublicKeys?: (pyth_lazer_transaction.IAddPublisherPublicKeys|null); + + /** UpdatePublisher removePublisherPublicKeys */ + removePublisherPublicKeys?: (pyth_lazer_transaction.IRemovePublisherPublicKeys|null); + + /** UpdatePublisher setPublisherPublicKeys */ + setPublisherPublicKeys?: (pyth_lazer_transaction.ISetPublisherPublicKeys|null); + + /** UpdatePublisher setPublisherActive */ + setPublisherActive?: (pyth_lazer_transaction.ISetPublisherActive|null); + + /** UpdatePublisher removePublisher */ + removePublisher?: (google.protobuf.IEmpty|null); + } + + /** Represents an UpdatePublisher. */ + class UpdatePublisher implements IUpdatePublisher { + + /** + * Constructs a new UpdatePublisher. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IUpdatePublisher); + + /** UpdatePublisher publisherId. */ + public publisherId?: (number|null); + + /** UpdatePublisher setPublisherName. */ + public setPublisherName?: (pyth_lazer_transaction.ISetPublisherName|null); + + /** UpdatePublisher addPublisherPublicKeys. */ + public addPublisherPublicKeys?: (pyth_lazer_transaction.IAddPublisherPublicKeys|null); + + /** UpdatePublisher removePublisherPublicKeys. */ + public removePublisherPublicKeys?: (pyth_lazer_transaction.IRemovePublisherPublicKeys|null); + + /** UpdatePublisher setPublisherPublicKeys. */ + public setPublisherPublicKeys?: (pyth_lazer_transaction.ISetPublisherPublicKeys|null); + + /** UpdatePublisher setPublisherActive. */ + public setPublisherActive?: (pyth_lazer_transaction.ISetPublisherActive|null); + + /** UpdatePublisher removePublisher. */ + public removePublisher?: (google.protobuf.IEmpty|null); + + /** UpdatePublisher _publisherId. */ + public _publisherId?: "publisherId"; + + /** UpdatePublisher action. */ + public action?: ("setPublisherName"|"addPublisherPublicKeys"|"removePublisherPublicKeys"|"setPublisherPublicKeys"|"setPublisherActive"|"removePublisher"); + + /** + * Creates a new UpdatePublisher instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdatePublisher instance + */ + public static create(properties?: pyth_lazer_transaction.IUpdatePublisher): pyth_lazer_transaction.UpdatePublisher; + + /** + * Encodes the specified UpdatePublisher message. Does not implicitly {@link pyth_lazer_transaction.UpdatePublisher.verify|verify} messages. + * @param message UpdatePublisher message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IUpdatePublisher, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdatePublisher message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdatePublisher.verify|verify} messages. + * @param message UpdatePublisher message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IUpdatePublisher, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdatePublisher message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdatePublisher + * @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): pyth_lazer_transaction.UpdatePublisher; + + /** + * Decodes an UpdatePublisher message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdatePublisher + * @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)): pyth_lazer_transaction.UpdatePublisher; + + /** + * Verifies an UpdatePublisher 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 UpdatePublisher message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdatePublisher + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.UpdatePublisher; + + /** + * Creates a plain object from an UpdatePublisher message. Also converts values to other types if specified. + * @param message UpdatePublisher + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.UpdatePublisher, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdatePublisher to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdatePublisher + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetPublisherName. */ + interface ISetPublisherName { + + /** SetPublisherName name */ + name?: (string|null); + } + + /** Represents a SetPublisherName. */ + class SetPublisherName implements ISetPublisherName { + + /** + * Constructs a new SetPublisherName. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ISetPublisherName); + + /** SetPublisherName name. */ + public name?: (string|null); + + /** SetPublisherName _name. */ + public _name?: "name"; + + /** + * Creates a new SetPublisherName instance using the specified properties. + * @param [properties] Properties to set + * @returns SetPublisherName instance + */ + public static create(properties?: pyth_lazer_transaction.ISetPublisherName): pyth_lazer_transaction.SetPublisherName; + + /** + * Encodes the specified SetPublisherName message. Does not implicitly {@link pyth_lazer_transaction.SetPublisherName.verify|verify} messages. + * @param message SetPublisherName message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.ISetPublisherName, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetPublisherName message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetPublisherName.verify|verify} messages. + * @param message SetPublisherName message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.ISetPublisherName, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetPublisherName message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetPublisherName + * @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): pyth_lazer_transaction.SetPublisherName; + + /** + * Decodes a SetPublisherName message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetPublisherName + * @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)): pyth_lazer_transaction.SetPublisherName; + + /** + * Verifies a SetPublisherName 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 SetPublisherName message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetPublisherName + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.SetPublisherName; + + /** + * Creates a plain object from a SetPublisherName message. Also converts values to other types if specified. + * @param message SetPublisherName + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.SetPublisherName, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetPublisherName to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetPublisherName + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AddPublisherPublicKeys. */ + interface IAddPublisherPublicKeys { + + /** AddPublisherPublicKeys publicKeys */ + publicKeys?: (Uint8Array[]|null); + } + + /** Represents an AddPublisherPublicKeys. */ + class AddPublisherPublicKeys implements IAddPublisherPublicKeys { + + /** + * Constructs a new AddPublisherPublicKeys. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IAddPublisherPublicKeys); + + /** AddPublisherPublicKeys publicKeys. */ + public publicKeys: Uint8Array[]; + + /** + * Creates a new AddPublisherPublicKeys instance using the specified properties. + * @param [properties] Properties to set + * @returns AddPublisherPublicKeys instance + */ + public static create(properties?: pyth_lazer_transaction.IAddPublisherPublicKeys): pyth_lazer_transaction.AddPublisherPublicKeys; + + /** + * Encodes the specified AddPublisherPublicKeys message. Does not implicitly {@link pyth_lazer_transaction.AddPublisherPublicKeys.verify|verify} messages. + * @param message AddPublisherPublicKeys message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IAddPublisherPublicKeys, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AddPublisherPublicKeys message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddPublisherPublicKeys.verify|verify} messages. + * @param message AddPublisherPublicKeys message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IAddPublisherPublicKeys, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AddPublisherPublicKeys message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AddPublisherPublicKeys + * @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): pyth_lazer_transaction.AddPublisherPublicKeys; + + /** + * Decodes an AddPublisherPublicKeys message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AddPublisherPublicKeys + * @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)): pyth_lazer_transaction.AddPublisherPublicKeys; + + /** + * Verifies an AddPublisherPublicKeys 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 AddPublisherPublicKeys message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AddPublisherPublicKeys + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.AddPublisherPublicKeys; + + /** + * Creates a plain object from an AddPublisherPublicKeys message. Also converts values to other types if specified. + * @param message AddPublisherPublicKeys + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.AddPublisherPublicKeys, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AddPublisherPublicKeys to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AddPublisherPublicKeys + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RemovePublisherPublicKeys. */ + interface IRemovePublisherPublicKeys { + + /** RemovePublisherPublicKeys publicKeys */ + publicKeys?: (Uint8Array[]|null); + } + + /** Represents a RemovePublisherPublicKeys. */ + class RemovePublisherPublicKeys implements IRemovePublisherPublicKeys { + + /** + * Constructs a new RemovePublisherPublicKeys. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IRemovePublisherPublicKeys); + + /** RemovePublisherPublicKeys publicKeys. */ + public publicKeys: Uint8Array[]; + + /** + * Creates a new RemovePublisherPublicKeys instance using the specified properties. + * @param [properties] Properties to set + * @returns RemovePublisherPublicKeys instance + */ + public static create(properties?: pyth_lazer_transaction.IRemovePublisherPublicKeys): pyth_lazer_transaction.RemovePublisherPublicKeys; + + /** + * Encodes the specified RemovePublisherPublicKeys message. Does not implicitly {@link pyth_lazer_transaction.RemovePublisherPublicKeys.verify|verify} messages. + * @param message RemovePublisherPublicKeys message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IRemovePublisherPublicKeys, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RemovePublisherPublicKeys message, length delimited. Does not implicitly {@link pyth_lazer_transaction.RemovePublisherPublicKeys.verify|verify} messages. + * @param message RemovePublisherPublicKeys message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IRemovePublisherPublicKeys, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RemovePublisherPublicKeys message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RemovePublisherPublicKeys + * @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): pyth_lazer_transaction.RemovePublisherPublicKeys; + + /** + * Decodes a RemovePublisherPublicKeys message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RemovePublisherPublicKeys + * @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)): pyth_lazer_transaction.RemovePublisherPublicKeys; + + /** + * Verifies a RemovePublisherPublicKeys 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 RemovePublisherPublicKeys message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RemovePublisherPublicKeys + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.RemovePublisherPublicKeys; + + /** + * Creates a plain object from a RemovePublisherPublicKeys message. Also converts values to other types if specified. + * @param message RemovePublisherPublicKeys + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.RemovePublisherPublicKeys, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RemovePublisherPublicKeys to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RemovePublisherPublicKeys + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetPublisherPublicKeys. */ + interface ISetPublisherPublicKeys { + + /** SetPublisherPublicKeys publicKeys */ + publicKeys?: (Uint8Array[]|null); + } + + /** Represents a SetPublisherPublicKeys. */ + class SetPublisherPublicKeys implements ISetPublisherPublicKeys { + + /** + * Constructs a new SetPublisherPublicKeys. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ISetPublisherPublicKeys); + + /** SetPublisherPublicKeys publicKeys. */ + public publicKeys: Uint8Array[]; + + /** + * Creates a new SetPublisherPublicKeys instance using the specified properties. + * @param [properties] Properties to set + * @returns SetPublisherPublicKeys instance + */ + public static create(properties?: pyth_lazer_transaction.ISetPublisherPublicKeys): pyth_lazer_transaction.SetPublisherPublicKeys; + + /** + * Encodes the specified SetPublisherPublicKeys message. Does not implicitly {@link pyth_lazer_transaction.SetPublisherPublicKeys.verify|verify} messages. + * @param message SetPublisherPublicKeys message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.ISetPublisherPublicKeys, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetPublisherPublicKeys message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetPublisherPublicKeys.verify|verify} messages. + * @param message SetPublisherPublicKeys message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.ISetPublisherPublicKeys, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetPublisherPublicKeys message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetPublisherPublicKeys + * @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): pyth_lazer_transaction.SetPublisherPublicKeys; + + /** + * Decodes a SetPublisherPublicKeys message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetPublisherPublicKeys + * @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)): pyth_lazer_transaction.SetPublisherPublicKeys; + + /** + * Verifies a SetPublisherPublicKeys 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 SetPublisherPublicKeys message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetPublisherPublicKeys + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.SetPublisherPublicKeys; + + /** + * Creates a plain object from a SetPublisherPublicKeys message. Also converts values to other types if specified. + * @param message SetPublisherPublicKeys + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.SetPublisherPublicKeys, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetPublisherPublicKeys to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetPublisherPublicKeys + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetPublisherActive. */ + interface ISetPublisherActive { + + /** SetPublisherActive isActive */ + isActive?: (boolean|null); + } + + /** Represents a SetPublisherActive. */ + class SetPublisherActive implements ISetPublisherActive { + + /** + * Constructs a new SetPublisherActive. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ISetPublisherActive); + + /** SetPublisherActive isActive. */ + public isActive?: (boolean|null); + + /** SetPublisherActive _isActive. */ + public _isActive?: "isActive"; + + /** + * Creates a new SetPublisherActive instance using the specified properties. + * @param [properties] Properties to set + * @returns SetPublisherActive instance + */ + public static create(properties?: pyth_lazer_transaction.ISetPublisherActive): pyth_lazer_transaction.SetPublisherActive; + + /** + * Encodes the specified SetPublisherActive message. Does not implicitly {@link pyth_lazer_transaction.SetPublisherActive.verify|verify} messages. + * @param message SetPublisherActive message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.ISetPublisherActive, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetPublisherActive message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetPublisherActive.verify|verify} messages. + * @param message SetPublisherActive message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.ISetPublisherActive, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetPublisherActive message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetPublisherActive + * @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): pyth_lazer_transaction.SetPublisherActive; + + /** + * Decodes a SetPublisherActive message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetPublisherActive + * @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)): pyth_lazer_transaction.SetPublisherActive; + + /** + * Verifies a SetPublisherActive 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 SetPublisherActive message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetPublisherActive + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.SetPublisherActive; + + /** + * Creates a plain object from a SetPublisherActive message. Also converts values to other types if specified. + * @param message SetPublisherActive + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.SetPublisherActive, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetPublisherActive to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetPublisherActive + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AddFeed. */ + interface IAddFeed { + + /** AddFeed feedId */ + feedId?: (number|null); + + /** AddFeed metadata */ + metadata?: (pyth_lazer_transaction.DynamicValue.IMap|null); + + /** AddFeed permissionedPublishers */ + permissionedPublishers?: (number[]|null); + } + + /** Represents an AddFeed. */ + class AddFeed implements IAddFeed { + + /** + * Constructs a new AddFeed. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IAddFeed); + + /** AddFeed feedId. */ + public feedId?: (number|null); + + /** AddFeed metadata. */ + public metadata?: (pyth_lazer_transaction.DynamicValue.IMap|null); + + /** AddFeed permissionedPublishers. */ + public permissionedPublishers: number[]; + + /** AddFeed _feedId. */ + public _feedId?: "feedId"; + + /** AddFeed _metadata. */ + public _metadata?: "metadata"; + + /** + * Creates a new AddFeed instance using the specified properties. + * @param [properties] Properties to set + * @returns AddFeed instance + */ + public static create(properties?: pyth_lazer_transaction.IAddFeed): pyth_lazer_transaction.AddFeed; + + /** + * Encodes the specified AddFeed message. Does not implicitly {@link pyth_lazer_transaction.AddFeed.verify|verify} messages. + * @param message AddFeed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IAddFeed, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AddFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddFeed.verify|verify} messages. + * @param message AddFeed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IAddFeed, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AddFeed message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AddFeed + * @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): pyth_lazer_transaction.AddFeed; + + /** + * Decodes an AddFeed message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AddFeed + * @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)): pyth_lazer_transaction.AddFeed; + + /** + * Verifies an AddFeed 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 AddFeed message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AddFeed + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.AddFeed; + + /** + * Creates a plain object from an AddFeed message. Also converts values to other types if specified. + * @param message AddFeed + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.AddFeed, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AddFeed to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AddFeed + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateFeed. */ + interface IUpdateFeed { + + /** UpdateFeed feedId */ + feedId?: (number|null); + + /** UpdateFeed updateFeedMetadata */ + updateFeedMetadata?: (pyth_lazer_transaction.IUpdateFeedMetadata|null); + + /** UpdateFeed activateFeed */ + activateFeed?: (pyth_lazer_transaction.IActivateFeed|null); + + /** UpdateFeed deactivateFeed */ + deactivateFeed?: (pyth_lazer_transaction.IDeactivateFeed|null); + + /** UpdateFeed removeFeed */ + removeFeed?: (google.protobuf.IEmpty|null); + } + + /** Represents an UpdateFeed. */ + class UpdateFeed implements IUpdateFeed { + + /** + * Constructs a new UpdateFeed. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IUpdateFeed); + + /** UpdateFeed feedId. */ + public feedId?: (number|null); + + /** UpdateFeed updateFeedMetadata. */ + public updateFeedMetadata?: (pyth_lazer_transaction.IUpdateFeedMetadata|null); + + /** UpdateFeed activateFeed. */ + public activateFeed?: (pyth_lazer_transaction.IActivateFeed|null); + + /** UpdateFeed deactivateFeed. */ + public deactivateFeed?: (pyth_lazer_transaction.IDeactivateFeed|null); + + /** UpdateFeed removeFeed. */ + public removeFeed?: (google.protobuf.IEmpty|null); + + /** UpdateFeed _feedId. */ + public _feedId?: "feedId"; + + /** UpdateFeed action. */ + public action?: ("updateFeedMetadata"|"activateFeed"|"deactivateFeed"|"removeFeed"); + + /** + * Creates a new UpdateFeed instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateFeed instance + */ + public static create(properties?: pyth_lazer_transaction.IUpdateFeed): pyth_lazer_transaction.UpdateFeed; + + /** + * Encodes the specified UpdateFeed message. Does not implicitly {@link pyth_lazer_transaction.UpdateFeed.verify|verify} messages. + * @param message UpdateFeed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IUpdateFeed, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdateFeed.verify|verify} messages. + * @param message UpdateFeed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IUpdateFeed, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateFeed message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateFeed + * @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): pyth_lazer_transaction.UpdateFeed; + + /** + * Decodes an UpdateFeed message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateFeed + * @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)): pyth_lazer_transaction.UpdateFeed; + + /** + * Verifies an UpdateFeed 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 UpdateFeed message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateFeed + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.UpdateFeed; + + /** + * Creates a plain object from an UpdateFeed message. Also converts values to other types if specified. + * @param message UpdateFeed + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.UpdateFeed, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateFeed to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateFeed + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateFeedMetadata. */ + interface IUpdateFeedMetadata { + + /** UpdateFeedMetadata name */ + name?: (string|null); + + /** UpdateFeedMetadata value */ + value?: (pyth_lazer_transaction.IDynamicValue|null); + } + + /** Represents an UpdateFeedMetadata. */ + class UpdateFeedMetadata implements IUpdateFeedMetadata { + + /** + * Constructs a new UpdateFeedMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IUpdateFeedMetadata); + + /** UpdateFeedMetadata name. */ + public name?: (string|null); + + /** UpdateFeedMetadata value. */ + public value?: (pyth_lazer_transaction.IDynamicValue|null); + + /** UpdateFeedMetadata _name. */ + public _name?: "name"; + + /** UpdateFeedMetadata _value. */ + public _value?: "value"; + + /** + * Creates a new UpdateFeedMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateFeedMetadata instance + */ + public static create(properties?: pyth_lazer_transaction.IUpdateFeedMetadata): pyth_lazer_transaction.UpdateFeedMetadata; + + /** + * Encodes the specified UpdateFeedMetadata message. Does not implicitly {@link pyth_lazer_transaction.UpdateFeedMetadata.verify|verify} messages. + * @param message UpdateFeedMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IUpdateFeedMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateFeedMetadata message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdateFeedMetadata.verify|verify} messages. + * @param message UpdateFeedMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IUpdateFeedMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateFeedMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateFeedMetadata + * @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): pyth_lazer_transaction.UpdateFeedMetadata; + + /** + * Decodes an UpdateFeedMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateFeedMetadata + * @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)): pyth_lazer_transaction.UpdateFeedMetadata; + + /** + * Verifies an UpdateFeedMetadata 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 UpdateFeedMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateFeedMetadata + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.UpdateFeedMetadata; + + /** + * Creates a plain object from an UpdateFeedMetadata message. Also converts values to other types if specified. + * @param message UpdateFeedMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.UpdateFeedMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateFeedMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateFeedMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ActivateFeed. */ + interface IActivateFeed { + + /** ActivateFeed activationTimestamp */ + activationTimestamp?: (google.protobuf.ITimestamp|null); + } + + /** Represents an ActivateFeed. */ + class ActivateFeed implements IActivateFeed { + + /** + * Constructs a new ActivateFeed. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IActivateFeed); + + /** ActivateFeed activationTimestamp. */ + public activationTimestamp?: (google.protobuf.ITimestamp|null); + + /** ActivateFeed _activationTimestamp. */ + public _activationTimestamp?: "activationTimestamp"; + + /** + * Creates a new ActivateFeed instance using the specified properties. + * @param [properties] Properties to set + * @returns ActivateFeed instance + */ + public static create(properties?: pyth_lazer_transaction.IActivateFeed): pyth_lazer_transaction.ActivateFeed; + + /** + * Encodes the specified ActivateFeed message. Does not implicitly {@link pyth_lazer_transaction.ActivateFeed.verify|verify} messages. + * @param message ActivateFeed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IActivateFeed, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ActivateFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ActivateFeed.verify|verify} messages. + * @param message ActivateFeed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IActivateFeed, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ActivateFeed message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ActivateFeed + * @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): pyth_lazer_transaction.ActivateFeed; + + /** + * Decodes an ActivateFeed message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ActivateFeed + * @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)): pyth_lazer_transaction.ActivateFeed; + + /** + * Verifies an ActivateFeed 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 ActivateFeed message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ActivateFeed + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.ActivateFeed; + + /** + * Creates a plain object from an ActivateFeed message. Also converts values to other types if specified. + * @param message ActivateFeed + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.ActivateFeed, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ActivateFeed to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ActivateFeed + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeactivateFeed. */ + interface IDeactivateFeed { + + /** DeactivateFeed deactivationTimestamp */ + deactivationTimestamp?: (google.protobuf.ITimestamp|null); + } + + /** Represents a DeactivateFeed. */ + class DeactivateFeed implements IDeactivateFeed { + + /** + * Constructs a new DeactivateFeed. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IDeactivateFeed); + + /** DeactivateFeed deactivationTimestamp. */ + public deactivationTimestamp?: (google.protobuf.ITimestamp|null); + + /** DeactivateFeed _deactivationTimestamp. */ + public _deactivationTimestamp?: "deactivationTimestamp"; + + /** + * Creates a new DeactivateFeed instance using the specified properties. + * @param [properties] Properties to set + * @returns DeactivateFeed instance + */ + public static create(properties?: pyth_lazer_transaction.IDeactivateFeed): pyth_lazer_transaction.DeactivateFeed; + + /** + * Encodes the specified DeactivateFeed message. Does not implicitly {@link pyth_lazer_transaction.DeactivateFeed.verify|verify} messages. + * @param message DeactivateFeed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IDeactivateFeed, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeactivateFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DeactivateFeed.verify|verify} messages. + * @param message DeactivateFeed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IDeactivateFeed, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeactivateFeed message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeactivateFeed + * @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): pyth_lazer_transaction.DeactivateFeed; + + /** + * Decodes a DeactivateFeed message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeactivateFeed + * @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)): pyth_lazer_transaction.DeactivateFeed; + + /** + * Verifies a DeactivateFeed 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 DeactivateFeed message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeactivateFeed + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.DeactivateFeed; + + /** + * Creates a plain object from a DeactivateFeed message. Also converts values to other types if specified. + * @param message DeactivateFeed + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.DeactivateFeed, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeactivateFeed to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeactivateFeed + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DynamicValue. */ + interface IDynamicValue { + + /** DynamicValue stringValue */ + stringValue?: (string|null); + + /** DynamicValue doubleValue */ + doubleValue?: (number|null); + + /** DynamicValue uintValue */ + uintValue?: (number|Long|null); + + /** DynamicValue intValue */ + intValue?: (number|Long|null); + + /** DynamicValue boolValue */ + boolValue?: (boolean|null); + + /** DynamicValue bytesValue */ + bytesValue?: (Uint8Array|null); + + /** DynamicValue durationValue */ + durationValue?: (google.protobuf.IDuration|null); + + /** DynamicValue timestampValue */ + timestampValue?: (google.protobuf.ITimestamp|null); + + /** DynamicValue list */ + list?: (pyth_lazer_transaction.DynamicValue.IList|null); + + /** DynamicValue map */ + map?: (pyth_lazer_transaction.DynamicValue.IMap|null); + } + + /** Represents a DynamicValue. */ + class DynamicValue implements IDynamicValue { + + /** + * Constructs a new DynamicValue. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IDynamicValue); + + /** DynamicValue stringValue. */ + public stringValue?: (string|null); + + /** DynamicValue doubleValue. */ + public doubleValue?: (number|null); + + /** DynamicValue uintValue. */ + public uintValue?: (number|Long|null); + + /** DynamicValue intValue. */ + public intValue?: (number|Long|null); + + /** DynamicValue boolValue. */ + public boolValue?: (boolean|null); + + /** DynamicValue bytesValue. */ + public bytesValue?: (Uint8Array|null); + + /** DynamicValue durationValue. */ + public durationValue?: (google.protobuf.IDuration|null); + + /** DynamicValue timestampValue. */ + public timestampValue?: (google.protobuf.ITimestamp|null); + + /** DynamicValue list. */ + public list?: (pyth_lazer_transaction.DynamicValue.IList|null); + + /** DynamicValue map. */ + public map?: (pyth_lazer_transaction.DynamicValue.IMap|null); + + /** DynamicValue value. */ + public value?: ("stringValue"|"doubleValue"|"uintValue"|"intValue"|"boolValue"|"bytesValue"|"durationValue"|"timestampValue"|"list"|"map"); + + /** + * Creates a new DynamicValue instance using the specified properties. + * @param [properties] Properties to set + * @returns DynamicValue instance + */ + public static create(properties?: pyth_lazer_transaction.IDynamicValue): pyth_lazer_transaction.DynamicValue; + + /** + * Encodes the specified DynamicValue message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.verify|verify} messages. + * @param message DynamicValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IDynamicValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DynamicValue message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.verify|verify} messages. + * @param message DynamicValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IDynamicValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DynamicValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DynamicValue + * @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): pyth_lazer_transaction.DynamicValue; + + /** + * Decodes a DynamicValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DynamicValue + * @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)): pyth_lazer_transaction.DynamicValue; + + /** + * Verifies a DynamicValue 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 DynamicValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DynamicValue + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.DynamicValue; + + /** + * Creates a plain object from a DynamicValue message. Also converts values to other types if specified. + * @param message DynamicValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.DynamicValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DynamicValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DynamicValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DynamicValue { + + /** Properties of a List. */ + interface IList { + + /** List items */ + items?: (pyth_lazer_transaction.IDynamicValue[]|null); + } + + /** Represents a List. */ + class List implements IList { + + /** + * Constructs a new List. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.DynamicValue.IList); + + /** List items. */ + public items: pyth_lazer_transaction.IDynamicValue[]; + + /** + * Creates a new List instance using the specified properties. + * @param [properties] Properties to set + * @returns List instance + */ + public static create(properties?: pyth_lazer_transaction.DynamicValue.IList): pyth_lazer_transaction.DynamicValue.List; + + /** + * Encodes the specified List message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.List.verify|verify} messages. + * @param message List message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.DynamicValue.IList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified List message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.List.verify|verify} messages. + * @param message List message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.DynamicValue.IList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a List message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns List + * @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): pyth_lazer_transaction.DynamicValue.List; + + /** + * Decodes a List message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns List + * @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)): pyth_lazer_transaction.DynamicValue.List; + + /** + * Verifies a List 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 List message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns List + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.DynamicValue.List; + + /** + * Creates a plain object from a List message. Also converts values to other types if specified. + * @param message List + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.DynamicValue.List, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this List to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for List + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MapItem. */ + interface IMapItem { + + /** MapItem key */ + key?: (string|null); + + /** MapItem value */ + value?: (pyth_lazer_transaction.IDynamicValue|null); + } + + /** Represents a MapItem. */ + class MapItem implements IMapItem { + + /** + * Constructs a new MapItem. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.DynamicValue.IMapItem); + + /** MapItem key. */ + public key?: (string|null); + + /** MapItem value. */ + public value?: (pyth_lazer_transaction.IDynamicValue|null); + + /** MapItem _key. */ + public _key?: "key"; + + /** MapItem _value. */ + public _value?: "value"; + + /** + * Creates a new MapItem instance using the specified properties. + * @param [properties] Properties to set + * @returns MapItem instance + */ + public static create(properties?: pyth_lazer_transaction.DynamicValue.IMapItem): pyth_lazer_transaction.DynamicValue.MapItem; + + /** + * Encodes the specified MapItem message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.MapItem.verify|verify} messages. + * @param message MapItem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.DynamicValue.IMapItem, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MapItem message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.MapItem.verify|verify} messages. + * @param message MapItem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.DynamicValue.IMapItem, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MapItem message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MapItem + * @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): pyth_lazer_transaction.DynamicValue.MapItem; + + /** + * Decodes a MapItem message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MapItem + * @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)): pyth_lazer_transaction.DynamicValue.MapItem; + + /** + * Verifies a MapItem 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 MapItem message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MapItem + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.DynamicValue.MapItem; + + /** + * Creates a plain object from a MapItem message. Also converts values to other types if specified. + * @param message MapItem + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.DynamicValue.MapItem, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MapItem to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MapItem + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Map. */ + interface IMap { + + /** Map items */ + items?: (pyth_lazer_transaction.DynamicValue.IMapItem[]|null); + } + + /** Represents a Map. */ + class Map implements IMap { + + /** + * Constructs a new Map. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.DynamicValue.IMap); + + /** Map items. */ + public items: pyth_lazer_transaction.DynamicValue.IMapItem[]; + + /** + * Creates a new Map instance using the specified properties. + * @param [properties] Properties to set + * @returns Map instance + */ + public static create(properties?: pyth_lazer_transaction.DynamicValue.IMap): pyth_lazer_transaction.DynamicValue.Map; + + /** + * Encodes the specified Map message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.Map.verify|verify} messages. + * @param message Map message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.DynamicValue.IMap, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Map message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.Map.verify|verify} messages. + * @param message Map message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.DynamicValue.IMap, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Map message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Map + * @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): pyth_lazer_transaction.DynamicValue.Map; + + /** + * Decodes a Map message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Map + * @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)): pyth_lazer_transaction.DynamicValue.Map; + + /** + * Verifies a Map 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 Map message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Map + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.DynamicValue.Map; + + /** + * Creates a plain object from a Map message. Also converts values to other types if specified. + * @param message Map + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.DynamicValue.Map, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Map to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Map + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } +} + +/** Namespace google. */ +export namespace google { + + /** Namespace protobuf. */ + namespace protobuf { + + /** Properties of a Timestamp. */ + interface ITimestamp { + + /** Timestamp seconds */ + seconds?: (number|Long|null); + + /** Timestamp nanos */ + nanos?: (number|null); + } + + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { + + /** + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ITimestamp); + + /** Timestamp seconds. */ + public seconds: (number|Long); + + /** Timestamp nanos. */ + public nanos: number; + + /** + * Creates a new Timestamp instance using the specified properties. + * @param [properties] Properties to set + * @returns Timestamp instance + */ + public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Timestamp + * @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.Timestamp; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Timestamp + * @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.Timestamp; + + /** + * Verifies a Timestamp 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 Timestamp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Timestamp + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @param message Timestamp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Timestamp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Timestamp + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Duration. */ + interface IDuration { + + /** Duration seconds */ + seconds?: (number|Long|null); + + /** Duration nanos */ + nanos?: (number|null); + } + + /** Represents a Duration. */ + class Duration implements IDuration { + + /** + * Constructs a new Duration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDuration); + + /** Duration seconds. */ + public seconds: (number|Long); + + /** Duration nanos. */ + public nanos: number; + + /** + * Creates a new Duration instance using the specified properties. + * @param [properties] Properties to set + * @returns Duration instance + */ + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Duration + * @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.Duration; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Duration + * @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.Duration; + + /** + * Verifies a Duration 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 Duration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Duration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @param message Duration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Duration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Duration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** 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 }; + + /** + * Gets the default type url for Empty + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } +} diff --git a/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/generated/governance_instruction.js b/lazer/state_sdk/js/src/generated/governance_instruction.js similarity index 100% rename from governance/xc_admin/packages/xc_admin_common/src/programs/lazer/generated/governance_instruction.js rename to lazer/state_sdk/js/src/generated/governance_instruction.js diff --git a/lazer/state_sdk/js/src/generated/state.cjs b/lazer/state_sdk/js/src/generated/state.cjs new file mode 100644 index 0000000000..ac86ea91cf --- /dev/null +++ b/lazer/state_sdk/js/src/generated/state.cjs @@ -0,0 +1,3407 @@ +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +"use strict"; + +var $protobuf = require("protobufjs/minimal"); + +// Common aliases +var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + +// Exported root namespace +var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); + +$root.lazer = (function() { + + /** + * Namespace lazer. + * @exports lazer + * @namespace + */ + var lazer = {}; + + lazer.State = (function() { + + /** + * Properties of a State. + * @memberof lazer + * @interface IState + * @property {number|null} [shardId] State shardId + * @property {number|Long|null} [lastSequenceNo] State lastSequenceNo + * @property {google.protobuf.ITimestamp|null} [lastTimestamp] State lastTimestamp + * @property {string|null} [shardName] State shardName + * @property {google.protobuf.IDuration|null} [minRate] State minRate + * @property {Array.|null} [feeds] State feeds + * @property {Array.|null} [publishers] State publishers + */ + + /** + * Constructs a new State. + * @memberof lazer + * @classdesc Represents a State. + * @implements IState + * @constructor + * @param {lazer.IState=} [properties] Properties to set + */ + function State(properties) { + this.feeds = []; + this.publishers = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * State shardId. + * @member {number|null|undefined} shardId + * @memberof lazer.State + * @instance + */ + State.prototype.shardId = null; + + /** + * State lastSequenceNo. + * @member {number|Long|null|undefined} lastSequenceNo + * @memberof lazer.State + * @instance + */ + State.prototype.lastSequenceNo = null; + + /** + * State lastTimestamp. + * @member {google.protobuf.ITimestamp|null|undefined} lastTimestamp + * @memberof lazer.State + * @instance + */ + State.prototype.lastTimestamp = null; + + /** + * State shardName. + * @member {string|null|undefined} shardName + * @memberof lazer.State + * @instance + */ + State.prototype.shardName = null; + + /** + * State minRate. + * @member {google.protobuf.IDuration|null|undefined} minRate + * @memberof lazer.State + * @instance + */ + State.prototype.minRate = null; + + /** + * State feeds. + * @member {Array.} feeds + * @memberof lazer.State + * @instance + */ + State.prototype.feeds = $util.emptyArray; + + /** + * State publishers. + * @member {Array.} publishers + * @memberof lazer.State + * @instance + */ + State.prototype.publishers = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * State _shardId. + * @member {"shardId"|undefined} _shardId + * @memberof lazer.State + * @instance + */ + Object.defineProperty(State.prototype, "_shardId", { + get: $util.oneOfGetter($oneOfFields = ["shardId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * State _lastSequenceNo. + * @member {"lastSequenceNo"|undefined} _lastSequenceNo + * @memberof lazer.State + * @instance + */ + Object.defineProperty(State.prototype, "_lastSequenceNo", { + get: $util.oneOfGetter($oneOfFields = ["lastSequenceNo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * State _lastTimestamp. + * @member {"lastTimestamp"|undefined} _lastTimestamp + * @memberof lazer.State + * @instance + */ + Object.defineProperty(State.prototype, "_lastTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["lastTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * State _shardName. + * @member {"shardName"|undefined} _shardName + * @memberof lazer.State + * @instance + */ + Object.defineProperty(State.prototype, "_shardName", { + get: $util.oneOfGetter($oneOfFields = ["shardName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * State _minRate. + * @member {"minRate"|undefined} _minRate + * @memberof lazer.State + * @instance + */ + Object.defineProperty(State.prototype, "_minRate", { + get: $util.oneOfGetter($oneOfFields = ["minRate"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new State instance using the specified properties. + * @function create + * @memberof lazer.State + * @static + * @param {lazer.IState=} [properties] Properties to set + * @returns {lazer.State} State instance + */ + State.create = function create(properties) { + return new State(properties); + }; + + /** + * Encodes the specified State message. Does not implicitly {@link lazer.State.verify|verify} messages. + * @function encode + * @memberof lazer.State + * @static + * @param {lazer.IState} message State message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + State.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.shardId != null && Object.hasOwnProperty.call(message, "shardId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.shardId); + if (message.lastSequenceNo != null && Object.hasOwnProperty.call(message, "lastSequenceNo")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.lastSequenceNo); + if (message.lastTimestamp != null && Object.hasOwnProperty.call(message, "lastTimestamp")) + $root.google.protobuf.Timestamp.encode(message.lastTimestamp, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.shardName != null && Object.hasOwnProperty.call(message, "shardName")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.shardName); + if (message.minRate != null && Object.hasOwnProperty.call(message, "minRate")) + $root.google.protobuf.Duration.encode(message.minRate, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.feeds != null && message.feeds.length) + for (var i = 0; i < message.feeds.length; ++i) + $root.lazer.Feed.encode(message.feeds[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.publishers != null && message.publishers.length) + for (var i = 0; i < message.publishers.length; ++i) + $root.lazer.Publisher.encode(message.publishers[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified State message, length delimited. Does not implicitly {@link lazer.State.verify|verify} messages. + * @function encodeDelimited + * @memberof lazer.State + * @static + * @param {lazer.IState} message State message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + State.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a State message from the specified reader or buffer. + * @function decode + * @memberof lazer.State + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {lazer.State} State + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + State.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.lazer.State(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.shardId = reader.uint32(); + break; + } + case 2: { + message.lastSequenceNo = reader.uint64(); + break; + } + case 3: { + message.lastTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.shardName = reader.string(); + break; + } + case 5: { + message.minRate = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 7: { + if (!(message.feeds && message.feeds.length)) + message.feeds = []; + message.feeds.push($root.lazer.Feed.decode(reader, reader.uint32())); + break; + } + case 8: { + if (!(message.publishers && message.publishers.length)) + message.publishers = []; + message.publishers.push($root.lazer.Publisher.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a State message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof lazer.State + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {lazer.State} State + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + State.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a State message. + * @function verify + * @memberof lazer.State + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + State.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.shardId != null && message.hasOwnProperty("shardId")) { + properties._shardId = 1; + if (!$util.isInteger(message.shardId)) + return "shardId: integer expected"; + } + if (message.lastSequenceNo != null && message.hasOwnProperty("lastSequenceNo")) { + properties._lastSequenceNo = 1; + if (!$util.isInteger(message.lastSequenceNo) && !(message.lastSequenceNo && $util.isInteger(message.lastSequenceNo.low) && $util.isInteger(message.lastSequenceNo.high))) + return "lastSequenceNo: integer|Long expected"; + } + if (message.lastTimestamp != null && message.hasOwnProperty("lastTimestamp")) { + properties._lastTimestamp = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.lastTimestamp); + if (error) + return "lastTimestamp." + error; + } + } + if (message.shardName != null && message.hasOwnProperty("shardName")) { + properties._shardName = 1; + if (!$util.isString(message.shardName)) + return "shardName: string expected"; + } + if (message.minRate != null && message.hasOwnProperty("minRate")) { + properties._minRate = 1; + { + var error = $root.google.protobuf.Duration.verify(message.minRate); + if (error) + return "minRate." + error; + } + } + if (message.feeds != null && message.hasOwnProperty("feeds")) { + if (!Array.isArray(message.feeds)) + return "feeds: array expected"; + for (var i = 0; i < message.feeds.length; ++i) { + var error = $root.lazer.Feed.verify(message.feeds[i]); + if (error) + return "feeds." + error; + } + } + if (message.publishers != null && message.hasOwnProperty("publishers")) { + if (!Array.isArray(message.publishers)) + return "publishers: array expected"; + for (var i = 0; i < message.publishers.length; ++i) { + var error = $root.lazer.Publisher.verify(message.publishers[i]); + if (error) + return "publishers." + error; + } + } + return null; + }; + + /** + * Creates a State message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof lazer.State + * @static + * @param {Object.} object Plain object + * @returns {lazer.State} State + */ + State.fromObject = function fromObject(object) { + if (object instanceof $root.lazer.State) + return object; + var message = new $root.lazer.State(); + if (object.shardId != null) + message.shardId = object.shardId >>> 0; + if (object.lastSequenceNo != null) + if ($util.Long) + (message.lastSequenceNo = $util.Long.fromValue(object.lastSequenceNo)).unsigned = true; + else if (typeof object.lastSequenceNo === "string") + message.lastSequenceNo = parseInt(object.lastSequenceNo, 10); + else if (typeof object.lastSequenceNo === "number") + message.lastSequenceNo = object.lastSequenceNo; + else if (typeof object.lastSequenceNo === "object") + message.lastSequenceNo = new $util.LongBits(object.lastSequenceNo.low >>> 0, object.lastSequenceNo.high >>> 0).toNumber(true); + if (object.lastTimestamp != null) { + if (typeof object.lastTimestamp !== "object") + throw TypeError(".lazer.State.lastTimestamp: object expected"); + message.lastTimestamp = $root.google.protobuf.Timestamp.fromObject(object.lastTimestamp); + } + if (object.shardName != null) + message.shardName = String(object.shardName); + if (object.minRate != null) { + if (typeof object.minRate !== "object") + throw TypeError(".lazer.State.minRate: object expected"); + message.minRate = $root.google.protobuf.Duration.fromObject(object.minRate); + } + if (object.feeds) { + if (!Array.isArray(object.feeds)) + throw TypeError(".lazer.State.feeds: array expected"); + message.feeds = []; + for (var i = 0; i < object.feeds.length; ++i) { + if (typeof object.feeds[i] !== "object") + throw TypeError(".lazer.State.feeds: object expected"); + message.feeds[i] = $root.lazer.Feed.fromObject(object.feeds[i]); + } + } + if (object.publishers) { + if (!Array.isArray(object.publishers)) + throw TypeError(".lazer.State.publishers: array expected"); + message.publishers = []; + for (var i = 0; i < object.publishers.length; ++i) { + if (typeof object.publishers[i] !== "object") + throw TypeError(".lazer.State.publishers: object expected"); + message.publishers[i] = $root.lazer.Publisher.fromObject(object.publishers[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a State message. Also converts values to other types if specified. + * @function toObject + * @memberof lazer.State + * @static + * @param {lazer.State} message State + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + State.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.feeds = []; + object.publishers = []; + } + if (message.shardId != null && message.hasOwnProperty("shardId")) { + object.shardId = message.shardId; + if (options.oneofs) + object._shardId = "shardId"; + } + if (message.lastSequenceNo != null && message.hasOwnProperty("lastSequenceNo")) { + if (typeof message.lastSequenceNo === "number") + object.lastSequenceNo = options.longs === String ? String(message.lastSequenceNo) : message.lastSequenceNo; + else + object.lastSequenceNo = options.longs === String ? $util.Long.prototype.toString.call(message.lastSequenceNo) : options.longs === Number ? new $util.LongBits(message.lastSequenceNo.low >>> 0, message.lastSequenceNo.high >>> 0).toNumber(true) : message.lastSequenceNo; + if (options.oneofs) + object._lastSequenceNo = "lastSequenceNo"; + } + if (message.lastTimestamp != null && message.hasOwnProperty("lastTimestamp")) { + object.lastTimestamp = $root.google.protobuf.Timestamp.toObject(message.lastTimestamp, options); + if (options.oneofs) + object._lastTimestamp = "lastTimestamp"; + } + if (message.shardName != null && message.hasOwnProperty("shardName")) { + object.shardName = message.shardName; + if (options.oneofs) + object._shardName = "shardName"; + } + if (message.minRate != null && message.hasOwnProperty("minRate")) { + object.minRate = $root.google.protobuf.Duration.toObject(message.minRate, options); + if (options.oneofs) + object._minRate = "minRate"; + } + if (message.feeds && message.feeds.length) { + object.feeds = []; + for (var j = 0; j < message.feeds.length; ++j) + object.feeds[j] = $root.lazer.Feed.toObject(message.feeds[j], options); + } + if (message.publishers && message.publishers.length) { + object.publishers = []; + for (var j = 0; j < message.publishers.length; ++j) + object.publishers[j] = $root.lazer.Publisher.toObject(message.publishers[j], options); + } + return object; + }; + + /** + * Converts this State to JSON. + * @function toJSON + * @memberof lazer.State + * @instance + * @returns {Object.} JSON object + */ + State.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for State + * @function getTypeUrl + * @memberof lazer.State + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + State.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/lazer.State"; + }; + + return State; + })(); + + lazer.Publisher = (function() { + + /** + * Properties of a Publisher. + * @memberof lazer + * @interface IPublisher + * @property {number|null} [publisherId] Publisher publisherId + * @property {string|null} [name] Publisher name + * @property {Array.|null} [publicKeys] Publisher publicKeys + * @property {boolean|null} [isActive] Publisher isActive + */ + + /** + * Constructs a new Publisher. + * @memberof lazer + * @classdesc Represents a Publisher. + * @implements IPublisher + * @constructor + * @param {lazer.IPublisher=} [properties] Properties to set + */ + function Publisher(properties) { + this.publicKeys = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Publisher publisherId. + * @member {number|null|undefined} publisherId + * @memberof lazer.Publisher + * @instance + */ + Publisher.prototype.publisherId = null; + + /** + * Publisher name. + * @member {string|null|undefined} name + * @memberof lazer.Publisher + * @instance + */ + Publisher.prototype.name = null; + + /** + * Publisher publicKeys. + * @member {Array.} publicKeys + * @memberof lazer.Publisher + * @instance + */ + Publisher.prototype.publicKeys = $util.emptyArray; + + /** + * Publisher isActive. + * @member {boolean|null|undefined} isActive + * @memberof lazer.Publisher + * @instance + */ + Publisher.prototype.isActive = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Publisher _publisherId. + * @member {"publisherId"|undefined} _publisherId + * @memberof lazer.Publisher + * @instance + */ + Object.defineProperty(Publisher.prototype, "_publisherId", { + get: $util.oneOfGetter($oneOfFields = ["publisherId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Publisher _name. + * @member {"name"|undefined} _name + * @memberof lazer.Publisher + * @instance + */ + Object.defineProperty(Publisher.prototype, "_name", { + get: $util.oneOfGetter($oneOfFields = ["name"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Publisher _isActive. + * @member {"isActive"|undefined} _isActive + * @memberof lazer.Publisher + * @instance + */ + Object.defineProperty(Publisher.prototype, "_isActive", { + get: $util.oneOfGetter($oneOfFields = ["isActive"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Publisher instance using the specified properties. + * @function create + * @memberof lazer.Publisher + * @static + * @param {lazer.IPublisher=} [properties] Properties to set + * @returns {lazer.Publisher} Publisher instance + */ + Publisher.create = function create(properties) { + return new Publisher(properties); + }; + + /** + * Encodes the specified Publisher message. Does not implicitly {@link lazer.Publisher.verify|verify} messages. + * @function encode + * @memberof lazer.Publisher + * @static + * @param {lazer.IPublisher} message Publisher message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Publisher.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.publisherId != null && Object.hasOwnProperty.call(message, "publisherId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.publisherId); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); + if (message.publicKeys != null && message.publicKeys.length) + for (var i = 0; i < message.publicKeys.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.publicKeys[i]); + if (message.isActive != null && Object.hasOwnProperty.call(message, "isActive")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.isActive); + return writer; + }; + + /** + * Encodes the specified Publisher message, length delimited. Does not implicitly {@link lazer.Publisher.verify|verify} messages. + * @function encodeDelimited + * @memberof lazer.Publisher + * @static + * @param {lazer.IPublisher} message Publisher message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Publisher.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Publisher message from the specified reader or buffer. + * @function decode + * @memberof lazer.Publisher + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {lazer.Publisher} Publisher + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Publisher.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.lazer.Publisher(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.publisherId = reader.uint32(); + break; + } + case 2: { + message.name = reader.string(); + break; + } + case 3: { + if (!(message.publicKeys && message.publicKeys.length)) + message.publicKeys = []; + message.publicKeys.push(reader.bytes()); + break; + } + case 4: { + message.isActive = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Publisher message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof lazer.Publisher + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {lazer.Publisher} Publisher + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Publisher.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Publisher message. + * @function verify + * @memberof lazer.Publisher + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Publisher.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.publisherId != null && message.hasOwnProperty("publisherId")) { + properties._publisherId = 1; + if (!$util.isInteger(message.publisherId)) + return "publisherId: integer expected"; + } + if (message.name != null && message.hasOwnProperty("name")) { + properties._name = 1; + if (!$util.isString(message.name)) + return "name: string expected"; + } + if (message.publicKeys != null && message.hasOwnProperty("publicKeys")) { + if (!Array.isArray(message.publicKeys)) + return "publicKeys: array expected"; + for (var i = 0; i < message.publicKeys.length; ++i) + if (!(message.publicKeys[i] && typeof message.publicKeys[i].length === "number" || $util.isString(message.publicKeys[i]))) + return "publicKeys: buffer[] expected"; + } + if (message.isActive != null && message.hasOwnProperty("isActive")) { + properties._isActive = 1; + if (typeof message.isActive !== "boolean") + return "isActive: boolean expected"; + } + return null; + }; + + /** + * Creates a Publisher message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof lazer.Publisher + * @static + * @param {Object.} object Plain object + * @returns {lazer.Publisher} Publisher + */ + Publisher.fromObject = function fromObject(object) { + if (object instanceof $root.lazer.Publisher) + return object; + var message = new $root.lazer.Publisher(); + if (object.publisherId != null) + message.publisherId = object.publisherId >>> 0; + if (object.name != null) + message.name = String(object.name); + if (object.publicKeys) { + if (!Array.isArray(object.publicKeys)) + throw TypeError(".lazer.Publisher.publicKeys: array expected"); + message.publicKeys = []; + for (var i = 0; i < object.publicKeys.length; ++i) + if (typeof object.publicKeys[i] === "string") + $util.base64.decode(object.publicKeys[i], message.publicKeys[i] = $util.newBuffer($util.base64.length(object.publicKeys[i])), 0); + else if (object.publicKeys[i].length >= 0) + message.publicKeys[i] = object.publicKeys[i]; + } + if (object.isActive != null) + message.isActive = Boolean(object.isActive); + return message; + }; + + /** + * Creates a plain object from a Publisher message. Also converts values to other types if specified. + * @function toObject + * @memberof lazer.Publisher + * @static + * @param {lazer.Publisher} message Publisher + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Publisher.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.publicKeys = []; + if (message.publisherId != null && message.hasOwnProperty("publisherId")) { + object.publisherId = message.publisherId; + if (options.oneofs) + object._publisherId = "publisherId"; + } + if (message.name != null && message.hasOwnProperty("name")) { + object.name = message.name; + if (options.oneofs) + object._name = "name"; + } + if (message.publicKeys && message.publicKeys.length) { + object.publicKeys = []; + for (var j = 0; j < message.publicKeys.length; ++j) + object.publicKeys[j] = options.bytes === String ? $util.base64.encode(message.publicKeys[j], 0, message.publicKeys[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.publicKeys[j]) : message.publicKeys[j]; + } + if (message.isActive != null && message.hasOwnProperty("isActive")) { + object.isActive = message.isActive; + if (options.oneofs) + object._isActive = "isActive"; + } + return object; + }; + + /** + * Converts this Publisher to JSON. + * @function toJSON + * @memberof lazer.Publisher + * @instance + * @returns {Object.} JSON object + */ + Publisher.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Publisher + * @function getTypeUrl + * @memberof lazer.Publisher + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Publisher.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/lazer.Publisher"; + }; + + return Publisher; + })(); + + /** + * AssetType enum. + * @name lazer.AssetType + * @enum {number} + * @property {number} CRYPTO=0 CRYPTO value + * @property {number} FUNDING_RATE=1 FUNDING_RATE value + * @property {number} FX=2 FX value + * @property {number} COMMODITY=3 COMMODITY value + * @property {number} NAV=4 NAV value + * @property {number} CRYPTO_INDEX=5 CRYPTO_INDEX value + * @property {number} CRYPTO_REDEMPTION_RATE=6 CRYPTO_REDEMPTION_RATE value + * @property {number} EQUITY=7 EQUITY value + * @property {number} METAL=8 METAL value + * @property {number} RATES=9 RATES value + */ + lazer.AssetType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CRYPTO"] = 0; + values[valuesById[1] = "FUNDING_RATE"] = 1; + values[valuesById[2] = "FX"] = 2; + values[valuesById[3] = "COMMODITY"] = 3; + values[valuesById[4] = "NAV"] = 4; + values[valuesById[5] = "CRYPTO_INDEX"] = 5; + values[valuesById[6] = "CRYPTO_REDEMPTION_RATE"] = 6; + values[valuesById[7] = "EQUITY"] = 7; + values[valuesById[8] = "METAL"] = 8; + values[valuesById[9] = "RATES"] = 9; + return values; + })(); + + lazer.FeedMetadata = (function() { + + /** + * Properties of a FeedMetadata. + * @memberof lazer + * @interface IFeedMetadata + * @property {number|null} [priceFeedId] FeedMetadata priceFeedId + * @property {string|null} [name] FeedMetadata name + * @property {string|null} [symbol] FeedMetadata symbol + * @property {string|null} [description] FeedMetadata description + * @property {lazer.AssetType|null} [assetType] FeedMetadata assetType + * @property {number|null} [exponent] FeedMetadata exponent + * @property {number|null} [cmcId] FeedMetadata cmcId + * @property {google.protobuf.IDuration|null} [fundingRateInterval] FeedMetadata fundingRateInterval + * @property {number|null} [minPublishers] FeedMetadata minPublishers + * @property {google.protobuf.IDuration|null} [minRate] FeedMetadata minRate + * @property {google.protobuf.IDuration|null} [expiryTime] FeedMetadata expiryTime + * @property {boolean|null} [isActivated] FeedMetadata isActivated + * @property {string|null} [hermesId] FeedMetadata hermesId + * @property {string|null} [quoteCurrency] FeedMetadata quoteCurrency + * @property {string|null} [marketSchedule] FeedMetadata marketSchedule + */ + + /** + * Constructs a new FeedMetadata. + * @memberof lazer + * @classdesc Represents a FeedMetadata. + * @implements IFeedMetadata + * @constructor + * @param {lazer.IFeedMetadata=} [properties] Properties to set + */ + function FeedMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeedMetadata priceFeedId. + * @member {number|null|undefined} priceFeedId + * @memberof lazer.FeedMetadata + * @instance + */ + FeedMetadata.prototype.priceFeedId = null; + + /** + * FeedMetadata name. + * @member {string|null|undefined} name + * @memberof lazer.FeedMetadata + * @instance + */ + FeedMetadata.prototype.name = null; + + /** + * FeedMetadata symbol. + * @member {string|null|undefined} symbol + * @memberof lazer.FeedMetadata + * @instance + */ + FeedMetadata.prototype.symbol = null; + + /** + * FeedMetadata description. + * @member {string|null|undefined} description + * @memberof lazer.FeedMetadata + * @instance + */ + FeedMetadata.prototype.description = null; + + /** + * FeedMetadata assetType. + * @member {lazer.AssetType|null|undefined} assetType + * @memberof lazer.FeedMetadata + * @instance + */ + FeedMetadata.prototype.assetType = null; + + /** + * FeedMetadata exponent. + * @member {number|null|undefined} exponent + * @memberof lazer.FeedMetadata + * @instance + */ + FeedMetadata.prototype.exponent = null; + + /** + * FeedMetadata cmcId. + * @member {number|null|undefined} cmcId + * @memberof lazer.FeedMetadata + * @instance + */ + FeedMetadata.prototype.cmcId = null; + + /** + * FeedMetadata fundingRateInterval. + * @member {google.protobuf.IDuration|null|undefined} fundingRateInterval + * @memberof lazer.FeedMetadata + * @instance + */ + FeedMetadata.prototype.fundingRateInterval = null; + + /** + * FeedMetadata minPublishers. + * @member {number|null|undefined} minPublishers + * @memberof lazer.FeedMetadata + * @instance + */ + FeedMetadata.prototype.minPublishers = null; + + /** + * FeedMetadata minRate. + * @member {google.protobuf.IDuration|null|undefined} minRate + * @memberof lazer.FeedMetadata + * @instance + */ + FeedMetadata.prototype.minRate = null; + + /** + * FeedMetadata expiryTime. + * @member {google.protobuf.IDuration|null|undefined} expiryTime + * @memberof lazer.FeedMetadata + * @instance + */ + FeedMetadata.prototype.expiryTime = null; + + /** + * FeedMetadata isActivated. + * @member {boolean|null|undefined} isActivated + * @memberof lazer.FeedMetadata + * @instance + */ + FeedMetadata.prototype.isActivated = null; + + /** + * FeedMetadata hermesId. + * @member {string|null|undefined} hermesId + * @memberof lazer.FeedMetadata + * @instance + */ + FeedMetadata.prototype.hermesId = null; + + /** + * FeedMetadata quoteCurrency. + * @member {string|null|undefined} quoteCurrency + * @memberof lazer.FeedMetadata + * @instance + */ + FeedMetadata.prototype.quoteCurrency = null; + + /** + * FeedMetadata marketSchedule. + * @member {string|null|undefined} marketSchedule + * @memberof lazer.FeedMetadata + * @instance + */ + FeedMetadata.prototype.marketSchedule = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * FeedMetadata _priceFeedId. + * @member {"priceFeedId"|undefined} _priceFeedId + * @memberof lazer.FeedMetadata + * @instance + */ + Object.defineProperty(FeedMetadata.prototype, "_priceFeedId", { + get: $util.oneOfGetter($oneOfFields = ["priceFeedId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * FeedMetadata _name. + * @member {"name"|undefined} _name + * @memberof lazer.FeedMetadata + * @instance + */ + Object.defineProperty(FeedMetadata.prototype, "_name", { + get: $util.oneOfGetter($oneOfFields = ["name"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * FeedMetadata _symbol. + * @member {"symbol"|undefined} _symbol + * @memberof lazer.FeedMetadata + * @instance + */ + Object.defineProperty(FeedMetadata.prototype, "_symbol", { + get: $util.oneOfGetter($oneOfFields = ["symbol"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * FeedMetadata _description. + * @member {"description"|undefined} _description + * @memberof lazer.FeedMetadata + * @instance + */ + Object.defineProperty(FeedMetadata.prototype, "_description", { + get: $util.oneOfGetter($oneOfFields = ["description"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * FeedMetadata _assetType. + * @member {"assetType"|undefined} _assetType + * @memberof lazer.FeedMetadata + * @instance + */ + Object.defineProperty(FeedMetadata.prototype, "_assetType", { + get: $util.oneOfGetter($oneOfFields = ["assetType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * FeedMetadata _exponent. + * @member {"exponent"|undefined} _exponent + * @memberof lazer.FeedMetadata + * @instance + */ + Object.defineProperty(FeedMetadata.prototype, "_exponent", { + get: $util.oneOfGetter($oneOfFields = ["exponent"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * FeedMetadata _cmcId. + * @member {"cmcId"|undefined} _cmcId + * @memberof lazer.FeedMetadata + * @instance + */ + Object.defineProperty(FeedMetadata.prototype, "_cmcId", { + get: $util.oneOfGetter($oneOfFields = ["cmcId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * FeedMetadata _fundingRateInterval. + * @member {"fundingRateInterval"|undefined} _fundingRateInterval + * @memberof lazer.FeedMetadata + * @instance + */ + Object.defineProperty(FeedMetadata.prototype, "_fundingRateInterval", { + get: $util.oneOfGetter($oneOfFields = ["fundingRateInterval"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * FeedMetadata _minPublishers. + * @member {"minPublishers"|undefined} _minPublishers + * @memberof lazer.FeedMetadata + * @instance + */ + Object.defineProperty(FeedMetadata.prototype, "_minPublishers", { + get: $util.oneOfGetter($oneOfFields = ["minPublishers"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * FeedMetadata _minRate. + * @member {"minRate"|undefined} _minRate + * @memberof lazer.FeedMetadata + * @instance + */ + Object.defineProperty(FeedMetadata.prototype, "_minRate", { + get: $util.oneOfGetter($oneOfFields = ["minRate"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * FeedMetadata _expiryTime. + * @member {"expiryTime"|undefined} _expiryTime + * @memberof lazer.FeedMetadata + * @instance + */ + Object.defineProperty(FeedMetadata.prototype, "_expiryTime", { + get: $util.oneOfGetter($oneOfFields = ["expiryTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * FeedMetadata _isActivated. + * @member {"isActivated"|undefined} _isActivated + * @memberof lazer.FeedMetadata + * @instance + */ + Object.defineProperty(FeedMetadata.prototype, "_isActivated", { + get: $util.oneOfGetter($oneOfFields = ["isActivated"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * FeedMetadata _hermesId. + * @member {"hermesId"|undefined} _hermesId + * @memberof lazer.FeedMetadata + * @instance + */ + Object.defineProperty(FeedMetadata.prototype, "_hermesId", { + get: $util.oneOfGetter($oneOfFields = ["hermesId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * FeedMetadata _quoteCurrency. + * @member {"quoteCurrency"|undefined} _quoteCurrency + * @memberof lazer.FeedMetadata + * @instance + */ + Object.defineProperty(FeedMetadata.prototype, "_quoteCurrency", { + get: $util.oneOfGetter($oneOfFields = ["quoteCurrency"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * FeedMetadata _marketSchedule. + * @member {"marketSchedule"|undefined} _marketSchedule + * @memberof lazer.FeedMetadata + * @instance + */ + Object.defineProperty(FeedMetadata.prototype, "_marketSchedule", { + get: $util.oneOfGetter($oneOfFields = ["marketSchedule"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FeedMetadata instance using the specified properties. + * @function create + * @memberof lazer.FeedMetadata + * @static + * @param {lazer.IFeedMetadata=} [properties] Properties to set + * @returns {lazer.FeedMetadata} FeedMetadata instance + */ + FeedMetadata.create = function create(properties) { + return new FeedMetadata(properties); + }; + + /** + * Encodes the specified FeedMetadata message. Does not implicitly {@link lazer.FeedMetadata.verify|verify} messages. + * @function encode + * @memberof lazer.FeedMetadata + * @static + * @param {lazer.IFeedMetadata} message FeedMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeedMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.priceFeedId != null && Object.hasOwnProperty.call(message, "priceFeedId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.priceFeedId); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); + if (message.symbol != null && Object.hasOwnProperty.call(message, "symbol")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.symbol); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.description); + if (message.assetType != null && Object.hasOwnProperty.call(message, "assetType")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.assetType); + if (message.exponent != null && Object.hasOwnProperty.call(message, "exponent")) + writer.uint32(/* id 6, wireType 0 =*/48).sint32(message.exponent); + if (message.cmcId != null && Object.hasOwnProperty.call(message, "cmcId")) + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.cmcId); + if (message.fundingRateInterval != null && Object.hasOwnProperty.call(message, "fundingRateInterval")) + $root.google.protobuf.Duration.encode(message.fundingRateInterval, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.minPublishers != null && Object.hasOwnProperty.call(message, "minPublishers")) + writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.minPublishers); + if (message.minRate != null && Object.hasOwnProperty.call(message, "minRate")) + $root.google.protobuf.Duration.encode(message.minRate, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.expiryTime != null && Object.hasOwnProperty.call(message, "expiryTime")) + $root.google.protobuf.Duration.encode(message.expiryTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.isActivated != null && Object.hasOwnProperty.call(message, "isActivated")) + writer.uint32(/* id 12, wireType 0 =*/96).bool(message.isActivated); + if (message.hermesId != null && Object.hasOwnProperty.call(message, "hermesId")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.hermesId); + if (message.quoteCurrency != null && Object.hasOwnProperty.call(message, "quoteCurrency")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.quoteCurrency); + if (message.marketSchedule != null && Object.hasOwnProperty.call(message, "marketSchedule")) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.marketSchedule); + return writer; + }; + + /** + * Encodes the specified FeedMetadata message, length delimited. Does not implicitly {@link lazer.FeedMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof lazer.FeedMetadata + * @static + * @param {lazer.IFeedMetadata} message FeedMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeedMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeedMetadata message from the specified reader or buffer. + * @function decode + * @memberof lazer.FeedMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {lazer.FeedMetadata} FeedMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeedMetadata.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.lazer.FeedMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.priceFeedId = reader.uint32(); + break; + } + case 2: { + message.name = reader.string(); + break; + } + case 3: { + message.symbol = reader.string(); + break; + } + case 4: { + message.description = reader.string(); + break; + } + case 5: { + message.assetType = reader.int32(); + break; + } + case 6: { + message.exponent = reader.sint32(); + break; + } + case 7: { + message.cmcId = reader.uint32(); + break; + } + case 8: { + message.fundingRateInterval = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 9: { + message.minPublishers = reader.uint32(); + break; + } + case 10: { + message.minRate = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 11: { + message.expiryTime = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 12: { + message.isActivated = reader.bool(); + break; + } + case 13: { + message.hermesId = reader.string(); + break; + } + case 14: { + message.quoteCurrency = reader.string(); + break; + } + case 15: { + message.marketSchedule = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeedMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof lazer.FeedMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {lazer.FeedMetadata} FeedMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeedMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeedMetadata message. + * @function verify + * @memberof lazer.FeedMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeedMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.priceFeedId != null && message.hasOwnProperty("priceFeedId")) { + properties._priceFeedId = 1; + if (!$util.isInteger(message.priceFeedId)) + return "priceFeedId: integer expected"; + } + if (message.name != null && message.hasOwnProperty("name")) { + properties._name = 1; + if (!$util.isString(message.name)) + return "name: string expected"; + } + if (message.symbol != null && message.hasOwnProperty("symbol")) { + properties._symbol = 1; + if (!$util.isString(message.symbol)) + return "symbol: string expected"; + } + if (message.description != null && message.hasOwnProperty("description")) { + properties._description = 1; + if (!$util.isString(message.description)) + return "description: string expected"; + } + if (message.assetType != null && message.hasOwnProperty("assetType")) { + properties._assetType = 1; + switch (message.assetType) { + default: + return "assetType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + break; + } + } + if (message.exponent != null && message.hasOwnProperty("exponent")) { + properties._exponent = 1; + if (!$util.isInteger(message.exponent)) + return "exponent: integer expected"; + } + if (message.cmcId != null && message.hasOwnProperty("cmcId")) { + properties._cmcId = 1; + if (!$util.isInteger(message.cmcId)) + return "cmcId: integer expected"; + } + if (message.fundingRateInterval != null && message.hasOwnProperty("fundingRateInterval")) { + properties._fundingRateInterval = 1; + { + var error = $root.google.protobuf.Duration.verify(message.fundingRateInterval); + if (error) + return "fundingRateInterval." + error; + } + } + if (message.minPublishers != null && message.hasOwnProperty("minPublishers")) { + properties._minPublishers = 1; + if (!$util.isInteger(message.minPublishers)) + return "minPublishers: integer expected"; + } + if (message.minRate != null && message.hasOwnProperty("minRate")) { + properties._minRate = 1; + { + var error = $root.google.protobuf.Duration.verify(message.minRate); + if (error) + return "minRate." + error; + } + } + if (message.expiryTime != null && message.hasOwnProperty("expiryTime")) { + properties._expiryTime = 1; + { + var error = $root.google.protobuf.Duration.verify(message.expiryTime); + if (error) + return "expiryTime." + error; + } + } + if (message.isActivated != null && message.hasOwnProperty("isActivated")) { + properties._isActivated = 1; + if (typeof message.isActivated !== "boolean") + return "isActivated: boolean expected"; + } + if (message.hermesId != null && message.hasOwnProperty("hermesId")) { + properties._hermesId = 1; + if (!$util.isString(message.hermesId)) + return "hermesId: string expected"; + } + if (message.quoteCurrency != null && message.hasOwnProperty("quoteCurrency")) { + properties._quoteCurrency = 1; + if (!$util.isString(message.quoteCurrency)) + return "quoteCurrency: string expected"; + } + if (message.marketSchedule != null && message.hasOwnProperty("marketSchedule")) { + properties._marketSchedule = 1; + if (!$util.isString(message.marketSchedule)) + return "marketSchedule: string expected"; + } + return null; + }; + + /** + * Creates a FeedMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof lazer.FeedMetadata + * @static + * @param {Object.} object Plain object + * @returns {lazer.FeedMetadata} FeedMetadata + */ + FeedMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.lazer.FeedMetadata) + return object; + var message = new $root.lazer.FeedMetadata(); + if (object.priceFeedId != null) + message.priceFeedId = object.priceFeedId >>> 0; + if (object.name != null) + message.name = String(object.name); + if (object.symbol != null) + message.symbol = String(object.symbol); + if (object.description != null) + message.description = String(object.description); + switch (object.assetType) { + default: + if (typeof object.assetType === "number") { + message.assetType = object.assetType; + break; + } + break; + case "CRYPTO": + case 0: + message.assetType = 0; + break; + case "FUNDING_RATE": + case 1: + message.assetType = 1; + break; + case "FX": + case 2: + message.assetType = 2; + break; + case "COMMODITY": + case 3: + message.assetType = 3; + break; + case "NAV": + case 4: + message.assetType = 4; + break; + case "CRYPTO_INDEX": + case 5: + message.assetType = 5; + break; + case "CRYPTO_REDEMPTION_RATE": + case 6: + message.assetType = 6; + break; + case "EQUITY": + case 7: + message.assetType = 7; + break; + case "METAL": + case 8: + message.assetType = 8; + break; + case "RATES": + case 9: + message.assetType = 9; + break; + } + if (object.exponent != null) + message.exponent = object.exponent | 0; + if (object.cmcId != null) + message.cmcId = object.cmcId >>> 0; + if (object.fundingRateInterval != null) { + if (typeof object.fundingRateInterval !== "object") + throw TypeError(".lazer.FeedMetadata.fundingRateInterval: object expected"); + message.fundingRateInterval = $root.google.protobuf.Duration.fromObject(object.fundingRateInterval); + } + if (object.minPublishers != null) + message.minPublishers = object.minPublishers >>> 0; + if (object.minRate != null) { + if (typeof object.minRate !== "object") + throw TypeError(".lazer.FeedMetadata.minRate: object expected"); + message.minRate = $root.google.protobuf.Duration.fromObject(object.minRate); + } + if (object.expiryTime != null) { + if (typeof object.expiryTime !== "object") + throw TypeError(".lazer.FeedMetadata.expiryTime: object expected"); + message.expiryTime = $root.google.protobuf.Duration.fromObject(object.expiryTime); + } + if (object.isActivated != null) + message.isActivated = Boolean(object.isActivated); + if (object.hermesId != null) + message.hermesId = String(object.hermesId); + if (object.quoteCurrency != null) + message.quoteCurrency = String(object.quoteCurrency); + if (object.marketSchedule != null) + message.marketSchedule = String(object.marketSchedule); + return message; + }; + + /** + * Creates a plain object from a FeedMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof lazer.FeedMetadata + * @static + * @param {lazer.FeedMetadata} message FeedMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeedMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.priceFeedId != null && message.hasOwnProperty("priceFeedId")) { + object.priceFeedId = message.priceFeedId; + if (options.oneofs) + object._priceFeedId = "priceFeedId"; + } + if (message.name != null && message.hasOwnProperty("name")) { + object.name = message.name; + if (options.oneofs) + object._name = "name"; + } + if (message.symbol != null && message.hasOwnProperty("symbol")) { + object.symbol = message.symbol; + if (options.oneofs) + object._symbol = "symbol"; + } + if (message.description != null && message.hasOwnProperty("description")) { + object.description = message.description; + if (options.oneofs) + object._description = "description"; + } + if (message.assetType != null && message.hasOwnProperty("assetType")) { + object.assetType = options.enums === String ? $root.lazer.AssetType[message.assetType] === undefined ? message.assetType : $root.lazer.AssetType[message.assetType] : message.assetType; + if (options.oneofs) + object._assetType = "assetType"; + } + if (message.exponent != null && message.hasOwnProperty("exponent")) { + object.exponent = message.exponent; + if (options.oneofs) + object._exponent = "exponent"; + } + if (message.cmcId != null && message.hasOwnProperty("cmcId")) { + object.cmcId = message.cmcId; + if (options.oneofs) + object._cmcId = "cmcId"; + } + if (message.fundingRateInterval != null && message.hasOwnProperty("fundingRateInterval")) { + object.fundingRateInterval = $root.google.protobuf.Duration.toObject(message.fundingRateInterval, options); + if (options.oneofs) + object._fundingRateInterval = "fundingRateInterval"; + } + if (message.minPublishers != null && message.hasOwnProperty("minPublishers")) { + object.minPublishers = message.minPublishers; + if (options.oneofs) + object._minPublishers = "minPublishers"; + } + if (message.minRate != null && message.hasOwnProperty("minRate")) { + object.minRate = $root.google.protobuf.Duration.toObject(message.minRate, options); + if (options.oneofs) + object._minRate = "minRate"; + } + if (message.expiryTime != null && message.hasOwnProperty("expiryTime")) { + object.expiryTime = $root.google.protobuf.Duration.toObject(message.expiryTime, options); + if (options.oneofs) + object._expiryTime = "expiryTime"; + } + if (message.isActivated != null && message.hasOwnProperty("isActivated")) { + object.isActivated = message.isActivated; + if (options.oneofs) + object._isActivated = "isActivated"; + } + if (message.hermesId != null && message.hasOwnProperty("hermesId")) { + object.hermesId = message.hermesId; + if (options.oneofs) + object._hermesId = "hermesId"; + } + if (message.quoteCurrency != null && message.hasOwnProperty("quoteCurrency")) { + object.quoteCurrency = message.quoteCurrency; + if (options.oneofs) + object._quoteCurrency = "quoteCurrency"; + } + if (message.marketSchedule != null && message.hasOwnProperty("marketSchedule")) { + object.marketSchedule = message.marketSchedule; + if (options.oneofs) + object._marketSchedule = "marketSchedule"; + } + return object; + }; + + /** + * Converts this FeedMetadata to JSON. + * @function toJSON + * @memberof lazer.FeedMetadata + * @instance + * @returns {Object.} JSON object + */ + FeedMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeedMetadata + * @function getTypeUrl + * @memberof lazer.FeedMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeedMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/lazer.FeedMetadata"; + }; + + return FeedMetadata; + })(); + + lazer.Feed = (function() { + + /** + * Properties of a Feed. + * @memberof lazer + * @interface IFeed + * @property {lazer.IFeedMetadata|null} [metadata] Feed metadata + * @property {google.protobuf.ITimestamp|null} [pendingActivation] Feed pendingActivation + * @property {google.protobuf.ITimestamp|null} [pendingDeactivation] Feed pendingDeactivation + * @property {Array.|null} [perPublisher] Feed perPublisher + */ + + /** + * Constructs a new Feed. + * @memberof lazer + * @classdesc Represents a Feed. + * @implements IFeed + * @constructor + * @param {lazer.IFeed=} [properties] Properties to set + */ + function Feed(properties) { + this.perPublisher = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Feed metadata. + * @member {lazer.IFeedMetadata|null|undefined} metadata + * @memberof lazer.Feed + * @instance + */ + Feed.prototype.metadata = null; + + /** + * Feed pendingActivation. + * @member {google.protobuf.ITimestamp|null|undefined} pendingActivation + * @memberof lazer.Feed + * @instance + */ + Feed.prototype.pendingActivation = null; + + /** + * Feed pendingDeactivation. + * @member {google.protobuf.ITimestamp|null|undefined} pendingDeactivation + * @memberof lazer.Feed + * @instance + */ + Feed.prototype.pendingDeactivation = null; + + /** + * Feed perPublisher. + * @member {Array.} perPublisher + * @memberof lazer.Feed + * @instance + */ + Feed.prototype.perPublisher = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Feed _metadata. + * @member {"metadata"|undefined} _metadata + * @memberof lazer.Feed + * @instance + */ + Object.defineProperty(Feed.prototype, "_metadata", { + get: $util.oneOfGetter($oneOfFields = ["metadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Feed _pendingActivation. + * @member {"pendingActivation"|undefined} _pendingActivation + * @memberof lazer.Feed + * @instance + */ + Object.defineProperty(Feed.prototype, "_pendingActivation", { + get: $util.oneOfGetter($oneOfFields = ["pendingActivation"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Feed _pendingDeactivation. + * @member {"pendingDeactivation"|undefined} _pendingDeactivation + * @memberof lazer.Feed + * @instance + */ + Object.defineProperty(Feed.prototype, "_pendingDeactivation", { + get: $util.oneOfGetter($oneOfFields = ["pendingDeactivation"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Feed instance using the specified properties. + * @function create + * @memberof lazer.Feed + * @static + * @param {lazer.IFeed=} [properties] Properties to set + * @returns {lazer.Feed} Feed instance + */ + Feed.create = function create(properties) { + return new Feed(properties); + }; + + /** + * Encodes the specified Feed message. Does not implicitly {@link lazer.Feed.verify|verify} messages. + * @function encode + * @memberof lazer.Feed + * @static + * @param {lazer.IFeed} message Feed message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Feed.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.lazer.FeedMetadata.encode(message.metadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pendingActivation != null && Object.hasOwnProperty.call(message, "pendingActivation")) + $root.google.protobuf.Timestamp.encode(message.pendingActivation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.pendingDeactivation != null && Object.hasOwnProperty.call(message, "pendingDeactivation")) + $root.google.protobuf.Timestamp.encode(message.pendingDeactivation, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.perPublisher != null && message.perPublisher.length) + for (var i = 0; i < message.perPublisher.length; ++i) + $root.lazer.FeedPublisherState.encode(message.perPublisher[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Feed message, length delimited. Does not implicitly {@link lazer.Feed.verify|verify} messages. + * @function encodeDelimited + * @memberof lazer.Feed + * @static + * @param {lazer.IFeed} message Feed message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Feed.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Feed message from the specified reader or buffer. + * @function decode + * @memberof lazer.Feed + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {lazer.Feed} Feed + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Feed.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.lazer.Feed(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.metadata = $root.lazer.FeedMetadata.decode(reader, reader.uint32()); + break; + } + case 2: { + message.pendingActivation = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.pendingDeactivation = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.perPublisher && message.perPublisher.length)) + message.perPublisher = []; + message.perPublisher.push($root.lazer.FeedPublisherState.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Feed message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof lazer.Feed + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {lazer.Feed} Feed + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Feed.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Feed message. + * @function verify + * @memberof lazer.Feed + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Feed.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + properties._metadata = 1; + { + var error = $root.lazer.FeedMetadata.verify(message.metadata); + if (error) + return "metadata." + error; + } + } + if (message.pendingActivation != null && message.hasOwnProperty("pendingActivation")) { + properties._pendingActivation = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.pendingActivation); + if (error) + return "pendingActivation." + error; + } + } + if (message.pendingDeactivation != null && message.hasOwnProperty("pendingDeactivation")) { + properties._pendingDeactivation = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.pendingDeactivation); + if (error) + return "pendingDeactivation." + error; + } + } + if (message.perPublisher != null && message.hasOwnProperty("perPublisher")) { + if (!Array.isArray(message.perPublisher)) + return "perPublisher: array expected"; + for (var i = 0; i < message.perPublisher.length; ++i) { + var error = $root.lazer.FeedPublisherState.verify(message.perPublisher[i]); + if (error) + return "perPublisher." + error; + } + } + return null; + }; + + /** + * Creates a Feed message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof lazer.Feed + * @static + * @param {Object.} object Plain object + * @returns {lazer.Feed} Feed + */ + Feed.fromObject = function fromObject(object) { + if (object instanceof $root.lazer.Feed) + return object; + var message = new $root.lazer.Feed(); + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".lazer.Feed.metadata: object expected"); + message.metadata = $root.lazer.FeedMetadata.fromObject(object.metadata); + } + if (object.pendingActivation != null) { + if (typeof object.pendingActivation !== "object") + throw TypeError(".lazer.Feed.pendingActivation: object expected"); + message.pendingActivation = $root.google.protobuf.Timestamp.fromObject(object.pendingActivation); + } + if (object.pendingDeactivation != null) { + if (typeof object.pendingDeactivation !== "object") + throw TypeError(".lazer.Feed.pendingDeactivation: object expected"); + message.pendingDeactivation = $root.google.protobuf.Timestamp.fromObject(object.pendingDeactivation); + } + if (object.perPublisher) { + if (!Array.isArray(object.perPublisher)) + throw TypeError(".lazer.Feed.perPublisher: array expected"); + message.perPublisher = []; + for (var i = 0; i < object.perPublisher.length; ++i) { + if (typeof object.perPublisher[i] !== "object") + throw TypeError(".lazer.Feed.perPublisher: object expected"); + message.perPublisher[i] = $root.lazer.FeedPublisherState.fromObject(object.perPublisher[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Feed message. Also converts values to other types if specified. + * @function toObject + * @memberof lazer.Feed + * @static + * @param {lazer.Feed} message Feed + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Feed.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.perPublisher = []; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + object.metadata = $root.lazer.FeedMetadata.toObject(message.metadata, options); + if (options.oneofs) + object._metadata = "metadata"; + } + if (message.pendingActivation != null && message.hasOwnProperty("pendingActivation")) { + object.pendingActivation = $root.google.protobuf.Timestamp.toObject(message.pendingActivation, options); + if (options.oneofs) + object._pendingActivation = "pendingActivation"; + } + if (message.pendingDeactivation != null && message.hasOwnProperty("pendingDeactivation")) { + object.pendingDeactivation = $root.google.protobuf.Timestamp.toObject(message.pendingDeactivation, options); + if (options.oneofs) + object._pendingDeactivation = "pendingDeactivation"; + } + if (message.perPublisher && message.perPublisher.length) { + object.perPublisher = []; + for (var j = 0; j < message.perPublisher.length; ++j) + object.perPublisher[j] = $root.lazer.FeedPublisherState.toObject(message.perPublisher[j], options); + } + return object; + }; + + /** + * Converts this Feed to JSON. + * @function toJSON + * @memberof lazer.Feed + * @instance + * @returns {Object.} JSON object + */ + Feed.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Feed + * @function getTypeUrl + * @memberof lazer.Feed + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Feed.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/lazer.Feed"; + }; + + return Feed; + })(); + + lazer.FeedPublisherState = (function() { + + /** + * Properties of a FeedPublisherState. + * @memberof lazer + * @interface IFeedPublisherState + * @property {number|null} [publisherId] FeedPublisherState publisherId + * @property {google.protobuf.ITimestamp|null} [lastUpdateTimestamp] FeedPublisherState lastUpdateTimestamp + * @property {google.protobuf.ITimestamp|null} [lastPublisherTimestamp] FeedPublisherState lastPublisherTimestamp + * @property {lazer.IFeedData|null} [lastFeedData] FeedPublisherState lastFeedData + */ + + /** + * Constructs a new FeedPublisherState. + * @memberof lazer + * @classdesc Represents a FeedPublisherState. + * @implements IFeedPublisherState + * @constructor + * @param {lazer.IFeedPublisherState=} [properties] Properties to set + */ + function FeedPublisherState(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeedPublisherState publisherId. + * @member {number|null|undefined} publisherId + * @memberof lazer.FeedPublisherState + * @instance + */ + FeedPublisherState.prototype.publisherId = null; + + /** + * FeedPublisherState lastUpdateTimestamp. + * @member {google.protobuf.ITimestamp|null|undefined} lastUpdateTimestamp + * @memberof lazer.FeedPublisherState + * @instance + */ + FeedPublisherState.prototype.lastUpdateTimestamp = null; + + /** + * FeedPublisherState lastPublisherTimestamp. + * @member {google.protobuf.ITimestamp|null|undefined} lastPublisherTimestamp + * @memberof lazer.FeedPublisherState + * @instance + */ + FeedPublisherState.prototype.lastPublisherTimestamp = null; + + /** + * FeedPublisherState lastFeedData. + * @member {lazer.IFeedData|null|undefined} lastFeedData + * @memberof lazer.FeedPublisherState + * @instance + */ + FeedPublisherState.prototype.lastFeedData = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * FeedPublisherState _publisherId. + * @member {"publisherId"|undefined} _publisherId + * @memberof lazer.FeedPublisherState + * @instance + */ + Object.defineProperty(FeedPublisherState.prototype, "_publisherId", { + get: $util.oneOfGetter($oneOfFields = ["publisherId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * FeedPublisherState _lastUpdateTimestamp. + * @member {"lastUpdateTimestamp"|undefined} _lastUpdateTimestamp + * @memberof lazer.FeedPublisherState + * @instance + */ + Object.defineProperty(FeedPublisherState.prototype, "_lastUpdateTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["lastUpdateTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * FeedPublisherState _lastPublisherTimestamp. + * @member {"lastPublisherTimestamp"|undefined} _lastPublisherTimestamp + * @memberof lazer.FeedPublisherState + * @instance + */ + Object.defineProperty(FeedPublisherState.prototype, "_lastPublisherTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["lastPublisherTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * FeedPublisherState _lastFeedData. + * @member {"lastFeedData"|undefined} _lastFeedData + * @memberof lazer.FeedPublisherState + * @instance + */ + Object.defineProperty(FeedPublisherState.prototype, "_lastFeedData", { + get: $util.oneOfGetter($oneOfFields = ["lastFeedData"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FeedPublisherState instance using the specified properties. + * @function create + * @memberof lazer.FeedPublisherState + * @static + * @param {lazer.IFeedPublisherState=} [properties] Properties to set + * @returns {lazer.FeedPublisherState} FeedPublisherState instance + */ + FeedPublisherState.create = function create(properties) { + return new FeedPublisherState(properties); + }; + + /** + * Encodes the specified FeedPublisherState message. Does not implicitly {@link lazer.FeedPublisherState.verify|verify} messages. + * @function encode + * @memberof lazer.FeedPublisherState + * @static + * @param {lazer.IFeedPublisherState} message FeedPublisherState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeedPublisherState.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.publisherId != null && Object.hasOwnProperty.call(message, "publisherId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.publisherId); + if (message.lastUpdateTimestamp != null && Object.hasOwnProperty.call(message, "lastUpdateTimestamp")) + $root.google.protobuf.Timestamp.encode(message.lastUpdateTimestamp, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.lastPublisherTimestamp != null && Object.hasOwnProperty.call(message, "lastPublisherTimestamp")) + $root.google.protobuf.Timestamp.encode(message.lastPublisherTimestamp, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.lastFeedData != null && Object.hasOwnProperty.call(message, "lastFeedData")) + $root.lazer.FeedData.encode(message.lastFeedData, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FeedPublisherState message, length delimited. Does not implicitly {@link lazer.FeedPublisherState.verify|verify} messages. + * @function encodeDelimited + * @memberof lazer.FeedPublisherState + * @static + * @param {lazer.IFeedPublisherState} message FeedPublisherState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeedPublisherState.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeedPublisherState message from the specified reader or buffer. + * @function decode + * @memberof lazer.FeedPublisherState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {lazer.FeedPublisherState} FeedPublisherState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeedPublisherState.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.lazer.FeedPublisherState(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.publisherId = reader.uint32(); + break; + } + case 2: { + message.lastUpdateTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.lastPublisherTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.lastFeedData = $root.lazer.FeedData.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeedPublisherState message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof lazer.FeedPublisherState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {lazer.FeedPublisherState} FeedPublisherState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeedPublisherState.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeedPublisherState message. + * @function verify + * @memberof lazer.FeedPublisherState + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeedPublisherState.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.publisherId != null && message.hasOwnProperty("publisherId")) { + properties._publisherId = 1; + if (!$util.isInteger(message.publisherId)) + return "publisherId: integer expected"; + } + if (message.lastUpdateTimestamp != null && message.hasOwnProperty("lastUpdateTimestamp")) { + properties._lastUpdateTimestamp = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.lastUpdateTimestamp); + if (error) + return "lastUpdateTimestamp." + error; + } + } + if (message.lastPublisherTimestamp != null && message.hasOwnProperty("lastPublisherTimestamp")) { + properties._lastPublisherTimestamp = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.lastPublisherTimestamp); + if (error) + return "lastPublisherTimestamp." + error; + } + } + if (message.lastFeedData != null && message.hasOwnProperty("lastFeedData")) { + properties._lastFeedData = 1; + { + var error = $root.lazer.FeedData.verify(message.lastFeedData); + if (error) + return "lastFeedData." + error; + } + } + return null; + }; + + /** + * Creates a FeedPublisherState message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof lazer.FeedPublisherState + * @static + * @param {Object.} object Plain object + * @returns {lazer.FeedPublisherState} FeedPublisherState + */ + FeedPublisherState.fromObject = function fromObject(object) { + if (object instanceof $root.lazer.FeedPublisherState) + return object; + var message = new $root.lazer.FeedPublisherState(); + if (object.publisherId != null) + message.publisherId = object.publisherId >>> 0; + if (object.lastUpdateTimestamp != null) { + if (typeof object.lastUpdateTimestamp !== "object") + throw TypeError(".lazer.FeedPublisherState.lastUpdateTimestamp: object expected"); + message.lastUpdateTimestamp = $root.google.protobuf.Timestamp.fromObject(object.lastUpdateTimestamp); + } + if (object.lastPublisherTimestamp != null) { + if (typeof object.lastPublisherTimestamp !== "object") + throw TypeError(".lazer.FeedPublisherState.lastPublisherTimestamp: object expected"); + message.lastPublisherTimestamp = $root.google.protobuf.Timestamp.fromObject(object.lastPublisherTimestamp); + } + if (object.lastFeedData != null) { + if (typeof object.lastFeedData !== "object") + throw TypeError(".lazer.FeedPublisherState.lastFeedData: object expected"); + message.lastFeedData = $root.lazer.FeedData.fromObject(object.lastFeedData); + } + return message; + }; + + /** + * Creates a plain object from a FeedPublisherState message. Also converts values to other types if specified. + * @function toObject + * @memberof lazer.FeedPublisherState + * @static + * @param {lazer.FeedPublisherState} message FeedPublisherState + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeedPublisherState.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.publisherId != null && message.hasOwnProperty("publisherId")) { + object.publisherId = message.publisherId; + if (options.oneofs) + object._publisherId = "publisherId"; + } + if (message.lastUpdateTimestamp != null && message.hasOwnProperty("lastUpdateTimestamp")) { + object.lastUpdateTimestamp = $root.google.protobuf.Timestamp.toObject(message.lastUpdateTimestamp, options); + if (options.oneofs) + object._lastUpdateTimestamp = "lastUpdateTimestamp"; + } + if (message.lastPublisherTimestamp != null && message.hasOwnProperty("lastPublisherTimestamp")) { + object.lastPublisherTimestamp = $root.google.protobuf.Timestamp.toObject(message.lastPublisherTimestamp, options); + if (options.oneofs) + object._lastPublisherTimestamp = "lastPublisherTimestamp"; + } + if (message.lastFeedData != null && message.hasOwnProperty("lastFeedData")) { + object.lastFeedData = $root.lazer.FeedData.toObject(message.lastFeedData, options); + if (options.oneofs) + object._lastFeedData = "lastFeedData"; + } + return object; + }; + + /** + * Converts this FeedPublisherState to JSON. + * @function toJSON + * @memberof lazer.FeedPublisherState + * @instance + * @returns {Object.} JSON object + */ + FeedPublisherState.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeedPublisherState + * @function getTypeUrl + * @memberof lazer.FeedPublisherState + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeedPublisherState.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/lazer.FeedPublisherState"; + }; + + return FeedPublisherState; + })(); + + lazer.FeedData = (function() { + + /** + * Properties of a FeedData. + * @memberof lazer + * @interface IFeedData + * @property {google.protobuf.ITimestamp|null} [sourceTimestamp] FeedData sourceTimestamp + * @property {google.protobuf.ITimestamp|null} [publisherTimestamp] FeedData publisherTimestamp + * @property {number|Long|null} [price] FeedData price + * @property {number|Long|null} [bestBidPrice] FeedData bestBidPrice + * @property {number|Long|null} [bestAskPrice] FeedData bestAskPrice + * @property {number|Long|null} [fundingRate] FeedData fundingRate + */ + + /** + * Constructs a new FeedData. + * @memberof lazer + * @classdesc Represents a FeedData. + * @implements IFeedData + * @constructor + * @param {lazer.IFeedData=} [properties] Properties to set + */ + function FeedData(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeedData sourceTimestamp. + * @member {google.protobuf.ITimestamp|null|undefined} sourceTimestamp + * @memberof lazer.FeedData + * @instance + */ + FeedData.prototype.sourceTimestamp = null; + + /** + * FeedData publisherTimestamp. + * @member {google.protobuf.ITimestamp|null|undefined} publisherTimestamp + * @memberof lazer.FeedData + * @instance + */ + FeedData.prototype.publisherTimestamp = null; + + /** + * FeedData price. + * @member {number|Long|null|undefined} price + * @memberof lazer.FeedData + * @instance + */ + FeedData.prototype.price = null; + + /** + * FeedData bestBidPrice. + * @member {number|Long|null|undefined} bestBidPrice + * @memberof lazer.FeedData + * @instance + */ + FeedData.prototype.bestBidPrice = null; + + /** + * FeedData bestAskPrice. + * @member {number|Long|null|undefined} bestAskPrice + * @memberof lazer.FeedData + * @instance + */ + FeedData.prototype.bestAskPrice = null; + + /** + * FeedData fundingRate. + * @member {number|Long|null|undefined} fundingRate + * @memberof lazer.FeedData + * @instance + */ + FeedData.prototype.fundingRate = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * FeedData _sourceTimestamp. + * @member {"sourceTimestamp"|undefined} _sourceTimestamp + * @memberof lazer.FeedData + * @instance + */ + Object.defineProperty(FeedData.prototype, "_sourceTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["sourceTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * FeedData _publisherTimestamp. + * @member {"publisherTimestamp"|undefined} _publisherTimestamp + * @memberof lazer.FeedData + * @instance + */ + Object.defineProperty(FeedData.prototype, "_publisherTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["publisherTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * FeedData _price. + * @member {"price"|undefined} _price + * @memberof lazer.FeedData + * @instance + */ + Object.defineProperty(FeedData.prototype, "_price", { + get: $util.oneOfGetter($oneOfFields = ["price"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * FeedData _bestBidPrice. + * @member {"bestBidPrice"|undefined} _bestBidPrice + * @memberof lazer.FeedData + * @instance + */ + Object.defineProperty(FeedData.prototype, "_bestBidPrice", { + get: $util.oneOfGetter($oneOfFields = ["bestBidPrice"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * FeedData _bestAskPrice. + * @member {"bestAskPrice"|undefined} _bestAskPrice + * @memberof lazer.FeedData + * @instance + */ + Object.defineProperty(FeedData.prototype, "_bestAskPrice", { + get: $util.oneOfGetter($oneOfFields = ["bestAskPrice"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * FeedData _fundingRate. + * @member {"fundingRate"|undefined} _fundingRate + * @memberof lazer.FeedData + * @instance + */ + Object.defineProperty(FeedData.prototype, "_fundingRate", { + get: $util.oneOfGetter($oneOfFields = ["fundingRate"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FeedData instance using the specified properties. + * @function create + * @memberof lazer.FeedData + * @static + * @param {lazer.IFeedData=} [properties] Properties to set + * @returns {lazer.FeedData} FeedData instance + */ + FeedData.create = function create(properties) { + return new FeedData(properties); + }; + + /** + * Encodes the specified FeedData message. Does not implicitly {@link lazer.FeedData.verify|verify} messages. + * @function encode + * @memberof lazer.FeedData + * @static + * @param {lazer.IFeedData} message FeedData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeedData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sourceTimestamp != null && Object.hasOwnProperty.call(message, "sourceTimestamp")) + $root.google.protobuf.Timestamp.encode(message.sourceTimestamp, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.publisherTimestamp != null && Object.hasOwnProperty.call(message, "publisherTimestamp")) + $root.google.protobuf.Timestamp.encode(message.publisherTimestamp, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.price != null && Object.hasOwnProperty.call(message, "price")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.price); + if (message.bestBidPrice != null && Object.hasOwnProperty.call(message, "bestBidPrice")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.bestBidPrice); + if (message.bestAskPrice != null && Object.hasOwnProperty.call(message, "bestAskPrice")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.bestAskPrice); + if (message.fundingRate != null && Object.hasOwnProperty.call(message, "fundingRate")) + writer.uint32(/* id 6, wireType 0 =*/48).int64(message.fundingRate); + return writer; + }; + + /** + * Encodes the specified FeedData message, length delimited. Does not implicitly {@link lazer.FeedData.verify|verify} messages. + * @function encodeDelimited + * @memberof lazer.FeedData + * @static + * @param {lazer.IFeedData} message FeedData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeedData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeedData message from the specified reader or buffer. + * @function decode + * @memberof lazer.FeedData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {lazer.FeedData} FeedData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeedData.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.lazer.FeedData(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.sourceTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.publisherTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.price = reader.int64(); + break; + } + case 4: { + message.bestBidPrice = reader.int64(); + break; + } + case 5: { + message.bestAskPrice = reader.int64(); + break; + } + case 6: { + message.fundingRate = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeedData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof lazer.FeedData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {lazer.FeedData} FeedData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeedData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeedData message. + * @function verify + * @memberof lazer.FeedData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeedData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.sourceTimestamp != null && message.hasOwnProperty("sourceTimestamp")) { + properties._sourceTimestamp = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.sourceTimestamp); + if (error) + return "sourceTimestamp." + error; + } + } + if (message.publisherTimestamp != null && message.hasOwnProperty("publisherTimestamp")) { + properties._publisherTimestamp = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.publisherTimestamp); + if (error) + return "publisherTimestamp." + error; + } + } + if (message.price != null && message.hasOwnProperty("price")) { + properties._price = 1; + if (!$util.isInteger(message.price) && !(message.price && $util.isInteger(message.price.low) && $util.isInteger(message.price.high))) + return "price: integer|Long expected"; + } + if (message.bestBidPrice != null && message.hasOwnProperty("bestBidPrice")) { + properties._bestBidPrice = 1; + if (!$util.isInteger(message.bestBidPrice) && !(message.bestBidPrice && $util.isInteger(message.bestBidPrice.low) && $util.isInteger(message.bestBidPrice.high))) + return "bestBidPrice: integer|Long expected"; + } + if (message.bestAskPrice != null && message.hasOwnProperty("bestAskPrice")) { + properties._bestAskPrice = 1; + if (!$util.isInteger(message.bestAskPrice) && !(message.bestAskPrice && $util.isInteger(message.bestAskPrice.low) && $util.isInteger(message.bestAskPrice.high))) + return "bestAskPrice: integer|Long expected"; + } + if (message.fundingRate != null && message.hasOwnProperty("fundingRate")) { + properties._fundingRate = 1; + if (!$util.isInteger(message.fundingRate) && !(message.fundingRate && $util.isInteger(message.fundingRate.low) && $util.isInteger(message.fundingRate.high))) + return "fundingRate: integer|Long expected"; + } + return null; + }; + + /** + * Creates a FeedData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof lazer.FeedData + * @static + * @param {Object.} object Plain object + * @returns {lazer.FeedData} FeedData + */ + FeedData.fromObject = function fromObject(object) { + if (object instanceof $root.lazer.FeedData) + return object; + var message = new $root.lazer.FeedData(); + if (object.sourceTimestamp != null) { + if (typeof object.sourceTimestamp !== "object") + throw TypeError(".lazer.FeedData.sourceTimestamp: object expected"); + message.sourceTimestamp = $root.google.protobuf.Timestamp.fromObject(object.sourceTimestamp); + } + if (object.publisherTimestamp != null) { + if (typeof object.publisherTimestamp !== "object") + throw TypeError(".lazer.FeedData.publisherTimestamp: object expected"); + message.publisherTimestamp = $root.google.protobuf.Timestamp.fromObject(object.publisherTimestamp); + } + if (object.price != null) + if ($util.Long) + (message.price = $util.Long.fromValue(object.price)).unsigned = false; + else if (typeof object.price === "string") + message.price = parseInt(object.price, 10); + else if (typeof object.price === "number") + message.price = object.price; + else if (typeof object.price === "object") + message.price = new $util.LongBits(object.price.low >>> 0, object.price.high >>> 0).toNumber(); + if (object.bestBidPrice != null) + if ($util.Long) + (message.bestBidPrice = $util.Long.fromValue(object.bestBidPrice)).unsigned = false; + else if (typeof object.bestBidPrice === "string") + message.bestBidPrice = parseInt(object.bestBidPrice, 10); + else if (typeof object.bestBidPrice === "number") + message.bestBidPrice = object.bestBidPrice; + else if (typeof object.bestBidPrice === "object") + message.bestBidPrice = new $util.LongBits(object.bestBidPrice.low >>> 0, object.bestBidPrice.high >>> 0).toNumber(); + if (object.bestAskPrice != null) + if ($util.Long) + (message.bestAskPrice = $util.Long.fromValue(object.bestAskPrice)).unsigned = false; + else if (typeof object.bestAskPrice === "string") + message.bestAskPrice = parseInt(object.bestAskPrice, 10); + else if (typeof object.bestAskPrice === "number") + message.bestAskPrice = object.bestAskPrice; + else if (typeof object.bestAskPrice === "object") + message.bestAskPrice = new $util.LongBits(object.bestAskPrice.low >>> 0, object.bestAskPrice.high >>> 0).toNumber(); + if (object.fundingRate != null) + if ($util.Long) + (message.fundingRate = $util.Long.fromValue(object.fundingRate)).unsigned = false; + else if (typeof object.fundingRate === "string") + message.fundingRate = parseInt(object.fundingRate, 10); + else if (typeof object.fundingRate === "number") + message.fundingRate = object.fundingRate; + else if (typeof object.fundingRate === "object") + message.fundingRate = new $util.LongBits(object.fundingRate.low >>> 0, object.fundingRate.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a FeedData message. Also converts values to other types if specified. + * @function toObject + * @memberof lazer.FeedData + * @static + * @param {lazer.FeedData} message FeedData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeedData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.sourceTimestamp != null && message.hasOwnProperty("sourceTimestamp")) { + object.sourceTimestamp = $root.google.protobuf.Timestamp.toObject(message.sourceTimestamp, options); + if (options.oneofs) + object._sourceTimestamp = "sourceTimestamp"; + } + if (message.publisherTimestamp != null && message.hasOwnProperty("publisherTimestamp")) { + object.publisherTimestamp = $root.google.protobuf.Timestamp.toObject(message.publisherTimestamp, options); + if (options.oneofs) + object._publisherTimestamp = "publisherTimestamp"; + } + if (message.price != null && message.hasOwnProperty("price")) { + if (typeof message.price === "number") + object.price = options.longs === String ? String(message.price) : message.price; + else + object.price = options.longs === String ? $util.Long.prototype.toString.call(message.price) : options.longs === Number ? new $util.LongBits(message.price.low >>> 0, message.price.high >>> 0).toNumber() : message.price; + if (options.oneofs) + object._price = "price"; + } + if (message.bestBidPrice != null && message.hasOwnProperty("bestBidPrice")) { + if (typeof message.bestBidPrice === "number") + object.bestBidPrice = options.longs === String ? String(message.bestBidPrice) : message.bestBidPrice; + else + object.bestBidPrice = options.longs === String ? $util.Long.prototype.toString.call(message.bestBidPrice) : options.longs === Number ? new $util.LongBits(message.bestBidPrice.low >>> 0, message.bestBidPrice.high >>> 0).toNumber() : message.bestBidPrice; + if (options.oneofs) + object._bestBidPrice = "bestBidPrice"; + } + if (message.bestAskPrice != null && message.hasOwnProperty("bestAskPrice")) { + if (typeof message.bestAskPrice === "number") + object.bestAskPrice = options.longs === String ? String(message.bestAskPrice) : message.bestAskPrice; + else + object.bestAskPrice = options.longs === String ? $util.Long.prototype.toString.call(message.bestAskPrice) : options.longs === Number ? new $util.LongBits(message.bestAskPrice.low >>> 0, message.bestAskPrice.high >>> 0).toNumber() : message.bestAskPrice; + if (options.oneofs) + object._bestAskPrice = "bestAskPrice"; + } + if (message.fundingRate != null && message.hasOwnProperty("fundingRate")) { + if (typeof message.fundingRate === "number") + object.fundingRate = options.longs === String ? String(message.fundingRate) : message.fundingRate; + else + object.fundingRate = options.longs === String ? $util.Long.prototype.toString.call(message.fundingRate) : options.longs === Number ? new $util.LongBits(message.fundingRate.low >>> 0, message.fundingRate.high >>> 0).toNumber() : message.fundingRate; + if (options.oneofs) + object._fundingRate = "fundingRate"; + } + return object; + }; + + /** + * Converts this FeedData to JSON. + * @function toJSON + * @memberof lazer.FeedData + * @instance + * @returns {Object.} JSON object + */ + FeedData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeedData + * @function getTypeUrl + * @memberof lazer.FeedData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeedData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/lazer.FeedData"; + }; + + return FeedData; + })(); + + return lazer; +})(); + +$root.google = (function() { + + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + + google.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + var protobuf = {}; + + protobuf.Duration = (function() { + + /** + * Properties of a Duration. + * @memberof google.protobuf + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos + */ + + /** + * Constructs a new Duration. + * @memberof google.protobuf + * @classdesc Represents a Duration. + * @implements IDuration + * @constructor + * @param {google.protobuf.IDuration=} [properties] Properties to set + */ + function Duration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; + + /** + * Creates a new Duration instance using the specified properties. + * @function create + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance + */ + Duration.create = function create(properties) { + return new Duration(properties); + }; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Duration message. + * @function verify + * @memberof google.protobuf.Duration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Duration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Duration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Duration} Duration + */ + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) + return object; + var message = new $root.google.protobuf.Duration(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.Duration} message Duration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Duration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Duration to JSON. + * @function toJSON + * @memberof google.protobuf.Duration + * @instance + * @returns {Object.} JSON object + */ + Duration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Duration + * @function getTypeUrl + * @memberof google.protobuf.Duration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Duration"; + }; + + return Duration; + })(); + + protobuf.Timestamp = (function() { + + /** + * Properties of a Timestamp. + * @memberof google.protobuf + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos + */ + + /** + * Constructs a new Timestamp. + * @memberof google.protobuf + * @classdesc Represents a Timestamp. + * @implements ITimestamp + * @constructor + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + */ + function Timestamp(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.nanos = 0; + + /** + * Creates a new Timestamp instance using the specified properties. + * @function create + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance + */ + Timestamp.create = function create(properties) { + return new Timestamp(properties); + }; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Timestamp message. + * @function verify + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Timestamp.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Timestamp} Timestamp + */ + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) + return object; + var message = new $root.google.protobuf.Timestamp(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.Timestamp} message Timestamp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Timestamp.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Timestamp to JSON. + * @function toJSON + * @memberof google.protobuf.Timestamp + * @instance + * @returns {Object.} JSON object + */ + Timestamp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Timestamp + * @function getTypeUrl + * @memberof google.protobuf.Timestamp + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Timestamp"; + }; + + return Timestamp; + })(); + + return protobuf; + })(); + + return google; +})(); + +module.exports = $root; diff --git a/lazer/state_sdk/js/src/generated/state.d.ts b/lazer/state_sdk/js/src/generated/state.d.ts new file mode 100644 index 0000000000..03b8335103 --- /dev/null +++ b/lazer/state_sdk/js/src/generated/state.d.ts @@ -0,0 +1,1127 @@ +import * as $protobuf from "protobufjs"; +import Long = require("long"); +/** Namespace lazer. */ +export namespace lazer { + + /** Properties of a State. */ + interface IState { + + /** State shardId */ + shardId?: (number|null); + + /** State lastSequenceNo */ + lastSequenceNo?: (number|Long|null); + + /** State lastTimestamp */ + lastTimestamp?: (google.protobuf.ITimestamp|null); + + /** State shardName */ + shardName?: (string|null); + + /** State minRate */ + minRate?: (google.protobuf.IDuration|null); + + /** State feeds */ + feeds?: (lazer.IFeed[]|null); + + /** State publishers */ + publishers?: (lazer.IPublisher[]|null); + } + + /** Represents a State. */ + class State implements IState { + + /** + * Constructs a new State. + * @param [properties] Properties to set + */ + constructor(properties?: lazer.IState); + + /** State shardId. */ + public shardId?: (number|null); + + /** State lastSequenceNo. */ + public lastSequenceNo?: (number|Long|null); + + /** State lastTimestamp. */ + public lastTimestamp?: (google.protobuf.ITimestamp|null); + + /** State shardName. */ + public shardName?: (string|null); + + /** State minRate. */ + public minRate?: (google.protobuf.IDuration|null); + + /** State feeds. */ + public feeds: lazer.IFeed[]; + + /** State publishers. */ + public publishers: lazer.IPublisher[]; + + /** State _shardId. */ + public _shardId?: "shardId"; + + /** State _lastSequenceNo. */ + public _lastSequenceNo?: "lastSequenceNo"; + + /** State _lastTimestamp. */ + public _lastTimestamp?: "lastTimestamp"; + + /** State _shardName. */ + public _shardName?: "shardName"; + + /** State _minRate. */ + public _minRate?: "minRate"; + + /** + * Creates a new State instance using the specified properties. + * @param [properties] Properties to set + * @returns State instance + */ + public static create(properties?: lazer.IState): lazer.State; + + /** + * Encodes the specified State message. Does not implicitly {@link lazer.State.verify|verify} messages. + * @param message State message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: lazer.IState, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified State message, length delimited. Does not implicitly {@link lazer.State.verify|verify} messages. + * @param message State message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: lazer.IState, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a State message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns State + * @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): lazer.State; + + /** + * Decodes a State message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns State + * @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)): lazer.State; + + /** + * Verifies a State 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 State message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns State + */ + public static fromObject(object: { [k: string]: any }): lazer.State; + + /** + * Creates a plain object from a State message. Also converts values to other types if specified. + * @param message State + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: lazer.State, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this State to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for State + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Publisher. */ + interface IPublisher { + + /** Publisher publisherId */ + publisherId?: (number|null); + + /** Publisher name */ + name?: (string|null); + + /** Publisher publicKeys */ + publicKeys?: (Uint8Array[]|null); + + /** Publisher isActive */ + isActive?: (boolean|null); + } + + /** Represents a Publisher. */ + class Publisher implements IPublisher { + + /** + * Constructs a new Publisher. + * @param [properties] Properties to set + */ + constructor(properties?: lazer.IPublisher); + + /** Publisher publisherId. */ + public publisherId?: (number|null); + + /** Publisher name. */ + public name?: (string|null); + + /** Publisher publicKeys. */ + public publicKeys: Uint8Array[]; + + /** Publisher isActive. */ + public isActive?: (boolean|null); + + /** Publisher _publisherId. */ + public _publisherId?: "publisherId"; + + /** Publisher _name. */ + public _name?: "name"; + + /** Publisher _isActive. */ + public _isActive?: "isActive"; + + /** + * Creates a new Publisher instance using the specified properties. + * @param [properties] Properties to set + * @returns Publisher instance + */ + public static create(properties?: lazer.IPublisher): lazer.Publisher; + + /** + * Encodes the specified Publisher message. Does not implicitly {@link lazer.Publisher.verify|verify} messages. + * @param message Publisher message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: lazer.IPublisher, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Publisher message, length delimited. Does not implicitly {@link lazer.Publisher.verify|verify} messages. + * @param message Publisher message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: lazer.IPublisher, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Publisher message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Publisher + * @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): lazer.Publisher; + + /** + * Decodes a Publisher message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Publisher + * @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)): lazer.Publisher; + + /** + * Verifies a Publisher 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 Publisher message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Publisher + */ + public static fromObject(object: { [k: string]: any }): lazer.Publisher; + + /** + * Creates a plain object from a Publisher message. Also converts values to other types if specified. + * @param message Publisher + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: lazer.Publisher, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Publisher to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Publisher + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** AssetType enum. */ + enum AssetType { + CRYPTO = 0, + FUNDING_RATE = 1, + FX = 2, + COMMODITY = 3, + NAV = 4, + CRYPTO_INDEX = 5, + CRYPTO_REDEMPTION_RATE = 6, + EQUITY = 7, + METAL = 8, + RATES = 9 + } + + /** Properties of a FeedMetadata. */ + interface IFeedMetadata { + + /** FeedMetadata priceFeedId */ + priceFeedId?: (number|null); + + /** FeedMetadata name */ + name?: (string|null); + + /** FeedMetadata symbol */ + symbol?: (string|null); + + /** FeedMetadata description */ + description?: (string|null); + + /** FeedMetadata assetType */ + assetType?: (lazer.AssetType|null); + + /** FeedMetadata exponent */ + exponent?: (number|null); + + /** FeedMetadata cmcId */ + cmcId?: (number|null); + + /** FeedMetadata fundingRateInterval */ + fundingRateInterval?: (google.protobuf.IDuration|null); + + /** FeedMetadata minPublishers */ + minPublishers?: (number|null); + + /** FeedMetadata minRate */ + minRate?: (google.protobuf.IDuration|null); + + /** FeedMetadata expiryTime */ + expiryTime?: (google.protobuf.IDuration|null); + + /** FeedMetadata isActivated */ + isActivated?: (boolean|null); + + /** FeedMetadata hermesId */ + hermesId?: (string|null); + + /** FeedMetadata quoteCurrency */ + quoteCurrency?: (string|null); + + /** FeedMetadata marketSchedule */ + marketSchedule?: (string|null); + } + + /** Represents a FeedMetadata. */ + class FeedMetadata implements IFeedMetadata { + + /** + * Constructs a new FeedMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: lazer.IFeedMetadata); + + /** FeedMetadata priceFeedId. */ + public priceFeedId?: (number|null); + + /** FeedMetadata name. */ + public name?: (string|null); + + /** FeedMetadata symbol. */ + public symbol?: (string|null); + + /** FeedMetadata description. */ + public description?: (string|null); + + /** FeedMetadata assetType. */ + public assetType?: (lazer.AssetType|null); + + /** FeedMetadata exponent. */ + public exponent?: (number|null); + + /** FeedMetadata cmcId. */ + public cmcId?: (number|null); + + /** FeedMetadata fundingRateInterval. */ + public fundingRateInterval?: (google.protobuf.IDuration|null); + + /** FeedMetadata minPublishers. */ + public minPublishers?: (number|null); + + /** FeedMetadata minRate. */ + public minRate?: (google.protobuf.IDuration|null); + + /** FeedMetadata expiryTime. */ + public expiryTime?: (google.protobuf.IDuration|null); + + /** FeedMetadata isActivated. */ + public isActivated?: (boolean|null); + + /** FeedMetadata hermesId. */ + public hermesId?: (string|null); + + /** FeedMetadata quoteCurrency. */ + public quoteCurrency?: (string|null); + + /** FeedMetadata marketSchedule. */ + public marketSchedule?: (string|null); + + /** FeedMetadata _priceFeedId. */ + public _priceFeedId?: "priceFeedId"; + + /** FeedMetadata _name. */ + public _name?: "name"; + + /** FeedMetadata _symbol. */ + public _symbol?: "symbol"; + + /** FeedMetadata _description. */ + public _description?: "description"; + + /** FeedMetadata _assetType. */ + public _assetType?: "assetType"; + + /** FeedMetadata _exponent. */ + public _exponent?: "exponent"; + + /** FeedMetadata _cmcId. */ + public _cmcId?: "cmcId"; + + /** FeedMetadata _fundingRateInterval. */ + public _fundingRateInterval?: "fundingRateInterval"; + + /** FeedMetadata _minPublishers. */ + public _minPublishers?: "minPublishers"; + + /** FeedMetadata _minRate. */ + public _minRate?: "minRate"; + + /** FeedMetadata _expiryTime. */ + public _expiryTime?: "expiryTime"; + + /** FeedMetadata _isActivated. */ + public _isActivated?: "isActivated"; + + /** FeedMetadata _hermesId. */ + public _hermesId?: "hermesId"; + + /** FeedMetadata _quoteCurrency. */ + public _quoteCurrency?: "quoteCurrency"; + + /** FeedMetadata _marketSchedule. */ + public _marketSchedule?: "marketSchedule"; + + /** + * Creates a new FeedMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns FeedMetadata instance + */ + public static create(properties?: lazer.IFeedMetadata): lazer.FeedMetadata; + + /** + * Encodes the specified FeedMetadata message. Does not implicitly {@link lazer.FeedMetadata.verify|verify} messages. + * @param message FeedMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: lazer.IFeedMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeedMetadata message, length delimited. Does not implicitly {@link lazer.FeedMetadata.verify|verify} messages. + * @param message FeedMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: lazer.IFeedMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeedMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeedMetadata + * @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): lazer.FeedMetadata; + + /** + * Decodes a FeedMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeedMetadata + * @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)): lazer.FeedMetadata; + + /** + * Verifies a FeedMetadata 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 FeedMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeedMetadata + */ + public static fromObject(object: { [k: string]: any }): lazer.FeedMetadata; + + /** + * Creates a plain object from a FeedMetadata message. Also converts values to other types if specified. + * @param message FeedMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: lazer.FeedMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeedMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeedMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Feed. */ + interface IFeed { + + /** Feed metadata */ + metadata?: (lazer.IFeedMetadata|null); + + /** Feed pendingActivation */ + pendingActivation?: (google.protobuf.ITimestamp|null); + + /** Feed pendingDeactivation */ + pendingDeactivation?: (google.protobuf.ITimestamp|null); + + /** Feed perPublisher */ + perPublisher?: (lazer.IFeedPublisherState[]|null); + } + + /** Represents a Feed. */ + class Feed implements IFeed { + + /** + * Constructs a new Feed. + * @param [properties] Properties to set + */ + constructor(properties?: lazer.IFeed); + + /** Feed metadata. */ + public metadata?: (lazer.IFeedMetadata|null); + + /** Feed pendingActivation. */ + public pendingActivation?: (google.protobuf.ITimestamp|null); + + /** Feed pendingDeactivation. */ + public pendingDeactivation?: (google.protobuf.ITimestamp|null); + + /** Feed perPublisher. */ + public perPublisher: lazer.IFeedPublisherState[]; + + /** Feed _metadata. */ + public _metadata?: "metadata"; + + /** Feed _pendingActivation. */ + public _pendingActivation?: "pendingActivation"; + + /** Feed _pendingDeactivation. */ + public _pendingDeactivation?: "pendingDeactivation"; + + /** + * Creates a new Feed instance using the specified properties. + * @param [properties] Properties to set + * @returns Feed instance + */ + public static create(properties?: lazer.IFeed): lazer.Feed; + + /** + * Encodes the specified Feed message. Does not implicitly {@link lazer.Feed.verify|verify} messages. + * @param message Feed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: lazer.IFeed, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Feed message, length delimited. Does not implicitly {@link lazer.Feed.verify|verify} messages. + * @param message Feed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: lazer.IFeed, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Feed message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Feed + * @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): lazer.Feed; + + /** + * Decodes a Feed message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Feed + * @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)): lazer.Feed; + + /** + * Verifies a Feed 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 Feed message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Feed + */ + public static fromObject(object: { [k: string]: any }): lazer.Feed; + + /** + * Creates a plain object from a Feed message. Also converts values to other types if specified. + * @param message Feed + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: lazer.Feed, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Feed to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Feed + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FeedPublisherState. */ + interface IFeedPublisherState { + + /** FeedPublisherState publisherId */ + publisherId?: (number|null); + + /** FeedPublisherState lastUpdateTimestamp */ + lastUpdateTimestamp?: (google.protobuf.ITimestamp|null); + + /** FeedPublisherState lastPublisherTimestamp */ + lastPublisherTimestamp?: (google.protobuf.ITimestamp|null); + + /** FeedPublisherState lastFeedData */ + lastFeedData?: (lazer.IFeedData|null); + } + + /** Represents a FeedPublisherState. */ + class FeedPublisherState implements IFeedPublisherState { + + /** + * Constructs a new FeedPublisherState. + * @param [properties] Properties to set + */ + constructor(properties?: lazer.IFeedPublisherState); + + /** FeedPublisherState publisherId. */ + public publisherId?: (number|null); + + /** FeedPublisherState lastUpdateTimestamp. */ + public lastUpdateTimestamp?: (google.protobuf.ITimestamp|null); + + /** FeedPublisherState lastPublisherTimestamp. */ + public lastPublisherTimestamp?: (google.protobuf.ITimestamp|null); + + /** FeedPublisherState lastFeedData. */ + public lastFeedData?: (lazer.IFeedData|null); + + /** FeedPublisherState _publisherId. */ + public _publisherId?: "publisherId"; + + /** FeedPublisherState _lastUpdateTimestamp. */ + public _lastUpdateTimestamp?: "lastUpdateTimestamp"; + + /** FeedPublisherState _lastPublisherTimestamp. */ + public _lastPublisherTimestamp?: "lastPublisherTimestamp"; + + /** FeedPublisherState _lastFeedData. */ + public _lastFeedData?: "lastFeedData"; + + /** + * Creates a new FeedPublisherState instance using the specified properties. + * @param [properties] Properties to set + * @returns FeedPublisherState instance + */ + public static create(properties?: lazer.IFeedPublisherState): lazer.FeedPublisherState; + + /** + * Encodes the specified FeedPublisherState message. Does not implicitly {@link lazer.FeedPublisherState.verify|verify} messages. + * @param message FeedPublisherState message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: lazer.IFeedPublisherState, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeedPublisherState message, length delimited. Does not implicitly {@link lazer.FeedPublisherState.verify|verify} messages. + * @param message FeedPublisherState message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: lazer.IFeedPublisherState, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeedPublisherState message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeedPublisherState + * @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): lazer.FeedPublisherState; + + /** + * Decodes a FeedPublisherState message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeedPublisherState + * @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)): lazer.FeedPublisherState; + + /** + * Verifies a FeedPublisherState 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 FeedPublisherState message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeedPublisherState + */ + public static fromObject(object: { [k: string]: any }): lazer.FeedPublisherState; + + /** + * Creates a plain object from a FeedPublisherState message. Also converts values to other types if specified. + * @param message FeedPublisherState + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: lazer.FeedPublisherState, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeedPublisherState to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeedPublisherState + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FeedData. */ + interface IFeedData { + + /** FeedData sourceTimestamp */ + sourceTimestamp?: (google.protobuf.ITimestamp|null); + + /** FeedData publisherTimestamp */ + publisherTimestamp?: (google.protobuf.ITimestamp|null); + + /** FeedData price */ + price?: (number|Long|null); + + /** FeedData bestBidPrice */ + bestBidPrice?: (number|Long|null); + + /** FeedData bestAskPrice */ + bestAskPrice?: (number|Long|null); + + /** FeedData fundingRate */ + fundingRate?: (number|Long|null); + } + + /** Represents a FeedData. */ + class FeedData implements IFeedData { + + /** + * Constructs a new FeedData. + * @param [properties] Properties to set + */ + constructor(properties?: lazer.IFeedData); + + /** FeedData sourceTimestamp. */ + public sourceTimestamp?: (google.protobuf.ITimestamp|null); + + /** FeedData publisherTimestamp. */ + public publisherTimestamp?: (google.protobuf.ITimestamp|null); + + /** FeedData price. */ + public price?: (number|Long|null); + + /** FeedData bestBidPrice. */ + public bestBidPrice?: (number|Long|null); + + /** FeedData bestAskPrice. */ + public bestAskPrice?: (number|Long|null); + + /** FeedData fundingRate. */ + public fundingRate?: (number|Long|null); + + /** FeedData _sourceTimestamp. */ + public _sourceTimestamp?: "sourceTimestamp"; + + /** FeedData _publisherTimestamp. */ + public _publisherTimestamp?: "publisherTimestamp"; + + /** FeedData _price. */ + public _price?: "price"; + + /** FeedData _bestBidPrice. */ + public _bestBidPrice?: "bestBidPrice"; + + /** FeedData _bestAskPrice. */ + public _bestAskPrice?: "bestAskPrice"; + + /** FeedData _fundingRate. */ + public _fundingRate?: "fundingRate"; + + /** + * Creates a new FeedData instance using the specified properties. + * @param [properties] Properties to set + * @returns FeedData instance + */ + public static create(properties?: lazer.IFeedData): lazer.FeedData; + + /** + * Encodes the specified FeedData message. Does not implicitly {@link lazer.FeedData.verify|verify} messages. + * @param message FeedData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: lazer.IFeedData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeedData message, length delimited. Does not implicitly {@link lazer.FeedData.verify|verify} messages. + * @param message FeedData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: lazer.IFeedData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeedData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeedData + * @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): lazer.FeedData; + + /** + * Decodes a FeedData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeedData + * @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)): lazer.FeedData; + + /** + * Verifies a FeedData 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 FeedData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeedData + */ + public static fromObject(object: { [k: string]: any }): lazer.FeedData; + + /** + * Creates a plain object from a FeedData message. Also converts values to other types if specified. + * @param message FeedData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: lazer.FeedData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeedData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeedData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } +} + +/** Namespace google. */ +export namespace google { + + /** Namespace protobuf. */ + namespace protobuf { + + /** Properties of a Duration. */ + interface IDuration { + + /** Duration seconds */ + seconds?: (number|Long|null); + + /** Duration nanos */ + nanos?: (number|null); + } + + /** Represents a Duration. */ + class Duration implements IDuration { + + /** + * Constructs a new Duration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDuration); + + /** Duration seconds. */ + public seconds: (number|Long); + + /** Duration nanos. */ + public nanos: number; + + /** + * Creates a new Duration instance using the specified properties. + * @param [properties] Properties to set + * @returns Duration instance + */ + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Duration + * @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.Duration; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Duration + * @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.Duration; + + /** + * Verifies a Duration 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 Duration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Duration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @param message Duration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Duration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Duration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Timestamp. */ + interface ITimestamp { + + /** Timestamp seconds */ + seconds?: (number|Long|null); + + /** Timestamp nanos */ + nanos?: (number|null); + } + + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { + + /** + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ITimestamp); + + /** Timestamp seconds. */ + public seconds: (number|Long); + + /** Timestamp nanos. */ + public nanos: number; + + /** + * Creates a new Timestamp instance using the specified properties. + * @param [properties] Properties to set + * @returns Timestamp instance + */ + public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Timestamp + * @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.Timestamp; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Timestamp + * @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.Timestamp; + + /** + * Verifies a Timestamp 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 Timestamp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Timestamp + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @param message Timestamp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Timestamp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Timestamp + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } +} diff --git a/lazer/state_sdk/js/src/generated/state.js b/lazer/state_sdk/js/src/generated/state.js new file mode 100644 index 0000000000..b9017e730a --- /dev/null +++ b/lazer/state_sdk/js/src/generated/state.js @@ -0,0 +1,3405 @@ +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +import * as $protobuf from "protobufjs/minimal"; + +// Common aliases +const $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + +// Exported root namespace +const $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); + +export const lazer = $root.lazer = (() => { + + /** + * Namespace lazer. + * @exports lazer + * @namespace + */ + const lazer = {}; + + lazer.State = (function() { + + /** + * Properties of a State. + * @memberof lazer + * @interface IState + * @property {number|null} [shardId] State shardId + * @property {number|Long|null} [lastSequenceNo] State lastSequenceNo + * @property {google.protobuf.ITimestamp|null} [lastTimestamp] State lastTimestamp + * @property {string|null} [shardName] State shardName + * @property {google.protobuf.IDuration|null} [minRate] State minRate + * @property {Array.|null} [feeds] State feeds + * @property {Array.|null} [publishers] State publishers + */ + + /** + * Constructs a new State. + * @memberof lazer + * @classdesc Represents a State. + * @implements IState + * @constructor + * @param {lazer.IState=} [properties] Properties to set + */ + function State(properties) { + this.feeds = []; + this.publishers = []; + 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]]; + } + + /** + * State shardId. + * @member {number|null|undefined} shardId + * @memberof lazer.State + * @instance + */ + State.prototype.shardId = null; + + /** + * State lastSequenceNo. + * @member {number|Long|null|undefined} lastSequenceNo + * @memberof lazer.State + * @instance + */ + State.prototype.lastSequenceNo = null; + + /** + * State lastTimestamp. + * @member {google.protobuf.ITimestamp|null|undefined} lastTimestamp + * @memberof lazer.State + * @instance + */ + State.prototype.lastTimestamp = null; + + /** + * State shardName. + * @member {string|null|undefined} shardName + * @memberof lazer.State + * @instance + */ + State.prototype.shardName = null; + + /** + * State minRate. + * @member {google.protobuf.IDuration|null|undefined} minRate + * @memberof lazer.State + * @instance + */ + State.prototype.minRate = null; + + /** + * State feeds. + * @member {Array.} feeds + * @memberof lazer.State + * @instance + */ + State.prototype.feeds = $util.emptyArray; + + /** + * State publishers. + * @member {Array.} publishers + * @memberof lazer.State + * @instance + */ + State.prototype.publishers = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * State _shardId. + * @member {"shardId"|undefined} _shardId + * @memberof lazer.State + * @instance + */ + Object.defineProperty(State.prototype, "_shardId", { + get: $util.oneOfGetter($oneOfFields = ["shardId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * State _lastSequenceNo. + * @member {"lastSequenceNo"|undefined} _lastSequenceNo + * @memberof lazer.State + * @instance + */ + Object.defineProperty(State.prototype, "_lastSequenceNo", { + get: $util.oneOfGetter($oneOfFields = ["lastSequenceNo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * State _lastTimestamp. + * @member {"lastTimestamp"|undefined} _lastTimestamp + * @memberof lazer.State + * @instance + */ + Object.defineProperty(State.prototype, "_lastTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["lastTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * State _shardName. + * @member {"shardName"|undefined} _shardName + * @memberof lazer.State + * @instance + */ + Object.defineProperty(State.prototype, "_shardName", { + get: $util.oneOfGetter($oneOfFields = ["shardName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * State _minRate. + * @member {"minRate"|undefined} _minRate + * @memberof lazer.State + * @instance + */ + Object.defineProperty(State.prototype, "_minRate", { + get: $util.oneOfGetter($oneOfFields = ["minRate"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new State instance using the specified properties. + * @function create + * @memberof lazer.State + * @static + * @param {lazer.IState=} [properties] Properties to set + * @returns {lazer.State} State instance + */ + State.create = function create(properties) { + return new State(properties); + }; + + /** + * Encodes the specified State message. Does not implicitly {@link lazer.State.verify|verify} messages. + * @function encode + * @memberof lazer.State + * @static + * @param {lazer.IState} message State message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + State.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.shardId != null && Object.hasOwnProperty.call(message, "shardId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.shardId); + if (message.lastSequenceNo != null && Object.hasOwnProperty.call(message, "lastSequenceNo")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.lastSequenceNo); + if (message.lastTimestamp != null && Object.hasOwnProperty.call(message, "lastTimestamp")) + $root.google.protobuf.Timestamp.encode(message.lastTimestamp, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.shardName != null && Object.hasOwnProperty.call(message, "shardName")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.shardName); + if (message.minRate != null && Object.hasOwnProperty.call(message, "minRate")) + $root.google.protobuf.Duration.encode(message.minRate, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.feeds != null && message.feeds.length) + for (let i = 0; i < message.feeds.length; ++i) + $root.lazer.Feed.encode(message.feeds[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.publishers != null && message.publishers.length) + for (let i = 0; i < message.publishers.length; ++i) + $root.lazer.Publisher.encode(message.publishers[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified State message, length delimited. Does not implicitly {@link lazer.State.verify|verify} messages. + * @function encodeDelimited + * @memberof lazer.State + * @static + * @param {lazer.IState} message State message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + State.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a State message from the specified reader or buffer. + * @function decode + * @memberof lazer.State + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {lazer.State} State + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + State.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.lazer.State(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.shardId = reader.uint32(); + break; + } + case 2: { + message.lastSequenceNo = reader.uint64(); + break; + } + case 3: { + message.lastTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.shardName = reader.string(); + break; + } + case 5: { + message.minRate = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 7: { + if (!(message.feeds && message.feeds.length)) + message.feeds = []; + message.feeds.push($root.lazer.Feed.decode(reader, reader.uint32())); + break; + } + case 8: { + if (!(message.publishers && message.publishers.length)) + message.publishers = []; + message.publishers.push($root.lazer.Publisher.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a State message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof lazer.State + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {lazer.State} State + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + State.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a State message. + * @function verify + * @memberof lazer.State + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + State.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if (message.shardId != null && message.hasOwnProperty("shardId")) { + properties._shardId = 1; + if (!$util.isInteger(message.shardId)) + return "shardId: integer expected"; + } + if (message.lastSequenceNo != null && message.hasOwnProperty("lastSequenceNo")) { + properties._lastSequenceNo = 1; + if (!$util.isInteger(message.lastSequenceNo) && !(message.lastSequenceNo && $util.isInteger(message.lastSequenceNo.low) && $util.isInteger(message.lastSequenceNo.high))) + return "lastSequenceNo: integer|Long expected"; + } + if (message.lastTimestamp != null && message.hasOwnProperty("lastTimestamp")) { + properties._lastTimestamp = 1; + { + let error = $root.google.protobuf.Timestamp.verify(message.lastTimestamp); + if (error) + return "lastTimestamp." + error; + } + } + if (message.shardName != null && message.hasOwnProperty("shardName")) { + properties._shardName = 1; + if (!$util.isString(message.shardName)) + return "shardName: string expected"; + } + if (message.minRate != null && message.hasOwnProperty("minRate")) { + properties._minRate = 1; + { + let error = $root.google.protobuf.Duration.verify(message.minRate); + if (error) + return "minRate." + error; + } + } + if (message.feeds != null && message.hasOwnProperty("feeds")) { + if (!Array.isArray(message.feeds)) + return "feeds: array expected"; + for (let i = 0; i < message.feeds.length; ++i) { + let error = $root.lazer.Feed.verify(message.feeds[i]); + if (error) + return "feeds." + error; + } + } + if (message.publishers != null && message.hasOwnProperty("publishers")) { + if (!Array.isArray(message.publishers)) + return "publishers: array expected"; + for (let i = 0; i < message.publishers.length; ++i) { + let error = $root.lazer.Publisher.verify(message.publishers[i]); + if (error) + return "publishers." + error; + } + } + return null; + }; + + /** + * Creates a State message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof lazer.State + * @static + * @param {Object.} object Plain object + * @returns {lazer.State} State + */ + State.fromObject = function fromObject(object) { + if (object instanceof $root.lazer.State) + return object; + let message = new $root.lazer.State(); + if (object.shardId != null) + message.shardId = object.shardId >>> 0; + if (object.lastSequenceNo != null) + if ($util.Long) + (message.lastSequenceNo = $util.Long.fromValue(object.lastSequenceNo)).unsigned = true; + else if (typeof object.lastSequenceNo === "string") + message.lastSequenceNo = parseInt(object.lastSequenceNo, 10); + else if (typeof object.lastSequenceNo === "number") + message.lastSequenceNo = object.lastSequenceNo; + else if (typeof object.lastSequenceNo === "object") + message.lastSequenceNo = new $util.LongBits(object.lastSequenceNo.low >>> 0, object.lastSequenceNo.high >>> 0).toNumber(true); + if (object.lastTimestamp != null) { + if (typeof object.lastTimestamp !== "object") + throw TypeError(".lazer.State.lastTimestamp: object expected"); + message.lastTimestamp = $root.google.protobuf.Timestamp.fromObject(object.lastTimestamp); + } + if (object.shardName != null) + message.shardName = String(object.shardName); + if (object.minRate != null) { + if (typeof object.minRate !== "object") + throw TypeError(".lazer.State.minRate: object expected"); + message.minRate = $root.google.protobuf.Duration.fromObject(object.minRate); + } + if (object.feeds) { + if (!Array.isArray(object.feeds)) + throw TypeError(".lazer.State.feeds: array expected"); + message.feeds = []; + for (let i = 0; i < object.feeds.length; ++i) { + if (typeof object.feeds[i] !== "object") + throw TypeError(".lazer.State.feeds: object expected"); + message.feeds[i] = $root.lazer.Feed.fromObject(object.feeds[i]); + } + } + if (object.publishers) { + if (!Array.isArray(object.publishers)) + throw TypeError(".lazer.State.publishers: array expected"); + message.publishers = []; + for (let i = 0; i < object.publishers.length; ++i) { + if (typeof object.publishers[i] !== "object") + throw TypeError(".lazer.State.publishers: object expected"); + message.publishers[i] = $root.lazer.Publisher.fromObject(object.publishers[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a State message. Also converts values to other types if specified. + * @function toObject + * @memberof lazer.State + * @static + * @param {lazer.State} message State + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + State.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.feeds = []; + object.publishers = []; + } + if (message.shardId != null && message.hasOwnProperty("shardId")) { + object.shardId = message.shardId; + if (options.oneofs) + object._shardId = "shardId"; + } + if (message.lastSequenceNo != null && message.hasOwnProperty("lastSequenceNo")) { + if (typeof message.lastSequenceNo === "number") + object.lastSequenceNo = options.longs === String ? String(message.lastSequenceNo) : message.lastSequenceNo; + else + object.lastSequenceNo = options.longs === String ? $util.Long.prototype.toString.call(message.lastSequenceNo) : options.longs === Number ? new $util.LongBits(message.lastSequenceNo.low >>> 0, message.lastSequenceNo.high >>> 0).toNumber(true) : message.lastSequenceNo; + if (options.oneofs) + object._lastSequenceNo = "lastSequenceNo"; + } + if (message.lastTimestamp != null && message.hasOwnProperty("lastTimestamp")) { + object.lastTimestamp = $root.google.protobuf.Timestamp.toObject(message.lastTimestamp, options); + if (options.oneofs) + object._lastTimestamp = "lastTimestamp"; + } + if (message.shardName != null && message.hasOwnProperty("shardName")) { + object.shardName = message.shardName; + if (options.oneofs) + object._shardName = "shardName"; + } + if (message.minRate != null && message.hasOwnProperty("minRate")) { + object.minRate = $root.google.protobuf.Duration.toObject(message.minRate, options); + if (options.oneofs) + object._minRate = "minRate"; + } + if (message.feeds && message.feeds.length) { + object.feeds = []; + for (let j = 0; j < message.feeds.length; ++j) + object.feeds[j] = $root.lazer.Feed.toObject(message.feeds[j], options); + } + if (message.publishers && message.publishers.length) { + object.publishers = []; + for (let j = 0; j < message.publishers.length; ++j) + object.publishers[j] = $root.lazer.Publisher.toObject(message.publishers[j], options); + } + return object; + }; + + /** + * Converts this State to JSON. + * @function toJSON + * @memberof lazer.State + * @instance + * @returns {Object.} JSON object + */ + State.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for State + * @function getTypeUrl + * @memberof lazer.State + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + State.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/lazer.State"; + }; + + return State; + })(); + + lazer.Publisher = (function() { + + /** + * Properties of a Publisher. + * @memberof lazer + * @interface IPublisher + * @property {number|null} [publisherId] Publisher publisherId + * @property {string|null} [name] Publisher name + * @property {Array.|null} [publicKeys] Publisher publicKeys + * @property {boolean|null} [isActive] Publisher isActive + */ + + /** + * Constructs a new Publisher. + * @memberof lazer + * @classdesc Represents a Publisher. + * @implements IPublisher + * @constructor + * @param {lazer.IPublisher=} [properties] Properties to set + */ + function Publisher(properties) { + this.publicKeys = []; + 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]]; + } + + /** + * Publisher publisherId. + * @member {number|null|undefined} publisherId + * @memberof lazer.Publisher + * @instance + */ + Publisher.prototype.publisherId = null; + + /** + * Publisher name. + * @member {string|null|undefined} name + * @memberof lazer.Publisher + * @instance + */ + Publisher.prototype.name = null; + + /** + * Publisher publicKeys. + * @member {Array.} publicKeys + * @memberof lazer.Publisher + * @instance + */ + Publisher.prototype.publicKeys = $util.emptyArray; + + /** + * Publisher isActive. + * @member {boolean|null|undefined} isActive + * @memberof lazer.Publisher + * @instance + */ + Publisher.prototype.isActive = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * Publisher _publisherId. + * @member {"publisherId"|undefined} _publisherId + * @memberof lazer.Publisher + * @instance + */ + Object.defineProperty(Publisher.prototype, "_publisherId", { + get: $util.oneOfGetter($oneOfFields = ["publisherId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Publisher _name. + * @member {"name"|undefined} _name + * @memberof lazer.Publisher + * @instance + */ + Object.defineProperty(Publisher.prototype, "_name", { + get: $util.oneOfGetter($oneOfFields = ["name"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Publisher _isActive. + * @member {"isActive"|undefined} _isActive + * @memberof lazer.Publisher + * @instance + */ + Object.defineProperty(Publisher.prototype, "_isActive", { + get: $util.oneOfGetter($oneOfFields = ["isActive"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Publisher instance using the specified properties. + * @function create + * @memberof lazer.Publisher + * @static + * @param {lazer.IPublisher=} [properties] Properties to set + * @returns {lazer.Publisher} Publisher instance + */ + Publisher.create = function create(properties) { + return new Publisher(properties); + }; + + /** + * Encodes the specified Publisher message. Does not implicitly {@link lazer.Publisher.verify|verify} messages. + * @function encode + * @memberof lazer.Publisher + * @static + * @param {lazer.IPublisher} message Publisher message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Publisher.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.publisherId != null && Object.hasOwnProperty.call(message, "publisherId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.publisherId); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); + if (message.publicKeys != null && message.publicKeys.length) + for (let i = 0; i < message.publicKeys.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.publicKeys[i]); + if (message.isActive != null && Object.hasOwnProperty.call(message, "isActive")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.isActive); + return writer; + }; + + /** + * Encodes the specified Publisher message, length delimited. Does not implicitly {@link lazer.Publisher.verify|verify} messages. + * @function encodeDelimited + * @memberof lazer.Publisher + * @static + * @param {lazer.IPublisher} message Publisher message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Publisher.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Publisher message from the specified reader or buffer. + * @function decode + * @memberof lazer.Publisher + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {lazer.Publisher} Publisher + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Publisher.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.lazer.Publisher(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.publisherId = reader.uint32(); + break; + } + case 2: { + message.name = reader.string(); + break; + } + case 3: { + if (!(message.publicKeys && message.publicKeys.length)) + message.publicKeys = []; + message.publicKeys.push(reader.bytes()); + break; + } + case 4: { + message.isActive = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Publisher message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof lazer.Publisher + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {lazer.Publisher} Publisher + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Publisher.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Publisher message. + * @function verify + * @memberof lazer.Publisher + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Publisher.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if (message.publisherId != null && message.hasOwnProperty("publisherId")) { + properties._publisherId = 1; + if (!$util.isInteger(message.publisherId)) + return "publisherId: integer expected"; + } + if (message.name != null && message.hasOwnProperty("name")) { + properties._name = 1; + if (!$util.isString(message.name)) + return "name: string expected"; + } + if (message.publicKeys != null && message.hasOwnProperty("publicKeys")) { + if (!Array.isArray(message.publicKeys)) + return "publicKeys: array expected"; + for (let i = 0; i < message.publicKeys.length; ++i) + if (!(message.publicKeys[i] && typeof message.publicKeys[i].length === "number" || $util.isString(message.publicKeys[i]))) + return "publicKeys: buffer[] expected"; + } + if (message.isActive != null && message.hasOwnProperty("isActive")) { + properties._isActive = 1; + if (typeof message.isActive !== "boolean") + return "isActive: boolean expected"; + } + return null; + }; + + /** + * Creates a Publisher message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof lazer.Publisher + * @static + * @param {Object.} object Plain object + * @returns {lazer.Publisher} Publisher + */ + Publisher.fromObject = function fromObject(object) { + if (object instanceof $root.lazer.Publisher) + return object; + let message = new $root.lazer.Publisher(); + if (object.publisherId != null) + message.publisherId = object.publisherId >>> 0; + if (object.name != null) + message.name = String(object.name); + if (object.publicKeys) { + if (!Array.isArray(object.publicKeys)) + throw TypeError(".lazer.Publisher.publicKeys: array expected"); + message.publicKeys = []; + for (let i = 0; i < object.publicKeys.length; ++i) + if (typeof object.publicKeys[i] === "string") + $util.base64.decode(object.publicKeys[i], message.publicKeys[i] = $util.newBuffer($util.base64.length(object.publicKeys[i])), 0); + else if (object.publicKeys[i].length >= 0) + message.publicKeys[i] = object.publicKeys[i]; + } + if (object.isActive != null) + message.isActive = Boolean(object.isActive); + return message; + }; + + /** + * Creates a plain object from a Publisher message. Also converts values to other types if specified. + * @function toObject + * @memberof lazer.Publisher + * @static + * @param {lazer.Publisher} message Publisher + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Publisher.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.publicKeys = []; + if (message.publisherId != null && message.hasOwnProperty("publisherId")) { + object.publisherId = message.publisherId; + if (options.oneofs) + object._publisherId = "publisherId"; + } + if (message.name != null && message.hasOwnProperty("name")) { + object.name = message.name; + if (options.oneofs) + object._name = "name"; + } + if (message.publicKeys && message.publicKeys.length) { + object.publicKeys = []; + for (let j = 0; j < message.publicKeys.length; ++j) + object.publicKeys[j] = options.bytes === String ? $util.base64.encode(message.publicKeys[j], 0, message.publicKeys[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.publicKeys[j]) : message.publicKeys[j]; + } + if (message.isActive != null && message.hasOwnProperty("isActive")) { + object.isActive = message.isActive; + if (options.oneofs) + object._isActive = "isActive"; + } + return object; + }; + + /** + * Converts this Publisher to JSON. + * @function toJSON + * @memberof lazer.Publisher + * @instance + * @returns {Object.} JSON object + */ + Publisher.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Publisher + * @function getTypeUrl + * @memberof lazer.Publisher + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Publisher.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/lazer.Publisher"; + }; + + return Publisher; + })(); + + /** + * AssetType enum. + * @name lazer.AssetType + * @enum {number} + * @property {number} CRYPTO=0 CRYPTO value + * @property {number} FUNDING_RATE=1 FUNDING_RATE value + * @property {number} FX=2 FX value + * @property {number} COMMODITY=3 COMMODITY value + * @property {number} NAV=4 NAV value + * @property {number} CRYPTO_INDEX=5 CRYPTO_INDEX value + * @property {number} CRYPTO_REDEMPTION_RATE=6 CRYPTO_REDEMPTION_RATE value + * @property {number} EQUITY=7 EQUITY value + * @property {number} METAL=8 METAL value + * @property {number} RATES=9 RATES value + */ + lazer.AssetType = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CRYPTO"] = 0; + values[valuesById[1] = "FUNDING_RATE"] = 1; + values[valuesById[2] = "FX"] = 2; + values[valuesById[3] = "COMMODITY"] = 3; + values[valuesById[4] = "NAV"] = 4; + values[valuesById[5] = "CRYPTO_INDEX"] = 5; + values[valuesById[6] = "CRYPTO_REDEMPTION_RATE"] = 6; + values[valuesById[7] = "EQUITY"] = 7; + values[valuesById[8] = "METAL"] = 8; + values[valuesById[9] = "RATES"] = 9; + return values; + })(); + + lazer.FeedMetadata = (function() { + + /** + * Properties of a FeedMetadata. + * @memberof lazer + * @interface IFeedMetadata + * @property {number|null} [priceFeedId] FeedMetadata priceFeedId + * @property {string|null} [name] FeedMetadata name + * @property {string|null} [symbol] FeedMetadata symbol + * @property {string|null} [description] FeedMetadata description + * @property {lazer.AssetType|null} [assetType] FeedMetadata assetType + * @property {number|null} [exponent] FeedMetadata exponent + * @property {number|null} [cmcId] FeedMetadata cmcId + * @property {google.protobuf.IDuration|null} [fundingRateInterval] FeedMetadata fundingRateInterval + * @property {number|null} [minPublishers] FeedMetadata minPublishers + * @property {google.protobuf.IDuration|null} [minRate] FeedMetadata minRate + * @property {google.protobuf.IDuration|null} [expiryTime] FeedMetadata expiryTime + * @property {boolean|null} [isActivated] FeedMetadata isActivated + * @property {string|null} [hermesId] FeedMetadata hermesId + * @property {string|null} [quoteCurrency] FeedMetadata quoteCurrency + * @property {string|null} [marketSchedule] FeedMetadata marketSchedule + */ + + /** + * Constructs a new FeedMetadata. + * @memberof lazer + * @classdesc Represents a FeedMetadata. + * @implements IFeedMetadata + * @constructor + * @param {lazer.IFeedMetadata=} [properties] Properties to set + */ + function FeedMetadata(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]]; + } + + /** + * FeedMetadata priceFeedId. + * @member {number|null|undefined} priceFeedId + * @memberof lazer.FeedMetadata + * @instance + */ + FeedMetadata.prototype.priceFeedId = null; + + /** + * FeedMetadata name. + * @member {string|null|undefined} name + * @memberof lazer.FeedMetadata + * @instance + */ + FeedMetadata.prototype.name = null; + + /** + * FeedMetadata symbol. + * @member {string|null|undefined} symbol + * @memberof lazer.FeedMetadata + * @instance + */ + FeedMetadata.prototype.symbol = null; + + /** + * FeedMetadata description. + * @member {string|null|undefined} description + * @memberof lazer.FeedMetadata + * @instance + */ + FeedMetadata.prototype.description = null; + + /** + * FeedMetadata assetType. + * @member {lazer.AssetType|null|undefined} assetType + * @memberof lazer.FeedMetadata + * @instance + */ + FeedMetadata.prototype.assetType = null; + + /** + * FeedMetadata exponent. + * @member {number|null|undefined} exponent + * @memberof lazer.FeedMetadata + * @instance + */ + FeedMetadata.prototype.exponent = null; + + /** + * FeedMetadata cmcId. + * @member {number|null|undefined} cmcId + * @memberof lazer.FeedMetadata + * @instance + */ + FeedMetadata.prototype.cmcId = null; + + /** + * FeedMetadata fundingRateInterval. + * @member {google.protobuf.IDuration|null|undefined} fundingRateInterval + * @memberof lazer.FeedMetadata + * @instance + */ + FeedMetadata.prototype.fundingRateInterval = null; + + /** + * FeedMetadata minPublishers. + * @member {number|null|undefined} minPublishers + * @memberof lazer.FeedMetadata + * @instance + */ + FeedMetadata.prototype.minPublishers = null; + + /** + * FeedMetadata minRate. + * @member {google.protobuf.IDuration|null|undefined} minRate + * @memberof lazer.FeedMetadata + * @instance + */ + FeedMetadata.prototype.minRate = null; + + /** + * FeedMetadata expiryTime. + * @member {google.protobuf.IDuration|null|undefined} expiryTime + * @memberof lazer.FeedMetadata + * @instance + */ + FeedMetadata.prototype.expiryTime = null; + + /** + * FeedMetadata isActivated. + * @member {boolean|null|undefined} isActivated + * @memberof lazer.FeedMetadata + * @instance + */ + FeedMetadata.prototype.isActivated = null; + + /** + * FeedMetadata hermesId. + * @member {string|null|undefined} hermesId + * @memberof lazer.FeedMetadata + * @instance + */ + FeedMetadata.prototype.hermesId = null; + + /** + * FeedMetadata quoteCurrency. + * @member {string|null|undefined} quoteCurrency + * @memberof lazer.FeedMetadata + * @instance + */ + FeedMetadata.prototype.quoteCurrency = null; + + /** + * FeedMetadata marketSchedule. + * @member {string|null|undefined} marketSchedule + * @memberof lazer.FeedMetadata + * @instance + */ + FeedMetadata.prototype.marketSchedule = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * FeedMetadata _priceFeedId. + * @member {"priceFeedId"|undefined} _priceFeedId + * @memberof lazer.FeedMetadata + * @instance + */ + Object.defineProperty(FeedMetadata.prototype, "_priceFeedId", { + get: $util.oneOfGetter($oneOfFields = ["priceFeedId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * FeedMetadata _name. + * @member {"name"|undefined} _name + * @memberof lazer.FeedMetadata + * @instance + */ + Object.defineProperty(FeedMetadata.prototype, "_name", { + get: $util.oneOfGetter($oneOfFields = ["name"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * FeedMetadata _symbol. + * @member {"symbol"|undefined} _symbol + * @memberof lazer.FeedMetadata + * @instance + */ + Object.defineProperty(FeedMetadata.prototype, "_symbol", { + get: $util.oneOfGetter($oneOfFields = ["symbol"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * FeedMetadata _description. + * @member {"description"|undefined} _description + * @memberof lazer.FeedMetadata + * @instance + */ + Object.defineProperty(FeedMetadata.prototype, "_description", { + get: $util.oneOfGetter($oneOfFields = ["description"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * FeedMetadata _assetType. + * @member {"assetType"|undefined} _assetType + * @memberof lazer.FeedMetadata + * @instance + */ + Object.defineProperty(FeedMetadata.prototype, "_assetType", { + get: $util.oneOfGetter($oneOfFields = ["assetType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * FeedMetadata _exponent. + * @member {"exponent"|undefined} _exponent + * @memberof lazer.FeedMetadata + * @instance + */ + Object.defineProperty(FeedMetadata.prototype, "_exponent", { + get: $util.oneOfGetter($oneOfFields = ["exponent"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * FeedMetadata _cmcId. + * @member {"cmcId"|undefined} _cmcId + * @memberof lazer.FeedMetadata + * @instance + */ + Object.defineProperty(FeedMetadata.prototype, "_cmcId", { + get: $util.oneOfGetter($oneOfFields = ["cmcId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * FeedMetadata _fundingRateInterval. + * @member {"fundingRateInterval"|undefined} _fundingRateInterval + * @memberof lazer.FeedMetadata + * @instance + */ + Object.defineProperty(FeedMetadata.prototype, "_fundingRateInterval", { + get: $util.oneOfGetter($oneOfFields = ["fundingRateInterval"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * FeedMetadata _minPublishers. + * @member {"minPublishers"|undefined} _minPublishers + * @memberof lazer.FeedMetadata + * @instance + */ + Object.defineProperty(FeedMetadata.prototype, "_minPublishers", { + get: $util.oneOfGetter($oneOfFields = ["minPublishers"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * FeedMetadata _minRate. + * @member {"minRate"|undefined} _minRate + * @memberof lazer.FeedMetadata + * @instance + */ + Object.defineProperty(FeedMetadata.prototype, "_minRate", { + get: $util.oneOfGetter($oneOfFields = ["minRate"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * FeedMetadata _expiryTime. + * @member {"expiryTime"|undefined} _expiryTime + * @memberof lazer.FeedMetadata + * @instance + */ + Object.defineProperty(FeedMetadata.prototype, "_expiryTime", { + get: $util.oneOfGetter($oneOfFields = ["expiryTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * FeedMetadata _isActivated. + * @member {"isActivated"|undefined} _isActivated + * @memberof lazer.FeedMetadata + * @instance + */ + Object.defineProperty(FeedMetadata.prototype, "_isActivated", { + get: $util.oneOfGetter($oneOfFields = ["isActivated"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * FeedMetadata _hermesId. + * @member {"hermesId"|undefined} _hermesId + * @memberof lazer.FeedMetadata + * @instance + */ + Object.defineProperty(FeedMetadata.prototype, "_hermesId", { + get: $util.oneOfGetter($oneOfFields = ["hermesId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * FeedMetadata _quoteCurrency. + * @member {"quoteCurrency"|undefined} _quoteCurrency + * @memberof lazer.FeedMetadata + * @instance + */ + Object.defineProperty(FeedMetadata.prototype, "_quoteCurrency", { + get: $util.oneOfGetter($oneOfFields = ["quoteCurrency"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * FeedMetadata _marketSchedule. + * @member {"marketSchedule"|undefined} _marketSchedule + * @memberof lazer.FeedMetadata + * @instance + */ + Object.defineProperty(FeedMetadata.prototype, "_marketSchedule", { + get: $util.oneOfGetter($oneOfFields = ["marketSchedule"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FeedMetadata instance using the specified properties. + * @function create + * @memberof lazer.FeedMetadata + * @static + * @param {lazer.IFeedMetadata=} [properties] Properties to set + * @returns {lazer.FeedMetadata} FeedMetadata instance + */ + FeedMetadata.create = function create(properties) { + return new FeedMetadata(properties); + }; + + /** + * Encodes the specified FeedMetadata message. Does not implicitly {@link lazer.FeedMetadata.verify|verify} messages. + * @function encode + * @memberof lazer.FeedMetadata + * @static + * @param {lazer.IFeedMetadata} message FeedMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeedMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.priceFeedId != null && Object.hasOwnProperty.call(message, "priceFeedId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.priceFeedId); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); + if (message.symbol != null && Object.hasOwnProperty.call(message, "symbol")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.symbol); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.description); + if (message.assetType != null && Object.hasOwnProperty.call(message, "assetType")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.assetType); + if (message.exponent != null && Object.hasOwnProperty.call(message, "exponent")) + writer.uint32(/* id 6, wireType 0 =*/48).sint32(message.exponent); + if (message.cmcId != null && Object.hasOwnProperty.call(message, "cmcId")) + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.cmcId); + if (message.fundingRateInterval != null && Object.hasOwnProperty.call(message, "fundingRateInterval")) + $root.google.protobuf.Duration.encode(message.fundingRateInterval, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.minPublishers != null && Object.hasOwnProperty.call(message, "minPublishers")) + writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.minPublishers); + if (message.minRate != null && Object.hasOwnProperty.call(message, "minRate")) + $root.google.protobuf.Duration.encode(message.minRate, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.expiryTime != null && Object.hasOwnProperty.call(message, "expiryTime")) + $root.google.protobuf.Duration.encode(message.expiryTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.isActivated != null && Object.hasOwnProperty.call(message, "isActivated")) + writer.uint32(/* id 12, wireType 0 =*/96).bool(message.isActivated); + if (message.hermesId != null && Object.hasOwnProperty.call(message, "hermesId")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.hermesId); + if (message.quoteCurrency != null && Object.hasOwnProperty.call(message, "quoteCurrency")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.quoteCurrency); + if (message.marketSchedule != null && Object.hasOwnProperty.call(message, "marketSchedule")) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.marketSchedule); + return writer; + }; + + /** + * Encodes the specified FeedMetadata message, length delimited. Does not implicitly {@link lazer.FeedMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof lazer.FeedMetadata + * @static + * @param {lazer.IFeedMetadata} message FeedMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeedMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeedMetadata message from the specified reader or buffer. + * @function decode + * @memberof lazer.FeedMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {lazer.FeedMetadata} FeedMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeedMetadata.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.lazer.FeedMetadata(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.priceFeedId = reader.uint32(); + break; + } + case 2: { + message.name = reader.string(); + break; + } + case 3: { + message.symbol = reader.string(); + break; + } + case 4: { + message.description = reader.string(); + break; + } + case 5: { + message.assetType = reader.int32(); + break; + } + case 6: { + message.exponent = reader.sint32(); + break; + } + case 7: { + message.cmcId = reader.uint32(); + break; + } + case 8: { + message.fundingRateInterval = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 9: { + message.minPublishers = reader.uint32(); + break; + } + case 10: { + message.minRate = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 11: { + message.expiryTime = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 12: { + message.isActivated = reader.bool(); + break; + } + case 13: { + message.hermesId = reader.string(); + break; + } + case 14: { + message.quoteCurrency = reader.string(); + break; + } + case 15: { + message.marketSchedule = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeedMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof lazer.FeedMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {lazer.FeedMetadata} FeedMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeedMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeedMetadata message. + * @function verify + * @memberof lazer.FeedMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeedMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if (message.priceFeedId != null && message.hasOwnProperty("priceFeedId")) { + properties._priceFeedId = 1; + if (!$util.isInteger(message.priceFeedId)) + return "priceFeedId: integer expected"; + } + if (message.name != null && message.hasOwnProperty("name")) { + properties._name = 1; + if (!$util.isString(message.name)) + return "name: string expected"; + } + if (message.symbol != null && message.hasOwnProperty("symbol")) { + properties._symbol = 1; + if (!$util.isString(message.symbol)) + return "symbol: string expected"; + } + if (message.description != null && message.hasOwnProperty("description")) { + properties._description = 1; + if (!$util.isString(message.description)) + return "description: string expected"; + } + if (message.assetType != null && message.hasOwnProperty("assetType")) { + properties._assetType = 1; + switch (message.assetType) { + default: + return "assetType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + break; + } + } + if (message.exponent != null && message.hasOwnProperty("exponent")) { + properties._exponent = 1; + if (!$util.isInteger(message.exponent)) + return "exponent: integer expected"; + } + if (message.cmcId != null && message.hasOwnProperty("cmcId")) { + properties._cmcId = 1; + if (!$util.isInteger(message.cmcId)) + return "cmcId: integer expected"; + } + if (message.fundingRateInterval != null && message.hasOwnProperty("fundingRateInterval")) { + properties._fundingRateInterval = 1; + { + let error = $root.google.protobuf.Duration.verify(message.fundingRateInterval); + if (error) + return "fundingRateInterval." + error; + } + } + if (message.minPublishers != null && message.hasOwnProperty("minPublishers")) { + properties._minPublishers = 1; + if (!$util.isInteger(message.minPublishers)) + return "minPublishers: integer expected"; + } + if (message.minRate != null && message.hasOwnProperty("minRate")) { + properties._minRate = 1; + { + let error = $root.google.protobuf.Duration.verify(message.minRate); + if (error) + return "minRate." + error; + } + } + if (message.expiryTime != null && message.hasOwnProperty("expiryTime")) { + properties._expiryTime = 1; + { + let error = $root.google.protobuf.Duration.verify(message.expiryTime); + if (error) + return "expiryTime." + error; + } + } + if (message.isActivated != null && message.hasOwnProperty("isActivated")) { + properties._isActivated = 1; + if (typeof message.isActivated !== "boolean") + return "isActivated: boolean expected"; + } + if (message.hermesId != null && message.hasOwnProperty("hermesId")) { + properties._hermesId = 1; + if (!$util.isString(message.hermesId)) + return "hermesId: string expected"; + } + if (message.quoteCurrency != null && message.hasOwnProperty("quoteCurrency")) { + properties._quoteCurrency = 1; + if (!$util.isString(message.quoteCurrency)) + return "quoteCurrency: string expected"; + } + if (message.marketSchedule != null && message.hasOwnProperty("marketSchedule")) { + properties._marketSchedule = 1; + if (!$util.isString(message.marketSchedule)) + return "marketSchedule: string expected"; + } + return null; + }; + + /** + * Creates a FeedMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof lazer.FeedMetadata + * @static + * @param {Object.} object Plain object + * @returns {lazer.FeedMetadata} FeedMetadata + */ + FeedMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.lazer.FeedMetadata) + return object; + let message = new $root.lazer.FeedMetadata(); + if (object.priceFeedId != null) + message.priceFeedId = object.priceFeedId >>> 0; + if (object.name != null) + message.name = String(object.name); + if (object.symbol != null) + message.symbol = String(object.symbol); + if (object.description != null) + message.description = String(object.description); + switch (object.assetType) { + default: + if (typeof object.assetType === "number") { + message.assetType = object.assetType; + break; + } + break; + case "CRYPTO": + case 0: + message.assetType = 0; + break; + case "FUNDING_RATE": + case 1: + message.assetType = 1; + break; + case "FX": + case 2: + message.assetType = 2; + break; + case "COMMODITY": + case 3: + message.assetType = 3; + break; + case "NAV": + case 4: + message.assetType = 4; + break; + case "CRYPTO_INDEX": + case 5: + message.assetType = 5; + break; + case "CRYPTO_REDEMPTION_RATE": + case 6: + message.assetType = 6; + break; + case "EQUITY": + case 7: + message.assetType = 7; + break; + case "METAL": + case 8: + message.assetType = 8; + break; + case "RATES": + case 9: + message.assetType = 9; + break; + } + if (object.exponent != null) + message.exponent = object.exponent | 0; + if (object.cmcId != null) + message.cmcId = object.cmcId >>> 0; + if (object.fundingRateInterval != null) { + if (typeof object.fundingRateInterval !== "object") + throw TypeError(".lazer.FeedMetadata.fundingRateInterval: object expected"); + message.fundingRateInterval = $root.google.protobuf.Duration.fromObject(object.fundingRateInterval); + } + if (object.minPublishers != null) + message.minPublishers = object.minPublishers >>> 0; + if (object.minRate != null) { + if (typeof object.minRate !== "object") + throw TypeError(".lazer.FeedMetadata.minRate: object expected"); + message.minRate = $root.google.protobuf.Duration.fromObject(object.minRate); + } + if (object.expiryTime != null) { + if (typeof object.expiryTime !== "object") + throw TypeError(".lazer.FeedMetadata.expiryTime: object expected"); + message.expiryTime = $root.google.protobuf.Duration.fromObject(object.expiryTime); + } + if (object.isActivated != null) + message.isActivated = Boolean(object.isActivated); + if (object.hermesId != null) + message.hermesId = String(object.hermesId); + if (object.quoteCurrency != null) + message.quoteCurrency = String(object.quoteCurrency); + if (object.marketSchedule != null) + message.marketSchedule = String(object.marketSchedule); + return message; + }; + + /** + * Creates a plain object from a FeedMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof lazer.FeedMetadata + * @static + * @param {lazer.FeedMetadata} message FeedMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeedMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (message.priceFeedId != null && message.hasOwnProperty("priceFeedId")) { + object.priceFeedId = message.priceFeedId; + if (options.oneofs) + object._priceFeedId = "priceFeedId"; + } + if (message.name != null && message.hasOwnProperty("name")) { + object.name = message.name; + if (options.oneofs) + object._name = "name"; + } + if (message.symbol != null && message.hasOwnProperty("symbol")) { + object.symbol = message.symbol; + if (options.oneofs) + object._symbol = "symbol"; + } + if (message.description != null && message.hasOwnProperty("description")) { + object.description = message.description; + if (options.oneofs) + object._description = "description"; + } + if (message.assetType != null && message.hasOwnProperty("assetType")) { + object.assetType = options.enums === String ? $root.lazer.AssetType[message.assetType] === undefined ? message.assetType : $root.lazer.AssetType[message.assetType] : message.assetType; + if (options.oneofs) + object._assetType = "assetType"; + } + if (message.exponent != null && message.hasOwnProperty("exponent")) { + object.exponent = message.exponent; + if (options.oneofs) + object._exponent = "exponent"; + } + if (message.cmcId != null && message.hasOwnProperty("cmcId")) { + object.cmcId = message.cmcId; + if (options.oneofs) + object._cmcId = "cmcId"; + } + if (message.fundingRateInterval != null && message.hasOwnProperty("fundingRateInterval")) { + object.fundingRateInterval = $root.google.protobuf.Duration.toObject(message.fundingRateInterval, options); + if (options.oneofs) + object._fundingRateInterval = "fundingRateInterval"; + } + if (message.minPublishers != null && message.hasOwnProperty("minPublishers")) { + object.minPublishers = message.minPublishers; + if (options.oneofs) + object._minPublishers = "minPublishers"; + } + if (message.minRate != null && message.hasOwnProperty("minRate")) { + object.minRate = $root.google.protobuf.Duration.toObject(message.minRate, options); + if (options.oneofs) + object._minRate = "minRate"; + } + if (message.expiryTime != null && message.hasOwnProperty("expiryTime")) { + object.expiryTime = $root.google.protobuf.Duration.toObject(message.expiryTime, options); + if (options.oneofs) + object._expiryTime = "expiryTime"; + } + if (message.isActivated != null && message.hasOwnProperty("isActivated")) { + object.isActivated = message.isActivated; + if (options.oneofs) + object._isActivated = "isActivated"; + } + if (message.hermesId != null && message.hasOwnProperty("hermesId")) { + object.hermesId = message.hermesId; + if (options.oneofs) + object._hermesId = "hermesId"; + } + if (message.quoteCurrency != null && message.hasOwnProperty("quoteCurrency")) { + object.quoteCurrency = message.quoteCurrency; + if (options.oneofs) + object._quoteCurrency = "quoteCurrency"; + } + if (message.marketSchedule != null && message.hasOwnProperty("marketSchedule")) { + object.marketSchedule = message.marketSchedule; + if (options.oneofs) + object._marketSchedule = "marketSchedule"; + } + return object; + }; + + /** + * Converts this FeedMetadata to JSON. + * @function toJSON + * @memberof lazer.FeedMetadata + * @instance + * @returns {Object.} JSON object + */ + FeedMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeedMetadata + * @function getTypeUrl + * @memberof lazer.FeedMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeedMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/lazer.FeedMetadata"; + }; + + return FeedMetadata; + })(); + + lazer.Feed = (function() { + + /** + * Properties of a Feed. + * @memberof lazer + * @interface IFeed + * @property {lazer.IFeedMetadata|null} [metadata] Feed metadata + * @property {google.protobuf.ITimestamp|null} [pendingActivation] Feed pendingActivation + * @property {google.protobuf.ITimestamp|null} [pendingDeactivation] Feed pendingDeactivation + * @property {Array.|null} [perPublisher] Feed perPublisher + */ + + /** + * Constructs a new Feed. + * @memberof lazer + * @classdesc Represents a Feed. + * @implements IFeed + * @constructor + * @param {lazer.IFeed=} [properties] Properties to set + */ + function Feed(properties) { + this.perPublisher = []; + 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]]; + } + + /** + * Feed metadata. + * @member {lazer.IFeedMetadata|null|undefined} metadata + * @memberof lazer.Feed + * @instance + */ + Feed.prototype.metadata = null; + + /** + * Feed pendingActivation. + * @member {google.protobuf.ITimestamp|null|undefined} pendingActivation + * @memberof lazer.Feed + * @instance + */ + Feed.prototype.pendingActivation = null; + + /** + * Feed pendingDeactivation. + * @member {google.protobuf.ITimestamp|null|undefined} pendingDeactivation + * @memberof lazer.Feed + * @instance + */ + Feed.prototype.pendingDeactivation = null; + + /** + * Feed perPublisher. + * @member {Array.} perPublisher + * @memberof lazer.Feed + * @instance + */ + Feed.prototype.perPublisher = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * Feed _metadata. + * @member {"metadata"|undefined} _metadata + * @memberof lazer.Feed + * @instance + */ + Object.defineProperty(Feed.prototype, "_metadata", { + get: $util.oneOfGetter($oneOfFields = ["metadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Feed _pendingActivation. + * @member {"pendingActivation"|undefined} _pendingActivation + * @memberof lazer.Feed + * @instance + */ + Object.defineProperty(Feed.prototype, "_pendingActivation", { + get: $util.oneOfGetter($oneOfFields = ["pendingActivation"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Feed _pendingDeactivation. + * @member {"pendingDeactivation"|undefined} _pendingDeactivation + * @memberof lazer.Feed + * @instance + */ + Object.defineProperty(Feed.prototype, "_pendingDeactivation", { + get: $util.oneOfGetter($oneOfFields = ["pendingDeactivation"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Feed instance using the specified properties. + * @function create + * @memberof lazer.Feed + * @static + * @param {lazer.IFeed=} [properties] Properties to set + * @returns {lazer.Feed} Feed instance + */ + Feed.create = function create(properties) { + return new Feed(properties); + }; + + /** + * Encodes the specified Feed message. Does not implicitly {@link lazer.Feed.verify|verify} messages. + * @function encode + * @memberof lazer.Feed + * @static + * @param {lazer.IFeed} message Feed message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Feed.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.lazer.FeedMetadata.encode(message.metadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pendingActivation != null && Object.hasOwnProperty.call(message, "pendingActivation")) + $root.google.protobuf.Timestamp.encode(message.pendingActivation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.pendingDeactivation != null && Object.hasOwnProperty.call(message, "pendingDeactivation")) + $root.google.protobuf.Timestamp.encode(message.pendingDeactivation, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.perPublisher != null && message.perPublisher.length) + for (let i = 0; i < message.perPublisher.length; ++i) + $root.lazer.FeedPublisherState.encode(message.perPublisher[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Feed message, length delimited. Does not implicitly {@link lazer.Feed.verify|verify} messages. + * @function encodeDelimited + * @memberof lazer.Feed + * @static + * @param {lazer.IFeed} message Feed message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Feed.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Feed message from the specified reader or buffer. + * @function decode + * @memberof lazer.Feed + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {lazer.Feed} Feed + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Feed.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.lazer.Feed(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.metadata = $root.lazer.FeedMetadata.decode(reader, reader.uint32()); + break; + } + case 2: { + message.pendingActivation = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.pendingDeactivation = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.perPublisher && message.perPublisher.length)) + message.perPublisher = []; + message.perPublisher.push($root.lazer.FeedPublisherState.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Feed message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof lazer.Feed + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {lazer.Feed} Feed + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Feed.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Feed message. + * @function verify + * @memberof lazer.Feed + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Feed.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + properties._metadata = 1; + { + let error = $root.lazer.FeedMetadata.verify(message.metadata); + if (error) + return "metadata." + error; + } + } + if (message.pendingActivation != null && message.hasOwnProperty("pendingActivation")) { + properties._pendingActivation = 1; + { + let error = $root.google.protobuf.Timestamp.verify(message.pendingActivation); + if (error) + return "pendingActivation." + error; + } + } + if (message.pendingDeactivation != null && message.hasOwnProperty("pendingDeactivation")) { + properties._pendingDeactivation = 1; + { + let error = $root.google.protobuf.Timestamp.verify(message.pendingDeactivation); + if (error) + return "pendingDeactivation." + error; + } + } + if (message.perPublisher != null && message.hasOwnProperty("perPublisher")) { + if (!Array.isArray(message.perPublisher)) + return "perPublisher: array expected"; + for (let i = 0; i < message.perPublisher.length; ++i) { + let error = $root.lazer.FeedPublisherState.verify(message.perPublisher[i]); + if (error) + return "perPublisher." + error; + } + } + return null; + }; + + /** + * Creates a Feed message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof lazer.Feed + * @static + * @param {Object.} object Plain object + * @returns {lazer.Feed} Feed + */ + Feed.fromObject = function fromObject(object) { + if (object instanceof $root.lazer.Feed) + return object; + let message = new $root.lazer.Feed(); + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".lazer.Feed.metadata: object expected"); + message.metadata = $root.lazer.FeedMetadata.fromObject(object.metadata); + } + if (object.pendingActivation != null) { + if (typeof object.pendingActivation !== "object") + throw TypeError(".lazer.Feed.pendingActivation: object expected"); + message.pendingActivation = $root.google.protobuf.Timestamp.fromObject(object.pendingActivation); + } + if (object.pendingDeactivation != null) { + if (typeof object.pendingDeactivation !== "object") + throw TypeError(".lazer.Feed.pendingDeactivation: object expected"); + message.pendingDeactivation = $root.google.protobuf.Timestamp.fromObject(object.pendingDeactivation); + } + if (object.perPublisher) { + if (!Array.isArray(object.perPublisher)) + throw TypeError(".lazer.Feed.perPublisher: array expected"); + message.perPublisher = []; + for (let i = 0; i < object.perPublisher.length; ++i) { + if (typeof object.perPublisher[i] !== "object") + throw TypeError(".lazer.Feed.perPublisher: object expected"); + message.perPublisher[i] = $root.lazer.FeedPublisherState.fromObject(object.perPublisher[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Feed message. Also converts values to other types if specified. + * @function toObject + * @memberof lazer.Feed + * @static + * @param {lazer.Feed} message Feed + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Feed.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.perPublisher = []; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + object.metadata = $root.lazer.FeedMetadata.toObject(message.metadata, options); + if (options.oneofs) + object._metadata = "metadata"; + } + if (message.pendingActivation != null && message.hasOwnProperty("pendingActivation")) { + object.pendingActivation = $root.google.protobuf.Timestamp.toObject(message.pendingActivation, options); + if (options.oneofs) + object._pendingActivation = "pendingActivation"; + } + if (message.pendingDeactivation != null && message.hasOwnProperty("pendingDeactivation")) { + object.pendingDeactivation = $root.google.protobuf.Timestamp.toObject(message.pendingDeactivation, options); + if (options.oneofs) + object._pendingDeactivation = "pendingDeactivation"; + } + if (message.perPublisher && message.perPublisher.length) { + object.perPublisher = []; + for (let j = 0; j < message.perPublisher.length; ++j) + object.perPublisher[j] = $root.lazer.FeedPublisherState.toObject(message.perPublisher[j], options); + } + return object; + }; + + /** + * Converts this Feed to JSON. + * @function toJSON + * @memberof lazer.Feed + * @instance + * @returns {Object.} JSON object + */ + Feed.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Feed + * @function getTypeUrl + * @memberof lazer.Feed + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Feed.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/lazer.Feed"; + }; + + return Feed; + })(); + + lazer.FeedPublisherState = (function() { + + /** + * Properties of a FeedPublisherState. + * @memberof lazer + * @interface IFeedPublisherState + * @property {number|null} [publisherId] FeedPublisherState publisherId + * @property {google.protobuf.ITimestamp|null} [lastUpdateTimestamp] FeedPublisherState lastUpdateTimestamp + * @property {google.protobuf.ITimestamp|null} [lastPublisherTimestamp] FeedPublisherState lastPublisherTimestamp + * @property {lazer.IFeedData|null} [lastFeedData] FeedPublisherState lastFeedData + */ + + /** + * Constructs a new FeedPublisherState. + * @memberof lazer + * @classdesc Represents a FeedPublisherState. + * @implements IFeedPublisherState + * @constructor + * @param {lazer.IFeedPublisherState=} [properties] Properties to set + */ + function FeedPublisherState(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]]; + } + + /** + * FeedPublisherState publisherId. + * @member {number|null|undefined} publisherId + * @memberof lazer.FeedPublisherState + * @instance + */ + FeedPublisherState.prototype.publisherId = null; + + /** + * FeedPublisherState lastUpdateTimestamp. + * @member {google.protobuf.ITimestamp|null|undefined} lastUpdateTimestamp + * @memberof lazer.FeedPublisherState + * @instance + */ + FeedPublisherState.prototype.lastUpdateTimestamp = null; + + /** + * FeedPublisherState lastPublisherTimestamp. + * @member {google.protobuf.ITimestamp|null|undefined} lastPublisherTimestamp + * @memberof lazer.FeedPublisherState + * @instance + */ + FeedPublisherState.prototype.lastPublisherTimestamp = null; + + /** + * FeedPublisherState lastFeedData. + * @member {lazer.IFeedData|null|undefined} lastFeedData + * @memberof lazer.FeedPublisherState + * @instance + */ + FeedPublisherState.prototype.lastFeedData = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * FeedPublisherState _publisherId. + * @member {"publisherId"|undefined} _publisherId + * @memberof lazer.FeedPublisherState + * @instance + */ + Object.defineProperty(FeedPublisherState.prototype, "_publisherId", { + get: $util.oneOfGetter($oneOfFields = ["publisherId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * FeedPublisherState _lastUpdateTimestamp. + * @member {"lastUpdateTimestamp"|undefined} _lastUpdateTimestamp + * @memberof lazer.FeedPublisherState + * @instance + */ + Object.defineProperty(FeedPublisherState.prototype, "_lastUpdateTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["lastUpdateTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * FeedPublisherState _lastPublisherTimestamp. + * @member {"lastPublisherTimestamp"|undefined} _lastPublisherTimestamp + * @memberof lazer.FeedPublisherState + * @instance + */ + Object.defineProperty(FeedPublisherState.prototype, "_lastPublisherTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["lastPublisherTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * FeedPublisherState _lastFeedData. + * @member {"lastFeedData"|undefined} _lastFeedData + * @memberof lazer.FeedPublisherState + * @instance + */ + Object.defineProperty(FeedPublisherState.prototype, "_lastFeedData", { + get: $util.oneOfGetter($oneOfFields = ["lastFeedData"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FeedPublisherState instance using the specified properties. + * @function create + * @memberof lazer.FeedPublisherState + * @static + * @param {lazer.IFeedPublisherState=} [properties] Properties to set + * @returns {lazer.FeedPublisherState} FeedPublisherState instance + */ + FeedPublisherState.create = function create(properties) { + return new FeedPublisherState(properties); + }; + + /** + * Encodes the specified FeedPublisherState message. Does not implicitly {@link lazer.FeedPublisherState.verify|verify} messages. + * @function encode + * @memberof lazer.FeedPublisherState + * @static + * @param {lazer.IFeedPublisherState} message FeedPublisherState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeedPublisherState.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.publisherId != null && Object.hasOwnProperty.call(message, "publisherId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.publisherId); + if (message.lastUpdateTimestamp != null && Object.hasOwnProperty.call(message, "lastUpdateTimestamp")) + $root.google.protobuf.Timestamp.encode(message.lastUpdateTimestamp, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.lastPublisherTimestamp != null && Object.hasOwnProperty.call(message, "lastPublisherTimestamp")) + $root.google.protobuf.Timestamp.encode(message.lastPublisherTimestamp, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.lastFeedData != null && Object.hasOwnProperty.call(message, "lastFeedData")) + $root.lazer.FeedData.encode(message.lastFeedData, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FeedPublisherState message, length delimited. Does not implicitly {@link lazer.FeedPublisherState.verify|verify} messages. + * @function encodeDelimited + * @memberof lazer.FeedPublisherState + * @static + * @param {lazer.IFeedPublisherState} message FeedPublisherState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeedPublisherState.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeedPublisherState message from the specified reader or buffer. + * @function decode + * @memberof lazer.FeedPublisherState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {lazer.FeedPublisherState} FeedPublisherState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeedPublisherState.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.lazer.FeedPublisherState(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.publisherId = reader.uint32(); + break; + } + case 2: { + message.lastUpdateTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.lastPublisherTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.lastFeedData = $root.lazer.FeedData.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeedPublisherState message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof lazer.FeedPublisherState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {lazer.FeedPublisherState} FeedPublisherState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeedPublisherState.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeedPublisherState message. + * @function verify + * @memberof lazer.FeedPublisherState + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeedPublisherState.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if (message.publisherId != null && message.hasOwnProperty("publisherId")) { + properties._publisherId = 1; + if (!$util.isInteger(message.publisherId)) + return "publisherId: integer expected"; + } + if (message.lastUpdateTimestamp != null && message.hasOwnProperty("lastUpdateTimestamp")) { + properties._lastUpdateTimestamp = 1; + { + let error = $root.google.protobuf.Timestamp.verify(message.lastUpdateTimestamp); + if (error) + return "lastUpdateTimestamp." + error; + } + } + if (message.lastPublisherTimestamp != null && message.hasOwnProperty("lastPublisherTimestamp")) { + properties._lastPublisherTimestamp = 1; + { + let error = $root.google.protobuf.Timestamp.verify(message.lastPublisherTimestamp); + if (error) + return "lastPublisherTimestamp." + error; + } + } + if (message.lastFeedData != null && message.hasOwnProperty("lastFeedData")) { + properties._lastFeedData = 1; + { + let error = $root.lazer.FeedData.verify(message.lastFeedData); + if (error) + return "lastFeedData." + error; + } + } + return null; + }; + + /** + * Creates a FeedPublisherState message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof lazer.FeedPublisherState + * @static + * @param {Object.} object Plain object + * @returns {lazer.FeedPublisherState} FeedPublisherState + */ + FeedPublisherState.fromObject = function fromObject(object) { + if (object instanceof $root.lazer.FeedPublisherState) + return object; + let message = new $root.lazer.FeedPublisherState(); + if (object.publisherId != null) + message.publisherId = object.publisherId >>> 0; + if (object.lastUpdateTimestamp != null) { + if (typeof object.lastUpdateTimestamp !== "object") + throw TypeError(".lazer.FeedPublisherState.lastUpdateTimestamp: object expected"); + message.lastUpdateTimestamp = $root.google.protobuf.Timestamp.fromObject(object.lastUpdateTimestamp); + } + if (object.lastPublisherTimestamp != null) { + if (typeof object.lastPublisherTimestamp !== "object") + throw TypeError(".lazer.FeedPublisherState.lastPublisherTimestamp: object expected"); + message.lastPublisherTimestamp = $root.google.protobuf.Timestamp.fromObject(object.lastPublisherTimestamp); + } + if (object.lastFeedData != null) { + if (typeof object.lastFeedData !== "object") + throw TypeError(".lazer.FeedPublisherState.lastFeedData: object expected"); + message.lastFeedData = $root.lazer.FeedData.fromObject(object.lastFeedData); + } + return message; + }; + + /** + * Creates a plain object from a FeedPublisherState message. Also converts values to other types if specified. + * @function toObject + * @memberof lazer.FeedPublisherState + * @static + * @param {lazer.FeedPublisherState} message FeedPublisherState + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeedPublisherState.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (message.publisherId != null && message.hasOwnProperty("publisherId")) { + object.publisherId = message.publisherId; + if (options.oneofs) + object._publisherId = "publisherId"; + } + if (message.lastUpdateTimestamp != null && message.hasOwnProperty("lastUpdateTimestamp")) { + object.lastUpdateTimestamp = $root.google.protobuf.Timestamp.toObject(message.lastUpdateTimestamp, options); + if (options.oneofs) + object._lastUpdateTimestamp = "lastUpdateTimestamp"; + } + if (message.lastPublisherTimestamp != null && message.hasOwnProperty("lastPublisherTimestamp")) { + object.lastPublisherTimestamp = $root.google.protobuf.Timestamp.toObject(message.lastPublisherTimestamp, options); + if (options.oneofs) + object._lastPublisherTimestamp = "lastPublisherTimestamp"; + } + if (message.lastFeedData != null && message.hasOwnProperty("lastFeedData")) { + object.lastFeedData = $root.lazer.FeedData.toObject(message.lastFeedData, options); + if (options.oneofs) + object._lastFeedData = "lastFeedData"; + } + return object; + }; + + /** + * Converts this FeedPublisherState to JSON. + * @function toJSON + * @memberof lazer.FeedPublisherState + * @instance + * @returns {Object.} JSON object + */ + FeedPublisherState.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeedPublisherState + * @function getTypeUrl + * @memberof lazer.FeedPublisherState + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeedPublisherState.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/lazer.FeedPublisherState"; + }; + + return FeedPublisherState; + })(); + + lazer.FeedData = (function() { + + /** + * Properties of a FeedData. + * @memberof lazer + * @interface IFeedData + * @property {google.protobuf.ITimestamp|null} [sourceTimestamp] FeedData sourceTimestamp + * @property {google.protobuf.ITimestamp|null} [publisherTimestamp] FeedData publisherTimestamp + * @property {number|Long|null} [price] FeedData price + * @property {number|Long|null} [bestBidPrice] FeedData bestBidPrice + * @property {number|Long|null} [bestAskPrice] FeedData bestAskPrice + * @property {number|Long|null} [fundingRate] FeedData fundingRate + */ + + /** + * Constructs a new FeedData. + * @memberof lazer + * @classdesc Represents a FeedData. + * @implements IFeedData + * @constructor + * @param {lazer.IFeedData=} [properties] Properties to set + */ + function FeedData(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]]; + } + + /** + * FeedData sourceTimestamp. + * @member {google.protobuf.ITimestamp|null|undefined} sourceTimestamp + * @memberof lazer.FeedData + * @instance + */ + FeedData.prototype.sourceTimestamp = null; + + /** + * FeedData publisherTimestamp. + * @member {google.protobuf.ITimestamp|null|undefined} publisherTimestamp + * @memberof lazer.FeedData + * @instance + */ + FeedData.prototype.publisherTimestamp = null; + + /** + * FeedData price. + * @member {number|Long|null|undefined} price + * @memberof lazer.FeedData + * @instance + */ + FeedData.prototype.price = null; + + /** + * FeedData bestBidPrice. + * @member {number|Long|null|undefined} bestBidPrice + * @memberof lazer.FeedData + * @instance + */ + FeedData.prototype.bestBidPrice = null; + + /** + * FeedData bestAskPrice. + * @member {number|Long|null|undefined} bestAskPrice + * @memberof lazer.FeedData + * @instance + */ + FeedData.prototype.bestAskPrice = null; + + /** + * FeedData fundingRate. + * @member {number|Long|null|undefined} fundingRate + * @memberof lazer.FeedData + * @instance + */ + FeedData.prototype.fundingRate = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * FeedData _sourceTimestamp. + * @member {"sourceTimestamp"|undefined} _sourceTimestamp + * @memberof lazer.FeedData + * @instance + */ + Object.defineProperty(FeedData.prototype, "_sourceTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["sourceTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * FeedData _publisherTimestamp. + * @member {"publisherTimestamp"|undefined} _publisherTimestamp + * @memberof lazer.FeedData + * @instance + */ + Object.defineProperty(FeedData.prototype, "_publisherTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["publisherTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * FeedData _price. + * @member {"price"|undefined} _price + * @memberof lazer.FeedData + * @instance + */ + Object.defineProperty(FeedData.prototype, "_price", { + get: $util.oneOfGetter($oneOfFields = ["price"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * FeedData _bestBidPrice. + * @member {"bestBidPrice"|undefined} _bestBidPrice + * @memberof lazer.FeedData + * @instance + */ + Object.defineProperty(FeedData.prototype, "_bestBidPrice", { + get: $util.oneOfGetter($oneOfFields = ["bestBidPrice"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * FeedData _bestAskPrice. + * @member {"bestAskPrice"|undefined} _bestAskPrice + * @memberof lazer.FeedData + * @instance + */ + Object.defineProperty(FeedData.prototype, "_bestAskPrice", { + get: $util.oneOfGetter($oneOfFields = ["bestAskPrice"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * FeedData _fundingRate. + * @member {"fundingRate"|undefined} _fundingRate + * @memberof lazer.FeedData + * @instance + */ + Object.defineProperty(FeedData.prototype, "_fundingRate", { + get: $util.oneOfGetter($oneOfFields = ["fundingRate"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FeedData instance using the specified properties. + * @function create + * @memberof lazer.FeedData + * @static + * @param {lazer.IFeedData=} [properties] Properties to set + * @returns {lazer.FeedData} FeedData instance + */ + FeedData.create = function create(properties) { + return new FeedData(properties); + }; + + /** + * Encodes the specified FeedData message. Does not implicitly {@link lazer.FeedData.verify|verify} messages. + * @function encode + * @memberof lazer.FeedData + * @static + * @param {lazer.IFeedData} message FeedData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeedData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sourceTimestamp != null && Object.hasOwnProperty.call(message, "sourceTimestamp")) + $root.google.protobuf.Timestamp.encode(message.sourceTimestamp, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.publisherTimestamp != null && Object.hasOwnProperty.call(message, "publisherTimestamp")) + $root.google.protobuf.Timestamp.encode(message.publisherTimestamp, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.price != null && Object.hasOwnProperty.call(message, "price")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.price); + if (message.bestBidPrice != null && Object.hasOwnProperty.call(message, "bestBidPrice")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.bestBidPrice); + if (message.bestAskPrice != null && Object.hasOwnProperty.call(message, "bestAskPrice")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.bestAskPrice); + if (message.fundingRate != null && Object.hasOwnProperty.call(message, "fundingRate")) + writer.uint32(/* id 6, wireType 0 =*/48).int64(message.fundingRate); + return writer; + }; + + /** + * Encodes the specified FeedData message, length delimited. Does not implicitly {@link lazer.FeedData.verify|verify} messages. + * @function encodeDelimited + * @memberof lazer.FeedData + * @static + * @param {lazer.IFeedData} message FeedData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeedData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeedData message from the specified reader or buffer. + * @function decode + * @memberof lazer.FeedData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {lazer.FeedData} FeedData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeedData.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.lazer.FeedData(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.sourceTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.publisherTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.price = reader.int64(); + break; + } + case 4: { + message.bestBidPrice = reader.int64(); + break; + } + case 5: { + message.bestAskPrice = reader.int64(); + break; + } + case 6: { + message.fundingRate = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeedData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof lazer.FeedData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {lazer.FeedData} FeedData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeedData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeedData message. + * @function verify + * @memberof lazer.FeedData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeedData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if (message.sourceTimestamp != null && message.hasOwnProperty("sourceTimestamp")) { + properties._sourceTimestamp = 1; + { + let error = $root.google.protobuf.Timestamp.verify(message.sourceTimestamp); + if (error) + return "sourceTimestamp." + error; + } + } + if (message.publisherTimestamp != null && message.hasOwnProperty("publisherTimestamp")) { + properties._publisherTimestamp = 1; + { + let error = $root.google.protobuf.Timestamp.verify(message.publisherTimestamp); + if (error) + return "publisherTimestamp." + error; + } + } + if (message.price != null && message.hasOwnProperty("price")) { + properties._price = 1; + if (!$util.isInteger(message.price) && !(message.price && $util.isInteger(message.price.low) && $util.isInteger(message.price.high))) + return "price: integer|Long expected"; + } + if (message.bestBidPrice != null && message.hasOwnProperty("bestBidPrice")) { + properties._bestBidPrice = 1; + if (!$util.isInteger(message.bestBidPrice) && !(message.bestBidPrice && $util.isInteger(message.bestBidPrice.low) && $util.isInteger(message.bestBidPrice.high))) + return "bestBidPrice: integer|Long expected"; + } + if (message.bestAskPrice != null && message.hasOwnProperty("bestAskPrice")) { + properties._bestAskPrice = 1; + if (!$util.isInteger(message.bestAskPrice) && !(message.bestAskPrice && $util.isInteger(message.bestAskPrice.low) && $util.isInteger(message.bestAskPrice.high))) + return "bestAskPrice: integer|Long expected"; + } + if (message.fundingRate != null && message.hasOwnProperty("fundingRate")) { + properties._fundingRate = 1; + if (!$util.isInteger(message.fundingRate) && !(message.fundingRate && $util.isInteger(message.fundingRate.low) && $util.isInteger(message.fundingRate.high))) + return "fundingRate: integer|Long expected"; + } + return null; + }; + + /** + * Creates a FeedData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof lazer.FeedData + * @static + * @param {Object.} object Plain object + * @returns {lazer.FeedData} FeedData + */ + FeedData.fromObject = function fromObject(object) { + if (object instanceof $root.lazer.FeedData) + return object; + let message = new $root.lazer.FeedData(); + if (object.sourceTimestamp != null) { + if (typeof object.sourceTimestamp !== "object") + throw TypeError(".lazer.FeedData.sourceTimestamp: object expected"); + message.sourceTimestamp = $root.google.protobuf.Timestamp.fromObject(object.sourceTimestamp); + } + if (object.publisherTimestamp != null) { + if (typeof object.publisherTimestamp !== "object") + throw TypeError(".lazer.FeedData.publisherTimestamp: object expected"); + message.publisherTimestamp = $root.google.protobuf.Timestamp.fromObject(object.publisherTimestamp); + } + if (object.price != null) + if ($util.Long) + (message.price = $util.Long.fromValue(object.price)).unsigned = false; + else if (typeof object.price === "string") + message.price = parseInt(object.price, 10); + else if (typeof object.price === "number") + message.price = object.price; + else if (typeof object.price === "object") + message.price = new $util.LongBits(object.price.low >>> 0, object.price.high >>> 0).toNumber(); + if (object.bestBidPrice != null) + if ($util.Long) + (message.bestBidPrice = $util.Long.fromValue(object.bestBidPrice)).unsigned = false; + else if (typeof object.bestBidPrice === "string") + message.bestBidPrice = parseInt(object.bestBidPrice, 10); + else if (typeof object.bestBidPrice === "number") + message.bestBidPrice = object.bestBidPrice; + else if (typeof object.bestBidPrice === "object") + message.bestBidPrice = new $util.LongBits(object.bestBidPrice.low >>> 0, object.bestBidPrice.high >>> 0).toNumber(); + if (object.bestAskPrice != null) + if ($util.Long) + (message.bestAskPrice = $util.Long.fromValue(object.bestAskPrice)).unsigned = false; + else if (typeof object.bestAskPrice === "string") + message.bestAskPrice = parseInt(object.bestAskPrice, 10); + else if (typeof object.bestAskPrice === "number") + message.bestAskPrice = object.bestAskPrice; + else if (typeof object.bestAskPrice === "object") + message.bestAskPrice = new $util.LongBits(object.bestAskPrice.low >>> 0, object.bestAskPrice.high >>> 0).toNumber(); + if (object.fundingRate != null) + if ($util.Long) + (message.fundingRate = $util.Long.fromValue(object.fundingRate)).unsigned = false; + else if (typeof object.fundingRate === "string") + message.fundingRate = parseInt(object.fundingRate, 10); + else if (typeof object.fundingRate === "number") + message.fundingRate = object.fundingRate; + else if (typeof object.fundingRate === "object") + message.fundingRate = new $util.LongBits(object.fundingRate.low >>> 0, object.fundingRate.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a FeedData message. Also converts values to other types if specified. + * @function toObject + * @memberof lazer.FeedData + * @static + * @param {lazer.FeedData} message FeedData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeedData.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (message.sourceTimestamp != null && message.hasOwnProperty("sourceTimestamp")) { + object.sourceTimestamp = $root.google.protobuf.Timestamp.toObject(message.sourceTimestamp, options); + if (options.oneofs) + object._sourceTimestamp = "sourceTimestamp"; + } + if (message.publisherTimestamp != null && message.hasOwnProperty("publisherTimestamp")) { + object.publisherTimestamp = $root.google.protobuf.Timestamp.toObject(message.publisherTimestamp, options); + if (options.oneofs) + object._publisherTimestamp = "publisherTimestamp"; + } + if (message.price != null && message.hasOwnProperty("price")) { + if (typeof message.price === "number") + object.price = options.longs === String ? String(message.price) : message.price; + else + object.price = options.longs === String ? $util.Long.prototype.toString.call(message.price) : options.longs === Number ? new $util.LongBits(message.price.low >>> 0, message.price.high >>> 0).toNumber() : message.price; + if (options.oneofs) + object._price = "price"; + } + if (message.bestBidPrice != null && message.hasOwnProperty("bestBidPrice")) { + if (typeof message.bestBidPrice === "number") + object.bestBidPrice = options.longs === String ? String(message.bestBidPrice) : message.bestBidPrice; + else + object.bestBidPrice = options.longs === String ? $util.Long.prototype.toString.call(message.bestBidPrice) : options.longs === Number ? new $util.LongBits(message.bestBidPrice.low >>> 0, message.bestBidPrice.high >>> 0).toNumber() : message.bestBidPrice; + if (options.oneofs) + object._bestBidPrice = "bestBidPrice"; + } + if (message.bestAskPrice != null && message.hasOwnProperty("bestAskPrice")) { + if (typeof message.bestAskPrice === "number") + object.bestAskPrice = options.longs === String ? String(message.bestAskPrice) : message.bestAskPrice; + else + object.bestAskPrice = options.longs === String ? $util.Long.prototype.toString.call(message.bestAskPrice) : options.longs === Number ? new $util.LongBits(message.bestAskPrice.low >>> 0, message.bestAskPrice.high >>> 0).toNumber() : message.bestAskPrice; + if (options.oneofs) + object._bestAskPrice = "bestAskPrice"; + } + if (message.fundingRate != null && message.hasOwnProperty("fundingRate")) { + if (typeof message.fundingRate === "number") + object.fundingRate = options.longs === String ? String(message.fundingRate) : message.fundingRate; + else + object.fundingRate = options.longs === String ? $util.Long.prototype.toString.call(message.fundingRate) : options.longs === Number ? new $util.LongBits(message.fundingRate.low >>> 0, message.fundingRate.high >>> 0).toNumber() : message.fundingRate; + if (options.oneofs) + object._fundingRate = "fundingRate"; + } + return object; + }; + + /** + * Converts this FeedData to JSON. + * @function toJSON + * @memberof lazer.FeedData + * @instance + * @returns {Object.} JSON object + */ + FeedData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeedData + * @function getTypeUrl + * @memberof lazer.FeedData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeedData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/lazer.FeedData"; + }; + + return FeedData; + })(); + + return lazer; +})(); + +export const google = $root.google = (() => { + + /** + * Namespace google. + * @exports google + * @namespace + */ + const google = {}; + + google.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + const protobuf = {}; + + protobuf.Duration = (function() { + + /** + * Properties of a Duration. + * @memberof google.protobuf + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos + */ + + /** + * Constructs a new Duration. + * @memberof google.protobuf + * @classdesc Represents a Duration. + * @implements IDuration + * @constructor + * @param {google.protobuf.IDuration=} [properties] Properties to set + */ + function Duration(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]]; + } + + /** + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; + + /** + * Creates a new Duration instance using the specified properties. + * @function create + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance + */ + Duration.create = function create(properties) { + return new Duration(properties); + }; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Duration message. + * @function verify + * @memberof google.protobuf.Duration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Duration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Duration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Duration} Duration + */ + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) + return object; + let message = new $root.google.protobuf.Duration(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.Duration} message Duration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Duration.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Duration to JSON. + * @function toJSON + * @memberof google.protobuf.Duration + * @instance + * @returns {Object.} JSON object + */ + Duration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Duration + * @function getTypeUrl + * @memberof google.protobuf.Duration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Duration"; + }; + + return Duration; + })(); + + protobuf.Timestamp = (function() { + + /** + * Properties of a Timestamp. + * @memberof google.protobuf + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos + */ + + /** + * Constructs a new Timestamp. + * @memberof google.protobuf + * @classdesc Represents a Timestamp. + * @implements ITimestamp + * @constructor + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + */ + function Timestamp(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]]; + } + + /** + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.nanos = 0; + + /** + * Creates a new Timestamp instance using the specified properties. + * @function create + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance + */ + Timestamp.create = function create(properties) { + return new Timestamp(properties); + }; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Timestamp message. + * @function verify + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Timestamp.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Timestamp} Timestamp + */ + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) + return object; + let message = new $root.google.protobuf.Timestamp(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.Timestamp} message Timestamp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Timestamp.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Timestamp to JSON. + * @function toJSON + * @memberof google.protobuf.Timestamp + * @instance + * @returns {Object.} JSON object + */ + Timestamp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Timestamp + * @function getTypeUrl + * @memberof google.protobuf.Timestamp + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Timestamp"; + }; + + return Timestamp; + })(); + + return protobuf; + })(); + + return google; +})(); + +export { $root as default }; diff --git a/lazer/state_sdk/js/tsconfig.json b/lazer/state_sdk/js/tsconfig.json new file mode 100644 index 0000000000..90a2b3c2c5 --- /dev/null +++ b/lazer/state_sdk/js/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "../../../tsconfig.base.json", + "include": ["./src/**/*.js", "./src/**/*.d.ts", "./src/**/*.cjs"], + "exclude": ["node_modules", "**/__tests__/*"], + "compilerOptions": { + "rootDir": "src/", + "noEmit": true + }, + "allowJs": true +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 660a50e0a8..d324d2a4ab 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1701,6 +1701,9 @@ importers: '@pythnetwork/pyth-lazer-sdk': specifier: workspace:* version: link:../../../../lazer/sdk/js + '@pythnetwork/pyth-lazer-state-sdk': + specifier: workspace:* + version: link:../../../../lazer/state_sdk/js '@pythnetwork/pyth-solana-receiver': specifier: workspace:* version: link:../../../../target_chains/solana/sdk/js/pyth_solana_receiver @@ -1753,9 +1756,6 @@ importers: prettier: specifier: 'catalog:' version: 3.5.3 - protobufjs-cli: - specifier: ^1.1.3 - version: 1.1.3(protobufjs@7.5.2) ts-jest: specifier: ^29.0.3 version: 29.3.1(@babel/core@7.27.1)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.27.1))(jest@29.7.0(@types/node@22.14.0)(ts-node@10.9.2(@types/node@22.14.0)(typescript@4.9.5)))(typescript@4.9.5) @@ -1771,6 +1771,9 @@ importers: '@pythnetwork/client': specifier: 'catalog:' version: 2.22.1(@solana/web3.js@1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10))(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10) + '@pythnetwork/pyth-lazer-state-sdk': + specifier: workspace:* + version: link:../../../../lazer/state_sdk/js '@pythnetwork/solana-utils': specifier: workspace:^ version: link:../../../../target_chains/solana/sdk/js/solana_utils @@ -1985,6 +1988,12 @@ importers: specifier: 'catalog:' version: 5.8.2 + lazer/state_sdk/js: + devDependencies: + protobufjs-cli: + specifier: ^1.1.3 + version: 1.1.3(protobufjs@7.5.2) + packages/component-library: dependencies: '@amplitude/analytics-browser': @@ -25204,7 +25213,7 @@ snapshots: dependencies: '@babel/code-frame': 7.26.2 '@babel/generator': 7.27.0 - '@babel/parser': 7.27.0 + '@babel/parser': 7.27.2 '@babel/template': 7.27.0 '@babel/types': 7.27.1 debug: 4.4.0(supports-color@8.1.1) @@ -25216,7 +25225,7 @@ snapshots: dependencies: '@babel/code-frame': 7.26.2 '@babel/generator': 7.27.0 - '@babel/parser': 7.27.0 + '@babel/parser': 7.27.2 '@babel/template': 7.27.0 '@babel/types': 7.27.1 debug: 4.4.0(supports-color@5.5.0) @@ -41673,7 +41682,7 @@ snapshots: '@grpc/grpc-js': 1.13.2 '@grpc/proto-loader': 0.7.13 docker-modem: 5.0.6 - protobufjs: 7.4.0 + protobufjs: 7.5.2 tar-fs: 2.1.2 uuid: 10.0.0 transitivePeerDependencies: diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 0705708581..8a3999ee7a 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -44,6 +44,7 @@ packages: - contract_manager - lazer/contracts/solana - lazer/sdk/js + - lazer/state_sdk/js catalog: "@amplitude/analytics-browser": ^2.13.0 diff --git a/turbo.json b/turbo.json index 854b817fd7..f0177f4c56 100644 --- a/turbo.json +++ b/turbo.json @@ -58,7 +58,7 @@ "^build", "build:cjs", "build:esm", - "build:copy-generated" + "build:pbts" ], "inputs": [ "$TURBO_DEFAULT$", @@ -116,32 +116,28 @@ ], "outputs": ["lib/**", "dist/**", ".next/**", "!.next/cache/**"] }, - "build:pbjs": { + "build:pbjs-esm": { "dependsOn": ["//#install:modules"], "inputs": [ - "../../../../lazer/publisher_sdk/proto/governance_instruction.proto", - "../../../../lazer/publisher_sdk/proto/dynamic_value.proto" + "../../publisher_sdk/proto/governance_instruction.proto", + "../../publisher_sdk/proto/dynamic_value.proto" ], - "outputs": ["src/programs/lazer/generated/governance_instruction.js"] + "outputs": ["src/generated/governance_instruction.js"] }, - "build:pbts": { - "dependsOn": ["//#install:modules", "build:pbjs"], + "build:pbjs-cjs": { + "dependsOn": ["//#install:modules"], "inputs": [ - "../../../../lazer/publisher_sdk/proto/governance_instruction.proto", - "../../../../lazer/publisher_sdk/proto/dynamic_value.proto" + "../../publisher_sdk/proto/governance_instruction.proto", + "../../publisher_sdk/proto/dynamic_value.proto" ], - "outputs": ["src/programs/lazer/generated/governance_instruction.d.ts"] + "outputs": ["src/generated/governance_instruction.cjs"] }, - "build:copy-generated": { - "dependsOn": ["//#install:modules", "build:pbts"], + "build:pbts": { + "dependsOn": ["//#install:modules", "build:pbjs-esm", "build:pbjs-cjs"], "inputs": [ - "src/programs/lazer/generated/governance_instruction.d.ts", - "src/programs/lazer/generated/governance_instruction.js" + "src/generated/governance_instruction.js" ], - "outputs": [ - "lib/programs/lazer/generated/governance_instruction.d.ts", - "lib/programs/lazer/generated/governance_instruction.js" - ] + "outputs": ["src/generated/governance_instruction.d.ts"] }, "fix": { "dependsOn": ["fix:lint", "fix:format"], From 8e671f02c9a2931965848a414209568e0c8f5a37 Mon Sep 17 00:00:00 2001 From: Daniel Chew Date: Thu, 29 May 2025 19:50:22 +0900 Subject: [PATCH 18/27] fix: format --- lazer/state_sdk/js/package.json | 11 +- .../src/generated/governance_instruction.cjs | 21789 ++++++++------- .../src/generated/governance_instruction.d.ts | 8341 +++--- .../src/generated/governance_instruction.js | 21793 +++++++++------- lazer/state_sdk/js/src/generated/state.cjs | 7232 ++--- lazer/state_sdk/js/src/generated/state.d.ts | 2281 +- lazer/state_sdk/js/src/generated/state.js | 7236 ++--- pnpm-lock.yaml | 3 + 8 files changed, 36669 insertions(+), 32017 deletions(-) diff --git a/lazer/state_sdk/js/package.json b/lazer/state_sdk/js/package.json index b8c3dbc2c1..d83514a010 100644 --- a/lazer/state_sdk/js/package.json +++ b/lazer/state_sdk/js/package.json @@ -18,10 +18,13 @@ "scripts": { "build:pbjs-esm": "npx pbjs -t static-module -w es6 -o src/generated/governance_instruction.js ../../publisher_sdk/proto/governance_instruction.proto ../../publisher_sdk/proto/dynamic_value.proto", "build:pbjs-cjs": "npx pbjs -t static-module -w commonjs -o src/generated/governance_instruction.cjs ../../publisher_sdk/proto/governance_instruction.proto ../../publisher_sdk/proto/dynamic_value.proto", - "build:pbts": "npx pbts -o src/generated/governance_instruction.d.ts src/generated/governance_instruction.js" + "build:pbts": "npx pbts -o src/generated/governance_instruction.d.ts src/generated/governance_instruction.js", + "test:format": "prettier --check .", + "fix:format": "prettier --write ." }, "devDependencies": { - "protobufjs-cli": "^1.1.3" + "protobufjs-cli": "^1.1.3", + "prettier": "catalog:" }, "bugs": { "url": "https://github.com/pyth-network/pyth-crosschain/issues" @@ -37,7 +40,5 @@ "oracle" ], "license": "Apache-2.0", - "dependencies": { - - } + "dependencies": {} } diff --git a/lazer/state_sdk/js/src/generated/governance_instruction.cjs b/lazer/state_sdk/js/src/generated/governance_instruction.cjs index d38a727688..242bdba81b 100644 --- a/lazer/state_sdk/js/src/generated/governance_instruction.cjs +++ b/lazer/state_sdk/js/src/generated/governance_instruction.cjs @@ -4,10276 +4,11731 @@ var $protobuf = require("protobufjs/minimal"); // Common aliases -var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; +var $Reader = $protobuf.Reader, + $Writer = $protobuf.Writer, + $util = $protobuf.util; // Exported root namespace var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); -$root.pyth_lazer_transaction = (function() { +$root.pyth_lazer_transaction = (function () { + /** + * Namespace pyth_lazer_transaction. + * @exports pyth_lazer_transaction + * @namespace + */ + var pyth_lazer_transaction = {}; + pyth_lazer_transaction.GovernanceInstruction = (function () { /** - * Namespace pyth_lazer_transaction. - * @exports pyth_lazer_transaction - * @namespace + * Properties of a GovernanceInstruction. + * @memberof pyth_lazer_transaction + * @interface IGovernanceInstruction + * @property {Array.|null} [directives] GovernanceInstruction directives + * @property {google.protobuf.ITimestamp|null} [minExecutionTimestamp] GovernanceInstruction minExecutionTimestamp + * @property {google.protobuf.ITimestamp|null} [maxExecutionTimestamp] GovernanceInstruction maxExecutionTimestamp + * @property {number|null} [governanceSequenceNo] GovernanceInstruction governanceSequenceNo */ - var pyth_lazer_transaction = {}; - - pyth_lazer_transaction.GovernanceInstruction = (function() { - - /** - * Properties of a GovernanceInstruction. - * @memberof pyth_lazer_transaction - * @interface IGovernanceInstruction - * @property {Array.|null} [directives] GovernanceInstruction directives - * @property {google.protobuf.ITimestamp|null} [minExecutionTimestamp] GovernanceInstruction minExecutionTimestamp - * @property {google.protobuf.ITimestamp|null} [maxExecutionTimestamp] GovernanceInstruction maxExecutionTimestamp - * @property {number|null} [governanceSequenceNo] GovernanceInstruction governanceSequenceNo - */ - - /** - * Constructs a new GovernanceInstruction. - * @memberof pyth_lazer_transaction - * @classdesc Represents a GovernanceInstruction. - * @implements IGovernanceInstruction - * @constructor - * @param {pyth_lazer_transaction.IGovernanceInstruction=} [properties] Properties to set - */ - function GovernanceInstruction(properties) { - this.directives = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - /** - * GovernanceInstruction directives. - * @member {Array.} directives - * @memberof pyth_lazer_transaction.GovernanceInstruction - * @instance - */ - GovernanceInstruction.prototype.directives = $util.emptyArray; - - /** - * GovernanceInstruction minExecutionTimestamp. - * @member {google.protobuf.ITimestamp|null|undefined} minExecutionTimestamp - * @memberof pyth_lazer_transaction.GovernanceInstruction - * @instance - */ - GovernanceInstruction.prototype.minExecutionTimestamp = null; - - /** - * GovernanceInstruction maxExecutionTimestamp. - * @member {google.protobuf.ITimestamp|null|undefined} maxExecutionTimestamp - * @memberof pyth_lazer_transaction.GovernanceInstruction - * @instance - */ - GovernanceInstruction.prototype.maxExecutionTimestamp = null; - - /** - * GovernanceInstruction governanceSequenceNo. - * @member {number|null|undefined} governanceSequenceNo - * @memberof pyth_lazer_transaction.GovernanceInstruction - * @instance - */ - GovernanceInstruction.prototype.governanceSequenceNo = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * GovernanceInstruction _minExecutionTimestamp. - * @member {"minExecutionTimestamp"|undefined} _minExecutionTimestamp - * @memberof pyth_lazer_transaction.GovernanceInstruction - * @instance - */ - Object.defineProperty(GovernanceInstruction.prototype, "_minExecutionTimestamp", { - get: $util.oneOfGetter($oneOfFields = ["minExecutionTimestamp"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * GovernanceInstruction _maxExecutionTimestamp. - * @member {"maxExecutionTimestamp"|undefined} _maxExecutionTimestamp - * @memberof pyth_lazer_transaction.GovernanceInstruction - * @instance - */ - Object.defineProperty(GovernanceInstruction.prototype, "_maxExecutionTimestamp", { - get: $util.oneOfGetter($oneOfFields = ["maxExecutionTimestamp"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * GovernanceInstruction _governanceSequenceNo. - * @member {"governanceSequenceNo"|undefined} _governanceSequenceNo - * @memberof pyth_lazer_transaction.GovernanceInstruction - * @instance - */ - Object.defineProperty(GovernanceInstruction.prototype, "_governanceSequenceNo", { - get: $util.oneOfGetter($oneOfFields = ["governanceSequenceNo"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new GovernanceInstruction instance using the specified properties. - * @function create - * @memberof pyth_lazer_transaction.GovernanceInstruction - * @static - * @param {pyth_lazer_transaction.IGovernanceInstruction=} [properties] Properties to set - * @returns {pyth_lazer_transaction.GovernanceInstruction} GovernanceInstruction instance - */ - GovernanceInstruction.create = function create(properties) { - return new GovernanceInstruction(properties); - }; - - /** - * Encodes the specified GovernanceInstruction message. Does not implicitly {@link pyth_lazer_transaction.GovernanceInstruction.verify|verify} messages. - * @function encode - * @memberof pyth_lazer_transaction.GovernanceInstruction - * @static - * @param {pyth_lazer_transaction.IGovernanceInstruction} message GovernanceInstruction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GovernanceInstruction.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.directives != null && message.directives.length) - for (var i = 0; i < message.directives.length; ++i) - $root.pyth_lazer_transaction.GovernanceDirective.encode(message.directives[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.minExecutionTimestamp != null && Object.hasOwnProperty.call(message, "minExecutionTimestamp")) - $root.google.protobuf.Timestamp.encode(message.minExecutionTimestamp, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.maxExecutionTimestamp != null && Object.hasOwnProperty.call(message, "maxExecutionTimestamp")) - $root.google.protobuf.Timestamp.encode(message.maxExecutionTimestamp, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.governanceSequenceNo != null && Object.hasOwnProperty.call(message, "governanceSequenceNo")) - writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.governanceSequenceNo); - return writer; - }; - - /** - * Encodes the specified GovernanceInstruction message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceInstruction.verify|verify} messages. - * @function encodeDelimited - * @memberof pyth_lazer_transaction.GovernanceInstruction - * @static - * @param {pyth_lazer_transaction.IGovernanceInstruction} message GovernanceInstruction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GovernanceInstruction.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GovernanceInstruction message from the specified reader or buffer. - * @function decode - * @memberof pyth_lazer_transaction.GovernanceInstruction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pyth_lazer_transaction.GovernanceInstruction} GovernanceInstruction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GovernanceInstruction.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.GovernanceInstruction(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 2: { - if (!(message.directives && message.directives.length)) - message.directives = []; - message.directives.push($root.pyth_lazer_transaction.GovernanceDirective.decode(reader, reader.uint32())); - break; - } - case 3: { - message.minExecutionTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.maxExecutionTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - message.governanceSequenceNo = reader.uint32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GovernanceInstruction message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pyth_lazer_transaction.GovernanceInstruction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pyth_lazer_transaction.GovernanceInstruction} GovernanceInstruction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GovernanceInstruction.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GovernanceInstruction message. - * @function verify - * @memberof pyth_lazer_transaction.GovernanceInstruction - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GovernanceInstruction.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.directives != null && message.hasOwnProperty("directives")) { - if (!Array.isArray(message.directives)) - return "directives: array expected"; - for (var i = 0; i < message.directives.length; ++i) { - var error = $root.pyth_lazer_transaction.GovernanceDirective.verify(message.directives[i]); - if (error) - return "directives." + error; - } - } - if (message.minExecutionTimestamp != null && message.hasOwnProperty("minExecutionTimestamp")) { - properties._minExecutionTimestamp = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.minExecutionTimestamp); - if (error) - return "minExecutionTimestamp." + error; - } - } - if (message.maxExecutionTimestamp != null && message.hasOwnProperty("maxExecutionTimestamp")) { - properties._maxExecutionTimestamp = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.maxExecutionTimestamp); - if (error) - return "maxExecutionTimestamp." + error; - } - } - if (message.governanceSequenceNo != null && message.hasOwnProperty("governanceSequenceNo")) { - properties._governanceSequenceNo = 1; - if (!$util.isInteger(message.governanceSequenceNo)) - return "governanceSequenceNo: integer expected"; - } - return null; - }; - - /** - * Creates a GovernanceInstruction message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pyth_lazer_transaction.GovernanceInstruction - * @static - * @param {Object.} object Plain object - * @returns {pyth_lazer_transaction.GovernanceInstruction} GovernanceInstruction - */ - GovernanceInstruction.fromObject = function fromObject(object) { - if (object instanceof $root.pyth_lazer_transaction.GovernanceInstruction) - return object; - var message = new $root.pyth_lazer_transaction.GovernanceInstruction(); - if (object.directives) { - if (!Array.isArray(object.directives)) - throw TypeError(".pyth_lazer_transaction.GovernanceInstruction.directives: array expected"); - message.directives = []; - for (var i = 0; i < object.directives.length; ++i) { - if (typeof object.directives[i] !== "object") - throw TypeError(".pyth_lazer_transaction.GovernanceInstruction.directives: object expected"); - message.directives[i] = $root.pyth_lazer_transaction.GovernanceDirective.fromObject(object.directives[i]); - } - } - if (object.minExecutionTimestamp != null) { - if (typeof object.minExecutionTimestamp !== "object") - throw TypeError(".pyth_lazer_transaction.GovernanceInstruction.minExecutionTimestamp: object expected"); - message.minExecutionTimestamp = $root.google.protobuf.Timestamp.fromObject(object.minExecutionTimestamp); - } - if (object.maxExecutionTimestamp != null) { - if (typeof object.maxExecutionTimestamp !== "object") - throw TypeError(".pyth_lazer_transaction.GovernanceInstruction.maxExecutionTimestamp: object expected"); - message.maxExecutionTimestamp = $root.google.protobuf.Timestamp.fromObject(object.maxExecutionTimestamp); - } - if (object.governanceSequenceNo != null) - message.governanceSequenceNo = object.governanceSequenceNo >>> 0; - return message; - }; - - /** - * Creates a plain object from a GovernanceInstruction message. Also converts values to other types if specified. - * @function toObject - * @memberof pyth_lazer_transaction.GovernanceInstruction - * @static - * @param {pyth_lazer_transaction.GovernanceInstruction} message GovernanceInstruction - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GovernanceInstruction.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.directives = []; - if (message.directives && message.directives.length) { - object.directives = []; - for (var j = 0; j < message.directives.length; ++j) - object.directives[j] = $root.pyth_lazer_transaction.GovernanceDirective.toObject(message.directives[j], options); - } - if (message.minExecutionTimestamp != null && message.hasOwnProperty("minExecutionTimestamp")) { - object.minExecutionTimestamp = $root.google.protobuf.Timestamp.toObject(message.minExecutionTimestamp, options); - if (options.oneofs) - object._minExecutionTimestamp = "minExecutionTimestamp"; - } - if (message.maxExecutionTimestamp != null && message.hasOwnProperty("maxExecutionTimestamp")) { - object.maxExecutionTimestamp = $root.google.protobuf.Timestamp.toObject(message.maxExecutionTimestamp, options); - if (options.oneofs) - object._maxExecutionTimestamp = "maxExecutionTimestamp"; - } - if (message.governanceSequenceNo != null && message.hasOwnProperty("governanceSequenceNo")) { - object.governanceSequenceNo = message.governanceSequenceNo; - if (options.oneofs) - object._governanceSequenceNo = "governanceSequenceNo"; - } - return object; - }; - - /** - * Converts this GovernanceInstruction to JSON. - * @function toJSON - * @memberof pyth_lazer_transaction.GovernanceInstruction - * @instance - * @returns {Object.} JSON object - */ - GovernanceInstruction.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GovernanceInstruction - * @function getTypeUrl - * @memberof pyth_lazer_transaction.GovernanceInstruction - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GovernanceInstruction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pyth_lazer_transaction.GovernanceInstruction"; - }; + /** + * Constructs a new GovernanceInstruction. + * @memberof pyth_lazer_transaction + * @classdesc Represents a GovernanceInstruction. + * @implements IGovernanceInstruction + * @constructor + * @param {pyth_lazer_transaction.IGovernanceInstruction=} [properties] Properties to set + */ + function GovernanceInstruction(properties) { + this.directives = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + } - return GovernanceInstruction; - })(); + /** + * GovernanceInstruction directives. + * @member {Array.} directives + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @instance + */ + GovernanceInstruction.prototype.directives = $util.emptyArray; - pyth_lazer_transaction.ShardFilter = (function() { - - /** - * Properties of a ShardFilter. - * @memberof pyth_lazer_transaction - * @interface IShardFilter - * @property {google.protobuf.IEmpty|null} [allShards] ShardFilter allShards - * @property {pyth_lazer_transaction.ShardFilter.IShardNames|null} [shardNames] ShardFilter shardNames - * @property {pyth_lazer_transaction.ShardFilter.IShardGroups|null} [shardGroups] ShardFilter shardGroups - */ - - /** - * Constructs a new ShardFilter. - * @memberof pyth_lazer_transaction - * @classdesc Represents a ShardFilter. - * @implements IShardFilter - * @constructor - * @param {pyth_lazer_transaction.IShardFilter=} [properties] Properties to set - */ - function ShardFilter(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * GovernanceInstruction minExecutionTimestamp. + * @member {google.protobuf.ITimestamp|null|undefined} minExecutionTimestamp + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @instance + */ + GovernanceInstruction.prototype.minExecutionTimestamp = null; - /** - * ShardFilter allShards. - * @member {google.protobuf.IEmpty|null|undefined} allShards - * @memberof pyth_lazer_transaction.ShardFilter - * @instance - */ - ShardFilter.prototype.allShards = null; - - /** - * ShardFilter shardNames. - * @member {pyth_lazer_transaction.ShardFilter.IShardNames|null|undefined} shardNames - * @memberof pyth_lazer_transaction.ShardFilter - * @instance - */ - ShardFilter.prototype.shardNames = null; - - /** - * ShardFilter shardGroups. - * @member {pyth_lazer_transaction.ShardFilter.IShardGroups|null|undefined} shardGroups - * @memberof pyth_lazer_transaction.ShardFilter - * @instance - */ - ShardFilter.prototype.shardGroups = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ShardFilter filter. - * @member {"allShards"|"shardNames"|"shardGroups"|undefined} filter - * @memberof pyth_lazer_transaction.ShardFilter - * @instance - */ - Object.defineProperty(ShardFilter.prototype, "filter", { - get: $util.oneOfGetter($oneOfFields = ["allShards", "shardNames", "shardGroups"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ShardFilter instance using the specified properties. - * @function create - * @memberof pyth_lazer_transaction.ShardFilter - * @static - * @param {pyth_lazer_transaction.IShardFilter=} [properties] Properties to set - * @returns {pyth_lazer_transaction.ShardFilter} ShardFilter instance - */ - ShardFilter.create = function create(properties) { - return new ShardFilter(properties); - }; - - /** - * Encodes the specified ShardFilter message. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.verify|verify} messages. - * @function encode - * @memberof pyth_lazer_transaction.ShardFilter - * @static - * @param {pyth_lazer_transaction.IShardFilter} message ShardFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ShardFilter.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.allShards != null && Object.hasOwnProperty.call(message, "allShards")) - $root.google.protobuf.Empty.encode(message.allShards, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.shardNames != null && Object.hasOwnProperty.call(message, "shardNames")) - $root.pyth_lazer_transaction.ShardFilter.ShardNames.encode(message.shardNames, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.shardGroups != null && Object.hasOwnProperty.call(message, "shardGroups")) - $root.pyth_lazer_transaction.ShardFilter.ShardGroups.encode(message.shardGroups, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ShardFilter message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.verify|verify} messages. - * @function encodeDelimited - * @memberof pyth_lazer_transaction.ShardFilter - * @static - * @param {pyth_lazer_transaction.IShardFilter} message ShardFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ShardFilter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ShardFilter message from the specified reader or buffer. - * @function decode - * @memberof pyth_lazer_transaction.ShardFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pyth_lazer_transaction.ShardFilter} ShardFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ShardFilter.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.ShardFilter(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.allShards = $root.google.protobuf.Empty.decode(reader, reader.uint32()); - break; - } - case 2: { - message.shardNames = $root.pyth_lazer_transaction.ShardFilter.ShardNames.decode(reader, reader.uint32()); - break; - } - case 3: { - message.shardGroups = $root.pyth_lazer_transaction.ShardFilter.ShardGroups.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ShardFilter message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pyth_lazer_transaction.ShardFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pyth_lazer_transaction.ShardFilter} ShardFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ShardFilter.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ShardFilter message. - * @function verify - * @memberof pyth_lazer_transaction.ShardFilter - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ShardFilter.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.allShards != null && message.hasOwnProperty("allShards")) { - properties.filter = 1; - { - var error = $root.google.protobuf.Empty.verify(message.allShards); - if (error) - return "allShards." + error; - } - } - if (message.shardNames != null && message.hasOwnProperty("shardNames")) { - if (properties.filter === 1) - return "filter: multiple values"; - properties.filter = 1; - { - var error = $root.pyth_lazer_transaction.ShardFilter.ShardNames.verify(message.shardNames); - if (error) - return "shardNames." + error; - } - } - if (message.shardGroups != null && message.hasOwnProperty("shardGroups")) { - if (properties.filter === 1) - return "filter: multiple values"; - properties.filter = 1; - { - var error = $root.pyth_lazer_transaction.ShardFilter.ShardGroups.verify(message.shardGroups); - if (error) - return "shardGroups." + error; - } - } - return null; - }; - - /** - * Creates a ShardFilter message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pyth_lazer_transaction.ShardFilter - * @static - * @param {Object.} object Plain object - * @returns {pyth_lazer_transaction.ShardFilter} ShardFilter - */ - ShardFilter.fromObject = function fromObject(object) { - if (object instanceof $root.pyth_lazer_transaction.ShardFilter) - return object; - var message = new $root.pyth_lazer_transaction.ShardFilter(); - if (object.allShards != null) { - if (typeof object.allShards !== "object") - throw TypeError(".pyth_lazer_transaction.ShardFilter.allShards: object expected"); - message.allShards = $root.google.protobuf.Empty.fromObject(object.allShards); - } - if (object.shardNames != null) { - if (typeof object.shardNames !== "object") - throw TypeError(".pyth_lazer_transaction.ShardFilter.shardNames: object expected"); - message.shardNames = $root.pyth_lazer_transaction.ShardFilter.ShardNames.fromObject(object.shardNames); - } - if (object.shardGroups != null) { - if (typeof object.shardGroups !== "object") - throw TypeError(".pyth_lazer_transaction.ShardFilter.shardGroups: object expected"); - message.shardGroups = $root.pyth_lazer_transaction.ShardFilter.ShardGroups.fromObject(object.shardGroups); - } - return message; - }; - - /** - * Creates a plain object from a ShardFilter message. Also converts values to other types if specified. - * @function toObject - * @memberof pyth_lazer_transaction.ShardFilter - * @static - * @param {pyth_lazer_transaction.ShardFilter} message ShardFilter - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ShardFilter.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.allShards != null && message.hasOwnProperty("allShards")) { - object.allShards = $root.google.protobuf.Empty.toObject(message.allShards, options); - if (options.oneofs) - object.filter = "allShards"; - } - if (message.shardNames != null && message.hasOwnProperty("shardNames")) { - object.shardNames = $root.pyth_lazer_transaction.ShardFilter.ShardNames.toObject(message.shardNames, options); - if (options.oneofs) - object.filter = "shardNames"; - } - if (message.shardGroups != null && message.hasOwnProperty("shardGroups")) { - object.shardGroups = $root.pyth_lazer_transaction.ShardFilter.ShardGroups.toObject(message.shardGroups, options); - if (options.oneofs) - object.filter = "shardGroups"; - } - return object; - }; - - /** - * Converts this ShardFilter to JSON. - * @function toJSON - * @memberof pyth_lazer_transaction.ShardFilter - * @instance - * @returns {Object.} JSON object - */ - ShardFilter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ShardFilter - * @function getTypeUrl - * @memberof pyth_lazer_transaction.ShardFilter - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ShardFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pyth_lazer_transaction.ShardFilter"; - }; - - ShardFilter.ShardNames = (function() { - - /** - * Properties of a ShardNames. - * @memberof pyth_lazer_transaction.ShardFilter - * @interface IShardNames - * @property {Array.|null} [shardNames] ShardNames shardNames - */ - - /** - * Constructs a new ShardNames. - * @memberof pyth_lazer_transaction.ShardFilter - * @classdesc Represents a ShardNames. - * @implements IShardNames - * @constructor - * @param {pyth_lazer_transaction.ShardFilter.IShardNames=} [properties] Properties to set - */ - function ShardNames(properties) { - this.shardNames = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * GovernanceInstruction maxExecutionTimestamp. + * @member {google.protobuf.ITimestamp|null|undefined} maxExecutionTimestamp + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @instance + */ + GovernanceInstruction.prototype.maxExecutionTimestamp = null; - /** - * ShardNames shardNames. - * @member {Array.} shardNames - * @memberof pyth_lazer_transaction.ShardFilter.ShardNames - * @instance - */ - ShardNames.prototype.shardNames = $util.emptyArray; - - /** - * Creates a new ShardNames instance using the specified properties. - * @function create - * @memberof pyth_lazer_transaction.ShardFilter.ShardNames - * @static - * @param {pyth_lazer_transaction.ShardFilter.IShardNames=} [properties] Properties to set - * @returns {pyth_lazer_transaction.ShardFilter.ShardNames} ShardNames instance - */ - ShardNames.create = function create(properties) { - return new ShardNames(properties); - }; - - /** - * Encodes the specified ShardNames message. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardNames.verify|verify} messages. - * @function encode - * @memberof pyth_lazer_transaction.ShardFilter.ShardNames - * @static - * @param {pyth_lazer_transaction.ShardFilter.IShardNames} message ShardNames message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ShardNames.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.shardNames != null && message.shardNames.length) - for (var i = 0; i < message.shardNames.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.shardNames[i]); - return writer; - }; - - /** - * Encodes the specified ShardNames message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardNames.verify|verify} messages. - * @function encodeDelimited - * @memberof pyth_lazer_transaction.ShardFilter.ShardNames - * @static - * @param {pyth_lazer_transaction.ShardFilter.IShardNames} message ShardNames message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ShardNames.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ShardNames message from the specified reader or buffer. - * @function decode - * @memberof pyth_lazer_transaction.ShardFilter.ShardNames - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pyth_lazer_transaction.ShardFilter.ShardNames} ShardNames - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ShardNames.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.ShardFilter.ShardNames(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.shardNames && message.shardNames.length)) - message.shardNames = []; - message.shardNames.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ShardNames message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pyth_lazer_transaction.ShardFilter.ShardNames - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pyth_lazer_transaction.ShardFilter.ShardNames} ShardNames - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ShardNames.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ShardNames message. - * @function verify - * @memberof pyth_lazer_transaction.ShardFilter.ShardNames - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ShardNames.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.shardNames != null && message.hasOwnProperty("shardNames")) { - if (!Array.isArray(message.shardNames)) - return "shardNames: array expected"; - for (var i = 0; i < message.shardNames.length; ++i) - if (!$util.isString(message.shardNames[i])) - return "shardNames: string[] expected"; - } - return null; - }; - - /** - * Creates a ShardNames message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pyth_lazer_transaction.ShardFilter.ShardNames - * @static - * @param {Object.} object Plain object - * @returns {pyth_lazer_transaction.ShardFilter.ShardNames} ShardNames - */ - ShardNames.fromObject = function fromObject(object) { - if (object instanceof $root.pyth_lazer_transaction.ShardFilter.ShardNames) - return object; - var message = new $root.pyth_lazer_transaction.ShardFilter.ShardNames(); - if (object.shardNames) { - if (!Array.isArray(object.shardNames)) - throw TypeError(".pyth_lazer_transaction.ShardFilter.ShardNames.shardNames: array expected"); - message.shardNames = []; - for (var i = 0; i < object.shardNames.length; ++i) - message.shardNames[i] = String(object.shardNames[i]); - } - return message; - }; - - /** - * Creates a plain object from a ShardNames message. Also converts values to other types if specified. - * @function toObject - * @memberof pyth_lazer_transaction.ShardFilter.ShardNames - * @static - * @param {pyth_lazer_transaction.ShardFilter.ShardNames} message ShardNames - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ShardNames.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.shardNames = []; - if (message.shardNames && message.shardNames.length) { - object.shardNames = []; - for (var j = 0; j < message.shardNames.length; ++j) - object.shardNames[j] = message.shardNames[j]; - } - return object; - }; - - /** - * Converts this ShardNames to JSON. - * @function toJSON - * @memberof pyth_lazer_transaction.ShardFilter.ShardNames - * @instance - * @returns {Object.} JSON object - */ - ShardNames.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ShardNames - * @function getTypeUrl - * @memberof pyth_lazer_transaction.ShardFilter.ShardNames - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ShardNames.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pyth_lazer_transaction.ShardFilter.ShardNames"; - }; - - return ShardNames; - })(); - - ShardFilter.ShardGroups = (function() { - - /** - * Properties of a ShardGroups. - * @memberof pyth_lazer_transaction.ShardFilter - * @interface IShardGroups - * @property {Array.|null} [shardGroups] ShardGroups shardGroups - */ - - /** - * Constructs a new ShardGroups. - * @memberof pyth_lazer_transaction.ShardFilter - * @classdesc Represents a ShardGroups. - * @implements IShardGroups - * @constructor - * @param {pyth_lazer_transaction.ShardFilter.IShardGroups=} [properties] Properties to set - */ - function ShardGroups(properties) { - this.shardGroups = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * GovernanceInstruction governanceSequenceNo. + * @member {number|null|undefined} governanceSequenceNo + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @instance + */ + GovernanceInstruction.prototype.governanceSequenceNo = null; - /** - * ShardGroups shardGroups. - * @member {Array.} shardGroups - * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups - * @instance - */ - ShardGroups.prototype.shardGroups = $util.emptyArray; - - /** - * Creates a new ShardGroups instance using the specified properties. - * @function create - * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups - * @static - * @param {pyth_lazer_transaction.ShardFilter.IShardGroups=} [properties] Properties to set - * @returns {pyth_lazer_transaction.ShardFilter.ShardGroups} ShardGroups instance - */ - ShardGroups.create = function create(properties) { - return new ShardGroups(properties); - }; - - /** - * Encodes the specified ShardGroups message. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardGroups.verify|verify} messages. - * @function encode - * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups - * @static - * @param {pyth_lazer_transaction.ShardFilter.IShardGroups} message ShardGroups message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ShardGroups.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.shardGroups != null && message.shardGroups.length) - for (var i = 0; i < message.shardGroups.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.shardGroups[i]); - return writer; - }; - - /** - * Encodes the specified ShardGroups message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardGroups.verify|verify} messages. - * @function encodeDelimited - * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups - * @static - * @param {pyth_lazer_transaction.ShardFilter.IShardGroups} message ShardGroups message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ShardGroups.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ShardGroups message from the specified reader or buffer. - * @function decode - * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pyth_lazer_transaction.ShardFilter.ShardGroups} ShardGroups - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ShardGroups.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.ShardFilter.ShardGroups(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.shardGroups && message.shardGroups.length)) - message.shardGroups = []; - message.shardGroups.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ShardGroups message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pyth_lazer_transaction.ShardFilter.ShardGroups} ShardGroups - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ShardGroups.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ShardGroups message. - * @function verify - * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ShardGroups.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.shardGroups != null && message.hasOwnProperty("shardGroups")) { - if (!Array.isArray(message.shardGroups)) - return "shardGroups: array expected"; - for (var i = 0; i < message.shardGroups.length; ++i) - if (!$util.isString(message.shardGroups[i])) - return "shardGroups: string[] expected"; - } - return null; - }; - - /** - * Creates a ShardGroups message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups - * @static - * @param {Object.} object Plain object - * @returns {pyth_lazer_transaction.ShardFilter.ShardGroups} ShardGroups - */ - ShardGroups.fromObject = function fromObject(object) { - if (object instanceof $root.pyth_lazer_transaction.ShardFilter.ShardGroups) - return object; - var message = new $root.pyth_lazer_transaction.ShardFilter.ShardGroups(); - if (object.shardGroups) { - if (!Array.isArray(object.shardGroups)) - throw TypeError(".pyth_lazer_transaction.ShardFilter.ShardGroups.shardGroups: array expected"); - message.shardGroups = []; - for (var i = 0; i < object.shardGroups.length; ++i) - message.shardGroups[i] = String(object.shardGroups[i]); - } - return message; - }; - - /** - * Creates a plain object from a ShardGroups message. Also converts values to other types if specified. - * @function toObject - * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups - * @static - * @param {pyth_lazer_transaction.ShardFilter.ShardGroups} message ShardGroups - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ShardGroups.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.shardGroups = []; - if (message.shardGroups && message.shardGroups.length) { - object.shardGroups = []; - for (var j = 0; j < message.shardGroups.length; ++j) - object.shardGroups[j] = message.shardGroups[j]; - } - return object; - }; - - /** - * Converts this ShardGroups to JSON. - * @function toJSON - * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups - * @instance - * @returns {Object.} JSON object - */ - ShardGroups.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ShardGroups - * @function getTypeUrl - * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ShardGroups.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pyth_lazer_transaction.ShardFilter.ShardGroups"; - }; - - return ShardGroups; - })(); - - return ShardFilter; - })(); + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - pyth_lazer_transaction.GovernanceDirective = (function() { - - /** - * Properties of a GovernanceDirective. - * @memberof pyth_lazer_transaction - * @interface IGovernanceDirective - * @property {pyth_lazer_transaction.IShardFilter|null} [shardFilter] GovernanceDirective shardFilter - * @property {pyth_lazer_transaction.ICreateShard|null} [createShard] GovernanceDirective createShard - * @property {pyth_lazer_transaction.IAddGovernanceSource|null} [addGovernanceSource] GovernanceDirective addGovernanceSource - * @property {pyth_lazer_transaction.IUpdateGovernanceSource|null} [updateGovernanceSource] GovernanceDirective updateGovernanceSource - * @property {pyth_lazer_transaction.ISetShardName|null} [setShardName] GovernanceDirective setShardName - * @property {pyth_lazer_transaction.ISetShardGroup|null} [setShardGroup] GovernanceDirective setShardGroup - * @property {pyth_lazer_transaction.IResetLastSequenceNo|null} [resetLastSequenceNo] GovernanceDirective resetLastSequenceNo - * @property {pyth_lazer_transaction.IAddPublisher|null} [addPublisher] GovernanceDirective addPublisher - * @property {pyth_lazer_transaction.IUpdatePublisher|null} [updatePublisher] GovernanceDirective updatePublisher - * @property {pyth_lazer_transaction.IAddFeed|null} [addFeed] GovernanceDirective addFeed - * @property {pyth_lazer_transaction.IUpdateFeed|null} [updateFeed] GovernanceDirective updateFeed - */ - - /** - * Constructs a new GovernanceDirective. - * @memberof pyth_lazer_transaction - * @classdesc Represents a GovernanceDirective. - * @implements IGovernanceDirective - * @constructor - * @param {pyth_lazer_transaction.IGovernanceDirective=} [properties] Properties to set - */ - function GovernanceDirective(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * GovernanceInstruction _minExecutionTimestamp. + * @member {"minExecutionTimestamp"|undefined} _minExecutionTimestamp + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @instance + */ + Object.defineProperty( + GovernanceInstruction.prototype, + "_minExecutionTimestamp", + { + get: $util.oneOfGetter(($oneOfFields = ["minExecutionTimestamp"])), + set: $util.oneOfSetter($oneOfFields), + }, + ); - /** - * GovernanceDirective shardFilter. - * @member {pyth_lazer_transaction.IShardFilter|null|undefined} shardFilter - * @memberof pyth_lazer_transaction.GovernanceDirective - * @instance - */ - GovernanceDirective.prototype.shardFilter = null; - - /** - * GovernanceDirective createShard. - * @member {pyth_lazer_transaction.ICreateShard|null|undefined} createShard - * @memberof pyth_lazer_transaction.GovernanceDirective - * @instance - */ - GovernanceDirective.prototype.createShard = null; - - /** - * GovernanceDirective addGovernanceSource. - * @member {pyth_lazer_transaction.IAddGovernanceSource|null|undefined} addGovernanceSource - * @memberof pyth_lazer_transaction.GovernanceDirective - * @instance - */ - GovernanceDirective.prototype.addGovernanceSource = null; - - /** - * GovernanceDirective updateGovernanceSource. - * @member {pyth_lazer_transaction.IUpdateGovernanceSource|null|undefined} updateGovernanceSource - * @memberof pyth_lazer_transaction.GovernanceDirective - * @instance - */ - GovernanceDirective.prototype.updateGovernanceSource = null; - - /** - * GovernanceDirective setShardName. - * @member {pyth_lazer_transaction.ISetShardName|null|undefined} setShardName - * @memberof pyth_lazer_transaction.GovernanceDirective - * @instance - */ - GovernanceDirective.prototype.setShardName = null; - - /** - * GovernanceDirective setShardGroup. - * @member {pyth_lazer_transaction.ISetShardGroup|null|undefined} setShardGroup - * @memberof pyth_lazer_transaction.GovernanceDirective - * @instance - */ - GovernanceDirective.prototype.setShardGroup = null; - - /** - * GovernanceDirective resetLastSequenceNo. - * @member {pyth_lazer_transaction.IResetLastSequenceNo|null|undefined} resetLastSequenceNo - * @memberof pyth_lazer_transaction.GovernanceDirective - * @instance - */ - GovernanceDirective.prototype.resetLastSequenceNo = null; - - /** - * GovernanceDirective addPublisher. - * @member {pyth_lazer_transaction.IAddPublisher|null|undefined} addPublisher - * @memberof pyth_lazer_transaction.GovernanceDirective - * @instance - */ - GovernanceDirective.prototype.addPublisher = null; - - /** - * GovernanceDirective updatePublisher. - * @member {pyth_lazer_transaction.IUpdatePublisher|null|undefined} updatePublisher - * @memberof pyth_lazer_transaction.GovernanceDirective - * @instance - */ - GovernanceDirective.prototype.updatePublisher = null; - - /** - * GovernanceDirective addFeed. - * @member {pyth_lazer_transaction.IAddFeed|null|undefined} addFeed - * @memberof pyth_lazer_transaction.GovernanceDirective - * @instance - */ - GovernanceDirective.prototype.addFeed = null; - - /** - * GovernanceDirective updateFeed. - * @member {pyth_lazer_transaction.IUpdateFeed|null|undefined} updateFeed - * @memberof pyth_lazer_transaction.GovernanceDirective - * @instance - */ - GovernanceDirective.prototype.updateFeed = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * GovernanceDirective _shardFilter. - * @member {"shardFilter"|undefined} _shardFilter - * @memberof pyth_lazer_transaction.GovernanceDirective - * @instance - */ - Object.defineProperty(GovernanceDirective.prototype, "_shardFilter", { - get: $util.oneOfGetter($oneOfFields = ["shardFilter"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * GovernanceDirective action. - * @member {"createShard"|"addGovernanceSource"|"updateGovernanceSource"|"setShardName"|"setShardGroup"|"resetLastSequenceNo"|"addPublisher"|"updatePublisher"|"addFeed"|"updateFeed"|undefined} action - * @memberof pyth_lazer_transaction.GovernanceDirective - * @instance - */ - Object.defineProperty(GovernanceDirective.prototype, "action", { - get: $util.oneOfGetter($oneOfFields = ["createShard", "addGovernanceSource", "updateGovernanceSource", "setShardName", "setShardGroup", "resetLastSequenceNo", "addPublisher", "updatePublisher", "addFeed", "updateFeed"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new GovernanceDirective instance using the specified properties. - * @function create - * @memberof pyth_lazer_transaction.GovernanceDirective - * @static - * @param {pyth_lazer_transaction.IGovernanceDirective=} [properties] Properties to set - * @returns {pyth_lazer_transaction.GovernanceDirective} GovernanceDirective instance - */ - GovernanceDirective.create = function create(properties) { - return new GovernanceDirective(properties); - }; - - /** - * Encodes the specified GovernanceDirective message. Does not implicitly {@link pyth_lazer_transaction.GovernanceDirective.verify|verify} messages. - * @function encode - * @memberof pyth_lazer_transaction.GovernanceDirective - * @static - * @param {pyth_lazer_transaction.IGovernanceDirective} message GovernanceDirective message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GovernanceDirective.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.shardFilter != null && Object.hasOwnProperty.call(message, "shardFilter")) - $root.pyth_lazer_transaction.ShardFilter.encode(message.shardFilter, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.createShard != null && Object.hasOwnProperty.call(message, "createShard")) - $root.pyth_lazer_transaction.CreateShard.encode(message.createShard, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); - if (message.addGovernanceSource != null && Object.hasOwnProperty.call(message, "addGovernanceSource")) - $root.pyth_lazer_transaction.AddGovernanceSource.encode(message.addGovernanceSource, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); - if (message.updateGovernanceSource != null && Object.hasOwnProperty.call(message, "updateGovernanceSource")) - $root.pyth_lazer_transaction.UpdateGovernanceSource.encode(message.updateGovernanceSource, writer.uint32(/* id 103, wireType 2 =*/826).fork()).ldelim(); - if (message.setShardName != null && Object.hasOwnProperty.call(message, "setShardName")) - $root.pyth_lazer_transaction.SetShardName.encode(message.setShardName, writer.uint32(/* id 104, wireType 2 =*/834).fork()).ldelim(); - if (message.setShardGroup != null && Object.hasOwnProperty.call(message, "setShardGroup")) - $root.pyth_lazer_transaction.SetShardGroup.encode(message.setShardGroup, writer.uint32(/* id 105, wireType 2 =*/842).fork()).ldelim(); - if (message.resetLastSequenceNo != null && Object.hasOwnProperty.call(message, "resetLastSequenceNo")) - $root.pyth_lazer_transaction.ResetLastSequenceNo.encode(message.resetLastSequenceNo, writer.uint32(/* id 106, wireType 2 =*/850).fork()).ldelim(); - if (message.addPublisher != null && Object.hasOwnProperty.call(message, "addPublisher")) - $root.pyth_lazer_transaction.AddPublisher.encode(message.addPublisher, writer.uint32(/* id 107, wireType 2 =*/858).fork()).ldelim(); - if (message.updatePublisher != null && Object.hasOwnProperty.call(message, "updatePublisher")) - $root.pyth_lazer_transaction.UpdatePublisher.encode(message.updatePublisher, writer.uint32(/* id 108, wireType 2 =*/866).fork()).ldelim(); - if (message.addFeed != null && Object.hasOwnProperty.call(message, "addFeed")) - $root.pyth_lazer_transaction.AddFeed.encode(message.addFeed, writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim(); - if (message.updateFeed != null && Object.hasOwnProperty.call(message, "updateFeed")) - $root.pyth_lazer_transaction.UpdateFeed.encode(message.updateFeed, writer.uint32(/* id 110, wireType 2 =*/882).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GovernanceDirective message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceDirective.verify|verify} messages. - * @function encodeDelimited - * @memberof pyth_lazer_transaction.GovernanceDirective - * @static - * @param {pyth_lazer_transaction.IGovernanceDirective} message GovernanceDirective message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GovernanceDirective.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GovernanceDirective message from the specified reader or buffer. - * @function decode - * @memberof pyth_lazer_transaction.GovernanceDirective - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pyth_lazer_transaction.GovernanceDirective} GovernanceDirective - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GovernanceDirective.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.GovernanceDirective(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.shardFilter = $root.pyth_lazer_transaction.ShardFilter.decode(reader, reader.uint32()); - break; - } - case 101: { - message.createShard = $root.pyth_lazer_transaction.CreateShard.decode(reader, reader.uint32()); - break; - } - case 102: { - message.addGovernanceSource = $root.pyth_lazer_transaction.AddGovernanceSource.decode(reader, reader.uint32()); - break; - } - case 103: { - message.updateGovernanceSource = $root.pyth_lazer_transaction.UpdateGovernanceSource.decode(reader, reader.uint32()); - break; - } - case 104: { - message.setShardName = $root.pyth_lazer_transaction.SetShardName.decode(reader, reader.uint32()); - break; - } - case 105: { - message.setShardGroup = $root.pyth_lazer_transaction.SetShardGroup.decode(reader, reader.uint32()); - break; - } - case 106: { - message.resetLastSequenceNo = $root.pyth_lazer_transaction.ResetLastSequenceNo.decode(reader, reader.uint32()); - break; - } - case 107: { - message.addPublisher = $root.pyth_lazer_transaction.AddPublisher.decode(reader, reader.uint32()); - break; - } - case 108: { - message.updatePublisher = $root.pyth_lazer_transaction.UpdatePublisher.decode(reader, reader.uint32()); - break; - } - case 109: { - message.addFeed = $root.pyth_lazer_transaction.AddFeed.decode(reader, reader.uint32()); - break; - } - case 110: { - message.updateFeed = $root.pyth_lazer_transaction.UpdateFeed.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GovernanceDirective message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pyth_lazer_transaction.GovernanceDirective - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pyth_lazer_transaction.GovernanceDirective} GovernanceDirective - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GovernanceDirective.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GovernanceDirective message. - * @function verify - * @memberof pyth_lazer_transaction.GovernanceDirective - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GovernanceDirective.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.shardFilter != null && message.hasOwnProperty("shardFilter")) { - properties._shardFilter = 1; - { - var error = $root.pyth_lazer_transaction.ShardFilter.verify(message.shardFilter); - if (error) - return "shardFilter." + error; - } - } - if (message.createShard != null && message.hasOwnProperty("createShard")) { - properties.action = 1; - { - var error = $root.pyth_lazer_transaction.CreateShard.verify(message.createShard); - if (error) - return "createShard." + error; - } - } - if (message.addGovernanceSource != null && message.hasOwnProperty("addGovernanceSource")) { - if (properties.action === 1) - return "action: multiple values"; - properties.action = 1; - { - var error = $root.pyth_lazer_transaction.AddGovernanceSource.verify(message.addGovernanceSource); - if (error) - return "addGovernanceSource." + error; - } - } - if (message.updateGovernanceSource != null && message.hasOwnProperty("updateGovernanceSource")) { - if (properties.action === 1) - return "action: multiple values"; - properties.action = 1; - { - var error = $root.pyth_lazer_transaction.UpdateGovernanceSource.verify(message.updateGovernanceSource); - if (error) - return "updateGovernanceSource." + error; - } - } - if (message.setShardName != null && message.hasOwnProperty("setShardName")) { - if (properties.action === 1) - return "action: multiple values"; - properties.action = 1; - { - var error = $root.pyth_lazer_transaction.SetShardName.verify(message.setShardName); - if (error) - return "setShardName." + error; - } - } - if (message.setShardGroup != null && message.hasOwnProperty("setShardGroup")) { - if (properties.action === 1) - return "action: multiple values"; - properties.action = 1; - { - var error = $root.pyth_lazer_transaction.SetShardGroup.verify(message.setShardGroup); - if (error) - return "setShardGroup." + error; - } - } - if (message.resetLastSequenceNo != null && message.hasOwnProperty("resetLastSequenceNo")) { - if (properties.action === 1) - return "action: multiple values"; - properties.action = 1; - { - var error = $root.pyth_lazer_transaction.ResetLastSequenceNo.verify(message.resetLastSequenceNo); - if (error) - return "resetLastSequenceNo." + error; - } - } - if (message.addPublisher != null && message.hasOwnProperty("addPublisher")) { - if (properties.action === 1) - return "action: multiple values"; - properties.action = 1; - { - var error = $root.pyth_lazer_transaction.AddPublisher.verify(message.addPublisher); - if (error) - return "addPublisher." + error; - } - } - if (message.updatePublisher != null && message.hasOwnProperty("updatePublisher")) { - if (properties.action === 1) - return "action: multiple values"; - properties.action = 1; - { - var error = $root.pyth_lazer_transaction.UpdatePublisher.verify(message.updatePublisher); - if (error) - return "updatePublisher." + error; - } - } - if (message.addFeed != null && message.hasOwnProperty("addFeed")) { - if (properties.action === 1) - return "action: multiple values"; - properties.action = 1; - { - var error = $root.pyth_lazer_transaction.AddFeed.verify(message.addFeed); - if (error) - return "addFeed." + error; - } - } - if (message.updateFeed != null && message.hasOwnProperty("updateFeed")) { - if (properties.action === 1) - return "action: multiple values"; - properties.action = 1; - { - var error = $root.pyth_lazer_transaction.UpdateFeed.verify(message.updateFeed); - if (error) - return "updateFeed." + error; - } - } - return null; - }; - - /** - * Creates a GovernanceDirective message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pyth_lazer_transaction.GovernanceDirective - * @static - * @param {Object.} object Plain object - * @returns {pyth_lazer_transaction.GovernanceDirective} GovernanceDirective - */ - GovernanceDirective.fromObject = function fromObject(object) { - if (object instanceof $root.pyth_lazer_transaction.GovernanceDirective) - return object; - var message = new $root.pyth_lazer_transaction.GovernanceDirective(); - if (object.shardFilter != null) { - if (typeof object.shardFilter !== "object") - throw TypeError(".pyth_lazer_transaction.GovernanceDirective.shardFilter: object expected"); - message.shardFilter = $root.pyth_lazer_transaction.ShardFilter.fromObject(object.shardFilter); - } - if (object.createShard != null) { - if (typeof object.createShard !== "object") - throw TypeError(".pyth_lazer_transaction.GovernanceDirective.createShard: object expected"); - message.createShard = $root.pyth_lazer_transaction.CreateShard.fromObject(object.createShard); - } - if (object.addGovernanceSource != null) { - if (typeof object.addGovernanceSource !== "object") - throw TypeError(".pyth_lazer_transaction.GovernanceDirective.addGovernanceSource: object expected"); - message.addGovernanceSource = $root.pyth_lazer_transaction.AddGovernanceSource.fromObject(object.addGovernanceSource); - } - if (object.updateGovernanceSource != null) { - if (typeof object.updateGovernanceSource !== "object") - throw TypeError(".pyth_lazer_transaction.GovernanceDirective.updateGovernanceSource: object expected"); - message.updateGovernanceSource = $root.pyth_lazer_transaction.UpdateGovernanceSource.fromObject(object.updateGovernanceSource); - } - if (object.setShardName != null) { - if (typeof object.setShardName !== "object") - throw TypeError(".pyth_lazer_transaction.GovernanceDirective.setShardName: object expected"); - message.setShardName = $root.pyth_lazer_transaction.SetShardName.fromObject(object.setShardName); - } - if (object.setShardGroup != null) { - if (typeof object.setShardGroup !== "object") - throw TypeError(".pyth_lazer_transaction.GovernanceDirective.setShardGroup: object expected"); - message.setShardGroup = $root.pyth_lazer_transaction.SetShardGroup.fromObject(object.setShardGroup); - } - if (object.resetLastSequenceNo != null) { - if (typeof object.resetLastSequenceNo !== "object") - throw TypeError(".pyth_lazer_transaction.GovernanceDirective.resetLastSequenceNo: object expected"); - message.resetLastSequenceNo = $root.pyth_lazer_transaction.ResetLastSequenceNo.fromObject(object.resetLastSequenceNo); - } - if (object.addPublisher != null) { - if (typeof object.addPublisher !== "object") - throw TypeError(".pyth_lazer_transaction.GovernanceDirective.addPublisher: object expected"); - message.addPublisher = $root.pyth_lazer_transaction.AddPublisher.fromObject(object.addPublisher); - } - if (object.updatePublisher != null) { - if (typeof object.updatePublisher !== "object") - throw TypeError(".pyth_lazer_transaction.GovernanceDirective.updatePublisher: object expected"); - message.updatePublisher = $root.pyth_lazer_transaction.UpdatePublisher.fromObject(object.updatePublisher); - } - if (object.addFeed != null) { - if (typeof object.addFeed !== "object") - throw TypeError(".pyth_lazer_transaction.GovernanceDirective.addFeed: object expected"); - message.addFeed = $root.pyth_lazer_transaction.AddFeed.fromObject(object.addFeed); - } - if (object.updateFeed != null) { - if (typeof object.updateFeed !== "object") - throw TypeError(".pyth_lazer_transaction.GovernanceDirective.updateFeed: object expected"); - message.updateFeed = $root.pyth_lazer_transaction.UpdateFeed.fromObject(object.updateFeed); - } - return message; - }; - - /** - * Creates a plain object from a GovernanceDirective message. Also converts values to other types if specified. - * @function toObject - * @memberof pyth_lazer_transaction.GovernanceDirective - * @static - * @param {pyth_lazer_transaction.GovernanceDirective} message GovernanceDirective - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GovernanceDirective.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.shardFilter != null && message.hasOwnProperty("shardFilter")) { - object.shardFilter = $root.pyth_lazer_transaction.ShardFilter.toObject(message.shardFilter, options); - if (options.oneofs) - object._shardFilter = "shardFilter"; - } - if (message.createShard != null && message.hasOwnProperty("createShard")) { - object.createShard = $root.pyth_lazer_transaction.CreateShard.toObject(message.createShard, options); - if (options.oneofs) - object.action = "createShard"; - } - if (message.addGovernanceSource != null && message.hasOwnProperty("addGovernanceSource")) { - object.addGovernanceSource = $root.pyth_lazer_transaction.AddGovernanceSource.toObject(message.addGovernanceSource, options); - if (options.oneofs) - object.action = "addGovernanceSource"; - } - if (message.updateGovernanceSource != null && message.hasOwnProperty("updateGovernanceSource")) { - object.updateGovernanceSource = $root.pyth_lazer_transaction.UpdateGovernanceSource.toObject(message.updateGovernanceSource, options); - if (options.oneofs) - object.action = "updateGovernanceSource"; - } - if (message.setShardName != null && message.hasOwnProperty("setShardName")) { - object.setShardName = $root.pyth_lazer_transaction.SetShardName.toObject(message.setShardName, options); - if (options.oneofs) - object.action = "setShardName"; - } - if (message.setShardGroup != null && message.hasOwnProperty("setShardGroup")) { - object.setShardGroup = $root.pyth_lazer_transaction.SetShardGroup.toObject(message.setShardGroup, options); - if (options.oneofs) - object.action = "setShardGroup"; - } - if (message.resetLastSequenceNo != null && message.hasOwnProperty("resetLastSequenceNo")) { - object.resetLastSequenceNo = $root.pyth_lazer_transaction.ResetLastSequenceNo.toObject(message.resetLastSequenceNo, options); - if (options.oneofs) - object.action = "resetLastSequenceNo"; - } - if (message.addPublisher != null && message.hasOwnProperty("addPublisher")) { - object.addPublisher = $root.pyth_lazer_transaction.AddPublisher.toObject(message.addPublisher, options); - if (options.oneofs) - object.action = "addPublisher"; - } - if (message.updatePublisher != null && message.hasOwnProperty("updatePublisher")) { - object.updatePublisher = $root.pyth_lazer_transaction.UpdatePublisher.toObject(message.updatePublisher, options); - if (options.oneofs) - object.action = "updatePublisher"; - } - if (message.addFeed != null && message.hasOwnProperty("addFeed")) { - object.addFeed = $root.pyth_lazer_transaction.AddFeed.toObject(message.addFeed, options); - if (options.oneofs) - object.action = "addFeed"; - } - if (message.updateFeed != null && message.hasOwnProperty("updateFeed")) { - object.updateFeed = $root.pyth_lazer_transaction.UpdateFeed.toObject(message.updateFeed, options); - if (options.oneofs) - object.action = "updateFeed"; - } - return object; - }; - - /** - * Converts this GovernanceDirective to JSON. - * @function toJSON - * @memberof pyth_lazer_transaction.GovernanceDirective - * @instance - * @returns {Object.} JSON object - */ - GovernanceDirective.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GovernanceDirective - * @function getTypeUrl - * @memberof pyth_lazer_transaction.GovernanceDirective - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GovernanceDirective.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pyth_lazer_transaction.GovernanceDirective"; - }; + /** + * GovernanceInstruction _maxExecutionTimestamp. + * @member {"maxExecutionTimestamp"|undefined} _maxExecutionTimestamp + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @instance + */ + Object.defineProperty( + GovernanceInstruction.prototype, + "_maxExecutionTimestamp", + { + get: $util.oneOfGetter(($oneOfFields = ["maxExecutionTimestamp"])), + set: $util.oneOfSetter($oneOfFields), + }, + ); - return GovernanceDirective; - })(); + /** + * GovernanceInstruction _governanceSequenceNo. + * @member {"governanceSequenceNo"|undefined} _governanceSequenceNo + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @instance + */ + Object.defineProperty( + GovernanceInstruction.prototype, + "_governanceSequenceNo", + { + get: $util.oneOfGetter(($oneOfFields = ["governanceSequenceNo"])), + set: $util.oneOfSetter($oneOfFields), + }, + ); + + /** + * Creates a new GovernanceInstruction instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @static + * @param {pyth_lazer_transaction.IGovernanceInstruction=} [properties] Properties to set + * @returns {pyth_lazer_transaction.GovernanceInstruction} GovernanceInstruction instance + */ + GovernanceInstruction.create = function create(properties) { + return new GovernanceInstruction(properties); + }; + + /** + * Encodes the specified GovernanceInstruction message. Does not implicitly {@link pyth_lazer_transaction.GovernanceInstruction.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @static + * @param {pyth_lazer_transaction.IGovernanceInstruction} message GovernanceInstruction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GovernanceInstruction.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if (message.directives != null && message.directives.length) + for (var i = 0; i < message.directives.length; ++i) + $root.pyth_lazer_transaction.GovernanceDirective.encode( + message.directives[i], + writer.uint32(/* id 2, wireType 2 =*/ 18).fork(), + ).ldelim(); + if ( + message.minExecutionTimestamp != null && + Object.hasOwnProperty.call(message, "minExecutionTimestamp") + ) + $root.google.protobuf.Timestamp.encode( + message.minExecutionTimestamp, + writer.uint32(/* id 3, wireType 2 =*/ 26).fork(), + ).ldelim(); + if ( + message.maxExecutionTimestamp != null && + Object.hasOwnProperty.call(message, "maxExecutionTimestamp") + ) + $root.google.protobuf.Timestamp.encode( + message.maxExecutionTimestamp, + writer.uint32(/* id 4, wireType 2 =*/ 34).fork(), + ).ldelim(); + if ( + message.governanceSequenceNo != null && + Object.hasOwnProperty.call(message, "governanceSequenceNo") + ) + writer + .uint32(/* id 5, wireType 0 =*/ 40) + .uint32(message.governanceSequenceNo); + return writer; + }; + + /** + * Encodes the specified GovernanceInstruction message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceInstruction.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @static + * @param {pyth_lazer_transaction.IGovernanceInstruction} message GovernanceInstruction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GovernanceInstruction.encodeDelimited = function encodeDelimited( + message, + writer, + ) { + return this.encode(message, writer).ldelim(); + }; - pyth_lazer_transaction.Permissions = (function() { - - /** - * Properties of a Permissions. - * @memberof pyth_lazer_transaction - * @interface IPermissions - * @property {boolean|null} [allActions] Permissions allActions - * @property {Array.|null} [shardActions] Permissions shardActions - * @property {boolean|null} [allUpdateGovernanceSourceActions] Permissions allUpdateGovernanceSourceActions - * @property {Array.|null} [updateGovernanceSourceActions] Permissions updateGovernanceSourceActions - * @property {boolean|null} [allUpdatePublisherAction] Permissions allUpdatePublisherAction - * @property {Array.|null} [updatePublisherActions] Permissions updatePublisherActions - * @property {boolean|null} [allUpdateFeedActions] Permissions allUpdateFeedActions - * @property {Array.|null} [updateFeedActions] Permissions updateFeedActions - */ - - /** - * Constructs a new Permissions. - * @memberof pyth_lazer_transaction - * @classdesc Represents a Permissions. - * @implements IPermissions - * @constructor - * @param {pyth_lazer_transaction.IPermissions=} [properties] Properties to set - */ - function Permissions(properties) { - this.shardActions = []; - this.updateGovernanceSourceActions = []; - this.updatePublisherActions = []; - this.updateFeedActions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Decodes a GovernanceInstruction message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.GovernanceInstruction} GovernanceInstruction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GovernanceInstruction.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pyth_lazer_transaction.GovernanceInstruction(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 2: { + if (!(message.directives && message.directives.length)) + message.directives = []; + message.directives.push( + $root.pyth_lazer_transaction.GovernanceDirective.decode( + reader, + reader.uint32(), + ), + ); + break; + } + case 3: { + message.minExecutionTimestamp = + $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.maxExecutionTimestamp = + $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.governanceSequenceNo = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; } + } + return message; + }; - /** - * Permissions allActions. - * @member {boolean|null|undefined} allActions - * @memberof pyth_lazer_transaction.Permissions - * @instance - */ - Permissions.prototype.allActions = null; - - /** - * Permissions shardActions. - * @member {Array.} shardActions - * @memberof pyth_lazer_transaction.Permissions - * @instance - */ - Permissions.prototype.shardActions = $util.emptyArray; - - /** - * Permissions allUpdateGovernanceSourceActions. - * @member {boolean|null|undefined} allUpdateGovernanceSourceActions - * @memberof pyth_lazer_transaction.Permissions - * @instance - */ - Permissions.prototype.allUpdateGovernanceSourceActions = null; - - /** - * Permissions updateGovernanceSourceActions. - * @member {Array.} updateGovernanceSourceActions - * @memberof pyth_lazer_transaction.Permissions - * @instance - */ - Permissions.prototype.updateGovernanceSourceActions = $util.emptyArray; - - /** - * Permissions allUpdatePublisherAction. - * @member {boolean|null|undefined} allUpdatePublisherAction - * @memberof pyth_lazer_transaction.Permissions - * @instance - */ - Permissions.prototype.allUpdatePublisherAction = null; - - /** - * Permissions updatePublisherActions. - * @member {Array.} updatePublisherActions - * @memberof pyth_lazer_transaction.Permissions - * @instance - */ - Permissions.prototype.updatePublisherActions = $util.emptyArray; - - /** - * Permissions allUpdateFeedActions. - * @member {boolean|null|undefined} allUpdateFeedActions - * @memberof pyth_lazer_transaction.Permissions - * @instance - */ - Permissions.prototype.allUpdateFeedActions = null; - - /** - * Permissions updateFeedActions. - * @member {Array.} updateFeedActions - * @memberof pyth_lazer_transaction.Permissions - * @instance - */ - Permissions.prototype.updateFeedActions = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Permissions _allActions. - * @member {"allActions"|undefined} _allActions - * @memberof pyth_lazer_transaction.Permissions - * @instance - */ - Object.defineProperty(Permissions.prototype, "_allActions", { - get: $util.oneOfGetter($oneOfFields = ["allActions"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Permissions _allUpdateGovernanceSourceActions. - * @member {"allUpdateGovernanceSourceActions"|undefined} _allUpdateGovernanceSourceActions - * @memberof pyth_lazer_transaction.Permissions - * @instance - */ - Object.defineProperty(Permissions.prototype, "_allUpdateGovernanceSourceActions", { - get: $util.oneOfGetter($oneOfFields = ["allUpdateGovernanceSourceActions"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Permissions _allUpdatePublisherAction. - * @member {"allUpdatePublisherAction"|undefined} _allUpdatePublisherAction - * @memberof pyth_lazer_transaction.Permissions - * @instance - */ - Object.defineProperty(Permissions.prototype, "_allUpdatePublisherAction", { - get: $util.oneOfGetter($oneOfFields = ["allUpdatePublisherAction"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Permissions _allUpdateFeedActions. - * @member {"allUpdateFeedActions"|undefined} _allUpdateFeedActions - * @memberof pyth_lazer_transaction.Permissions - * @instance - */ - Object.defineProperty(Permissions.prototype, "_allUpdateFeedActions", { - get: $util.oneOfGetter($oneOfFields = ["allUpdateFeedActions"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Permissions instance using the specified properties. - * @function create - * @memberof pyth_lazer_transaction.Permissions - * @static - * @param {pyth_lazer_transaction.IPermissions=} [properties] Properties to set - * @returns {pyth_lazer_transaction.Permissions} Permissions instance - */ - Permissions.create = function create(properties) { - return new Permissions(properties); - }; - - /** - * Encodes the specified Permissions message. Does not implicitly {@link pyth_lazer_transaction.Permissions.verify|verify} messages. - * @function encode - * @memberof pyth_lazer_transaction.Permissions - * @static - * @param {pyth_lazer_transaction.IPermissions} message Permissions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Permissions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.allActions != null && Object.hasOwnProperty.call(message, "allActions")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.allActions); - if (message.shardActions != null && message.shardActions.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.shardActions.length; ++i) - writer.int32(message.shardActions[i]); - writer.ldelim(); - } - if (message.allUpdateGovernanceSourceActions != null && Object.hasOwnProperty.call(message, "allUpdateGovernanceSourceActions")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allUpdateGovernanceSourceActions); - if (message.updateGovernanceSourceActions != null && message.updateGovernanceSourceActions.length) { - writer.uint32(/* id 4, wireType 2 =*/34).fork(); - for (var i = 0; i < message.updateGovernanceSourceActions.length; ++i) - writer.int32(message.updateGovernanceSourceActions[i]); - writer.ldelim(); - } - if (message.allUpdatePublisherAction != null && Object.hasOwnProperty.call(message, "allUpdatePublisherAction")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.allUpdatePublisherAction); - if (message.updatePublisherActions != null && message.updatePublisherActions.length) { - writer.uint32(/* id 6, wireType 2 =*/50).fork(); - for (var i = 0; i < message.updatePublisherActions.length; ++i) - writer.int32(message.updatePublisherActions[i]); - writer.ldelim(); - } - if (message.allUpdateFeedActions != null && Object.hasOwnProperty.call(message, "allUpdateFeedActions")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.allUpdateFeedActions); - if (message.updateFeedActions != null && message.updateFeedActions.length) { - writer.uint32(/* id 8, wireType 2 =*/66).fork(); - for (var i = 0; i < message.updateFeedActions.length; ++i) - writer.int32(message.updateFeedActions[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified Permissions message, length delimited. Does not implicitly {@link pyth_lazer_transaction.Permissions.verify|verify} messages. - * @function encodeDelimited - * @memberof pyth_lazer_transaction.Permissions - * @static - * @param {pyth_lazer_transaction.IPermissions} message Permissions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Permissions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Permissions message from the specified reader or buffer. - * @function decode - * @memberof pyth_lazer_transaction.Permissions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pyth_lazer_transaction.Permissions} Permissions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Permissions.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.Permissions(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.allActions = reader.bool(); - break; - } - case 2: { - if (!(message.shardActions && message.shardActions.length)) - message.shardActions = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.shardActions.push(reader.int32()); - } else - message.shardActions.push(reader.int32()); - break; - } - case 3: { - message.allUpdateGovernanceSourceActions = reader.bool(); - break; - } - case 4: { - if (!(message.updateGovernanceSourceActions && message.updateGovernanceSourceActions.length)) - message.updateGovernanceSourceActions = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.updateGovernanceSourceActions.push(reader.int32()); - } else - message.updateGovernanceSourceActions.push(reader.int32()); - break; - } - case 5: { - message.allUpdatePublisherAction = reader.bool(); - break; - } - case 6: { - if (!(message.updatePublisherActions && message.updatePublisherActions.length)) - message.updatePublisherActions = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.updatePublisherActions.push(reader.int32()); - } else - message.updatePublisherActions.push(reader.int32()); - break; - } - case 7: { - message.allUpdateFeedActions = reader.bool(); - break; - } - case 8: { - if (!(message.updateFeedActions && message.updateFeedActions.length)) - message.updateFeedActions = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.updateFeedActions.push(reader.int32()); - } else - message.updateFeedActions.push(reader.int32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Permissions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pyth_lazer_transaction.Permissions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pyth_lazer_transaction.Permissions} Permissions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Permissions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Permissions message. - * @function verify - * @memberof pyth_lazer_transaction.Permissions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Permissions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.allActions != null && message.hasOwnProperty("allActions")) { - properties._allActions = 1; - if (typeof message.allActions !== "boolean") - return "allActions: boolean expected"; - } - if (message.shardActions != null && message.hasOwnProperty("shardActions")) { - if (!Array.isArray(message.shardActions)) - return "shardActions: array expected"; - for (var i = 0; i < message.shardActions.length; ++i) - switch (message.shardActions[i]) { - default: - return "shardActions: enum value[] expected"; - case 0: - case 101: - case 102: - case 103: - case 104: - case 105: - case 106: - case 107: - case 109: - break; - } - } - if (message.allUpdateGovernanceSourceActions != null && message.hasOwnProperty("allUpdateGovernanceSourceActions")) { - properties._allUpdateGovernanceSourceActions = 1; - if (typeof message.allUpdateGovernanceSourceActions !== "boolean") - return "allUpdateGovernanceSourceActions: boolean expected"; - } - if (message.updateGovernanceSourceActions != null && message.hasOwnProperty("updateGovernanceSourceActions")) { - if (!Array.isArray(message.updateGovernanceSourceActions)) - return "updateGovernanceSourceActions: array expected"; - for (var i = 0; i < message.updateGovernanceSourceActions.length; ++i) - switch (message.updateGovernanceSourceActions[i]) { - default: - return "updateGovernanceSourceActions: enum value[] expected"; - case 0: - case 101: - case 199: - break; - } - } - if (message.allUpdatePublisherAction != null && message.hasOwnProperty("allUpdatePublisherAction")) { - properties._allUpdatePublisherAction = 1; - if (typeof message.allUpdatePublisherAction !== "boolean") - return "allUpdatePublisherAction: boolean expected"; - } - if (message.updatePublisherActions != null && message.hasOwnProperty("updatePublisherActions")) { - if (!Array.isArray(message.updatePublisherActions)) - return "updatePublisherActions: array expected"; - for (var i = 0; i < message.updatePublisherActions.length; ++i) - switch (message.updatePublisherActions[i]) { - default: - return "updatePublisherActions: enum value[] expected"; - case 0: - case 101: - case 102: - case 103: - case 104: - case 105: - case 199: - break; - } - } - if (message.allUpdateFeedActions != null && message.hasOwnProperty("allUpdateFeedActions")) { - properties._allUpdateFeedActions = 1; - if (typeof message.allUpdateFeedActions !== "boolean") - return "allUpdateFeedActions: boolean expected"; - } - if (message.updateFeedActions != null && message.hasOwnProperty("updateFeedActions")) { - if (!Array.isArray(message.updateFeedActions)) - return "updateFeedActions: array expected"; - for (var i = 0; i < message.updateFeedActions.length; ++i) - switch (message.updateFeedActions[i]) { - default: - return "updateFeedActions: enum value[] expected"; - case 0: - case 101: - case 102: - case 103: - case 199: - break; - } - } - return null; - }; - - /** - * Creates a Permissions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pyth_lazer_transaction.Permissions - * @static - * @param {Object.} object Plain object - * @returns {pyth_lazer_transaction.Permissions} Permissions - */ - Permissions.fromObject = function fromObject(object) { - if (object instanceof $root.pyth_lazer_transaction.Permissions) - return object; - var message = new $root.pyth_lazer_transaction.Permissions(); - if (object.allActions != null) - message.allActions = Boolean(object.allActions); - if (object.shardActions) { - if (!Array.isArray(object.shardActions)) - throw TypeError(".pyth_lazer_transaction.Permissions.shardActions: array expected"); - message.shardActions = []; - for (var i = 0; i < object.shardActions.length; ++i) - switch (object.shardActions[i]) { - default: - if (typeof object.shardActions[i] === "number") { - message.shardActions[i] = object.shardActions[i]; - break; - } - case "SHARD_ACTION_UNSPECIFIED": - case 0: - message.shardActions[i] = 0; - break; - case "CREATE_SHARD": - case 101: - message.shardActions[i] = 101; - break; - case "ADD_GOVERNANCE_SOURCE": - case 102: - message.shardActions[i] = 102; - break; - case "UPDATE_GOVERNANCE_SOURCE": - case 103: - message.shardActions[i] = 103; - break; - case "SET_SHARD_NAME": - case 104: - message.shardActions[i] = 104; - break; - case "SET_SHARD_GROUP": - case 105: - message.shardActions[i] = 105; - break; - case "RESET_LAST_SEQUENCE_NO": - case 106: - message.shardActions[i] = 106; - break; - case "ADD_PUBLISHER": - case 107: - message.shardActions[i] = 107; - break; - case "ADD_FEED": - case 109: - message.shardActions[i] = 109; - break; - } - } - if (object.allUpdateGovernanceSourceActions != null) - message.allUpdateGovernanceSourceActions = Boolean(object.allUpdateGovernanceSourceActions); - if (object.updateGovernanceSourceActions) { - if (!Array.isArray(object.updateGovernanceSourceActions)) - throw TypeError(".pyth_lazer_transaction.Permissions.updateGovernanceSourceActions: array expected"); - message.updateGovernanceSourceActions = []; - for (var i = 0; i < object.updateGovernanceSourceActions.length; ++i) - switch (object.updateGovernanceSourceActions[i]) { - default: - if (typeof object.updateGovernanceSourceActions[i] === "number") { - message.updateGovernanceSourceActions[i] = object.updateGovernanceSourceActions[i]; - break; - } - case "UPDATE_GOVERNANCE_SOURCE_ACTION_UNSPECIFIED": - case 0: - message.updateGovernanceSourceActions[i] = 0; - break; - case "SET_GOVERNANCE_SOURCE_PERMISSIONS": - case 101: - message.updateGovernanceSourceActions[i] = 101; - break; - case "REMOVE_GOVERNANCE_SOURCE": - case 199: - message.updateGovernanceSourceActions[i] = 199; - break; - } - } - if (object.allUpdatePublisherAction != null) - message.allUpdatePublisherAction = Boolean(object.allUpdatePublisherAction); - if (object.updatePublisherActions) { - if (!Array.isArray(object.updatePublisherActions)) - throw TypeError(".pyth_lazer_transaction.Permissions.updatePublisherActions: array expected"); - message.updatePublisherActions = []; - for (var i = 0; i < object.updatePublisherActions.length; ++i) - switch (object.updatePublisherActions[i]) { - default: - if (typeof object.updatePublisherActions[i] === "number") { - message.updatePublisherActions[i] = object.updatePublisherActions[i]; - break; - } - case "UPDATE_PUBLISHER_ACTION_UNSPECIFIED": - case 0: - message.updatePublisherActions[i] = 0; - break; - case "SET_PUBLISHER_NAME": - case 101: - message.updatePublisherActions[i] = 101; - break; - case "ADD_PUBLISHER_PUBLIC_KEYS": - case 102: - message.updatePublisherActions[i] = 102; - break; - case "REMOVE_PUBLISHER_PUBLIC_KEYS": - case 103: - message.updatePublisherActions[i] = 103; - break; - case "SET_PUBLISHER_PUBLIC_KEYS": - case 104: - message.updatePublisherActions[i] = 104; - break; - case "SET_PUBLISHER_ACTIVE": - case 105: - message.updatePublisherActions[i] = 105; - break; - case "REMOVE_PUBLISHER": - case 199: - message.updatePublisherActions[i] = 199; - break; - } - } - if (object.allUpdateFeedActions != null) - message.allUpdateFeedActions = Boolean(object.allUpdateFeedActions); - if (object.updateFeedActions) { - if (!Array.isArray(object.updateFeedActions)) - throw TypeError(".pyth_lazer_transaction.Permissions.updateFeedActions: array expected"); - message.updateFeedActions = []; - for (var i = 0; i < object.updateFeedActions.length; ++i) - switch (object.updateFeedActions[i]) { - default: - if (typeof object.updateFeedActions[i] === "number") { - message.updateFeedActions[i] = object.updateFeedActions[i]; - break; - } - case "UPDATE_FEED_ACTION_UNSPECIFIED": - case 0: - message.updateFeedActions[i] = 0; - break; - case "UPDATE_FEED_METADATA": - case 101: - message.updateFeedActions[i] = 101; - break; - case "ACTIVATE_FEED": - case 102: - message.updateFeedActions[i] = 102; - break; - case "DEACTIVATE_FEED": - case 103: - message.updateFeedActions[i] = 103; - break; - case "REMOVE_FEED": - case 199: - message.updateFeedActions[i] = 199; - break; - } - } - return message; - }; - - /** - * Creates a plain object from a Permissions message. Also converts values to other types if specified. - * @function toObject - * @memberof pyth_lazer_transaction.Permissions - * @static - * @param {pyth_lazer_transaction.Permissions} message Permissions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Permissions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.shardActions = []; - object.updateGovernanceSourceActions = []; - object.updatePublisherActions = []; - object.updateFeedActions = []; - } - if (message.allActions != null && message.hasOwnProperty("allActions")) { - object.allActions = message.allActions; - if (options.oneofs) - object._allActions = "allActions"; - } - if (message.shardActions && message.shardActions.length) { - object.shardActions = []; - for (var j = 0; j < message.shardActions.length; ++j) - object.shardActions[j] = options.enums === String ? $root.pyth_lazer_transaction.Permissions.ShardAction[message.shardActions[j]] === undefined ? message.shardActions[j] : $root.pyth_lazer_transaction.Permissions.ShardAction[message.shardActions[j]] : message.shardActions[j]; - } - if (message.allUpdateGovernanceSourceActions != null && message.hasOwnProperty("allUpdateGovernanceSourceActions")) { - object.allUpdateGovernanceSourceActions = message.allUpdateGovernanceSourceActions; - if (options.oneofs) - object._allUpdateGovernanceSourceActions = "allUpdateGovernanceSourceActions"; - } - if (message.updateGovernanceSourceActions && message.updateGovernanceSourceActions.length) { - object.updateGovernanceSourceActions = []; - for (var j = 0; j < message.updateGovernanceSourceActions.length; ++j) - object.updateGovernanceSourceActions[j] = options.enums === String ? $root.pyth_lazer_transaction.Permissions.UpdateGovernanceSourceAction[message.updateGovernanceSourceActions[j]] === undefined ? message.updateGovernanceSourceActions[j] : $root.pyth_lazer_transaction.Permissions.UpdateGovernanceSourceAction[message.updateGovernanceSourceActions[j]] : message.updateGovernanceSourceActions[j]; - } - if (message.allUpdatePublisherAction != null && message.hasOwnProperty("allUpdatePublisherAction")) { - object.allUpdatePublisherAction = message.allUpdatePublisherAction; - if (options.oneofs) - object._allUpdatePublisherAction = "allUpdatePublisherAction"; - } - if (message.updatePublisherActions && message.updatePublisherActions.length) { - object.updatePublisherActions = []; - for (var j = 0; j < message.updatePublisherActions.length; ++j) - object.updatePublisherActions[j] = options.enums === String ? $root.pyth_lazer_transaction.Permissions.UpdatePublisherAction[message.updatePublisherActions[j]] === undefined ? message.updatePublisherActions[j] : $root.pyth_lazer_transaction.Permissions.UpdatePublisherAction[message.updatePublisherActions[j]] : message.updatePublisherActions[j]; - } - if (message.allUpdateFeedActions != null && message.hasOwnProperty("allUpdateFeedActions")) { - object.allUpdateFeedActions = message.allUpdateFeedActions; - if (options.oneofs) - object._allUpdateFeedActions = "allUpdateFeedActions"; - } - if (message.updateFeedActions && message.updateFeedActions.length) { - object.updateFeedActions = []; - for (var j = 0; j < message.updateFeedActions.length; ++j) - object.updateFeedActions[j] = options.enums === String ? $root.pyth_lazer_transaction.Permissions.UpdateFeedAction[message.updateFeedActions[j]] === undefined ? message.updateFeedActions[j] : $root.pyth_lazer_transaction.Permissions.UpdateFeedAction[message.updateFeedActions[j]] : message.updateFeedActions[j]; - } - return object; - }; - - /** - * Converts this Permissions to JSON. - * @function toJSON - * @memberof pyth_lazer_transaction.Permissions - * @instance - * @returns {Object.} JSON object - */ - Permissions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Permissions - * @function getTypeUrl - * @memberof pyth_lazer_transaction.Permissions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Permissions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pyth_lazer_transaction.Permissions"; - }; - - /** - * ShardAction enum. - * @name pyth_lazer_transaction.Permissions.ShardAction - * @enum {number} - * @property {number} SHARD_ACTION_UNSPECIFIED=0 SHARD_ACTION_UNSPECIFIED value - * @property {number} CREATE_SHARD=101 CREATE_SHARD value - * @property {number} ADD_GOVERNANCE_SOURCE=102 ADD_GOVERNANCE_SOURCE value - * @property {number} UPDATE_GOVERNANCE_SOURCE=103 UPDATE_GOVERNANCE_SOURCE value - * @property {number} SET_SHARD_NAME=104 SET_SHARD_NAME value - * @property {number} SET_SHARD_GROUP=105 SET_SHARD_GROUP value - * @property {number} RESET_LAST_SEQUENCE_NO=106 RESET_LAST_SEQUENCE_NO value - * @property {number} ADD_PUBLISHER=107 ADD_PUBLISHER value - * @property {number} ADD_FEED=109 ADD_FEED value - */ - Permissions.ShardAction = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SHARD_ACTION_UNSPECIFIED"] = 0; - values[valuesById[101] = "CREATE_SHARD"] = 101; - values[valuesById[102] = "ADD_GOVERNANCE_SOURCE"] = 102; - values[valuesById[103] = "UPDATE_GOVERNANCE_SOURCE"] = 103; - values[valuesById[104] = "SET_SHARD_NAME"] = 104; - values[valuesById[105] = "SET_SHARD_GROUP"] = 105; - values[valuesById[106] = "RESET_LAST_SEQUENCE_NO"] = 106; - values[valuesById[107] = "ADD_PUBLISHER"] = 107; - values[valuesById[109] = "ADD_FEED"] = 109; - return values; - })(); - - /** - * UpdateGovernanceSourceAction enum. - * @name pyth_lazer_transaction.Permissions.UpdateGovernanceSourceAction - * @enum {number} - * @property {number} UPDATE_GOVERNANCE_SOURCE_ACTION_UNSPECIFIED=0 UPDATE_GOVERNANCE_SOURCE_ACTION_UNSPECIFIED value - * @property {number} SET_GOVERNANCE_SOURCE_PERMISSIONS=101 SET_GOVERNANCE_SOURCE_PERMISSIONS value - * @property {number} REMOVE_GOVERNANCE_SOURCE=199 REMOVE_GOVERNANCE_SOURCE value - */ - Permissions.UpdateGovernanceSourceAction = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UPDATE_GOVERNANCE_SOURCE_ACTION_UNSPECIFIED"] = 0; - values[valuesById[101] = "SET_GOVERNANCE_SOURCE_PERMISSIONS"] = 101; - values[valuesById[199] = "REMOVE_GOVERNANCE_SOURCE"] = 199; - return values; - })(); - - /** - * UpdatePublisherAction enum. - * @name pyth_lazer_transaction.Permissions.UpdatePublisherAction - * @enum {number} - * @property {number} UPDATE_PUBLISHER_ACTION_UNSPECIFIED=0 UPDATE_PUBLISHER_ACTION_UNSPECIFIED value - * @property {number} SET_PUBLISHER_NAME=101 SET_PUBLISHER_NAME value - * @property {number} ADD_PUBLISHER_PUBLIC_KEYS=102 ADD_PUBLISHER_PUBLIC_KEYS value - * @property {number} REMOVE_PUBLISHER_PUBLIC_KEYS=103 REMOVE_PUBLISHER_PUBLIC_KEYS value - * @property {number} SET_PUBLISHER_PUBLIC_KEYS=104 SET_PUBLISHER_PUBLIC_KEYS value - * @property {number} SET_PUBLISHER_ACTIVE=105 SET_PUBLISHER_ACTIVE value - * @property {number} REMOVE_PUBLISHER=199 REMOVE_PUBLISHER value - */ - Permissions.UpdatePublisherAction = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UPDATE_PUBLISHER_ACTION_UNSPECIFIED"] = 0; - values[valuesById[101] = "SET_PUBLISHER_NAME"] = 101; - values[valuesById[102] = "ADD_PUBLISHER_PUBLIC_KEYS"] = 102; - values[valuesById[103] = "REMOVE_PUBLISHER_PUBLIC_KEYS"] = 103; - values[valuesById[104] = "SET_PUBLISHER_PUBLIC_KEYS"] = 104; - values[valuesById[105] = "SET_PUBLISHER_ACTIVE"] = 105; - values[valuesById[199] = "REMOVE_PUBLISHER"] = 199; - return values; - })(); - - /** - * UpdateFeedAction enum. - * @name pyth_lazer_transaction.Permissions.UpdateFeedAction - * @enum {number} - * @property {number} UPDATE_FEED_ACTION_UNSPECIFIED=0 UPDATE_FEED_ACTION_UNSPECIFIED value - * @property {number} UPDATE_FEED_METADATA=101 UPDATE_FEED_METADATA value - * @property {number} ACTIVATE_FEED=102 ACTIVATE_FEED value - * @property {number} DEACTIVATE_FEED=103 DEACTIVATE_FEED value - * @property {number} REMOVE_FEED=199 REMOVE_FEED value - */ - Permissions.UpdateFeedAction = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UPDATE_FEED_ACTION_UNSPECIFIED"] = 0; - values[valuesById[101] = "UPDATE_FEED_METADATA"] = 101; - values[valuesById[102] = "ACTIVATE_FEED"] = 102; - values[valuesById[103] = "DEACTIVATE_FEED"] = 103; - values[valuesById[199] = "REMOVE_FEED"] = 199; - return values; - })(); - - return Permissions; - })(); + /** + * Decodes a GovernanceInstruction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.GovernanceInstruction} GovernanceInstruction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GovernanceInstruction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GovernanceInstruction message. + * @function verify + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GovernanceInstruction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.directives != null && message.hasOwnProperty("directives")) { + if (!Array.isArray(message.directives)) + return "directives: array expected"; + for (var i = 0; i < message.directives.length; ++i) { + var error = $root.pyth_lazer_transaction.GovernanceDirective.verify( + message.directives[i], + ); + if (error) return "directives." + error; + } + } + if ( + message.minExecutionTimestamp != null && + message.hasOwnProperty("minExecutionTimestamp") + ) { + properties._minExecutionTimestamp = 1; + { + var error = $root.google.protobuf.Timestamp.verify( + message.minExecutionTimestamp, + ); + if (error) return "minExecutionTimestamp." + error; + } + } + if ( + message.maxExecutionTimestamp != null && + message.hasOwnProperty("maxExecutionTimestamp") + ) { + properties._maxExecutionTimestamp = 1; + { + var error = $root.google.protobuf.Timestamp.verify( + message.maxExecutionTimestamp, + ); + if (error) return "maxExecutionTimestamp." + error; + } + } + if ( + message.governanceSequenceNo != null && + message.hasOwnProperty("governanceSequenceNo") + ) { + properties._governanceSequenceNo = 1; + if (!$util.isInteger(message.governanceSequenceNo)) + return "governanceSequenceNo: integer expected"; + } + return null; + }; - pyth_lazer_transaction.GovernanceSource = (function() { - - /** - * Properties of a GovernanceSource. - * @memberof pyth_lazer_transaction - * @interface IGovernanceSource - * @property {pyth_lazer_transaction.GovernanceSource.ISingleEd25519|null} [singleEd25519] GovernanceSource singleEd25519 - * @property {pyth_lazer_transaction.GovernanceSource.IWormholeEmitter|null} [wormholeEmitter] GovernanceSource wormholeEmitter - */ - - /** - * Constructs a new GovernanceSource. - * @memberof pyth_lazer_transaction - * @classdesc Represents a GovernanceSource. - * @implements IGovernanceSource - * @constructor - * @param {pyth_lazer_transaction.IGovernanceSource=} [properties] Properties to set - */ - function GovernanceSource(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Creates a GovernanceInstruction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.GovernanceInstruction} GovernanceInstruction + */ + GovernanceInstruction.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.GovernanceInstruction) + return object; + var message = new $root.pyth_lazer_transaction.GovernanceInstruction(); + if (object.directives) { + if (!Array.isArray(object.directives)) + throw TypeError( + ".pyth_lazer_transaction.GovernanceInstruction.directives: array expected", + ); + message.directives = []; + for (var i = 0; i < object.directives.length; ++i) { + if (typeof object.directives[i] !== "object") + throw TypeError( + ".pyth_lazer_transaction.GovernanceInstruction.directives: object expected", + ); + message.directives[i] = + $root.pyth_lazer_transaction.GovernanceDirective.fromObject( + object.directives[i], + ); } + } + if (object.minExecutionTimestamp != null) { + if (typeof object.minExecutionTimestamp !== "object") + throw TypeError( + ".pyth_lazer_transaction.GovernanceInstruction.minExecutionTimestamp: object expected", + ); + message.minExecutionTimestamp = + $root.google.protobuf.Timestamp.fromObject( + object.minExecutionTimestamp, + ); + } + if (object.maxExecutionTimestamp != null) { + if (typeof object.maxExecutionTimestamp !== "object") + throw TypeError( + ".pyth_lazer_transaction.GovernanceInstruction.maxExecutionTimestamp: object expected", + ); + message.maxExecutionTimestamp = + $root.google.protobuf.Timestamp.fromObject( + object.maxExecutionTimestamp, + ); + } + if (object.governanceSequenceNo != null) + message.governanceSequenceNo = object.governanceSequenceNo >>> 0; + return message; + }; - /** - * GovernanceSource singleEd25519. - * @member {pyth_lazer_transaction.GovernanceSource.ISingleEd25519|null|undefined} singleEd25519 - * @memberof pyth_lazer_transaction.GovernanceSource - * @instance - */ - GovernanceSource.prototype.singleEd25519 = null; - - /** - * GovernanceSource wormholeEmitter. - * @member {pyth_lazer_transaction.GovernanceSource.IWormholeEmitter|null|undefined} wormholeEmitter - * @memberof pyth_lazer_transaction.GovernanceSource - * @instance - */ - GovernanceSource.prototype.wormholeEmitter = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * GovernanceSource source. - * @member {"singleEd25519"|"wormholeEmitter"|undefined} source - * @memberof pyth_lazer_transaction.GovernanceSource - * @instance - */ - Object.defineProperty(GovernanceSource.prototype, "source", { - get: $util.oneOfGetter($oneOfFields = ["singleEd25519", "wormholeEmitter"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new GovernanceSource instance using the specified properties. - * @function create - * @memberof pyth_lazer_transaction.GovernanceSource - * @static - * @param {pyth_lazer_transaction.IGovernanceSource=} [properties] Properties to set - * @returns {pyth_lazer_transaction.GovernanceSource} GovernanceSource instance - */ - GovernanceSource.create = function create(properties) { - return new GovernanceSource(properties); - }; - - /** - * Encodes the specified GovernanceSource message. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.verify|verify} messages. - * @function encode - * @memberof pyth_lazer_transaction.GovernanceSource - * @static - * @param {pyth_lazer_transaction.IGovernanceSource} message GovernanceSource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GovernanceSource.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.singleEd25519 != null && Object.hasOwnProperty.call(message, "singleEd25519")) - $root.pyth_lazer_transaction.GovernanceSource.SingleEd25519.encode(message.singleEd25519, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.wormholeEmitter != null && Object.hasOwnProperty.call(message, "wormholeEmitter")) - $root.pyth_lazer_transaction.GovernanceSource.WormholeEmitter.encode(message.wormholeEmitter, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GovernanceSource message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.verify|verify} messages. - * @function encodeDelimited - * @memberof pyth_lazer_transaction.GovernanceSource - * @static - * @param {pyth_lazer_transaction.IGovernanceSource} message GovernanceSource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GovernanceSource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GovernanceSource message from the specified reader or buffer. - * @function decode - * @memberof pyth_lazer_transaction.GovernanceSource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pyth_lazer_transaction.GovernanceSource} GovernanceSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GovernanceSource.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.GovernanceSource(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.singleEd25519 = $root.pyth_lazer_transaction.GovernanceSource.SingleEd25519.decode(reader, reader.uint32()); - break; - } - case 2: { - message.wormholeEmitter = $root.pyth_lazer_transaction.GovernanceSource.WormholeEmitter.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GovernanceSource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pyth_lazer_transaction.GovernanceSource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pyth_lazer_transaction.GovernanceSource} GovernanceSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GovernanceSource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GovernanceSource message. - * @function verify - * @memberof pyth_lazer_transaction.GovernanceSource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GovernanceSource.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.singleEd25519 != null && message.hasOwnProperty("singleEd25519")) { - properties.source = 1; - { - var error = $root.pyth_lazer_transaction.GovernanceSource.SingleEd25519.verify(message.singleEd25519); - if (error) - return "singleEd25519." + error; - } - } - if (message.wormholeEmitter != null && message.hasOwnProperty("wormholeEmitter")) { - if (properties.source === 1) - return "source: multiple values"; - properties.source = 1; - { - var error = $root.pyth_lazer_transaction.GovernanceSource.WormholeEmitter.verify(message.wormholeEmitter); - if (error) - return "wormholeEmitter." + error; - } - } - return null; - }; - - /** - * Creates a GovernanceSource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pyth_lazer_transaction.GovernanceSource - * @static - * @param {Object.} object Plain object - * @returns {pyth_lazer_transaction.GovernanceSource} GovernanceSource - */ - GovernanceSource.fromObject = function fromObject(object) { - if (object instanceof $root.pyth_lazer_transaction.GovernanceSource) - return object; - var message = new $root.pyth_lazer_transaction.GovernanceSource(); - if (object.singleEd25519 != null) { - if (typeof object.singleEd25519 !== "object") - throw TypeError(".pyth_lazer_transaction.GovernanceSource.singleEd25519: object expected"); - message.singleEd25519 = $root.pyth_lazer_transaction.GovernanceSource.SingleEd25519.fromObject(object.singleEd25519); - } - if (object.wormholeEmitter != null) { - if (typeof object.wormholeEmitter !== "object") - throw TypeError(".pyth_lazer_transaction.GovernanceSource.wormholeEmitter: object expected"); - message.wormholeEmitter = $root.pyth_lazer_transaction.GovernanceSource.WormholeEmitter.fromObject(object.wormholeEmitter); - } - return message; - }; - - /** - * Creates a plain object from a GovernanceSource message. Also converts values to other types if specified. - * @function toObject - * @memberof pyth_lazer_transaction.GovernanceSource - * @static - * @param {pyth_lazer_transaction.GovernanceSource} message GovernanceSource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GovernanceSource.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.singleEd25519 != null && message.hasOwnProperty("singleEd25519")) { - object.singleEd25519 = $root.pyth_lazer_transaction.GovernanceSource.SingleEd25519.toObject(message.singleEd25519, options); - if (options.oneofs) - object.source = "singleEd25519"; - } - if (message.wormholeEmitter != null && message.hasOwnProperty("wormholeEmitter")) { - object.wormholeEmitter = $root.pyth_lazer_transaction.GovernanceSource.WormholeEmitter.toObject(message.wormholeEmitter, options); - if (options.oneofs) - object.source = "wormholeEmitter"; - } - return object; - }; - - /** - * Converts this GovernanceSource to JSON. - * @function toJSON - * @memberof pyth_lazer_transaction.GovernanceSource - * @instance - * @returns {Object.} JSON object - */ - GovernanceSource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GovernanceSource - * @function getTypeUrl - * @memberof pyth_lazer_transaction.GovernanceSource - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GovernanceSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pyth_lazer_transaction.GovernanceSource"; - }; - - GovernanceSource.SingleEd25519 = (function() { - - /** - * Properties of a SingleEd25519. - * @memberof pyth_lazer_transaction.GovernanceSource - * @interface ISingleEd25519 - * @property {Uint8Array|null} [publicKey] SingleEd25519 publicKey - */ - - /** - * Constructs a new SingleEd25519. - * @memberof pyth_lazer_transaction.GovernanceSource - * @classdesc Represents a SingleEd25519. - * @implements ISingleEd25519 - * @constructor - * @param {pyth_lazer_transaction.GovernanceSource.ISingleEd25519=} [properties] Properties to set - */ - function SingleEd25519(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Creates a plain object from a GovernanceInstruction message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @static + * @param {pyth_lazer_transaction.GovernanceInstruction} message GovernanceInstruction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GovernanceInstruction.toObject = function toObject(message, options) { + if (!options) options = {}; + var object = {}; + if (options.arrays || options.defaults) object.directives = []; + if (message.directives && message.directives.length) { + object.directives = []; + for (var j = 0; j < message.directives.length; ++j) + object.directives[j] = + $root.pyth_lazer_transaction.GovernanceDirective.toObject( + message.directives[j], + options, + ); + } + if ( + message.minExecutionTimestamp != null && + message.hasOwnProperty("minExecutionTimestamp") + ) { + object.minExecutionTimestamp = $root.google.protobuf.Timestamp.toObject( + message.minExecutionTimestamp, + options, + ); + if (options.oneofs) + object._minExecutionTimestamp = "minExecutionTimestamp"; + } + if ( + message.maxExecutionTimestamp != null && + message.hasOwnProperty("maxExecutionTimestamp") + ) { + object.maxExecutionTimestamp = $root.google.protobuf.Timestamp.toObject( + message.maxExecutionTimestamp, + options, + ); + if (options.oneofs) + object._maxExecutionTimestamp = "maxExecutionTimestamp"; + } + if ( + message.governanceSequenceNo != null && + message.hasOwnProperty("governanceSequenceNo") + ) { + object.governanceSequenceNo = message.governanceSequenceNo; + if (options.oneofs) + object._governanceSequenceNo = "governanceSequenceNo"; + } + return object; + }; - /** - * SingleEd25519 publicKey. - * @member {Uint8Array|null|undefined} publicKey - * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 - * @instance - */ - SingleEd25519.prototype.publicKey = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * SingleEd25519 _publicKey. - * @member {"publicKey"|undefined} _publicKey - * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 - * @instance - */ - Object.defineProperty(SingleEd25519.prototype, "_publicKey", { - get: $util.oneOfGetter($oneOfFields = ["publicKey"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new SingleEd25519 instance using the specified properties. - * @function create - * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 - * @static - * @param {pyth_lazer_transaction.GovernanceSource.ISingleEd25519=} [properties] Properties to set - * @returns {pyth_lazer_transaction.GovernanceSource.SingleEd25519} SingleEd25519 instance - */ - SingleEd25519.create = function create(properties) { - return new SingleEd25519(properties); - }; - - /** - * Encodes the specified SingleEd25519 message. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.SingleEd25519.verify|verify} messages. - * @function encode - * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 - * @static - * @param {pyth_lazer_transaction.GovernanceSource.ISingleEd25519} message SingleEd25519 message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SingleEd25519.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 SingleEd25519 message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.SingleEd25519.verify|verify} messages. - * @function encodeDelimited - * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 - * @static - * @param {pyth_lazer_transaction.GovernanceSource.ISingleEd25519} message SingleEd25519 message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SingleEd25519.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SingleEd25519 message from the specified reader or buffer. - * @function decode - * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pyth_lazer_transaction.GovernanceSource.SingleEd25519} SingleEd25519 - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SingleEd25519.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.GovernanceSource.SingleEd25519(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.publicKey = reader.bytes(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SingleEd25519 message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pyth_lazer_transaction.GovernanceSource.SingleEd25519} SingleEd25519 - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SingleEd25519.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SingleEd25519 message. - * @function verify - * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SingleEd25519.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.publicKey != null && message.hasOwnProperty("publicKey")) { - properties._publicKey = 1; - if (!(message.publicKey && typeof message.publicKey.length === "number" || $util.isString(message.publicKey))) - return "publicKey: buffer expected"; - } - return null; - }; - - /** - * Creates a SingleEd25519 message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 - * @static - * @param {Object.} object Plain object - * @returns {pyth_lazer_transaction.GovernanceSource.SingleEd25519} SingleEd25519 - */ - SingleEd25519.fromObject = function fromObject(object) { - if (object instanceof $root.pyth_lazer_transaction.GovernanceSource.SingleEd25519) - return object; - var message = new $root.pyth_lazer_transaction.GovernanceSource.SingleEd25519(); - if (object.publicKey != null) - if (typeof object.publicKey === "string") - $util.base64.decode(object.publicKey, message.publicKey = $util.newBuffer($util.base64.length(object.publicKey)), 0); - else if (object.publicKey.length >= 0) - message.publicKey = object.publicKey; - return message; - }; - - /** - * Creates a plain object from a SingleEd25519 message. Also converts values to other types if specified. - * @function toObject - * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 - * @static - * @param {pyth_lazer_transaction.GovernanceSource.SingleEd25519} message SingleEd25519 - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SingleEd25519.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - 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; - if (options.oneofs) - object._publicKey = "publicKey"; - } - return object; - }; - - /** - * Converts this SingleEd25519 to JSON. - * @function toJSON - * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 - * @instance - * @returns {Object.} JSON object - */ - SingleEd25519.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SingleEd25519 - * @function getTypeUrl - * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SingleEd25519.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pyth_lazer_transaction.GovernanceSource.SingleEd25519"; - }; - - return SingleEd25519; - })(); - - GovernanceSource.WormholeEmitter = (function() { - - /** - * Properties of a WormholeEmitter. - * @memberof pyth_lazer_transaction.GovernanceSource - * @interface IWormholeEmitter - * @property {Uint8Array|null} [address] WormholeEmitter address - * @property {number|null} [chainId] WormholeEmitter chainId - */ - - /** - * Constructs a new WormholeEmitter. - * @memberof pyth_lazer_transaction.GovernanceSource - * @classdesc Represents a WormholeEmitter. - * @implements IWormholeEmitter - * @constructor - * @param {pyth_lazer_transaction.GovernanceSource.IWormholeEmitter=} [properties] Properties to set - */ - function WormholeEmitter(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Converts this GovernanceInstruction to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @instance + * @returns {Object.} JSON object + */ + GovernanceInstruction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * WormholeEmitter address. - * @member {Uint8Array|null|undefined} address - * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter - * @instance - */ - WormholeEmitter.prototype.address = null; - - /** - * WormholeEmitter chainId. - * @member {number|null|undefined} chainId - * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter - * @instance - */ - WormholeEmitter.prototype.chainId = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * WormholeEmitter _address. - * @member {"address"|undefined} _address - * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter - * @instance - */ - Object.defineProperty(WormholeEmitter.prototype, "_address", { - get: $util.oneOfGetter($oneOfFields = ["address"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * WormholeEmitter _chainId. - * @member {"chainId"|undefined} _chainId - * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter - * @instance - */ - Object.defineProperty(WormholeEmitter.prototype, "_chainId", { - get: $util.oneOfGetter($oneOfFields = ["chainId"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new WormholeEmitter instance using the specified properties. - * @function create - * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter - * @static - * @param {pyth_lazer_transaction.GovernanceSource.IWormholeEmitter=} [properties] Properties to set - * @returns {pyth_lazer_transaction.GovernanceSource.WormholeEmitter} WormholeEmitter instance - */ - WormholeEmitter.create = function create(properties) { - return new WormholeEmitter(properties); - }; - - /** - * Encodes the specified WormholeEmitter message. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.WormholeEmitter.verify|verify} messages. - * @function encode - * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter - * @static - * @param {pyth_lazer_transaction.GovernanceSource.IWormholeEmitter} message WormholeEmitter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WormholeEmitter.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.address != null && Object.hasOwnProperty.call(message, "address")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.address); - if (message.chainId != null && Object.hasOwnProperty.call(message, "chainId")) - writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.chainId); - return writer; - }; - - /** - * Encodes the specified WormholeEmitter message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.WormholeEmitter.verify|verify} messages. - * @function encodeDelimited - * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter - * @static - * @param {pyth_lazer_transaction.GovernanceSource.IWormholeEmitter} message WormholeEmitter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WormholeEmitter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WormholeEmitter message from the specified reader or buffer. - * @function decode - * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pyth_lazer_transaction.GovernanceSource.WormholeEmitter} WormholeEmitter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WormholeEmitter.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.GovernanceSource.WormholeEmitter(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.address = reader.bytes(); - break; - } - case 2: { - message.chainId = reader.uint32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WormholeEmitter message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pyth_lazer_transaction.GovernanceSource.WormholeEmitter} WormholeEmitter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WormholeEmitter.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WormholeEmitter message. - * @function verify - * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WormholeEmitter.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.address != null && message.hasOwnProperty("address")) { - properties._address = 1; - if (!(message.address && typeof message.address.length === "number" || $util.isString(message.address))) - return "address: buffer expected"; - } - if (message.chainId != null && message.hasOwnProperty("chainId")) { - properties._chainId = 1; - if (!$util.isInteger(message.chainId)) - return "chainId: integer expected"; - } - return null; - }; - - /** - * Creates a WormholeEmitter message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter - * @static - * @param {Object.} object Plain object - * @returns {pyth_lazer_transaction.GovernanceSource.WormholeEmitter} WormholeEmitter - */ - WormholeEmitter.fromObject = function fromObject(object) { - if (object instanceof $root.pyth_lazer_transaction.GovernanceSource.WormholeEmitter) - return object; - var message = new $root.pyth_lazer_transaction.GovernanceSource.WormholeEmitter(); - if (object.address != null) - if (typeof object.address === "string") - $util.base64.decode(object.address, message.address = $util.newBuffer($util.base64.length(object.address)), 0); - else if (object.address.length >= 0) - message.address = object.address; - if (object.chainId != null) - message.chainId = object.chainId >>> 0; - return message; - }; - - /** - * Creates a plain object from a WormholeEmitter message. Also converts values to other types if specified. - * @function toObject - * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter - * @static - * @param {pyth_lazer_transaction.GovernanceSource.WormholeEmitter} message WormholeEmitter - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WormholeEmitter.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.address != null && message.hasOwnProperty("address")) { - object.address = options.bytes === String ? $util.base64.encode(message.address, 0, message.address.length) : options.bytes === Array ? Array.prototype.slice.call(message.address) : message.address; - if (options.oneofs) - object._address = "address"; - } - if (message.chainId != null && message.hasOwnProperty("chainId")) { - object.chainId = message.chainId; - if (options.oneofs) - object._chainId = "chainId"; - } - return object; - }; - - /** - * Converts this WormholeEmitter to JSON. - * @function toJSON - * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter - * @instance - * @returns {Object.} JSON object - */ - WormholeEmitter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for WormholeEmitter - * @function getTypeUrl - * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - WormholeEmitter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pyth_lazer_transaction.GovernanceSource.WormholeEmitter"; - }; - - return WormholeEmitter; - })(); - - return GovernanceSource; - })(); + /** + * Gets the default type url for GovernanceInstruction + * @function getTypeUrl + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GovernanceInstruction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.GovernanceInstruction"; + }; - pyth_lazer_transaction.CreateShard = (function() { - - /** - * Properties of a CreateShard. - * @memberof pyth_lazer_transaction - * @interface ICreateShard - * @property {number|null} [shardId] CreateShard shardId - * @property {string|null} [shardGroup] CreateShard shardGroup - * @property {google.protobuf.IDuration|null} [minRate] CreateShard minRate - */ - - /** - * Constructs a new CreateShard. - * @memberof pyth_lazer_transaction - * @classdesc Represents a CreateShard. - * @implements ICreateShard - * @constructor - * @param {pyth_lazer_transaction.ICreateShard=} [properties] Properties to set - */ - function CreateShard(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + return GovernanceInstruction; + })(); - /** - * CreateShard shardId. - * @member {number|null|undefined} shardId - * @memberof pyth_lazer_transaction.CreateShard - * @instance - */ - CreateShard.prototype.shardId = null; - - /** - * CreateShard shardGroup. - * @member {string|null|undefined} shardGroup - * @memberof pyth_lazer_transaction.CreateShard - * @instance - */ - CreateShard.prototype.shardGroup = null; - - /** - * CreateShard minRate. - * @member {google.protobuf.IDuration|null|undefined} minRate - * @memberof pyth_lazer_transaction.CreateShard - * @instance - */ - CreateShard.prototype.minRate = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * CreateShard _shardId. - * @member {"shardId"|undefined} _shardId - * @memberof pyth_lazer_transaction.CreateShard - * @instance - */ - Object.defineProperty(CreateShard.prototype, "_shardId", { - get: $util.oneOfGetter($oneOfFields = ["shardId"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * CreateShard _shardGroup. - * @member {"shardGroup"|undefined} _shardGroup - * @memberof pyth_lazer_transaction.CreateShard - * @instance - */ - Object.defineProperty(CreateShard.prototype, "_shardGroup", { - get: $util.oneOfGetter($oneOfFields = ["shardGroup"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * CreateShard _minRate. - * @member {"minRate"|undefined} _minRate - * @memberof pyth_lazer_transaction.CreateShard - * @instance - */ - Object.defineProperty(CreateShard.prototype, "_minRate", { - get: $util.oneOfGetter($oneOfFields = ["minRate"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new CreateShard instance using the specified properties. - * @function create - * @memberof pyth_lazer_transaction.CreateShard - * @static - * @param {pyth_lazer_transaction.ICreateShard=} [properties] Properties to set - * @returns {pyth_lazer_transaction.CreateShard} CreateShard instance - */ - CreateShard.create = function create(properties) { - return new CreateShard(properties); - }; - - /** - * Encodes the specified CreateShard message. Does not implicitly {@link pyth_lazer_transaction.CreateShard.verify|verify} messages. - * @function encode - * @memberof pyth_lazer_transaction.CreateShard - * @static - * @param {pyth_lazer_transaction.ICreateShard} message CreateShard message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateShard.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.shardId != null && Object.hasOwnProperty.call(message, "shardId")) - writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.shardId); - if (message.shardGroup != null && Object.hasOwnProperty.call(message, "shardGroup")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.shardGroup); - if (message.minRate != null && Object.hasOwnProperty.call(message, "minRate")) - $root.google.protobuf.Duration.encode(message.minRate, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CreateShard message, length delimited. Does not implicitly {@link pyth_lazer_transaction.CreateShard.verify|verify} messages. - * @function encodeDelimited - * @memberof pyth_lazer_transaction.CreateShard - * @static - * @param {pyth_lazer_transaction.ICreateShard} message CreateShard message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateShard.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateShard message from the specified reader or buffer. - * @function decode - * @memberof pyth_lazer_transaction.CreateShard - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pyth_lazer_transaction.CreateShard} CreateShard - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateShard.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.CreateShard(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.shardId = reader.uint32(); - break; - } - case 2: { - message.shardGroup = reader.string(); - break; - } - case 3: { - message.minRate = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateShard message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pyth_lazer_transaction.CreateShard - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pyth_lazer_transaction.CreateShard} CreateShard - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateShard.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateShard message. - * @function verify - * @memberof pyth_lazer_transaction.CreateShard - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateShard.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.shardId != null && message.hasOwnProperty("shardId")) { - properties._shardId = 1; - if (!$util.isInteger(message.shardId)) - return "shardId: integer expected"; - } - if (message.shardGroup != null && message.hasOwnProperty("shardGroup")) { - properties._shardGroup = 1; - if (!$util.isString(message.shardGroup)) - return "shardGroup: string expected"; - } - if (message.minRate != null && message.hasOwnProperty("minRate")) { - properties._minRate = 1; - { - var error = $root.google.protobuf.Duration.verify(message.minRate); - if (error) - return "minRate." + error; - } - } - return null; - }; - - /** - * Creates a CreateShard message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pyth_lazer_transaction.CreateShard - * @static - * @param {Object.} object Plain object - * @returns {pyth_lazer_transaction.CreateShard} CreateShard - */ - CreateShard.fromObject = function fromObject(object) { - if (object instanceof $root.pyth_lazer_transaction.CreateShard) - return object; - var message = new $root.pyth_lazer_transaction.CreateShard(); - if (object.shardId != null) - message.shardId = object.shardId >>> 0; - if (object.shardGroup != null) - message.shardGroup = String(object.shardGroup); - if (object.minRate != null) { - if (typeof object.minRate !== "object") - throw TypeError(".pyth_lazer_transaction.CreateShard.minRate: object expected"); - message.minRate = $root.google.protobuf.Duration.fromObject(object.minRate); - } - return message; - }; - - /** - * Creates a plain object from a CreateShard message. Also converts values to other types if specified. - * @function toObject - * @memberof pyth_lazer_transaction.CreateShard - * @static - * @param {pyth_lazer_transaction.CreateShard} message CreateShard - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateShard.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.shardId != null && message.hasOwnProperty("shardId")) { - object.shardId = message.shardId; - if (options.oneofs) - object._shardId = "shardId"; - } - if (message.shardGroup != null && message.hasOwnProperty("shardGroup")) { - object.shardGroup = message.shardGroup; - if (options.oneofs) - object._shardGroup = "shardGroup"; - } - if (message.minRate != null && message.hasOwnProperty("minRate")) { - object.minRate = $root.google.protobuf.Duration.toObject(message.minRate, options); - if (options.oneofs) - object._minRate = "minRate"; - } - return object; - }; - - /** - * Converts this CreateShard to JSON. - * @function toJSON - * @memberof pyth_lazer_transaction.CreateShard - * @instance - * @returns {Object.} JSON object - */ - CreateShard.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateShard - * @function getTypeUrl - * @memberof pyth_lazer_transaction.CreateShard - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateShard.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pyth_lazer_transaction.CreateShard"; - }; + pyth_lazer_transaction.ShardFilter = (function () { + /** + * Properties of a ShardFilter. + * @memberof pyth_lazer_transaction + * @interface IShardFilter + * @property {google.protobuf.IEmpty|null} [allShards] ShardFilter allShards + * @property {pyth_lazer_transaction.ShardFilter.IShardNames|null} [shardNames] ShardFilter shardNames + * @property {pyth_lazer_transaction.ShardFilter.IShardGroups|null} [shardGroups] ShardFilter shardGroups + */ - return CreateShard; - })(); + /** + * Constructs a new ShardFilter. + * @memberof pyth_lazer_transaction + * @classdesc Represents a ShardFilter. + * @implements IShardFilter + * @constructor + * @param {pyth_lazer_transaction.IShardFilter=} [properties] Properties to set + */ + function ShardFilter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + } - pyth_lazer_transaction.AddGovernanceSource = (function() { - - /** - * Properties of an AddGovernanceSource. - * @memberof pyth_lazer_transaction - * @interface IAddGovernanceSource - * @property {pyth_lazer_transaction.IGovernanceSource|null} [newSource] AddGovernanceSource newSource - * @property {pyth_lazer_transaction.IPermissions|null} [permissions] AddGovernanceSource permissions - */ - - /** - * Constructs a new AddGovernanceSource. - * @memberof pyth_lazer_transaction - * @classdesc Represents an AddGovernanceSource. - * @implements IAddGovernanceSource - * @constructor - * @param {pyth_lazer_transaction.IAddGovernanceSource=} [properties] Properties to set - */ - function AddGovernanceSource(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * ShardFilter allShards. + * @member {google.protobuf.IEmpty|null|undefined} allShards + * @memberof pyth_lazer_transaction.ShardFilter + * @instance + */ + ShardFilter.prototype.allShards = null; - /** - * AddGovernanceSource newSource. - * @member {pyth_lazer_transaction.IGovernanceSource|null|undefined} newSource - * @memberof pyth_lazer_transaction.AddGovernanceSource - * @instance - */ - AddGovernanceSource.prototype.newSource = null; - - /** - * AddGovernanceSource permissions. - * @member {pyth_lazer_transaction.IPermissions|null|undefined} permissions - * @memberof pyth_lazer_transaction.AddGovernanceSource - * @instance - */ - AddGovernanceSource.prototype.permissions = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * AddGovernanceSource _newSource. - * @member {"newSource"|undefined} _newSource - * @memberof pyth_lazer_transaction.AddGovernanceSource - * @instance - */ - Object.defineProperty(AddGovernanceSource.prototype, "_newSource", { - get: $util.oneOfGetter($oneOfFields = ["newSource"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AddGovernanceSource _permissions. - * @member {"permissions"|undefined} _permissions - * @memberof pyth_lazer_transaction.AddGovernanceSource - * @instance - */ - Object.defineProperty(AddGovernanceSource.prototype, "_permissions", { - get: $util.oneOfGetter($oneOfFields = ["permissions"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new AddGovernanceSource instance using the specified properties. - * @function create - * @memberof pyth_lazer_transaction.AddGovernanceSource - * @static - * @param {pyth_lazer_transaction.IAddGovernanceSource=} [properties] Properties to set - * @returns {pyth_lazer_transaction.AddGovernanceSource} AddGovernanceSource instance - */ - AddGovernanceSource.create = function create(properties) { - return new AddGovernanceSource(properties); - }; - - /** - * Encodes the specified AddGovernanceSource message. Does not implicitly {@link pyth_lazer_transaction.AddGovernanceSource.verify|verify} messages. - * @function encode - * @memberof pyth_lazer_transaction.AddGovernanceSource - * @static - * @param {pyth_lazer_transaction.IAddGovernanceSource} message AddGovernanceSource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AddGovernanceSource.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.newSource != null && Object.hasOwnProperty.call(message, "newSource")) - $root.pyth_lazer_transaction.GovernanceSource.encode(message.newSource, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.permissions != null && Object.hasOwnProperty.call(message, "permissions")) - $root.pyth_lazer_transaction.Permissions.encode(message.permissions, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified AddGovernanceSource message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddGovernanceSource.verify|verify} messages. - * @function encodeDelimited - * @memberof pyth_lazer_transaction.AddGovernanceSource - * @static - * @param {pyth_lazer_transaction.IAddGovernanceSource} message AddGovernanceSource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AddGovernanceSource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AddGovernanceSource message from the specified reader or buffer. - * @function decode - * @memberof pyth_lazer_transaction.AddGovernanceSource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pyth_lazer_transaction.AddGovernanceSource} AddGovernanceSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AddGovernanceSource.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.AddGovernanceSource(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.newSource = $root.pyth_lazer_transaction.GovernanceSource.decode(reader, reader.uint32()); - break; - } - case 2: { - message.permissions = $root.pyth_lazer_transaction.Permissions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AddGovernanceSource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pyth_lazer_transaction.AddGovernanceSource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pyth_lazer_transaction.AddGovernanceSource} AddGovernanceSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AddGovernanceSource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AddGovernanceSource message. - * @function verify - * @memberof pyth_lazer_transaction.AddGovernanceSource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AddGovernanceSource.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.newSource != null && message.hasOwnProperty("newSource")) { - properties._newSource = 1; - { - var error = $root.pyth_lazer_transaction.GovernanceSource.verify(message.newSource); - if (error) - return "newSource." + error; - } - } - if (message.permissions != null && message.hasOwnProperty("permissions")) { - properties._permissions = 1; - { - var error = $root.pyth_lazer_transaction.Permissions.verify(message.permissions); - if (error) - return "permissions." + error; - } - } - return null; - }; - - /** - * Creates an AddGovernanceSource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pyth_lazer_transaction.AddGovernanceSource - * @static - * @param {Object.} object Plain object - * @returns {pyth_lazer_transaction.AddGovernanceSource} AddGovernanceSource - */ - AddGovernanceSource.fromObject = function fromObject(object) { - if (object instanceof $root.pyth_lazer_transaction.AddGovernanceSource) - return object; - var message = new $root.pyth_lazer_transaction.AddGovernanceSource(); - if (object.newSource != null) { - if (typeof object.newSource !== "object") - throw TypeError(".pyth_lazer_transaction.AddGovernanceSource.newSource: object expected"); - message.newSource = $root.pyth_lazer_transaction.GovernanceSource.fromObject(object.newSource); - } - if (object.permissions != null) { - if (typeof object.permissions !== "object") - throw TypeError(".pyth_lazer_transaction.AddGovernanceSource.permissions: object expected"); - message.permissions = $root.pyth_lazer_transaction.Permissions.fromObject(object.permissions); - } - return message; - }; - - /** - * Creates a plain object from an AddGovernanceSource message. Also converts values to other types if specified. - * @function toObject - * @memberof pyth_lazer_transaction.AddGovernanceSource - * @static - * @param {pyth_lazer_transaction.AddGovernanceSource} message AddGovernanceSource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AddGovernanceSource.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.newSource != null && message.hasOwnProperty("newSource")) { - object.newSource = $root.pyth_lazer_transaction.GovernanceSource.toObject(message.newSource, options); - if (options.oneofs) - object._newSource = "newSource"; - } - if (message.permissions != null && message.hasOwnProperty("permissions")) { - object.permissions = $root.pyth_lazer_transaction.Permissions.toObject(message.permissions, options); - if (options.oneofs) - object._permissions = "permissions"; - } - return object; - }; - - /** - * Converts this AddGovernanceSource to JSON. - * @function toJSON - * @memberof pyth_lazer_transaction.AddGovernanceSource - * @instance - * @returns {Object.} JSON object - */ - AddGovernanceSource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AddGovernanceSource - * @function getTypeUrl - * @memberof pyth_lazer_transaction.AddGovernanceSource - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AddGovernanceSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pyth_lazer_transaction.AddGovernanceSource"; - }; + /** + * ShardFilter shardNames. + * @member {pyth_lazer_transaction.ShardFilter.IShardNames|null|undefined} shardNames + * @memberof pyth_lazer_transaction.ShardFilter + * @instance + */ + ShardFilter.prototype.shardNames = null; - return AddGovernanceSource; - })(); + /** + * ShardFilter shardGroups. + * @member {pyth_lazer_transaction.ShardFilter.IShardGroups|null|undefined} shardGroups + * @memberof pyth_lazer_transaction.ShardFilter + * @instance + */ + ShardFilter.prototype.shardGroups = null; - pyth_lazer_transaction.UpdateGovernanceSource = (function() { - - /** - * Properties of an UpdateGovernanceSource. - * @memberof pyth_lazer_transaction - * @interface IUpdateGovernanceSource - * @property {pyth_lazer_transaction.IGovernanceSource|null} [source] UpdateGovernanceSource source - * @property {pyth_lazer_transaction.ISetGovernanceSourcePermissions|null} [setGovernanceSourcePermissions] UpdateGovernanceSource setGovernanceSourcePermissions - * @property {google.protobuf.IEmpty|null} [removeGovernanceSource] UpdateGovernanceSource removeGovernanceSource - */ - - /** - * Constructs a new UpdateGovernanceSource. - * @memberof pyth_lazer_transaction - * @classdesc Represents an UpdateGovernanceSource. - * @implements IUpdateGovernanceSource - * @constructor - * @param {pyth_lazer_transaction.IUpdateGovernanceSource=} [properties] Properties to set - */ - function UpdateGovernanceSource(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * UpdateGovernanceSource source. - * @member {pyth_lazer_transaction.IGovernanceSource|null|undefined} source - * @memberof pyth_lazer_transaction.UpdateGovernanceSource - * @instance - */ - UpdateGovernanceSource.prototype.source = null; - - /** - * UpdateGovernanceSource setGovernanceSourcePermissions. - * @member {pyth_lazer_transaction.ISetGovernanceSourcePermissions|null|undefined} setGovernanceSourcePermissions - * @memberof pyth_lazer_transaction.UpdateGovernanceSource - * @instance - */ - UpdateGovernanceSource.prototype.setGovernanceSourcePermissions = null; - - /** - * UpdateGovernanceSource removeGovernanceSource. - * @member {google.protobuf.IEmpty|null|undefined} removeGovernanceSource - * @memberof pyth_lazer_transaction.UpdateGovernanceSource - * @instance - */ - UpdateGovernanceSource.prototype.removeGovernanceSource = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * UpdateGovernanceSource _source. - * @member {"source"|undefined} _source - * @memberof pyth_lazer_transaction.UpdateGovernanceSource - * @instance - */ - Object.defineProperty(UpdateGovernanceSource.prototype, "_source", { - get: $util.oneOfGetter($oneOfFields = ["source"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * UpdateGovernanceSource action. - * @member {"setGovernanceSourcePermissions"|"removeGovernanceSource"|undefined} action - * @memberof pyth_lazer_transaction.UpdateGovernanceSource - * @instance - */ - Object.defineProperty(UpdateGovernanceSource.prototype, "action", { - get: $util.oneOfGetter($oneOfFields = ["setGovernanceSourcePermissions", "removeGovernanceSource"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new UpdateGovernanceSource instance using the specified properties. - * @function create - * @memberof pyth_lazer_transaction.UpdateGovernanceSource - * @static - * @param {pyth_lazer_transaction.IUpdateGovernanceSource=} [properties] Properties to set - * @returns {pyth_lazer_transaction.UpdateGovernanceSource} UpdateGovernanceSource instance - */ - UpdateGovernanceSource.create = function create(properties) { - return new UpdateGovernanceSource(properties); - }; - - /** - * Encodes the specified UpdateGovernanceSource message. Does not implicitly {@link pyth_lazer_transaction.UpdateGovernanceSource.verify|verify} messages. - * @function encode - * @memberof pyth_lazer_transaction.UpdateGovernanceSource - * @static - * @param {pyth_lazer_transaction.IUpdateGovernanceSource} message UpdateGovernanceSource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateGovernanceSource.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.source != null && Object.hasOwnProperty.call(message, "source")) - $root.pyth_lazer_transaction.GovernanceSource.encode(message.source, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.setGovernanceSourcePermissions != null && Object.hasOwnProperty.call(message, "setGovernanceSourcePermissions")) - $root.pyth_lazer_transaction.SetGovernanceSourcePermissions.encode(message.setGovernanceSourcePermissions, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); - if (message.removeGovernanceSource != null && Object.hasOwnProperty.call(message, "removeGovernanceSource")) - $root.google.protobuf.Empty.encode(message.removeGovernanceSource, writer.uint32(/* id 199, wireType 2 =*/1594).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpdateGovernanceSource message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdateGovernanceSource.verify|verify} messages. - * @function encodeDelimited - * @memberof pyth_lazer_transaction.UpdateGovernanceSource - * @static - * @param {pyth_lazer_transaction.IUpdateGovernanceSource} message UpdateGovernanceSource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateGovernanceSource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateGovernanceSource message from the specified reader or buffer. - * @function decode - * @memberof pyth_lazer_transaction.UpdateGovernanceSource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pyth_lazer_transaction.UpdateGovernanceSource} UpdateGovernanceSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateGovernanceSource.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.UpdateGovernanceSource(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.source = $root.pyth_lazer_transaction.GovernanceSource.decode(reader, reader.uint32()); - break; - } - case 101: { - message.setGovernanceSourcePermissions = $root.pyth_lazer_transaction.SetGovernanceSourcePermissions.decode(reader, reader.uint32()); - break; - } - case 199: { - message.removeGovernanceSource = $root.google.protobuf.Empty.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateGovernanceSource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pyth_lazer_transaction.UpdateGovernanceSource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pyth_lazer_transaction.UpdateGovernanceSource} UpdateGovernanceSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateGovernanceSource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateGovernanceSource message. - * @function verify - * @memberof pyth_lazer_transaction.UpdateGovernanceSource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateGovernanceSource.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.source != null && message.hasOwnProperty("source")) { - properties._source = 1; - { - var error = $root.pyth_lazer_transaction.GovernanceSource.verify(message.source); - if (error) - return "source." + error; - } - } - if (message.setGovernanceSourcePermissions != null && message.hasOwnProperty("setGovernanceSourcePermissions")) { - properties.action = 1; - { - var error = $root.pyth_lazer_transaction.SetGovernanceSourcePermissions.verify(message.setGovernanceSourcePermissions); - if (error) - return "setGovernanceSourcePermissions." + error; - } - } - if (message.removeGovernanceSource != null && message.hasOwnProperty("removeGovernanceSource")) { - if (properties.action === 1) - return "action: multiple values"; - properties.action = 1; - { - var error = $root.google.protobuf.Empty.verify(message.removeGovernanceSource); - if (error) - return "removeGovernanceSource." + error; - } - } - return null; - }; - - /** - * Creates an UpdateGovernanceSource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pyth_lazer_transaction.UpdateGovernanceSource - * @static - * @param {Object.} object Plain object - * @returns {pyth_lazer_transaction.UpdateGovernanceSource} UpdateGovernanceSource - */ - UpdateGovernanceSource.fromObject = function fromObject(object) { - if (object instanceof $root.pyth_lazer_transaction.UpdateGovernanceSource) - return object; - var message = new $root.pyth_lazer_transaction.UpdateGovernanceSource(); - if (object.source != null) { - if (typeof object.source !== "object") - throw TypeError(".pyth_lazer_transaction.UpdateGovernanceSource.source: object expected"); - message.source = $root.pyth_lazer_transaction.GovernanceSource.fromObject(object.source); - } - if (object.setGovernanceSourcePermissions != null) { - if (typeof object.setGovernanceSourcePermissions !== "object") - throw TypeError(".pyth_lazer_transaction.UpdateGovernanceSource.setGovernanceSourcePermissions: object expected"); - message.setGovernanceSourcePermissions = $root.pyth_lazer_transaction.SetGovernanceSourcePermissions.fromObject(object.setGovernanceSourcePermissions); - } - if (object.removeGovernanceSource != null) { - if (typeof object.removeGovernanceSource !== "object") - throw TypeError(".pyth_lazer_transaction.UpdateGovernanceSource.removeGovernanceSource: object expected"); - message.removeGovernanceSource = $root.google.protobuf.Empty.fromObject(object.removeGovernanceSource); - } - return message; - }; - - /** - * Creates a plain object from an UpdateGovernanceSource message. Also converts values to other types if specified. - * @function toObject - * @memberof pyth_lazer_transaction.UpdateGovernanceSource - * @static - * @param {pyth_lazer_transaction.UpdateGovernanceSource} message UpdateGovernanceSource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateGovernanceSource.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.source != null && message.hasOwnProperty("source")) { - object.source = $root.pyth_lazer_transaction.GovernanceSource.toObject(message.source, options); - if (options.oneofs) - object._source = "source"; - } - if (message.setGovernanceSourcePermissions != null && message.hasOwnProperty("setGovernanceSourcePermissions")) { - object.setGovernanceSourcePermissions = $root.pyth_lazer_transaction.SetGovernanceSourcePermissions.toObject(message.setGovernanceSourcePermissions, options); - if (options.oneofs) - object.action = "setGovernanceSourcePermissions"; - } - if (message.removeGovernanceSource != null && message.hasOwnProperty("removeGovernanceSource")) { - object.removeGovernanceSource = $root.google.protobuf.Empty.toObject(message.removeGovernanceSource, options); - if (options.oneofs) - object.action = "removeGovernanceSource"; - } - return object; - }; - - /** - * Converts this UpdateGovernanceSource to JSON. - * @function toJSON - * @memberof pyth_lazer_transaction.UpdateGovernanceSource - * @instance - * @returns {Object.} JSON object - */ - UpdateGovernanceSource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateGovernanceSource - * @function getTypeUrl - * @memberof pyth_lazer_transaction.UpdateGovernanceSource - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateGovernanceSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pyth_lazer_transaction.UpdateGovernanceSource"; - }; + /** + * ShardFilter filter. + * @member {"allShards"|"shardNames"|"shardGroups"|undefined} filter + * @memberof pyth_lazer_transaction.ShardFilter + * @instance + */ + Object.defineProperty(ShardFilter.prototype, "filter", { + get: $util.oneOfGetter( + ($oneOfFields = ["allShards", "shardNames", "shardGroups"]), + ), + set: $util.oneOfSetter($oneOfFields), + }); - return UpdateGovernanceSource; - })(); + /** + * Creates a new ShardFilter instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.ShardFilter + * @static + * @param {pyth_lazer_transaction.IShardFilter=} [properties] Properties to set + * @returns {pyth_lazer_transaction.ShardFilter} ShardFilter instance + */ + ShardFilter.create = function create(properties) { + return new ShardFilter(properties); + }; - pyth_lazer_transaction.SetGovernanceSourcePermissions = (function() { - - /** - * Properties of a SetGovernanceSourcePermissions. - * @memberof pyth_lazer_transaction - * @interface ISetGovernanceSourcePermissions - * @property {pyth_lazer_transaction.IPermissions|null} [permissions] SetGovernanceSourcePermissions permissions - */ - - /** - * Constructs a new SetGovernanceSourcePermissions. - * @memberof pyth_lazer_transaction - * @classdesc Represents a SetGovernanceSourcePermissions. - * @implements ISetGovernanceSourcePermissions - * @constructor - * @param {pyth_lazer_transaction.ISetGovernanceSourcePermissions=} [properties] Properties to set - */ - function SetGovernanceSourcePermissions(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Encodes the specified ShardFilter message. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.ShardFilter + * @static + * @param {pyth_lazer_transaction.IShardFilter} message ShardFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ShardFilter.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if ( + message.allShards != null && + Object.hasOwnProperty.call(message, "allShards") + ) + $root.google.protobuf.Empty.encode( + message.allShards, + writer.uint32(/* id 1, wireType 2 =*/ 10).fork(), + ).ldelim(); + if ( + message.shardNames != null && + Object.hasOwnProperty.call(message, "shardNames") + ) + $root.pyth_lazer_transaction.ShardFilter.ShardNames.encode( + message.shardNames, + writer.uint32(/* id 2, wireType 2 =*/ 18).fork(), + ).ldelim(); + if ( + message.shardGroups != null && + Object.hasOwnProperty.call(message, "shardGroups") + ) + $root.pyth_lazer_transaction.ShardFilter.ShardGroups.encode( + message.shardGroups, + writer.uint32(/* id 3, wireType 2 =*/ 26).fork(), + ).ldelim(); + return writer; + }; - /** - * SetGovernanceSourcePermissions permissions. - * @member {pyth_lazer_transaction.IPermissions|null|undefined} permissions - * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions - * @instance - */ - SetGovernanceSourcePermissions.prototype.permissions = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * SetGovernanceSourcePermissions _permissions. - * @member {"permissions"|undefined} _permissions - * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions - * @instance - */ - Object.defineProperty(SetGovernanceSourcePermissions.prototype, "_permissions", { - get: $util.oneOfGetter($oneOfFields = ["permissions"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new SetGovernanceSourcePermissions instance using the specified properties. - * @function create - * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions - * @static - * @param {pyth_lazer_transaction.ISetGovernanceSourcePermissions=} [properties] Properties to set - * @returns {pyth_lazer_transaction.SetGovernanceSourcePermissions} SetGovernanceSourcePermissions instance - */ - SetGovernanceSourcePermissions.create = function create(properties) { - return new SetGovernanceSourcePermissions(properties); - }; - - /** - * Encodes the specified SetGovernanceSourcePermissions message. Does not implicitly {@link pyth_lazer_transaction.SetGovernanceSourcePermissions.verify|verify} messages. - * @function encode - * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions - * @static - * @param {pyth_lazer_transaction.ISetGovernanceSourcePermissions} message SetGovernanceSourcePermissions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetGovernanceSourcePermissions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.permissions != null && Object.hasOwnProperty.call(message, "permissions")) - $root.pyth_lazer_transaction.Permissions.encode(message.permissions, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SetGovernanceSourcePermissions message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetGovernanceSourcePermissions.verify|verify} messages. - * @function encodeDelimited - * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions - * @static - * @param {pyth_lazer_transaction.ISetGovernanceSourcePermissions} message SetGovernanceSourcePermissions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetGovernanceSourcePermissions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SetGovernanceSourcePermissions message from the specified reader or buffer. - * @function decode - * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pyth_lazer_transaction.SetGovernanceSourcePermissions} SetGovernanceSourcePermissions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetGovernanceSourcePermissions.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.SetGovernanceSourcePermissions(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.permissions = $root.pyth_lazer_transaction.Permissions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SetGovernanceSourcePermissions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pyth_lazer_transaction.SetGovernanceSourcePermissions} SetGovernanceSourcePermissions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetGovernanceSourcePermissions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SetGovernanceSourcePermissions message. - * @function verify - * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SetGovernanceSourcePermissions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.permissions != null && message.hasOwnProperty("permissions")) { - properties._permissions = 1; - { - var error = $root.pyth_lazer_transaction.Permissions.verify(message.permissions); - if (error) - return "permissions." + error; - } - } - return null; - }; - - /** - * Creates a SetGovernanceSourcePermissions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions - * @static - * @param {Object.} object Plain object - * @returns {pyth_lazer_transaction.SetGovernanceSourcePermissions} SetGovernanceSourcePermissions - */ - SetGovernanceSourcePermissions.fromObject = function fromObject(object) { - if (object instanceof $root.pyth_lazer_transaction.SetGovernanceSourcePermissions) - return object; - var message = new $root.pyth_lazer_transaction.SetGovernanceSourcePermissions(); - if (object.permissions != null) { - if (typeof object.permissions !== "object") - throw TypeError(".pyth_lazer_transaction.SetGovernanceSourcePermissions.permissions: object expected"); - message.permissions = $root.pyth_lazer_transaction.Permissions.fromObject(object.permissions); - } - return message; - }; - - /** - * Creates a plain object from a SetGovernanceSourcePermissions message. Also converts values to other types if specified. - * @function toObject - * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions - * @static - * @param {pyth_lazer_transaction.SetGovernanceSourcePermissions} message SetGovernanceSourcePermissions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SetGovernanceSourcePermissions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.permissions != null && message.hasOwnProperty("permissions")) { - object.permissions = $root.pyth_lazer_transaction.Permissions.toObject(message.permissions, options); - if (options.oneofs) - object._permissions = "permissions"; - } - return object; - }; - - /** - * Converts this SetGovernanceSourcePermissions to JSON. - * @function toJSON - * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions - * @instance - * @returns {Object.} JSON object - */ - SetGovernanceSourcePermissions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SetGovernanceSourcePermissions - * @function getTypeUrl - * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SetGovernanceSourcePermissions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pyth_lazer_transaction.SetGovernanceSourcePermissions"; - }; + /** + * Encodes the specified ShardFilter message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.ShardFilter + * @static + * @param {pyth_lazer_transaction.IShardFilter} message ShardFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ShardFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - return SetGovernanceSourcePermissions; - })(); + /** + * Decodes a ShardFilter message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.ShardFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.ShardFilter} ShardFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ShardFilter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pyth_lazer_transaction.ShardFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.allShards = $root.google.protobuf.Empty.decode( + reader, + reader.uint32(), + ); + break; + } + case 2: { + message.shardNames = + $root.pyth_lazer_transaction.ShardFilter.ShardNames.decode( + reader, + reader.uint32(), + ); + break; + } + case 3: { + message.shardGroups = + $root.pyth_lazer_transaction.ShardFilter.ShardGroups.decode( + reader, + reader.uint32(), + ); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - pyth_lazer_transaction.SetShardName = (function() { - - /** - * Properties of a SetShardName. - * @memberof pyth_lazer_transaction - * @interface ISetShardName - * @property {string|null} [shardName] SetShardName shardName - */ - - /** - * Constructs a new SetShardName. - * @memberof pyth_lazer_transaction - * @classdesc Represents a SetShardName. - * @implements ISetShardName - * @constructor - * @param {pyth_lazer_transaction.ISetShardName=} [properties] Properties to set - */ - function SetShardName(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Decodes a ShardFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.ShardFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.ShardFilter} ShardFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ShardFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ShardFilter message. + * @function verify + * @memberof pyth_lazer_transaction.ShardFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ShardFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.allShards != null && message.hasOwnProperty("allShards")) { + properties.filter = 1; + { + var error = $root.google.protobuf.Empty.verify(message.allShards); + if (error) return "allShards." + error; + } + } + if (message.shardNames != null && message.hasOwnProperty("shardNames")) { + if (properties.filter === 1) return "filter: multiple values"; + properties.filter = 1; + { + var error = + $root.pyth_lazer_transaction.ShardFilter.ShardNames.verify( + message.shardNames, + ); + if (error) return "shardNames." + error; } + } + if ( + message.shardGroups != null && + message.hasOwnProperty("shardGroups") + ) { + if (properties.filter === 1) return "filter: multiple values"; + properties.filter = 1; + { + var error = + $root.pyth_lazer_transaction.ShardFilter.ShardGroups.verify( + message.shardGroups, + ); + if (error) return "shardGroups." + error; + } + } + return null; + }; - /** - * SetShardName shardName. - * @member {string|null|undefined} shardName - * @memberof pyth_lazer_transaction.SetShardName - * @instance - */ - SetShardName.prototype.shardName = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * SetShardName _shardName. - * @member {"shardName"|undefined} _shardName - * @memberof pyth_lazer_transaction.SetShardName - * @instance - */ - Object.defineProperty(SetShardName.prototype, "_shardName", { - get: $util.oneOfGetter($oneOfFields = ["shardName"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new SetShardName instance using the specified properties. - * @function create - * @memberof pyth_lazer_transaction.SetShardName - * @static - * @param {pyth_lazer_transaction.ISetShardName=} [properties] Properties to set - * @returns {pyth_lazer_transaction.SetShardName} SetShardName instance - */ - SetShardName.create = function create(properties) { - return new SetShardName(properties); - }; - - /** - * Encodes the specified SetShardName message. Does not implicitly {@link pyth_lazer_transaction.SetShardName.verify|verify} messages. - * @function encode - * @memberof pyth_lazer_transaction.SetShardName - * @static - * @param {pyth_lazer_transaction.ISetShardName} message SetShardName message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetShardName.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.shardName != null && Object.hasOwnProperty.call(message, "shardName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.shardName); - return writer; - }; - - /** - * Encodes the specified SetShardName message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetShardName.verify|verify} messages. - * @function encodeDelimited - * @memberof pyth_lazer_transaction.SetShardName - * @static - * @param {pyth_lazer_transaction.ISetShardName} message SetShardName message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetShardName.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SetShardName message from the specified reader or buffer. - * @function decode - * @memberof pyth_lazer_transaction.SetShardName - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pyth_lazer_transaction.SetShardName} SetShardName - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetShardName.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.SetShardName(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.shardName = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SetShardName message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pyth_lazer_transaction.SetShardName - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pyth_lazer_transaction.SetShardName} SetShardName - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetShardName.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SetShardName message. - * @function verify - * @memberof pyth_lazer_transaction.SetShardName - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SetShardName.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.shardName != null && message.hasOwnProperty("shardName")) { - properties._shardName = 1; - if (!$util.isString(message.shardName)) - return "shardName: string expected"; - } - return null; - }; - - /** - * Creates a SetShardName message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pyth_lazer_transaction.SetShardName - * @static - * @param {Object.} object Plain object - * @returns {pyth_lazer_transaction.SetShardName} SetShardName - */ - SetShardName.fromObject = function fromObject(object) { - if (object instanceof $root.pyth_lazer_transaction.SetShardName) - return object; - var message = new $root.pyth_lazer_transaction.SetShardName(); - if (object.shardName != null) - message.shardName = String(object.shardName); - return message; - }; - - /** - * Creates a plain object from a SetShardName message. Also converts values to other types if specified. - * @function toObject - * @memberof pyth_lazer_transaction.SetShardName - * @static - * @param {pyth_lazer_transaction.SetShardName} message SetShardName - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SetShardName.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.shardName != null && message.hasOwnProperty("shardName")) { - object.shardName = message.shardName; - if (options.oneofs) - object._shardName = "shardName"; - } - return object; - }; - - /** - * Converts this SetShardName to JSON. - * @function toJSON - * @memberof pyth_lazer_transaction.SetShardName - * @instance - * @returns {Object.} JSON object - */ - SetShardName.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SetShardName - * @function getTypeUrl - * @memberof pyth_lazer_transaction.SetShardName - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SetShardName.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pyth_lazer_transaction.SetShardName"; - }; + /** + * Creates a ShardFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.ShardFilter + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.ShardFilter} ShardFilter + */ + ShardFilter.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.ShardFilter) + return object; + var message = new $root.pyth_lazer_transaction.ShardFilter(); + if (object.allShards != null) { + if (typeof object.allShards !== "object") + throw TypeError( + ".pyth_lazer_transaction.ShardFilter.allShards: object expected", + ); + message.allShards = $root.google.protobuf.Empty.fromObject( + object.allShards, + ); + } + if (object.shardNames != null) { + if (typeof object.shardNames !== "object") + throw TypeError( + ".pyth_lazer_transaction.ShardFilter.shardNames: object expected", + ); + message.shardNames = + $root.pyth_lazer_transaction.ShardFilter.ShardNames.fromObject( + object.shardNames, + ); + } + if (object.shardGroups != null) { + if (typeof object.shardGroups !== "object") + throw TypeError( + ".pyth_lazer_transaction.ShardFilter.shardGroups: object expected", + ); + message.shardGroups = + $root.pyth_lazer_transaction.ShardFilter.ShardGroups.fromObject( + object.shardGroups, + ); + } + return message; + }; - return SetShardName; - })(); + /** + * Creates a plain object from a ShardFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.ShardFilter + * @static + * @param {pyth_lazer_transaction.ShardFilter} message ShardFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ShardFilter.toObject = function toObject(message, options) { + if (!options) options = {}; + var object = {}; + if (message.allShards != null && message.hasOwnProperty("allShards")) { + object.allShards = $root.google.protobuf.Empty.toObject( + message.allShards, + options, + ); + if (options.oneofs) object.filter = "allShards"; + } + if (message.shardNames != null && message.hasOwnProperty("shardNames")) { + object.shardNames = + $root.pyth_lazer_transaction.ShardFilter.ShardNames.toObject( + message.shardNames, + options, + ); + if (options.oneofs) object.filter = "shardNames"; + } + if ( + message.shardGroups != null && + message.hasOwnProperty("shardGroups") + ) { + object.shardGroups = + $root.pyth_lazer_transaction.ShardFilter.ShardGroups.toObject( + message.shardGroups, + options, + ); + if (options.oneofs) object.filter = "shardGroups"; + } + return object; + }; - pyth_lazer_transaction.SetShardGroup = (function() { - - /** - * Properties of a SetShardGroup. - * @memberof pyth_lazer_transaction - * @interface ISetShardGroup - * @property {string|null} [shardGroup] SetShardGroup shardGroup - */ - - /** - * Constructs a new SetShardGroup. - * @memberof pyth_lazer_transaction - * @classdesc Represents a SetShardGroup. - * @implements ISetShardGroup - * @constructor - * @param {pyth_lazer_transaction.ISetShardGroup=} [properties] Properties to set - */ - function SetShardGroup(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Converts this ShardFilter to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.ShardFilter + * @instance + * @returns {Object.} JSON object + */ + ShardFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ShardFilter + * @function getTypeUrl + * @memberof pyth_lazer_transaction.ShardFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ShardFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.ShardFilter"; + }; + + ShardFilter.ShardNames = (function () { + /** + * Properties of a ShardNames. + * @memberof pyth_lazer_transaction.ShardFilter + * @interface IShardNames + * @property {Array.|null} [shardNames] ShardNames shardNames + */ + + /** + * Constructs a new ShardNames. + * @memberof pyth_lazer_transaction.ShardFilter + * @classdesc Represents a ShardNames. + * @implements IShardNames + * @constructor + * @param {pyth_lazer_transaction.ShardFilter.IShardNames=} [properties] Properties to set + */ + function ShardNames(properties) { + this.shardNames = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ShardNames shardNames. + * @member {Array.} shardNames + * @memberof pyth_lazer_transaction.ShardFilter.ShardNames + * @instance + */ + ShardNames.prototype.shardNames = $util.emptyArray; + + /** + * Creates a new ShardNames instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.ShardFilter.ShardNames + * @static + * @param {pyth_lazer_transaction.ShardFilter.IShardNames=} [properties] Properties to set + * @returns {pyth_lazer_transaction.ShardFilter.ShardNames} ShardNames instance + */ + ShardNames.create = function create(properties) { + return new ShardNames(properties); + }; + + /** + * Encodes the specified ShardNames message. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardNames.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.ShardFilter.ShardNames + * @static + * @param {pyth_lazer_transaction.ShardFilter.IShardNames} message ShardNames message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ShardNames.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if (message.shardNames != null && message.shardNames.length) + for (var i = 0; i < message.shardNames.length; ++i) + writer + .uint32(/* id 1, wireType 2 =*/ 10) + .string(message.shardNames[i]); + return writer; + }; + + /** + * Encodes the specified ShardNames message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardNames.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.ShardFilter.ShardNames + * @static + * @param {pyth_lazer_transaction.ShardFilter.IShardNames} message ShardNames message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ShardNames.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ShardNames message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.ShardFilter.ShardNames + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.ShardFilter.ShardNames} ShardNames + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ShardNames.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pyth_lazer_transaction.ShardFilter.ShardNames(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + if (!(message.shardNames && message.shardNames.length)) + message.shardNames = []; + message.shardNames.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ShardNames message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.ShardFilter.ShardNames + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.ShardFilter.ShardNames} ShardNames + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ShardNames.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ShardNames message. + * @function verify + * @memberof pyth_lazer_transaction.ShardFilter.ShardNames + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ShardNames.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if ( + message.shardNames != null && + message.hasOwnProperty("shardNames") + ) { + if (!Array.isArray(message.shardNames)) + return "shardNames: array expected"; + for (var i = 0; i < message.shardNames.length; ++i) + if (!$util.isString(message.shardNames[i])) + return "shardNames: string[] expected"; + } + return null; + }; + + /** + * Creates a ShardNames message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.ShardFilter.ShardNames + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.ShardFilter.ShardNames} ShardNames + */ + ShardNames.fromObject = function fromObject(object) { + if ( + object instanceof $root.pyth_lazer_transaction.ShardFilter.ShardNames + ) + return object; + var message = new $root.pyth_lazer_transaction.ShardFilter.ShardNames(); + if (object.shardNames) { + if (!Array.isArray(object.shardNames)) + throw TypeError( + ".pyth_lazer_transaction.ShardFilter.ShardNames.shardNames: array expected", + ); + message.shardNames = []; + for (var i = 0; i < object.shardNames.length; ++i) + message.shardNames[i] = String(object.shardNames[i]); + } + return message; + }; + + /** + * Creates a plain object from a ShardNames message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.ShardFilter.ShardNames + * @static + * @param {pyth_lazer_transaction.ShardFilter.ShardNames} message ShardNames + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ShardNames.toObject = function toObject(message, options) { + if (!options) options = {}; + var object = {}; + if (options.arrays || options.defaults) object.shardNames = []; + if (message.shardNames && message.shardNames.length) { + object.shardNames = []; + for (var j = 0; j < message.shardNames.length; ++j) + object.shardNames[j] = message.shardNames[j]; } + return object; + }; + + /** + * Converts this ShardNames to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.ShardFilter.ShardNames + * @instance + * @returns {Object.} JSON object + */ + ShardNames.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ShardNames + * @function getTypeUrl + * @memberof pyth_lazer_transaction.ShardFilter.ShardNames + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ShardNames.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.ShardFilter.ShardNames"; + }; - /** - * SetShardGroup shardGroup. - * @member {string|null|undefined} shardGroup - * @memberof pyth_lazer_transaction.SetShardGroup - * @instance - */ - SetShardGroup.prototype.shardGroup = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * SetShardGroup _shardGroup. - * @member {"shardGroup"|undefined} _shardGroup - * @memberof pyth_lazer_transaction.SetShardGroup - * @instance - */ - Object.defineProperty(SetShardGroup.prototype, "_shardGroup", { - get: $util.oneOfGetter($oneOfFields = ["shardGroup"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new SetShardGroup instance using the specified properties. - * @function create - * @memberof pyth_lazer_transaction.SetShardGroup - * @static - * @param {pyth_lazer_transaction.ISetShardGroup=} [properties] Properties to set - * @returns {pyth_lazer_transaction.SetShardGroup} SetShardGroup instance - */ - SetShardGroup.create = function create(properties) { - return new SetShardGroup(properties); - }; - - /** - * Encodes the specified SetShardGroup message. Does not implicitly {@link pyth_lazer_transaction.SetShardGroup.verify|verify} messages. - * @function encode - * @memberof pyth_lazer_transaction.SetShardGroup - * @static - * @param {pyth_lazer_transaction.ISetShardGroup} message SetShardGroup message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetShardGroup.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.shardGroup != null && Object.hasOwnProperty.call(message, "shardGroup")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.shardGroup); - return writer; - }; - - /** - * Encodes the specified SetShardGroup message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetShardGroup.verify|verify} messages. - * @function encodeDelimited - * @memberof pyth_lazer_transaction.SetShardGroup - * @static - * @param {pyth_lazer_transaction.ISetShardGroup} message SetShardGroup message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetShardGroup.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SetShardGroup message from the specified reader or buffer. - * @function decode - * @memberof pyth_lazer_transaction.SetShardGroup - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pyth_lazer_transaction.SetShardGroup} SetShardGroup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetShardGroup.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.SetShardGroup(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.shardGroup = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SetShardGroup message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pyth_lazer_transaction.SetShardGroup - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pyth_lazer_transaction.SetShardGroup} SetShardGroup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetShardGroup.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SetShardGroup message. - * @function verify - * @memberof pyth_lazer_transaction.SetShardGroup - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SetShardGroup.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.shardGroup != null && message.hasOwnProperty("shardGroup")) { - properties._shardGroup = 1; - if (!$util.isString(message.shardGroup)) - return "shardGroup: string expected"; - } - return null; - }; - - /** - * Creates a SetShardGroup message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pyth_lazer_transaction.SetShardGroup - * @static - * @param {Object.} object Plain object - * @returns {pyth_lazer_transaction.SetShardGroup} SetShardGroup - */ - SetShardGroup.fromObject = function fromObject(object) { - if (object instanceof $root.pyth_lazer_transaction.SetShardGroup) - return object; - var message = new $root.pyth_lazer_transaction.SetShardGroup(); - if (object.shardGroup != null) - message.shardGroup = String(object.shardGroup); - return message; - }; - - /** - * Creates a plain object from a SetShardGroup message. Also converts values to other types if specified. - * @function toObject - * @memberof pyth_lazer_transaction.SetShardGroup - * @static - * @param {pyth_lazer_transaction.SetShardGroup} message SetShardGroup - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SetShardGroup.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.shardGroup != null && message.hasOwnProperty("shardGroup")) { - object.shardGroup = message.shardGroup; - if (options.oneofs) - object._shardGroup = "shardGroup"; - } - return object; - }; - - /** - * Converts this SetShardGroup to JSON. - * @function toJSON - * @memberof pyth_lazer_transaction.SetShardGroup - * @instance - * @returns {Object.} JSON object - */ - SetShardGroup.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SetShardGroup - * @function getTypeUrl - * @memberof pyth_lazer_transaction.SetShardGroup - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SetShardGroup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pyth_lazer_transaction.SetShardGroup"; - }; + return ShardNames; + })(); + + ShardFilter.ShardGroups = (function () { + /** + * Properties of a ShardGroups. + * @memberof pyth_lazer_transaction.ShardFilter + * @interface IShardGroups + * @property {Array.|null} [shardGroups] ShardGroups shardGroups + */ + + /** + * Constructs a new ShardGroups. + * @memberof pyth_lazer_transaction.ShardFilter + * @classdesc Represents a ShardGroups. + * @implements IShardGroups + * @constructor + * @param {pyth_lazer_transaction.ShardFilter.IShardGroups=} [properties] Properties to set + */ + function ShardGroups(properties) { + this.shardGroups = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ShardGroups shardGroups. + * @member {Array.} shardGroups + * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups + * @instance + */ + ShardGroups.prototype.shardGroups = $util.emptyArray; + + /** + * Creates a new ShardGroups instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups + * @static + * @param {pyth_lazer_transaction.ShardFilter.IShardGroups=} [properties] Properties to set + * @returns {pyth_lazer_transaction.ShardFilter.ShardGroups} ShardGroups instance + */ + ShardGroups.create = function create(properties) { + return new ShardGroups(properties); + }; + + /** + * Encodes the specified ShardGroups message. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardGroups.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups + * @static + * @param {pyth_lazer_transaction.ShardFilter.IShardGroups} message ShardGroups message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ShardGroups.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if (message.shardGroups != null && message.shardGroups.length) + for (var i = 0; i < message.shardGroups.length; ++i) + writer + .uint32(/* id 1, wireType 2 =*/ 10) + .string(message.shardGroups[i]); + return writer; + }; + + /** + * Encodes the specified ShardGroups message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardGroups.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups + * @static + * @param {pyth_lazer_transaction.ShardFilter.IShardGroups} message ShardGroups message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ShardGroups.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ShardGroups message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.ShardFilter.ShardGroups} ShardGroups + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ShardGroups.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pyth_lazer_transaction.ShardFilter.ShardGroups(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + if (!(message.shardGroups && message.shardGroups.length)) + message.shardGroups = []; + message.shardGroups.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ShardGroups message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.ShardFilter.ShardGroups} ShardGroups + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ShardGroups.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ShardGroups message. + * @function verify + * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ShardGroups.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if ( + message.shardGroups != null && + message.hasOwnProperty("shardGroups") + ) { + if (!Array.isArray(message.shardGroups)) + return "shardGroups: array expected"; + for (var i = 0; i < message.shardGroups.length; ++i) + if (!$util.isString(message.shardGroups[i])) + return "shardGroups: string[] expected"; + } + return null; + }; + + /** + * Creates a ShardGroups message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.ShardFilter.ShardGroups} ShardGroups + */ + ShardGroups.fromObject = function fromObject(object) { + if ( + object instanceof $root.pyth_lazer_transaction.ShardFilter.ShardGroups + ) + return object; + var message = + new $root.pyth_lazer_transaction.ShardFilter.ShardGroups(); + if (object.shardGroups) { + if (!Array.isArray(object.shardGroups)) + throw TypeError( + ".pyth_lazer_transaction.ShardFilter.ShardGroups.shardGroups: array expected", + ); + message.shardGroups = []; + for (var i = 0; i < object.shardGroups.length; ++i) + message.shardGroups[i] = String(object.shardGroups[i]); + } + return message; + }; + + /** + * Creates a plain object from a ShardGroups message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups + * @static + * @param {pyth_lazer_transaction.ShardFilter.ShardGroups} message ShardGroups + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ShardGroups.toObject = function toObject(message, options) { + if (!options) options = {}; + var object = {}; + if (options.arrays || options.defaults) object.shardGroups = []; + if (message.shardGroups && message.shardGroups.length) { + object.shardGroups = []; + for (var j = 0; j < message.shardGroups.length; ++j) + object.shardGroups[j] = message.shardGroups[j]; + } + return object; + }; + + /** + * Converts this ShardGroups to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups + * @instance + * @returns {Object.} JSON object + */ + ShardGroups.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ShardGroups + * @function getTypeUrl + * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ShardGroups.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return ( + typeUrlPrefix + "/pyth_lazer_transaction.ShardFilter.ShardGroups" + ); + }; - return SetShardGroup; + return ShardGroups; })(); - pyth_lazer_transaction.ResetLastSequenceNo = (function() { - - /** - * Properties of a ResetLastSequenceNo. - * @memberof pyth_lazer_transaction - * @interface IResetLastSequenceNo - * @property {number|Long|null} [lastSequenceNo] ResetLastSequenceNo lastSequenceNo - */ - - /** - * Constructs a new ResetLastSequenceNo. - * @memberof pyth_lazer_transaction - * @classdesc Represents a ResetLastSequenceNo. - * @implements IResetLastSequenceNo - * @constructor - * @param {pyth_lazer_transaction.IResetLastSequenceNo=} [properties] Properties to set - */ - function ResetLastSequenceNo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + return ShardFilter; + })(); + + pyth_lazer_transaction.GovernanceDirective = (function () { + /** + * Properties of a GovernanceDirective. + * @memberof pyth_lazer_transaction + * @interface IGovernanceDirective + * @property {pyth_lazer_transaction.IShardFilter|null} [shardFilter] GovernanceDirective shardFilter + * @property {pyth_lazer_transaction.ICreateShard|null} [createShard] GovernanceDirective createShard + * @property {pyth_lazer_transaction.IAddGovernanceSource|null} [addGovernanceSource] GovernanceDirective addGovernanceSource + * @property {pyth_lazer_transaction.IUpdateGovernanceSource|null} [updateGovernanceSource] GovernanceDirective updateGovernanceSource + * @property {pyth_lazer_transaction.ISetShardName|null} [setShardName] GovernanceDirective setShardName + * @property {pyth_lazer_transaction.ISetShardGroup|null} [setShardGroup] GovernanceDirective setShardGroup + * @property {pyth_lazer_transaction.IResetLastSequenceNo|null} [resetLastSequenceNo] GovernanceDirective resetLastSequenceNo + * @property {pyth_lazer_transaction.IAddPublisher|null} [addPublisher] GovernanceDirective addPublisher + * @property {pyth_lazer_transaction.IUpdatePublisher|null} [updatePublisher] GovernanceDirective updatePublisher + * @property {pyth_lazer_transaction.IAddFeed|null} [addFeed] GovernanceDirective addFeed + * @property {pyth_lazer_transaction.IUpdateFeed|null} [updateFeed] GovernanceDirective updateFeed + */ + + /** + * Constructs a new GovernanceDirective. + * @memberof pyth_lazer_transaction + * @classdesc Represents a GovernanceDirective. + * @implements IGovernanceDirective + * @constructor + * @param {pyth_lazer_transaction.IGovernanceDirective=} [properties] Properties to set + */ + function GovernanceDirective(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + } + + /** + * GovernanceDirective shardFilter. + * @member {pyth_lazer_transaction.IShardFilter|null|undefined} shardFilter + * @memberof pyth_lazer_transaction.GovernanceDirective + * @instance + */ + GovernanceDirective.prototype.shardFilter = null; + + /** + * GovernanceDirective createShard. + * @member {pyth_lazer_transaction.ICreateShard|null|undefined} createShard + * @memberof pyth_lazer_transaction.GovernanceDirective + * @instance + */ + GovernanceDirective.prototype.createShard = null; + + /** + * GovernanceDirective addGovernanceSource. + * @member {pyth_lazer_transaction.IAddGovernanceSource|null|undefined} addGovernanceSource + * @memberof pyth_lazer_transaction.GovernanceDirective + * @instance + */ + GovernanceDirective.prototype.addGovernanceSource = null; + + /** + * GovernanceDirective updateGovernanceSource. + * @member {pyth_lazer_transaction.IUpdateGovernanceSource|null|undefined} updateGovernanceSource + * @memberof pyth_lazer_transaction.GovernanceDirective + * @instance + */ + GovernanceDirective.prototype.updateGovernanceSource = null; + + /** + * GovernanceDirective setShardName. + * @member {pyth_lazer_transaction.ISetShardName|null|undefined} setShardName + * @memberof pyth_lazer_transaction.GovernanceDirective + * @instance + */ + GovernanceDirective.prototype.setShardName = null; + + /** + * GovernanceDirective setShardGroup. + * @member {pyth_lazer_transaction.ISetShardGroup|null|undefined} setShardGroup + * @memberof pyth_lazer_transaction.GovernanceDirective + * @instance + */ + GovernanceDirective.prototype.setShardGroup = null; + + /** + * GovernanceDirective resetLastSequenceNo. + * @member {pyth_lazer_transaction.IResetLastSequenceNo|null|undefined} resetLastSequenceNo + * @memberof pyth_lazer_transaction.GovernanceDirective + * @instance + */ + GovernanceDirective.prototype.resetLastSequenceNo = null; + + /** + * GovernanceDirective addPublisher. + * @member {pyth_lazer_transaction.IAddPublisher|null|undefined} addPublisher + * @memberof pyth_lazer_transaction.GovernanceDirective + * @instance + */ + GovernanceDirective.prototype.addPublisher = null; + + /** + * GovernanceDirective updatePublisher. + * @member {pyth_lazer_transaction.IUpdatePublisher|null|undefined} updatePublisher + * @memberof pyth_lazer_transaction.GovernanceDirective + * @instance + */ + GovernanceDirective.prototype.updatePublisher = null; + + /** + * GovernanceDirective addFeed. + * @member {pyth_lazer_transaction.IAddFeed|null|undefined} addFeed + * @memberof pyth_lazer_transaction.GovernanceDirective + * @instance + */ + GovernanceDirective.prototype.addFeed = null; + + /** + * GovernanceDirective updateFeed. + * @member {pyth_lazer_transaction.IUpdateFeed|null|undefined} updateFeed + * @memberof pyth_lazer_transaction.GovernanceDirective + * @instance + */ + GovernanceDirective.prototype.updateFeed = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GovernanceDirective _shardFilter. + * @member {"shardFilter"|undefined} _shardFilter + * @memberof pyth_lazer_transaction.GovernanceDirective + * @instance + */ + Object.defineProperty(GovernanceDirective.prototype, "_shardFilter", { + get: $util.oneOfGetter(($oneOfFields = ["shardFilter"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * GovernanceDirective action. + * @member {"createShard"|"addGovernanceSource"|"updateGovernanceSource"|"setShardName"|"setShardGroup"|"resetLastSequenceNo"|"addPublisher"|"updatePublisher"|"addFeed"|"updateFeed"|undefined} action + * @memberof pyth_lazer_transaction.GovernanceDirective + * @instance + */ + Object.defineProperty(GovernanceDirective.prototype, "action", { + get: $util.oneOfGetter( + ($oneOfFields = [ + "createShard", + "addGovernanceSource", + "updateGovernanceSource", + "setShardName", + "setShardGroup", + "resetLastSequenceNo", + "addPublisher", + "updatePublisher", + "addFeed", + "updateFeed", + ]), + ), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Creates a new GovernanceDirective instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.GovernanceDirective + * @static + * @param {pyth_lazer_transaction.IGovernanceDirective=} [properties] Properties to set + * @returns {pyth_lazer_transaction.GovernanceDirective} GovernanceDirective instance + */ + GovernanceDirective.create = function create(properties) { + return new GovernanceDirective(properties); + }; + + /** + * Encodes the specified GovernanceDirective message. Does not implicitly {@link pyth_lazer_transaction.GovernanceDirective.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.GovernanceDirective + * @static + * @param {pyth_lazer_transaction.IGovernanceDirective} message GovernanceDirective message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GovernanceDirective.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if ( + message.shardFilter != null && + Object.hasOwnProperty.call(message, "shardFilter") + ) + $root.pyth_lazer_transaction.ShardFilter.encode( + message.shardFilter, + writer.uint32(/* id 1, wireType 2 =*/ 10).fork(), + ).ldelim(); + if ( + message.createShard != null && + Object.hasOwnProperty.call(message, "createShard") + ) + $root.pyth_lazer_transaction.CreateShard.encode( + message.createShard, + writer.uint32(/* id 101, wireType 2 =*/ 810).fork(), + ).ldelim(); + if ( + message.addGovernanceSource != null && + Object.hasOwnProperty.call(message, "addGovernanceSource") + ) + $root.pyth_lazer_transaction.AddGovernanceSource.encode( + message.addGovernanceSource, + writer.uint32(/* id 102, wireType 2 =*/ 818).fork(), + ).ldelim(); + if ( + message.updateGovernanceSource != null && + Object.hasOwnProperty.call(message, "updateGovernanceSource") + ) + $root.pyth_lazer_transaction.UpdateGovernanceSource.encode( + message.updateGovernanceSource, + writer.uint32(/* id 103, wireType 2 =*/ 826).fork(), + ).ldelim(); + if ( + message.setShardName != null && + Object.hasOwnProperty.call(message, "setShardName") + ) + $root.pyth_lazer_transaction.SetShardName.encode( + message.setShardName, + writer.uint32(/* id 104, wireType 2 =*/ 834).fork(), + ).ldelim(); + if ( + message.setShardGroup != null && + Object.hasOwnProperty.call(message, "setShardGroup") + ) + $root.pyth_lazer_transaction.SetShardGroup.encode( + message.setShardGroup, + writer.uint32(/* id 105, wireType 2 =*/ 842).fork(), + ).ldelim(); + if ( + message.resetLastSequenceNo != null && + Object.hasOwnProperty.call(message, "resetLastSequenceNo") + ) + $root.pyth_lazer_transaction.ResetLastSequenceNo.encode( + message.resetLastSequenceNo, + writer.uint32(/* id 106, wireType 2 =*/ 850).fork(), + ).ldelim(); + if ( + message.addPublisher != null && + Object.hasOwnProperty.call(message, "addPublisher") + ) + $root.pyth_lazer_transaction.AddPublisher.encode( + message.addPublisher, + writer.uint32(/* id 107, wireType 2 =*/ 858).fork(), + ).ldelim(); + if ( + message.updatePublisher != null && + Object.hasOwnProperty.call(message, "updatePublisher") + ) + $root.pyth_lazer_transaction.UpdatePublisher.encode( + message.updatePublisher, + writer.uint32(/* id 108, wireType 2 =*/ 866).fork(), + ).ldelim(); + if ( + message.addFeed != null && + Object.hasOwnProperty.call(message, "addFeed") + ) + $root.pyth_lazer_transaction.AddFeed.encode( + message.addFeed, + writer.uint32(/* id 109, wireType 2 =*/ 874).fork(), + ).ldelim(); + if ( + message.updateFeed != null && + Object.hasOwnProperty.call(message, "updateFeed") + ) + $root.pyth_lazer_transaction.UpdateFeed.encode( + message.updateFeed, + writer.uint32(/* id 110, wireType 2 =*/ 882).fork(), + ).ldelim(); + return writer; + }; + + /** + * Encodes the specified GovernanceDirective message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceDirective.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.GovernanceDirective + * @static + * @param {pyth_lazer_transaction.IGovernanceDirective} message GovernanceDirective message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GovernanceDirective.encodeDelimited = function encodeDelimited( + message, + writer, + ) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GovernanceDirective message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.GovernanceDirective + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.GovernanceDirective} GovernanceDirective + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GovernanceDirective.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pyth_lazer_transaction.GovernanceDirective(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.shardFilter = + $root.pyth_lazer_transaction.ShardFilter.decode( + reader, + reader.uint32(), + ); + break; + } + case 101: { + message.createShard = + $root.pyth_lazer_transaction.CreateShard.decode( + reader, + reader.uint32(), + ); + break; + } + case 102: { + message.addGovernanceSource = + $root.pyth_lazer_transaction.AddGovernanceSource.decode( + reader, + reader.uint32(), + ); + break; + } + case 103: { + message.updateGovernanceSource = + $root.pyth_lazer_transaction.UpdateGovernanceSource.decode( + reader, + reader.uint32(), + ); + break; + } + case 104: { + message.setShardName = + $root.pyth_lazer_transaction.SetShardName.decode( + reader, + reader.uint32(), + ); + break; + } + case 105: { + message.setShardGroup = + $root.pyth_lazer_transaction.SetShardGroup.decode( + reader, + reader.uint32(), + ); + break; + } + case 106: { + message.resetLastSequenceNo = + $root.pyth_lazer_transaction.ResetLastSequenceNo.decode( + reader, + reader.uint32(), + ); + break; + } + case 107: { + message.addPublisher = + $root.pyth_lazer_transaction.AddPublisher.decode( + reader, + reader.uint32(), + ); + break; + } + case 108: { + message.updatePublisher = + $root.pyth_lazer_transaction.UpdatePublisher.decode( + reader, + reader.uint32(), + ); + break; + } + case 109: { + message.addFeed = $root.pyth_lazer_transaction.AddFeed.decode( + reader, + reader.uint32(), + ); + break; + } + case 110: { + message.updateFeed = $root.pyth_lazer_transaction.UpdateFeed.decode( + reader, + reader.uint32(), + ); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GovernanceDirective message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.GovernanceDirective + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.GovernanceDirective} GovernanceDirective + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GovernanceDirective.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GovernanceDirective message. + * @function verify + * @memberof pyth_lazer_transaction.GovernanceDirective + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GovernanceDirective.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if ( + message.shardFilter != null && + message.hasOwnProperty("shardFilter") + ) { + properties._shardFilter = 1; + { + var error = $root.pyth_lazer_transaction.ShardFilter.verify( + message.shardFilter, + ); + if (error) return "shardFilter." + error; + } + } + if ( + message.createShard != null && + message.hasOwnProperty("createShard") + ) { + properties.action = 1; + { + var error = $root.pyth_lazer_transaction.CreateShard.verify( + message.createShard, + ); + if (error) return "createShard." + error; + } + } + if ( + message.addGovernanceSource != null && + message.hasOwnProperty("addGovernanceSource") + ) { + if (properties.action === 1) return "action: multiple values"; + properties.action = 1; + { + var error = $root.pyth_lazer_transaction.AddGovernanceSource.verify( + message.addGovernanceSource, + ); + if (error) return "addGovernanceSource." + error; + } + } + if ( + message.updateGovernanceSource != null && + message.hasOwnProperty("updateGovernanceSource") + ) { + if (properties.action === 1) return "action: multiple values"; + properties.action = 1; + { + var error = + $root.pyth_lazer_transaction.UpdateGovernanceSource.verify( + message.updateGovernanceSource, + ); + if (error) return "updateGovernanceSource." + error; + } + } + if ( + message.setShardName != null && + message.hasOwnProperty("setShardName") + ) { + if (properties.action === 1) return "action: multiple values"; + properties.action = 1; + { + var error = $root.pyth_lazer_transaction.SetShardName.verify( + message.setShardName, + ); + if (error) return "setShardName." + error; + } + } + if ( + message.setShardGroup != null && + message.hasOwnProperty("setShardGroup") + ) { + if (properties.action === 1) return "action: multiple values"; + properties.action = 1; + { + var error = $root.pyth_lazer_transaction.SetShardGroup.verify( + message.setShardGroup, + ); + if (error) return "setShardGroup." + error; + } + } + if ( + message.resetLastSequenceNo != null && + message.hasOwnProperty("resetLastSequenceNo") + ) { + if (properties.action === 1) return "action: multiple values"; + properties.action = 1; + { + var error = $root.pyth_lazer_transaction.ResetLastSequenceNo.verify( + message.resetLastSequenceNo, + ); + if (error) return "resetLastSequenceNo." + error; + } + } + if ( + message.addPublisher != null && + message.hasOwnProperty("addPublisher") + ) { + if (properties.action === 1) return "action: multiple values"; + properties.action = 1; + { + var error = $root.pyth_lazer_transaction.AddPublisher.verify( + message.addPublisher, + ); + if (error) return "addPublisher." + error; + } + } + if ( + message.updatePublisher != null && + message.hasOwnProperty("updatePublisher") + ) { + if (properties.action === 1) return "action: multiple values"; + properties.action = 1; + { + var error = $root.pyth_lazer_transaction.UpdatePublisher.verify( + message.updatePublisher, + ); + if (error) return "updatePublisher." + error; + } + } + if (message.addFeed != null && message.hasOwnProperty("addFeed")) { + if (properties.action === 1) return "action: multiple values"; + properties.action = 1; + { + var error = $root.pyth_lazer_transaction.AddFeed.verify( + message.addFeed, + ); + if (error) return "addFeed." + error; + } + } + if (message.updateFeed != null && message.hasOwnProperty("updateFeed")) { + if (properties.action === 1) return "action: multiple values"; + properties.action = 1; + { + var error = $root.pyth_lazer_transaction.UpdateFeed.verify( + message.updateFeed, + ); + if (error) return "updateFeed." + error; + } + } + return null; + }; + + /** + * Creates a GovernanceDirective message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.GovernanceDirective + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.GovernanceDirective} GovernanceDirective + */ + GovernanceDirective.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.GovernanceDirective) + return object; + var message = new $root.pyth_lazer_transaction.GovernanceDirective(); + if (object.shardFilter != null) { + if (typeof object.shardFilter !== "object") + throw TypeError( + ".pyth_lazer_transaction.GovernanceDirective.shardFilter: object expected", + ); + message.shardFilter = + $root.pyth_lazer_transaction.ShardFilter.fromObject( + object.shardFilter, + ); + } + if (object.createShard != null) { + if (typeof object.createShard !== "object") + throw TypeError( + ".pyth_lazer_transaction.GovernanceDirective.createShard: object expected", + ); + message.createShard = + $root.pyth_lazer_transaction.CreateShard.fromObject( + object.createShard, + ); + } + if (object.addGovernanceSource != null) { + if (typeof object.addGovernanceSource !== "object") + throw TypeError( + ".pyth_lazer_transaction.GovernanceDirective.addGovernanceSource: object expected", + ); + message.addGovernanceSource = + $root.pyth_lazer_transaction.AddGovernanceSource.fromObject( + object.addGovernanceSource, + ); + } + if (object.updateGovernanceSource != null) { + if (typeof object.updateGovernanceSource !== "object") + throw TypeError( + ".pyth_lazer_transaction.GovernanceDirective.updateGovernanceSource: object expected", + ); + message.updateGovernanceSource = + $root.pyth_lazer_transaction.UpdateGovernanceSource.fromObject( + object.updateGovernanceSource, + ); + } + if (object.setShardName != null) { + if (typeof object.setShardName !== "object") + throw TypeError( + ".pyth_lazer_transaction.GovernanceDirective.setShardName: object expected", + ); + message.setShardName = + $root.pyth_lazer_transaction.SetShardName.fromObject( + object.setShardName, + ); + } + if (object.setShardGroup != null) { + if (typeof object.setShardGroup !== "object") + throw TypeError( + ".pyth_lazer_transaction.GovernanceDirective.setShardGroup: object expected", + ); + message.setShardGroup = + $root.pyth_lazer_transaction.SetShardGroup.fromObject( + object.setShardGroup, + ); + } + if (object.resetLastSequenceNo != null) { + if (typeof object.resetLastSequenceNo !== "object") + throw TypeError( + ".pyth_lazer_transaction.GovernanceDirective.resetLastSequenceNo: object expected", + ); + message.resetLastSequenceNo = + $root.pyth_lazer_transaction.ResetLastSequenceNo.fromObject( + object.resetLastSequenceNo, + ); + } + if (object.addPublisher != null) { + if (typeof object.addPublisher !== "object") + throw TypeError( + ".pyth_lazer_transaction.GovernanceDirective.addPublisher: object expected", + ); + message.addPublisher = + $root.pyth_lazer_transaction.AddPublisher.fromObject( + object.addPublisher, + ); + } + if (object.updatePublisher != null) { + if (typeof object.updatePublisher !== "object") + throw TypeError( + ".pyth_lazer_transaction.GovernanceDirective.updatePublisher: object expected", + ); + message.updatePublisher = + $root.pyth_lazer_transaction.UpdatePublisher.fromObject( + object.updatePublisher, + ); + } + if (object.addFeed != null) { + if (typeof object.addFeed !== "object") + throw TypeError( + ".pyth_lazer_transaction.GovernanceDirective.addFeed: object expected", + ); + message.addFeed = $root.pyth_lazer_transaction.AddFeed.fromObject( + object.addFeed, + ); + } + if (object.updateFeed != null) { + if (typeof object.updateFeed !== "object") + throw TypeError( + ".pyth_lazer_transaction.GovernanceDirective.updateFeed: object expected", + ); + message.updateFeed = $root.pyth_lazer_transaction.UpdateFeed.fromObject( + object.updateFeed, + ); + } + return message; + }; + + /** + * Creates a plain object from a GovernanceDirective message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.GovernanceDirective + * @static + * @param {pyth_lazer_transaction.GovernanceDirective} message GovernanceDirective + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GovernanceDirective.toObject = function toObject(message, options) { + if (!options) options = {}; + var object = {}; + if ( + message.shardFilter != null && + message.hasOwnProperty("shardFilter") + ) { + object.shardFilter = $root.pyth_lazer_transaction.ShardFilter.toObject( + message.shardFilter, + options, + ); + if (options.oneofs) object._shardFilter = "shardFilter"; + } + if ( + message.createShard != null && + message.hasOwnProperty("createShard") + ) { + object.createShard = $root.pyth_lazer_transaction.CreateShard.toObject( + message.createShard, + options, + ); + if (options.oneofs) object.action = "createShard"; + } + if ( + message.addGovernanceSource != null && + message.hasOwnProperty("addGovernanceSource") + ) { + object.addGovernanceSource = + $root.pyth_lazer_transaction.AddGovernanceSource.toObject( + message.addGovernanceSource, + options, + ); + if (options.oneofs) object.action = "addGovernanceSource"; + } + if ( + message.updateGovernanceSource != null && + message.hasOwnProperty("updateGovernanceSource") + ) { + object.updateGovernanceSource = + $root.pyth_lazer_transaction.UpdateGovernanceSource.toObject( + message.updateGovernanceSource, + options, + ); + if (options.oneofs) object.action = "updateGovernanceSource"; + } + if ( + message.setShardName != null && + message.hasOwnProperty("setShardName") + ) { + object.setShardName = + $root.pyth_lazer_transaction.SetShardName.toObject( + message.setShardName, + options, + ); + if (options.oneofs) object.action = "setShardName"; + } + if ( + message.setShardGroup != null && + message.hasOwnProperty("setShardGroup") + ) { + object.setShardGroup = + $root.pyth_lazer_transaction.SetShardGroup.toObject( + message.setShardGroup, + options, + ); + if (options.oneofs) object.action = "setShardGroup"; + } + if ( + message.resetLastSequenceNo != null && + message.hasOwnProperty("resetLastSequenceNo") + ) { + object.resetLastSequenceNo = + $root.pyth_lazer_transaction.ResetLastSequenceNo.toObject( + message.resetLastSequenceNo, + options, + ); + if (options.oneofs) object.action = "resetLastSequenceNo"; + } + if ( + message.addPublisher != null && + message.hasOwnProperty("addPublisher") + ) { + object.addPublisher = + $root.pyth_lazer_transaction.AddPublisher.toObject( + message.addPublisher, + options, + ); + if (options.oneofs) object.action = "addPublisher"; + } + if ( + message.updatePublisher != null && + message.hasOwnProperty("updatePublisher") + ) { + object.updatePublisher = + $root.pyth_lazer_transaction.UpdatePublisher.toObject( + message.updatePublisher, + options, + ); + if (options.oneofs) object.action = "updatePublisher"; + } + if (message.addFeed != null && message.hasOwnProperty("addFeed")) { + object.addFeed = $root.pyth_lazer_transaction.AddFeed.toObject( + message.addFeed, + options, + ); + if (options.oneofs) object.action = "addFeed"; + } + if (message.updateFeed != null && message.hasOwnProperty("updateFeed")) { + object.updateFeed = $root.pyth_lazer_transaction.UpdateFeed.toObject( + message.updateFeed, + options, + ); + if (options.oneofs) object.action = "updateFeed"; + } + return object; + }; + + /** + * Converts this GovernanceDirective to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.GovernanceDirective + * @instance + * @returns {Object.} JSON object + */ + GovernanceDirective.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GovernanceDirective + * @function getTypeUrl + * @memberof pyth_lazer_transaction.GovernanceDirective + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GovernanceDirective.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.GovernanceDirective"; + }; + + return GovernanceDirective; + })(); + + pyth_lazer_transaction.Permissions = (function () { + /** + * Properties of a Permissions. + * @memberof pyth_lazer_transaction + * @interface IPermissions + * @property {boolean|null} [allActions] Permissions allActions + * @property {Array.|null} [shardActions] Permissions shardActions + * @property {boolean|null} [allUpdateGovernanceSourceActions] Permissions allUpdateGovernanceSourceActions + * @property {Array.|null} [updateGovernanceSourceActions] Permissions updateGovernanceSourceActions + * @property {boolean|null} [allUpdatePublisherAction] Permissions allUpdatePublisherAction + * @property {Array.|null} [updatePublisherActions] Permissions updatePublisherActions + * @property {boolean|null} [allUpdateFeedActions] Permissions allUpdateFeedActions + * @property {Array.|null} [updateFeedActions] Permissions updateFeedActions + */ + + /** + * Constructs a new Permissions. + * @memberof pyth_lazer_transaction + * @classdesc Represents a Permissions. + * @implements IPermissions + * @constructor + * @param {pyth_lazer_transaction.IPermissions=} [properties] Properties to set + */ + function Permissions(properties) { + this.shardActions = []; + this.updateGovernanceSourceActions = []; + this.updatePublisherActions = []; + this.updateFeedActions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + } + + /** + * Permissions allActions. + * @member {boolean|null|undefined} allActions + * @memberof pyth_lazer_transaction.Permissions + * @instance + */ + Permissions.prototype.allActions = null; + + /** + * Permissions shardActions. + * @member {Array.} shardActions + * @memberof pyth_lazer_transaction.Permissions + * @instance + */ + Permissions.prototype.shardActions = $util.emptyArray; + + /** + * Permissions allUpdateGovernanceSourceActions. + * @member {boolean|null|undefined} allUpdateGovernanceSourceActions + * @memberof pyth_lazer_transaction.Permissions + * @instance + */ + Permissions.prototype.allUpdateGovernanceSourceActions = null; + + /** + * Permissions updateGovernanceSourceActions. + * @member {Array.} updateGovernanceSourceActions + * @memberof pyth_lazer_transaction.Permissions + * @instance + */ + Permissions.prototype.updateGovernanceSourceActions = $util.emptyArray; + + /** + * Permissions allUpdatePublisherAction. + * @member {boolean|null|undefined} allUpdatePublisherAction + * @memberof pyth_lazer_transaction.Permissions + * @instance + */ + Permissions.prototype.allUpdatePublisherAction = null; + + /** + * Permissions updatePublisherActions. + * @member {Array.} updatePublisherActions + * @memberof pyth_lazer_transaction.Permissions + * @instance + */ + Permissions.prototype.updatePublisherActions = $util.emptyArray; + + /** + * Permissions allUpdateFeedActions. + * @member {boolean|null|undefined} allUpdateFeedActions + * @memberof pyth_lazer_transaction.Permissions + * @instance + */ + Permissions.prototype.allUpdateFeedActions = null; + + /** + * Permissions updateFeedActions. + * @member {Array.} updateFeedActions + * @memberof pyth_lazer_transaction.Permissions + * @instance + */ + Permissions.prototype.updateFeedActions = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Permissions _allActions. + * @member {"allActions"|undefined} _allActions + * @memberof pyth_lazer_transaction.Permissions + * @instance + */ + Object.defineProperty(Permissions.prototype, "_allActions", { + get: $util.oneOfGetter(($oneOfFields = ["allActions"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Permissions _allUpdateGovernanceSourceActions. + * @member {"allUpdateGovernanceSourceActions"|undefined} _allUpdateGovernanceSourceActions + * @memberof pyth_lazer_transaction.Permissions + * @instance + */ + Object.defineProperty( + Permissions.prototype, + "_allUpdateGovernanceSourceActions", + { + get: $util.oneOfGetter( + ($oneOfFields = ["allUpdateGovernanceSourceActions"]), + ), + set: $util.oneOfSetter($oneOfFields), + }, + ); + + /** + * Permissions _allUpdatePublisherAction. + * @member {"allUpdatePublisherAction"|undefined} _allUpdatePublisherAction + * @memberof pyth_lazer_transaction.Permissions + * @instance + */ + Object.defineProperty(Permissions.prototype, "_allUpdatePublisherAction", { + get: $util.oneOfGetter(($oneOfFields = ["allUpdatePublisherAction"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Permissions _allUpdateFeedActions. + * @member {"allUpdateFeedActions"|undefined} _allUpdateFeedActions + * @memberof pyth_lazer_transaction.Permissions + * @instance + */ + Object.defineProperty(Permissions.prototype, "_allUpdateFeedActions", { + get: $util.oneOfGetter(($oneOfFields = ["allUpdateFeedActions"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Creates a new Permissions instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.Permissions + * @static + * @param {pyth_lazer_transaction.IPermissions=} [properties] Properties to set + * @returns {pyth_lazer_transaction.Permissions} Permissions instance + */ + Permissions.create = function create(properties) { + return new Permissions(properties); + }; + + /** + * Encodes the specified Permissions message. Does not implicitly {@link pyth_lazer_transaction.Permissions.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.Permissions + * @static + * @param {pyth_lazer_transaction.IPermissions} message Permissions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Permissions.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if ( + message.allActions != null && + Object.hasOwnProperty.call(message, "allActions") + ) + writer.uint32(/* id 1, wireType 0 =*/ 8).bool(message.allActions); + if (message.shardActions != null && message.shardActions.length) { + writer.uint32(/* id 2, wireType 2 =*/ 18).fork(); + for (var i = 0; i < message.shardActions.length; ++i) + writer.int32(message.shardActions[i]); + writer.ldelim(); + } + if ( + message.allUpdateGovernanceSourceActions != null && + Object.hasOwnProperty.call(message, "allUpdateGovernanceSourceActions") + ) + writer + .uint32(/* id 3, wireType 0 =*/ 24) + .bool(message.allUpdateGovernanceSourceActions); + if ( + message.updateGovernanceSourceActions != null && + message.updateGovernanceSourceActions.length + ) { + writer.uint32(/* id 4, wireType 2 =*/ 34).fork(); + for (var i = 0; i < message.updateGovernanceSourceActions.length; ++i) + writer.int32(message.updateGovernanceSourceActions[i]); + writer.ldelim(); + } + if ( + message.allUpdatePublisherAction != null && + Object.hasOwnProperty.call(message, "allUpdatePublisherAction") + ) + writer + .uint32(/* id 5, wireType 0 =*/ 40) + .bool(message.allUpdatePublisherAction); + if ( + message.updatePublisherActions != null && + message.updatePublisherActions.length + ) { + writer.uint32(/* id 6, wireType 2 =*/ 50).fork(); + for (var i = 0; i < message.updatePublisherActions.length; ++i) + writer.int32(message.updatePublisherActions[i]); + writer.ldelim(); + } + if ( + message.allUpdateFeedActions != null && + Object.hasOwnProperty.call(message, "allUpdateFeedActions") + ) + writer + .uint32(/* id 7, wireType 0 =*/ 56) + .bool(message.allUpdateFeedActions); + if ( + message.updateFeedActions != null && + message.updateFeedActions.length + ) { + writer.uint32(/* id 8, wireType 2 =*/ 66).fork(); + for (var i = 0; i < message.updateFeedActions.length; ++i) + writer.int32(message.updateFeedActions[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified Permissions message, length delimited. Does not implicitly {@link pyth_lazer_transaction.Permissions.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.Permissions + * @static + * @param {pyth_lazer_transaction.IPermissions} message Permissions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Permissions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Permissions message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.Permissions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.Permissions} Permissions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Permissions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pyth_lazer_transaction.Permissions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.allActions = reader.bool(); + break; + } + case 2: { + if (!(message.shardActions && message.shardActions.length)) + message.shardActions = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.shardActions.push(reader.int32()); + } else message.shardActions.push(reader.int32()); + break; + } + case 3: { + message.allUpdateGovernanceSourceActions = reader.bool(); + break; + } + case 4: { + if ( + !( + message.updateGovernanceSourceActions && + message.updateGovernanceSourceActions.length + ) + ) + message.updateGovernanceSourceActions = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.updateGovernanceSourceActions.push(reader.int32()); + } else message.updateGovernanceSourceActions.push(reader.int32()); + break; + } + case 5: { + message.allUpdatePublisherAction = reader.bool(); + break; + } + case 6: { + if ( + !( + message.updatePublisherActions && + message.updatePublisherActions.length + ) + ) + message.updatePublisherActions = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.updatePublisherActions.push(reader.int32()); + } else message.updatePublisherActions.push(reader.int32()); + break; + } + case 7: { + message.allUpdateFeedActions = reader.bool(); + break; + } + case 8: { + if ( + !(message.updateFeedActions && message.updateFeedActions.length) + ) + message.updateFeedActions = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.updateFeedActions.push(reader.int32()); + } else message.updateFeedActions.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Permissions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.Permissions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.Permissions} Permissions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Permissions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Permissions message. + * @function verify + * @memberof pyth_lazer_transaction.Permissions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Permissions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.allActions != null && message.hasOwnProperty("allActions")) { + properties._allActions = 1; + if (typeof message.allActions !== "boolean") + return "allActions: boolean expected"; + } + if ( + message.shardActions != null && + message.hasOwnProperty("shardActions") + ) { + if (!Array.isArray(message.shardActions)) + return "shardActions: array expected"; + for (var i = 0; i < message.shardActions.length; ++i) + switch (message.shardActions[i]) { + default: + return "shardActions: enum value[] expected"; + case 0: + case 101: + case 102: + case 103: + case 104: + case 105: + case 106: + case 107: + case 109: + break; + } + } + if ( + message.allUpdateGovernanceSourceActions != null && + message.hasOwnProperty("allUpdateGovernanceSourceActions") + ) { + properties._allUpdateGovernanceSourceActions = 1; + if (typeof message.allUpdateGovernanceSourceActions !== "boolean") + return "allUpdateGovernanceSourceActions: boolean expected"; + } + if ( + message.updateGovernanceSourceActions != null && + message.hasOwnProperty("updateGovernanceSourceActions") + ) { + if (!Array.isArray(message.updateGovernanceSourceActions)) + return "updateGovernanceSourceActions: array expected"; + for (var i = 0; i < message.updateGovernanceSourceActions.length; ++i) + switch (message.updateGovernanceSourceActions[i]) { + default: + return "updateGovernanceSourceActions: enum value[] expected"; + case 0: + case 101: + case 199: + break; + } + } + if ( + message.allUpdatePublisherAction != null && + message.hasOwnProperty("allUpdatePublisherAction") + ) { + properties._allUpdatePublisherAction = 1; + if (typeof message.allUpdatePublisherAction !== "boolean") + return "allUpdatePublisherAction: boolean expected"; + } + if ( + message.updatePublisherActions != null && + message.hasOwnProperty("updatePublisherActions") + ) { + if (!Array.isArray(message.updatePublisherActions)) + return "updatePublisherActions: array expected"; + for (var i = 0; i < message.updatePublisherActions.length; ++i) + switch (message.updatePublisherActions[i]) { + default: + return "updatePublisherActions: enum value[] expected"; + case 0: + case 101: + case 102: + case 103: + case 104: + case 105: + case 199: + break; + } + } + if ( + message.allUpdateFeedActions != null && + message.hasOwnProperty("allUpdateFeedActions") + ) { + properties._allUpdateFeedActions = 1; + if (typeof message.allUpdateFeedActions !== "boolean") + return "allUpdateFeedActions: boolean expected"; + } + if ( + message.updateFeedActions != null && + message.hasOwnProperty("updateFeedActions") + ) { + if (!Array.isArray(message.updateFeedActions)) + return "updateFeedActions: array expected"; + for (var i = 0; i < message.updateFeedActions.length; ++i) + switch (message.updateFeedActions[i]) { + default: + return "updateFeedActions: enum value[] expected"; + case 0: + case 101: + case 102: + case 103: + case 199: + break; + } + } + return null; + }; + + /** + * Creates a Permissions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.Permissions + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.Permissions} Permissions + */ + Permissions.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.Permissions) + return object; + var message = new $root.pyth_lazer_transaction.Permissions(); + if (object.allActions != null) + message.allActions = Boolean(object.allActions); + if (object.shardActions) { + if (!Array.isArray(object.shardActions)) + throw TypeError( + ".pyth_lazer_transaction.Permissions.shardActions: array expected", + ); + message.shardActions = []; + for (var i = 0; i < object.shardActions.length; ++i) + switch (object.shardActions[i]) { + default: + if (typeof object.shardActions[i] === "number") { + message.shardActions[i] = object.shardActions[i]; + break; + } + case "SHARD_ACTION_UNSPECIFIED": + case 0: + message.shardActions[i] = 0; + break; + case "CREATE_SHARD": + case 101: + message.shardActions[i] = 101; + break; + case "ADD_GOVERNANCE_SOURCE": + case 102: + message.shardActions[i] = 102; + break; + case "UPDATE_GOVERNANCE_SOURCE": + case 103: + message.shardActions[i] = 103; + break; + case "SET_SHARD_NAME": + case 104: + message.shardActions[i] = 104; + break; + case "SET_SHARD_GROUP": + case 105: + message.shardActions[i] = 105; + break; + case "RESET_LAST_SEQUENCE_NO": + case 106: + message.shardActions[i] = 106; + break; + case "ADD_PUBLISHER": + case 107: + message.shardActions[i] = 107; + break; + case "ADD_FEED": + case 109: + message.shardActions[i] = 109; + break; + } + } + if (object.allUpdateGovernanceSourceActions != null) + message.allUpdateGovernanceSourceActions = Boolean( + object.allUpdateGovernanceSourceActions, + ); + if (object.updateGovernanceSourceActions) { + if (!Array.isArray(object.updateGovernanceSourceActions)) + throw TypeError( + ".pyth_lazer_transaction.Permissions.updateGovernanceSourceActions: array expected", + ); + message.updateGovernanceSourceActions = []; + for (var i = 0; i < object.updateGovernanceSourceActions.length; ++i) + switch (object.updateGovernanceSourceActions[i]) { + default: + if (typeof object.updateGovernanceSourceActions[i] === "number") { + message.updateGovernanceSourceActions[i] = + object.updateGovernanceSourceActions[i]; + break; + } + case "UPDATE_GOVERNANCE_SOURCE_ACTION_UNSPECIFIED": + case 0: + message.updateGovernanceSourceActions[i] = 0; + break; + case "SET_GOVERNANCE_SOURCE_PERMISSIONS": + case 101: + message.updateGovernanceSourceActions[i] = 101; + break; + case "REMOVE_GOVERNANCE_SOURCE": + case 199: + message.updateGovernanceSourceActions[i] = 199; + break; + } + } + if (object.allUpdatePublisherAction != null) + message.allUpdatePublisherAction = Boolean( + object.allUpdatePublisherAction, + ); + if (object.updatePublisherActions) { + if (!Array.isArray(object.updatePublisherActions)) + throw TypeError( + ".pyth_lazer_transaction.Permissions.updatePublisherActions: array expected", + ); + message.updatePublisherActions = []; + for (var i = 0; i < object.updatePublisherActions.length; ++i) + switch (object.updatePublisherActions[i]) { + default: + if (typeof object.updatePublisherActions[i] === "number") { + message.updatePublisherActions[i] = + object.updatePublisherActions[i]; + break; + } + case "UPDATE_PUBLISHER_ACTION_UNSPECIFIED": + case 0: + message.updatePublisherActions[i] = 0; + break; + case "SET_PUBLISHER_NAME": + case 101: + message.updatePublisherActions[i] = 101; + break; + case "ADD_PUBLISHER_PUBLIC_KEYS": + case 102: + message.updatePublisherActions[i] = 102; + break; + case "REMOVE_PUBLISHER_PUBLIC_KEYS": + case 103: + message.updatePublisherActions[i] = 103; + break; + case "SET_PUBLISHER_PUBLIC_KEYS": + case 104: + message.updatePublisherActions[i] = 104; + break; + case "SET_PUBLISHER_ACTIVE": + case 105: + message.updatePublisherActions[i] = 105; + break; + case "REMOVE_PUBLISHER": + case 199: + message.updatePublisherActions[i] = 199; + break; + } + } + if (object.allUpdateFeedActions != null) + message.allUpdateFeedActions = Boolean(object.allUpdateFeedActions); + if (object.updateFeedActions) { + if (!Array.isArray(object.updateFeedActions)) + throw TypeError( + ".pyth_lazer_transaction.Permissions.updateFeedActions: array expected", + ); + message.updateFeedActions = []; + for (var i = 0; i < object.updateFeedActions.length; ++i) + switch (object.updateFeedActions[i]) { + default: + if (typeof object.updateFeedActions[i] === "number") { + message.updateFeedActions[i] = object.updateFeedActions[i]; + break; + } + case "UPDATE_FEED_ACTION_UNSPECIFIED": + case 0: + message.updateFeedActions[i] = 0; + break; + case "UPDATE_FEED_METADATA": + case 101: + message.updateFeedActions[i] = 101; + break; + case "ACTIVATE_FEED": + case 102: + message.updateFeedActions[i] = 102; + break; + case "DEACTIVATE_FEED": + case 103: + message.updateFeedActions[i] = 103; + break; + case "REMOVE_FEED": + case 199: + message.updateFeedActions[i] = 199; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a Permissions message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.Permissions + * @static + * @param {pyth_lazer_transaction.Permissions} message Permissions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Permissions.toObject = function toObject(message, options) { + if (!options) options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.shardActions = []; + object.updateGovernanceSourceActions = []; + object.updatePublisherActions = []; + object.updateFeedActions = []; + } + if (message.allActions != null && message.hasOwnProperty("allActions")) { + object.allActions = message.allActions; + if (options.oneofs) object._allActions = "allActions"; + } + if (message.shardActions && message.shardActions.length) { + object.shardActions = []; + for (var j = 0; j < message.shardActions.length; ++j) + object.shardActions[j] = + options.enums === String + ? $root.pyth_lazer_transaction.Permissions.ShardAction[ + message.shardActions[j] + ] === undefined + ? message.shardActions[j] + : $root.pyth_lazer_transaction.Permissions.ShardAction[ + message.shardActions[j] + ] + : message.shardActions[j]; + } + if ( + message.allUpdateGovernanceSourceActions != null && + message.hasOwnProperty("allUpdateGovernanceSourceActions") + ) { + object.allUpdateGovernanceSourceActions = + message.allUpdateGovernanceSourceActions; + if (options.oneofs) + object._allUpdateGovernanceSourceActions = + "allUpdateGovernanceSourceActions"; + } + if ( + message.updateGovernanceSourceActions && + message.updateGovernanceSourceActions.length + ) { + object.updateGovernanceSourceActions = []; + for (var j = 0; j < message.updateGovernanceSourceActions.length; ++j) + object.updateGovernanceSourceActions[j] = + options.enums === String + ? $root.pyth_lazer_transaction.Permissions + .UpdateGovernanceSourceAction[ + message.updateGovernanceSourceActions[j] + ] === undefined + ? message.updateGovernanceSourceActions[j] + : $root.pyth_lazer_transaction.Permissions + .UpdateGovernanceSourceAction[ + message.updateGovernanceSourceActions[j] + ] + : message.updateGovernanceSourceActions[j]; + } + if ( + message.allUpdatePublisherAction != null && + message.hasOwnProperty("allUpdatePublisherAction") + ) { + object.allUpdatePublisherAction = message.allUpdatePublisherAction; + if (options.oneofs) + object._allUpdatePublisherAction = "allUpdatePublisherAction"; + } + if ( + message.updatePublisherActions && + message.updatePublisherActions.length + ) { + object.updatePublisherActions = []; + for (var j = 0; j < message.updatePublisherActions.length; ++j) + object.updatePublisherActions[j] = + options.enums === String + ? $root.pyth_lazer_transaction.Permissions.UpdatePublisherAction[ + message.updatePublisherActions[j] + ] === undefined + ? message.updatePublisherActions[j] + : $root.pyth_lazer_transaction.Permissions + .UpdatePublisherAction[message.updatePublisherActions[j]] + : message.updatePublisherActions[j]; + } + if ( + message.allUpdateFeedActions != null && + message.hasOwnProperty("allUpdateFeedActions") + ) { + object.allUpdateFeedActions = message.allUpdateFeedActions; + if (options.oneofs) + object._allUpdateFeedActions = "allUpdateFeedActions"; + } + if (message.updateFeedActions && message.updateFeedActions.length) { + object.updateFeedActions = []; + for (var j = 0; j < message.updateFeedActions.length; ++j) + object.updateFeedActions[j] = + options.enums === String + ? $root.pyth_lazer_transaction.Permissions.UpdateFeedAction[ + message.updateFeedActions[j] + ] === undefined + ? message.updateFeedActions[j] + : $root.pyth_lazer_transaction.Permissions.UpdateFeedAction[ + message.updateFeedActions[j] + ] + : message.updateFeedActions[j]; + } + return object; + }; + + /** + * Converts this Permissions to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.Permissions + * @instance + * @returns {Object.} JSON object + */ + Permissions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Permissions + * @function getTypeUrl + * @memberof pyth_lazer_transaction.Permissions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Permissions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.Permissions"; + }; + + /** + * ShardAction enum. + * @name pyth_lazer_transaction.Permissions.ShardAction + * @enum {number} + * @property {number} SHARD_ACTION_UNSPECIFIED=0 SHARD_ACTION_UNSPECIFIED value + * @property {number} CREATE_SHARD=101 CREATE_SHARD value + * @property {number} ADD_GOVERNANCE_SOURCE=102 ADD_GOVERNANCE_SOURCE value + * @property {number} UPDATE_GOVERNANCE_SOURCE=103 UPDATE_GOVERNANCE_SOURCE value + * @property {number} SET_SHARD_NAME=104 SET_SHARD_NAME value + * @property {number} SET_SHARD_GROUP=105 SET_SHARD_GROUP value + * @property {number} RESET_LAST_SEQUENCE_NO=106 RESET_LAST_SEQUENCE_NO value + * @property {number} ADD_PUBLISHER=107 ADD_PUBLISHER value + * @property {number} ADD_FEED=109 ADD_FEED value + */ + Permissions.ShardAction = (function () { + var valuesById = {}, + values = Object.create(valuesById); + values[(valuesById[0] = "SHARD_ACTION_UNSPECIFIED")] = 0; + values[(valuesById[101] = "CREATE_SHARD")] = 101; + values[(valuesById[102] = "ADD_GOVERNANCE_SOURCE")] = 102; + values[(valuesById[103] = "UPDATE_GOVERNANCE_SOURCE")] = 103; + values[(valuesById[104] = "SET_SHARD_NAME")] = 104; + values[(valuesById[105] = "SET_SHARD_GROUP")] = 105; + values[(valuesById[106] = "RESET_LAST_SEQUENCE_NO")] = 106; + values[(valuesById[107] = "ADD_PUBLISHER")] = 107; + values[(valuesById[109] = "ADD_FEED")] = 109; + return values; + })(); + + /** + * UpdateGovernanceSourceAction enum. + * @name pyth_lazer_transaction.Permissions.UpdateGovernanceSourceAction + * @enum {number} + * @property {number} UPDATE_GOVERNANCE_SOURCE_ACTION_UNSPECIFIED=0 UPDATE_GOVERNANCE_SOURCE_ACTION_UNSPECIFIED value + * @property {number} SET_GOVERNANCE_SOURCE_PERMISSIONS=101 SET_GOVERNANCE_SOURCE_PERMISSIONS value + * @property {number} REMOVE_GOVERNANCE_SOURCE=199 REMOVE_GOVERNANCE_SOURCE value + */ + Permissions.UpdateGovernanceSourceAction = (function () { + var valuesById = {}, + values = Object.create(valuesById); + values[(valuesById[0] = "UPDATE_GOVERNANCE_SOURCE_ACTION_UNSPECIFIED")] = + 0; + values[(valuesById[101] = "SET_GOVERNANCE_SOURCE_PERMISSIONS")] = 101; + values[(valuesById[199] = "REMOVE_GOVERNANCE_SOURCE")] = 199; + return values; + })(); + + /** + * UpdatePublisherAction enum. + * @name pyth_lazer_transaction.Permissions.UpdatePublisherAction + * @enum {number} + * @property {number} UPDATE_PUBLISHER_ACTION_UNSPECIFIED=0 UPDATE_PUBLISHER_ACTION_UNSPECIFIED value + * @property {number} SET_PUBLISHER_NAME=101 SET_PUBLISHER_NAME value + * @property {number} ADD_PUBLISHER_PUBLIC_KEYS=102 ADD_PUBLISHER_PUBLIC_KEYS value + * @property {number} REMOVE_PUBLISHER_PUBLIC_KEYS=103 REMOVE_PUBLISHER_PUBLIC_KEYS value + * @property {number} SET_PUBLISHER_PUBLIC_KEYS=104 SET_PUBLISHER_PUBLIC_KEYS value + * @property {number} SET_PUBLISHER_ACTIVE=105 SET_PUBLISHER_ACTIVE value + * @property {number} REMOVE_PUBLISHER=199 REMOVE_PUBLISHER value + */ + Permissions.UpdatePublisherAction = (function () { + var valuesById = {}, + values = Object.create(valuesById); + values[(valuesById[0] = "UPDATE_PUBLISHER_ACTION_UNSPECIFIED")] = 0; + values[(valuesById[101] = "SET_PUBLISHER_NAME")] = 101; + values[(valuesById[102] = "ADD_PUBLISHER_PUBLIC_KEYS")] = 102; + values[(valuesById[103] = "REMOVE_PUBLISHER_PUBLIC_KEYS")] = 103; + values[(valuesById[104] = "SET_PUBLISHER_PUBLIC_KEYS")] = 104; + values[(valuesById[105] = "SET_PUBLISHER_ACTIVE")] = 105; + values[(valuesById[199] = "REMOVE_PUBLISHER")] = 199; + return values; + })(); + + /** + * UpdateFeedAction enum. + * @name pyth_lazer_transaction.Permissions.UpdateFeedAction + * @enum {number} + * @property {number} UPDATE_FEED_ACTION_UNSPECIFIED=0 UPDATE_FEED_ACTION_UNSPECIFIED value + * @property {number} UPDATE_FEED_METADATA=101 UPDATE_FEED_METADATA value + * @property {number} ACTIVATE_FEED=102 ACTIVATE_FEED value + * @property {number} DEACTIVATE_FEED=103 DEACTIVATE_FEED value + * @property {number} REMOVE_FEED=199 REMOVE_FEED value + */ + Permissions.UpdateFeedAction = (function () { + var valuesById = {}, + values = Object.create(valuesById); + values[(valuesById[0] = "UPDATE_FEED_ACTION_UNSPECIFIED")] = 0; + values[(valuesById[101] = "UPDATE_FEED_METADATA")] = 101; + values[(valuesById[102] = "ACTIVATE_FEED")] = 102; + values[(valuesById[103] = "DEACTIVATE_FEED")] = 103; + values[(valuesById[199] = "REMOVE_FEED")] = 199; + return values; + })(); + + return Permissions; + })(); + + pyth_lazer_transaction.GovernanceSource = (function () { + /** + * Properties of a GovernanceSource. + * @memberof pyth_lazer_transaction + * @interface IGovernanceSource + * @property {pyth_lazer_transaction.GovernanceSource.ISingleEd25519|null} [singleEd25519] GovernanceSource singleEd25519 + * @property {pyth_lazer_transaction.GovernanceSource.IWormholeEmitter|null} [wormholeEmitter] GovernanceSource wormholeEmitter + */ + + /** + * Constructs a new GovernanceSource. + * @memberof pyth_lazer_transaction + * @classdesc Represents a GovernanceSource. + * @implements IGovernanceSource + * @constructor + * @param {pyth_lazer_transaction.IGovernanceSource=} [properties] Properties to set + */ + function GovernanceSource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + } + + /** + * GovernanceSource singleEd25519. + * @member {pyth_lazer_transaction.GovernanceSource.ISingleEd25519|null|undefined} singleEd25519 + * @memberof pyth_lazer_transaction.GovernanceSource + * @instance + */ + GovernanceSource.prototype.singleEd25519 = null; + + /** + * GovernanceSource wormholeEmitter. + * @member {pyth_lazer_transaction.GovernanceSource.IWormholeEmitter|null|undefined} wormholeEmitter + * @memberof pyth_lazer_transaction.GovernanceSource + * @instance + */ + GovernanceSource.prototype.wormholeEmitter = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GovernanceSource source. + * @member {"singleEd25519"|"wormholeEmitter"|undefined} source + * @memberof pyth_lazer_transaction.GovernanceSource + * @instance + */ + Object.defineProperty(GovernanceSource.prototype, "source", { + get: $util.oneOfGetter( + ($oneOfFields = ["singleEd25519", "wormholeEmitter"]), + ), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Creates a new GovernanceSource instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.GovernanceSource + * @static + * @param {pyth_lazer_transaction.IGovernanceSource=} [properties] Properties to set + * @returns {pyth_lazer_transaction.GovernanceSource} GovernanceSource instance + */ + GovernanceSource.create = function create(properties) { + return new GovernanceSource(properties); + }; + + /** + * Encodes the specified GovernanceSource message. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.GovernanceSource + * @static + * @param {pyth_lazer_transaction.IGovernanceSource} message GovernanceSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GovernanceSource.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if ( + message.singleEd25519 != null && + Object.hasOwnProperty.call(message, "singleEd25519") + ) + $root.pyth_lazer_transaction.GovernanceSource.SingleEd25519.encode( + message.singleEd25519, + writer.uint32(/* id 1, wireType 2 =*/ 10).fork(), + ).ldelim(); + if ( + message.wormholeEmitter != null && + Object.hasOwnProperty.call(message, "wormholeEmitter") + ) + $root.pyth_lazer_transaction.GovernanceSource.WormholeEmitter.encode( + message.wormholeEmitter, + writer.uint32(/* id 2, wireType 2 =*/ 18).fork(), + ).ldelim(); + return writer; + }; + + /** + * Encodes the specified GovernanceSource message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.GovernanceSource + * @static + * @param {pyth_lazer_transaction.IGovernanceSource} message GovernanceSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GovernanceSource.encodeDelimited = function encodeDelimited( + message, + writer, + ) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GovernanceSource message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.GovernanceSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.GovernanceSource} GovernanceSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GovernanceSource.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pyth_lazer_transaction.GovernanceSource(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.singleEd25519 = + $root.pyth_lazer_transaction.GovernanceSource.SingleEd25519.decode( + reader, + reader.uint32(), + ); + break; + } + case 2: { + message.wormholeEmitter = + $root.pyth_lazer_transaction.GovernanceSource.WormholeEmitter.decode( + reader, + reader.uint32(), + ); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GovernanceSource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.GovernanceSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.GovernanceSource} GovernanceSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GovernanceSource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GovernanceSource message. + * @function verify + * @memberof pyth_lazer_transaction.GovernanceSource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GovernanceSource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if ( + message.singleEd25519 != null && + message.hasOwnProperty("singleEd25519") + ) { + properties.source = 1; + { + var error = + $root.pyth_lazer_transaction.GovernanceSource.SingleEd25519.verify( + message.singleEd25519, + ); + if (error) return "singleEd25519." + error; + } + } + if ( + message.wormholeEmitter != null && + message.hasOwnProperty("wormholeEmitter") + ) { + if (properties.source === 1) return "source: multiple values"; + properties.source = 1; + { + var error = + $root.pyth_lazer_transaction.GovernanceSource.WormholeEmitter.verify( + message.wormholeEmitter, + ); + if (error) return "wormholeEmitter." + error; + } + } + return null; + }; + + /** + * Creates a GovernanceSource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.GovernanceSource + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.GovernanceSource} GovernanceSource + */ + GovernanceSource.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.GovernanceSource) + return object; + var message = new $root.pyth_lazer_transaction.GovernanceSource(); + if (object.singleEd25519 != null) { + if (typeof object.singleEd25519 !== "object") + throw TypeError( + ".pyth_lazer_transaction.GovernanceSource.singleEd25519: object expected", + ); + message.singleEd25519 = + $root.pyth_lazer_transaction.GovernanceSource.SingleEd25519.fromObject( + object.singleEd25519, + ); + } + if (object.wormholeEmitter != null) { + if (typeof object.wormholeEmitter !== "object") + throw TypeError( + ".pyth_lazer_transaction.GovernanceSource.wormholeEmitter: object expected", + ); + message.wormholeEmitter = + $root.pyth_lazer_transaction.GovernanceSource.WormholeEmitter.fromObject( + object.wormholeEmitter, + ); + } + return message; + }; + + /** + * Creates a plain object from a GovernanceSource message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.GovernanceSource + * @static + * @param {pyth_lazer_transaction.GovernanceSource} message GovernanceSource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GovernanceSource.toObject = function toObject(message, options) { + if (!options) options = {}; + var object = {}; + if ( + message.singleEd25519 != null && + message.hasOwnProperty("singleEd25519") + ) { + object.singleEd25519 = + $root.pyth_lazer_transaction.GovernanceSource.SingleEd25519.toObject( + message.singleEd25519, + options, + ); + if (options.oneofs) object.source = "singleEd25519"; + } + if ( + message.wormholeEmitter != null && + message.hasOwnProperty("wormholeEmitter") + ) { + object.wormholeEmitter = + $root.pyth_lazer_transaction.GovernanceSource.WormholeEmitter.toObject( + message.wormholeEmitter, + options, + ); + if (options.oneofs) object.source = "wormholeEmitter"; + } + return object; + }; + + /** + * Converts this GovernanceSource to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.GovernanceSource + * @instance + * @returns {Object.} JSON object + */ + GovernanceSource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GovernanceSource + * @function getTypeUrl + * @memberof pyth_lazer_transaction.GovernanceSource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GovernanceSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.GovernanceSource"; + }; + + GovernanceSource.SingleEd25519 = (function () { + /** + * Properties of a SingleEd25519. + * @memberof pyth_lazer_transaction.GovernanceSource + * @interface ISingleEd25519 + * @property {Uint8Array|null} [publicKey] SingleEd25519 publicKey + */ + + /** + * Constructs a new SingleEd25519. + * @memberof pyth_lazer_transaction.GovernanceSource + * @classdesc Represents a SingleEd25519. + * @implements ISingleEd25519 + * @constructor + * @param {pyth_lazer_transaction.GovernanceSource.ISingleEd25519=} [properties] Properties to set + */ + function SingleEd25519(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SingleEd25519 publicKey. + * @member {Uint8Array|null|undefined} publicKey + * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 + * @instance + */ + SingleEd25519.prototype.publicKey = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SingleEd25519 _publicKey. + * @member {"publicKey"|undefined} _publicKey + * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 + * @instance + */ + Object.defineProperty(SingleEd25519.prototype, "_publicKey", { + get: $util.oneOfGetter(($oneOfFields = ["publicKey"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Creates a new SingleEd25519 instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 + * @static + * @param {pyth_lazer_transaction.GovernanceSource.ISingleEd25519=} [properties] Properties to set + * @returns {pyth_lazer_transaction.GovernanceSource.SingleEd25519} SingleEd25519 instance + */ + SingleEd25519.create = function create(properties) { + return new SingleEd25519(properties); + }; + + /** + * Encodes the specified SingleEd25519 message. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.SingleEd25519.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 + * @static + * @param {pyth_lazer_transaction.GovernanceSource.ISingleEd25519} message SingleEd25519 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SingleEd25519.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 SingleEd25519 message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.SingleEd25519.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 + * @static + * @param {pyth_lazer_transaction.GovernanceSource.ISingleEd25519} message SingleEd25519 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SingleEd25519.encodeDelimited = function encodeDelimited( + message, + writer, + ) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SingleEd25519 message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.GovernanceSource.SingleEd25519} SingleEd25519 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SingleEd25519.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, + message = + new $root.pyth_lazer_transaction.GovernanceSource.SingleEd25519(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.publicKey = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SingleEd25519 message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.GovernanceSource.SingleEd25519} SingleEd25519 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SingleEd25519.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SingleEd25519 message. + * @function verify + * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SingleEd25519.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.publicKey != null && message.hasOwnProperty("publicKey")) { + properties._publicKey = 1; + if ( + !( + (message.publicKey && + typeof message.publicKey.length === "number") || + $util.isString(message.publicKey) + ) + ) + return "publicKey: buffer expected"; + } + return null; + }; + + /** + * Creates a SingleEd25519 message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.GovernanceSource.SingleEd25519} SingleEd25519 + */ + SingleEd25519.fromObject = function fromObject(object) { + if ( + object instanceof + $root.pyth_lazer_transaction.GovernanceSource.SingleEd25519 + ) + return object; + var message = + new $root.pyth_lazer_transaction.GovernanceSource.SingleEd25519(); + if (object.publicKey != null) + if (typeof object.publicKey === "string") + $util.base64.decode( + object.publicKey, + (message.publicKey = $util.newBuffer( + $util.base64.length(object.publicKey), + )), + 0, + ); + else if (object.publicKey.length >= 0) + message.publicKey = object.publicKey; + return message; + }; + + /** + * Creates a plain object from a SingleEd25519 message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 + * @static + * @param {pyth_lazer_transaction.GovernanceSource.SingleEd25519} message SingleEd25519 + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SingleEd25519.toObject = function toObject(message, options) { + if (!options) options = {}; + var object = {}; + 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; + if (options.oneofs) object._publicKey = "publicKey"; + } + return object; + }; + + /** + * Converts this SingleEd25519 to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 + * @instance + * @returns {Object.} JSON object + */ + SingleEd25519.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SingleEd25519 + * @function getTypeUrl + * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SingleEd25519.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return ( + typeUrlPrefix + + "/pyth_lazer_transaction.GovernanceSource.SingleEd25519" + ); + }; + + return SingleEd25519; + })(); + + GovernanceSource.WormholeEmitter = (function () { + /** + * Properties of a WormholeEmitter. + * @memberof pyth_lazer_transaction.GovernanceSource + * @interface IWormholeEmitter + * @property {Uint8Array|null} [address] WormholeEmitter address + * @property {number|null} [chainId] WormholeEmitter chainId + */ + + /** + * Constructs a new WormholeEmitter. + * @memberof pyth_lazer_transaction.GovernanceSource + * @classdesc Represents a WormholeEmitter. + * @implements IWormholeEmitter + * @constructor + * @param {pyth_lazer_transaction.GovernanceSource.IWormholeEmitter=} [properties] Properties to set + */ + function WormholeEmitter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WormholeEmitter address. + * @member {Uint8Array|null|undefined} address + * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter + * @instance + */ + WormholeEmitter.prototype.address = null; + + /** + * WormholeEmitter chainId. + * @member {number|null|undefined} chainId + * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter + * @instance + */ + WormholeEmitter.prototype.chainId = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * WormholeEmitter _address. + * @member {"address"|undefined} _address + * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter + * @instance + */ + Object.defineProperty(WormholeEmitter.prototype, "_address", { + get: $util.oneOfGetter(($oneOfFields = ["address"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * WormholeEmitter _chainId. + * @member {"chainId"|undefined} _chainId + * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter + * @instance + */ + Object.defineProperty(WormholeEmitter.prototype, "_chainId", { + get: $util.oneOfGetter(($oneOfFields = ["chainId"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Creates a new WormholeEmitter instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter + * @static + * @param {pyth_lazer_transaction.GovernanceSource.IWormholeEmitter=} [properties] Properties to set + * @returns {pyth_lazer_transaction.GovernanceSource.WormholeEmitter} WormholeEmitter instance + */ + WormholeEmitter.create = function create(properties) { + return new WormholeEmitter(properties); + }; + + /** + * Encodes the specified WormholeEmitter message. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.WormholeEmitter.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter + * @static + * @param {pyth_lazer_transaction.GovernanceSource.IWormholeEmitter} message WormholeEmitter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WormholeEmitter.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if ( + message.address != null && + Object.hasOwnProperty.call(message, "address") + ) + writer.uint32(/* id 1, wireType 2 =*/ 10).bytes(message.address); + if ( + message.chainId != null && + Object.hasOwnProperty.call(message, "chainId") + ) + writer.uint32(/* id 2, wireType 0 =*/ 16).uint32(message.chainId); + return writer; + }; + + /** + * Encodes the specified WormholeEmitter message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.WormholeEmitter.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter + * @static + * @param {pyth_lazer_transaction.GovernanceSource.IWormholeEmitter} message WormholeEmitter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WormholeEmitter.encodeDelimited = function encodeDelimited( + message, + writer, + ) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WormholeEmitter message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.GovernanceSource.WormholeEmitter} WormholeEmitter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WormholeEmitter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, + message = + new $root.pyth_lazer_transaction.GovernanceSource.WormholeEmitter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.address = reader.bytes(); + break; + } + case 2: { + message.chainId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WormholeEmitter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.GovernanceSource.WormholeEmitter} WormholeEmitter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WormholeEmitter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WormholeEmitter message. + * @function verify + * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WormholeEmitter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.address != null && message.hasOwnProperty("address")) { + properties._address = 1; + if ( + !( + (message.address && typeof message.address.length === "number") || + $util.isString(message.address) + ) + ) + return "address: buffer expected"; + } + if (message.chainId != null && message.hasOwnProperty("chainId")) { + properties._chainId = 1; + if (!$util.isInteger(message.chainId)) + return "chainId: integer expected"; + } + return null; + }; + + /** + * Creates a WormholeEmitter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.GovernanceSource.WormholeEmitter} WormholeEmitter + */ + WormholeEmitter.fromObject = function fromObject(object) { + if ( + object instanceof + $root.pyth_lazer_transaction.GovernanceSource.WormholeEmitter + ) + return object; + var message = + new $root.pyth_lazer_transaction.GovernanceSource.WormholeEmitter(); + if (object.address != null) + if (typeof object.address === "string") + $util.base64.decode( + object.address, + (message.address = $util.newBuffer( + $util.base64.length(object.address), + )), + 0, + ); + else if (object.address.length >= 0) message.address = object.address; + if (object.chainId != null) message.chainId = object.chainId >>> 0; + return message; + }; + + /** + * Creates a plain object from a WormholeEmitter message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter + * @static + * @param {pyth_lazer_transaction.GovernanceSource.WormholeEmitter} message WormholeEmitter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WormholeEmitter.toObject = function toObject(message, options) { + if (!options) options = {}; + var object = {}; + if (message.address != null && message.hasOwnProperty("address")) { + object.address = + options.bytes === String + ? $util.base64.encode(message.address, 0, message.address.length) + : options.bytes === Array + ? Array.prototype.slice.call(message.address) + : message.address; + if (options.oneofs) object._address = "address"; + } + if (message.chainId != null && message.hasOwnProperty("chainId")) { + object.chainId = message.chainId; + if (options.oneofs) object._chainId = "chainId"; + } + return object; + }; + + /** + * Converts this WormholeEmitter to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter + * @instance + * @returns {Object.} JSON object + */ + WormholeEmitter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WormholeEmitter + * @function getTypeUrl + * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WormholeEmitter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return ( + typeUrlPrefix + + "/pyth_lazer_transaction.GovernanceSource.WormholeEmitter" + ); + }; + + return WormholeEmitter; + })(); + + return GovernanceSource; + })(); + + pyth_lazer_transaction.CreateShard = (function () { + /** + * Properties of a CreateShard. + * @memberof pyth_lazer_transaction + * @interface ICreateShard + * @property {number|null} [shardId] CreateShard shardId + * @property {string|null} [shardGroup] CreateShard shardGroup + * @property {google.protobuf.IDuration|null} [minRate] CreateShard minRate + */ + + /** + * Constructs a new CreateShard. + * @memberof pyth_lazer_transaction + * @classdesc Represents a CreateShard. + * @implements ICreateShard + * @constructor + * @param {pyth_lazer_transaction.ICreateShard=} [properties] Properties to set + */ + function CreateShard(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateShard shardId. + * @member {number|null|undefined} shardId + * @memberof pyth_lazer_transaction.CreateShard + * @instance + */ + CreateShard.prototype.shardId = null; + + /** + * CreateShard shardGroup. + * @member {string|null|undefined} shardGroup + * @memberof pyth_lazer_transaction.CreateShard + * @instance + */ + CreateShard.prototype.shardGroup = null; + + /** + * CreateShard minRate. + * @member {google.protobuf.IDuration|null|undefined} minRate + * @memberof pyth_lazer_transaction.CreateShard + * @instance + */ + CreateShard.prototype.minRate = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CreateShard _shardId. + * @member {"shardId"|undefined} _shardId + * @memberof pyth_lazer_transaction.CreateShard + * @instance + */ + Object.defineProperty(CreateShard.prototype, "_shardId", { + get: $util.oneOfGetter(($oneOfFields = ["shardId"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * CreateShard _shardGroup. + * @member {"shardGroup"|undefined} _shardGroup + * @memberof pyth_lazer_transaction.CreateShard + * @instance + */ + Object.defineProperty(CreateShard.prototype, "_shardGroup", { + get: $util.oneOfGetter(($oneOfFields = ["shardGroup"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * CreateShard _minRate. + * @member {"minRate"|undefined} _minRate + * @memberof pyth_lazer_transaction.CreateShard + * @instance + */ + Object.defineProperty(CreateShard.prototype, "_minRate", { + get: $util.oneOfGetter(($oneOfFields = ["minRate"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Creates a new CreateShard instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.CreateShard + * @static + * @param {pyth_lazer_transaction.ICreateShard=} [properties] Properties to set + * @returns {pyth_lazer_transaction.CreateShard} CreateShard instance + */ + CreateShard.create = function create(properties) { + return new CreateShard(properties); + }; + + /** + * Encodes the specified CreateShard message. Does not implicitly {@link pyth_lazer_transaction.CreateShard.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.CreateShard + * @static + * @param {pyth_lazer_transaction.ICreateShard} message CreateShard message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateShard.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if ( + message.shardId != null && + Object.hasOwnProperty.call(message, "shardId") + ) + writer.uint32(/* id 1, wireType 0 =*/ 8).uint32(message.shardId); + if ( + message.shardGroup != null && + Object.hasOwnProperty.call(message, "shardGroup") + ) + writer.uint32(/* id 2, wireType 2 =*/ 18).string(message.shardGroup); + if ( + message.minRate != null && + Object.hasOwnProperty.call(message, "minRate") + ) + $root.google.protobuf.Duration.encode( + message.minRate, + writer.uint32(/* id 3, wireType 2 =*/ 26).fork(), + ).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateShard message, length delimited. Does not implicitly {@link pyth_lazer_transaction.CreateShard.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.CreateShard + * @static + * @param {pyth_lazer_transaction.ICreateShard} message CreateShard message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateShard.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateShard message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.CreateShard + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.CreateShard} CreateShard + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateShard.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pyth_lazer_transaction.CreateShard(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.shardId = reader.uint32(); + break; + } + case 2: { + message.shardGroup = reader.string(); + break; + } + case 3: { + message.minRate = $root.google.protobuf.Duration.decode( + reader, + reader.uint32(), + ); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateShard message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.CreateShard + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.CreateShard} CreateShard + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateShard.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateShard message. + * @function verify + * @memberof pyth_lazer_transaction.CreateShard + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateShard.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.shardId != null && message.hasOwnProperty("shardId")) { + properties._shardId = 1; + if (!$util.isInteger(message.shardId)) + return "shardId: integer expected"; + } + if (message.shardGroup != null && message.hasOwnProperty("shardGroup")) { + properties._shardGroup = 1; + if (!$util.isString(message.shardGroup)) + return "shardGroup: string expected"; + } + if (message.minRate != null && message.hasOwnProperty("minRate")) { + properties._minRate = 1; + { + var error = $root.google.protobuf.Duration.verify(message.minRate); + if (error) return "minRate." + error; + } + } + return null; + }; + + /** + * Creates a CreateShard message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.CreateShard + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.CreateShard} CreateShard + */ + CreateShard.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.CreateShard) + return object; + var message = new $root.pyth_lazer_transaction.CreateShard(); + if (object.shardId != null) message.shardId = object.shardId >>> 0; + if (object.shardGroup != null) + message.shardGroup = String(object.shardGroup); + if (object.minRate != null) { + if (typeof object.minRate !== "object") + throw TypeError( + ".pyth_lazer_transaction.CreateShard.minRate: object expected", + ); + message.minRate = $root.google.protobuf.Duration.fromObject( + object.minRate, + ); + } + return message; + }; + + /** + * Creates a plain object from a CreateShard message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.CreateShard + * @static + * @param {pyth_lazer_transaction.CreateShard} message CreateShard + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateShard.toObject = function toObject(message, options) { + if (!options) options = {}; + var object = {}; + if (message.shardId != null && message.hasOwnProperty("shardId")) { + object.shardId = message.shardId; + if (options.oneofs) object._shardId = "shardId"; + } + if (message.shardGroup != null && message.hasOwnProperty("shardGroup")) { + object.shardGroup = message.shardGroup; + if (options.oneofs) object._shardGroup = "shardGroup"; + } + if (message.minRate != null && message.hasOwnProperty("minRate")) { + object.minRate = $root.google.protobuf.Duration.toObject( + message.minRate, + options, + ); + if (options.oneofs) object._minRate = "minRate"; + } + return object; + }; + + /** + * Converts this CreateShard to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.CreateShard + * @instance + * @returns {Object.} JSON object + */ + CreateShard.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateShard + * @function getTypeUrl + * @memberof pyth_lazer_transaction.CreateShard + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateShard.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.CreateShard"; + }; + + return CreateShard; + })(); + + pyth_lazer_transaction.AddGovernanceSource = (function () { + /** + * Properties of an AddGovernanceSource. + * @memberof pyth_lazer_transaction + * @interface IAddGovernanceSource + * @property {pyth_lazer_transaction.IGovernanceSource|null} [newSource] AddGovernanceSource newSource + * @property {pyth_lazer_transaction.IPermissions|null} [permissions] AddGovernanceSource permissions + */ + + /** + * Constructs a new AddGovernanceSource. + * @memberof pyth_lazer_transaction + * @classdesc Represents an AddGovernanceSource. + * @implements IAddGovernanceSource + * @constructor + * @param {pyth_lazer_transaction.IAddGovernanceSource=} [properties] Properties to set + */ + function AddGovernanceSource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + } + + /** + * AddGovernanceSource newSource. + * @member {pyth_lazer_transaction.IGovernanceSource|null|undefined} newSource + * @memberof pyth_lazer_transaction.AddGovernanceSource + * @instance + */ + AddGovernanceSource.prototype.newSource = null; + + /** + * AddGovernanceSource permissions. + * @member {pyth_lazer_transaction.IPermissions|null|undefined} permissions + * @memberof pyth_lazer_transaction.AddGovernanceSource + * @instance + */ + AddGovernanceSource.prototype.permissions = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AddGovernanceSource _newSource. + * @member {"newSource"|undefined} _newSource + * @memberof pyth_lazer_transaction.AddGovernanceSource + * @instance + */ + Object.defineProperty(AddGovernanceSource.prototype, "_newSource", { + get: $util.oneOfGetter(($oneOfFields = ["newSource"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * AddGovernanceSource _permissions. + * @member {"permissions"|undefined} _permissions + * @memberof pyth_lazer_transaction.AddGovernanceSource + * @instance + */ + Object.defineProperty(AddGovernanceSource.prototype, "_permissions", { + get: $util.oneOfGetter(($oneOfFields = ["permissions"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Creates a new AddGovernanceSource instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.AddGovernanceSource + * @static + * @param {pyth_lazer_transaction.IAddGovernanceSource=} [properties] Properties to set + * @returns {pyth_lazer_transaction.AddGovernanceSource} AddGovernanceSource instance + */ + AddGovernanceSource.create = function create(properties) { + return new AddGovernanceSource(properties); + }; + + /** + * Encodes the specified AddGovernanceSource message. Does not implicitly {@link pyth_lazer_transaction.AddGovernanceSource.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.AddGovernanceSource + * @static + * @param {pyth_lazer_transaction.IAddGovernanceSource} message AddGovernanceSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddGovernanceSource.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if ( + message.newSource != null && + Object.hasOwnProperty.call(message, "newSource") + ) + $root.pyth_lazer_transaction.GovernanceSource.encode( + message.newSource, + writer.uint32(/* id 1, wireType 2 =*/ 10).fork(), + ).ldelim(); + if ( + message.permissions != null && + Object.hasOwnProperty.call(message, "permissions") + ) + $root.pyth_lazer_transaction.Permissions.encode( + message.permissions, + writer.uint32(/* id 2, wireType 2 =*/ 18).fork(), + ).ldelim(); + return writer; + }; + + /** + * Encodes the specified AddGovernanceSource message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddGovernanceSource.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.AddGovernanceSource + * @static + * @param {pyth_lazer_transaction.IAddGovernanceSource} message AddGovernanceSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddGovernanceSource.encodeDelimited = function encodeDelimited( + message, + writer, + ) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AddGovernanceSource message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.AddGovernanceSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.AddGovernanceSource} AddGovernanceSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddGovernanceSource.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pyth_lazer_transaction.AddGovernanceSource(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.newSource = + $root.pyth_lazer_transaction.GovernanceSource.decode( + reader, + reader.uint32(), + ); + break; + } + case 2: { + message.permissions = + $root.pyth_lazer_transaction.Permissions.decode( + reader, + reader.uint32(), + ); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AddGovernanceSource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.AddGovernanceSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.AddGovernanceSource} AddGovernanceSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddGovernanceSource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AddGovernanceSource message. + * @function verify + * @memberof pyth_lazer_transaction.AddGovernanceSource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AddGovernanceSource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.newSource != null && message.hasOwnProperty("newSource")) { + properties._newSource = 1; + { + var error = $root.pyth_lazer_transaction.GovernanceSource.verify( + message.newSource, + ); + if (error) return "newSource." + error; + } + } + if ( + message.permissions != null && + message.hasOwnProperty("permissions") + ) { + properties._permissions = 1; + { + var error = $root.pyth_lazer_transaction.Permissions.verify( + message.permissions, + ); + if (error) return "permissions." + error; + } + } + return null; + }; + + /** + * Creates an AddGovernanceSource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.AddGovernanceSource + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.AddGovernanceSource} AddGovernanceSource + */ + AddGovernanceSource.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.AddGovernanceSource) + return object; + var message = new $root.pyth_lazer_transaction.AddGovernanceSource(); + if (object.newSource != null) { + if (typeof object.newSource !== "object") + throw TypeError( + ".pyth_lazer_transaction.AddGovernanceSource.newSource: object expected", + ); + message.newSource = + $root.pyth_lazer_transaction.GovernanceSource.fromObject( + object.newSource, + ); + } + if (object.permissions != null) { + if (typeof object.permissions !== "object") + throw TypeError( + ".pyth_lazer_transaction.AddGovernanceSource.permissions: object expected", + ); + message.permissions = + $root.pyth_lazer_transaction.Permissions.fromObject( + object.permissions, + ); + } + return message; + }; + + /** + * Creates a plain object from an AddGovernanceSource message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.AddGovernanceSource + * @static + * @param {pyth_lazer_transaction.AddGovernanceSource} message AddGovernanceSource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AddGovernanceSource.toObject = function toObject(message, options) { + if (!options) options = {}; + var object = {}; + if (message.newSource != null && message.hasOwnProperty("newSource")) { + object.newSource = + $root.pyth_lazer_transaction.GovernanceSource.toObject( + message.newSource, + options, + ); + if (options.oneofs) object._newSource = "newSource"; + } + if ( + message.permissions != null && + message.hasOwnProperty("permissions") + ) { + object.permissions = $root.pyth_lazer_transaction.Permissions.toObject( + message.permissions, + options, + ); + if (options.oneofs) object._permissions = "permissions"; + } + return object; + }; + + /** + * Converts this AddGovernanceSource to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.AddGovernanceSource + * @instance + * @returns {Object.} JSON object + */ + AddGovernanceSource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AddGovernanceSource + * @function getTypeUrl + * @memberof pyth_lazer_transaction.AddGovernanceSource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AddGovernanceSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.AddGovernanceSource"; + }; + + return AddGovernanceSource; + })(); + + pyth_lazer_transaction.UpdateGovernanceSource = (function () { + /** + * Properties of an UpdateGovernanceSource. + * @memberof pyth_lazer_transaction + * @interface IUpdateGovernanceSource + * @property {pyth_lazer_transaction.IGovernanceSource|null} [source] UpdateGovernanceSource source + * @property {pyth_lazer_transaction.ISetGovernanceSourcePermissions|null} [setGovernanceSourcePermissions] UpdateGovernanceSource setGovernanceSourcePermissions + * @property {google.protobuf.IEmpty|null} [removeGovernanceSource] UpdateGovernanceSource removeGovernanceSource + */ + + /** + * Constructs a new UpdateGovernanceSource. + * @memberof pyth_lazer_transaction + * @classdesc Represents an UpdateGovernanceSource. + * @implements IUpdateGovernanceSource + * @constructor + * @param {pyth_lazer_transaction.IUpdateGovernanceSource=} [properties] Properties to set + */ + function UpdateGovernanceSource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateGovernanceSource source. + * @member {pyth_lazer_transaction.IGovernanceSource|null|undefined} source + * @memberof pyth_lazer_transaction.UpdateGovernanceSource + * @instance + */ + UpdateGovernanceSource.prototype.source = null; + + /** + * UpdateGovernanceSource setGovernanceSourcePermissions. + * @member {pyth_lazer_transaction.ISetGovernanceSourcePermissions|null|undefined} setGovernanceSourcePermissions + * @memberof pyth_lazer_transaction.UpdateGovernanceSource + * @instance + */ + UpdateGovernanceSource.prototype.setGovernanceSourcePermissions = null; + + /** + * UpdateGovernanceSource removeGovernanceSource. + * @member {google.protobuf.IEmpty|null|undefined} removeGovernanceSource + * @memberof pyth_lazer_transaction.UpdateGovernanceSource + * @instance + */ + UpdateGovernanceSource.prototype.removeGovernanceSource = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * UpdateGovernanceSource _source. + * @member {"source"|undefined} _source + * @memberof pyth_lazer_transaction.UpdateGovernanceSource + * @instance + */ + Object.defineProperty(UpdateGovernanceSource.prototype, "_source", { + get: $util.oneOfGetter(($oneOfFields = ["source"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * UpdateGovernanceSource action. + * @member {"setGovernanceSourcePermissions"|"removeGovernanceSource"|undefined} action + * @memberof pyth_lazer_transaction.UpdateGovernanceSource + * @instance + */ + Object.defineProperty(UpdateGovernanceSource.prototype, "action", { + get: $util.oneOfGetter( + ($oneOfFields = [ + "setGovernanceSourcePermissions", + "removeGovernanceSource", + ]), + ), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Creates a new UpdateGovernanceSource instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.UpdateGovernanceSource + * @static + * @param {pyth_lazer_transaction.IUpdateGovernanceSource=} [properties] Properties to set + * @returns {pyth_lazer_transaction.UpdateGovernanceSource} UpdateGovernanceSource instance + */ + UpdateGovernanceSource.create = function create(properties) { + return new UpdateGovernanceSource(properties); + }; + + /** + * Encodes the specified UpdateGovernanceSource message. Does not implicitly {@link pyth_lazer_transaction.UpdateGovernanceSource.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.UpdateGovernanceSource + * @static + * @param {pyth_lazer_transaction.IUpdateGovernanceSource} message UpdateGovernanceSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateGovernanceSource.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if ( + message.source != null && + Object.hasOwnProperty.call(message, "source") + ) + $root.pyth_lazer_transaction.GovernanceSource.encode( + message.source, + writer.uint32(/* id 1, wireType 2 =*/ 10).fork(), + ).ldelim(); + if ( + message.setGovernanceSourcePermissions != null && + Object.hasOwnProperty.call(message, "setGovernanceSourcePermissions") + ) + $root.pyth_lazer_transaction.SetGovernanceSourcePermissions.encode( + message.setGovernanceSourcePermissions, + writer.uint32(/* id 101, wireType 2 =*/ 810).fork(), + ).ldelim(); + if ( + message.removeGovernanceSource != null && + Object.hasOwnProperty.call(message, "removeGovernanceSource") + ) + $root.google.protobuf.Empty.encode( + message.removeGovernanceSource, + writer.uint32(/* id 199, wireType 2 =*/ 1594).fork(), + ).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateGovernanceSource message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdateGovernanceSource.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.UpdateGovernanceSource + * @static + * @param {pyth_lazer_transaction.IUpdateGovernanceSource} message UpdateGovernanceSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateGovernanceSource.encodeDelimited = function encodeDelimited( + message, + writer, + ) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateGovernanceSource message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.UpdateGovernanceSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.UpdateGovernanceSource} UpdateGovernanceSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateGovernanceSource.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pyth_lazer_transaction.UpdateGovernanceSource(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.source = + $root.pyth_lazer_transaction.GovernanceSource.decode( + reader, + reader.uint32(), + ); + break; + } + case 101: { + message.setGovernanceSourcePermissions = + $root.pyth_lazer_transaction.SetGovernanceSourcePermissions.decode( + reader, + reader.uint32(), + ); + break; + } + case 199: { + message.removeGovernanceSource = $root.google.protobuf.Empty.decode( + reader, + reader.uint32(), + ); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateGovernanceSource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.UpdateGovernanceSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.UpdateGovernanceSource} UpdateGovernanceSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateGovernanceSource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateGovernanceSource message. + * @function verify + * @memberof pyth_lazer_transaction.UpdateGovernanceSource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateGovernanceSource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.source != null && message.hasOwnProperty("source")) { + properties._source = 1; + { + var error = $root.pyth_lazer_transaction.GovernanceSource.verify( + message.source, + ); + if (error) return "source." + error; + } + } + if ( + message.setGovernanceSourcePermissions != null && + message.hasOwnProperty("setGovernanceSourcePermissions") + ) { + properties.action = 1; + { + var error = + $root.pyth_lazer_transaction.SetGovernanceSourcePermissions.verify( + message.setGovernanceSourcePermissions, + ); + if (error) return "setGovernanceSourcePermissions." + error; + } + } + if ( + message.removeGovernanceSource != null && + message.hasOwnProperty("removeGovernanceSource") + ) { + if (properties.action === 1) return "action: multiple values"; + properties.action = 1; + { + var error = $root.google.protobuf.Empty.verify( + message.removeGovernanceSource, + ); + if (error) return "removeGovernanceSource." + error; + } + } + return null; + }; + + /** + * Creates an UpdateGovernanceSource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.UpdateGovernanceSource + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.UpdateGovernanceSource} UpdateGovernanceSource + */ + UpdateGovernanceSource.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.UpdateGovernanceSource) + return object; + var message = new $root.pyth_lazer_transaction.UpdateGovernanceSource(); + if (object.source != null) { + if (typeof object.source !== "object") + throw TypeError( + ".pyth_lazer_transaction.UpdateGovernanceSource.source: object expected", + ); + message.source = + $root.pyth_lazer_transaction.GovernanceSource.fromObject( + object.source, + ); + } + if (object.setGovernanceSourcePermissions != null) { + if (typeof object.setGovernanceSourcePermissions !== "object") + throw TypeError( + ".pyth_lazer_transaction.UpdateGovernanceSource.setGovernanceSourcePermissions: object expected", + ); + message.setGovernanceSourcePermissions = + $root.pyth_lazer_transaction.SetGovernanceSourcePermissions.fromObject( + object.setGovernanceSourcePermissions, + ); + } + if (object.removeGovernanceSource != null) { + if (typeof object.removeGovernanceSource !== "object") + throw TypeError( + ".pyth_lazer_transaction.UpdateGovernanceSource.removeGovernanceSource: object expected", + ); + message.removeGovernanceSource = $root.google.protobuf.Empty.fromObject( + object.removeGovernanceSource, + ); + } + return message; + }; + + /** + * Creates a plain object from an UpdateGovernanceSource message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.UpdateGovernanceSource + * @static + * @param {pyth_lazer_transaction.UpdateGovernanceSource} message UpdateGovernanceSource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateGovernanceSource.toObject = function toObject(message, options) { + if (!options) options = {}; + var object = {}; + if (message.source != null && message.hasOwnProperty("source")) { + object.source = $root.pyth_lazer_transaction.GovernanceSource.toObject( + message.source, + options, + ); + if (options.oneofs) object._source = "source"; + } + if ( + message.setGovernanceSourcePermissions != null && + message.hasOwnProperty("setGovernanceSourcePermissions") + ) { + object.setGovernanceSourcePermissions = + $root.pyth_lazer_transaction.SetGovernanceSourcePermissions.toObject( + message.setGovernanceSourcePermissions, + options, + ); + if (options.oneofs) object.action = "setGovernanceSourcePermissions"; + } + if ( + message.removeGovernanceSource != null && + message.hasOwnProperty("removeGovernanceSource") + ) { + object.removeGovernanceSource = $root.google.protobuf.Empty.toObject( + message.removeGovernanceSource, + options, + ); + if (options.oneofs) object.action = "removeGovernanceSource"; + } + return object; + }; + + /** + * Converts this UpdateGovernanceSource to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.UpdateGovernanceSource + * @instance + * @returns {Object.} JSON object + */ + UpdateGovernanceSource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateGovernanceSource + * @function getTypeUrl + * @memberof pyth_lazer_transaction.UpdateGovernanceSource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateGovernanceSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.UpdateGovernanceSource"; + }; + + return UpdateGovernanceSource; + })(); + + pyth_lazer_transaction.SetGovernanceSourcePermissions = (function () { + /** + * Properties of a SetGovernanceSourcePermissions. + * @memberof pyth_lazer_transaction + * @interface ISetGovernanceSourcePermissions + * @property {pyth_lazer_transaction.IPermissions|null} [permissions] SetGovernanceSourcePermissions permissions + */ + + /** + * Constructs a new SetGovernanceSourcePermissions. + * @memberof pyth_lazer_transaction + * @classdesc Represents a SetGovernanceSourcePermissions. + * @implements ISetGovernanceSourcePermissions + * @constructor + * @param {pyth_lazer_transaction.ISetGovernanceSourcePermissions=} [properties] Properties to set + */ + function SetGovernanceSourcePermissions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + } + + /** + * SetGovernanceSourcePermissions permissions. + * @member {pyth_lazer_transaction.IPermissions|null|undefined} permissions + * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions + * @instance + */ + SetGovernanceSourcePermissions.prototype.permissions = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SetGovernanceSourcePermissions _permissions. + * @member {"permissions"|undefined} _permissions + * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions + * @instance + */ + Object.defineProperty( + SetGovernanceSourcePermissions.prototype, + "_permissions", + { + get: $util.oneOfGetter(($oneOfFields = ["permissions"])), + set: $util.oneOfSetter($oneOfFields), + }, + ); + + /** + * Creates a new SetGovernanceSourcePermissions instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions + * @static + * @param {pyth_lazer_transaction.ISetGovernanceSourcePermissions=} [properties] Properties to set + * @returns {pyth_lazer_transaction.SetGovernanceSourcePermissions} SetGovernanceSourcePermissions instance + */ + SetGovernanceSourcePermissions.create = function create(properties) { + return new SetGovernanceSourcePermissions(properties); + }; + + /** + * Encodes the specified SetGovernanceSourcePermissions message. Does not implicitly {@link pyth_lazer_transaction.SetGovernanceSourcePermissions.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions + * @static + * @param {pyth_lazer_transaction.ISetGovernanceSourcePermissions} message SetGovernanceSourcePermissions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetGovernanceSourcePermissions.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if ( + message.permissions != null && + Object.hasOwnProperty.call(message, "permissions") + ) + $root.pyth_lazer_transaction.Permissions.encode( + message.permissions, + writer.uint32(/* id 1, wireType 2 =*/ 10).fork(), + ).ldelim(); + return writer; + }; + + /** + * Encodes the specified SetGovernanceSourcePermissions message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetGovernanceSourcePermissions.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions + * @static + * @param {pyth_lazer_transaction.ISetGovernanceSourcePermissions} message SetGovernanceSourcePermissions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetGovernanceSourcePermissions.encodeDelimited = function encodeDelimited( + message, + writer, + ) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetGovernanceSourcePermissions message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.SetGovernanceSourcePermissions} SetGovernanceSourcePermissions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetGovernanceSourcePermissions.decode = function decode( + reader, + length, + error, + ) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, + message = + new $root.pyth_lazer_transaction.SetGovernanceSourcePermissions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.permissions = + $root.pyth_lazer_transaction.Permissions.decode( + reader, + reader.uint32(), + ); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetGovernanceSourcePermissions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.SetGovernanceSourcePermissions} SetGovernanceSourcePermissions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetGovernanceSourcePermissions.decodeDelimited = function decodeDelimited( + reader, + ) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetGovernanceSourcePermissions message. + * @function verify + * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetGovernanceSourcePermissions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if ( + message.permissions != null && + message.hasOwnProperty("permissions") + ) { + properties._permissions = 1; + { + var error = $root.pyth_lazer_transaction.Permissions.verify( + message.permissions, + ); + if (error) return "permissions." + error; + } + } + return null; + }; + + /** + * Creates a SetGovernanceSourcePermissions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.SetGovernanceSourcePermissions} SetGovernanceSourcePermissions + */ + SetGovernanceSourcePermissions.fromObject = function fromObject(object) { + if ( + object instanceof + $root.pyth_lazer_transaction.SetGovernanceSourcePermissions + ) + return object; + var message = + new $root.pyth_lazer_transaction.SetGovernanceSourcePermissions(); + if (object.permissions != null) { + if (typeof object.permissions !== "object") + throw TypeError( + ".pyth_lazer_transaction.SetGovernanceSourcePermissions.permissions: object expected", + ); + message.permissions = + $root.pyth_lazer_transaction.Permissions.fromObject( + object.permissions, + ); + } + return message; + }; + + /** + * Creates a plain object from a SetGovernanceSourcePermissions message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions + * @static + * @param {pyth_lazer_transaction.SetGovernanceSourcePermissions} message SetGovernanceSourcePermissions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetGovernanceSourcePermissions.toObject = function toObject( + message, + options, + ) { + if (!options) options = {}; + var object = {}; + if ( + message.permissions != null && + message.hasOwnProperty("permissions") + ) { + object.permissions = $root.pyth_lazer_transaction.Permissions.toObject( + message.permissions, + options, + ); + if (options.oneofs) object._permissions = "permissions"; + } + return object; + }; + + /** + * Converts this SetGovernanceSourcePermissions to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions + * @instance + * @returns {Object.} JSON object + */ + SetGovernanceSourcePermissions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetGovernanceSourcePermissions + * @function getTypeUrl + * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetGovernanceSourcePermissions.getTypeUrl = function getTypeUrl( + typeUrlPrefix, + ) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return ( + typeUrlPrefix + "/pyth_lazer_transaction.SetGovernanceSourcePermissions" + ); + }; + + return SetGovernanceSourcePermissions; + })(); + + pyth_lazer_transaction.SetShardName = (function () { + /** + * Properties of a SetShardName. + * @memberof pyth_lazer_transaction + * @interface ISetShardName + * @property {string|null} [shardName] SetShardName shardName + */ + + /** + * Constructs a new SetShardName. + * @memberof pyth_lazer_transaction + * @classdesc Represents a SetShardName. + * @implements ISetShardName + * @constructor + * @param {pyth_lazer_transaction.ISetShardName=} [properties] Properties to set + */ + function SetShardName(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + } + + /** + * SetShardName shardName. + * @member {string|null|undefined} shardName + * @memberof pyth_lazer_transaction.SetShardName + * @instance + */ + SetShardName.prototype.shardName = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SetShardName _shardName. + * @member {"shardName"|undefined} _shardName + * @memberof pyth_lazer_transaction.SetShardName + * @instance + */ + Object.defineProperty(SetShardName.prototype, "_shardName", { + get: $util.oneOfGetter(($oneOfFields = ["shardName"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Creates a new SetShardName instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.SetShardName + * @static + * @param {pyth_lazer_transaction.ISetShardName=} [properties] Properties to set + * @returns {pyth_lazer_transaction.SetShardName} SetShardName instance + */ + SetShardName.create = function create(properties) { + return new SetShardName(properties); + }; + + /** + * Encodes the specified SetShardName message. Does not implicitly {@link pyth_lazer_transaction.SetShardName.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.SetShardName + * @static + * @param {pyth_lazer_transaction.ISetShardName} message SetShardName message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetShardName.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if ( + message.shardName != null && + Object.hasOwnProperty.call(message, "shardName") + ) + writer.uint32(/* id 1, wireType 2 =*/ 10).string(message.shardName); + return writer; + }; + + /** + * Encodes the specified SetShardName message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetShardName.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.SetShardName + * @static + * @param {pyth_lazer_transaction.ISetShardName} message SetShardName message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetShardName.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetShardName message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.SetShardName + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.SetShardName} SetShardName + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetShardName.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pyth_lazer_transaction.SetShardName(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.shardName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetShardName message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.SetShardName + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.SetShardName} SetShardName + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetShardName.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetShardName message. + * @function verify + * @memberof pyth_lazer_transaction.SetShardName + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetShardName.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.shardName != null && message.hasOwnProperty("shardName")) { + properties._shardName = 1; + if (!$util.isString(message.shardName)) + return "shardName: string expected"; + } + return null; + }; + + /** + * Creates a SetShardName message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.SetShardName + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.SetShardName} SetShardName + */ + SetShardName.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.SetShardName) + return object; + var message = new $root.pyth_lazer_transaction.SetShardName(); + if (object.shardName != null) + message.shardName = String(object.shardName); + return message; + }; + + /** + * Creates a plain object from a SetShardName message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.SetShardName + * @static + * @param {pyth_lazer_transaction.SetShardName} message SetShardName + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetShardName.toObject = function toObject(message, options) { + if (!options) options = {}; + var object = {}; + if (message.shardName != null && message.hasOwnProperty("shardName")) { + object.shardName = message.shardName; + if (options.oneofs) object._shardName = "shardName"; + } + return object; + }; + + /** + * Converts this SetShardName to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.SetShardName + * @instance + * @returns {Object.} JSON object + */ + SetShardName.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetShardName + * @function getTypeUrl + * @memberof pyth_lazer_transaction.SetShardName + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetShardName.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.SetShardName"; + }; + + return SetShardName; + })(); + + pyth_lazer_transaction.SetShardGroup = (function () { + /** + * Properties of a SetShardGroup. + * @memberof pyth_lazer_transaction + * @interface ISetShardGroup + * @property {string|null} [shardGroup] SetShardGroup shardGroup + */ + + /** + * Constructs a new SetShardGroup. + * @memberof pyth_lazer_transaction + * @classdesc Represents a SetShardGroup. + * @implements ISetShardGroup + * @constructor + * @param {pyth_lazer_transaction.ISetShardGroup=} [properties] Properties to set + */ + function SetShardGroup(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + } + + /** + * SetShardGroup shardGroup. + * @member {string|null|undefined} shardGroup + * @memberof pyth_lazer_transaction.SetShardGroup + * @instance + */ + SetShardGroup.prototype.shardGroup = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SetShardGroup _shardGroup. + * @member {"shardGroup"|undefined} _shardGroup + * @memberof pyth_lazer_transaction.SetShardGroup + * @instance + */ + Object.defineProperty(SetShardGroup.prototype, "_shardGroup", { + get: $util.oneOfGetter(($oneOfFields = ["shardGroup"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Creates a new SetShardGroup instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.SetShardGroup + * @static + * @param {pyth_lazer_transaction.ISetShardGroup=} [properties] Properties to set + * @returns {pyth_lazer_transaction.SetShardGroup} SetShardGroup instance + */ + SetShardGroup.create = function create(properties) { + return new SetShardGroup(properties); + }; + + /** + * Encodes the specified SetShardGroup message. Does not implicitly {@link pyth_lazer_transaction.SetShardGroup.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.SetShardGroup + * @static + * @param {pyth_lazer_transaction.ISetShardGroup} message SetShardGroup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetShardGroup.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if ( + message.shardGroup != null && + Object.hasOwnProperty.call(message, "shardGroup") + ) + writer.uint32(/* id 1, wireType 2 =*/ 10).string(message.shardGroup); + return writer; + }; + + /** + * Encodes the specified SetShardGroup message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetShardGroup.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.SetShardGroup + * @static + * @param {pyth_lazer_transaction.ISetShardGroup} message SetShardGroup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetShardGroup.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetShardGroup message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.SetShardGroup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.SetShardGroup} SetShardGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetShardGroup.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pyth_lazer_transaction.SetShardGroup(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.shardGroup = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetShardGroup message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.SetShardGroup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.SetShardGroup} SetShardGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetShardGroup.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetShardGroup message. + * @function verify + * @memberof pyth_lazer_transaction.SetShardGroup + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetShardGroup.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.shardGroup != null && message.hasOwnProperty("shardGroup")) { + properties._shardGroup = 1; + if (!$util.isString(message.shardGroup)) + return "shardGroup: string expected"; + } + return null; + }; + + /** + * Creates a SetShardGroup message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.SetShardGroup + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.SetShardGroup} SetShardGroup + */ + SetShardGroup.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.SetShardGroup) + return object; + var message = new $root.pyth_lazer_transaction.SetShardGroup(); + if (object.shardGroup != null) + message.shardGroup = String(object.shardGroup); + return message; + }; + + /** + * Creates a plain object from a SetShardGroup message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.SetShardGroup + * @static + * @param {pyth_lazer_transaction.SetShardGroup} message SetShardGroup + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetShardGroup.toObject = function toObject(message, options) { + if (!options) options = {}; + var object = {}; + if (message.shardGroup != null && message.hasOwnProperty("shardGroup")) { + object.shardGroup = message.shardGroup; + if (options.oneofs) object._shardGroup = "shardGroup"; + } + return object; + }; + + /** + * Converts this SetShardGroup to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.SetShardGroup + * @instance + * @returns {Object.} JSON object + */ + SetShardGroup.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetShardGroup + * @function getTypeUrl + * @memberof pyth_lazer_transaction.SetShardGroup + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetShardGroup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.SetShardGroup"; + }; + + return SetShardGroup; + })(); + + pyth_lazer_transaction.ResetLastSequenceNo = (function () { + /** + * Properties of a ResetLastSequenceNo. + * @memberof pyth_lazer_transaction + * @interface IResetLastSequenceNo + * @property {number|Long|null} [lastSequenceNo] ResetLastSequenceNo lastSequenceNo + */ + + /** + * Constructs a new ResetLastSequenceNo. + * @memberof pyth_lazer_transaction + * @classdesc Represents a ResetLastSequenceNo. + * @implements IResetLastSequenceNo + * @constructor + * @param {pyth_lazer_transaction.IResetLastSequenceNo=} [properties] Properties to set + */ + function ResetLastSequenceNo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + } + + /** + * ResetLastSequenceNo lastSequenceNo. + * @member {number|Long|null|undefined} lastSequenceNo + * @memberof pyth_lazer_transaction.ResetLastSequenceNo + * @instance + */ + ResetLastSequenceNo.prototype.lastSequenceNo = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ResetLastSequenceNo _lastSequenceNo. + * @member {"lastSequenceNo"|undefined} _lastSequenceNo + * @memberof pyth_lazer_transaction.ResetLastSequenceNo + * @instance + */ + Object.defineProperty(ResetLastSequenceNo.prototype, "_lastSequenceNo", { + get: $util.oneOfGetter(($oneOfFields = ["lastSequenceNo"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Creates a new ResetLastSequenceNo instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.ResetLastSequenceNo + * @static + * @param {pyth_lazer_transaction.IResetLastSequenceNo=} [properties] Properties to set + * @returns {pyth_lazer_transaction.ResetLastSequenceNo} ResetLastSequenceNo instance + */ + ResetLastSequenceNo.create = function create(properties) { + return new ResetLastSequenceNo(properties); + }; + + /** + * Encodes the specified ResetLastSequenceNo message. Does not implicitly {@link pyth_lazer_transaction.ResetLastSequenceNo.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.ResetLastSequenceNo + * @static + * @param {pyth_lazer_transaction.IResetLastSequenceNo} message ResetLastSequenceNo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResetLastSequenceNo.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if ( + message.lastSequenceNo != null && + Object.hasOwnProperty.call(message, "lastSequenceNo") + ) + writer.uint32(/* id 1, wireType 0 =*/ 8).uint64(message.lastSequenceNo); + return writer; + }; + + /** + * Encodes the specified ResetLastSequenceNo message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ResetLastSequenceNo.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.ResetLastSequenceNo + * @static + * @param {pyth_lazer_transaction.IResetLastSequenceNo} message ResetLastSequenceNo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResetLastSequenceNo.encodeDelimited = function encodeDelimited( + message, + writer, + ) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResetLastSequenceNo message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.ResetLastSequenceNo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.ResetLastSequenceNo} ResetLastSequenceNo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResetLastSequenceNo.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pyth_lazer_transaction.ResetLastSequenceNo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.lastSequenceNo = reader.uint64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResetLastSequenceNo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.ResetLastSequenceNo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.ResetLastSequenceNo} ResetLastSequenceNo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResetLastSequenceNo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResetLastSequenceNo message. + * @function verify + * @memberof pyth_lazer_transaction.ResetLastSequenceNo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResetLastSequenceNo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if ( + message.lastSequenceNo != null && + message.hasOwnProperty("lastSequenceNo") + ) { + properties._lastSequenceNo = 1; + if ( + !$util.isInteger(message.lastSequenceNo) && + !( + message.lastSequenceNo && + $util.isInteger(message.lastSequenceNo.low) && + $util.isInteger(message.lastSequenceNo.high) + ) + ) + return "lastSequenceNo: integer|Long expected"; + } + return null; + }; + + /** + * Creates a ResetLastSequenceNo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.ResetLastSequenceNo + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.ResetLastSequenceNo} ResetLastSequenceNo + */ + ResetLastSequenceNo.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.ResetLastSequenceNo) + return object; + var message = new $root.pyth_lazer_transaction.ResetLastSequenceNo(); + if (object.lastSequenceNo != null) + if ($util.Long) + (message.lastSequenceNo = $util.Long.fromValue( + object.lastSequenceNo, + )).unsigned = true; + else if (typeof object.lastSequenceNo === "string") + message.lastSequenceNo = parseInt(object.lastSequenceNo, 10); + else if (typeof object.lastSequenceNo === "number") + message.lastSequenceNo = object.lastSequenceNo; + else if (typeof object.lastSequenceNo === "object") + message.lastSequenceNo = new $util.LongBits( + object.lastSequenceNo.low >>> 0, + object.lastSequenceNo.high >>> 0, + ).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a ResetLastSequenceNo message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.ResetLastSequenceNo + * @static + * @param {pyth_lazer_transaction.ResetLastSequenceNo} message ResetLastSequenceNo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResetLastSequenceNo.toObject = function toObject(message, options) { + if (!options) options = {}; + var object = {}; + if ( + message.lastSequenceNo != null && + message.hasOwnProperty("lastSequenceNo") + ) { + if (typeof message.lastSequenceNo === "number") + object.lastSequenceNo = + options.longs === String + ? String(message.lastSequenceNo) + : message.lastSequenceNo; + else + object.lastSequenceNo = + options.longs === String + ? $util.Long.prototype.toString.call(message.lastSequenceNo) + : options.longs === Number + ? new $util.LongBits( + message.lastSequenceNo.low >>> 0, + message.lastSequenceNo.high >>> 0, + ).toNumber(true) + : message.lastSequenceNo; + if (options.oneofs) object._lastSequenceNo = "lastSequenceNo"; + } + return object; + }; + + /** + * Converts this ResetLastSequenceNo to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.ResetLastSequenceNo + * @instance + * @returns {Object.} JSON object + */ + ResetLastSequenceNo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResetLastSequenceNo + * @function getTypeUrl + * @memberof pyth_lazer_transaction.ResetLastSequenceNo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResetLastSequenceNo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.ResetLastSequenceNo"; + }; + + return ResetLastSequenceNo; + })(); + + pyth_lazer_transaction.AddPublisher = (function () { + /** + * Properties of an AddPublisher. + * @memberof pyth_lazer_transaction + * @interface IAddPublisher + * @property {number|null} [publisherId] AddPublisher publisherId + * @property {string|null} [name] AddPublisher name + * @property {Array.|null} [publicKeys] AddPublisher publicKeys + * @property {boolean|null} [isActive] AddPublisher isActive + */ + + /** + * Constructs a new AddPublisher. + * @memberof pyth_lazer_transaction + * @classdesc Represents an AddPublisher. + * @implements IAddPublisher + * @constructor + * @param {pyth_lazer_transaction.IAddPublisher=} [properties] Properties to set + */ + function AddPublisher(properties) { + this.publicKeys = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + } + + /** + * AddPublisher publisherId. + * @member {number|null|undefined} publisherId + * @memberof pyth_lazer_transaction.AddPublisher + * @instance + */ + AddPublisher.prototype.publisherId = null; + + /** + * AddPublisher name. + * @member {string|null|undefined} name + * @memberof pyth_lazer_transaction.AddPublisher + * @instance + */ + AddPublisher.prototype.name = null; + + /** + * AddPublisher publicKeys. + * @member {Array.} publicKeys + * @memberof pyth_lazer_transaction.AddPublisher + * @instance + */ + AddPublisher.prototype.publicKeys = $util.emptyArray; + + /** + * AddPublisher isActive. + * @member {boolean|null|undefined} isActive + * @memberof pyth_lazer_transaction.AddPublisher + * @instance + */ + AddPublisher.prototype.isActive = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AddPublisher _publisherId. + * @member {"publisherId"|undefined} _publisherId + * @memberof pyth_lazer_transaction.AddPublisher + * @instance + */ + Object.defineProperty(AddPublisher.prototype, "_publisherId", { + get: $util.oneOfGetter(($oneOfFields = ["publisherId"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * AddPublisher _name. + * @member {"name"|undefined} _name + * @memberof pyth_lazer_transaction.AddPublisher + * @instance + */ + Object.defineProperty(AddPublisher.prototype, "_name", { + get: $util.oneOfGetter(($oneOfFields = ["name"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * AddPublisher _isActive. + * @member {"isActive"|undefined} _isActive + * @memberof pyth_lazer_transaction.AddPublisher + * @instance + */ + Object.defineProperty(AddPublisher.prototype, "_isActive", { + get: $util.oneOfGetter(($oneOfFields = ["isActive"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Creates a new AddPublisher instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.AddPublisher + * @static + * @param {pyth_lazer_transaction.IAddPublisher=} [properties] Properties to set + * @returns {pyth_lazer_transaction.AddPublisher} AddPublisher instance + */ + AddPublisher.create = function create(properties) { + return new AddPublisher(properties); + }; + + /** + * Encodes the specified AddPublisher message. Does not implicitly {@link pyth_lazer_transaction.AddPublisher.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.AddPublisher + * @static + * @param {pyth_lazer_transaction.IAddPublisher} message AddPublisher message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddPublisher.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if ( + message.publisherId != null && + Object.hasOwnProperty.call(message, "publisherId") + ) + writer.uint32(/* id 1, wireType 0 =*/ 8).uint32(message.publisherId); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 2, wireType 2 =*/ 18).string(message.name); + if (message.publicKeys != null && message.publicKeys.length) + for (var i = 0; i < message.publicKeys.length; ++i) + writer + .uint32(/* id 3, wireType 2 =*/ 26) + .bytes(message.publicKeys[i]); + if ( + message.isActive != null && + Object.hasOwnProperty.call(message, "isActive") + ) + writer.uint32(/* id 4, wireType 0 =*/ 32).bool(message.isActive); + return writer; + }; + + /** + * Encodes the specified AddPublisher message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddPublisher.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.AddPublisher + * @static + * @param {pyth_lazer_transaction.IAddPublisher} message AddPublisher message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddPublisher.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AddPublisher message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.AddPublisher + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.AddPublisher} AddPublisher + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddPublisher.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pyth_lazer_transaction.AddPublisher(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.publisherId = reader.uint32(); + break; + } + case 2: { + message.name = reader.string(); + break; + } + case 3: { + if (!(message.publicKeys && message.publicKeys.length)) + message.publicKeys = []; + message.publicKeys.push(reader.bytes()); + break; + } + case 4: { + message.isActive = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AddPublisher message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.AddPublisher + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.AddPublisher} AddPublisher + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddPublisher.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AddPublisher message. + * @function verify + * @memberof pyth_lazer_transaction.AddPublisher + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AddPublisher.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if ( + message.publisherId != null && + message.hasOwnProperty("publisherId") + ) { + properties._publisherId = 1; + if (!$util.isInteger(message.publisherId)) + return "publisherId: integer expected"; + } + if (message.name != null && message.hasOwnProperty("name")) { + properties._name = 1; + if (!$util.isString(message.name)) return "name: string expected"; + } + if (message.publicKeys != null && message.hasOwnProperty("publicKeys")) { + if (!Array.isArray(message.publicKeys)) + return "publicKeys: array expected"; + for (var i = 0; i < message.publicKeys.length; ++i) + if ( + !( + (message.publicKeys[i] && + typeof message.publicKeys[i].length === "number") || + $util.isString(message.publicKeys[i]) + ) + ) + return "publicKeys: buffer[] expected"; + } + if (message.isActive != null && message.hasOwnProperty("isActive")) { + properties._isActive = 1; + if (typeof message.isActive !== "boolean") + return "isActive: boolean expected"; + } + return null; + }; + + /** + * Creates an AddPublisher message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.AddPublisher + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.AddPublisher} AddPublisher + */ + AddPublisher.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.AddPublisher) + return object; + var message = new $root.pyth_lazer_transaction.AddPublisher(); + if (object.publisherId != null) + message.publisherId = object.publisherId >>> 0; + if (object.name != null) message.name = String(object.name); + if (object.publicKeys) { + if (!Array.isArray(object.publicKeys)) + throw TypeError( + ".pyth_lazer_transaction.AddPublisher.publicKeys: array expected", + ); + message.publicKeys = []; + for (var i = 0; i < object.publicKeys.length; ++i) + if (typeof object.publicKeys[i] === "string") + $util.base64.decode( + object.publicKeys[i], + (message.publicKeys[i] = $util.newBuffer( + $util.base64.length(object.publicKeys[i]), + )), + 0, + ); + else if (object.publicKeys[i].length >= 0) + message.publicKeys[i] = object.publicKeys[i]; + } + if (object.isActive != null) message.isActive = Boolean(object.isActive); + return message; + }; + + /** + * Creates a plain object from an AddPublisher message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.AddPublisher + * @static + * @param {pyth_lazer_transaction.AddPublisher} message AddPublisher + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AddPublisher.toObject = function toObject(message, options) { + if (!options) options = {}; + var object = {}; + if (options.arrays || options.defaults) object.publicKeys = []; + if ( + message.publisherId != null && + message.hasOwnProperty("publisherId") + ) { + object.publisherId = message.publisherId; + if (options.oneofs) object._publisherId = "publisherId"; + } + if (message.name != null && message.hasOwnProperty("name")) { + object.name = message.name; + if (options.oneofs) object._name = "name"; + } + if (message.publicKeys && message.publicKeys.length) { + object.publicKeys = []; + for (var j = 0; j < message.publicKeys.length; ++j) + object.publicKeys[j] = + options.bytes === String + ? $util.base64.encode( + message.publicKeys[j], + 0, + message.publicKeys[j].length, + ) + : options.bytes === Array + ? Array.prototype.slice.call(message.publicKeys[j]) + : message.publicKeys[j]; + } + if (message.isActive != null && message.hasOwnProperty("isActive")) { + object.isActive = message.isActive; + if (options.oneofs) object._isActive = "isActive"; + } + return object; + }; + + /** + * Converts this AddPublisher to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.AddPublisher + * @instance + * @returns {Object.} JSON object + */ + AddPublisher.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AddPublisher + * @function getTypeUrl + * @memberof pyth_lazer_transaction.AddPublisher + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AddPublisher.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.AddPublisher"; + }; + + return AddPublisher; + })(); + + pyth_lazer_transaction.UpdatePublisher = (function () { + /** + * Properties of an UpdatePublisher. + * @memberof pyth_lazer_transaction + * @interface IUpdatePublisher + * @property {number|null} [publisherId] UpdatePublisher publisherId + * @property {pyth_lazer_transaction.ISetPublisherName|null} [setPublisherName] UpdatePublisher setPublisherName + * @property {pyth_lazer_transaction.IAddPublisherPublicKeys|null} [addPublisherPublicKeys] UpdatePublisher addPublisherPublicKeys + * @property {pyth_lazer_transaction.IRemovePublisherPublicKeys|null} [removePublisherPublicKeys] UpdatePublisher removePublisherPublicKeys + * @property {pyth_lazer_transaction.ISetPublisherPublicKeys|null} [setPublisherPublicKeys] UpdatePublisher setPublisherPublicKeys + * @property {pyth_lazer_transaction.ISetPublisherActive|null} [setPublisherActive] UpdatePublisher setPublisherActive + * @property {google.protobuf.IEmpty|null} [removePublisher] UpdatePublisher removePublisher + */ + + /** + * Constructs a new UpdatePublisher. + * @memberof pyth_lazer_transaction + * @classdesc Represents an UpdatePublisher. + * @implements IUpdatePublisher + * @constructor + * @param {pyth_lazer_transaction.IUpdatePublisher=} [properties] Properties to set + */ + function UpdatePublisher(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdatePublisher publisherId. + * @member {number|null|undefined} publisherId + * @memberof pyth_lazer_transaction.UpdatePublisher + * @instance + */ + UpdatePublisher.prototype.publisherId = null; + + /** + * UpdatePublisher setPublisherName. + * @member {pyth_lazer_transaction.ISetPublisherName|null|undefined} setPublisherName + * @memberof pyth_lazer_transaction.UpdatePublisher + * @instance + */ + UpdatePublisher.prototype.setPublisherName = null; + + /** + * UpdatePublisher addPublisherPublicKeys. + * @member {pyth_lazer_transaction.IAddPublisherPublicKeys|null|undefined} addPublisherPublicKeys + * @memberof pyth_lazer_transaction.UpdatePublisher + * @instance + */ + UpdatePublisher.prototype.addPublisherPublicKeys = null; + + /** + * UpdatePublisher removePublisherPublicKeys. + * @member {pyth_lazer_transaction.IRemovePublisherPublicKeys|null|undefined} removePublisherPublicKeys + * @memberof pyth_lazer_transaction.UpdatePublisher + * @instance + */ + UpdatePublisher.prototype.removePublisherPublicKeys = null; + + /** + * UpdatePublisher setPublisherPublicKeys. + * @member {pyth_lazer_transaction.ISetPublisherPublicKeys|null|undefined} setPublisherPublicKeys + * @memberof pyth_lazer_transaction.UpdatePublisher + * @instance + */ + UpdatePublisher.prototype.setPublisherPublicKeys = null; + + /** + * UpdatePublisher setPublisherActive. + * @member {pyth_lazer_transaction.ISetPublisherActive|null|undefined} setPublisherActive + * @memberof pyth_lazer_transaction.UpdatePublisher + * @instance + */ + UpdatePublisher.prototype.setPublisherActive = null; + + /** + * UpdatePublisher removePublisher. + * @member {google.protobuf.IEmpty|null|undefined} removePublisher + * @memberof pyth_lazer_transaction.UpdatePublisher + * @instance + */ + UpdatePublisher.prototype.removePublisher = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * UpdatePublisher _publisherId. + * @member {"publisherId"|undefined} _publisherId + * @memberof pyth_lazer_transaction.UpdatePublisher + * @instance + */ + Object.defineProperty(UpdatePublisher.prototype, "_publisherId", { + get: $util.oneOfGetter(($oneOfFields = ["publisherId"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * UpdatePublisher action. + * @member {"setPublisherName"|"addPublisherPublicKeys"|"removePublisherPublicKeys"|"setPublisherPublicKeys"|"setPublisherActive"|"removePublisher"|undefined} action + * @memberof pyth_lazer_transaction.UpdatePublisher + * @instance + */ + Object.defineProperty(UpdatePublisher.prototype, "action", { + get: $util.oneOfGetter( + ($oneOfFields = [ + "setPublisherName", + "addPublisherPublicKeys", + "removePublisherPublicKeys", + "setPublisherPublicKeys", + "setPublisherActive", + "removePublisher", + ]), + ), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Creates a new UpdatePublisher instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.UpdatePublisher + * @static + * @param {pyth_lazer_transaction.IUpdatePublisher=} [properties] Properties to set + * @returns {pyth_lazer_transaction.UpdatePublisher} UpdatePublisher instance + */ + UpdatePublisher.create = function create(properties) { + return new UpdatePublisher(properties); + }; + + /** + * Encodes the specified UpdatePublisher message. Does not implicitly {@link pyth_lazer_transaction.UpdatePublisher.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.UpdatePublisher + * @static + * @param {pyth_lazer_transaction.IUpdatePublisher} message UpdatePublisher message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdatePublisher.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if ( + message.publisherId != null && + Object.hasOwnProperty.call(message, "publisherId") + ) + writer.uint32(/* id 1, wireType 0 =*/ 8).uint32(message.publisherId); + if ( + message.setPublisherName != null && + Object.hasOwnProperty.call(message, "setPublisherName") + ) + $root.pyth_lazer_transaction.SetPublisherName.encode( + message.setPublisherName, + writer.uint32(/* id 101, wireType 2 =*/ 810).fork(), + ).ldelim(); + if ( + message.addPublisherPublicKeys != null && + Object.hasOwnProperty.call(message, "addPublisherPublicKeys") + ) + $root.pyth_lazer_transaction.AddPublisherPublicKeys.encode( + message.addPublisherPublicKeys, + writer.uint32(/* id 102, wireType 2 =*/ 818).fork(), + ).ldelim(); + if ( + message.removePublisherPublicKeys != null && + Object.hasOwnProperty.call(message, "removePublisherPublicKeys") + ) + $root.pyth_lazer_transaction.RemovePublisherPublicKeys.encode( + message.removePublisherPublicKeys, + writer.uint32(/* id 103, wireType 2 =*/ 826).fork(), + ).ldelim(); + if ( + message.setPublisherPublicKeys != null && + Object.hasOwnProperty.call(message, "setPublisherPublicKeys") + ) + $root.pyth_lazer_transaction.SetPublisherPublicKeys.encode( + message.setPublisherPublicKeys, + writer.uint32(/* id 104, wireType 2 =*/ 834).fork(), + ).ldelim(); + if ( + message.setPublisherActive != null && + Object.hasOwnProperty.call(message, "setPublisherActive") + ) + $root.pyth_lazer_transaction.SetPublisherActive.encode( + message.setPublisherActive, + writer.uint32(/* id 105, wireType 2 =*/ 842).fork(), + ).ldelim(); + if ( + message.removePublisher != null && + Object.hasOwnProperty.call(message, "removePublisher") + ) + $root.google.protobuf.Empty.encode( + message.removePublisher, + writer.uint32(/* id 199, wireType 2 =*/ 1594).fork(), + ).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdatePublisher message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdatePublisher.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.UpdatePublisher + * @static + * @param {pyth_lazer_transaction.IUpdatePublisher} message UpdatePublisher message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdatePublisher.encodeDelimited = function encodeDelimited( + message, + writer, + ) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdatePublisher message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.UpdatePublisher + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.UpdatePublisher} UpdatePublisher + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdatePublisher.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pyth_lazer_transaction.UpdatePublisher(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.publisherId = reader.uint32(); + break; + } + case 101: { + message.setPublisherName = + $root.pyth_lazer_transaction.SetPublisherName.decode( + reader, + reader.uint32(), + ); + break; + } + case 102: { + message.addPublisherPublicKeys = + $root.pyth_lazer_transaction.AddPublisherPublicKeys.decode( + reader, + reader.uint32(), + ); + break; + } + case 103: { + message.removePublisherPublicKeys = + $root.pyth_lazer_transaction.RemovePublisherPublicKeys.decode( + reader, + reader.uint32(), + ); + break; + } + case 104: { + message.setPublisherPublicKeys = + $root.pyth_lazer_transaction.SetPublisherPublicKeys.decode( + reader, + reader.uint32(), + ); + break; + } + case 105: { + message.setPublisherActive = + $root.pyth_lazer_transaction.SetPublisherActive.decode( + reader, + reader.uint32(), + ); + break; + } + case 199: { + message.removePublisher = $root.google.protobuf.Empty.decode( + reader, + reader.uint32(), + ); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdatePublisher message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.UpdatePublisher + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.UpdatePublisher} UpdatePublisher + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdatePublisher.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdatePublisher message. + * @function verify + * @memberof pyth_lazer_transaction.UpdatePublisher + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdatePublisher.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if ( + message.publisherId != null && + message.hasOwnProperty("publisherId") + ) { + properties._publisherId = 1; + if (!$util.isInteger(message.publisherId)) + return "publisherId: integer expected"; + } + if ( + message.setPublisherName != null && + message.hasOwnProperty("setPublisherName") + ) { + properties.action = 1; + { + var error = $root.pyth_lazer_transaction.SetPublisherName.verify( + message.setPublisherName, + ); + if (error) return "setPublisherName." + error; + } + } + if ( + message.addPublisherPublicKeys != null && + message.hasOwnProperty("addPublisherPublicKeys") + ) { + if (properties.action === 1) return "action: multiple values"; + properties.action = 1; + { + var error = + $root.pyth_lazer_transaction.AddPublisherPublicKeys.verify( + message.addPublisherPublicKeys, + ); + if (error) return "addPublisherPublicKeys." + error; + } + } + if ( + message.removePublisherPublicKeys != null && + message.hasOwnProperty("removePublisherPublicKeys") + ) { + if (properties.action === 1) return "action: multiple values"; + properties.action = 1; + { + var error = + $root.pyth_lazer_transaction.RemovePublisherPublicKeys.verify( + message.removePublisherPublicKeys, + ); + if (error) return "removePublisherPublicKeys." + error; + } + } + if ( + message.setPublisherPublicKeys != null && + message.hasOwnProperty("setPublisherPublicKeys") + ) { + if (properties.action === 1) return "action: multiple values"; + properties.action = 1; + { + var error = + $root.pyth_lazer_transaction.SetPublisherPublicKeys.verify( + message.setPublisherPublicKeys, + ); + if (error) return "setPublisherPublicKeys." + error; + } + } + if ( + message.setPublisherActive != null && + message.hasOwnProperty("setPublisherActive") + ) { + if (properties.action === 1) return "action: multiple values"; + properties.action = 1; + { + var error = $root.pyth_lazer_transaction.SetPublisherActive.verify( + message.setPublisherActive, + ); + if (error) return "setPublisherActive." + error; + } + } + if ( + message.removePublisher != null && + message.hasOwnProperty("removePublisher") + ) { + if (properties.action === 1) return "action: multiple values"; + properties.action = 1; + { + var error = $root.google.protobuf.Empty.verify( + message.removePublisher, + ); + if (error) return "removePublisher." + error; + } + } + return null; + }; + + /** + * Creates an UpdatePublisher message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.UpdatePublisher + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.UpdatePublisher} UpdatePublisher + */ + UpdatePublisher.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.UpdatePublisher) + return object; + var message = new $root.pyth_lazer_transaction.UpdatePublisher(); + if (object.publisherId != null) + message.publisherId = object.publisherId >>> 0; + if (object.setPublisherName != null) { + if (typeof object.setPublisherName !== "object") + throw TypeError( + ".pyth_lazer_transaction.UpdatePublisher.setPublisherName: object expected", + ); + message.setPublisherName = + $root.pyth_lazer_transaction.SetPublisherName.fromObject( + object.setPublisherName, + ); + } + if (object.addPublisherPublicKeys != null) { + if (typeof object.addPublisherPublicKeys !== "object") + throw TypeError( + ".pyth_lazer_transaction.UpdatePublisher.addPublisherPublicKeys: object expected", + ); + message.addPublisherPublicKeys = + $root.pyth_lazer_transaction.AddPublisherPublicKeys.fromObject( + object.addPublisherPublicKeys, + ); + } + if (object.removePublisherPublicKeys != null) { + if (typeof object.removePublisherPublicKeys !== "object") + throw TypeError( + ".pyth_lazer_transaction.UpdatePublisher.removePublisherPublicKeys: object expected", + ); + message.removePublisherPublicKeys = + $root.pyth_lazer_transaction.RemovePublisherPublicKeys.fromObject( + object.removePublisherPublicKeys, + ); + } + if (object.setPublisherPublicKeys != null) { + if (typeof object.setPublisherPublicKeys !== "object") + throw TypeError( + ".pyth_lazer_transaction.UpdatePublisher.setPublisherPublicKeys: object expected", + ); + message.setPublisherPublicKeys = + $root.pyth_lazer_transaction.SetPublisherPublicKeys.fromObject( + object.setPublisherPublicKeys, + ); + } + if (object.setPublisherActive != null) { + if (typeof object.setPublisherActive !== "object") + throw TypeError( + ".pyth_lazer_transaction.UpdatePublisher.setPublisherActive: object expected", + ); + message.setPublisherActive = + $root.pyth_lazer_transaction.SetPublisherActive.fromObject( + object.setPublisherActive, + ); + } + if (object.removePublisher != null) { + if (typeof object.removePublisher !== "object") + throw TypeError( + ".pyth_lazer_transaction.UpdatePublisher.removePublisher: object expected", + ); + message.removePublisher = $root.google.protobuf.Empty.fromObject( + object.removePublisher, + ); + } + return message; + }; + + /** + * Creates a plain object from an UpdatePublisher message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.UpdatePublisher + * @static + * @param {pyth_lazer_transaction.UpdatePublisher} message UpdatePublisher + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdatePublisher.toObject = function toObject(message, options) { + if (!options) options = {}; + var object = {}; + if ( + message.publisherId != null && + message.hasOwnProperty("publisherId") + ) { + object.publisherId = message.publisherId; + if (options.oneofs) object._publisherId = "publisherId"; + } + if ( + message.setPublisherName != null && + message.hasOwnProperty("setPublisherName") + ) { + object.setPublisherName = + $root.pyth_lazer_transaction.SetPublisherName.toObject( + message.setPublisherName, + options, + ); + if (options.oneofs) object.action = "setPublisherName"; + } + if ( + message.addPublisherPublicKeys != null && + message.hasOwnProperty("addPublisherPublicKeys") + ) { + object.addPublisherPublicKeys = + $root.pyth_lazer_transaction.AddPublisherPublicKeys.toObject( + message.addPublisherPublicKeys, + options, + ); + if (options.oneofs) object.action = "addPublisherPublicKeys"; + } + if ( + message.removePublisherPublicKeys != null && + message.hasOwnProperty("removePublisherPublicKeys") + ) { + object.removePublisherPublicKeys = + $root.pyth_lazer_transaction.RemovePublisherPublicKeys.toObject( + message.removePublisherPublicKeys, + options, + ); + if (options.oneofs) object.action = "removePublisherPublicKeys"; + } + if ( + message.setPublisherPublicKeys != null && + message.hasOwnProperty("setPublisherPublicKeys") + ) { + object.setPublisherPublicKeys = + $root.pyth_lazer_transaction.SetPublisherPublicKeys.toObject( + message.setPublisherPublicKeys, + options, + ); + if (options.oneofs) object.action = "setPublisherPublicKeys"; + } + if ( + message.setPublisherActive != null && + message.hasOwnProperty("setPublisherActive") + ) { + object.setPublisherActive = + $root.pyth_lazer_transaction.SetPublisherActive.toObject( + message.setPublisherActive, + options, + ); + if (options.oneofs) object.action = "setPublisherActive"; + } + if ( + message.removePublisher != null && + message.hasOwnProperty("removePublisher") + ) { + object.removePublisher = $root.google.protobuf.Empty.toObject( + message.removePublisher, + options, + ); + if (options.oneofs) object.action = "removePublisher"; + } + return object; + }; + + /** + * Converts this UpdatePublisher to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.UpdatePublisher + * @instance + * @returns {Object.} JSON object + */ + UpdatePublisher.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdatePublisher + * @function getTypeUrl + * @memberof pyth_lazer_transaction.UpdatePublisher + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdatePublisher.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.UpdatePublisher"; + }; + + return UpdatePublisher; + })(); + + pyth_lazer_transaction.SetPublisherName = (function () { + /** + * Properties of a SetPublisherName. + * @memberof pyth_lazer_transaction + * @interface ISetPublisherName + * @property {string|null} [name] SetPublisherName name + */ + + /** + * Constructs a new SetPublisherName. + * @memberof pyth_lazer_transaction + * @classdesc Represents a SetPublisherName. + * @implements ISetPublisherName + * @constructor + * @param {pyth_lazer_transaction.ISetPublisherName=} [properties] Properties to set + */ + function SetPublisherName(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + } + + /** + * SetPublisherName name. + * @member {string|null|undefined} name + * @memberof pyth_lazer_transaction.SetPublisherName + * @instance + */ + SetPublisherName.prototype.name = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SetPublisherName _name. + * @member {"name"|undefined} _name + * @memberof pyth_lazer_transaction.SetPublisherName + * @instance + */ + Object.defineProperty(SetPublisherName.prototype, "_name", { + get: $util.oneOfGetter(($oneOfFields = ["name"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Creates a new SetPublisherName instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.SetPublisherName + * @static + * @param {pyth_lazer_transaction.ISetPublisherName=} [properties] Properties to set + * @returns {pyth_lazer_transaction.SetPublisherName} SetPublisherName instance + */ + SetPublisherName.create = function create(properties) { + return new SetPublisherName(properties); + }; + + /** + * Encodes the specified SetPublisherName message. Does not implicitly {@link pyth_lazer_transaction.SetPublisherName.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.SetPublisherName + * @static + * @param {pyth_lazer_transaction.ISetPublisherName} message SetPublisherName message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetPublisherName.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); + return writer; + }; + + /** + * Encodes the specified SetPublisherName message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetPublisherName.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.SetPublisherName + * @static + * @param {pyth_lazer_transaction.ISetPublisherName} message SetPublisherName message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetPublisherName.encodeDelimited = function encodeDelimited( + message, + writer, + ) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetPublisherName message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.SetPublisherName + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.SetPublisherName} SetPublisherName + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetPublisherName.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pyth_lazer_transaction.SetPublisherName(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetPublisherName message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.SetPublisherName + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.SetPublisherName} SetPublisherName + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetPublisherName.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetPublisherName message. + * @function verify + * @memberof pyth_lazer_transaction.SetPublisherName + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetPublisherName.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) { + properties._name = 1; + if (!$util.isString(message.name)) return "name: string expected"; + } + return null; + }; + + /** + * Creates a SetPublisherName message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.SetPublisherName + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.SetPublisherName} SetPublisherName + */ + SetPublisherName.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.SetPublisherName) + return object; + var message = new $root.pyth_lazer_transaction.SetPublisherName(); + if (object.name != null) message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a SetPublisherName message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.SetPublisherName + * @static + * @param {pyth_lazer_transaction.SetPublisherName} message SetPublisherName + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetPublisherName.toObject = function toObject(message, options) { + if (!options) options = {}; + var object = {}; + if (message.name != null && message.hasOwnProperty("name")) { + object.name = message.name; + if (options.oneofs) object._name = "name"; + } + return object; + }; + + /** + * Converts this SetPublisherName to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.SetPublisherName + * @instance + * @returns {Object.} JSON object + */ + SetPublisherName.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetPublisherName + * @function getTypeUrl + * @memberof pyth_lazer_transaction.SetPublisherName + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetPublisherName.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.SetPublisherName"; + }; + + return SetPublisherName; + })(); + + pyth_lazer_transaction.AddPublisherPublicKeys = (function () { + /** + * Properties of an AddPublisherPublicKeys. + * @memberof pyth_lazer_transaction + * @interface IAddPublisherPublicKeys + * @property {Array.|null} [publicKeys] AddPublisherPublicKeys publicKeys + */ + + /** + * Constructs a new AddPublisherPublicKeys. + * @memberof pyth_lazer_transaction + * @classdesc Represents an AddPublisherPublicKeys. + * @implements IAddPublisherPublicKeys + * @constructor + * @param {pyth_lazer_transaction.IAddPublisherPublicKeys=} [properties] Properties to set + */ + function AddPublisherPublicKeys(properties) { + this.publicKeys = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + } + + /** + * AddPublisherPublicKeys publicKeys. + * @member {Array.} publicKeys + * @memberof pyth_lazer_transaction.AddPublisherPublicKeys + * @instance + */ + AddPublisherPublicKeys.prototype.publicKeys = $util.emptyArray; + + /** + * Creates a new AddPublisherPublicKeys instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.AddPublisherPublicKeys + * @static + * @param {pyth_lazer_transaction.IAddPublisherPublicKeys=} [properties] Properties to set + * @returns {pyth_lazer_transaction.AddPublisherPublicKeys} AddPublisherPublicKeys instance + */ + AddPublisherPublicKeys.create = function create(properties) { + return new AddPublisherPublicKeys(properties); + }; + + /** + * Encodes the specified AddPublisherPublicKeys message. Does not implicitly {@link pyth_lazer_transaction.AddPublisherPublicKeys.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.AddPublisherPublicKeys + * @static + * @param {pyth_lazer_transaction.IAddPublisherPublicKeys} message AddPublisherPublicKeys message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddPublisherPublicKeys.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if (message.publicKeys != null && message.publicKeys.length) + for (var i = 0; i < message.publicKeys.length; ++i) + writer + .uint32(/* id 1, wireType 2 =*/ 10) + .bytes(message.publicKeys[i]); + return writer; + }; + + /** + * Encodes the specified AddPublisherPublicKeys message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddPublisherPublicKeys.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.AddPublisherPublicKeys + * @static + * @param {pyth_lazer_transaction.IAddPublisherPublicKeys} message AddPublisherPublicKeys message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddPublisherPublicKeys.encodeDelimited = function encodeDelimited( + message, + writer, + ) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AddPublisherPublicKeys message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.AddPublisherPublicKeys + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.AddPublisherPublicKeys} AddPublisherPublicKeys + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddPublisherPublicKeys.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pyth_lazer_transaction.AddPublisherPublicKeys(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + if (!(message.publicKeys && message.publicKeys.length)) + message.publicKeys = []; + message.publicKeys.push(reader.bytes()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AddPublisherPublicKeys message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.AddPublisherPublicKeys + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.AddPublisherPublicKeys} AddPublisherPublicKeys + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddPublisherPublicKeys.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AddPublisherPublicKeys message. + * @function verify + * @memberof pyth_lazer_transaction.AddPublisherPublicKeys + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AddPublisherPublicKeys.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.publicKeys != null && message.hasOwnProperty("publicKeys")) { + if (!Array.isArray(message.publicKeys)) + return "publicKeys: array expected"; + for (var i = 0; i < message.publicKeys.length; ++i) + if ( + !( + (message.publicKeys[i] && + typeof message.publicKeys[i].length === "number") || + $util.isString(message.publicKeys[i]) + ) + ) + return "publicKeys: buffer[] expected"; + } + return null; + }; + + /** + * Creates an AddPublisherPublicKeys message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.AddPublisherPublicKeys + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.AddPublisherPublicKeys} AddPublisherPublicKeys + */ + AddPublisherPublicKeys.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.AddPublisherPublicKeys) + return object; + var message = new $root.pyth_lazer_transaction.AddPublisherPublicKeys(); + if (object.publicKeys) { + if (!Array.isArray(object.publicKeys)) + throw TypeError( + ".pyth_lazer_transaction.AddPublisherPublicKeys.publicKeys: array expected", + ); + message.publicKeys = []; + for (var i = 0; i < object.publicKeys.length; ++i) + if (typeof object.publicKeys[i] === "string") + $util.base64.decode( + object.publicKeys[i], + (message.publicKeys[i] = $util.newBuffer( + $util.base64.length(object.publicKeys[i]), + )), + 0, + ); + else if (object.publicKeys[i].length >= 0) + message.publicKeys[i] = object.publicKeys[i]; + } + return message; + }; + + /** + * Creates a plain object from an AddPublisherPublicKeys message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.AddPublisherPublicKeys + * @static + * @param {pyth_lazer_transaction.AddPublisherPublicKeys} message AddPublisherPublicKeys + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AddPublisherPublicKeys.toObject = function toObject(message, options) { + if (!options) options = {}; + var object = {}; + if (options.arrays || options.defaults) object.publicKeys = []; + if (message.publicKeys && message.publicKeys.length) { + object.publicKeys = []; + for (var j = 0; j < message.publicKeys.length; ++j) + object.publicKeys[j] = + options.bytes === String + ? $util.base64.encode( + message.publicKeys[j], + 0, + message.publicKeys[j].length, + ) + : options.bytes === Array + ? Array.prototype.slice.call(message.publicKeys[j]) + : message.publicKeys[j]; + } + return object; + }; + + /** + * Converts this AddPublisherPublicKeys to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.AddPublisherPublicKeys + * @instance + * @returns {Object.} JSON object + */ + AddPublisherPublicKeys.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AddPublisherPublicKeys + * @function getTypeUrl + * @memberof pyth_lazer_transaction.AddPublisherPublicKeys + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AddPublisherPublicKeys.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.AddPublisherPublicKeys"; + }; + + return AddPublisherPublicKeys; + })(); + + pyth_lazer_transaction.RemovePublisherPublicKeys = (function () { + /** + * Properties of a RemovePublisherPublicKeys. + * @memberof pyth_lazer_transaction + * @interface IRemovePublisherPublicKeys + * @property {Array.|null} [publicKeys] RemovePublisherPublicKeys publicKeys + */ + + /** + * Constructs a new RemovePublisherPublicKeys. + * @memberof pyth_lazer_transaction + * @classdesc Represents a RemovePublisherPublicKeys. + * @implements IRemovePublisherPublicKeys + * @constructor + * @param {pyth_lazer_transaction.IRemovePublisherPublicKeys=} [properties] Properties to set + */ + function RemovePublisherPublicKeys(properties) { + this.publicKeys = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + } + + /** + * RemovePublisherPublicKeys publicKeys. + * @member {Array.} publicKeys + * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys + * @instance + */ + RemovePublisherPublicKeys.prototype.publicKeys = $util.emptyArray; + + /** + * Creates a new RemovePublisherPublicKeys instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys + * @static + * @param {pyth_lazer_transaction.IRemovePublisherPublicKeys=} [properties] Properties to set + * @returns {pyth_lazer_transaction.RemovePublisherPublicKeys} RemovePublisherPublicKeys instance + */ + RemovePublisherPublicKeys.create = function create(properties) { + return new RemovePublisherPublicKeys(properties); + }; + + /** + * Encodes the specified RemovePublisherPublicKeys message. Does not implicitly {@link pyth_lazer_transaction.RemovePublisherPublicKeys.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys + * @static + * @param {pyth_lazer_transaction.IRemovePublisherPublicKeys} message RemovePublisherPublicKeys message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemovePublisherPublicKeys.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if (message.publicKeys != null && message.publicKeys.length) + for (var i = 0; i < message.publicKeys.length; ++i) + writer + .uint32(/* id 1, wireType 2 =*/ 10) + .bytes(message.publicKeys[i]); + return writer; + }; + + /** + * Encodes the specified RemovePublisherPublicKeys message, length delimited. Does not implicitly {@link pyth_lazer_transaction.RemovePublisherPublicKeys.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys + * @static + * @param {pyth_lazer_transaction.IRemovePublisherPublicKeys} message RemovePublisherPublicKeys message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemovePublisherPublicKeys.encodeDelimited = function encodeDelimited( + message, + writer, + ) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RemovePublisherPublicKeys message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.RemovePublisherPublicKeys} RemovePublisherPublicKeys + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemovePublisherPublicKeys.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pyth_lazer_transaction.RemovePublisherPublicKeys(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + if (!(message.publicKeys && message.publicKeys.length)) + message.publicKeys = []; + message.publicKeys.push(reader.bytes()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RemovePublisherPublicKeys message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.RemovePublisherPublicKeys} RemovePublisherPublicKeys + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemovePublisherPublicKeys.decodeDelimited = function decodeDelimited( + reader, + ) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RemovePublisherPublicKeys message. + * @function verify + * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RemovePublisherPublicKeys.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.publicKeys != null && message.hasOwnProperty("publicKeys")) { + if (!Array.isArray(message.publicKeys)) + return "publicKeys: array expected"; + for (var i = 0; i < message.publicKeys.length; ++i) + if ( + !( + (message.publicKeys[i] && + typeof message.publicKeys[i].length === "number") || + $util.isString(message.publicKeys[i]) + ) + ) + return "publicKeys: buffer[] expected"; + } + return null; + }; + + /** + * Creates a RemovePublisherPublicKeys message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.RemovePublisherPublicKeys} RemovePublisherPublicKeys + */ + RemovePublisherPublicKeys.fromObject = function fromObject(object) { + if ( + object instanceof $root.pyth_lazer_transaction.RemovePublisherPublicKeys + ) + return object; + var message = + new $root.pyth_lazer_transaction.RemovePublisherPublicKeys(); + if (object.publicKeys) { + if (!Array.isArray(object.publicKeys)) + throw TypeError( + ".pyth_lazer_transaction.RemovePublisherPublicKeys.publicKeys: array expected", + ); + message.publicKeys = []; + for (var i = 0; i < object.publicKeys.length; ++i) + if (typeof object.publicKeys[i] === "string") + $util.base64.decode( + object.publicKeys[i], + (message.publicKeys[i] = $util.newBuffer( + $util.base64.length(object.publicKeys[i]), + )), + 0, + ); + else if (object.publicKeys[i].length >= 0) + message.publicKeys[i] = object.publicKeys[i]; + } + return message; + }; + + /** + * Creates a plain object from a RemovePublisherPublicKeys message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys + * @static + * @param {pyth_lazer_transaction.RemovePublisherPublicKeys} message RemovePublisherPublicKeys + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RemovePublisherPublicKeys.toObject = function toObject(message, options) { + if (!options) options = {}; + var object = {}; + if (options.arrays || options.defaults) object.publicKeys = []; + if (message.publicKeys && message.publicKeys.length) { + object.publicKeys = []; + for (var j = 0; j < message.publicKeys.length; ++j) + object.publicKeys[j] = + options.bytes === String + ? $util.base64.encode( + message.publicKeys[j], + 0, + message.publicKeys[j].length, + ) + : options.bytes === Array + ? Array.prototype.slice.call(message.publicKeys[j]) + : message.publicKeys[j]; + } + return object; + }; + + /** + * Converts this RemovePublisherPublicKeys to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys + * @instance + * @returns {Object.} JSON object + */ + RemovePublisherPublicKeys.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RemovePublisherPublicKeys + * @function getTypeUrl + * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RemovePublisherPublicKeys.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return ( + typeUrlPrefix + "/pyth_lazer_transaction.RemovePublisherPublicKeys" + ); + }; + + return RemovePublisherPublicKeys; + })(); + + pyth_lazer_transaction.SetPublisherPublicKeys = (function () { + /** + * Properties of a SetPublisherPublicKeys. + * @memberof pyth_lazer_transaction + * @interface ISetPublisherPublicKeys + * @property {Array.|null} [publicKeys] SetPublisherPublicKeys publicKeys + */ + + /** + * Constructs a new SetPublisherPublicKeys. + * @memberof pyth_lazer_transaction + * @classdesc Represents a SetPublisherPublicKeys. + * @implements ISetPublisherPublicKeys + * @constructor + * @param {pyth_lazer_transaction.ISetPublisherPublicKeys=} [properties] Properties to set + */ + function SetPublisherPublicKeys(properties) { + this.publicKeys = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + } + + /** + * SetPublisherPublicKeys publicKeys. + * @member {Array.} publicKeys + * @memberof pyth_lazer_transaction.SetPublisherPublicKeys + * @instance + */ + SetPublisherPublicKeys.prototype.publicKeys = $util.emptyArray; + + /** + * Creates a new SetPublisherPublicKeys instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.SetPublisherPublicKeys + * @static + * @param {pyth_lazer_transaction.ISetPublisherPublicKeys=} [properties] Properties to set + * @returns {pyth_lazer_transaction.SetPublisherPublicKeys} SetPublisherPublicKeys instance + */ + SetPublisherPublicKeys.create = function create(properties) { + return new SetPublisherPublicKeys(properties); + }; + + /** + * Encodes the specified SetPublisherPublicKeys message. Does not implicitly {@link pyth_lazer_transaction.SetPublisherPublicKeys.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.SetPublisherPublicKeys + * @static + * @param {pyth_lazer_transaction.ISetPublisherPublicKeys} message SetPublisherPublicKeys message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetPublisherPublicKeys.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if (message.publicKeys != null && message.publicKeys.length) + for (var i = 0; i < message.publicKeys.length; ++i) + writer + .uint32(/* id 1, wireType 2 =*/ 10) + .bytes(message.publicKeys[i]); + return writer; + }; + + /** + * Encodes the specified SetPublisherPublicKeys message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetPublisherPublicKeys.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.SetPublisherPublicKeys + * @static + * @param {pyth_lazer_transaction.ISetPublisherPublicKeys} message SetPublisherPublicKeys message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetPublisherPublicKeys.encodeDelimited = function encodeDelimited( + message, + writer, + ) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetPublisherPublicKeys message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.SetPublisherPublicKeys + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.SetPublisherPublicKeys} SetPublisherPublicKeys + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetPublisherPublicKeys.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pyth_lazer_transaction.SetPublisherPublicKeys(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + if (!(message.publicKeys && message.publicKeys.length)) + message.publicKeys = []; + message.publicKeys.push(reader.bytes()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetPublisherPublicKeys message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.SetPublisherPublicKeys + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.SetPublisherPublicKeys} SetPublisherPublicKeys + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetPublisherPublicKeys.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetPublisherPublicKeys message. + * @function verify + * @memberof pyth_lazer_transaction.SetPublisherPublicKeys + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetPublisherPublicKeys.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.publicKeys != null && message.hasOwnProperty("publicKeys")) { + if (!Array.isArray(message.publicKeys)) + return "publicKeys: array expected"; + for (var i = 0; i < message.publicKeys.length; ++i) + if ( + !( + (message.publicKeys[i] && + typeof message.publicKeys[i].length === "number") || + $util.isString(message.publicKeys[i]) + ) + ) + return "publicKeys: buffer[] expected"; + } + return null; + }; + + /** + * Creates a SetPublisherPublicKeys message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.SetPublisherPublicKeys + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.SetPublisherPublicKeys} SetPublisherPublicKeys + */ + SetPublisherPublicKeys.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.SetPublisherPublicKeys) + return object; + var message = new $root.pyth_lazer_transaction.SetPublisherPublicKeys(); + if (object.publicKeys) { + if (!Array.isArray(object.publicKeys)) + throw TypeError( + ".pyth_lazer_transaction.SetPublisherPublicKeys.publicKeys: array expected", + ); + message.publicKeys = []; + for (var i = 0; i < object.publicKeys.length; ++i) + if (typeof object.publicKeys[i] === "string") + $util.base64.decode( + object.publicKeys[i], + (message.publicKeys[i] = $util.newBuffer( + $util.base64.length(object.publicKeys[i]), + )), + 0, + ); + else if (object.publicKeys[i].length >= 0) + message.publicKeys[i] = object.publicKeys[i]; + } + return message; + }; + + /** + * Creates a plain object from a SetPublisherPublicKeys message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.SetPublisherPublicKeys + * @static + * @param {pyth_lazer_transaction.SetPublisherPublicKeys} message SetPublisherPublicKeys + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetPublisherPublicKeys.toObject = function toObject(message, options) { + if (!options) options = {}; + var object = {}; + if (options.arrays || options.defaults) object.publicKeys = []; + if (message.publicKeys && message.publicKeys.length) { + object.publicKeys = []; + for (var j = 0; j < message.publicKeys.length; ++j) + object.publicKeys[j] = + options.bytes === String + ? $util.base64.encode( + message.publicKeys[j], + 0, + message.publicKeys[j].length, + ) + : options.bytes === Array + ? Array.prototype.slice.call(message.publicKeys[j]) + : message.publicKeys[j]; + } + return object; + }; + + /** + * Converts this SetPublisherPublicKeys to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.SetPublisherPublicKeys + * @instance + * @returns {Object.} JSON object + */ + SetPublisherPublicKeys.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetPublisherPublicKeys + * @function getTypeUrl + * @memberof pyth_lazer_transaction.SetPublisherPublicKeys + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetPublisherPublicKeys.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.SetPublisherPublicKeys"; + }; + + return SetPublisherPublicKeys; + })(); + + pyth_lazer_transaction.SetPublisherActive = (function () { + /** + * Properties of a SetPublisherActive. + * @memberof pyth_lazer_transaction + * @interface ISetPublisherActive + * @property {boolean|null} [isActive] SetPublisherActive isActive + */ + + /** + * Constructs a new SetPublisherActive. + * @memberof pyth_lazer_transaction + * @classdesc Represents a SetPublisherActive. + * @implements ISetPublisherActive + * @constructor + * @param {pyth_lazer_transaction.ISetPublisherActive=} [properties] Properties to set + */ + function SetPublisherActive(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + } + + /** + * SetPublisherActive isActive. + * @member {boolean|null|undefined} isActive + * @memberof pyth_lazer_transaction.SetPublisherActive + * @instance + */ + SetPublisherActive.prototype.isActive = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SetPublisherActive _isActive. + * @member {"isActive"|undefined} _isActive + * @memberof pyth_lazer_transaction.SetPublisherActive + * @instance + */ + Object.defineProperty(SetPublisherActive.prototype, "_isActive", { + get: $util.oneOfGetter(($oneOfFields = ["isActive"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Creates a new SetPublisherActive instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.SetPublisherActive + * @static + * @param {pyth_lazer_transaction.ISetPublisherActive=} [properties] Properties to set + * @returns {pyth_lazer_transaction.SetPublisherActive} SetPublisherActive instance + */ + SetPublisherActive.create = function create(properties) { + return new SetPublisherActive(properties); + }; + + /** + * Encodes the specified SetPublisherActive message. Does not implicitly {@link pyth_lazer_transaction.SetPublisherActive.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.SetPublisherActive + * @static + * @param {pyth_lazer_transaction.ISetPublisherActive} message SetPublisherActive message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetPublisherActive.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if ( + message.isActive != null && + Object.hasOwnProperty.call(message, "isActive") + ) + writer.uint32(/* id 1, wireType 0 =*/ 8).bool(message.isActive); + return writer; + }; + + /** + * Encodes the specified SetPublisherActive message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetPublisherActive.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.SetPublisherActive + * @static + * @param {pyth_lazer_transaction.ISetPublisherActive} message SetPublisherActive message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetPublisherActive.encodeDelimited = function encodeDelimited( + message, + writer, + ) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetPublisherActive message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.SetPublisherActive + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.SetPublisherActive} SetPublisherActive + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetPublisherActive.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pyth_lazer_transaction.SetPublisherActive(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.isActive = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetPublisherActive message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.SetPublisherActive + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.SetPublisherActive} SetPublisherActive + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetPublisherActive.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetPublisherActive message. + * @function verify + * @memberof pyth_lazer_transaction.SetPublisherActive + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetPublisherActive.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.isActive != null && message.hasOwnProperty("isActive")) { + properties._isActive = 1; + if (typeof message.isActive !== "boolean") + return "isActive: boolean expected"; + } + return null; + }; + + /** + * Creates a SetPublisherActive message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.SetPublisherActive + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.SetPublisherActive} SetPublisherActive + */ + SetPublisherActive.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.SetPublisherActive) + return object; + var message = new $root.pyth_lazer_transaction.SetPublisherActive(); + if (object.isActive != null) message.isActive = Boolean(object.isActive); + return message; + }; + + /** + * Creates a plain object from a SetPublisherActive message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.SetPublisherActive + * @static + * @param {pyth_lazer_transaction.SetPublisherActive} message SetPublisherActive + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetPublisherActive.toObject = function toObject(message, options) { + if (!options) options = {}; + var object = {}; + if (message.isActive != null && message.hasOwnProperty("isActive")) { + object.isActive = message.isActive; + if (options.oneofs) object._isActive = "isActive"; + } + return object; + }; + + /** + * Converts this SetPublisherActive to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.SetPublisherActive + * @instance + * @returns {Object.} JSON object + */ + SetPublisherActive.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetPublisherActive + * @function getTypeUrl + * @memberof pyth_lazer_transaction.SetPublisherActive + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetPublisherActive.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.SetPublisherActive"; + }; + + return SetPublisherActive; + })(); + + pyth_lazer_transaction.AddFeed = (function () { + /** + * Properties of an AddFeed. + * @memberof pyth_lazer_transaction + * @interface IAddFeed + * @property {number|null} [feedId] AddFeed feedId + * @property {pyth_lazer_transaction.DynamicValue.IMap|null} [metadata] AddFeed metadata + * @property {Array.|null} [permissionedPublishers] AddFeed permissionedPublishers + */ + + /** + * Constructs a new AddFeed. + * @memberof pyth_lazer_transaction + * @classdesc Represents an AddFeed. + * @implements IAddFeed + * @constructor + * @param {pyth_lazer_transaction.IAddFeed=} [properties] Properties to set + */ + function AddFeed(properties) { + this.permissionedPublishers = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + } + + /** + * AddFeed feedId. + * @member {number|null|undefined} feedId + * @memberof pyth_lazer_transaction.AddFeed + * @instance + */ + AddFeed.prototype.feedId = null; + + /** + * AddFeed metadata. + * @member {pyth_lazer_transaction.DynamicValue.IMap|null|undefined} metadata + * @memberof pyth_lazer_transaction.AddFeed + * @instance + */ + AddFeed.prototype.metadata = null; + + /** + * AddFeed permissionedPublishers. + * @member {Array.} permissionedPublishers + * @memberof pyth_lazer_transaction.AddFeed + * @instance + */ + AddFeed.prototype.permissionedPublishers = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AddFeed _feedId. + * @member {"feedId"|undefined} _feedId + * @memberof pyth_lazer_transaction.AddFeed + * @instance + */ + Object.defineProperty(AddFeed.prototype, "_feedId", { + get: $util.oneOfGetter(($oneOfFields = ["feedId"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * AddFeed _metadata. + * @member {"metadata"|undefined} _metadata + * @memberof pyth_lazer_transaction.AddFeed + * @instance + */ + Object.defineProperty(AddFeed.prototype, "_metadata", { + get: $util.oneOfGetter(($oneOfFields = ["metadata"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Creates a new AddFeed instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.AddFeed + * @static + * @param {pyth_lazer_transaction.IAddFeed=} [properties] Properties to set + * @returns {pyth_lazer_transaction.AddFeed} AddFeed instance + */ + AddFeed.create = function create(properties) { + return new AddFeed(properties); + }; + + /** + * Encodes the specified AddFeed message. Does not implicitly {@link pyth_lazer_transaction.AddFeed.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.AddFeed + * @static + * @param {pyth_lazer_transaction.IAddFeed} message AddFeed message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddFeed.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if ( + message.feedId != null && + Object.hasOwnProperty.call(message, "feedId") + ) + writer.uint32(/* id 1, wireType 0 =*/ 8).uint32(message.feedId); + if ( + message.metadata != null && + Object.hasOwnProperty.call(message, "metadata") + ) + $root.pyth_lazer_transaction.DynamicValue.Map.encode( + message.metadata, + writer.uint32(/* id 2, wireType 2 =*/ 18).fork(), + ).ldelim(); + if ( + message.permissionedPublishers != null && + message.permissionedPublishers.length + ) { + writer.uint32(/* id 3, wireType 2 =*/ 26).fork(); + for (var i = 0; i < message.permissionedPublishers.length; ++i) + writer.uint32(message.permissionedPublishers[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified AddFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddFeed.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.AddFeed + * @static + * @param {pyth_lazer_transaction.IAddFeed} message AddFeed message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddFeed.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AddFeed message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.AddFeed + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.AddFeed} AddFeed + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddFeed.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pyth_lazer_transaction.AddFeed(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.feedId = reader.uint32(); + break; + } + case 2: { + message.metadata = + $root.pyth_lazer_transaction.DynamicValue.Map.decode( + reader, + reader.uint32(), + ); + break; + } + case 3: { + if ( + !( + message.permissionedPublishers && + message.permissionedPublishers.length + ) + ) + message.permissionedPublishers = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.permissionedPublishers.push(reader.uint32()); + } else message.permissionedPublishers.push(reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AddFeed message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.AddFeed + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.AddFeed} AddFeed + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddFeed.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AddFeed message. + * @function verify + * @memberof pyth_lazer_transaction.AddFeed + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AddFeed.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.feedId != null && message.hasOwnProperty("feedId")) { + properties._feedId = 1; + if (!$util.isInteger(message.feedId)) return "feedId: integer expected"; + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + properties._metadata = 1; + { + var error = $root.pyth_lazer_transaction.DynamicValue.Map.verify( + message.metadata, + ); + if (error) return "metadata." + error; + } + } + if ( + message.permissionedPublishers != null && + message.hasOwnProperty("permissionedPublishers") + ) { + if (!Array.isArray(message.permissionedPublishers)) + return "permissionedPublishers: array expected"; + for (var i = 0; i < message.permissionedPublishers.length; ++i) + if (!$util.isInteger(message.permissionedPublishers[i])) + return "permissionedPublishers: integer[] expected"; + } + return null; + }; + + /** + * Creates an AddFeed message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.AddFeed + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.AddFeed} AddFeed + */ + AddFeed.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.AddFeed) return object; + var message = new $root.pyth_lazer_transaction.AddFeed(); + if (object.feedId != null) message.feedId = object.feedId >>> 0; + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError( + ".pyth_lazer_transaction.AddFeed.metadata: object expected", + ); + message.metadata = + $root.pyth_lazer_transaction.DynamicValue.Map.fromObject( + object.metadata, + ); + } + if (object.permissionedPublishers) { + if (!Array.isArray(object.permissionedPublishers)) + throw TypeError( + ".pyth_lazer_transaction.AddFeed.permissionedPublishers: array expected", + ); + message.permissionedPublishers = []; + for (var i = 0; i < object.permissionedPublishers.length; ++i) + message.permissionedPublishers[i] = + object.permissionedPublishers[i] >>> 0; + } + return message; + }; + + /** + * Creates a plain object from an AddFeed message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.AddFeed + * @static + * @param {pyth_lazer_transaction.AddFeed} message AddFeed + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AddFeed.toObject = function toObject(message, options) { + if (!options) options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.permissionedPublishers = []; + if (message.feedId != null && message.hasOwnProperty("feedId")) { + object.feedId = message.feedId; + if (options.oneofs) object._feedId = "feedId"; + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + object.metadata = + $root.pyth_lazer_transaction.DynamicValue.Map.toObject( + message.metadata, + options, + ); + if (options.oneofs) object._metadata = "metadata"; + } + if ( + message.permissionedPublishers && + message.permissionedPublishers.length + ) { + object.permissionedPublishers = []; + for (var j = 0; j < message.permissionedPublishers.length; ++j) + object.permissionedPublishers[j] = message.permissionedPublishers[j]; + } + return object; + }; + + /** + * Converts this AddFeed to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.AddFeed + * @instance + * @returns {Object.} JSON object + */ + AddFeed.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AddFeed + * @function getTypeUrl + * @memberof pyth_lazer_transaction.AddFeed + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AddFeed.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.AddFeed"; + }; + + return AddFeed; + })(); + + pyth_lazer_transaction.UpdateFeed = (function () { + /** + * Properties of an UpdateFeed. + * @memberof pyth_lazer_transaction + * @interface IUpdateFeed + * @property {number|null} [feedId] UpdateFeed feedId + * @property {pyth_lazer_transaction.IUpdateFeedMetadata|null} [updateFeedMetadata] UpdateFeed updateFeedMetadata + * @property {pyth_lazer_transaction.IActivateFeed|null} [activateFeed] UpdateFeed activateFeed + * @property {pyth_lazer_transaction.IDeactivateFeed|null} [deactivateFeed] UpdateFeed deactivateFeed + * @property {google.protobuf.IEmpty|null} [removeFeed] UpdateFeed removeFeed + */ + + /** + * Constructs a new UpdateFeed. + * @memberof pyth_lazer_transaction + * @classdesc Represents an UpdateFeed. + * @implements IUpdateFeed + * @constructor + * @param {pyth_lazer_transaction.IUpdateFeed=} [properties] Properties to set + */ + function UpdateFeed(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateFeed feedId. + * @member {number|null|undefined} feedId + * @memberof pyth_lazer_transaction.UpdateFeed + * @instance + */ + UpdateFeed.prototype.feedId = null; + + /** + * UpdateFeed updateFeedMetadata. + * @member {pyth_lazer_transaction.IUpdateFeedMetadata|null|undefined} updateFeedMetadata + * @memberof pyth_lazer_transaction.UpdateFeed + * @instance + */ + UpdateFeed.prototype.updateFeedMetadata = null; + + /** + * UpdateFeed activateFeed. + * @member {pyth_lazer_transaction.IActivateFeed|null|undefined} activateFeed + * @memberof pyth_lazer_transaction.UpdateFeed + * @instance + */ + UpdateFeed.prototype.activateFeed = null; + + /** + * UpdateFeed deactivateFeed. + * @member {pyth_lazer_transaction.IDeactivateFeed|null|undefined} deactivateFeed + * @memberof pyth_lazer_transaction.UpdateFeed + * @instance + */ + UpdateFeed.prototype.deactivateFeed = null; + + /** + * UpdateFeed removeFeed. + * @member {google.protobuf.IEmpty|null|undefined} removeFeed + * @memberof pyth_lazer_transaction.UpdateFeed + * @instance + */ + UpdateFeed.prototype.removeFeed = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * UpdateFeed _feedId. + * @member {"feedId"|undefined} _feedId + * @memberof pyth_lazer_transaction.UpdateFeed + * @instance + */ + Object.defineProperty(UpdateFeed.prototype, "_feedId", { + get: $util.oneOfGetter(($oneOfFields = ["feedId"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * UpdateFeed action. + * @member {"updateFeedMetadata"|"activateFeed"|"deactivateFeed"|"removeFeed"|undefined} action + * @memberof pyth_lazer_transaction.UpdateFeed + * @instance + */ + Object.defineProperty(UpdateFeed.prototype, "action", { + get: $util.oneOfGetter( + ($oneOfFields = [ + "updateFeedMetadata", + "activateFeed", + "deactivateFeed", + "removeFeed", + ]), + ), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Creates a new UpdateFeed instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.UpdateFeed + * @static + * @param {pyth_lazer_transaction.IUpdateFeed=} [properties] Properties to set + * @returns {pyth_lazer_transaction.UpdateFeed} UpdateFeed instance + */ + UpdateFeed.create = function create(properties) { + return new UpdateFeed(properties); + }; + + /** + * Encodes the specified UpdateFeed message. Does not implicitly {@link pyth_lazer_transaction.UpdateFeed.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.UpdateFeed + * @static + * @param {pyth_lazer_transaction.IUpdateFeed} message UpdateFeed message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateFeed.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if ( + message.feedId != null && + Object.hasOwnProperty.call(message, "feedId") + ) + writer.uint32(/* id 1, wireType 0 =*/ 8).uint32(message.feedId); + if ( + message.updateFeedMetadata != null && + Object.hasOwnProperty.call(message, "updateFeedMetadata") + ) + $root.pyth_lazer_transaction.UpdateFeedMetadata.encode( + message.updateFeedMetadata, + writer.uint32(/* id 101, wireType 2 =*/ 810).fork(), + ).ldelim(); + if ( + message.activateFeed != null && + Object.hasOwnProperty.call(message, "activateFeed") + ) + $root.pyth_lazer_transaction.ActivateFeed.encode( + message.activateFeed, + writer.uint32(/* id 102, wireType 2 =*/ 818).fork(), + ).ldelim(); + if ( + message.deactivateFeed != null && + Object.hasOwnProperty.call(message, "deactivateFeed") + ) + $root.pyth_lazer_transaction.DeactivateFeed.encode( + message.deactivateFeed, + writer.uint32(/* id 103, wireType 2 =*/ 826).fork(), + ).ldelim(); + if ( + message.removeFeed != null && + Object.hasOwnProperty.call(message, "removeFeed") + ) + $root.google.protobuf.Empty.encode( + message.removeFeed, + writer.uint32(/* id 199, wireType 2 =*/ 1594).fork(), + ).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdateFeed.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.UpdateFeed + * @static + * @param {pyth_lazer_transaction.IUpdateFeed} message UpdateFeed message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateFeed.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateFeed message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.UpdateFeed + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.UpdateFeed} UpdateFeed + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateFeed.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pyth_lazer_transaction.UpdateFeed(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.feedId = reader.uint32(); + break; + } + case 101: { + message.updateFeedMetadata = + $root.pyth_lazer_transaction.UpdateFeedMetadata.decode( + reader, + reader.uint32(), + ); + break; + } + case 102: { + message.activateFeed = + $root.pyth_lazer_transaction.ActivateFeed.decode( + reader, + reader.uint32(), + ); + break; + } + case 103: { + message.deactivateFeed = + $root.pyth_lazer_transaction.DeactivateFeed.decode( + reader, + reader.uint32(), + ); + break; + } + case 199: { + message.removeFeed = $root.google.protobuf.Empty.decode( + reader, + reader.uint32(), + ); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateFeed message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.UpdateFeed + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.UpdateFeed} UpdateFeed + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateFeed.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateFeed message. + * @function verify + * @memberof pyth_lazer_transaction.UpdateFeed + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateFeed.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.feedId != null && message.hasOwnProperty("feedId")) { + properties._feedId = 1; + if (!$util.isInteger(message.feedId)) return "feedId: integer expected"; + } + if ( + message.updateFeedMetadata != null && + message.hasOwnProperty("updateFeedMetadata") + ) { + properties.action = 1; + { + var error = $root.pyth_lazer_transaction.UpdateFeedMetadata.verify( + message.updateFeedMetadata, + ); + if (error) return "updateFeedMetadata." + error; + } + } + if ( + message.activateFeed != null && + message.hasOwnProperty("activateFeed") + ) { + if (properties.action === 1) return "action: multiple values"; + properties.action = 1; + { + var error = $root.pyth_lazer_transaction.ActivateFeed.verify( + message.activateFeed, + ); + if (error) return "activateFeed." + error; + } + } + if ( + message.deactivateFeed != null && + message.hasOwnProperty("deactivateFeed") + ) { + if (properties.action === 1) return "action: multiple values"; + properties.action = 1; + { + var error = $root.pyth_lazer_transaction.DeactivateFeed.verify( + message.deactivateFeed, + ); + if (error) return "deactivateFeed." + error; + } + } + if (message.removeFeed != null && message.hasOwnProperty("removeFeed")) { + if (properties.action === 1) return "action: multiple values"; + properties.action = 1; + { + var error = $root.google.protobuf.Empty.verify(message.removeFeed); + if (error) return "removeFeed." + error; + } + } + return null; + }; + + /** + * Creates an UpdateFeed message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.UpdateFeed + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.UpdateFeed} UpdateFeed + */ + UpdateFeed.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.UpdateFeed) + return object; + var message = new $root.pyth_lazer_transaction.UpdateFeed(); + if (object.feedId != null) message.feedId = object.feedId >>> 0; + if (object.updateFeedMetadata != null) { + if (typeof object.updateFeedMetadata !== "object") + throw TypeError( + ".pyth_lazer_transaction.UpdateFeed.updateFeedMetadata: object expected", + ); + message.updateFeedMetadata = + $root.pyth_lazer_transaction.UpdateFeedMetadata.fromObject( + object.updateFeedMetadata, + ); + } + if (object.activateFeed != null) { + if (typeof object.activateFeed !== "object") + throw TypeError( + ".pyth_lazer_transaction.UpdateFeed.activateFeed: object expected", + ); + message.activateFeed = + $root.pyth_lazer_transaction.ActivateFeed.fromObject( + object.activateFeed, + ); + } + if (object.deactivateFeed != null) { + if (typeof object.deactivateFeed !== "object") + throw TypeError( + ".pyth_lazer_transaction.UpdateFeed.deactivateFeed: object expected", + ); + message.deactivateFeed = + $root.pyth_lazer_transaction.DeactivateFeed.fromObject( + object.deactivateFeed, + ); + } + if (object.removeFeed != null) { + if (typeof object.removeFeed !== "object") + throw TypeError( + ".pyth_lazer_transaction.UpdateFeed.removeFeed: object expected", + ); + message.removeFeed = $root.google.protobuf.Empty.fromObject( + object.removeFeed, + ); + } + return message; + }; + + /** + * Creates a plain object from an UpdateFeed message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.UpdateFeed + * @static + * @param {pyth_lazer_transaction.UpdateFeed} message UpdateFeed + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateFeed.toObject = function toObject(message, options) { + if (!options) options = {}; + var object = {}; + if (message.feedId != null && message.hasOwnProperty("feedId")) { + object.feedId = message.feedId; + if (options.oneofs) object._feedId = "feedId"; + } + if ( + message.updateFeedMetadata != null && + message.hasOwnProperty("updateFeedMetadata") + ) { + object.updateFeedMetadata = + $root.pyth_lazer_transaction.UpdateFeedMetadata.toObject( + message.updateFeedMetadata, + options, + ); + if (options.oneofs) object.action = "updateFeedMetadata"; + } + if ( + message.activateFeed != null && + message.hasOwnProperty("activateFeed") + ) { + object.activateFeed = + $root.pyth_lazer_transaction.ActivateFeed.toObject( + message.activateFeed, + options, + ); + if (options.oneofs) object.action = "activateFeed"; + } + if ( + message.deactivateFeed != null && + message.hasOwnProperty("deactivateFeed") + ) { + object.deactivateFeed = + $root.pyth_lazer_transaction.DeactivateFeed.toObject( + message.deactivateFeed, + options, + ); + if (options.oneofs) object.action = "deactivateFeed"; + } + if (message.removeFeed != null && message.hasOwnProperty("removeFeed")) { + object.removeFeed = $root.google.protobuf.Empty.toObject( + message.removeFeed, + options, + ); + if (options.oneofs) object.action = "removeFeed"; + } + return object; + }; + + /** + * Converts this UpdateFeed to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.UpdateFeed + * @instance + * @returns {Object.} JSON object + */ + UpdateFeed.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateFeed + * @function getTypeUrl + * @memberof pyth_lazer_transaction.UpdateFeed + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateFeed.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.UpdateFeed"; + }; + + return UpdateFeed; + })(); + + pyth_lazer_transaction.UpdateFeedMetadata = (function () { + /** + * Properties of an UpdateFeedMetadata. + * @memberof pyth_lazer_transaction + * @interface IUpdateFeedMetadata + * @property {string|null} [name] UpdateFeedMetadata name + * @property {pyth_lazer_transaction.IDynamicValue|null} [value] UpdateFeedMetadata value + */ + + /** + * Constructs a new UpdateFeedMetadata. + * @memberof pyth_lazer_transaction + * @classdesc Represents an UpdateFeedMetadata. + * @implements IUpdateFeedMetadata + * @constructor + * @param {pyth_lazer_transaction.IUpdateFeedMetadata=} [properties] Properties to set + */ + function UpdateFeedMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateFeedMetadata name. + * @member {string|null|undefined} name + * @memberof pyth_lazer_transaction.UpdateFeedMetadata + * @instance + */ + UpdateFeedMetadata.prototype.name = null; + + /** + * UpdateFeedMetadata value. + * @member {pyth_lazer_transaction.IDynamicValue|null|undefined} value + * @memberof pyth_lazer_transaction.UpdateFeedMetadata + * @instance + */ + UpdateFeedMetadata.prototype.value = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * UpdateFeedMetadata _name. + * @member {"name"|undefined} _name + * @memberof pyth_lazer_transaction.UpdateFeedMetadata + * @instance + */ + Object.defineProperty(UpdateFeedMetadata.prototype, "_name", { + get: $util.oneOfGetter(($oneOfFields = ["name"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * UpdateFeedMetadata _value. + * @member {"value"|undefined} _value + * @memberof pyth_lazer_transaction.UpdateFeedMetadata + * @instance + */ + Object.defineProperty(UpdateFeedMetadata.prototype, "_value", { + get: $util.oneOfGetter(($oneOfFields = ["value"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Creates a new UpdateFeedMetadata instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.UpdateFeedMetadata + * @static + * @param {pyth_lazer_transaction.IUpdateFeedMetadata=} [properties] Properties to set + * @returns {pyth_lazer_transaction.UpdateFeedMetadata} UpdateFeedMetadata instance + */ + UpdateFeedMetadata.create = function create(properties) { + return new UpdateFeedMetadata(properties); + }; + + /** + * Encodes the specified UpdateFeedMetadata message. Does not implicitly {@link pyth_lazer_transaction.UpdateFeedMetadata.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.UpdateFeedMetadata + * @static + * @param {pyth_lazer_transaction.IUpdateFeedMetadata} message UpdateFeedMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateFeedMetadata.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")) + $root.pyth_lazer_transaction.DynamicValue.encode( + message.value, + writer.uint32(/* id 2, wireType 2 =*/ 18).fork(), + ).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateFeedMetadata message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdateFeedMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.UpdateFeedMetadata + * @static + * @param {pyth_lazer_transaction.IUpdateFeedMetadata} message UpdateFeedMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateFeedMetadata.encodeDelimited = function encodeDelimited( + message, + writer, + ) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateFeedMetadata message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.UpdateFeedMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.UpdateFeedMetadata} UpdateFeedMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateFeedMetadata.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pyth_lazer_transaction.UpdateFeedMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.value = $root.pyth_lazer_transaction.DynamicValue.decode( + reader, + reader.uint32(), + ); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateFeedMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.UpdateFeedMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.UpdateFeedMetadata} UpdateFeedMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateFeedMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateFeedMetadata message. + * @function verify + * @memberof pyth_lazer_transaction.UpdateFeedMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateFeedMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) { + properties._name = 1; + if (!$util.isString(message.name)) return "name: string expected"; + } + if (message.value != null && message.hasOwnProperty("value")) { + properties._value = 1; + { + var error = $root.pyth_lazer_transaction.DynamicValue.verify( + message.value, + ); + if (error) return "value." + error; + } + } + return null; + }; + + /** + * Creates an UpdateFeedMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.UpdateFeedMetadata + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.UpdateFeedMetadata} UpdateFeedMetadata + */ + UpdateFeedMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.UpdateFeedMetadata) + return object; + var message = new $root.pyth_lazer_transaction.UpdateFeedMetadata(); + if (object.name != null) message.name = String(object.name); + if (object.value != null) { + if (typeof object.value !== "object") + throw TypeError( + ".pyth_lazer_transaction.UpdateFeedMetadata.value: object expected", + ); + message.value = $root.pyth_lazer_transaction.DynamicValue.fromObject( + object.value, + ); + } + return message; + }; + + /** + * Creates a plain object from an UpdateFeedMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.UpdateFeedMetadata + * @static + * @param {pyth_lazer_transaction.UpdateFeedMetadata} message UpdateFeedMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateFeedMetadata.toObject = function toObject(message, options) { + if (!options) options = {}; + var object = {}; + if (message.name != null && message.hasOwnProperty("name")) { + object.name = message.name; + if (options.oneofs) object._name = "name"; + } + if (message.value != null && message.hasOwnProperty("value")) { + object.value = $root.pyth_lazer_transaction.DynamicValue.toObject( + message.value, + options, + ); + if (options.oneofs) object._value = "value"; + } + return object; + }; + + /** + * Converts this UpdateFeedMetadata to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.UpdateFeedMetadata + * @instance + * @returns {Object.} JSON object + */ + UpdateFeedMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateFeedMetadata + * @function getTypeUrl + * @memberof pyth_lazer_transaction.UpdateFeedMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateFeedMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.UpdateFeedMetadata"; + }; + + return UpdateFeedMetadata; + })(); + + pyth_lazer_transaction.ActivateFeed = (function () { + /** + * Properties of an ActivateFeed. + * @memberof pyth_lazer_transaction + * @interface IActivateFeed + * @property {google.protobuf.ITimestamp|null} [activationTimestamp] ActivateFeed activationTimestamp + */ + + /** + * Constructs a new ActivateFeed. + * @memberof pyth_lazer_transaction + * @classdesc Represents an ActivateFeed. + * @implements IActivateFeed + * @constructor + * @param {pyth_lazer_transaction.IActivateFeed=} [properties] Properties to set + */ + function ActivateFeed(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + } + + /** + * ActivateFeed activationTimestamp. + * @member {google.protobuf.ITimestamp|null|undefined} activationTimestamp + * @memberof pyth_lazer_transaction.ActivateFeed + * @instance + */ + ActivateFeed.prototype.activationTimestamp = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ActivateFeed _activationTimestamp. + * @member {"activationTimestamp"|undefined} _activationTimestamp + * @memberof pyth_lazer_transaction.ActivateFeed + * @instance + */ + Object.defineProperty(ActivateFeed.prototype, "_activationTimestamp", { + get: $util.oneOfGetter(($oneOfFields = ["activationTimestamp"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Creates a new ActivateFeed instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.ActivateFeed + * @static + * @param {pyth_lazer_transaction.IActivateFeed=} [properties] Properties to set + * @returns {pyth_lazer_transaction.ActivateFeed} ActivateFeed instance + */ + ActivateFeed.create = function create(properties) { + return new ActivateFeed(properties); + }; + + /** + * Encodes the specified ActivateFeed message. Does not implicitly {@link pyth_lazer_transaction.ActivateFeed.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.ActivateFeed + * @static + * @param {pyth_lazer_transaction.IActivateFeed} message ActivateFeed message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ActivateFeed.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if ( + message.activationTimestamp != null && + Object.hasOwnProperty.call(message, "activationTimestamp") + ) + $root.google.protobuf.Timestamp.encode( + message.activationTimestamp, + writer.uint32(/* id 1, wireType 2 =*/ 10).fork(), + ).ldelim(); + return writer; + }; + + /** + * Encodes the specified ActivateFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ActivateFeed.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.ActivateFeed + * @static + * @param {pyth_lazer_transaction.IActivateFeed} message ActivateFeed message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ActivateFeed.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ActivateFeed message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.ActivateFeed + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.ActivateFeed} ActivateFeed + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ActivateFeed.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pyth_lazer_transaction.ActivateFeed(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.activationTimestamp = + $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ActivateFeed message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.ActivateFeed + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.ActivateFeed} ActivateFeed + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ActivateFeed.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ActivateFeed message. + * @function verify + * @memberof pyth_lazer_transaction.ActivateFeed + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ActivateFeed.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if ( + message.activationTimestamp != null && + message.hasOwnProperty("activationTimestamp") + ) { + properties._activationTimestamp = 1; + { + var error = $root.google.protobuf.Timestamp.verify( + message.activationTimestamp, + ); + if (error) return "activationTimestamp." + error; + } + } + return null; + }; + + /** + * Creates an ActivateFeed message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.ActivateFeed + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.ActivateFeed} ActivateFeed + */ + ActivateFeed.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.ActivateFeed) + return object; + var message = new $root.pyth_lazer_transaction.ActivateFeed(); + if (object.activationTimestamp != null) { + if (typeof object.activationTimestamp !== "object") + throw TypeError( + ".pyth_lazer_transaction.ActivateFeed.activationTimestamp: object expected", + ); + message.activationTimestamp = + $root.google.protobuf.Timestamp.fromObject( + object.activationTimestamp, + ); + } + return message; + }; + + /** + * Creates a plain object from an ActivateFeed message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.ActivateFeed + * @static + * @param {pyth_lazer_transaction.ActivateFeed} message ActivateFeed + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ActivateFeed.toObject = function toObject(message, options) { + if (!options) options = {}; + var object = {}; + if ( + message.activationTimestamp != null && + message.hasOwnProperty("activationTimestamp") + ) { + object.activationTimestamp = $root.google.protobuf.Timestamp.toObject( + message.activationTimestamp, + options, + ); + if (options.oneofs) object._activationTimestamp = "activationTimestamp"; + } + return object; + }; + + /** + * Converts this ActivateFeed to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.ActivateFeed + * @instance + * @returns {Object.} JSON object + */ + ActivateFeed.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ActivateFeed + * @function getTypeUrl + * @memberof pyth_lazer_transaction.ActivateFeed + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ActivateFeed.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.ActivateFeed"; + }; + + return ActivateFeed; + })(); + + pyth_lazer_transaction.DeactivateFeed = (function () { + /** + * Properties of a DeactivateFeed. + * @memberof pyth_lazer_transaction + * @interface IDeactivateFeed + * @property {google.protobuf.ITimestamp|null} [deactivationTimestamp] DeactivateFeed deactivationTimestamp + */ + + /** + * Constructs a new DeactivateFeed. + * @memberof pyth_lazer_transaction + * @classdesc Represents a DeactivateFeed. + * @implements IDeactivateFeed + * @constructor + * @param {pyth_lazer_transaction.IDeactivateFeed=} [properties] Properties to set + */ + function DeactivateFeed(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + } + + /** + * DeactivateFeed deactivationTimestamp. + * @member {google.protobuf.ITimestamp|null|undefined} deactivationTimestamp + * @memberof pyth_lazer_transaction.DeactivateFeed + * @instance + */ + DeactivateFeed.prototype.deactivationTimestamp = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DeactivateFeed _deactivationTimestamp. + * @member {"deactivationTimestamp"|undefined} _deactivationTimestamp + * @memberof pyth_lazer_transaction.DeactivateFeed + * @instance + */ + Object.defineProperty(DeactivateFeed.prototype, "_deactivationTimestamp", { + get: $util.oneOfGetter(($oneOfFields = ["deactivationTimestamp"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Creates a new DeactivateFeed instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.DeactivateFeed + * @static + * @param {pyth_lazer_transaction.IDeactivateFeed=} [properties] Properties to set + * @returns {pyth_lazer_transaction.DeactivateFeed} DeactivateFeed instance + */ + DeactivateFeed.create = function create(properties) { + return new DeactivateFeed(properties); + }; + + /** + * Encodes the specified DeactivateFeed message. Does not implicitly {@link pyth_lazer_transaction.DeactivateFeed.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.DeactivateFeed + * @static + * @param {pyth_lazer_transaction.IDeactivateFeed} message DeactivateFeed message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeactivateFeed.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if ( + message.deactivationTimestamp != null && + Object.hasOwnProperty.call(message, "deactivationTimestamp") + ) + $root.google.protobuf.Timestamp.encode( + message.deactivationTimestamp, + writer.uint32(/* id 1, wireType 2 =*/ 10).fork(), + ).ldelim(); + return writer; + }; + + /** + * Encodes the specified DeactivateFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DeactivateFeed.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.DeactivateFeed + * @static + * @param {pyth_lazer_transaction.IDeactivateFeed} message DeactivateFeed message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeactivateFeed.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeactivateFeed message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.DeactivateFeed + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.DeactivateFeed} DeactivateFeed + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeactivateFeed.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pyth_lazer_transaction.DeactivateFeed(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.deactivationTimestamp = + $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; } + } + return message; + }; - /** - * ResetLastSequenceNo lastSequenceNo. - * @member {number|Long|null|undefined} lastSequenceNo - * @memberof pyth_lazer_transaction.ResetLastSequenceNo - * @instance - */ - ResetLastSequenceNo.prototype.lastSequenceNo = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ResetLastSequenceNo _lastSequenceNo. - * @member {"lastSequenceNo"|undefined} _lastSequenceNo - * @memberof pyth_lazer_transaction.ResetLastSequenceNo - * @instance - */ - Object.defineProperty(ResetLastSequenceNo.prototype, "_lastSequenceNo", { - get: $util.oneOfGetter($oneOfFields = ["lastSequenceNo"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ResetLastSequenceNo instance using the specified properties. - * @function create - * @memberof pyth_lazer_transaction.ResetLastSequenceNo - * @static - * @param {pyth_lazer_transaction.IResetLastSequenceNo=} [properties] Properties to set - * @returns {pyth_lazer_transaction.ResetLastSequenceNo} ResetLastSequenceNo instance - */ - ResetLastSequenceNo.create = function create(properties) { - return new ResetLastSequenceNo(properties); - }; - - /** - * Encodes the specified ResetLastSequenceNo message. Does not implicitly {@link pyth_lazer_transaction.ResetLastSequenceNo.verify|verify} messages. - * @function encode - * @memberof pyth_lazer_transaction.ResetLastSequenceNo - * @static - * @param {pyth_lazer_transaction.IResetLastSequenceNo} message ResetLastSequenceNo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResetLastSequenceNo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.lastSequenceNo != null && Object.hasOwnProperty.call(message, "lastSequenceNo")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.lastSequenceNo); - return writer; - }; - - /** - * Encodes the specified ResetLastSequenceNo message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ResetLastSequenceNo.verify|verify} messages. - * @function encodeDelimited - * @memberof pyth_lazer_transaction.ResetLastSequenceNo - * @static - * @param {pyth_lazer_transaction.IResetLastSequenceNo} message ResetLastSequenceNo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResetLastSequenceNo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResetLastSequenceNo message from the specified reader or buffer. - * @function decode - * @memberof pyth_lazer_transaction.ResetLastSequenceNo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pyth_lazer_transaction.ResetLastSequenceNo} ResetLastSequenceNo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResetLastSequenceNo.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.ResetLastSequenceNo(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.lastSequenceNo = reader.uint64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResetLastSequenceNo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pyth_lazer_transaction.ResetLastSequenceNo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pyth_lazer_transaction.ResetLastSequenceNo} ResetLastSequenceNo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResetLastSequenceNo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResetLastSequenceNo message. - * @function verify - * @memberof pyth_lazer_transaction.ResetLastSequenceNo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResetLastSequenceNo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.lastSequenceNo != null && message.hasOwnProperty("lastSequenceNo")) { - properties._lastSequenceNo = 1; - if (!$util.isInteger(message.lastSequenceNo) && !(message.lastSequenceNo && $util.isInteger(message.lastSequenceNo.low) && $util.isInteger(message.lastSequenceNo.high))) - return "lastSequenceNo: integer|Long expected"; - } - return null; - }; - - /** - * Creates a ResetLastSequenceNo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pyth_lazer_transaction.ResetLastSequenceNo - * @static - * @param {Object.} object Plain object - * @returns {pyth_lazer_transaction.ResetLastSequenceNo} ResetLastSequenceNo - */ - ResetLastSequenceNo.fromObject = function fromObject(object) { - if (object instanceof $root.pyth_lazer_transaction.ResetLastSequenceNo) - return object; - var message = new $root.pyth_lazer_transaction.ResetLastSequenceNo(); - if (object.lastSequenceNo != null) - if ($util.Long) - (message.lastSequenceNo = $util.Long.fromValue(object.lastSequenceNo)).unsigned = true; - else if (typeof object.lastSequenceNo === "string") - message.lastSequenceNo = parseInt(object.lastSequenceNo, 10); - else if (typeof object.lastSequenceNo === "number") - message.lastSequenceNo = object.lastSequenceNo; - else if (typeof object.lastSequenceNo === "object") - message.lastSequenceNo = new $util.LongBits(object.lastSequenceNo.low >>> 0, object.lastSequenceNo.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a ResetLastSequenceNo message. Also converts values to other types if specified. - * @function toObject - * @memberof pyth_lazer_transaction.ResetLastSequenceNo - * @static - * @param {pyth_lazer_transaction.ResetLastSequenceNo} message ResetLastSequenceNo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResetLastSequenceNo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.lastSequenceNo != null && message.hasOwnProperty("lastSequenceNo")) { - if (typeof message.lastSequenceNo === "number") - object.lastSequenceNo = options.longs === String ? String(message.lastSequenceNo) : message.lastSequenceNo; - else - object.lastSequenceNo = options.longs === String ? $util.Long.prototype.toString.call(message.lastSequenceNo) : options.longs === Number ? new $util.LongBits(message.lastSequenceNo.low >>> 0, message.lastSequenceNo.high >>> 0).toNumber(true) : message.lastSequenceNo; - if (options.oneofs) - object._lastSequenceNo = "lastSequenceNo"; - } - return object; - }; - - /** - * Converts this ResetLastSequenceNo to JSON. - * @function toJSON - * @memberof pyth_lazer_transaction.ResetLastSequenceNo - * @instance - * @returns {Object.} JSON object - */ - ResetLastSequenceNo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ResetLastSequenceNo - * @function getTypeUrl - * @memberof pyth_lazer_transaction.ResetLastSequenceNo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ResetLastSequenceNo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pyth_lazer_transaction.ResetLastSequenceNo"; - }; - - return ResetLastSequenceNo; - })(); + /** + * Decodes a DeactivateFeed message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.DeactivateFeed + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.DeactivateFeed} DeactivateFeed + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeactivateFeed.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - pyth_lazer_transaction.AddPublisher = (function() { - - /** - * Properties of an AddPublisher. - * @memberof pyth_lazer_transaction - * @interface IAddPublisher - * @property {number|null} [publisherId] AddPublisher publisherId - * @property {string|null} [name] AddPublisher name - * @property {Array.|null} [publicKeys] AddPublisher publicKeys - * @property {boolean|null} [isActive] AddPublisher isActive - */ - - /** - * Constructs a new AddPublisher. - * @memberof pyth_lazer_transaction - * @classdesc Represents an AddPublisher. - * @implements IAddPublisher - * @constructor - * @param {pyth_lazer_transaction.IAddPublisher=} [properties] Properties to set - */ - function AddPublisher(properties) { - this.publicKeys = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Verifies a DeactivateFeed message. + * @function verify + * @memberof pyth_lazer_transaction.DeactivateFeed + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeactivateFeed.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if ( + message.deactivationTimestamp != null && + message.hasOwnProperty("deactivationTimestamp") + ) { + properties._deactivationTimestamp = 1; + { + var error = $root.google.protobuf.Timestamp.verify( + message.deactivationTimestamp, + ); + if (error) return "deactivationTimestamp." + error; } + } + return null; + }; - /** - * AddPublisher publisherId. - * @member {number|null|undefined} publisherId - * @memberof pyth_lazer_transaction.AddPublisher - * @instance - */ - AddPublisher.prototype.publisherId = null; - - /** - * AddPublisher name. - * @member {string|null|undefined} name - * @memberof pyth_lazer_transaction.AddPublisher - * @instance - */ - AddPublisher.prototype.name = null; - - /** - * AddPublisher publicKeys. - * @member {Array.} publicKeys - * @memberof pyth_lazer_transaction.AddPublisher - * @instance - */ - AddPublisher.prototype.publicKeys = $util.emptyArray; - - /** - * AddPublisher isActive. - * @member {boolean|null|undefined} isActive - * @memberof pyth_lazer_transaction.AddPublisher - * @instance - */ - AddPublisher.prototype.isActive = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * AddPublisher _publisherId. - * @member {"publisherId"|undefined} _publisherId - * @memberof pyth_lazer_transaction.AddPublisher - * @instance - */ - Object.defineProperty(AddPublisher.prototype, "_publisherId", { - get: $util.oneOfGetter($oneOfFields = ["publisherId"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AddPublisher _name. - * @member {"name"|undefined} _name - * @memberof pyth_lazer_transaction.AddPublisher - * @instance - */ - Object.defineProperty(AddPublisher.prototype, "_name", { - get: $util.oneOfGetter($oneOfFields = ["name"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AddPublisher _isActive. - * @member {"isActive"|undefined} _isActive - * @memberof pyth_lazer_transaction.AddPublisher - * @instance - */ - Object.defineProperty(AddPublisher.prototype, "_isActive", { - get: $util.oneOfGetter($oneOfFields = ["isActive"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new AddPublisher instance using the specified properties. - * @function create - * @memberof pyth_lazer_transaction.AddPublisher - * @static - * @param {pyth_lazer_transaction.IAddPublisher=} [properties] Properties to set - * @returns {pyth_lazer_transaction.AddPublisher} AddPublisher instance - */ - AddPublisher.create = function create(properties) { - return new AddPublisher(properties); - }; - - /** - * Encodes the specified AddPublisher message. Does not implicitly {@link pyth_lazer_transaction.AddPublisher.verify|verify} messages. - * @function encode - * @memberof pyth_lazer_transaction.AddPublisher - * @static - * @param {pyth_lazer_transaction.IAddPublisher} message AddPublisher message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AddPublisher.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.publisherId != null && Object.hasOwnProperty.call(message, "publisherId")) - writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.publisherId); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); - if (message.publicKeys != null && message.publicKeys.length) - for (var i = 0; i < message.publicKeys.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.publicKeys[i]); - if (message.isActive != null && Object.hasOwnProperty.call(message, "isActive")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.isActive); - return writer; - }; - - /** - * Encodes the specified AddPublisher message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddPublisher.verify|verify} messages. - * @function encodeDelimited - * @memberof pyth_lazer_transaction.AddPublisher - * @static - * @param {pyth_lazer_transaction.IAddPublisher} message AddPublisher message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AddPublisher.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AddPublisher message from the specified reader or buffer. - * @function decode - * @memberof pyth_lazer_transaction.AddPublisher - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pyth_lazer_transaction.AddPublisher} AddPublisher - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AddPublisher.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.AddPublisher(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.publisherId = reader.uint32(); - break; - } - case 2: { - message.name = reader.string(); - break; - } - case 3: { - if (!(message.publicKeys && message.publicKeys.length)) - message.publicKeys = []; - message.publicKeys.push(reader.bytes()); - break; - } - case 4: { - message.isActive = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AddPublisher message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pyth_lazer_transaction.AddPublisher - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pyth_lazer_transaction.AddPublisher} AddPublisher - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AddPublisher.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AddPublisher message. - * @function verify - * @memberof pyth_lazer_transaction.AddPublisher - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AddPublisher.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.publisherId != null && message.hasOwnProperty("publisherId")) { - properties._publisherId = 1; - if (!$util.isInteger(message.publisherId)) - return "publisherId: integer expected"; - } - if (message.name != null && message.hasOwnProperty("name")) { - properties._name = 1; - if (!$util.isString(message.name)) - return "name: string expected"; - } - if (message.publicKeys != null && message.hasOwnProperty("publicKeys")) { - if (!Array.isArray(message.publicKeys)) - return "publicKeys: array expected"; - for (var i = 0; i < message.publicKeys.length; ++i) - if (!(message.publicKeys[i] && typeof message.publicKeys[i].length === "number" || $util.isString(message.publicKeys[i]))) - return "publicKeys: buffer[] expected"; - } - if (message.isActive != null && message.hasOwnProperty("isActive")) { - properties._isActive = 1; - if (typeof message.isActive !== "boolean") - return "isActive: boolean expected"; - } - return null; - }; - - /** - * Creates an AddPublisher message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pyth_lazer_transaction.AddPublisher - * @static - * @param {Object.} object Plain object - * @returns {pyth_lazer_transaction.AddPublisher} AddPublisher - */ - AddPublisher.fromObject = function fromObject(object) { - if (object instanceof $root.pyth_lazer_transaction.AddPublisher) - return object; - var message = new $root.pyth_lazer_transaction.AddPublisher(); - if (object.publisherId != null) - message.publisherId = object.publisherId >>> 0; - if (object.name != null) - message.name = String(object.name); - if (object.publicKeys) { - if (!Array.isArray(object.publicKeys)) - throw TypeError(".pyth_lazer_transaction.AddPublisher.publicKeys: array expected"); - message.publicKeys = []; - for (var i = 0; i < object.publicKeys.length; ++i) - if (typeof object.publicKeys[i] === "string") - $util.base64.decode(object.publicKeys[i], message.publicKeys[i] = $util.newBuffer($util.base64.length(object.publicKeys[i])), 0); - else if (object.publicKeys[i].length >= 0) - message.publicKeys[i] = object.publicKeys[i]; - } - if (object.isActive != null) - message.isActive = Boolean(object.isActive); - return message; - }; - - /** - * Creates a plain object from an AddPublisher message. Also converts values to other types if specified. - * @function toObject - * @memberof pyth_lazer_transaction.AddPublisher - * @static - * @param {pyth_lazer_transaction.AddPublisher} message AddPublisher - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AddPublisher.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.publicKeys = []; - if (message.publisherId != null && message.hasOwnProperty("publisherId")) { - object.publisherId = message.publisherId; - if (options.oneofs) - object._publisherId = "publisherId"; - } - if (message.name != null && message.hasOwnProperty("name")) { - object.name = message.name; - if (options.oneofs) - object._name = "name"; - } - if (message.publicKeys && message.publicKeys.length) { - object.publicKeys = []; - for (var j = 0; j < message.publicKeys.length; ++j) - object.publicKeys[j] = options.bytes === String ? $util.base64.encode(message.publicKeys[j], 0, message.publicKeys[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.publicKeys[j]) : message.publicKeys[j]; - } - if (message.isActive != null && message.hasOwnProperty("isActive")) { - object.isActive = message.isActive; - if (options.oneofs) - object._isActive = "isActive"; - } - return object; - }; - - /** - * Converts this AddPublisher to JSON. - * @function toJSON - * @memberof pyth_lazer_transaction.AddPublisher - * @instance - * @returns {Object.} JSON object - */ - AddPublisher.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AddPublisher - * @function getTypeUrl - * @memberof pyth_lazer_transaction.AddPublisher - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AddPublisher.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pyth_lazer_transaction.AddPublisher"; - }; - - return AddPublisher; - })(); + /** + * Creates a DeactivateFeed message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.DeactivateFeed + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.DeactivateFeed} DeactivateFeed + */ + DeactivateFeed.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.DeactivateFeed) + return object; + var message = new $root.pyth_lazer_transaction.DeactivateFeed(); + if (object.deactivationTimestamp != null) { + if (typeof object.deactivationTimestamp !== "object") + throw TypeError( + ".pyth_lazer_transaction.DeactivateFeed.deactivationTimestamp: object expected", + ); + message.deactivationTimestamp = + $root.google.protobuf.Timestamp.fromObject( + object.deactivationTimestamp, + ); + } + return message; + }; - pyth_lazer_transaction.UpdatePublisher = (function() { - - /** - * Properties of an UpdatePublisher. - * @memberof pyth_lazer_transaction - * @interface IUpdatePublisher - * @property {number|null} [publisherId] UpdatePublisher publisherId - * @property {pyth_lazer_transaction.ISetPublisherName|null} [setPublisherName] UpdatePublisher setPublisherName - * @property {pyth_lazer_transaction.IAddPublisherPublicKeys|null} [addPublisherPublicKeys] UpdatePublisher addPublisherPublicKeys - * @property {pyth_lazer_transaction.IRemovePublisherPublicKeys|null} [removePublisherPublicKeys] UpdatePublisher removePublisherPublicKeys - * @property {pyth_lazer_transaction.ISetPublisherPublicKeys|null} [setPublisherPublicKeys] UpdatePublisher setPublisherPublicKeys - * @property {pyth_lazer_transaction.ISetPublisherActive|null} [setPublisherActive] UpdatePublisher setPublisherActive - * @property {google.protobuf.IEmpty|null} [removePublisher] UpdatePublisher removePublisher - */ - - /** - * Constructs a new UpdatePublisher. - * @memberof pyth_lazer_transaction - * @classdesc Represents an UpdatePublisher. - * @implements IUpdatePublisher - * @constructor - * @param {pyth_lazer_transaction.IUpdatePublisher=} [properties] Properties to set - */ - function UpdatePublisher(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Creates a plain object from a DeactivateFeed message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.DeactivateFeed + * @static + * @param {pyth_lazer_transaction.DeactivateFeed} message DeactivateFeed + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeactivateFeed.toObject = function toObject(message, options) { + if (!options) options = {}; + var object = {}; + if ( + message.deactivationTimestamp != null && + message.hasOwnProperty("deactivationTimestamp") + ) { + object.deactivationTimestamp = $root.google.protobuf.Timestamp.toObject( + message.deactivationTimestamp, + options, + ); + if (options.oneofs) + object._deactivationTimestamp = "deactivationTimestamp"; + } + return object; + }; - /** - * UpdatePublisher publisherId. - * @member {number|null|undefined} publisherId - * @memberof pyth_lazer_transaction.UpdatePublisher - * @instance - */ - UpdatePublisher.prototype.publisherId = null; - - /** - * UpdatePublisher setPublisherName. - * @member {pyth_lazer_transaction.ISetPublisherName|null|undefined} setPublisherName - * @memberof pyth_lazer_transaction.UpdatePublisher - * @instance - */ - UpdatePublisher.prototype.setPublisherName = null; - - /** - * UpdatePublisher addPublisherPublicKeys. - * @member {pyth_lazer_transaction.IAddPublisherPublicKeys|null|undefined} addPublisherPublicKeys - * @memberof pyth_lazer_transaction.UpdatePublisher - * @instance - */ - UpdatePublisher.prototype.addPublisherPublicKeys = null; - - /** - * UpdatePublisher removePublisherPublicKeys. - * @member {pyth_lazer_transaction.IRemovePublisherPublicKeys|null|undefined} removePublisherPublicKeys - * @memberof pyth_lazer_transaction.UpdatePublisher - * @instance - */ - UpdatePublisher.prototype.removePublisherPublicKeys = null; - - /** - * UpdatePublisher setPublisherPublicKeys. - * @member {pyth_lazer_transaction.ISetPublisherPublicKeys|null|undefined} setPublisherPublicKeys - * @memberof pyth_lazer_transaction.UpdatePublisher - * @instance - */ - UpdatePublisher.prototype.setPublisherPublicKeys = null; - - /** - * UpdatePublisher setPublisherActive. - * @member {pyth_lazer_transaction.ISetPublisherActive|null|undefined} setPublisherActive - * @memberof pyth_lazer_transaction.UpdatePublisher - * @instance - */ - UpdatePublisher.prototype.setPublisherActive = null; - - /** - * UpdatePublisher removePublisher. - * @member {google.protobuf.IEmpty|null|undefined} removePublisher - * @memberof pyth_lazer_transaction.UpdatePublisher - * @instance - */ - UpdatePublisher.prototype.removePublisher = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * UpdatePublisher _publisherId. - * @member {"publisherId"|undefined} _publisherId - * @memberof pyth_lazer_transaction.UpdatePublisher - * @instance - */ - Object.defineProperty(UpdatePublisher.prototype, "_publisherId", { - get: $util.oneOfGetter($oneOfFields = ["publisherId"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * UpdatePublisher action. - * @member {"setPublisherName"|"addPublisherPublicKeys"|"removePublisherPublicKeys"|"setPublisherPublicKeys"|"setPublisherActive"|"removePublisher"|undefined} action - * @memberof pyth_lazer_transaction.UpdatePublisher - * @instance - */ - Object.defineProperty(UpdatePublisher.prototype, "action", { - get: $util.oneOfGetter($oneOfFields = ["setPublisherName", "addPublisherPublicKeys", "removePublisherPublicKeys", "setPublisherPublicKeys", "setPublisherActive", "removePublisher"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new UpdatePublisher instance using the specified properties. - * @function create - * @memberof pyth_lazer_transaction.UpdatePublisher - * @static - * @param {pyth_lazer_transaction.IUpdatePublisher=} [properties] Properties to set - * @returns {pyth_lazer_transaction.UpdatePublisher} UpdatePublisher instance - */ - UpdatePublisher.create = function create(properties) { - return new UpdatePublisher(properties); - }; - - /** - * Encodes the specified UpdatePublisher message. Does not implicitly {@link pyth_lazer_transaction.UpdatePublisher.verify|verify} messages. - * @function encode - * @memberof pyth_lazer_transaction.UpdatePublisher - * @static - * @param {pyth_lazer_transaction.IUpdatePublisher} message UpdatePublisher message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdatePublisher.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.publisherId != null && Object.hasOwnProperty.call(message, "publisherId")) - writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.publisherId); - if (message.setPublisherName != null && Object.hasOwnProperty.call(message, "setPublisherName")) - $root.pyth_lazer_transaction.SetPublisherName.encode(message.setPublisherName, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); - if (message.addPublisherPublicKeys != null && Object.hasOwnProperty.call(message, "addPublisherPublicKeys")) - $root.pyth_lazer_transaction.AddPublisherPublicKeys.encode(message.addPublisherPublicKeys, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); - if (message.removePublisherPublicKeys != null && Object.hasOwnProperty.call(message, "removePublisherPublicKeys")) - $root.pyth_lazer_transaction.RemovePublisherPublicKeys.encode(message.removePublisherPublicKeys, writer.uint32(/* id 103, wireType 2 =*/826).fork()).ldelim(); - if (message.setPublisherPublicKeys != null && Object.hasOwnProperty.call(message, "setPublisherPublicKeys")) - $root.pyth_lazer_transaction.SetPublisherPublicKeys.encode(message.setPublisherPublicKeys, writer.uint32(/* id 104, wireType 2 =*/834).fork()).ldelim(); - if (message.setPublisherActive != null && Object.hasOwnProperty.call(message, "setPublisherActive")) - $root.pyth_lazer_transaction.SetPublisherActive.encode(message.setPublisherActive, writer.uint32(/* id 105, wireType 2 =*/842).fork()).ldelim(); - if (message.removePublisher != null && Object.hasOwnProperty.call(message, "removePublisher")) - $root.google.protobuf.Empty.encode(message.removePublisher, writer.uint32(/* id 199, wireType 2 =*/1594).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpdatePublisher message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdatePublisher.verify|verify} messages. - * @function encodeDelimited - * @memberof pyth_lazer_transaction.UpdatePublisher - * @static - * @param {pyth_lazer_transaction.IUpdatePublisher} message UpdatePublisher message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdatePublisher.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdatePublisher message from the specified reader or buffer. - * @function decode - * @memberof pyth_lazer_transaction.UpdatePublisher - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pyth_lazer_transaction.UpdatePublisher} UpdatePublisher - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdatePublisher.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.UpdatePublisher(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.publisherId = reader.uint32(); - break; - } - case 101: { - message.setPublisherName = $root.pyth_lazer_transaction.SetPublisherName.decode(reader, reader.uint32()); - break; - } - case 102: { - message.addPublisherPublicKeys = $root.pyth_lazer_transaction.AddPublisherPublicKeys.decode(reader, reader.uint32()); - break; - } - case 103: { - message.removePublisherPublicKeys = $root.pyth_lazer_transaction.RemovePublisherPublicKeys.decode(reader, reader.uint32()); - break; - } - case 104: { - message.setPublisherPublicKeys = $root.pyth_lazer_transaction.SetPublisherPublicKeys.decode(reader, reader.uint32()); - break; - } - case 105: { - message.setPublisherActive = $root.pyth_lazer_transaction.SetPublisherActive.decode(reader, reader.uint32()); - break; - } - case 199: { - message.removePublisher = $root.google.protobuf.Empty.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdatePublisher message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pyth_lazer_transaction.UpdatePublisher - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pyth_lazer_transaction.UpdatePublisher} UpdatePublisher - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdatePublisher.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdatePublisher message. - * @function verify - * @memberof pyth_lazer_transaction.UpdatePublisher - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdatePublisher.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.publisherId != null && message.hasOwnProperty("publisherId")) { - properties._publisherId = 1; - if (!$util.isInteger(message.publisherId)) - return "publisherId: integer expected"; - } - if (message.setPublisherName != null && message.hasOwnProperty("setPublisherName")) { - properties.action = 1; - { - var error = $root.pyth_lazer_transaction.SetPublisherName.verify(message.setPublisherName); - if (error) - return "setPublisherName." + error; - } - } - if (message.addPublisherPublicKeys != null && message.hasOwnProperty("addPublisherPublicKeys")) { - if (properties.action === 1) - return "action: multiple values"; - properties.action = 1; - { - var error = $root.pyth_lazer_transaction.AddPublisherPublicKeys.verify(message.addPublisherPublicKeys); - if (error) - return "addPublisherPublicKeys." + error; - } - } - if (message.removePublisherPublicKeys != null && message.hasOwnProperty("removePublisherPublicKeys")) { - if (properties.action === 1) - return "action: multiple values"; - properties.action = 1; - { - var error = $root.pyth_lazer_transaction.RemovePublisherPublicKeys.verify(message.removePublisherPublicKeys); - if (error) - return "removePublisherPublicKeys." + error; - } - } - if (message.setPublisherPublicKeys != null && message.hasOwnProperty("setPublisherPublicKeys")) { - if (properties.action === 1) - return "action: multiple values"; - properties.action = 1; - { - var error = $root.pyth_lazer_transaction.SetPublisherPublicKeys.verify(message.setPublisherPublicKeys); - if (error) - return "setPublisherPublicKeys." + error; - } - } - if (message.setPublisherActive != null && message.hasOwnProperty("setPublisherActive")) { - if (properties.action === 1) - return "action: multiple values"; - properties.action = 1; - { - var error = $root.pyth_lazer_transaction.SetPublisherActive.verify(message.setPublisherActive); - if (error) - return "setPublisherActive." + error; - } - } - if (message.removePublisher != null && message.hasOwnProperty("removePublisher")) { - if (properties.action === 1) - return "action: multiple values"; - properties.action = 1; - { - var error = $root.google.protobuf.Empty.verify(message.removePublisher); - if (error) - return "removePublisher." + error; - } - } - return null; - }; - - /** - * Creates an UpdatePublisher message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pyth_lazer_transaction.UpdatePublisher - * @static - * @param {Object.} object Plain object - * @returns {pyth_lazer_transaction.UpdatePublisher} UpdatePublisher - */ - UpdatePublisher.fromObject = function fromObject(object) { - if (object instanceof $root.pyth_lazer_transaction.UpdatePublisher) - return object; - var message = new $root.pyth_lazer_transaction.UpdatePublisher(); - if (object.publisherId != null) - message.publisherId = object.publisherId >>> 0; - if (object.setPublisherName != null) { - if (typeof object.setPublisherName !== "object") - throw TypeError(".pyth_lazer_transaction.UpdatePublisher.setPublisherName: object expected"); - message.setPublisherName = $root.pyth_lazer_transaction.SetPublisherName.fromObject(object.setPublisherName); - } - if (object.addPublisherPublicKeys != null) { - if (typeof object.addPublisherPublicKeys !== "object") - throw TypeError(".pyth_lazer_transaction.UpdatePublisher.addPublisherPublicKeys: object expected"); - message.addPublisherPublicKeys = $root.pyth_lazer_transaction.AddPublisherPublicKeys.fromObject(object.addPublisherPublicKeys); - } - if (object.removePublisherPublicKeys != null) { - if (typeof object.removePublisherPublicKeys !== "object") - throw TypeError(".pyth_lazer_transaction.UpdatePublisher.removePublisherPublicKeys: object expected"); - message.removePublisherPublicKeys = $root.pyth_lazer_transaction.RemovePublisherPublicKeys.fromObject(object.removePublisherPublicKeys); - } - if (object.setPublisherPublicKeys != null) { - if (typeof object.setPublisherPublicKeys !== "object") - throw TypeError(".pyth_lazer_transaction.UpdatePublisher.setPublisherPublicKeys: object expected"); - message.setPublisherPublicKeys = $root.pyth_lazer_transaction.SetPublisherPublicKeys.fromObject(object.setPublisherPublicKeys); - } - if (object.setPublisherActive != null) { - if (typeof object.setPublisherActive !== "object") - throw TypeError(".pyth_lazer_transaction.UpdatePublisher.setPublisherActive: object expected"); - message.setPublisherActive = $root.pyth_lazer_transaction.SetPublisherActive.fromObject(object.setPublisherActive); - } - if (object.removePublisher != null) { - if (typeof object.removePublisher !== "object") - throw TypeError(".pyth_lazer_transaction.UpdatePublisher.removePublisher: object expected"); - message.removePublisher = $root.google.protobuf.Empty.fromObject(object.removePublisher); - } - return message; - }; - - /** - * Creates a plain object from an UpdatePublisher message. Also converts values to other types if specified. - * @function toObject - * @memberof pyth_lazer_transaction.UpdatePublisher - * @static - * @param {pyth_lazer_transaction.UpdatePublisher} message UpdatePublisher - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdatePublisher.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.publisherId != null && message.hasOwnProperty("publisherId")) { - object.publisherId = message.publisherId; - if (options.oneofs) - object._publisherId = "publisherId"; - } - if (message.setPublisherName != null && message.hasOwnProperty("setPublisherName")) { - object.setPublisherName = $root.pyth_lazer_transaction.SetPublisherName.toObject(message.setPublisherName, options); - if (options.oneofs) - object.action = "setPublisherName"; - } - if (message.addPublisherPublicKeys != null && message.hasOwnProperty("addPublisherPublicKeys")) { - object.addPublisherPublicKeys = $root.pyth_lazer_transaction.AddPublisherPublicKeys.toObject(message.addPublisherPublicKeys, options); - if (options.oneofs) - object.action = "addPublisherPublicKeys"; - } - if (message.removePublisherPublicKeys != null && message.hasOwnProperty("removePublisherPublicKeys")) { - object.removePublisherPublicKeys = $root.pyth_lazer_transaction.RemovePublisherPublicKeys.toObject(message.removePublisherPublicKeys, options); - if (options.oneofs) - object.action = "removePublisherPublicKeys"; - } - if (message.setPublisherPublicKeys != null && message.hasOwnProperty("setPublisherPublicKeys")) { - object.setPublisherPublicKeys = $root.pyth_lazer_transaction.SetPublisherPublicKeys.toObject(message.setPublisherPublicKeys, options); - if (options.oneofs) - object.action = "setPublisherPublicKeys"; - } - if (message.setPublisherActive != null && message.hasOwnProperty("setPublisherActive")) { - object.setPublisherActive = $root.pyth_lazer_transaction.SetPublisherActive.toObject(message.setPublisherActive, options); - if (options.oneofs) - object.action = "setPublisherActive"; - } - if (message.removePublisher != null && message.hasOwnProperty("removePublisher")) { - object.removePublisher = $root.google.protobuf.Empty.toObject(message.removePublisher, options); - if (options.oneofs) - object.action = "removePublisher"; - } - return object; - }; - - /** - * Converts this UpdatePublisher to JSON. - * @function toJSON - * @memberof pyth_lazer_transaction.UpdatePublisher - * @instance - * @returns {Object.} JSON object - */ - UpdatePublisher.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdatePublisher - * @function getTypeUrl - * @memberof pyth_lazer_transaction.UpdatePublisher - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdatePublisher.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pyth_lazer_transaction.UpdatePublisher"; - }; + /** + * Converts this DeactivateFeed to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.DeactivateFeed + * @instance + * @returns {Object.} JSON object + */ + DeactivateFeed.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return UpdatePublisher; - })(); + /** + * Gets the default type url for DeactivateFeed + * @function getTypeUrl + * @memberof pyth_lazer_transaction.DeactivateFeed + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeactivateFeed.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.DeactivateFeed"; + }; - pyth_lazer_transaction.SetPublisherName = (function() { - - /** - * Properties of a SetPublisherName. - * @memberof pyth_lazer_transaction - * @interface ISetPublisherName - * @property {string|null} [name] SetPublisherName name - */ - - /** - * Constructs a new SetPublisherName. - * @memberof pyth_lazer_transaction - * @classdesc Represents a SetPublisherName. - * @implements ISetPublisherName - * @constructor - * @param {pyth_lazer_transaction.ISetPublisherName=} [properties] Properties to set - */ - function SetPublisherName(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + return DeactivateFeed; + })(); - /** - * SetPublisherName name. - * @member {string|null|undefined} name - * @memberof pyth_lazer_transaction.SetPublisherName - * @instance - */ - SetPublisherName.prototype.name = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * SetPublisherName _name. - * @member {"name"|undefined} _name - * @memberof pyth_lazer_transaction.SetPublisherName - * @instance - */ - Object.defineProperty(SetPublisherName.prototype, "_name", { - get: $util.oneOfGetter($oneOfFields = ["name"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new SetPublisherName instance using the specified properties. - * @function create - * @memberof pyth_lazer_transaction.SetPublisherName - * @static - * @param {pyth_lazer_transaction.ISetPublisherName=} [properties] Properties to set - * @returns {pyth_lazer_transaction.SetPublisherName} SetPublisherName instance - */ - SetPublisherName.create = function create(properties) { - return new SetPublisherName(properties); - }; - - /** - * Encodes the specified SetPublisherName message. Does not implicitly {@link pyth_lazer_transaction.SetPublisherName.verify|verify} messages. - * @function encode - * @memberof pyth_lazer_transaction.SetPublisherName - * @static - * @param {pyth_lazer_transaction.ISetPublisherName} message SetPublisherName message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetPublisherName.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); - return writer; - }; - - /** - * Encodes the specified SetPublisherName message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetPublisherName.verify|verify} messages. - * @function encodeDelimited - * @memberof pyth_lazer_transaction.SetPublisherName - * @static - * @param {pyth_lazer_transaction.ISetPublisherName} message SetPublisherName message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetPublisherName.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SetPublisherName message from the specified reader or buffer. - * @function decode - * @memberof pyth_lazer_transaction.SetPublisherName - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pyth_lazer_transaction.SetPublisherName} SetPublisherName - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetPublisherName.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.SetPublisherName(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SetPublisherName message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pyth_lazer_transaction.SetPublisherName - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pyth_lazer_transaction.SetPublisherName} SetPublisherName - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetPublisherName.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SetPublisherName message. - * @function verify - * @memberof pyth_lazer_transaction.SetPublisherName - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SetPublisherName.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) { - properties._name = 1; - if (!$util.isString(message.name)) - return "name: string expected"; - } - return null; - }; - - /** - * Creates a SetPublisherName message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pyth_lazer_transaction.SetPublisherName - * @static - * @param {Object.} object Plain object - * @returns {pyth_lazer_transaction.SetPublisherName} SetPublisherName - */ - SetPublisherName.fromObject = function fromObject(object) { - if (object instanceof $root.pyth_lazer_transaction.SetPublisherName) - return object; - var message = new $root.pyth_lazer_transaction.SetPublisherName(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a SetPublisherName message. Also converts values to other types if specified. - * @function toObject - * @memberof pyth_lazer_transaction.SetPublisherName - * @static - * @param {pyth_lazer_transaction.SetPublisherName} message SetPublisherName - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SetPublisherName.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.name != null && message.hasOwnProperty("name")) { - object.name = message.name; - if (options.oneofs) - object._name = "name"; - } - return object; - }; - - /** - * Converts this SetPublisherName to JSON. - * @function toJSON - * @memberof pyth_lazer_transaction.SetPublisherName - * @instance - * @returns {Object.} JSON object - */ - SetPublisherName.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SetPublisherName - * @function getTypeUrl - * @memberof pyth_lazer_transaction.SetPublisherName - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SetPublisherName.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pyth_lazer_transaction.SetPublisherName"; - }; + pyth_lazer_transaction.DynamicValue = (function () { + /** + * Properties of a DynamicValue. + * @memberof pyth_lazer_transaction + * @interface IDynamicValue + * @property {string|null} [stringValue] DynamicValue stringValue + * @property {number|null} [doubleValue] DynamicValue doubleValue + * @property {number|Long|null} [uintValue] DynamicValue uintValue + * @property {number|Long|null} [intValue] DynamicValue intValue + * @property {boolean|null} [boolValue] DynamicValue boolValue + * @property {Uint8Array|null} [bytesValue] DynamicValue bytesValue + * @property {google.protobuf.IDuration|null} [durationValue] DynamicValue durationValue + * @property {google.protobuf.ITimestamp|null} [timestampValue] DynamicValue timestampValue + * @property {pyth_lazer_transaction.DynamicValue.IList|null} [list] DynamicValue list + * @property {pyth_lazer_transaction.DynamicValue.IMap|null} [map] DynamicValue map + */ - return SetPublisherName; - })(); + /** + * Constructs a new DynamicValue. + * @memberof pyth_lazer_transaction + * @classdesc Represents a DynamicValue. + * @implements IDynamicValue + * @constructor + * @param {pyth_lazer_transaction.IDynamicValue=} [properties] Properties to set + */ + function DynamicValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + } - pyth_lazer_transaction.AddPublisherPublicKeys = (function() { - - /** - * Properties of an AddPublisherPublicKeys. - * @memberof pyth_lazer_transaction - * @interface IAddPublisherPublicKeys - * @property {Array.|null} [publicKeys] AddPublisherPublicKeys publicKeys - */ - - /** - * Constructs a new AddPublisherPublicKeys. - * @memberof pyth_lazer_transaction - * @classdesc Represents an AddPublisherPublicKeys. - * @implements IAddPublisherPublicKeys - * @constructor - * @param {pyth_lazer_transaction.IAddPublisherPublicKeys=} [properties] Properties to set - */ - function AddPublisherPublicKeys(properties) { - this.publicKeys = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * DynamicValue stringValue. + * @member {string|null|undefined} stringValue + * @memberof pyth_lazer_transaction.DynamicValue + * @instance + */ + DynamicValue.prototype.stringValue = null; - /** - * AddPublisherPublicKeys publicKeys. - * @member {Array.} publicKeys - * @memberof pyth_lazer_transaction.AddPublisherPublicKeys - * @instance - */ - AddPublisherPublicKeys.prototype.publicKeys = $util.emptyArray; - - /** - * Creates a new AddPublisherPublicKeys instance using the specified properties. - * @function create - * @memberof pyth_lazer_transaction.AddPublisherPublicKeys - * @static - * @param {pyth_lazer_transaction.IAddPublisherPublicKeys=} [properties] Properties to set - * @returns {pyth_lazer_transaction.AddPublisherPublicKeys} AddPublisherPublicKeys instance - */ - AddPublisherPublicKeys.create = function create(properties) { - return new AddPublisherPublicKeys(properties); - }; - - /** - * Encodes the specified AddPublisherPublicKeys message. Does not implicitly {@link pyth_lazer_transaction.AddPublisherPublicKeys.verify|verify} messages. - * @function encode - * @memberof pyth_lazer_transaction.AddPublisherPublicKeys - * @static - * @param {pyth_lazer_transaction.IAddPublisherPublicKeys} message AddPublisherPublicKeys message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AddPublisherPublicKeys.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.publicKeys != null && message.publicKeys.length) - for (var i = 0; i < message.publicKeys.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.publicKeys[i]); - return writer; - }; - - /** - * Encodes the specified AddPublisherPublicKeys message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddPublisherPublicKeys.verify|verify} messages. - * @function encodeDelimited - * @memberof pyth_lazer_transaction.AddPublisherPublicKeys - * @static - * @param {pyth_lazer_transaction.IAddPublisherPublicKeys} message AddPublisherPublicKeys message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AddPublisherPublicKeys.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AddPublisherPublicKeys message from the specified reader or buffer. - * @function decode - * @memberof pyth_lazer_transaction.AddPublisherPublicKeys - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pyth_lazer_transaction.AddPublisherPublicKeys} AddPublisherPublicKeys - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AddPublisherPublicKeys.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.AddPublisherPublicKeys(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.publicKeys && message.publicKeys.length)) - message.publicKeys = []; - message.publicKeys.push(reader.bytes()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AddPublisherPublicKeys message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pyth_lazer_transaction.AddPublisherPublicKeys - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pyth_lazer_transaction.AddPublisherPublicKeys} AddPublisherPublicKeys - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AddPublisherPublicKeys.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AddPublisherPublicKeys message. - * @function verify - * @memberof pyth_lazer_transaction.AddPublisherPublicKeys - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AddPublisherPublicKeys.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.publicKeys != null && message.hasOwnProperty("publicKeys")) { - if (!Array.isArray(message.publicKeys)) - return "publicKeys: array expected"; - for (var i = 0; i < message.publicKeys.length; ++i) - if (!(message.publicKeys[i] && typeof message.publicKeys[i].length === "number" || $util.isString(message.publicKeys[i]))) - return "publicKeys: buffer[] expected"; - } - return null; - }; - - /** - * Creates an AddPublisherPublicKeys message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pyth_lazer_transaction.AddPublisherPublicKeys - * @static - * @param {Object.} object Plain object - * @returns {pyth_lazer_transaction.AddPublisherPublicKeys} AddPublisherPublicKeys - */ - AddPublisherPublicKeys.fromObject = function fromObject(object) { - if (object instanceof $root.pyth_lazer_transaction.AddPublisherPublicKeys) - return object; - var message = new $root.pyth_lazer_transaction.AddPublisherPublicKeys(); - if (object.publicKeys) { - if (!Array.isArray(object.publicKeys)) - throw TypeError(".pyth_lazer_transaction.AddPublisherPublicKeys.publicKeys: array expected"); - message.publicKeys = []; - for (var i = 0; i < object.publicKeys.length; ++i) - if (typeof object.publicKeys[i] === "string") - $util.base64.decode(object.publicKeys[i], message.publicKeys[i] = $util.newBuffer($util.base64.length(object.publicKeys[i])), 0); - else if (object.publicKeys[i].length >= 0) - message.publicKeys[i] = object.publicKeys[i]; - } - return message; - }; - - /** - * Creates a plain object from an AddPublisherPublicKeys message. Also converts values to other types if specified. - * @function toObject - * @memberof pyth_lazer_transaction.AddPublisherPublicKeys - * @static - * @param {pyth_lazer_transaction.AddPublisherPublicKeys} message AddPublisherPublicKeys - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AddPublisherPublicKeys.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.publicKeys = []; - if (message.publicKeys && message.publicKeys.length) { - object.publicKeys = []; - for (var j = 0; j < message.publicKeys.length; ++j) - object.publicKeys[j] = options.bytes === String ? $util.base64.encode(message.publicKeys[j], 0, message.publicKeys[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.publicKeys[j]) : message.publicKeys[j]; - } - return object; - }; - - /** - * Converts this AddPublisherPublicKeys to JSON. - * @function toJSON - * @memberof pyth_lazer_transaction.AddPublisherPublicKeys - * @instance - * @returns {Object.} JSON object - */ - AddPublisherPublicKeys.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AddPublisherPublicKeys - * @function getTypeUrl - * @memberof pyth_lazer_transaction.AddPublisherPublicKeys - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AddPublisherPublicKeys.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pyth_lazer_transaction.AddPublisherPublicKeys"; - }; + /** + * DynamicValue doubleValue. + * @member {number|null|undefined} doubleValue + * @memberof pyth_lazer_transaction.DynamicValue + * @instance + */ + DynamicValue.prototype.doubleValue = null; - return AddPublisherPublicKeys; - })(); + /** + * DynamicValue uintValue. + * @member {number|Long|null|undefined} uintValue + * @memberof pyth_lazer_transaction.DynamicValue + * @instance + */ + DynamicValue.prototype.uintValue = null; - pyth_lazer_transaction.RemovePublisherPublicKeys = (function() { - - /** - * Properties of a RemovePublisherPublicKeys. - * @memberof pyth_lazer_transaction - * @interface IRemovePublisherPublicKeys - * @property {Array.|null} [publicKeys] RemovePublisherPublicKeys publicKeys - */ - - /** - * Constructs a new RemovePublisherPublicKeys. - * @memberof pyth_lazer_transaction - * @classdesc Represents a RemovePublisherPublicKeys. - * @implements IRemovePublisherPublicKeys - * @constructor - * @param {pyth_lazer_transaction.IRemovePublisherPublicKeys=} [properties] Properties to set - */ - function RemovePublisherPublicKeys(properties) { - this.publicKeys = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * DynamicValue intValue. + * @member {number|Long|null|undefined} intValue + * @memberof pyth_lazer_transaction.DynamicValue + * @instance + */ + DynamicValue.prototype.intValue = null; - /** - * RemovePublisherPublicKeys publicKeys. - * @member {Array.} publicKeys - * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys - * @instance - */ - RemovePublisherPublicKeys.prototype.publicKeys = $util.emptyArray; - - /** - * Creates a new RemovePublisherPublicKeys instance using the specified properties. - * @function create - * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys - * @static - * @param {pyth_lazer_transaction.IRemovePublisherPublicKeys=} [properties] Properties to set - * @returns {pyth_lazer_transaction.RemovePublisherPublicKeys} RemovePublisherPublicKeys instance - */ - RemovePublisherPublicKeys.create = function create(properties) { - return new RemovePublisherPublicKeys(properties); - }; - - /** - * Encodes the specified RemovePublisherPublicKeys message. Does not implicitly {@link pyth_lazer_transaction.RemovePublisherPublicKeys.verify|verify} messages. - * @function encode - * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys - * @static - * @param {pyth_lazer_transaction.IRemovePublisherPublicKeys} message RemovePublisherPublicKeys message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RemovePublisherPublicKeys.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.publicKeys != null && message.publicKeys.length) - for (var i = 0; i < message.publicKeys.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.publicKeys[i]); - return writer; - }; - - /** - * Encodes the specified RemovePublisherPublicKeys message, length delimited. Does not implicitly {@link pyth_lazer_transaction.RemovePublisherPublicKeys.verify|verify} messages. - * @function encodeDelimited - * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys - * @static - * @param {pyth_lazer_transaction.IRemovePublisherPublicKeys} message RemovePublisherPublicKeys message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RemovePublisherPublicKeys.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RemovePublisherPublicKeys message from the specified reader or buffer. - * @function decode - * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pyth_lazer_transaction.RemovePublisherPublicKeys} RemovePublisherPublicKeys - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RemovePublisherPublicKeys.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.RemovePublisherPublicKeys(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.publicKeys && message.publicKeys.length)) - message.publicKeys = []; - message.publicKeys.push(reader.bytes()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RemovePublisherPublicKeys message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pyth_lazer_transaction.RemovePublisherPublicKeys} RemovePublisherPublicKeys - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RemovePublisherPublicKeys.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RemovePublisherPublicKeys message. - * @function verify - * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RemovePublisherPublicKeys.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.publicKeys != null && message.hasOwnProperty("publicKeys")) { - if (!Array.isArray(message.publicKeys)) - return "publicKeys: array expected"; - for (var i = 0; i < message.publicKeys.length; ++i) - if (!(message.publicKeys[i] && typeof message.publicKeys[i].length === "number" || $util.isString(message.publicKeys[i]))) - return "publicKeys: buffer[] expected"; - } - return null; - }; - - /** - * Creates a RemovePublisherPublicKeys message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys - * @static - * @param {Object.} object Plain object - * @returns {pyth_lazer_transaction.RemovePublisherPublicKeys} RemovePublisherPublicKeys - */ - RemovePublisherPublicKeys.fromObject = function fromObject(object) { - if (object instanceof $root.pyth_lazer_transaction.RemovePublisherPublicKeys) - return object; - var message = new $root.pyth_lazer_transaction.RemovePublisherPublicKeys(); - if (object.publicKeys) { - if (!Array.isArray(object.publicKeys)) - throw TypeError(".pyth_lazer_transaction.RemovePublisherPublicKeys.publicKeys: array expected"); - message.publicKeys = []; - for (var i = 0; i < object.publicKeys.length; ++i) - if (typeof object.publicKeys[i] === "string") - $util.base64.decode(object.publicKeys[i], message.publicKeys[i] = $util.newBuffer($util.base64.length(object.publicKeys[i])), 0); - else if (object.publicKeys[i].length >= 0) - message.publicKeys[i] = object.publicKeys[i]; - } - return message; - }; - - /** - * Creates a plain object from a RemovePublisherPublicKeys message. Also converts values to other types if specified. - * @function toObject - * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys - * @static - * @param {pyth_lazer_transaction.RemovePublisherPublicKeys} message RemovePublisherPublicKeys - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RemovePublisherPublicKeys.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.publicKeys = []; - if (message.publicKeys && message.publicKeys.length) { - object.publicKeys = []; - for (var j = 0; j < message.publicKeys.length; ++j) - object.publicKeys[j] = options.bytes === String ? $util.base64.encode(message.publicKeys[j], 0, message.publicKeys[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.publicKeys[j]) : message.publicKeys[j]; - } - return object; - }; - - /** - * Converts this RemovePublisherPublicKeys to JSON. - * @function toJSON - * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys - * @instance - * @returns {Object.} JSON object - */ - RemovePublisherPublicKeys.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RemovePublisherPublicKeys - * @function getTypeUrl - * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RemovePublisherPublicKeys.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pyth_lazer_transaction.RemovePublisherPublicKeys"; - }; + /** + * DynamicValue boolValue. + * @member {boolean|null|undefined} boolValue + * @memberof pyth_lazer_transaction.DynamicValue + * @instance + */ + DynamicValue.prototype.boolValue = null; - return RemovePublisherPublicKeys; - })(); + /** + * DynamicValue bytesValue. + * @member {Uint8Array|null|undefined} bytesValue + * @memberof pyth_lazer_transaction.DynamicValue + * @instance + */ + DynamicValue.prototype.bytesValue = null; - pyth_lazer_transaction.SetPublisherPublicKeys = (function() { - - /** - * Properties of a SetPublisherPublicKeys. - * @memberof pyth_lazer_transaction - * @interface ISetPublisherPublicKeys - * @property {Array.|null} [publicKeys] SetPublisherPublicKeys publicKeys - */ - - /** - * Constructs a new SetPublisherPublicKeys. - * @memberof pyth_lazer_transaction - * @classdesc Represents a SetPublisherPublicKeys. - * @implements ISetPublisherPublicKeys - * @constructor - * @param {pyth_lazer_transaction.ISetPublisherPublicKeys=} [properties] Properties to set - */ - function SetPublisherPublicKeys(properties) { - this.publicKeys = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * DynamicValue durationValue. + * @member {google.protobuf.IDuration|null|undefined} durationValue + * @memberof pyth_lazer_transaction.DynamicValue + * @instance + */ + DynamicValue.prototype.durationValue = null; - /** - * SetPublisherPublicKeys publicKeys. - * @member {Array.} publicKeys - * @memberof pyth_lazer_transaction.SetPublisherPublicKeys - * @instance - */ - SetPublisherPublicKeys.prototype.publicKeys = $util.emptyArray; - - /** - * Creates a new SetPublisherPublicKeys instance using the specified properties. - * @function create - * @memberof pyth_lazer_transaction.SetPublisherPublicKeys - * @static - * @param {pyth_lazer_transaction.ISetPublisherPublicKeys=} [properties] Properties to set - * @returns {pyth_lazer_transaction.SetPublisherPublicKeys} SetPublisherPublicKeys instance - */ - SetPublisherPublicKeys.create = function create(properties) { - return new SetPublisherPublicKeys(properties); - }; - - /** - * Encodes the specified SetPublisherPublicKeys message. Does not implicitly {@link pyth_lazer_transaction.SetPublisherPublicKeys.verify|verify} messages. - * @function encode - * @memberof pyth_lazer_transaction.SetPublisherPublicKeys - * @static - * @param {pyth_lazer_transaction.ISetPublisherPublicKeys} message SetPublisherPublicKeys message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetPublisherPublicKeys.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.publicKeys != null && message.publicKeys.length) - for (var i = 0; i < message.publicKeys.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.publicKeys[i]); - return writer; - }; - - /** - * Encodes the specified SetPublisherPublicKeys message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetPublisherPublicKeys.verify|verify} messages. - * @function encodeDelimited - * @memberof pyth_lazer_transaction.SetPublisherPublicKeys - * @static - * @param {pyth_lazer_transaction.ISetPublisherPublicKeys} message SetPublisherPublicKeys message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetPublisherPublicKeys.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SetPublisherPublicKeys message from the specified reader or buffer. - * @function decode - * @memberof pyth_lazer_transaction.SetPublisherPublicKeys - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pyth_lazer_transaction.SetPublisherPublicKeys} SetPublisherPublicKeys - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetPublisherPublicKeys.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.SetPublisherPublicKeys(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.publicKeys && message.publicKeys.length)) - message.publicKeys = []; - message.publicKeys.push(reader.bytes()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SetPublisherPublicKeys message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pyth_lazer_transaction.SetPublisherPublicKeys - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pyth_lazer_transaction.SetPublisherPublicKeys} SetPublisherPublicKeys - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetPublisherPublicKeys.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SetPublisherPublicKeys message. - * @function verify - * @memberof pyth_lazer_transaction.SetPublisherPublicKeys - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SetPublisherPublicKeys.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.publicKeys != null && message.hasOwnProperty("publicKeys")) { - if (!Array.isArray(message.publicKeys)) - return "publicKeys: array expected"; - for (var i = 0; i < message.publicKeys.length; ++i) - if (!(message.publicKeys[i] && typeof message.publicKeys[i].length === "number" || $util.isString(message.publicKeys[i]))) - return "publicKeys: buffer[] expected"; - } - return null; - }; - - /** - * Creates a SetPublisherPublicKeys message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pyth_lazer_transaction.SetPublisherPublicKeys - * @static - * @param {Object.} object Plain object - * @returns {pyth_lazer_transaction.SetPublisherPublicKeys} SetPublisherPublicKeys - */ - SetPublisherPublicKeys.fromObject = function fromObject(object) { - if (object instanceof $root.pyth_lazer_transaction.SetPublisherPublicKeys) - return object; - var message = new $root.pyth_lazer_transaction.SetPublisherPublicKeys(); - if (object.publicKeys) { - if (!Array.isArray(object.publicKeys)) - throw TypeError(".pyth_lazer_transaction.SetPublisherPublicKeys.publicKeys: array expected"); - message.publicKeys = []; - for (var i = 0; i < object.publicKeys.length; ++i) - if (typeof object.publicKeys[i] === "string") - $util.base64.decode(object.publicKeys[i], message.publicKeys[i] = $util.newBuffer($util.base64.length(object.publicKeys[i])), 0); - else if (object.publicKeys[i].length >= 0) - message.publicKeys[i] = object.publicKeys[i]; - } - return message; - }; - - /** - * Creates a plain object from a SetPublisherPublicKeys message. Also converts values to other types if specified. - * @function toObject - * @memberof pyth_lazer_transaction.SetPublisherPublicKeys - * @static - * @param {pyth_lazer_transaction.SetPublisherPublicKeys} message SetPublisherPublicKeys - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SetPublisherPublicKeys.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.publicKeys = []; - if (message.publicKeys && message.publicKeys.length) { - object.publicKeys = []; - for (var j = 0; j < message.publicKeys.length; ++j) - object.publicKeys[j] = options.bytes === String ? $util.base64.encode(message.publicKeys[j], 0, message.publicKeys[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.publicKeys[j]) : message.publicKeys[j]; - } - return object; - }; - - /** - * Converts this SetPublisherPublicKeys to JSON. - * @function toJSON - * @memberof pyth_lazer_transaction.SetPublisherPublicKeys - * @instance - * @returns {Object.} JSON object - */ - SetPublisherPublicKeys.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SetPublisherPublicKeys - * @function getTypeUrl - * @memberof pyth_lazer_transaction.SetPublisherPublicKeys - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SetPublisherPublicKeys.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pyth_lazer_transaction.SetPublisherPublicKeys"; - }; + /** + * DynamicValue timestampValue. + * @member {google.protobuf.ITimestamp|null|undefined} timestampValue + * @memberof pyth_lazer_transaction.DynamicValue + * @instance + */ + DynamicValue.prototype.timestampValue = null; - return SetPublisherPublicKeys; - })(); + /** + * DynamicValue list. + * @member {pyth_lazer_transaction.DynamicValue.IList|null|undefined} list + * @memberof pyth_lazer_transaction.DynamicValue + * @instance + */ + DynamicValue.prototype.list = null; - pyth_lazer_transaction.SetPublisherActive = (function() { - - /** - * Properties of a SetPublisherActive. - * @memberof pyth_lazer_transaction - * @interface ISetPublisherActive - * @property {boolean|null} [isActive] SetPublisherActive isActive - */ - - /** - * Constructs a new SetPublisherActive. - * @memberof pyth_lazer_transaction - * @classdesc Represents a SetPublisherActive. - * @implements ISetPublisherActive - * @constructor - * @param {pyth_lazer_transaction.ISetPublisherActive=} [properties] Properties to set - */ - function SetPublisherActive(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * DynamicValue map. + * @member {pyth_lazer_transaction.DynamicValue.IMap|null|undefined} map + * @memberof pyth_lazer_transaction.DynamicValue + * @instance + */ + DynamicValue.prototype.map = null; - /** - * SetPublisherActive isActive. - * @member {boolean|null|undefined} isActive - * @memberof pyth_lazer_transaction.SetPublisherActive - * @instance - */ - SetPublisherActive.prototype.isActive = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * SetPublisherActive _isActive. - * @member {"isActive"|undefined} _isActive - * @memberof pyth_lazer_transaction.SetPublisherActive - * @instance - */ - Object.defineProperty(SetPublisherActive.prototype, "_isActive", { - get: $util.oneOfGetter($oneOfFields = ["isActive"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new SetPublisherActive instance using the specified properties. - * @function create - * @memberof pyth_lazer_transaction.SetPublisherActive - * @static - * @param {pyth_lazer_transaction.ISetPublisherActive=} [properties] Properties to set - * @returns {pyth_lazer_transaction.SetPublisherActive} SetPublisherActive instance - */ - SetPublisherActive.create = function create(properties) { - return new SetPublisherActive(properties); - }; - - /** - * Encodes the specified SetPublisherActive message. Does not implicitly {@link pyth_lazer_transaction.SetPublisherActive.verify|verify} messages. - * @function encode - * @memberof pyth_lazer_transaction.SetPublisherActive - * @static - * @param {pyth_lazer_transaction.ISetPublisherActive} message SetPublisherActive message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetPublisherActive.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.isActive != null && Object.hasOwnProperty.call(message, "isActive")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.isActive); - return writer; - }; - - /** - * Encodes the specified SetPublisherActive message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetPublisherActive.verify|verify} messages. - * @function encodeDelimited - * @memberof pyth_lazer_transaction.SetPublisherActive - * @static - * @param {pyth_lazer_transaction.ISetPublisherActive} message SetPublisherActive message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetPublisherActive.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SetPublisherActive message from the specified reader or buffer. - * @function decode - * @memberof pyth_lazer_transaction.SetPublisherActive - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pyth_lazer_transaction.SetPublisherActive} SetPublisherActive - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetPublisherActive.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.SetPublisherActive(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.isActive = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SetPublisherActive message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pyth_lazer_transaction.SetPublisherActive - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pyth_lazer_transaction.SetPublisherActive} SetPublisherActive - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetPublisherActive.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SetPublisherActive message. - * @function verify - * @memberof pyth_lazer_transaction.SetPublisherActive - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SetPublisherActive.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.isActive != null && message.hasOwnProperty("isActive")) { - properties._isActive = 1; - if (typeof message.isActive !== "boolean") - return "isActive: boolean expected"; - } - return null; - }; - - /** - * Creates a SetPublisherActive message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pyth_lazer_transaction.SetPublisherActive - * @static - * @param {Object.} object Plain object - * @returns {pyth_lazer_transaction.SetPublisherActive} SetPublisherActive - */ - SetPublisherActive.fromObject = function fromObject(object) { - if (object instanceof $root.pyth_lazer_transaction.SetPublisherActive) - return object; - var message = new $root.pyth_lazer_transaction.SetPublisherActive(); - if (object.isActive != null) - message.isActive = Boolean(object.isActive); - return message; - }; - - /** - * Creates a plain object from a SetPublisherActive message. Also converts values to other types if specified. - * @function toObject - * @memberof pyth_lazer_transaction.SetPublisherActive - * @static - * @param {pyth_lazer_transaction.SetPublisherActive} message SetPublisherActive - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SetPublisherActive.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.isActive != null && message.hasOwnProperty("isActive")) { - object.isActive = message.isActive; - if (options.oneofs) - object._isActive = "isActive"; - } - return object; - }; - - /** - * Converts this SetPublisherActive to JSON. - * @function toJSON - * @memberof pyth_lazer_transaction.SetPublisherActive - * @instance - * @returns {Object.} JSON object - */ - SetPublisherActive.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SetPublisherActive - * @function getTypeUrl - * @memberof pyth_lazer_transaction.SetPublisherActive - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SetPublisherActive.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pyth_lazer_transaction.SetPublisherActive"; - }; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - return SetPublisherActive; - })(); + /** + * DynamicValue value. + * @member {"stringValue"|"doubleValue"|"uintValue"|"intValue"|"boolValue"|"bytesValue"|"durationValue"|"timestampValue"|"list"|"map"|undefined} value + * @memberof pyth_lazer_transaction.DynamicValue + * @instance + */ + Object.defineProperty(DynamicValue.prototype, "value", { + get: $util.oneOfGetter( + ($oneOfFields = [ + "stringValue", + "doubleValue", + "uintValue", + "intValue", + "boolValue", + "bytesValue", + "durationValue", + "timestampValue", + "list", + "map", + ]), + ), + set: $util.oneOfSetter($oneOfFields), + }); - pyth_lazer_transaction.AddFeed = (function() { - - /** - * Properties of an AddFeed. - * @memberof pyth_lazer_transaction - * @interface IAddFeed - * @property {number|null} [feedId] AddFeed feedId - * @property {pyth_lazer_transaction.DynamicValue.IMap|null} [metadata] AddFeed metadata - * @property {Array.|null} [permissionedPublishers] AddFeed permissionedPublishers - */ - - /** - * Constructs a new AddFeed. - * @memberof pyth_lazer_transaction - * @classdesc Represents an AddFeed. - * @implements IAddFeed - * @constructor - * @param {pyth_lazer_transaction.IAddFeed=} [properties] Properties to set - */ - function AddFeed(properties) { - this.permissionedPublishers = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Creates a new DynamicValue instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.DynamicValue + * @static + * @param {pyth_lazer_transaction.IDynamicValue=} [properties] Properties to set + * @returns {pyth_lazer_transaction.DynamicValue} DynamicValue instance + */ + DynamicValue.create = function create(properties) { + return new DynamicValue(properties); + }; - /** - * AddFeed feedId. - * @member {number|null|undefined} feedId - * @memberof pyth_lazer_transaction.AddFeed - * @instance - */ - AddFeed.prototype.feedId = null; - - /** - * AddFeed metadata. - * @member {pyth_lazer_transaction.DynamicValue.IMap|null|undefined} metadata - * @memberof pyth_lazer_transaction.AddFeed - * @instance - */ - AddFeed.prototype.metadata = null; - - /** - * AddFeed permissionedPublishers. - * @member {Array.} permissionedPublishers - * @memberof pyth_lazer_transaction.AddFeed - * @instance - */ - AddFeed.prototype.permissionedPublishers = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * AddFeed _feedId. - * @member {"feedId"|undefined} _feedId - * @memberof pyth_lazer_transaction.AddFeed - * @instance - */ - Object.defineProperty(AddFeed.prototype, "_feedId", { - get: $util.oneOfGetter($oneOfFields = ["feedId"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AddFeed _metadata. - * @member {"metadata"|undefined} _metadata - * @memberof pyth_lazer_transaction.AddFeed - * @instance - */ - Object.defineProperty(AddFeed.prototype, "_metadata", { - get: $util.oneOfGetter($oneOfFields = ["metadata"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new AddFeed instance using the specified properties. - * @function create - * @memberof pyth_lazer_transaction.AddFeed - * @static - * @param {pyth_lazer_transaction.IAddFeed=} [properties] Properties to set - * @returns {pyth_lazer_transaction.AddFeed} AddFeed instance - */ - AddFeed.create = function create(properties) { - return new AddFeed(properties); - }; - - /** - * Encodes the specified AddFeed message. Does not implicitly {@link pyth_lazer_transaction.AddFeed.verify|verify} messages. - * @function encode - * @memberof pyth_lazer_transaction.AddFeed - * @static - * @param {pyth_lazer_transaction.IAddFeed} message AddFeed message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AddFeed.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.feedId != null && Object.hasOwnProperty.call(message, "feedId")) - writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.feedId); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.pyth_lazer_transaction.DynamicValue.Map.encode(message.metadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.permissionedPublishers != null && message.permissionedPublishers.length) { - writer.uint32(/* id 3, wireType 2 =*/26).fork(); - for (var i = 0; i < message.permissionedPublishers.length; ++i) - writer.uint32(message.permissionedPublishers[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified AddFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddFeed.verify|verify} messages. - * @function encodeDelimited - * @memberof pyth_lazer_transaction.AddFeed - * @static - * @param {pyth_lazer_transaction.IAddFeed} message AddFeed message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AddFeed.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AddFeed message from the specified reader or buffer. - * @function decode - * @memberof pyth_lazer_transaction.AddFeed - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pyth_lazer_transaction.AddFeed} AddFeed - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AddFeed.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.AddFeed(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.feedId = reader.uint32(); - break; - } - case 2: { - message.metadata = $root.pyth_lazer_transaction.DynamicValue.Map.decode(reader, reader.uint32()); - break; - } - case 3: { - if (!(message.permissionedPublishers && message.permissionedPublishers.length)) - message.permissionedPublishers = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.permissionedPublishers.push(reader.uint32()); - } else - message.permissionedPublishers.push(reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AddFeed message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pyth_lazer_transaction.AddFeed - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pyth_lazer_transaction.AddFeed} AddFeed - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AddFeed.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AddFeed message. - * @function verify - * @memberof pyth_lazer_transaction.AddFeed - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AddFeed.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.feedId != null && message.hasOwnProperty("feedId")) { - properties._feedId = 1; - if (!$util.isInteger(message.feedId)) - return "feedId: integer expected"; - } - if (message.metadata != null && message.hasOwnProperty("metadata")) { - properties._metadata = 1; - { - var error = $root.pyth_lazer_transaction.DynamicValue.Map.verify(message.metadata); - if (error) - return "metadata." + error; - } - } - if (message.permissionedPublishers != null && message.hasOwnProperty("permissionedPublishers")) { - if (!Array.isArray(message.permissionedPublishers)) - return "permissionedPublishers: array expected"; - for (var i = 0; i < message.permissionedPublishers.length; ++i) - if (!$util.isInteger(message.permissionedPublishers[i])) - return "permissionedPublishers: integer[] expected"; - } - return null; - }; - - /** - * Creates an AddFeed message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pyth_lazer_transaction.AddFeed - * @static - * @param {Object.} object Plain object - * @returns {pyth_lazer_transaction.AddFeed} AddFeed - */ - AddFeed.fromObject = function fromObject(object) { - if (object instanceof $root.pyth_lazer_transaction.AddFeed) - return object; - var message = new $root.pyth_lazer_transaction.AddFeed(); - if (object.feedId != null) - message.feedId = object.feedId >>> 0; - if (object.metadata != null) { - if (typeof object.metadata !== "object") - throw TypeError(".pyth_lazer_transaction.AddFeed.metadata: object expected"); - message.metadata = $root.pyth_lazer_transaction.DynamicValue.Map.fromObject(object.metadata); - } - if (object.permissionedPublishers) { - if (!Array.isArray(object.permissionedPublishers)) - throw TypeError(".pyth_lazer_transaction.AddFeed.permissionedPublishers: array expected"); - message.permissionedPublishers = []; - for (var i = 0; i < object.permissionedPublishers.length; ++i) - message.permissionedPublishers[i] = object.permissionedPublishers[i] >>> 0; - } - return message; - }; - - /** - * Creates a plain object from an AddFeed message. Also converts values to other types if specified. - * @function toObject - * @memberof pyth_lazer_transaction.AddFeed - * @static - * @param {pyth_lazer_transaction.AddFeed} message AddFeed - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AddFeed.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.permissionedPublishers = []; - if (message.feedId != null && message.hasOwnProperty("feedId")) { - object.feedId = message.feedId; - if (options.oneofs) - object._feedId = "feedId"; - } - if (message.metadata != null && message.hasOwnProperty("metadata")) { - object.metadata = $root.pyth_lazer_transaction.DynamicValue.Map.toObject(message.metadata, options); - if (options.oneofs) - object._metadata = "metadata"; - } - if (message.permissionedPublishers && message.permissionedPublishers.length) { - object.permissionedPublishers = []; - for (var j = 0; j < message.permissionedPublishers.length; ++j) - object.permissionedPublishers[j] = message.permissionedPublishers[j]; - } - return object; - }; - - /** - * Converts this AddFeed to JSON. - * @function toJSON - * @memberof pyth_lazer_transaction.AddFeed - * @instance - * @returns {Object.} JSON object - */ - AddFeed.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AddFeed - * @function getTypeUrl - * @memberof pyth_lazer_transaction.AddFeed - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AddFeed.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pyth_lazer_transaction.AddFeed"; - }; + /** + * Encodes the specified DynamicValue message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.DynamicValue + * @static + * @param {pyth_lazer_transaction.IDynamicValue} message DynamicValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DynamicValue.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if ( + message.stringValue != null && + Object.hasOwnProperty.call(message, "stringValue") + ) + writer.uint32(/* id 1, wireType 2 =*/ 10).string(message.stringValue); + if ( + message.doubleValue != null && + Object.hasOwnProperty.call(message, "doubleValue") + ) + writer.uint32(/* id 2, wireType 1 =*/ 17).double(message.doubleValue); + if ( + message.uintValue != null && + Object.hasOwnProperty.call(message, "uintValue") + ) + writer.uint32(/* id 3, wireType 0 =*/ 24).uint64(message.uintValue); + if ( + message.intValue != null && + Object.hasOwnProperty.call(message, "intValue") + ) + writer.uint32(/* id 4, wireType 0 =*/ 32).sint64(message.intValue); + if ( + message.boolValue != null && + Object.hasOwnProperty.call(message, "boolValue") + ) + writer.uint32(/* id 5, wireType 0 =*/ 40).bool(message.boolValue); + if ( + message.bytesValue != null && + Object.hasOwnProperty.call(message, "bytesValue") + ) + writer.uint32(/* id 6, wireType 2 =*/ 50).bytes(message.bytesValue); + if ( + message.durationValue != null && + Object.hasOwnProperty.call(message, "durationValue") + ) + $root.google.protobuf.Duration.encode( + message.durationValue, + writer.uint32(/* id 7, wireType 2 =*/ 58).fork(), + ).ldelim(); + if ( + message.timestampValue != null && + Object.hasOwnProperty.call(message, "timestampValue") + ) + $root.google.protobuf.Timestamp.encode( + message.timestampValue, + writer.uint32(/* id 8, wireType 2 =*/ 66).fork(), + ).ldelim(); + if (message.list != null && Object.hasOwnProperty.call(message, "list")) + $root.pyth_lazer_transaction.DynamicValue.List.encode( + message.list, + writer.uint32(/* id 9, wireType 2 =*/ 74).fork(), + ).ldelim(); + if (message.map != null && Object.hasOwnProperty.call(message, "map")) + $root.pyth_lazer_transaction.DynamicValue.Map.encode( + message.map, + writer.uint32(/* id 10, wireType 2 =*/ 82).fork(), + ).ldelim(); + return writer; + }; - return AddFeed; - })(); + /** + * Encodes the specified DynamicValue message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.DynamicValue + * @static + * @param {pyth_lazer_transaction.IDynamicValue} message DynamicValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DynamicValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - pyth_lazer_transaction.UpdateFeed = (function() { - - /** - * Properties of an UpdateFeed. - * @memberof pyth_lazer_transaction - * @interface IUpdateFeed - * @property {number|null} [feedId] UpdateFeed feedId - * @property {pyth_lazer_transaction.IUpdateFeedMetadata|null} [updateFeedMetadata] UpdateFeed updateFeedMetadata - * @property {pyth_lazer_transaction.IActivateFeed|null} [activateFeed] UpdateFeed activateFeed - * @property {pyth_lazer_transaction.IDeactivateFeed|null} [deactivateFeed] UpdateFeed deactivateFeed - * @property {google.protobuf.IEmpty|null} [removeFeed] UpdateFeed removeFeed - */ - - /** - * Constructs a new UpdateFeed. - * @memberof pyth_lazer_transaction - * @classdesc Represents an UpdateFeed. - * @implements IUpdateFeed - * @constructor - * @param {pyth_lazer_transaction.IUpdateFeed=} [properties] Properties to set - */ - function UpdateFeed(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Decodes a DynamicValue message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.DynamicValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.DynamicValue} DynamicValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DynamicValue.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pyth_lazer_transaction.DynamicValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.stringValue = reader.string(); + break; + } + case 2: { + message.doubleValue = reader.double(); + break; + } + case 3: { + message.uintValue = reader.uint64(); + break; + } + case 4: { + message.intValue = reader.sint64(); + break; + } + case 5: { + message.boolValue = reader.bool(); + break; + } + case 6: { + message.bytesValue = reader.bytes(); + break; + } + case 7: { + message.durationValue = $root.google.protobuf.Duration.decode( + reader, + reader.uint32(), + ); + break; + } + case 8: { + message.timestampValue = $root.google.protobuf.Timestamp.decode( + reader, + reader.uint32(), + ); + break; + } + case 9: { + message.list = + $root.pyth_lazer_transaction.DynamicValue.List.decode( + reader, + reader.uint32(), + ); + break; + } + case 10: { + message.map = $root.pyth_lazer_transaction.DynamicValue.Map.decode( + reader, + reader.uint32(), + ); + break; + } + default: + reader.skipType(tag & 7); + break; } + } + return message; + }; - /** - * UpdateFeed feedId. - * @member {number|null|undefined} feedId - * @memberof pyth_lazer_transaction.UpdateFeed - * @instance - */ - UpdateFeed.prototype.feedId = null; - - /** - * UpdateFeed updateFeedMetadata. - * @member {pyth_lazer_transaction.IUpdateFeedMetadata|null|undefined} updateFeedMetadata - * @memberof pyth_lazer_transaction.UpdateFeed - * @instance - */ - UpdateFeed.prototype.updateFeedMetadata = null; - - /** - * UpdateFeed activateFeed. - * @member {pyth_lazer_transaction.IActivateFeed|null|undefined} activateFeed - * @memberof pyth_lazer_transaction.UpdateFeed - * @instance - */ - UpdateFeed.prototype.activateFeed = null; - - /** - * UpdateFeed deactivateFeed. - * @member {pyth_lazer_transaction.IDeactivateFeed|null|undefined} deactivateFeed - * @memberof pyth_lazer_transaction.UpdateFeed - * @instance - */ - UpdateFeed.prototype.deactivateFeed = null; - - /** - * UpdateFeed removeFeed. - * @member {google.protobuf.IEmpty|null|undefined} removeFeed - * @memberof pyth_lazer_transaction.UpdateFeed - * @instance - */ - UpdateFeed.prototype.removeFeed = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * UpdateFeed _feedId. - * @member {"feedId"|undefined} _feedId - * @memberof pyth_lazer_transaction.UpdateFeed - * @instance - */ - Object.defineProperty(UpdateFeed.prototype, "_feedId", { - get: $util.oneOfGetter($oneOfFields = ["feedId"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * UpdateFeed action. - * @member {"updateFeedMetadata"|"activateFeed"|"deactivateFeed"|"removeFeed"|undefined} action - * @memberof pyth_lazer_transaction.UpdateFeed - * @instance - */ - Object.defineProperty(UpdateFeed.prototype, "action", { - get: $util.oneOfGetter($oneOfFields = ["updateFeedMetadata", "activateFeed", "deactivateFeed", "removeFeed"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new UpdateFeed instance using the specified properties. - * @function create - * @memberof pyth_lazer_transaction.UpdateFeed - * @static - * @param {pyth_lazer_transaction.IUpdateFeed=} [properties] Properties to set - * @returns {pyth_lazer_transaction.UpdateFeed} UpdateFeed instance - */ - UpdateFeed.create = function create(properties) { - return new UpdateFeed(properties); - }; - - /** - * Encodes the specified UpdateFeed message. Does not implicitly {@link pyth_lazer_transaction.UpdateFeed.verify|verify} messages. - * @function encode - * @memberof pyth_lazer_transaction.UpdateFeed - * @static - * @param {pyth_lazer_transaction.IUpdateFeed} message UpdateFeed message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateFeed.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.feedId != null && Object.hasOwnProperty.call(message, "feedId")) - writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.feedId); - if (message.updateFeedMetadata != null && Object.hasOwnProperty.call(message, "updateFeedMetadata")) - $root.pyth_lazer_transaction.UpdateFeedMetadata.encode(message.updateFeedMetadata, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); - if (message.activateFeed != null && Object.hasOwnProperty.call(message, "activateFeed")) - $root.pyth_lazer_transaction.ActivateFeed.encode(message.activateFeed, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); - if (message.deactivateFeed != null && Object.hasOwnProperty.call(message, "deactivateFeed")) - $root.pyth_lazer_transaction.DeactivateFeed.encode(message.deactivateFeed, writer.uint32(/* id 103, wireType 2 =*/826).fork()).ldelim(); - if (message.removeFeed != null && Object.hasOwnProperty.call(message, "removeFeed")) - $root.google.protobuf.Empty.encode(message.removeFeed, writer.uint32(/* id 199, wireType 2 =*/1594).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpdateFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdateFeed.verify|verify} messages. - * @function encodeDelimited - * @memberof pyth_lazer_transaction.UpdateFeed - * @static - * @param {pyth_lazer_transaction.IUpdateFeed} message UpdateFeed message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateFeed.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateFeed message from the specified reader or buffer. - * @function decode - * @memberof pyth_lazer_transaction.UpdateFeed - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pyth_lazer_transaction.UpdateFeed} UpdateFeed - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateFeed.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.UpdateFeed(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.feedId = reader.uint32(); - break; - } - case 101: { - message.updateFeedMetadata = $root.pyth_lazer_transaction.UpdateFeedMetadata.decode(reader, reader.uint32()); - break; - } - case 102: { - message.activateFeed = $root.pyth_lazer_transaction.ActivateFeed.decode(reader, reader.uint32()); - break; - } - case 103: { - message.deactivateFeed = $root.pyth_lazer_transaction.DeactivateFeed.decode(reader, reader.uint32()); - break; - } - case 199: { - message.removeFeed = $root.google.protobuf.Empty.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateFeed message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pyth_lazer_transaction.UpdateFeed - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pyth_lazer_transaction.UpdateFeed} UpdateFeed - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateFeed.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateFeed message. - * @function verify - * @memberof pyth_lazer_transaction.UpdateFeed - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateFeed.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.feedId != null && message.hasOwnProperty("feedId")) { - properties._feedId = 1; - if (!$util.isInteger(message.feedId)) - return "feedId: integer expected"; - } - if (message.updateFeedMetadata != null && message.hasOwnProperty("updateFeedMetadata")) { - properties.action = 1; - { - var error = $root.pyth_lazer_transaction.UpdateFeedMetadata.verify(message.updateFeedMetadata); - if (error) - return "updateFeedMetadata." + error; - } - } - if (message.activateFeed != null && message.hasOwnProperty("activateFeed")) { - if (properties.action === 1) - return "action: multiple values"; - properties.action = 1; - { - var error = $root.pyth_lazer_transaction.ActivateFeed.verify(message.activateFeed); - if (error) - return "activateFeed." + error; - } - } - if (message.deactivateFeed != null && message.hasOwnProperty("deactivateFeed")) { - if (properties.action === 1) - return "action: multiple values"; - properties.action = 1; - { - var error = $root.pyth_lazer_transaction.DeactivateFeed.verify(message.deactivateFeed); - if (error) - return "deactivateFeed." + error; - } - } - if (message.removeFeed != null && message.hasOwnProperty("removeFeed")) { - if (properties.action === 1) - return "action: multiple values"; - properties.action = 1; - { - var error = $root.google.protobuf.Empty.verify(message.removeFeed); - if (error) - return "removeFeed." + error; - } - } - return null; - }; - - /** - * Creates an UpdateFeed message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pyth_lazer_transaction.UpdateFeed - * @static - * @param {Object.} object Plain object - * @returns {pyth_lazer_transaction.UpdateFeed} UpdateFeed - */ - UpdateFeed.fromObject = function fromObject(object) { - if (object instanceof $root.pyth_lazer_transaction.UpdateFeed) - return object; - var message = new $root.pyth_lazer_transaction.UpdateFeed(); - if (object.feedId != null) - message.feedId = object.feedId >>> 0; - if (object.updateFeedMetadata != null) { - if (typeof object.updateFeedMetadata !== "object") - throw TypeError(".pyth_lazer_transaction.UpdateFeed.updateFeedMetadata: object expected"); - message.updateFeedMetadata = $root.pyth_lazer_transaction.UpdateFeedMetadata.fromObject(object.updateFeedMetadata); - } - if (object.activateFeed != null) { - if (typeof object.activateFeed !== "object") - throw TypeError(".pyth_lazer_transaction.UpdateFeed.activateFeed: object expected"); - message.activateFeed = $root.pyth_lazer_transaction.ActivateFeed.fromObject(object.activateFeed); - } - if (object.deactivateFeed != null) { - if (typeof object.deactivateFeed !== "object") - throw TypeError(".pyth_lazer_transaction.UpdateFeed.deactivateFeed: object expected"); - message.deactivateFeed = $root.pyth_lazer_transaction.DeactivateFeed.fromObject(object.deactivateFeed); - } - if (object.removeFeed != null) { - if (typeof object.removeFeed !== "object") - throw TypeError(".pyth_lazer_transaction.UpdateFeed.removeFeed: object expected"); - message.removeFeed = $root.google.protobuf.Empty.fromObject(object.removeFeed); - } - return message; - }; - - /** - * Creates a plain object from an UpdateFeed message. Also converts values to other types if specified. - * @function toObject - * @memberof pyth_lazer_transaction.UpdateFeed - * @static - * @param {pyth_lazer_transaction.UpdateFeed} message UpdateFeed - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateFeed.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.feedId != null && message.hasOwnProperty("feedId")) { - object.feedId = message.feedId; - if (options.oneofs) - object._feedId = "feedId"; - } - if (message.updateFeedMetadata != null && message.hasOwnProperty("updateFeedMetadata")) { - object.updateFeedMetadata = $root.pyth_lazer_transaction.UpdateFeedMetadata.toObject(message.updateFeedMetadata, options); - if (options.oneofs) - object.action = "updateFeedMetadata"; - } - if (message.activateFeed != null && message.hasOwnProperty("activateFeed")) { - object.activateFeed = $root.pyth_lazer_transaction.ActivateFeed.toObject(message.activateFeed, options); - if (options.oneofs) - object.action = "activateFeed"; - } - if (message.deactivateFeed != null && message.hasOwnProperty("deactivateFeed")) { - object.deactivateFeed = $root.pyth_lazer_transaction.DeactivateFeed.toObject(message.deactivateFeed, options); - if (options.oneofs) - object.action = "deactivateFeed"; - } - if (message.removeFeed != null && message.hasOwnProperty("removeFeed")) { - object.removeFeed = $root.google.protobuf.Empty.toObject(message.removeFeed, options); - if (options.oneofs) - object.action = "removeFeed"; - } - return object; - }; - - /** - * Converts this UpdateFeed to JSON. - * @function toJSON - * @memberof pyth_lazer_transaction.UpdateFeed - * @instance - * @returns {Object.} JSON object - */ - UpdateFeed.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateFeed - * @function getTypeUrl - * @memberof pyth_lazer_transaction.UpdateFeed - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateFeed.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pyth_lazer_transaction.UpdateFeed"; - }; - - return UpdateFeed; - })(); + /** + * Decodes a DynamicValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.DynamicValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.DynamicValue} DynamicValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DynamicValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - pyth_lazer_transaction.UpdateFeedMetadata = (function() { - - /** - * Properties of an UpdateFeedMetadata. - * @memberof pyth_lazer_transaction - * @interface IUpdateFeedMetadata - * @property {string|null} [name] UpdateFeedMetadata name - * @property {pyth_lazer_transaction.IDynamicValue|null} [value] UpdateFeedMetadata value - */ - - /** - * Constructs a new UpdateFeedMetadata. - * @memberof pyth_lazer_transaction - * @classdesc Represents an UpdateFeedMetadata. - * @implements IUpdateFeedMetadata - * @constructor - * @param {pyth_lazer_transaction.IUpdateFeedMetadata=} [properties] Properties to set - */ - function UpdateFeedMetadata(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Verifies a DynamicValue message. + * @function verify + * @memberof pyth_lazer_transaction.DynamicValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DynamicValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if ( + message.stringValue != null && + message.hasOwnProperty("stringValue") + ) { + properties.value = 1; + if (!$util.isString(message.stringValue)) + return "stringValue: string expected"; + } + if ( + message.doubleValue != null && + message.hasOwnProperty("doubleValue") + ) { + if (properties.value === 1) return "value: multiple values"; + properties.value = 1; + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + } + if (message.uintValue != null && message.hasOwnProperty("uintValue")) { + if (properties.value === 1) return "value: multiple values"; + properties.value = 1; + if ( + !$util.isInteger(message.uintValue) && + !( + message.uintValue && + $util.isInteger(message.uintValue.low) && + $util.isInteger(message.uintValue.high) + ) + ) + return "uintValue: integer|Long expected"; + } + if (message.intValue != null && message.hasOwnProperty("intValue")) { + if (properties.value === 1) return "value: multiple values"; + properties.value = 1; + if ( + !$util.isInteger(message.intValue) && + !( + message.intValue && + $util.isInteger(message.intValue.low) && + $util.isInteger(message.intValue.high) + ) + ) + return "intValue: integer|Long expected"; + } + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + if (properties.value === 1) return "value: multiple values"; + properties.value = 1; + if (typeof message.boolValue !== "boolean") + return "boolValue: boolean expected"; + } + if (message.bytesValue != null && message.hasOwnProperty("bytesValue")) { + if (properties.value === 1) return "value: multiple values"; + properties.value = 1; + if ( + !( + (message.bytesValue && + typeof message.bytesValue.length === "number") || + $util.isString(message.bytesValue) + ) + ) + return "bytesValue: buffer expected"; + } + if ( + message.durationValue != null && + message.hasOwnProperty("durationValue") + ) { + if (properties.value === 1) return "value: multiple values"; + properties.value = 1; + { + var error = $root.google.protobuf.Duration.verify( + message.durationValue, + ); + if (error) return "durationValue." + error; + } + } + if ( + message.timestampValue != null && + message.hasOwnProperty("timestampValue") + ) { + if (properties.value === 1) return "value: multiple values"; + properties.value = 1; + { + var error = $root.google.protobuf.Timestamp.verify( + message.timestampValue, + ); + if (error) return "timestampValue." + error; + } + } + if (message.list != null && message.hasOwnProperty("list")) { + if (properties.value === 1) return "value: multiple values"; + properties.value = 1; + { + var error = $root.pyth_lazer_transaction.DynamicValue.List.verify( + message.list, + ); + if (error) return "list." + error; + } + } + if (message.map != null && message.hasOwnProperty("map")) { + if (properties.value === 1) return "value: multiple values"; + properties.value = 1; + { + var error = $root.pyth_lazer_transaction.DynamicValue.Map.verify( + message.map, + ); + if (error) return "map." + error; } + } + return null; + }; - /** - * UpdateFeedMetadata name. - * @member {string|null|undefined} name - * @memberof pyth_lazer_transaction.UpdateFeedMetadata - * @instance - */ - UpdateFeedMetadata.prototype.name = null; - - /** - * UpdateFeedMetadata value. - * @member {pyth_lazer_transaction.IDynamicValue|null|undefined} value - * @memberof pyth_lazer_transaction.UpdateFeedMetadata - * @instance - */ - UpdateFeedMetadata.prototype.value = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * UpdateFeedMetadata _name. - * @member {"name"|undefined} _name - * @memberof pyth_lazer_transaction.UpdateFeedMetadata - * @instance - */ - Object.defineProperty(UpdateFeedMetadata.prototype, "_name", { - get: $util.oneOfGetter($oneOfFields = ["name"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * UpdateFeedMetadata _value. - * @member {"value"|undefined} _value - * @memberof pyth_lazer_transaction.UpdateFeedMetadata - * @instance - */ - Object.defineProperty(UpdateFeedMetadata.prototype, "_value", { - get: $util.oneOfGetter($oneOfFields = ["value"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new UpdateFeedMetadata instance using the specified properties. - * @function create - * @memberof pyth_lazer_transaction.UpdateFeedMetadata - * @static - * @param {pyth_lazer_transaction.IUpdateFeedMetadata=} [properties] Properties to set - * @returns {pyth_lazer_transaction.UpdateFeedMetadata} UpdateFeedMetadata instance - */ - UpdateFeedMetadata.create = function create(properties) { - return new UpdateFeedMetadata(properties); - }; - - /** - * Encodes the specified UpdateFeedMetadata message. Does not implicitly {@link pyth_lazer_transaction.UpdateFeedMetadata.verify|verify} messages. - * @function encode - * @memberof pyth_lazer_transaction.UpdateFeedMetadata - * @static - * @param {pyth_lazer_transaction.IUpdateFeedMetadata} message UpdateFeedMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateFeedMetadata.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")) - $root.pyth_lazer_transaction.DynamicValue.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpdateFeedMetadata message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdateFeedMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof pyth_lazer_transaction.UpdateFeedMetadata - * @static - * @param {pyth_lazer_transaction.IUpdateFeedMetadata} message UpdateFeedMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateFeedMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateFeedMetadata message from the specified reader or buffer. - * @function decode - * @memberof pyth_lazer_transaction.UpdateFeedMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pyth_lazer_transaction.UpdateFeedMetadata} UpdateFeedMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateFeedMetadata.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.UpdateFeedMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.value = $root.pyth_lazer_transaction.DynamicValue.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateFeedMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pyth_lazer_transaction.UpdateFeedMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pyth_lazer_transaction.UpdateFeedMetadata} UpdateFeedMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateFeedMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateFeedMetadata message. - * @function verify - * @memberof pyth_lazer_transaction.UpdateFeedMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateFeedMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) { - properties._name = 1; - if (!$util.isString(message.name)) - return "name: string expected"; - } - if (message.value != null && message.hasOwnProperty("value")) { - properties._value = 1; - { - var error = $root.pyth_lazer_transaction.DynamicValue.verify(message.value); - if (error) - return "value." + error; - } - } - return null; - }; - - /** - * Creates an UpdateFeedMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pyth_lazer_transaction.UpdateFeedMetadata - * @static - * @param {Object.} object Plain object - * @returns {pyth_lazer_transaction.UpdateFeedMetadata} UpdateFeedMetadata - */ - UpdateFeedMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.pyth_lazer_transaction.UpdateFeedMetadata) - return object; - var message = new $root.pyth_lazer_transaction.UpdateFeedMetadata(); - if (object.name != null) - message.name = String(object.name); - if (object.value != null) { - if (typeof object.value !== "object") - throw TypeError(".pyth_lazer_transaction.UpdateFeedMetadata.value: object expected"); - message.value = $root.pyth_lazer_transaction.DynamicValue.fromObject(object.value); - } - return message; - }; - - /** - * Creates a plain object from an UpdateFeedMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof pyth_lazer_transaction.UpdateFeedMetadata - * @static - * @param {pyth_lazer_transaction.UpdateFeedMetadata} message UpdateFeedMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateFeedMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.name != null && message.hasOwnProperty("name")) { - object.name = message.name; - if (options.oneofs) - object._name = "name"; - } - if (message.value != null && message.hasOwnProperty("value")) { - object.value = $root.pyth_lazer_transaction.DynamicValue.toObject(message.value, options); - if (options.oneofs) - object._value = "value"; - } - return object; - }; - - /** - * Converts this UpdateFeedMetadata to JSON. - * @function toJSON - * @memberof pyth_lazer_transaction.UpdateFeedMetadata - * @instance - * @returns {Object.} JSON object - */ - UpdateFeedMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateFeedMetadata - * @function getTypeUrl - * @memberof pyth_lazer_transaction.UpdateFeedMetadata - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateFeedMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pyth_lazer_transaction.UpdateFeedMetadata"; - }; + /** + * Creates a DynamicValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.DynamicValue + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.DynamicValue} DynamicValue + */ + DynamicValue.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.DynamicValue) + return object; + var message = new $root.pyth_lazer_transaction.DynamicValue(); + if (object.stringValue != null) + message.stringValue = String(object.stringValue); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.uintValue != null) + if ($util.Long) + (message.uintValue = $util.Long.fromValue( + object.uintValue, + )).unsigned = true; + else if (typeof object.uintValue === "string") + message.uintValue = parseInt(object.uintValue, 10); + else if (typeof object.uintValue === "number") + message.uintValue = object.uintValue; + else if (typeof object.uintValue === "object") + message.uintValue = new $util.LongBits( + object.uintValue.low >>> 0, + object.uintValue.high >>> 0, + ).toNumber(true); + if (object.intValue != null) + if ($util.Long) + (message.intValue = $util.Long.fromValue(object.intValue)).unsigned = + false; + else if (typeof object.intValue === "string") + message.intValue = parseInt(object.intValue, 10); + else if (typeof object.intValue === "number") + message.intValue = object.intValue; + else if (typeof object.intValue === "object") + message.intValue = new $util.LongBits( + object.intValue.low >>> 0, + object.intValue.high >>> 0, + ).toNumber(); + if (object.boolValue != null) + message.boolValue = Boolean(object.boolValue); + if (object.bytesValue != null) + if (typeof object.bytesValue === "string") + $util.base64.decode( + object.bytesValue, + (message.bytesValue = $util.newBuffer( + $util.base64.length(object.bytesValue), + )), + 0, + ); + else if (object.bytesValue.length >= 0) + message.bytesValue = object.bytesValue; + if (object.durationValue != null) { + if (typeof object.durationValue !== "object") + throw TypeError( + ".pyth_lazer_transaction.DynamicValue.durationValue: object expected", + ); + message.durationValue = $root.google.protobuf.Duration.fromObject( + object.durationValue, + ); + } + if (object.timestampValue != null) { + if (typeof object.timestampValue !== "object") + throw TypeError( + ".pyth_lazer_transaction.DynamicValue.timestampValue: object expected", + ); + message.timestampValue = $root.google.protobuf.Timestamp.fromObject( + object.timestampValue, + ); + } + if (object.list != null) { + if (typeof object.list !== "object") + throw TypeError( + ".pyth_lazer_transaction.DynamicValue.list: object expected", + ); + message.list = + $root.pyth_lazer_transaction.DynamicValue.List.fromObject( + object.list, + ); + } + if (object.map != null) { + if (typeof object.map !== "object") + throw TypeError( + ".pyth_lazer_transaction.DynamicValue.map: object expected", + ); + message.map = $root.pyth_lazer_transaction.DynamicValue.Map.fromObject( + object.map, + ); + } + return message; + }; - return UpdateFeedMetadata; - })(); + /** + * Creates a plain object from a DynamicValue message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.DynamicValue + * @static + * @param {pyth_lazer_transaction.DynamicValue} message DynamicValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DynamicValue.toObject = function toObject(message, options) { + if (!options) options = {}; + var object = {}; + if ( + message.stringValue != null && + message.hasOwnProperty("stringValue") + ) { + object.stringValue = message.stringValue; + if (options.oneofs) object.value = "stringValue"; + } + if ( + message.doubleValue != null && + message.hasOwnProperty("doubleValue") + ) { + object.doubleValue = + options.json && !isFinite(message.doubleValue) + ? String(message.doubleValue) + : message.doubleValue; + if (options.oneofs) object.value = "doubleValue"; + } + if (message.uintValue != null && message.hasOwnProperty("uintValue")) { + if (typeof message.uintValue === "number") + object.uintValue = + options.longs === String + ? String(message.uintValue) + : message.uintValue; + else + object.uintValue = + options.longs === String + ? $util.Long.prototype.toString.call(message.uintValue) + : options.longs === Number + ? new $util.LongBits( + message.uintValue.low >>> 0, + message.uintValue.high >>> 0, + ).toNumber(true) + : message.uintValue; + if (options.oneofs) object.value = "uintValue"; + } + if (message.intValue != null && message.hasOwnProperty("intValue")) { + if (typeof message.intValue === "number") + object.intValue = + options.longs === String + ? String(message.intValue) + : message.intValue; + else + object.intValue = + options.longs === String + ? $util.Long.prototype.toString.call(message.intValue) + : options.longs === Number + ? new $util.LongBits( + message.intValue.low >>> 0, + message.intValue.high >>> 0, + ).toNumber() + : message.intValue; + if (options.oneofs) object.value = "intValue"; + } + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + object.boolValue = message.boolValue; + if (options.oneofs) object.value = "boolValue"; + } + if (message.bytesValue != null && message.hasOwnProperty("bytesValue")) { + object.bytesValue = + options.bytes === String + ? $util.base64.encode( + message.bytesValue, + 0, + message.bytesValue.length, + ) + : options.bytes === Array + ? Array.prototype.slice.call(message.bytesValue) + : message.bytesValue; + if (options.oneofs) object.value = "bytesValue"; + } + if ( + message.durationValue != null && + message.hasOwnProperty("durationValue") + ) { + object.durationValue = $root.google.protobuf.Duration.toObject( + message.durationValue, + options, + ); + if (options.oneofs) object.value = "durationValue"; + } + if ( + message.timestampValue != null && + message.hasOwnProperty("timestampValue") + ) { + object.timestampValue = $root.google.protobuf.Timestamp.toObject( + message.timestampValue, + options, + ); + if (options.oneofs) object.value = "timestampValue"; + } + if (message.list != null && message.hasOwnProperty("list")) { + object.list = $root.pyth_lazer_transaction.DynamicValue.List.toObject( + message.list, + options, + ); + if (options.oneofs) object.value = "list"; + } + if (message.map != null && message.hasOwnProperty("map")) { + object.map = $root.pyth_lazer_transaction.DynamicValue.Map.toObject( + message.map, + options, + ); + if (options.oneofs) object.value = "map"; + } + return object; + }; - pyth_lazer_transaction.ActivateFeed = (function() { - - /** - * Properties of an ActivateFeed. - * @memberof pyth_lazer_transaction - * @interface IActivateFeed - * @property {google.protobuf.ITimestamp|null} [activationTimestamp] ActivateFeed activationTimestamp - */ - - /** - * Constructs a new ActivateFeed. - * @memberof pyth_lazer_transaction - * @classdesc Represents an ActivateFeed. - * @implements IActivateFeed - * @constructor - * @param {pyth_lazer_transaction.IActivateFeed=} [properties] Properties to set - */ - function ActivateFeed(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Converts this DynamicValue to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.DynamicValue + * @instance + * @returns {Object.} JSON object + */ + DynamicValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * ActivateFeed activationTimestamp. - * @member {google.protobuf.ITimestamp|null|undefined} activationTimestamp - * @memberof pyth_lazer_transaction.ActivateFeed - * @instance - */ - ActivateFeed.prototype.activationTimestamp = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ActivateFeed _activationTimestamp. - * @member {"activationTimestamp"|undefined} _activationTimestamp - * @memberof pyth_lazer_transaction.ActivateFeed - * @instance - */ - Object.defineProperty(ActivateFeed.prototype, "_activationTimestamp", { - get: $util.oneOfGetter($oneOfFields = ["activationTimestamp"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ActivateFeed instance using the specified properties. - * @function create - * @memberof pyth_lazer_transaction.ActivateFeed - * @static - * @param {pyth_lazer_transaction.IActivateFeed=} [properties] Properties to set - * @returns {pyth_lazer_transaction.ActivateFeed} ActivateFeed instance - */ - ActivateFeed.create = function create(properties) { - return new ActivateFeed(properties); - }; - - /** - * Encodes the specified ActivateFeed message. Does not implicitly {@link pyth_lazer_transaction.ActivateFeed.verify|verify} messages. - * @function encode - * @memberof pyth_lazer_transaction.ActivateFeed - * @static - * @param {pyth_lazer_transaction.IActivateFeed} message ActivateFeed message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ActivateFeed.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.activationTimestamp != null && Object.hasOwnProperty.call(message, "activationTimestamp")) - $root.google.protobuf.Timestamp.encode(message.activationTimestamp, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ActivateFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ActivateFeed.verify|verify} messages. - * @function encodeDelimited - * @memberof pyth_lazer_transaction.ActivateFeed - * @static - * @param {pyth_lazer_transaction.IActivateFeed} message ActivateFeed message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ActivateFeed.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ActivateFeed message from the specified reader or buffer. - * @function decode - * @memberof pyth_lazer_transaction.ActivateFeed - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pyth_lazer_transaction.ActivateFeed} ActivateFeed - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ActivateFeed.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.ActivateFeed(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.activationTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ActivateFeed message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pyth_lazer_transaction.ActivateFeed - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pyth_lazer_transaction.ActivateFeed} ActivateFeed - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ActivateFeed.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ActivateFeed message. - * @function verify - * @memberof pyth_lazer_transaction.ActivateFeed - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ActivateFeed.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.activationTimestamp != null && message.hasOwnProperty("activationTimestamp")) { - properties._activationTimestamp = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.activationTimestamp); - if (error) - return "activationTimestamp." + error; - } - } - return null; - }; - - /** - * Creates an ActivateFeed message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pyth_lazer_transaction.ActivateFeed - * @static - * @param {Object.} object Plain object - * @returns {pyth_lazer_transaction.ActivateFeed} ActivateFeed - */ - ActivateFeed.fromObject = function fromObject(object) { - if (object instanceof $root.pyth_lazer_transaction.ActivateFeed) - return object; - var message = new $root.pyth_lazer_transaction.ActivateFeed(); - if (object.activationTimestamp != null) { - if (typeof object.activationTimestamp !== "object") - throw TypeError(".pyth_lazer_transaction.ActivateFeed.activationTimestamp: object expected"); - message.activationTimestamp = $root.google.protobuf.Timestamp.fromObject(object.activationTimestamp); - } - return message; - }; - - /** - * Creates a plain object from an ActivateFeed message. Also converts values to other types if specified. - * @function toObject - * @memberof pyth_lazer_transaction.ActivateFeed - * @static - * @param {pyth_lazer_transaction.ActivateFeed} message ActivateFeed - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ActivateFeed.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.activationTimestamp != null && message.hasOwnProperty("activationTimestamp")) { - object.activationTimestamp = $root.google.protobuf.Timestamp.toObject(message.activationTimestamp, options); - if (options.oneofs) - object._activationTimestamp = "activationTimestamp"; - } - return object; - }; - - /** - * Converts this ActivateFeed to JSON. - * @function toJSON - * @memberof pyth_lazer_transaction.ActivateFeed - * @instance - * @returns {Object.} JSON object - */ - ActivateFeed.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ActivateFeed - * @function getTypeUrl - * @memberof pyth_lazer_transaction.ActivateFeed - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ActivateFeed.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pyth_lazer_transaction.ActivateFeed"; - }; + /** + * Gets the default type url for DynamicValue + * @function getTypeUrl + * @memberof pyth_lazer_transaction.DynamicValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DynamicValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.DynamicValue"; + }; + + DynamicValue.List = (function () { + /** + * Properties of a List. + * @memberof pyth_lazer_transaction.DynamicValue + * @interface IList + * @property {Array.|null} [items] List items + */ + + /** + * Constructs a new List. + * @memberof pyth_lazer_transaction.DynamicValue + * @classdesc Represents a List. + * @implements IList + * @constructor + * @param {pyth_lazer_transaction.DynamicValue.IList=} [properties] Properties to set + */ + function List(properties) { + this.items = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * List items. + * @member {Array.} items + * @memberof pyth_lazer_transaction.DynamicValue.List + * @instance + */ + List.prototype.items = $util.emptyArray; + + /** + * Creates a new List instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.DynamicValue.List + * @static + * @param {pyth_lazer_transaction.DynamicValue.IList=} [properties] Properties to set + * @returns {pyth_lazer_transaction.DynamicValue.List} List instance + */ + List.create = function create(properties) { + return new List(properties); + }; + + /** + * Encodes the specified List message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.List.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.DynamicValue.List + * @static + * @param {pyth_lazer_transaction.DynamicValue.IList} message List message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + List.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if (message.items != null && message.items.length) + for (var i = 0; i < message.items.length; ++i) + $root.pyth_lazer_transaction.DynamicValue.encode( + message.items[i], + writer.uint32(/* id 1, wireType 2 =*/ 10).fork(), + ).ldelim(); + return writer; + }; + + /** + * Encodes the specified List message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.List.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.DynamicValue.List + * @static + * @param {pyth_lazer_transaction.DynamicValue.IList} message List message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + List.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a List message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.DynamicValue.List + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.DynamicValue.List} List + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + List.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pyth_lazer_transaction.DynamicValue.List(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + if (!(message.items && message.items.length)) message.items = []; + message.items.push( + $root.pyth_lazer_transaction.DynamicValue.decode( + reader, + reader.uint32(), + ), + ); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a List message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.DynamicValue.List + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.DynamicValue.List} List + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + List.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a List message. + * @function verify + * @memberof pyth_lazer_transaction.DynamicValue.List + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + List.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.items != null && message.hasOwnProperty("items")) { + if (!Array.isArray(message.items)) return "items: array expected"; + for (var i = 0; i < message.items.length; ++i) { + var error = $root.pyth_lazer_transaction.DynamicValue.verify( + message.items[i], + ); + if (error) return "items." + error; + } + } + return null; + }; + + /** + * Creates a List message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.DynamicValue.List + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.DynamicValue.List} List + */ + List.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.DynamicValue.List) + return object; + var message = new $root.pyth_lazer_transaction.DynamicValue.List(); + if (object.items) { + if (!Array.isArray(object.items)) + throw TypeError( + ".pyth_lazer_transaction.DynamicValue.List.items: array expected", + ); + message.items = []; + for (var i = 0; i < object.items.length; ++i) { + if (typeof object.items[i] !== "object") + throw TypeError( + ".pyth_lazer_transaction.DynamicValue.List.items: object expected", + ); + message.items[i] = + $root.pyth_lazer_transaction.DynamicValue.fromObject( + object.items[i], + ); + } + } + return message; + }; + + /** + * Creates a plain object from a List message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.DynamicValue.List + * @static + * @param {pyth_lazer_transaction.DynamicValue.List} message List + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + List.toObject = function toObject(message, options) { + if (!options) options = {}; + var object = {}; + if (options.arrays || options.defaults) object.items = []; + if (message.items && message.items.length) { + object.items = []; + for (var j = 0; j < message.items.length; ++j) + object.items[j] = + $root.pyth_lazer_transaction.DynamicValue.toObject( + message.items[j], + options, + ); + } + return object; + }; + + /** + * Converts this List to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.DynamicValue.List + * @instance + * @returns {Object.} JSON object + */ + List.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for List + * @function getTypeUrl + * @memberof pyth_lazer_transaction.DynamicValue.List + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + List.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.DynamicValue.List"; + }; - return ActivateFeed; + return List; })(); - pyth_lazer_transaction.DeactivateFeed = (function() { - - /** - * Properties of a DeactivateFeed. - * @memberof pyth_lazer_transaction - * @interface IDeactivateFeed - * @property {google.protobuf.ITimestamp|null} [deactivationTimestamp] DeactivateFeed deactivationTimestamp - */ - - /** - * Constructs a new DeactivateFeed. - * @memberof pyth_lazer_transaction - * @classdesc Represents a DeactivateFeed. - * @implements IDeactivateFeed - * @constructor - * @param {pyth_lazer_transaction.IDeactivateFeed=} [properties] Properties to set - */ - function DeactivateFeed(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + DynamicValue.MapItem = (function () { + /** + * Properties of a MapItem. + * @memberof pyth_lazer_transaction.DynamicValue + * @interface IMapItem + * @property {string|null} [key] MapItem key + * @property {pyth_lazer_transaction.IDynamicValue|null} [value] MapItem value + */ + + /** + * Constructs a new MapItem. + * @memberof pyth_lazer_transaction.DynamicValue + * @classdesc Represents a MapItem. + * @implements IMapItem + * @constructor + * @param {pyth_lazer_transaction.DynamicValue.IMapItem=} [properties] Properties to set + */ + function MapItem(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MapItem key. + * @member {string|null|undefined} key + * @memberof pyth_lazer_transaction.DynamicValue.MapItem + * @instance + */ + MapItem.prototype.key = null; + + /** + * MapItem value. + * @member {pyth_lazer_transaction.IDynamicValue|null|undefined} value + * @memberof pyth_lazer_transaction.DynamicValue.MapItem + * @instance + */ + MapItem.prototype.value = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * MapItem _key. + * @member {"key"|undefined} _key + * @memberof pyth_lazer_transaction.DynamicValue.MapItem + * @instance + */ + Object.defineProperty(MapItem.prototype, "_key", { + get: $util.oneOfGetter(($oneOfFields = ["key"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * MapItem _value. + * @member {"value"|undefined} _value + * @memberof pyth_lazer_transaction.DynamicValue.MapItem + * @instance + */ + Object.defineProperty(MapItem.prototype, "_value", { + get: $util.oneOfGetter(($oneOfFields = ["value"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Creates a new MapItem instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.DynamicValue.MapItem + * @static + * @param {pyth_lazer_transaction.DynamicValue.IMapItem=} [properties] Properties to set + * @returns {pyth_lazer_transaction.DynamicValue.MapItem} MapItem instance + */ + MapItem.create = function create(properties) { + return new MapItem(properties); + }; + + /** + * Encodes the specified MapItem message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.MapItem.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.DynamicValue.MapItem + * @static + * @param {pyth_lazer_transaction.DynamicValue.IMapItem} message MapItem message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MapItem.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/ 10).string(message.key); + if ( + message.value != null && + Object.hasOwnProperty.call(message, "value") + ) + $root.pyth_lazer_transaction.DynamicValue.encode( + message.value, + writer.uint32(/* id 2, wireType 2 =*/ 18).fork(), + ).ldelim(); + return writer; + }; + + /** + * Encodes the specified MapItem message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.MapItem.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.DynamicValue.MapItem + * @static + * @param {pyth_lazer_transaction.DynamicValue.IMapItem} message MapItem message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MapItem.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MapItem message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.DynamicValue.MapItem + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.DynamicValue.MapItem} MapItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MapItem.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pyth_lazer_transaction.DynamicValue.MapItem(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.key = reader.string(); + break; + } + case 2: { + message.value = $root.pyth_lazer_transaction.DynamicValue.decode( + reader, + reader.uint32(), + ); + break; + } + default: + reader.skipType(tag & 7); + break; + } } + return message; + }; + + /** + * Decodes a MapItem message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.DynamicValue.MapItem + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.DynamicValue.MapItem} MapItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MapItem.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MapItem message. + * @function verify + * @memberof pyth_lazer_transaction.DynamicValue.MapItem + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MapItem.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.key != null && message.hasOwnProperty("key")) { + properties._key = 1; + if (!$util.isString(message.key)) return "key: string expected"; + } + if (message.value != null && message.hasOwnProperty("value")) { + properties._value = 1; + { + var error = $root.pyth_lazer_transaction.DynamicValue.verify( + message.value, + ); + if (error) return "value." + error; + } + } + return null; + }; + + /** + * Creates a MapItem message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.DynamicValue.MapItem + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.DynamicValue.MapItem} MapItem + */ + MapItem.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.DynamicValue.MapItem) + return object; + var message = new $root.pyth_lazer_transaction.DynamicValue.MapItem(); + if (object.key != null) message.key = String(object.key); + if (object.value != null) { + if (typeof object.value !== "object") + throw TypeError( + ".pyth_lazer_transaction.DynamicValue.MapItem.value: object expected", + ); + message.value = $root.pyth_lazer_transaction.DynamicValue.fromObject( + object.value, + ); + } + return message; + }; + + /** + * Creates a plain object from a MapItem message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.DynamicValue.MapItem + * @static + * @param {pyth_lazer_transaction.DynamicValue.MapItem} message MapItem + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MapItem.toObject = function toObject(message, options) { + if (!options) options = {}; + var object = {}; + if (message.key != null && message.hasOwnProperty("key")) { + object.key = message.key; + if (options.oneofs) object._key = "key"; + } + if (message.value != null && message.hasOwnProperty("value")) { + object.value = $root.pyth_lazer_transaction.DynamicValue.toObject( + message.value, + options, + ); + if (options.oneofs) object._value = "value"; + } + return object; + }; + + /** + * Converts this MapItem to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.DynamicValue.MapItem + * @instance + * @returns {Object.} JSON object + */ + MapItem.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MapItem + * @function getTypeUrl + * @memberof pyth_lazer_transaction.DynamicValue.MapItem + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MapItem.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.DynamicValue.MapItem"; + }; - /** - * DeactivateFeed deactivationTimestamp. - * @member {google.protobuf.ITimestamp|null|undefined} deactivationTimestamp - * @memberof pyth_lazer_transaction.DeactivateFeed - * @instance - */ - DeactivateFeed.prototype.deactivationTimestamp = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * DeactivateFeed _deactivationTimestamp. - * @member {"deactivationTimestamp"|undefined} _deactivationTimestamp - * @memberof pyth_lazer_transaction.DeactivateFeed - * @instance - */ - Object.defineProperty(DeactivateFeed.prototype, "_deactivationTimestamp", { - get: $util.oneOfGetter($oneOfFields = ["deactivationTimestamp"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new DeactivateFeed instance using the specified properties. - * @function create - * @memberof pyth_lazer_transaction.DeactivateFeed - * @static - * @param {pyth_lazer_transaction.IDeactivateFeed=} [properties] Properties to set - * @returns {pyth_lazer_transaction.DeactivateFeed} DeactivateFeed instance - */ - DeactivateFeed.create = function create(properties) { - return new DeactivateFeed(properties); - }; - - /** - * Encodes the specified DeactivateFeed message. Does not implicitly {@link pyth_lazer_transaction.DeactivateFeed.verify|verify} messages. - * @function encode - * @memberof pyth_lazer_transaction.DeactivateFeed - * @static - * @param {pyth_lazer_transaction.IDeactivateFeed} message DeactivateFeed message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeactivateFeed.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.deactivationTimestamp != null && Object.hasOwnProperty.call(message, "deactivationTimestamp")) - $root.google.protobuf.Timestamp.encode(message.deactivationTimestamp, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified DeactivateFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DeactivateFeed.verify|verify} messages. - * @function encodeDelimited - * @memberof pyth_lazer_transaction.DeactivateFeed - * @static - * @param {pyth_lazer_transaction.IDeactivateFeed} message DeactivateFeed message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeactivateFeed.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeactivateFeed message from the specified reader or buffer. - * @function decode - * @memberof pyth_lazer_transaction.DeactivateFeed - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pyth_lazer_transaction.DeactivateFeed} DeactivateFeed - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeactivateFeed.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.DeactivateFeed(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.deactivationTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeactivateFeed message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pyth_lazer_transaction.DeactivateFeed - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pyth_lazer_transaction.DeactivateFeed} DeactivateFeed - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeactivateFeed.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeactivateFeed message. - * @function verify - * @memberof pyth_lazer_transaction.DeactivateFeed - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeactivateFeed.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.deactivationTimestamp != null && message.hasOwnProperty("deactivationTimestamp")) { - properties._deactivationTimestamp = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.deactivationTimestamp); - if (error) - return "deactivationTimestamp." + error; - } - } - return null; - }; - - /** - * Creates a DeactivateFeed message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pyth_lazer_transaction.DeactivateFeed - * @static - * @param {Object.} object Plain object - * @returns {pyth_lazer_transaction.DeactivateFeed} DeactivateFeed - */ - DeactivateFeed.fromObject = function fromObject(object) { - if (object instanceof $root.pyth_lazer_transaction.DeactivateFeed) - return object; - var message = new $root.pyth_lazer_transaction.DeactivateFeed(); - if (object.deactivationTimestamp != null) { - if (typeof object.deactivationTimestamp !== "object") - throw TypeError(".pyth_lazer_transaction.DeactivateFeed.deactivationTimestamp: object expected"); - message.deactivationTimestamp = $root.google.protobuf.Timestamp.fromObject(object.deactivationTimestamp); - } - return message; - }; - - /** - * Creates a plain object from a DeactivateFeed message. Also converts values to other types if specified. - * @function toObject - * @memberof pyth_lazer_transaction.DeactivateFeed - * @static - * @param {pyth_lazer_transaction.DeactivateFeed} message DeactivateFeed - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeactivateFeed.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.deactivationTimestamp != null && message.hasOwnProperty("deactivationTimestamp")) { - object.deactivationTimestamp = $root.google.protobuf.Timestamp.toObject(message.deactivationTimestamp, options); - if (options.oneofs) - object._deactivationTimestamp = "deactivationTimestamp"; - } - return object; - }; - - /** - * Converts this DeactivateFeed to JSON. - * @function toJSON - * @memberof pyth_lazer_transaction.DeactivateFeed - * @instance - * @returns {Object.} JSON object - */ - DeactivateFeed.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeactivateFeed - * @function getTypeUrl - * @memberof pyth_lazer_transaction.DeactivateFeed - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeactivateFeed.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pyth_lazer_transaction.DeactivateFeed"; - }; - - return DeactivateFeed; + return MapItem; })(); - pyth_lazer_transaction.DynamicValue = (function() { - - /** - * Properties of a DynamicValue. - * @memberof pyth_lazer_transaction - * @interface IDynamicValue - * @property {string|null} [stringValue] DynamicValue stringValue - * @property {number|null} [doubleValue] DynamicValue doubleValue - * @property {number|Long|null} [uintValue] DynamicValue uintValue - * @property {number|Long|null} [intValue] DynamicValue intValue - * @property {boolean|null} [boolValue] DynamicValue boolValue - * @property {Uint8Array|null} [bytesValue] DynamicValue bytesValue - * @property {google.protobuf.IDuration|null} [durationValue] DynamicValue durationValue - * @property {google.protobuf.ITimestamp|null} [timestampValue] DynamicValue timestampValue - * @property {pyth_lazer_transaction.DynamicValue.IList|null} [list] DynamicValue list - * @property {pyth_lazer_transaction.DynamicValue.IMap|null} [map] DynamicValue map - */ - - /** - * Constructs a new DynamicValue. - * @memberof pyth_lazer_transaction - * @classdesc Represents a DynamicValue. - * @implements IDynamicValue - * @constructor - * @param {pyth_lazer_transaction.IDynamicValue=} [properties] Properties to set - */ - function DynamicValue(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + DynamicValue.Map = (function () { + /** + * Properties of a Map. + * @memberof pyth_lazer_transaction.DynamicValue + * @interface IMap + * @property {Array.|null} [items] Map items + */ + + /** + * Constructs a new Map. + * @memberof pyth_lazer_transaction.DynamicValue + * @classdesc Represents a Map. + * @implements IMap + * @constructor + * @param {pyth_lazer_transaction.DynamicValue.IMap=} [properties] Properties to set + */ + function Map(properties) { + this.items = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Map items. + * @member {Array.} items + * @memberof pyth_lazer_transaction.DynamicValue.Map + * @instance + */ + Map.prototype.items = $util.emptyArray; + + /** + * Creates a new Map instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.DynamicValue.Map + * @static + * @param {pyth_lazer_transaction.DynamicValue.IMap=} [properties] Properties to set + * @returns {pyth_lazer_transaction.DynamicValue.Map} Map instance + */ + Map.create = function create(properties) { + return new Map(properties); + }; + + /** + * Encodes the specified Map message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.Map.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.DynamicValue.Map + * @static + * @param {pyth_lazer_transaction.DynamicValue.IMap} message Map message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Map.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if (message.items != null && message.items.length) + for (var i = 0; i < message.items.length; ++i) + $root.pyth_lazer_transaction.DynamicValue.MapItem.encode( + message.items[i], + writer.uint32(/* id 1, wireType 2 =*/ 10).fork(), + ).ldelim(); + return writer; + }; + + /** + * Encodes the specified Map message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.Map.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.DynamicValue.Map + * @static + * @param {pyth_lazer_transaction.DynamicValue.IMap} message Map message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Map.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Map message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.DynamicValue.Map + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.DynamicValue.Map} Map + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Map.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pyth_lazer_transaction.DynamicValue.Map(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + if (!(message.items && message.items.length)) message.items = []; + message.items.push( + $root.pyth_lazer_transaction.DynamicValue.MapItem.decode( + reader, + reader.uint32(), + ), + ); + break; + } + default: + reader.skipType(tag & 7); + break; + } } + return message; + }; + + /** + * Decodes a Map message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.DynamicValue.Map + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.DynamicValue.Map} Map + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Map.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Map message. + * @function verify + * @memberof pyth_lazer_transaction.DynamicValue.Map + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Map.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.items != null && message.hasOwnProperty("items")) { + if (!Array.isArray(message.items)) return "items: array expected"; + for (var i = 0; i < message.items.length; ++i) { + var error = + $root.pyth_lazer_transaction.DynamicValue.MapItem.verify( + message.items[i], + ); + if (error) return "items." + error; + } + } + return null; + }; + + /** + * Creates a Map message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.DynamicValue.Map + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.DynamicValue.Map} Map + */ + Map.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.DynamicValue.Map) + return object; + var message = new $root.pyth_lazer_transaction.DynamicValue.Map(); + if (object.items) { + if (!Array.isArray(object.items)) + throw TypeError( + ".pyth_lazer_transaction.DynamicValue.Map.items: array expected", + ); + message.items = []; + for (var i = 0; i < object.items.length; ++i) { + if (typeof object.items[i] !== "object") + throw TypeError( + ".pyth_lazer_transaction.DynamicValue.Map.items: object expected", + ); + message.items[i] = + $root.pyth_lazer_transaction.DynamicValue.MapItem.fromObject( + object.items[i], + ); + } + } + return message; + }; + + /** + * Creates a plain object from a Map message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.DynamicValue.Map + * @static + * @param {pyth_lazer_transaction.DynamicValue.Map} message Map + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Map.toObject = function toObject(message, options) { + if (!options) options = {}; + var object = {}; + if (options.arrays || options.defaults) object.items = []; + if (message.items && message.items.length) { + object.items = []; + for (var j = 0; j < message.items.length; ++j) + object.items[j] = + $root.pyth_lazer_transaction.DynamicValue.MapItem.toObject( + message.items[j], + options, + ); + } + return object; + }; + + /** + * Converts this Map to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.DynamicValue.Map + * @instance + * @returns {Object.} JSON object + */ + Map.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Map + * @function getTypeUrl + * @memberof pyth_lazer_transaction.DynamicValue.Map + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Map.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.DynamicValue.Map"; + }; - /** - * DynamicValue stringValue. - * @member {string|null|undefined} stringValue - * @memberof pyth_lazer_transaction.DynamicValue - * @instance - */ - DynamicValue.prototype.stringValue = null; - - /** - * DynamicValue doubleValue. - * @member {number|null|undefined} doubleValue - * @memberof pyth_lazer_transaction.DynamicValue - * @instance - */ - DynamicValue.prototype.doubleValue = null; - - /** - * DynamicValue uintValue. - * @member {number|Long|null|undefined} uintValue - * @memberof pyth_lazer_transaction.DynamicValue - * @instance - */ - DynamicValue.prototype.uintValue = null; - - /** - * DynamicValue intValue. - * @member {number|Long|null|undefined} intValue - * @memberof pyth_lazer_transaction.DynamicValue - * @instance - */ - DynamicValue.prototype.intValue = null; - - /** - * DynamicValue boolValue. - * @member {boolean|null|undefined} boolValue - * @memberof pyth_lazer_transaction.DynamicValue - * @instance - */ - DynamicValue.prototype.boolValue = null; - - /** - * DynamicValue bytesValue. - * @member {Uint8Array|null|undefined} bytesValue - * @memberof pyth_lazer_transaction.DynamicValue - * @instance - */ - DynamicValue.prototype.bytesValue = null; - - /** - * DynamicValue durationValue. - * @member {google.protobuf.IDuration|null|undefined} durationValue - * @memberof pyth_lazer_transaction.DynamicValue - * @instance - */ - DynamicValue.prototype.durationValue = null; - - /** - * DynamicValue timestampValue. - * @member {google.protobuf.ITimestamp|null|undefined} timestampValue - * @memberof pyth_lazer_transaction.DynamicValue - * @instance - */ - DynamicValue.prototype.timestampValue = null; - - /** - * DynamicValue list. - * @member {pyth_lazer_transaction.DynamicValue.IList|null|undefined} list - * @memberof pyth_lazer_transaction.DynamicValue - * @instance - */ - DynamicValue.prototype.list = null; - - /** - * DynamicValue map. - * @member {pyth_lazer_transaction.DynamicValue.IMap|null|undefined} map - * @memberof pyth_lazer_transaction.DynamicValue - * @instance - */ - DynamicValue.prototype.map = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * DynamicValue value. - * @member {"stringValue"|"doubleValue"|"uintValue"|"intValue"|"boolValue"|"bytesValue"|"durationValue"|"timestampValue"|"list"|"map"|undefined} value - * @memberof pyth_lazer_transaction.DynamicValue - * @instance - */ - Object.defineProperty(DynamicValue.prototype, "value", { - get: $util.oneOfGetter($oneOfFields = ["stringValue", "doubleValue", "uintValue", "intValue", "boolValue", "bytesValue", "durationValue", "timestampValue", "list", "map"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new DynamicValue instance using the specified properties. - * @function create - * @memberof pyth_lazer_transaction.DynamicValue - * @static - * @param {pyth_lazer_transaction.IDynamicValue=} [properties] Properties to set - * @returns {pyth_lazer_transaction.DynamicValue} DynamicValue instance - */ - DynamicValue.create = function create(properties) { - return new DynamicValue(properties); - }; - - /** - * Encodes the specified DynamicValue message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.verify|verify} messages. - * @function encode - * @memberof pyth_lazer_transaction.DynamicValue - * @static - * @param {pyth_lazer_transaction.IDynamicValue} message DynamicValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DynamicValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.stringValue); - if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.doubleValue); - if (message.uintValue != null && Object.hasOwnProperty.call(message, "uintValue")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.uintValue); - if (message.intValue != null && Object.hasOwnProperty.call(message, "intValue")) - writer.uint32(/* id 4, wireType 0 =*/32).sint64(message.intValue); - if (message.boolValue != null && Object.hasOwnProperty.call(message, "boolValue")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.boolValue); - if (message.bytesValue != null && Object.hasOwnProperty.call(message, "bytesValue")) - writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.bytesValue); - if (message.durationValue != null && Object.hasOwnProperty.call(message, "durationValue")) - $root.google.protobuf.Duration.encode(message.durationValue, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.timestampValue != null && Object.hasOwnProperty.call(message, "timestampValue")) - $root.google.protobuf.Timestamp.encode(message.timestampValue, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.list != null && Object.hasOwnProperty.call(message, "list")) - $root.pyth_lazer_transaction.DynamicValue.List.encode(message.list, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.map != null && Object.hasOwnProperty.call(message, "map")) - $root.pyth_lazer_transaction.DynamicValue.Map.encode(message.map, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified DynamicValue message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.verify|verify} messages. - * @function encodeDelimited - * @memberof pyth_lazer_transaction.DynamicValue - * @static - * @param {pyth_lazer_transaction.IDynamicValue} message DynamicValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DynamicValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DynamicValue message from the specified reader or buffer. - * @function decode - * @memberof pyth_lazer_transaction.DynamicValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pyth_lazer_transaction.DynamicValue} DynamicValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DynamicValue.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.DynamicValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.stringValue = reader.string(); - break; - } - case 2: { - message.doubleValue = reader.double(); - break; - } - case 3: { - message.uintValue = reader.uint64(); - break; - } - case 4: { - message.intValue = reader.sint64(); - break; - } - case 5: { - message.boolValue = reader.bool(); - break; - } - case 6: { - message.bytesValue = reader.bytes(); - break; - } - case 7: { - message.durationValue = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 8: { - message.timestampValue = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 9: { - message.list = $root.pyth_lazer_transaction.DynamicValue.List.decode(reader, reader.uint32()); - break; - } - case 10: { - message.map = $root.pyth_lazer_transaction.DynamicValue.Map.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DynamicValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pyth_lazer_transaction.DynamicValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pyth_lazer_transaction.DynamicValue} DynamicValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DynamicValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DynamicValue message. - * @function verify - * @memberof pyth_lazer_transaction.DynamicValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DynamicValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.stringValue != null && message.hasOwnProperty("stringValue")) { - properties.value = 1; - if (!$util.isString(message.stringValue)) - return "stringValue: string expected"; - } - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - if (typeof message.doubleValue !== "number") - return "doubleValue: number expected"; - } - if (message.uintValue != null && message.hasOwnProperty("uintValue")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - if (!$util.isInteger(message.uintValue) && !(message.uintValue && $util.isInteger(message.uintValue.low) && $util.isInteger(message.uintValue.high))) - return "uintValue: integer|Long expected"; - } - if (message.intValue != null && message.hasOwnProperty("intValue")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - if (!$util.isInteger(message.intValue) && !(message.intValue && $util.isInteger(message.intValue.low) && $util.isInteger(message.intValue.high))) - return "intValue: integer|Long expected"; - } - if (message.boolValue != null && message.hasOwnProperty("boolValue")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - if (typeof message.boolValue !== "boolean") - return "boolValue: boolean expected"; - } - if (message.bytesValue != null && message.hasOwnProperty("bytesValue")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - if (!(message.bytesValue && typeof message.bytesValue.length === "number" || $util.isString(message.bytesValue))) - return "bytesValue: buffer expected"; - } - if (message.durationValue != null && message.hasOwnProperty("durationValue")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - { - var error = $root.google.protobuf.Duration.verify(message.durationValue); - if (error) - return "durationValue." + error; - } - } - if (message.timestampValue != null && message.hasOwnProperty("timestampValue")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.timestampValue); - if (error) - return "timestampValue." + error; - } - } - if (message.list != null && message.hasOwnProperty("list")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - { - var error = $root.pyth_lazer_transaction.DynamicValue.List.verify(message.list); - if (error) - return "list." + error; - } - } - if (message.map != null && message.hasOwnProperty("map")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - { - var error = $root.pyth_lazer_transaction.DynamicValue.Map.verify(message.map); - if (error) - return "map." + error; - } - } - return null; - }; - - /** - * Creates a DynamicValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pyth_lazer_transaction.DynamicValue - * @static - * @param {Object.} object Plain object - * @returns {pyth_lazer_transaction.DynamicValue} DynamicValue - */ - DynamicValue.fromObject = function fromObject(object) { - if (object instanceof $root.pyth_lazer_transaction.DynamicValue) - return object; - var message = new $root.pyth_lazer_transaction.DynamicValue(); - if (object.stringValue != null) - message.stringValue = String(object.stringValue); - if (object.doubleValue != null) - message.doubleValue = Number(object.doubleValue); - if (object.uintValue != null) - if ($util.Long) - (message.uintValue = $util.Long.fromValue(object.uintValue)).unsigned = true; - else if (typeof object.uintValue === "string") - message.uintValue = parseInt(object.uintValue, 10); - else if (typeof object.uintValue === "number") - message.uintValue = object.uintValue; - else if (typeof object.uintValue === "object") - message.uintValue = new $util.LongBits(object.uintValue.low >>> 0, object.uintValue.high >>> 0).toNumber(true); - if (object.intValue != null) - if ($util.Long) - (message.intValue = $util.Long.fromValue(object.intValue)).unsigned = false; - else if (typeof object.intValue === "string") - message.intValue = parseInt(object.intValue, 10); - else if (typeof object.intValue === "number") - message.intValue = object.intValue; - else if (typeof object.intValue === "object") - message.intValue = new $util.LongBits(object.intValue.low >>> 0, object.intValue.high >>> 0).toNumber(); - if (object.boolValue != null) - message.boolValue = Boolean(object.boolValue); - if (object.bytesValue != null) - if (typeof object.bytesValue === "string") - $util.base64.decode(object.bytesValue, message.bytesValue = $util.newBuffer($util.base64.length(object.bytesValue)), 0); - else if (object.bytesValue.length >= 0) - message.bytesValue = object.bytesValue; - if (object.durationValue != null) { - if (typeof object.durationValue !== "object") - throw TypeError(".pyth_lazer_transaction.DynamicValue.durationValue: object expected"); - message.durationValue = $root.google.protobuf.Duration.fromObject(object.durationValue); - } - if (object.timestampValue != null) { - if (typeof object.timestampValue !== "object") - throw TypeError(".pyth_lazer_transaction.DynamicValue.timestampValue: object expected"); - message.timestampValue = $root.google.protobuf.Timestamp.fromObject(object.timestampValue); - } - if (object.list != null) { - if (typeof object.list !== "object") - throw TypeError(".pyth_lazer_transaction.DynamicValue.list: object expected"); - message.list = $root.pyth_lazer_transaction.DynamicValue.List.fromObject(object.list); - } - if (object.map != null) { - if (typeof object.map !== "object") - throw TypeError(".pyth_lazer_transaction.DynamicValue.map: object expected"); - message.map = $root.pyth_lazer_transaction.DynamicValue.Map.fromObject(object.map); - } - return message; - }; - - /** - * Creates a plain object from a DynamicValue message. Also converts values to other types if specified. - * @function toObject - * @memberof pyth_lazer_transaction.DynamicValue - * @static - * @param {pyth_lazer_transaction.DynamicValue} message DynamicValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DynamicValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.stringValue != null && message.hasOwnProperty("stringValue")) { - object.stringValue = message.stringValue; - if (options.oneofs) - object.value = "stringValue"; - } - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { - object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; - if (options.oneofs) - object.value = "doubleValue"; - } - if (message.uintValue != null && message.hasOwnProperty("uintValue")) { - if (typeof message.uintValue === "number") - object.uintValue = options.longs === String ? String(message.uintValue) : message.uintValue; - else - object.uintValue = options.longs === String ? $util.Long.prototype.toString.call(message.uintValue) : options.longs === Number ? new $util.LongBits(message.uintValue.low >>> 0, message.uintValue.high >>> 0).toNumber(true) : message.uintValue; - if (options.oneofs) - object.value = "uintValue"; - } - if (message.intValue != null && message.hasOwnProperty("intValue")) { - if (typeof message.intValue === "number") - object.intValue = options.longs === String ? String(message.intValue) : message.intValue; - else - object.intValue = options.longs === String ? $util.Long.prototype.toString.call(message.intValue) : options.longs === Number ? new $util.LongBits(message.intValue.low >>> 0, message.intValue.high >>> 0).toNumber() : message.intValue; - if (options.oneofs) - object.value = "intValue"; - } - if (message.boolValue != null && message.hasOwnProperty("boolValue")) { - object.boolValue = message.boolValue; - if (options.oneofs) - object.value = "boolValue"; - } - if (message.bytesValue != null && message.hasOwnProperty("bytesValue")) { - object.bytesValue = options.bytes === String ? $util.base64.encode(message.bytesValue, 0, message.bytesValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.bytesValue) : message.bytesValue; - if (options.oneofs) - object.value = "bytesValue"; - } - if (message.durationValue != null && message.hasOwnProperty("durationValue")) { - object.durationValue = $root.google.protobuf.Duration.toObject(message.durationValue, options); - if (options.oneofs) - object.value = "durationValue"; - } - if (message.timestampValue != null && message.hasOwnProperty("timestampValue")) { - object.timestampValue = $root.google.protobuf.Timestamp.toObject(message.timestampValue, options); - if (options.oneofs) - object.value = "timestampValue"; - } - if (message.list != null && message.hasOwnProperty("list")) { - object.list = $root.pyth_lazer_transaction.DynamicValue.List.toObject(message.list, options); - if (options.oneofs) - object.value = "list"; - } - if (message.map != null && message.hasOwnProperty("map")) { - object.map = $root.pyth_lazer_transaction.DynamicValue.Map.toObject(message.map, options); - if (options.oneofs) - object.value = "map"; - } - return object; - }; - - /** - * Converts this DynamicValue to JSON. - * @function toJSON - * @memberof pyth_lazer_transaction.DynamicValue - * @instance - * @returns {Object.} JSON object - */ - DynamicValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DynamicValue - * @function getTypeUrl - * @memberof pyth_lazer_transaction.DynamicValue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DynamicValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pyth_lazer_transaction.DynamicValue"; - }; - - DynamicValue.List = (function() { - - /** - * Properties of a List. - * @memberof pyth_lazer_transaction.DynamicValue - * @interface IList - * @property {Array.|null} [items] List items - */ - - /** - * Constructs a new List. - * @memberof pyth_lazer_transaction.DynamicValue - * @classdesc Represents a List. - * @implements IList - * @constructor - * @param {pyth_lazer_transaction.DynamicValue.IList=} [properties] Properties to set - */ - function List(properties) { - this.items = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * List items. - * @member {Array.} items - * @memberof pyth_lazer_transaction.DynamicValue.List - * @instance - */ - List.prototype.items = $util.emptyArray; - - /** - * Creates a new List instance using the specified properties. - * @function create - * @memberof pyth_lazer_transaction.DynamicValue.List - * @static - * @param {pyth_lazer_transaction.DynamicValue.IList=} [properties] Properties to set - * @returns {pyth_lazer_transaction.DynamicValue.List} List instance - */ - List.create = function create(properties) { - return new List(properties); - }; - - /** - * Encodes the specified List message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.List.verify|verify} messages. - * @function encode - * @memberof pyth_lazer_transaction.DynamicValue.List - * @static - * @param {pyth_lazer_transaction.DynamicValue.IList} message List message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - List.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.items != null && message.items.length) - for (var i = 0; i < message.items.length; ++i) - $root.pyth_lazer_transaction.DynamicValue.encode(message.items[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified List message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.List.verify|verify} messages. - * @function encodeDelimited - * @memberof pyth_lazer_transaction.DynamicValue.List - * @static - * @param {pyth_lazer_transaction.DynamicValue.IList} message List message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - List.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a List message from the specified reader or buffer. - * @function decode - * @memberof pyth_lazer_transaction.DynamicValue.List - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pyth_lazer_transaction.DynamicValue.List} List - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - List.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.DynamicValue.List(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.items && message.items.length)) - message.items = []; - message.items.push($root.pyth_lazer_transaction.DynamicValue.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a List message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pyth_lazer_transaction.DynamicValue.List - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pyth_lazer_transaction.DynamicValue.List} List - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - List.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a List message. - * @function verify - * @memberof pyth_lazer_transaction.DynamicValue.List - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - List.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.items != null && message.hasOwnProperty("items")) { - if (!Array.isArray(message.items)) - return "items: array expected"; - for (var i = 0; i < message.items.length; ++i) { - var error = $root.pyth_lazer_transaction.DynamicValue.verify(message.items[i]); - if (error) - return "items." + error; - } - } - return null; - }; - - /** - * Creates a List message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pyth_lazer_transaction.DynamicValue.List - * @static - * @param {Object.} object Plain object - * @returns {pyth_lazer_transaction.DynamicValue.List} List - */ - List.fromObject = function fromObject(object) { - if (object instanceof $root.pyth_lazer_transaction.DynamicValue.List) - return object; - var message = new $root.pyth_lazer_transaction.DynamicValue.List(); - if (object.items) { - if (!Array.isArray(object.items)) - throw TypeError(".pyth_lazer_transaction.DynamicValue.List.items: array expected"); - message.items = []; - for (var i = 0; i < object.items.length; ++i) { - if (typeof object.items[i] !== "object") - throw TypeError(".pyth_lazer_transaction.DynamicValue.List.items: object expected"); - message.items[i] = $root.pyth_lazer_transaction.DynamicValue.fromObject(object.items[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a List message. Also converts values to other types if specified. - * @function toObject - * @memberof pyth_lazer_transaction.DynamicValue.List - * @static - * @param {pyth_lazer_transaction.DynamicValue.List} message List - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - List.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.items = []; - if (message.items && message.items.length) { - object.items = []; - for (var j = 0; j < message.items.length; ++j) - object.items[j] = $root.pyth_lazer_transaction.DynamicValue.toObject(message.items[j], options); - } - return object; - }; - - /** - * Converts this List to JSON. - * @function toJSON - * @memberof pyth_lazer_transaction.DynamicValue.List - * @instance - * @returns {Object.} JSON object - */ - List.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for List - * @function getTypeUrl - * @memberof pyth_lazer_transaction.DynamicValue.List - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - List.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pyth_lazer_transaction.DynamicValue.List"; - }; - - return List; - })(); - - DynamicValue.MapItem = (function() { - - /** - * Properties of a MapItem. - * @memberof pyth_lazer_transaction.DynamicValue - * @interface IMapItem - * @property {string|null} [key] MapItem key - * @property {pyth_lazer_transaction.IDynamicValue|null} [value] MapItem value - */ - - /** - * Constructs a new MapItem. - * @memberof pyth_lazer_transaction.DynamicValue - * @classdesc Represents a MapItem. - * @implements IMapItem - * @constructor - * @param {pyth_lazer_transaction.DynamicValue.IMapItem=} [properties] Properties to set - */ - function MapItem(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MapItem key. - * @member {string|null|undefined} key - * @memberof pyth_lazer_transaction.DynamicValue.MapItem - * @instance - */ - MapItem.prototype.key = null; - - /** - * MapItem value. - * @member {pyth_lazer_transaction.IDynamicValue|null|undefined} value - * @memberof pyth_lazer_transaction.DynamicValue.MapItem - * @instance - */ - MapItem.prototype.value = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * MapItem _key. - * @member {"key"|undefined} _key - * @memberof pyth_lazer_transaction.DynamicValue.MapItem - * @instance - */ - Object.defineProperty(MapItem.prototype, "_key", { - get: $util.oneOfGetter($oneOfFields = ["key"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * MapItem _value. - * @member {"value"|undefined} _value - * @memberof pyth_lazer_transaction.DynamicValue.MapItem - * @instance - */ - Object.defineProperty(MapItem.prototype, "_value", { - get: $util.oneOfGetter($oneOfFields = ["value"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new MapItem instance using the specified properties. - * @function create - * @memberof pyth_lazer_transaction.DynamicValue.MapItem - * @static - * @param {pyth_lazer_transaction.DynamicValue.IMapItem=} [properties] Properties to set - * @returns {pyth_lazer_transaction.DynamicValue.MapItem} MapItem instance - */ - MapItem.create = function create(properties) { - return new MapItem(properties); - }; - - /** - * Encodes the specified MapItem message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.MapItem.verify|verify} messages. - * @function encode - * @memberof pyth_lazer_transaction.DynamicValue.MapItem - * @static - * @param {pyth_lazer_transaction.DynamicValue.IMapItem} message MapItem message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MapItem.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - $root.pyth_lazer_transaction.DynamicValue.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MapItem message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.MapItem.verify|verify} messages. - * @function encodeDelimited - * @memberof pyth_lazer_transaction.DynamicValue.MapItem - * @static - * @param {pyth_lazer_transaction.DynamicValue.IMapItem} message MapItem message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MapItem.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MapItem message from the specified reader or buffer. - * @function decode - * @memberof pyth_lazer_transaction.DynamicValue.MapItem - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pyth_lazer_transaction.DynamicValue.MapItem} MapItem - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MapItem.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.DynamicValue.MapItem(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.key = reader.string(); - break; - } - case 2: { - message.value = $root.pyth_lazer_transaction.DynamicValue.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MapItem message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pyth_lazer_transaction.DynamicValue.MapItem - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pyth_lazer_transaction.DynamicValue.MapItem} MapItem - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MapItem.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MapItem message. - * @function verify - * @memberof pyth_lazer_transaction.DynamicValue.MapItem - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MapItem.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.key != null && message.hasOwnProperty("key")) { - properties._key = 1; - if (!$util.isString(message.key)) - return "key: string expected"; - } - if (message.value != null && message.hasOwnProperty("value")) { - properties._value = 1; - { - var error = $root.pyth_lazer_transaction.DynamicValue.verify(message.value); - if (error) - return "value." + error; - } - } - return null; - }; - - /** - * Creates a MapItem message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pyth_lazer_transaction.DynamicValue.MapItem - * @static - * @param {Object.} object Plain object - * @returns {pyth_lazer_transaction.DynamicValue.MapItem} MapItem - */ - MapItem.fromObject = function fromObject(object) { - if (object instanceof $root.pyth_lazer_transaction.DynamicValue.MapItem) - return object; - var message = new $root.pyth_lazer_transaction.DynamicValue.MapItem(); - if (object.key != null) - message.key = String(object.key); - if (object.value != null) { - if (typeof object.value !== "object") - throw TypeError(".pyth_lazer_transaction.DynamicValue.MapItem.value: object expected"); - message.value = $root.pyth_lazer_transaction.DynamicValue.fromObject(object.value); - } - return message; - }; - - /** - * Creates a plain object from a MapItem message. Also converts values to other types if specified. - * @function toObject - * @memberof pyth_lazer_transaction.DynamicValue.MapItem - * @static - * @param {pyth_lazer_transaction.DynamicValue.MapItem} message MapItem - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MapItem.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.key != null && message.hasOwnProperty("key")) { - object.key = message.key; - if (options.oneofs) - object._key = "key"; - } - if (message.value != null && message.hasOwnProperty("value")) { - object.value = $root.pyth_lazer_transaction.DynamicValue.toObject(message.value, options); - if (options.oneofs) - object._value = "value"; - } - return object; - }; - - /** - * Converts this MapItem to JSON. - * @function toJSON - * @memberof pyth_lazer_transaction.DynamicValue.MapItem - * @instance - * @returns {Object.} JSON object - */ - MapItem.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MapItem - * @function getTypeUrl - * @memberof pyth_lazer_transaction.DynamicValue.MapItem - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MapItem.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pyth_lazer_transaction.DynamicValue.MapItem"; - }; - - return MapItem; - })(); - - DynamicValue.Map = (function() { - - /** - * Properties of a Map. - * @memberof pyth_lazer_transaction.DynamicValue - * @interface IMap - * @property {Array.|null} [items] Map items - */ - - /** - * Constructs a new Map. - * @memberof pyth_lazer_transaction.DynamicValue - * @classdesc Represents a Map. - * @implements IMap - * @constructor - * @param {pyth_lazer_transaction.DynamicValue.IMap=} [properties] Properties to set - */ - function Map(properties) { - this.items = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Map items. - * @member {Array.} items - * @memberof pyth_lazer_transaction.DynamicValue.Map - * @instance - */ - Map.prototype.items = $util.emptyArray; - - /** - * Creates a new Map instance using the specified properties. - * @function create - * @memberof pyth_lazer_transaction.DynamicValue.Map - * @static - * @param {pyth_lazer_transaction.DynamicValue.IMap=} [properties] Properties to set - * @returns {pyth_lazer_transaction.DynamicValue.Map} Map instance - */ - Map.create = function create(properties) { - return new Map(properties); - }; - - /** - * Encodes the specified Map message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.Map.verify|verify} messages. - * @function encode - * @memberof pyth_lazer_transaction.DynamicValue.Map - * @static - * @param {pyth_lazer_transaction.DynamicValue.IMap} message Map message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Map.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.items != null && message.items.length) - for (var i = 0; i < message.items.length; ++i) - $root.pyth_lazer_transaction.DynamicValue.MapItem.encode(message.items[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Map message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.Map.verify|verify} messages. - * @function encodeDelimited - * @memberof pyth_lazer_transaction.DynamicValue.Map - * @static - * @param {pyth_lazer_transaction.DynamicValue.IMap} message Map message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Map.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Map message from the specified reader or buffer. - * @function decode - * @memberof pyth_lazer_transaction.DynamicValue.Map - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pyth_lazer_transaction.DynamicValue.Map} Map - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Map.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.DynamicValue.Map(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.items && message.items.length)) - message.items = []; - message.items.push($root.pyth_lazer_transaction.DynamicValue.MapItem.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Map message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pyth_lazer_transaction.DynamicValue.Map - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pyth_lazer_transaction.DynamicValue.Map} Map - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Map.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Map message. - * @function verify - * @memberof pyth_lazer_transaction.DynamicValue.Map - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Map.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.items != null && message.hasOwnProperty("items")) { - if (!Array.isArray(message.items)) - return "items: array expected"; - for (var i = 0; i < message.items.length; ++i) { - var error = $root.pyth_lazer_transaction.DynamicValue.MapItem.verify(message.items[i]); - if (error) - return "items." + error; - } - } - return null; - }; - - /** - * Creates a Map message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pyth_lazer_transaction.DynamicValue.Map - * @static - * @param {Object.} object Plain object - * @returns {pyth_lazer_transaction.DynamicValue.Map} Map - */ - Map.fromObject = function fromObject(object) { - if (object instanceof $root.pyth_lazer_transaction.DynamicValue.Map) - return object; - var message = new $root.pyth_lazer_transaction.DynamicValue.Map(); - if (object.items) { - if (!Array.isArray(object.items)) - throw TypeError(".pyth_lazer_transaction.DynamicValue.Map.items: array expected"); - message.items = []; - for (var i = 0; i < object.items.length; ++i) { - if (typeof object.items[i] !== "object") - throw TypeError(".pyth_lazer_transaction.DynamicValue.Map.items: object expected"); - message.items[i] = $root.pyth_lazer_transaction.DynamicValue.MapItem.fromObject(object.items[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Map message. Also converts values to other types if specified. - * @function toObject - * @memberof pyth_lazer_transaction.DynamicValue.Map - * @static - * @param {pyth_lazer_transaction.DynamicValue.Map} message Map - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Map.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.items = []; - if (message.items && message.items.length) { - object.items = []; - for (var j = 0; j < message.items.length; ++j) - object.items[j] = $root.pyth_lazer_transaction.DynamicValue.MapItem.toObject(message.items[j], options); - } - return object; - }; - - /** - * Converts this Map to JSON. - * @function toJSON - * @memberof pyth_lazer_transaction.DynamicValue.Map - * @instance - * @returns {Object.} JSON object - */ - Map.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Map - * @function getTypeUrl - * @memberof pyth_lazer_transaction.DynamicValue.Map - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Map.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pyth_lazer_transaction.DynamicValue.Map"; - }; - - return Map; - })(); - - return DynamicValue; + return Map; })(); - return pyth_lazer_transaction; + return DynamicValue; + })(); + + return pyth_lazer_transaction; })(); -$root.google = (function() { +$root.google = (function () { + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + google.protobuf = (function () { /** - * Namespace google. - * @exports google + * Namespace protobuf. + * @memberof google * @namespace */ - var google = {}; - - google.protobuf = (function() { - - /** - * Namespace protobuf. - * @memberof google - * @namespace - */ - var protobuf = {}; - - protobuf.Timestamp = (function() { - - /** - * Properties of a Timestamp. - * @memberof google.protobuf - * @interface ITimestamp - * @property {number|Long|null} [seconds] Timestamp seconds - * @property {number|null} [nanos] Timestamp nanos - */ - - /** - * Constructs a new Timestamp. - * @memberof google.protobuf - * @classdesc Represents a Timestamp. - * @implements ITimestamp - * @constructor - * @param {google.protobuf.ITimestamp=} [properties] Properties to set - */ - function Timestamp(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + var protobuf = {}; + + protobuf.Timestamp = (function () { + /** + * Properties of a Timestamp. + * @memberof google.protobuf + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos + */ + + /** + * Constructs a new Timestamp. + * @memberof google.protobuf + * @classdesc Represents a Timestamp. + * @implements ITimestamp + * @constructor + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + */ + function Timestamp(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.seconds = $util.Long + ? $util.Long.fromBits(0, 0, false) + : 0; + + /** + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.nanos = 0; + + /** + * Creates a new Timestamp instance using the specified properties. + * @function create + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance + */ + Timestamp.create = function create(properties) { + return new Timestamp(properties); + }; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if ( + message.seconds != null && + Object.hasOwnProperty.call(message, "seconds") + ) + writer.uint32(/* id 1, wireType 0 =*/ 8).int64(message.seconds); + if ( + message.nanos != null && + Object.hasOwnProperty.call(message, "nanos") + ) + writer.uint32(/* id 2, wireType 0 =*/ 16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, + message = new $root.google.protobuf.Timestamp(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Timestamp message. + * @function verify + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Timestamp.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if ( + !$util.isInteger(message.seconds) && + !( + message.seconds && + $util.isInteger(message.seconds.low) && + $util.isInteger(message.seconds.high) + ) + ) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Timestamp} Timestamp + */ + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) return object; + var message = new $root.google.protobuf.Timestamp(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = + false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits( + object.seconds.low >>> 0, + object.seconds.high >>> 0, + ).toNumber(); + if (object.nanos != null) message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.Timestamp} message Timestamp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Timestamp.toObject = function toObject(message, options) { + if (!options) options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = + options.longs === String + ? long.toString() + : options.longs === Number + ? long.toNumber() + : long; + } else object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = + options.longs === String + ? String(message.seconds) + : message.seconds; + else + object.seconds = + options.longs === String + ? $util.Long.prototype.toString.call(message.seconds) + : options.longs === Number + ? new $util.LongBits( + message.seconds.low >>> 0, + message.seconds.high >>> 0, + ).toNumber() + : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Timestamp to JSON. + * @function toJSON + * @memberof google.protobuf.Timestamp + * @instance + * @returns {Object.} JSON object + */ + Timestamp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Timestamp + * @function getTypeUrl + * @memberof google.protobuf.Timestamp + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Timestamp"; + }; - /** - * Timestamp seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Timestamp - * @instance - */ - Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Timestamp nanos. - * @member {number} nanos - * @memberof google.protobuf.Timestamp - * @instance - */ - Timestamp.prototype.nanos = 0; - - /** - * Creates a new Timestamp instance using the specified properties. - * @function create - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp=} [properties] Properties to set - * @returns {google.protobuf.Timestamp} Timestamp instance - */ - Timestamp.create = function create(properties) { - return new Timestamp(properties); - }; - - /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Timestamp.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); - return writer; - }; - - /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Timestamp.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Timestamp message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Timestamp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Timestamp} Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Timestamp.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.seconds = reader.int64(); - break; - } - case 2: { - message.nanos = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Timestamp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Timestamp} Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Timestamp.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Timestamp message. - * @function verify - * @memberof google.protobuf.Timestamp - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Timestamp.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; - return null; - }; - - /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Timestamp - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Timestamp} Timestamp - */ - Timestamp.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Timestamp) - return object; - var message = new $root.google.protobuf.Timestamp(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; - return message; - }; - - /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.Timestamp} message Timestamp - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Timestamp.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; - } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; - return object; - }; - - /** - * Converts this Timestamp to JSON. - * @function toJSON - * @memberof google.protobuf.Timestamp - * @instance - * @returns {Object.} JSON object - */ - Timestamp.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Timestamp - * @function getTypeUrl - * @memberof google.protobuf.Timestamp - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Timestamp"; - }; - - return Timestamp; - })(); - - protobuf.Duration = (function() { - - /** - * Properties of a Duration. - * @memberof google.protobuf - * @interface IDuration - * @property {number|Long|null} [seconds] Duration seconds - * @property {number|null} [nanos] Duration nanos - */ - - /** - * Constructs a new Duration. - * @memberof google.protobuf - * @classdesc Represents a Duration. - * @implements IDuration - * @constructor - * @param {google.protobuf.IDuration=} [properties] Properties to set - */ - function Duration(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + return Timestamp; + })(); - /** - * Duration seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Duration nanos. - * @member {number} nanos - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.nanos = 0; - - /** - * Creates a new Duration instance using the specified properties. - * @function create - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration=} [properties] Properties to set - * @returns {google.protobuf.Duration} Duration instance - */ - Duration.create = function create(properties) { - return new Duration(properties); - }; - - /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Duration.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); - return writer; - }; - - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Duration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Duration message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Duration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Duration} Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Duration.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.seconds = reader.int64(); - break; - } - case 2: { - message.nanos = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Duration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Duration} Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Duration.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Duration message. - * @function verify - * @memberof google.protobuf.Duration - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Duration.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; - return null; - }; - - /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Duration - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Duration} Duration - */ - Duration.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Duration) - return object; - var message = new $root.google.protobuf.Duration(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; - return message; - }; - - /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.Duration} message Duration - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Duration.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; - } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; - return object; - }; - - /** - * Converts this Duration to JSON. - * @function toJSON - * @memberof google.protobuf.Duration - * @instance - * @returns {Object.} JSON object - */ - Duration.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Duration - * @function getTypeUrl - * @memberof google.protobuf.Duration - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Duration"; - }; - - return Duration; - })(); - - 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 (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + protobuf.Duration = (function () { + /** + * Properties of a Duration. + * @memberof google.protobuf + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos + */ + + /** + * Constructs a new Duration. + * @memberof google.protobuf + * @classdesc Represents a Duration. + * @implements IDuration + * @constructor + * @param {google.protobuf.IDuration=} [properties] Properties to set + */ + function Duration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.seconds = $util.Long + ? $util.Long.fromBits(0, 0, false) + : 0; + + /** + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; + + /** + * Creates a new Duration instance using the specified properties. + * @function create + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance + */ + Duration.create = function create(properties) { + return new Duration(properties); + }; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if ( + message.seconds != null && + Object.hasOwnProperty.call(message, "seconds") + ) + writer.uint32(/* id 1, wireType 0 =*/ 8).int64(message.seconds); + if ( + message.nanos != null && + Object.hasOwnProperty.call(message, "nanos") + ) + writer.uint32(/* id 2, wireType 0 =*/ 16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, + message = new $root.google.protobuf.Duration(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Duration message. + * @function verify + * @memberof google.protobuf.Duration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Duration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if ( + !$util.isInteger(message.seconds) && + !( + message.seconds && + $util.isInteger(message.seconds.low) && + $util.isInteger(message.seconds.high) + ) + ) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Duration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Duration} Duration + */ + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) return object; + var message = new $root.google.protobuf.Duration(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = + false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits( + object.seconds.low >>> 0, + object.seconds.high >>> 0, + ).toNumber(); + if (object.nanos != null) message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.Duration} message Duration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Duration.toObject = function toObject(message, options) { + if (!options) options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = + options.longs === String + ? long.toString() + : options.longs === Number + ? long.toNumber() + : long; + } else object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = + options.longs === String + ? String(message.seconds) + : message.seconds; + else + object.seconds = + options.longs === String + ? $util.Long.prototype.toString.call(message.seconds) + : options.longs === Number + ? new $util.LongBits( + message.seconds.low >>> 0, + message.seconds.high >>> 0, + ).toNumber() + : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Duration to JSON. + * @function toJSON + * @memberof google.protobuf.Duration + * @instance + * @returns {Object.} JSON object + */ + Duration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Duration + * @function getTypeUrl + * @memberof google.protobuf.Duration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Duration"; + }; + + return Duration; + })(); - /** - * 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, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - 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.} 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.} 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.} Plain object - */ - Empty.toObject = function toObject() { - return {}; - }; - - /** - * Converts this Empty to JSON. - * @function toJSON - * @memberof google.protobuf.Empty - * @instance - * @returns {Object.} JSON object - */ - Empty.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Empty - * @function getTypeUrl - * @memberof google.protobuf.Empty - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Empty"; - }; - - return Empty; - })(); - - return 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 (var 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, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, + message = new $root.google.protobuf.Empty(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; + 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.} 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.} 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.} Plain object + */ + Empty.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Empty to JSON. + * @function toJSON + * @memberof google.protobuf.Empty + * @instance + * @returns {Object.} JSON object + */ + Empty.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Empty + * @function getTypeUrl + * @memberof google.protobuf.Empty + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Empty"; + }; + + return Empty; })(); - return google; + return protobuf; + })(); + + return google; })(); module.exports = $root; diff --git a/lazer/state_sdk/js/src/generated/governance_instruction.d.ts b/lazer/state_sdk/js/src/generated/governance_instruction.d.ts index 66c941628b..144f35e0d0 100644 --- a/lazer/state_sdk/js/src/generated/governance_instruction.d.ts +++ b/lazer/state_sdk/js/src/generated/governance_instruction.d.ts @@ -2,3924 +2,4521 @@ import * as $protobuf from "protobufjs"; import Long = require("long"); /** Namespace pyth_lazer_transaction. */ export namespace pyth_lazer_transaction { - - /** Properties of a GovernanceInstruction. */ - interface IGovernanceInstruction { - - /** GovernanceInstruction directives */ - directives?: (pyth_lazer_transaction.IGovernanceDirective[]|null); - - /** GovernanceInstruction minExecutionTimestamp */ - minExecutionTimestamp?: (google.protobuf.ITimestamp|null); - - /** GovernanceInstruction maxExecutionTimestamp */ - maxExecutionTimestamp?: (google.protobuf.ITimestamp|null); - - /** GovernanceInstruction governanceSequenceNo */ - governanceSequenceNo?: (number|null); - } - - /** Represents a GovernanceInstruction. */ - class GovernanceInstruction implements IGovernanceInstruction { - - /** - * Constructs a new GovernanceInstruction. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IGovernanceInstruction); - - /** GovernanceInstruction directives. */ - public directives: pyth_lazer_transaction.IGovernanceDirective[]; - - /** GovernanceInstruction minExecutionTimestamp. */ - public minExecutionTimestamp?: (google.protobuf.ITimestamp|null); - - /** GovernanceInstruction maxExecutionTimestamp. */ - public maxExecutionTimestamp?: (google.protobuf.ITimestamp|null); - - /** GovernanceInstruction governanceSequenceNo. */ - public governanceSequenceNo?: (number|null); - - /** GovernanceInstruction _minExecutionTimestamp. */ - public _minExecutionTimestamp?: "minExecutionTimestamp"; - - /** GovernanceInstruction _maxExecutionTimestamp. */ - public _maxExecutionTimestamp?: "maxExecutionTimestamp"; - - /** GovernanceInstruction _governanceSequenceNo. */ - public _governanceSequenceNo?: "governanceSequenceNo"; - - /** - * Creates a new GovernanceInstruction instance using the specified properties. - * @param [properties] Properties to set - * @returns GovernanceInstruction instance - */ - public static create(properties?: pyth_lazer_transaction.IGovernanceInstruction): pyth_lazer_transaction.GovernanceInstruction; - - /** - * Encodes the specified GovernanceInstruction message. Does not implicitly {@link pyth_lazer_transaction.GovernanceInstruction.verify|verify} messages. - * @param message GovernanceInstruction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IGovernanceInstruction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GovernanceInstruction message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceInstruction.verify|verify} messages. - * @param message GovernanceInstruction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IGovernanceInstruction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GovernanceInstruction message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GovernanceInstruction - * @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): pyth_lazer_transaction.GovernanceInstruction; - - /** - * Decodes a GovernanceInstruction message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GovernanceInstruction - * @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)): pyth_lazer_transaction.GovernanceInstruction; - - /** - * Verifies a GovernanceInstruction 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 GovernanceInstruction message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GovernanceInstruction - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.GovernanceInstruction; - - /** - * Creates a plain object from a GovernanceInstruction message. Also converts values to other types if specified. - * @param message GovernanceInstruction - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.GovernanceInstruction, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GovernanceInstruction to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GovernanceInstruction - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ShardFilter. */ - interface IShardFilter { - - /** ShardFilter allShards */ - allShards?: (google.protobuf.IEmpty|null); - - /** ShardFilter shardNames */ - shardNames?: (pyth_lazer_transaction.ShardFilter.IShardNames|null); - - /** ShardFilter shardGroups */ - shardGroups?: (pyth_lazer_transaction.ShardFilter.IShardGroups|null); - } - - /** Represents a ShardFilter. */ - class ShardFilter implements IShardFilter { - - /** - * Constructs a new ShardFilter. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IShardFilter); - - /** ShardFilter allShards. */ - public allShards?: (google.protobuf.IEmpty|null); - - /** ShardFilter shardNames. */ - public shardNames?: (pyth_lazer_transaction.ShardFilter.IShardNames|null); - - /** ShardFilter shardGroups. */ - public shardGroups?: (pyth_lazer_transaction.ShardFilter.IShardGroups|null); - - /** ShardFilter filter. */ - public filter?: ("allShards"|"shardNames"|"shardGroups"); - - /** - * Creates a new ShardFilter instance using the specified properties. - * @param [properties] Properties to set - * @returns ShardFilter instance - */ - public static create(properties?: pyth_lazer_transaction.IShardFilter): pyth_lazer_transaction.ShardFilter; - - /** - * Encodes the specified ShardFilter message. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.verify|verify} messages. - * @param message ShardFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IShardFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ShardFilter message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.verify|verify} messages. - * @param message ShardFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IShardFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ShardFilter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ShardFilter - * @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): pyth_lazer_transaction.ShardFilter; - - /** - * Decodes a ShardFilter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ShardFilter - * @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)): pyth_lazer_transaction.ShardFilter; - - /** - * Verifies a ShardFilter 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 ShardFilter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ShardFilter - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.ShardFilter; - - /** - * Creates a plain object from a ShardFilter message. Also converts values to other types if specified. - * @param message ShardFilter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.ShardFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ShardFilter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ShardFilter - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ShardFilter { - - /** Properties of a ShardNames. */ - interface IShardNames { - - /** ShardNames shardNames */ - shardNames?: (string[]|null); - } - - /** Represents a ShardNames. */ - class ShardNames implements IShardNames { - - /** - * Constructs a new ShardNames. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.ShardFilter.IShardNames); - - /** ShardNames shardNames. */ - public shardNames: string[]; - - /** - * Creates a new ShardNames instance using the specified properties. - * @param [properties] Properties to set - * @returns ShardNames instance - */ - public static create(properties?: pyth_lazer_transaction.ShardFilter.IShardNames): pyth_lazer_transaction.ShardFilter.ShardNames; - - /** - * Encodes the specified ShardNames message. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardNames.verify|verify} messages. - * @param message ShardNames message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.ShardFilter.IShardNames, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ShardNames message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardNames.verify|verify} messages. - * @param message ShardNames message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.ShardFilter.IShardNames, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ShardNames message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ShardNames - * @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): pyth_lazer_transaction.ShardFilter.ShardNames; - - /** - * Decodes a ShardNames message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ShardNames - * @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)): pyth_lazer_transaction.ShardFilter.ShardNames; - - /** - * Verifies a ShardNames 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 ShardNames message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ShardNames - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.ShardFilter.ShardNames; - - /** - * Creates a plain object from a ShardNames message. Also converts values to other types if specified. - * @param message ShardNames - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.ShardFilter.ShardNames, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ShardNames to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ShardNames - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ShardGroups. */ - interface IShardGroups { - - /** ShardGroups shardGroups */ - shardGroups?: (string[]|null); - } - - /** Represents a ShardGroups. */ - class ShardGroups implements IShardGroups { - - /** - * Constructs a new ShardGroups. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.ShardFilter.IShardGroups); - - /** ShardGroups shardGroups. */ - public shardGroups: string[]; - - /** - * Creates a new ShardGroups instance using the specified properties. - * @param [properties] Properties to set - * @returns ShardGroups instance - */ - public static create(properties?: pyth_lazer_transaction.ShardFilter.IShardGroups): pyth_lazer_transaction.ShardFilter.ShardGroups; - - /** - * Encodes the specified ShardGroups message. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardGroups.verify|verify} messages. - * @param message ShardGroups message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.ShardFilter.IShardGroups, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ShardGroups message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardGroups.verify|verify} messages. - * @param message ShardGroups message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.ShardFilter.IShardGroups, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ShardGroups message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ShardGroups - * @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): pyth_lazer_transaction.ShardFilter.ShardGroups; - - /** - * Decodes a ShardGroups message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ShardGroups - * @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)): pyth_lazer_transaction.ShardFilter.ShardGroups; - - /** - * Verifies a ShardGroups 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 ShardGroups message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ShardGroups - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.ShardFilter.ShardGroups; - - /** - * Creates a plain object from a ShardGroups message. Also converts values to other types if specified. - * @param message ShardGroups - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.ShardFilter.ShardGroups, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ShardGroups to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ShardGroups - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a GovernanceDirective. */ - interface IGovernanceDirective { - - /** GovernanceDirective shardFilter */ - shardFilter?: (pyth_lazer_transaction.IShardFilter|null); - - /** GovernanceDirective createShard */ - createShard?: (pyth_lazer_transaction.ICreateShard|null); - - /** GovernanceDirective addGovernanceSource */ - addGovernanceSource?: (pyth_lazer_transaction.IAddGovernanceSource|null); - - /** GovernanceDirective updateGovernanceSource */ - updateGovernanceSource?: (pyth_lazer_transaction.IUpdateGovernanceSource|null); - - /** GovernanceDirective setShardName */ - setShardName?: (pyth_lazer_transaction.ISetShardName|null); - - /** GovernanceDirective setShardGroup */ - setShardGroup?: (pyth_lazer_transaction.ISetShardGroup|null); - - /** GovernanceDirective resetLastSequenceNo */ - resetLastSequenceNo?: (pyth_lazer_transaction.IResetLastSequenceNo|null); - - /** GovernanceDirective addPublisher */ - addPublisher?: (pyth_lazer_transaction.IAddPublisher|null); - - /** GovernanceDirective updatePublisher */ - updatePublisher?: (pyth_lazer_transaction.IUpdatePublisher|null); - - /** GovernanceDirective addFeed */ - addFeed?: (pyth_lazer_transaction.IAddFeed|null); - - /** GovernanceDirective updateFeed */ - updateFeed?: (pyth_lazer_transaction.IUpdateFeed|null); - } - - /** Represents a GovernanceDirective. */ - class GovernanceDirective implements IGovernanceDirective { - - /** - * Constructs a new GovernanceDirective. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IGovernanceDirective); - - /** GovernanceDirective shardFilter. */ - public shardFilter?: (pyth_lazer_transaction.IShardFilter|null); - - /** GovernanceDirective createShard. */ - public createShard?: (pyth_lazer_transaction.ICreateShard|null); - - /** GovernanceDirective addGovernanceSource. */ - public addGovernanceSource?: (pyth_lazer_transaction.IAddGovernanceSource|null); - - /** GovernanceDirective updateGovernanceSource. */ - public updateGovernanceSource?: (pyth_lazer_transaction.IUpdateGovernanceSource|null); - - /** GovernanceDirective setShardName. */ - public setShardName?: (pyth_lazer_transaction.ISetShardName|null); - - /** GovernanceDirective setShardGroup. */ - public setShardGroup?: (pyth_lazer_transaction.ISetShardGroup|null); - - /** GovernanceDirective resetLastSequenceNo. */ - public resetLastSequenceNo?: (pyth_lazer_transaction.IResetLastSequenceNo|null); - - /** GovernanceDirective addPublisher. */ - public addPublisher?: (pyth_lazer_transaction.IAddPublisher|null); - - /** GovernanceDirective updatePublisher. */ - public updatePublisher?: (pyth_lazer_transaction.IUpdatePublisher|null); - - /** GovernanceDirective addFeed. */ - public addFeed?: (pyth_lazer_transaction.IAddFeed|null); - - /** GovernanceDirective updateFeed. */ - public updateFeed?: (pyth_lazer_transaction.IUpdateFeed|null); - - /** GovernanceDirective _shardFilter. */ - public _shardFilter?: "shardFilter"; - - /** GovernanceDirective action. */ - public action?: ("createShard"|"addGovernanceSource"|"updateGovernanceSource"|"setShardName"|"setShardGroup"|"resetLastSequenceNo"|"addPublisher"|"updatePublisher"|"addFeed"|"updateFeed"); - - /** - * Creates a new GovernanceDirective instance using the specified properties. - * @param [properties] Properties to set - * @returns GovernanceDirective instance - */ - public static create(properties?: pyth_lazer_transaction.IGovernanceDirective): pyth_lazer_transaction.GovernanceDirective; - - /** - * Encodes the specified GovernanceDirective message. Does not implicitly {@link pyth_lazer_transaction.GovernanceDirective.verify|verify} messages. - * @param message GovernanceDirective message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IGovernanceDirective, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GovernanceDirective message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceDirective.verify|verify} messages. - * @param message GovernanceDirective message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IGovernanceDirective, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GovernanceDirective message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GovernanceDirective - * @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): pyth_lazer_transaction.GovernanceDirective; - - /** - * Decodes a GovernanceDirective message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GovernanceDirective - * @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)): pyth_lazer_transaction.GovernanceDirective; - - /** - * Verifies a GovernanceDirective 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 GovernanceDirective message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GovernanceDirective - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.GovernanceDirective; - - /** - * Creates a plain object from a GovernanceDirective message. Also converts values to other types if specified. - * @param message GovernanceDirective - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.GovernanceDirective, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GovernanceDirective to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GovernanceDirective - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Permissions. */ - interface IPermissions { - - /** Permissions allActions */ - allActions?: (boolean|null); - - /** Permissions shardActions */ - shardActions?: (pyth_lazer_transaction.Permissions.ShardAction[]|null); - - /** Permissions allUpdateGovernanceSourceActions */ - allUpdateGovernanceSourceActions?: (boolean|null); - - /** Permissions updateGovernanceSourceActions */ - updateGovernanceSourceActions?: (pyth_lazer_transaction.Permissions.UpdateGovernanceSourceAction[]|null); - - /** Permissions allUpdatePublisherAction */ - allUpdatePublisherAction?: (boolean|null); - - /** Permissions updatePublisherActions */ - updatePublisherActions?: (pyth_lazer_transaction.Permissions.UpdatePublisherAction[]|null); - - /** Permissions allUpdateFeedActions */ - allUpdateFeedActions?: (boolean|null); - - /** Permissions updateFeedActions */ - updateFeedActions?: (pyth_lazer_transaction.Permissions.UpdateFeedAction[]|null); - } - - /** Represents a Permissions. */ - class Permissions implements IPermissions { - - /** - * Constructs a new Permissions. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IPermissions); - - /** Permissions allActions. */ - public allActions?: (boolean|null); - - /** Permissions shardActions. */ - public shardActions: pyth_lazer_transaction.Permissions.ShardAction[]; - - /** Permissions allUpdateGovernanceSourceActions. */ - public allUpdateGovernanceSourceActions?: (boolean|null); - - /** Permissions updateGovernanceSourceActions. */ - public updateGovernanceSourceActions: pyth_lazer_transaction.Permissions.UpdateGovernanceSourceAction[]; - - /** Permissions allUpdatePublisherAction. */ - public allUpdatePublisherAction?: (boolean|null); - - /** Permissions updatePublisherActions. */ - public updatePublisherActions: pyth_lazer_transaction.Permissions.UpdatePublisherAction[]; - - /** Permissions allUpdateFeedActions. */ - public allUpdateFeedActions?: (boolean|null); - - /** Permissions updateFeedActions. */ - public updateFeedActions: pyth_lazer_transaction.Permissions.UpdateFeedAction[]; - - /** Permissions _allActions. */ - public _allActions?: "allActions"; - - /** Permissions _allUpdateGovernanceSourceActions. */ - public _allUpdateGovernanceSourceActions?: "allUpdateGovernanceSourceActions"; - - /** Permissions _allUpdatePublisherAction. */ - public _allUpdatePublisherAction?: "allUpdatePublisherAction"; - - /** Permissions _allUpdateFeedActions. */ - public _allUpdateFeedActions?: "allUpdateFeedActions"; - - /** - * Creates a new Permissions instance using the specified properties. - * @param [properties] Properties to set - * @returns Permissions instance - */ - public static create(properties?: pyth_lazer_transaction.IPermissions): pyth_lazer_transaction.Permissions; - - /** - * Encodes the specified Permissions message. Does not implicitly {@link pyth_lazer_transaction.Permissions.verify|verify} messages. - * @param message Permissions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IPermissions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Permissions message, length delimited. Does not implicitly {@link pyth_lazer_transaction.Permissions.verify|verify} messages. - * @param message Permissions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IPermissions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Permissions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Permissions - * @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): pyth_lazer_transaction.Permissions; - - /** - * Decodes a Permissions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Permissions - * @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)): pyth_lazer_transaction.Permissions; - - /** - * Verifies a Permissions 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 Permissions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Permissions - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.Permissions; - - /** - * Creates a plain object from a Permissions message. Also converts values to other types if specified. - * @param message Permissions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.Permissions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Permissions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Permissions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Permissions { - - /** ShardAction enum. */ - enum ShardAction { - SHARD_ACTION_UNSPECIFIED = 0, - CREATE_SHARD = 101, - ADD_GOVERNANCE_SOURCE = 102, - UPDATE_GOVERNANCE_SOURCE = 103, - SET_SHARD_NAME = 104, - SET_SHARD_GROUP = 105, - RESET_LAST_SEQUENCE_NO = 106, - ADD_PUBLISHER = 107, - ADD_FEED = 109 - } - - /** UpdateGovernanceSourceAction enum. */ - enum UpdateGovernanceSourceAction { - UPDATE_GOVERNANCE_SOURCE_ACTION_UNSPECIFIED = 0, - SET_GOVERNANCE_SOURCE_PERMISSIONS = 101, - REMOVE_GOVERNANCE_SOURCE = 199 - } - - /** UpdatePublisherAction enum. */ - enum UpdatePublisherAction { - UPDATE_PUBLISHER_ACTION_UNSPECIFIED = 0, - SET_PUBLISHER_NAME = 101, - ADD_PUBLISHER_PUBLIC_KEYS = 102, - REMOVE_PUBLISHER_PUBLIC_KEYS = 103, - SET_PUBLISHER_PUBLIC_KEYS = 104, - SET_PUBLISHER_ACTIVE = 105, - REMOVE_PUBLISHER = 199 - } - - /** UpdateFeedAction enum. */ - enum UpdateFeedAction { - UPDATE_FEED_ACTION_UNSPECIFIED = 0, - UPDATE_FEED_METADATA = 101, - ACTIVATE_FEED = 102, - DEACTIVATE_FEED = 103, - REMOVE_FEED = 199 - } + /** Properties of a GovernanceInstruction. */ + interface IGovernanceInstruction { + /** GovernanceInstruction directives */ + directives?: pyth_lazer_transaction.IGovernanceDirective[] | null; + + /** GovernanceInstruction minExecutionTimestamp */ + minExecutionTimestamp?: google.protobuf.ITimestamp | null; + + /** GovernanceInstruction maxExecutionTimestamp */ + maxExecutionTimestamp?: google.protobuf.ITimestamp | null; + + /** GovernanceInstruction governanceSequenceNo */ + governanceSequenceNo?: number | null; + } + + /** Represents a GovernanceInstruction. */ + class GovernanceInstruction implements IGovernanceInstruction { + /** + * Constructs a new GovernanceInstruction. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IGovernanceInstruction); + + /** GovernanceInstruction directives. */ + public directives: pyth_lazer_transaction.IGovernanceDirective[]; + + /** GovernanceInstruction minExecutionTimestamp. */ + public minExecutionTimestamp?: google.protobuf.ITimestamp | null; + + /** GovernanceInstruction maxExecutionTimestamp. */ + public maxExecutionTimestamp?: google.protobuf.ITimestamp | null; + + /** GovernanceInstruction governanceSequenceNo. */ + public governanceSequenceNo?: number | null; + + /** GovernanceInstruction _minExecutionTimestamp. */ + public _minExecutionTimestamp?: "minExecutionTimestamp"; + + /** GovernanceInstruction _maxExecutionTimestamp. */ + public _maxExecutionTimestamp?: "maxExecutionTimestamp"; + + /** GovernanceInstruction _governanceSequenceNo. */ + public _governanceSequenceNo?: "governanceSequenceNo"; + + /** + * Creates a new GovernanceInstruction instance using the specified properties. + * @param [properties] Properties to set + * @returns GovernanceInstruction instance + */ + public static create( + properties?: pyth_lazer_transaction.IGovernanceInstruction, + ): pyth_lazer_transaction.GovernanceInstruction; + + /** + * Encodes the specified GovernanceInstruction message. Does not implicitly {@link pyth_lazer_transaction.GovernanceInstruction.verify|verify} messages. + * @param message GovernanceInstruction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IGovernanceInstruction, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified GovernanceInstruction message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceInstruction.verify|verify} messages. + * @param message GovernanceInstruction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IGovernanceInstruction, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a GovernanceInstruction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GovernanceInstruction + * @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, + ): pyth_lazer_transaction.GovernanceInstruction; + + /** + * Decodes a GovernanceInstruction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GovernanceInstruction + * @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, + ): pyth_lazer_transaction.GovernanceInstruction; + + /** + * Verifies a GovernanceInstruction 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 GovernanceInstruction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GovernanceInstruction + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.GovernanceInstruction; + + /** + * Creates a plain object from a GovernanceInstruction message. Also converts values to other types if specified. + * @param message GovernanceInstruction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.GovernanceInstruction, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this GovernanceInstruction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GovernanceInstruction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ShardFilter. */ + interface IShardFilter { + /** ShardFilter allShards */ + allShards?: google.protobuf.IEmpty | null; + + /** ShardFilter shardNames */ + shardNames?: pyth_lazer_transaction.ShardFilter.IShardNames | null; + + /** ShardFilter shardGroups */ + shardGroups?: pyth_lazer_transaction.ShardFilter.IShardGroups | null; + } + + /** Represents a ShardFilter. */ + class ShardFilter implements IShardFilter { + /** + * Constructs a new ShardFilter. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IShardFilter); + + /** ShardFilter allShards. */ + public allShards?: google.protobuf.IEmpty | null; + + /** ShardFilter shardNames. */ + public shardNames?: pyth_lazer_transaction.ShardFilter.IShardNames | null; + + /** ShardFilter shardGroups. */ + public shardGroups?: pyth_lazer_transaction.ShardFilter.IShardGroups | null; + + /** ShardFilter filter. */ + public filter?: "allShards" | "shardNames" | "shardGroups"; + + /** + * Creates a new ShardFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns ShardFilter instance + */ + public static create( + properties?: pyth_lazer_transaction.IShardFilter, + ): pyth_lazer_transaction.ShardFilter; + + /** + * Encodes the specified ShardFilter message. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.verify|verify} messages. + * @param message ShardFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IShardFilter, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified ShardFilter message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.verify|verify} messages. + * @param message ShardFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IShardFilter, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ShardFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ShardFilter + * @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, + ): pyth_lazer_transaction.ShardFilter; + + /** + * Decodes a ShardFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ShardFilter + * @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, + ): pyth_lazer_transaction.ShardFilter; + + /** + * Verifies a ShardFilter 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 ShardFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ShardFilter + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.ShardFilter; + + /** + * Creates a plain object from a ShardFilter message. Also converts values to other types if specified. + * @param message ShardFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.ShardFilter, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this ShardFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ShardFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ShardFilter { + /** Properties of a ShardNames. */ + interface IShardNames { + /** ShardNames shardNames */ + shardNames?: string[] | null; } - /** Properties of a GovernanceSource. */ - interface IGovernanceSource { - - /** GovernanceSource singleEd25519 */ - singleEd25519?: (pyth_lazer_transaction.GovernanceSource.ISingleEd25519|null); - - /** GovernanceSource wormholeEmitter */ - wormholeEmitter?: (pyth_lazer_transaction.GovernanceSource.IWormholeEmitter|null); + /** Represents a ShardNames. */ + class ShardNames implements IShardNames { + /** + * Constructs a new ShardNames. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ShardFilter.IShardNames); + + /** ShardNames shardNames. */ + public shardNames: string[]; + + /** + * Creates a new ShardNames instance using the specified properties. + * @param [properties] Properties to set + * @returns ShardNames instance + */ + public static create( + properties?: pyth_lazer_transaction.ShardFilter.IShardNames, + ): pyth_lazer_transaction.ShardFilter.ShardNames; + + /** + * Encodes the specified ShardNames message. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardNames.verify|verify} messages. + * @param message ShardNames message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.ShardFilter.IShardNames, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified ShardNames message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardNames.verify|verify} messages. + * @param message ShardNames message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.ShardFilter.IShardNames, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ShardNames message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ShardNames + * @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, + ): pyth_lazer_transaction.ShardFilter.ShardNames; + + /** + * Decodes a ShardNames message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ShardNames + * @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, + ): pyth_lazer_transaction.ShardFilter.ShardNames; + + /** + * Verifies a ShardNames 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 ShardNames message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ShardNames + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.ShardFilter.ShardNames; + + /** + * Creates a plain object from a ShardNames message. Also converts values to other types if specified. + * @param message ShardNames + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.ShardFilter.ShardNames, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this ShardNames to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ShardNames + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Represents a GovernanceSource. */ - class GovernanceSource implements IGovernanceSource { - - /** - * Constructs a new GovernanceSource. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IGovernanceSource); - - /** GovernanceSource singleEd25519. */ - public singleEd25519?: (pyth_lazer_transaction.GovernanceSource.ISingleEd25519|null); - - /** GovernanceSource wormholeEmitter. */ - public wormholeEmitter?: (pyth_lazer_transaction.GovernanceSource.IWormholeEmitter|null); - - /** GovernanceSource source. */ - public source?: ("singleEd25519"|"wormholeEmitter"); - - /** - * Creates a new GovernanceSource instance using the specified properties. - * @param [properties] Properties to set - * @returns GovernanceSource instance - */ - public static create(properties?: pyth_lazer_transaction.IGovernanceSource): pyth_lazer_transaction.GovernanceSource; - - /** - * Encodes the specified GovernanceSource message. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.verify|verify} messages. - * @param message GovernanceSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IGovernanceSource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GovernanceSource message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.verify|verify} messages. - * @param message GovernanceSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IGovernanceSource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GovernanceSource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GovernanceSource - * @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): pyth_lazer_transaction.GovernanceSource; - - /** - * Decodes a GovernanceSource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GovernanceSource - * @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)): pyth_lazer_transaction.GovernanceSource; - - /** - * Verifies a GovernanceSource 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 GovernanceSource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GovernanceSource - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.GovernanceSource; - - /** - * Creates a plain object from a GovernanceSource message. Also converts values to other types if specified. - * @param message GovernanceSource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.GovernanceSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GovernanceSource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GovernanceSource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** Properties of a ShardGroups. */ + interface IShardGroups { + /** ShardGroups shardGroups */ + shardGroups?: string[] | null; } - namespace GovernanceSource { - - /** Properties of a SingleEd25519. */ - interface ISingleEd25519 { - - /** SingleEd25519 publicKey */ - publicKey?: (Uint8Array|null); - } - - /** Represents a SingleEd25519. */ - class SingleEd25519 implements ISingleEd25519 { - - /** - * Constructs a new SingleEd25519. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.GovernanceSource.ISingleEd25519); - - /** SingleEd25519 publicKey. */ - public publicKey?: (Uint8Array|null); - - /** SingleEd25519 _publicKey. */ - public _publicKey?: "publicKey"; - - /** - * Creates a new SingleEd25519 instance using the specified properties. - * @param [properties] Properties to set - * @returns SingleEd25519 instance - */ - public static create(properties?: pyth_lazer_transaction.GovernanceSource.ISingleEd25519): pyth_lazer_transaction.GovernanceSource.SingleEd25519; - - /** - * Encodes the specified SingleEd25519 message. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.SingleEd25519.verify|verify} messages. - * @param message SingleEd25519 message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.GovernanceSource.ISingleEd25519, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SingleEd25519 message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.SingleEd25519.verify|verify} messages. - * @param message SingleEd25519 message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.GovernanceSource.ISingleEd25519, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SingleEd25519 message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SingleEd25519 - * @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): pyth_lazer_transaction.GovernanceSource.SingleEd25519; - - /** - * Decodes a SingleEd25519 message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SingleEd25519 - * @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)): pyth_lazer_transaction.GovernanceSource.SingleEd25519; - - /** - * Verifies a SingleEd25519 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 SingleEd25519 message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SingleEd25519 - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.GovernanceSource.SingleEd25519; - - /** - * Creates a plain object from a SingleEd25519 message. Also converts values to other types if specified. - * @param message SingleEd25519 - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.GovernanceSource.SingleEd25519, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SingleEd25519 to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SingleEd25519 - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WormholeEmitter. */ - interface IWormholeEmitter { - - /** WormholeEmitter address */ - address?: (Uint8Array|null); - - /** WormholeEmitter chainId */ - chainId?: (number|null); - } - - /** Represents a WormholeEmitter. */ - class WormholeEmitter implements IWormholeEmitter { - - /** - * Constructs a new WormholeEmitter. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.GovernanceSource.IWormholeEmitter); - - /** WormholeEmitter address. */ - public address?: (Uint8Array|null); - - /** WormholeEmitter chainId. */ - public chainId?: (number|null); - - /** WormholeEmitter _address. */ - public _address?: "address"; - - /** WormholeEmitter _chainId. */ - public _chainId?: "chainId"; - - /** - * Creates a new WormholeEmitter instance using the specified properties. - * @param [properties] Properties to set - * @returns WormholeEmitter instance - */ - public static create(properties?: pyth_lazer_transaction.GovernanceSource.IWormholeEmitter): pyth_lazer_transaction.GovernanceSource.WormholeEmitter; - - /** - * Encodes the specified WormholeEmitter message. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.WormholeEmitter.verify|verify} messages. - * @param message WormholeEmitter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.GovernanceSource.IWormholeEmitter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WormholeEmitter message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.WormholeEmitter.verify|verify} messages. - * @param message WormholeEmitter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.GovernanceSource.IWormholeEmitter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WormholeEmitter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WormholeEmitter - * @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): pyth_lazer_transaction.GovernanceSource.WormholeEmitter; - - /** - * Decodes a WormholeEmitter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WormholeEmitter - * @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)): pyth_lazer_transaction.GovernanceSource.WormholeEmitter; - - /** - * Verifies a WormholeEmitter 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 WormholeEmitter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WormholeEmitter - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.GovernanceSource.WormholeEmitter; - - /** - * Creates a plain object from a WormholeEmitter message. Also converts values to other types if specified. - * @param message WormholeEmitter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.GovernanceSource.WormholeEmitter, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WormholeEmitter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WormholeEmitter - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** Represents a ShardGroups. */ + class ShardGroups implements IShardGroups { + /** + * Constructs a new ShardGroups. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ShardFilter.IShardGroups); + + /** ShardGroups shardGroups. */ + public shardGroups: string[]; + + /** + * Creates a new ShardGroups instance using the specified properties. + * @param [properties] Properties to set + * @returns ShardGroups instance + */ + public static create( + properties?: pyth_lazer_transaction.ShardFilter.IShardGroups, + ): pyth_lazer_transaction.ShardFilter.ShardGroups; + + /** + * Encodes the specified ShardGroups message. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardGroups.verify|verify} messages. + * @param message ShardGroups message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.ShardFilter.IShardGroups, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified ShardGroups message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardGroups.verify|verify} messages. + * @param message ShardGroups message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.ShardFilter.IShardGroups, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ShardGroups message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ShardGroups + * @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, + ): pyth_lazer_transaction.ShardFilter.ShardGroups; + + /** + * Decodes a ShardGroups message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ShardGroups + * @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, + ): pyth_lazer_transaction.ShardFilter.ShardGroups; + + /** + * Verifies a ShardGroups 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 ShardGroups message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ShardGroups + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.ShardFilter.ShardGroups; + + /** + * Creates a plain object from a ShardGroups message. Also converts values to other types if specified. + * @param message ShardGroups + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.ShardFilter.ShardGroups, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this ShardGroups to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ShardGroups + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } + } - /** Properties of a CreateShard. */ - interface ICreateShard { + /** Properties of a GovernanceDirective. */ + interface IGovernanceDirective { + /** GovernanceDirective shardFilter */ + shardFilter?: pyth_lazer_transaction.IShardFilter | null; - /** CreateShard shardId */ - shardId?: (number|null); + /** GovernanceDirective createShard */ + createShard?: pyth_lazer_transaction.ICreateShard | null; - /** CreateShard shardGroup */ - shardGroup?: (string|null); - - /** CreateShard minRate */ - minRate?: (google.protobuf.IDuration|null); + /** GovernanceDirective addGovernanceSource */ + addGovernanceSource?: pyth_lazer_transaction.IAddGovernanceSource | null; + + /** GovernanceDirective updateGovernanceSource */ + updateGovernanceSource?: pyth_lazer_transaction.IUpdateGovernanceSource | null; + + /** GovernanceDirective setShardName */ + setShardName?: pyth_lazer_transaction.ISetShardName | null; + + /** GovernanceDirective setShardGroup */ + setShardGroup?: pyth_lazer_transaction.ISetShardGroup | null; + + /** GovernanceDirective resetLastSequenceNo */ + resetLastSequenceNo?: pyth_lazer_transaction.IResetLastSequenceNo | null; + + /** GovernanceDirective addPublisher */ + addPublisher?: pyth_lazer_transaction.IAddPublisher | null; + + /** GovernanceDirective updatePublisher */ + updatePublisher?: pyth_lazer_transaction.IUpdatePublisher | null; + + /** GovernanceDirective addFeed */ + addFeed?: pyth_lazer_transaction.IAddFeed | null; + + /** GovernanceDirective updateFeed */ + updateFeed?: pyth_lazer_transaction.IUpdateFeed | null; + } + + /** Represents a GovernanceDirective. */ + class GovernanceDirective implements IGovernanceDirective { + /** + * Constructs a new GovernanceDirective. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IGovernanceDirective); + + /** GovernanceDirective shardFilter. */ + public shardFilter?: pyth_lazer_transaction.IShardFilter | null; + + /** GovernanceDirective createShard. */ + public createShard?: pyth_lazer_transaction.ICreateShard | null; + + /** GovernanceDirective addGovernanceSource. */ + public addGovernanceSource?: pyth_lazer_transaction.IAddGovernanceSource | null; + + /** GovernanceDirective updateGovernanceSource. */ + public updateGovernanceSource?: pyth_lazer_transaction.IUpdateGovernanceSource | null; + + /** GovernanceDirective setShardName. */ + public setShardName?: pyth_lazer_transaction.ISetShardName | null; + + /** GovernanceDirective setShardGroup. */ + public setShardGroup?: pyth_lazer_transaction.ISetShardGroup | null; + + /** GovernanceDirective resetLastSequenceNo. */ + public resetLastSequenceNo?: pyth_lazer_transaction.IResetLastSequenceNo | null; + + /** GovernanceDirective addPublisher. */ + public addPublisher?: pyth_lazer_transaction.IAddPublisher | null; + + /** GovernanceDirective updatePublisher. */ + public updatePublisher?: pyth_lazer_transaction.IUpdatePublisher | null; + + /** GovernanceDirective addFeed. */ + public addFeed?: pyth_lazer_transaction.IAddFeed | null; + + /** GovernanceDirective updateFeed. */ + public updateFeed?: pyth_lazer_transaction.IUpdateFeed | null; + + /** GovernanceDirective _shardFilter. */ + public _shardFilter?: "shardFilter"; + + /** GovernanceDirective action. */ + public action?: + | "createShard" + | "addGovernanceSource" + | "updateGovernanceSource" + | "setShardName" + | "setShardGroup" + | "resetLastSequenceNo" + | "addPublisher" + | "updatePublisher" + | "addFeed" + | "updateFeed"; + + /** + * Creates a new GovernanceDirective instance using the specified properties. + * @param [properties] Properties to set + * @returns GovernanceDirective instance + */ + public static create( + properties?: pyth_lazer_transaction.IGovernanceDirective, + ): pyth_lazer_transaction.GovernanceDirective; + + /** + * Encodes the specified GovernanceDirective message. Does not implicitly {@link pyth_lazer_transaction.GovernanceDirective.verify|verify} messages. + * @param message GovernanceDirective message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IGovernanceDirective, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified GovernanceDirective message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceDirective.verify|verify} messages. + * @param message GovernanceDirective message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IGovernanceDirective, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a GovernanceDirective message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GovernanceDirective + * @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, + ): pyth_lazer_transaction.GovernanceDirective; + + /** + * Decodes a GovernanceDirective message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GovernanceDirective + * @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, + ): pyth_lazer_transaction.GovernanceDirective; + + /** + * Verifies a GovernanceDirective 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 GovernanceDirective message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GovernanceDirective + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.GovernanceDirective; + + /** + * Creates a plain object from a GovernanceDirective message. Also converts values to other types if specified. + * @param message GovernanceDirective + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.GovernanceDirective, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this GovernanceDirective to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GovernanceDirective + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Permissions. */ + interface IPermissions { + /** Permissions allActions */ + allActions?: boolean | null; + + /** Permissions shardActions */ + shardActions?: pyth_lazer_transaction.Permissions.ShardAction[] | null; + + /** Permissions allUpdateGovernanceSourceActions */ + allUpdateGovernanceSourceActions?: boolean | null; + + /** Permissions updateGovernanceSourceActions */ + updateGovernanceSourceActions?: + | pyth_lazer_transaction.Permissions.UpdateGovernanceSourceAction[] + | null; + + /** Permissions allUpdatePublisherAction */ + allUpdatePublisherAction?: boolean | null; + + /** Permissions updatePublisherActions */ + updatePublisherActions?: + | pyth_lazer_transaction.Permissions.UpdatePublisherAction[] + | null; + + /** Permissions allUpdateFeedActions */ + allUpdateFeedActions?: boolean | null; + + /** Permissions updateFeedActions */ + updateFeedActions?: + | pyth_lazer_transaction.Permissions.UpdateFeedAction[] + | null; + } + + /** Represents a Permissions. */ + class Permissions implements IPermissions { + /** + * Constructs a new Permissions. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IPermissions); + + /** Permissions allActions. */ + public allActions?: boolean | null; + + /** Permissions shardActions. */ + public shardActions: pyth_lazer_transaction.Permissions.ShardAction[]; + + /** Permissions allUpdateGovernanceSourceActions. */ + public allUpdateGovernanceSourceActions?: boolean | null; + + /** Permissions updateGovernanceSourceActions. */ + public updateGovernanceSourceActions: pyth_lazer_transaction.Permissions.UpdateGovernanceSourceAction[]; + + /** Permissions allUpdatePublisherAction. */ + public allUpdatePublisherAction?: boolean | null; + + /** Permissions updatePublisherActions. */ + public updatePublisherActions: pyth_lazer_transaction.Permissions.UpdatePublisherAction[]; + + /** Permissions allUpdateFeedActions. */ + public allUpdateFeedActions?: boolean | null; + + /** Permissions updateFeedActions. */ + public updateFeedActions: pyth_lazer_transaction.Permissions.UpdateFeedAction[]; + + /** Permissions _allActions. */ + public _allActions?: "allActions"; + + /** Permissions _allUpdateGovernanceSourceActions. */ + public _allUpdateGovernanceSourceActions?: "allUpdateGovernanceSourceActions"; + + /** Permissions _allUpdatePublisherAction. */ + public _allUpdatePublisherAction?: "allUpdatePublisherAction"; + + /** Permissions _allUpdateFeedActions. */ + public _allUpdateFeedActions?: "allUpdateFeedActions"; + + /** + * Creates a new Permissions instance using the specified properties. + * @param [properties] Properties to set + * @returns Permissions instance + */ + public static create( + properties?: pyth_lazer_transaction.IPermissions, + ): pyth_lazer_transaction.Permissions; + + /** + * Encodes the specified Permissions message. Does not implicitly {@link pyth_lazer_transaction.Permissions.verify|verify} messages. + * @param message Permissions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IPermissions, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified Permissions message, length delimited. Does not implicitly {@link pyth_lazer_transaction.Permissions.verify|verify} messages. + * @param message Permissions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IPermissions, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a Permissions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Permissions + * @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, + ): pyth_lazer_transaction.Permissions; + + /** + * Decodes a Permissions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Permissions + * @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, + ): pyth_lazer_transaction.Permissions; + + /** + * Verifies a Permissions 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 Permissions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Permissions + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.Permissions; + + /** + * Creates a plain object from a Permissions message. Also converts values to other types if specified. + * @param message Permissions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.Permissions, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Permissions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Permissions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Permissions { + /** ShardAction enum. */ + enum ShardAction { + SHARD_ACTION_UNSPECIFIED = 0, + CREATE_SHARD = 101, + ADD_GOVERNANCE_SOURCE = 102, + UPDATE_GOVERNANCE_SOURCE = 103, + SET_SHARD_NAME = 104, + SET_SHARD_GROUP = 105, + RESET_LAST_SEQUENCE_NO = 106, + ADD_PUBLISHER = 107, + ADD_FEED = 109, } - /** Represents a CreateShard. */ - class CreateShard implements ICreateShard { - - /** - * Constructs a new CreateShard. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.ICreateShard); - - /** CreateShard shardId. */ - public shardId?: (number|null); - - /** CreateShard shardGroup. */ - public shardGroup?: (string|null); - - /** CreateShard minRate. */ - public minRate?: (google.protobuf.IDuration|null); - - /** CreateShard _shardId. */ - public _shardId?: "shardId"; - - /** CreateShard _shardGroup. */ - public _shardGroup?: "shardGroup"; - - /** CreateShard _minRate. */ - public _minRate?: "minRate"; - - /** - * Creates a new CreateShard instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateShard instance - */ - public static create(properties?: pyth_lazer_transaction.ICreateShard): pyth_lazer_transaction.CreateShard; - - /** - * Encodes the specified CreateShard message. Does not implicitly {@link pyth_lazer_transaction.CreateShard.verify|verify} messages. - * @param message CreateShard message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.ICreateShard, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateShard message, length delimited. Does not implicitly {@link pyth_lazer_transaction.CreateShard.verify|verify} messages. - * @param message CreateShard message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.ICreateShard, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateShard message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateShard - * @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): pyth_lazer_transaction.CreateShard; - - /** - * Decodes a CreateShard message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateShard - * @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)): pyth_lazer_transaction.CreateShard; - - /** - * Verifies a CreateShard 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 CreateShard message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateShard - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.CreateShard; - - /** - * Creates a plain object from a CreateShard message. Also converts values to other types if specified. - * @param message CreateShard - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.CreateShard, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateShard to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateShard - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** UpdateGovernanceSourceAction enum. */ + enum UpdateGovernanceSourceAction { + UPDATE_GOVERNANCE_SOURCE_ACTION_UNSPECIFIED = 0, + SET_GOVERNANCE_SOURCE_PERMISSIONS = 101, + REMOVE_GOVERNANCE_SOURCE = 199, } - /** Properties of an AddGovernanceSource. */ - interface IAddGovernanceSource { - - /** AddGovernanceSource newSource */ - newSource?: (pyth_lazer_transaction.IGovernanceSource|null); - - /** AddGovernanceSource permissions */ - permissions?: (pyth_lazer_transaction.IPermissions|null); + /** UpdatePublisherAction enum. */ + enum UpdatePublisherAction { + UPDATE_PUBLISHER_ACTION_UNSPECIFIED = 0, + SET_PUBLISHER_NAME = 101, + ADD_PUBLISHER_PUBLIC_KEYS = 102, + REMOVE_PUBLISHER_PUBLIC_KEYS = 103, + SET_PUBLISHER_PUBLIC_KEYS = 104, + SET_PUBLISHER_ACTIVE = 105, + REMOVE_PUBLISHER = 199, } - /** Represents an AddGovernanceSource. */ - class AddGovernanceSource implements IAddGovernanceSource { - - /** - * Constructs a new AddGovernanceSource. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IAddGovernanceSource); - - /** AddGovernanceSource newSource. */ - public newSource?: (pyth_lazer_transaction.IGovernanceSource|null); - - /** AddGovernanceSource permissions. */ - public permissions?: (pyth_lazer_transaction.IPermissions|null); - - /** AddGovernanceSource _newSource. */ - public _newSource?: "newSource"; - - /** AddGovernanceSource _permissions. */ - public _permissions?: "permissions"; - - /** - * Creates a new AddGovernanceSource instance using the specified properties. - * @param [properties] Properties to set - * @returns AddGovernanceSource instance - */ - public static create(properties?: pyth_lazer_transaction.IAddGovernanceSource): pyth_lazer_transaction.AddGovernanceSource; - - /** - * Encodes the specified AddGovernanceSource message. Does not implicitly {@link pyth_lazer_transaction.AddGovernanceSource.verify|verify} messages. - * @param message AddGovernanceSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IAddGovernanceSource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AddGovernanceSource message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddGovernanceSource.verify|verify} messages. - * @param message AddGovernanceSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IAddGovernanceSource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AddGovernanceSource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AddGovernanceSource - * @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): pyth_lazer_transaction.AddGovernanceSource; - - /** - * Decodes an AddGovernanceSource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AddGovernanceSource - * @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)): pyth_lazer_transaction.AddGovernanceSource; - - /** - * Verifies an AddGovernanceSource 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 AddGovernanceSource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AddGovernanceSource - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.AddGovernanceSource; - - /** - * Creates a plain object from an AddGovernanceSource message. Also converts values to other types if specified. - * @param message AddGovernanceSource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.AddGovernanceSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AddGovernanceSource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AddGovernanceSource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** UpdateFeedAction enum. */ + enum UpdateFeedAction { + UPDATE_FEED_ACTION_UNSPECIFIED = 0, + UPDATE_FEED_METADATA = 101, + ACTIVATE_FEED = 102, + DEACTIVATE_FEED = 103, + REMOVE_FEED = 199, } - - /** Properties of an UpdateGovernanceSource. */ - interface IUpdateGovernanceSource { - - /** UpdateGovernanceSource source */ - source?: (pyth_lazer_transaction.IGovernanceSource|null); - - /** UpdateGovernanceSource setGovernanceSourcePermissions */ - setGovernanceSourcePermissions?: (pyth_lazer_transaction.ISetGovernanceSourcePermissions|null); - - /** UpdateGovernanceSource removeGovernanceSource */ - removeGovernanceSource?: (google.protobuf.IEmpty|null); + } + + /** Properties of a GovernanceSource. */ + interface IGovernanceSource { + /** GovernanceSource singleEd25519 */ + singleEd25519?: pyth_lazer_transaction.GovernanceSource.ISingleEd25519 | null; + + /** GovernanceSource wormholeEmitter */ + wormholeEmitter?: pyth_lazer_transaction.GovernanceSource.IWormholeEmitter | null; + } + + /** Represents a GovernanceSource. */ + class GovernanceSource implements IGovernanceSource { + /** + * Constructs a new GovernanceSource. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IGovernanceSource); + + /** GovernanceSource singleEd25519. */ + public singleEd25519?: pyth_lazer_transaction.GovernanceSource.ISingleEd25519 | null; + + /** GovernanceSource wormholeEmitter. */ + public wormholeEmitter?: pyth_lazer_transaction.GovernanceSource.IWormholeEmitter | null; + + /** GovernanceSource source. */ + public source?: "singleEd25519" | "wormholeEmitter"; + + /** + * Creates a new GovernanceSource instance using the specified properties. + * @param [properties] Properties to set + * @returns GovernanceSource instance + */ + public static create( + properties?: pyth_lazer_transaction.IGovernanceSource, + ): pyth_lazer_transaction.GovernanceSource; + + /** + * Encodes the specified GovernanceSource message. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.verify|verify} messages. + * @param message GovernanceSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IGovernanceSource, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified GovernanceSource message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.verify|verify} messages. + * @param message GovernanceSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IGovernanceSource, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a GovernanceSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GovernanceSource + * @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, + ): pyth_lazer_transaction.GovernanceSource; + + /** + * Decodes a GovernanceSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GovernanceSource + * @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, + ): pyth_lazer_transaction.GovernanceSource; + + /** + * Verifies a GovernanceSource 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 GovernanceSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GovernanceSource + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.GovernanceSource; + + /** + * Creates a plain object from a GovernanceSource message. Also converts values to other types if specified. + * @param message GovernanceSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.GovernanceSource, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this GovernanceSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GovernanceSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GovernanceSource { + /** Properties of a SingleEd25519. */ + interface ISingleEd25519 { + /** SingleEd25519 publicKey */ + publicKey?: Uint8Array | null; } - /** Represents an UpdateGovernanceSource. */ - class UpdateGovernanceSource implements IUpdateGovernanceSource { - - /** - * Constructs a new UpdateGovernanceSource. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IUpdateGovernanceSource); - - /** UpdateGovernanceSource source. */ - public source?: (pyth_lazer_transaction.IGovernanceSource|null); - - /** UpdateGovernanceSource setGovernanceSourcePermissions. */ - public setGovernanceSourcePermissions?: (pyth_lazer_transaction.ISetGovernanceSourcePermissions|null); - - /** UpdateGovernanceSource removeGovernanceSource. */ - public removeGovernanceSource?: (google.protobuf.IEmpty|null); - - /** UpdateGovernanceSource _source. */ - public _source?: "source"; - - /** UpdateGovernanceSource action. */ - public action?: ("setGovernanceSourcePermissions"|"removeGovernanceSource"); - - /** - * Creates a new UpdateGovernanceSource instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateGovernanceSource instance - */ - public static create(properties?: pyth_lazer_transaction.IUpdateGovernanceSource): pyth_lazer_transaction.UpdateGovernanceSource; - - /** - * Encodes the specified UpdateGovernanceSource message. Does not implicitly {@link pyth_lazer_transaction.UpdateGovernanceSource.verify|verify} messages. - * @param message UpdateGovernanceSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IUpdateGovernanceSource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateGovernanceSource message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdateGovernanceSource.verify|verify} messages. - * @param message UpdateGovernanceSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IUpdateGovernanceSource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateGovernanceSource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateGovernanceSource - * @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): pyth_lazer_transaction.UpdateGovernanceSource; - - /** - * Decodes an UpdateGovernanceSource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateGovernanceSource - * @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)): pyth_lazer_transaction.UpdateGovernanceSource; - - /** - * Verifies an UpdateGovernanceSource 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 UpdateGovernanceSource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateGovernanceSource - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.UpdateGovernanceSource; - - /** - * Creates a plain object from an UpdateGovernanceSource message. Also converts values to other types if specified. - * @param message UpdateGovernanceSource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.UpdateGovernanceSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateGovernanceSource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateGovernanceSource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** Represents a SingleEd25519. */ + class SingleEd25519 implements ISingleEd25519 { + /** + * Constructs a new SingleEd25519. + * @param [properties] Properties to set + */ + constructor( + properties?: pyth_lazer_transaction.GovernanceSource.ISingleEd25519, + ); + + /** SingleEd25519 publicKey. */ + public publicKey?: Uint8Array | null; + + /** SingleEd25519 _publicKey. */ + public _publicKey?: "publicKey"; + + /** + * Creates a new SingleEd25519 instance using the specified properties. + * @param [properties] Properties to set + * @returns SingleEd25519 instance + */ + public static create( + properties?: pyth_lazer_transaction.GovernanceSource.ISingleEd25519, + ): pyth_lazer_transaction.GovernanceSource.SingleEd25519; + + /** + * Encodes the specified SingleEd25519 message. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.SingleEd25519.verify|verify} messages. + * @param message SingleEd25519 message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.GovernanceSource.ISingleEd25519, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified SingleEd25519 message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.SingleEd25519.verify|verify} messages. + * @param message SingleEd25519 message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.GovernanceSource.ISingleEd25519, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a SingleEd25519 message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SingleEd25519 + * @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, + ): pyth_lazer_transaction.GovernanceSource.SingleEd25519; + + /** + * Decodes a SingleEd25519 message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SingleEd25519 + * @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, + ): pyth_lazer_transaction.GovernanceSource.SingleEd25519; + + /** + * Verifies a SingleEd25519 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 SingleEd25519 message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SingleEd25519 + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.GovernanceSource.SingleEd25519; + + /** + * Creates a plain object from a SingleEd25519 message. Also converts values to other types if specified. + * @param message SingleEd25519 + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.GovernanceSource.SingleEd25519, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this SingleEd25519 to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SingleEd25519 + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SetGovernanceSourcePermissions. */ - interface ISetGovernanceSourcePermissions { + /** Properties of a WormholeEmitter. */ + interface IWormholeEmitter { + /** WormholeEmitter address */ + address?: Uint8Array | null; - /** SetGovernanceSourcePermissions permissions */ - permissions?: (pyth_lazer_transaction.IPermissions|null); + /** WormholeEmitter chainId */ + chainId?: number | null; } - /** Represents a SetGovernanceSourcePermissions. */ - class SetGovernanceSourcePermissions implements ISetGovernanceSourcePermissions { - - /** - * Constructs a new SetGovernanceSourcePermissions. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.ISetGovernanceSourcePermissions); - - /** SetGovernanceSourcePermissions permissions. */ - public permissions?: (pyth_lazer_transaction.IPermissions|null); - - /** SetGovernanceSourcePermissions _permissions. */ - public _permissions?: "permissions"; - - /** - * Creates a new SetGovernanceSourcePermissions instance using the specified properties. - * @param [properties] Properties to set - * @returns SetGovernanceSourcePermissions instance - */ - public static create(properties?: pyth_lazer_transaction.ISetGovernanceSourcePermissions): pyth_lazer_transaction.SetGovernanceSourcePermissions; - - /** - * Encodes the specified SetGovernanceSourcePermissions message. Does not implicitly {@link pyth_lazer_transaction.SetGovernanceSourcePermissions.verify|verify} messages. - * @param message SetGovernanceSourcePermissions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.ISetGovernanceSourcePermissions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetGovernanceSourcePermissions message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetGovernanceSourcePermissions.verify|verify} messages. - * @param message SetGovernanceSourcePermissions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.ISetGovernanceSourcePermissions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetGovernanceSourcePermissions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetGovernanceSourcePermissions - * @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): pyth_lazer_transaction.SetGovernanceSourcePermissions; - - /** - * Decodes a SetGovernanceSourcePermissions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetGovernanceSourcePermissions - * @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)): pyth_lazer_transaction.SetGovernanceSourcePermissions; - - /** - * Verifies a SetGovernanceSourcePermissions 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 SetGovernanceSourcePermissions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetGovernanceSourcePermissions - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.SetGovernanceSourcePermissions; - - /** - * Creates a plain object from a SetGovernanceSourcePermissions message. Also converts values to other types if specified. - * @param message SetGovernanceSourcePermissions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.SetGovernanceSourcePermissions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetGovernanceSourcePermissions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetGovernanceSourcePermissions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** Represents a WormholeEmitter. */ + class WormholeEmitter implements IWormholeEmitter { + /** + * Constructs a new WormholeEmitter. + * @param [properties] Properties to set + */ + constructor( + properties?: pyth_lazer_transaction.GovernanceSource.IWormholeEmitter, + ); + + /** WormholeEmitter address. */ + public address?: Uint8Array | null; + + /** WormholeEmitter chainId. */ + public chainId?: number | null; + + /** WormholeEmitter _address. */ + public _address?: "address"; + + /** WormholeEmitter _chainId. */ + public _chainId?: "chainId"; + + /** + * Creates a new WormholeEmitter instance using the specified properties. + * @param [properties] Properties to set + * @returns WormholeEmitter instance + */ + public static create( + properties?: pyth_lazer_transaction.GovernanceSource.IWormholeEmitter, + ): pyth_lazer_transaction.GovernanceSource.WormholeEmitter; + + /** + * Encodes the specified WormholeEmitter message. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.WormholeEmitter.verify|verify} messages. + * @param message WormholeEmitter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.GovernanceSource.IWormholeEmitter, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified WormholeEmitter message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.WormholeEmitter.verify|verify} messages. + * @param message WormholeEmitter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.GovernanceSource.IWormholeEmitter, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a WormholeEmitter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WormholeEmitter + * @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, + ): pyth_lazer_transaction.GovernanceSource.WormholeEmitter; + + /** + * Decodes a WormholeEmitter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WormholeEmitter + * @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, + ): pyth_lazer_transaction.GovernanceSource.WormholeEmitter; + + /** + * Verifies a WormholeEmitter 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 WormholeEmitter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WormholeEmitter + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.GovernanceSource.WormholeEmitter; + + /** + * Creates a plain object from a WormholeEmitter message. Also converts values to other types if specified. + * @param message WormholeEmitter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.GovernanceSource.WormholeEmitter, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this WormholeEmitter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WormholeEmitter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - - /** Properties of a SetShardName. */ - interface ISetShardName { - - /** SetShardName shardName */ - shardName?: (string|null); + } + + /** Properties of a CreateShard. */ + interface ICreateShard { + /** CreateShard shardId */ + shardId?: number | null; + + /** CreateShard shardGroup */ + shardGroup?: string | null; + + /** CreateShard minRate */ + minRate?: google.protobuf.IDuration | null; + } + + /** Represents a CreateShard. */ + class CreateShard implements ICreateShard { + /** + * Constructs a new CreateShard. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ICreateShard); + + /** CreateShard shardId. */ + public shardId?: number | null; + + /** CreateShard shardGroup. */ + public shardGroup?: string | null; + + /** CreateShard minRate. */ + public minRate?: google.protobuf.IDuration | null; + + /** CreateShard _shardId. */ + public _shardId?: "shardId"; + + /** CreateShard _shardGroup. */ + public _shardGroup?: "shardGroup"; + + /** CreateShard _minRate. */ + public _minRate?: "minRate"; + + /** + * Creates a new CreateShard instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateShard instance + */ + public static create( + properties?: pyth_lazer_transaction.ICreateShard, + ): pyth_lazer_transaction.CreateShard; + + /** + * Encodes the specified CreateShard message. Does not implicitly {@link pyth_lazer_transaction.CreateShard.verify|verify} messages. + * @param message CreateShard message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.ICreateShard, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified CreateShard message, length delimited. Does not implicitly {@link pyth_lazer_transaction.CreateShard.verify|verify} messages. + * @param message CreateShard message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.ICreateShard, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a CreateShard message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateShard + * @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, + ): pyth_lazer_transaction.CreateShard; + + /** + * Decodes a CreateShard message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateShard + * @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, + ): pyth_lazer_transaction.CreateShard; + + /** + * Verifies a CreateShard 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 CreateShard message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateShard + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.CreateShard; + + /** + * Creates a plain object from a CreateShard message. Also converts values to other types if specified. + * @param message CreateShard + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.CreateShard, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this CreateShard to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateShard + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AddGovernanceSource. */ + interface IAddGovernanceSource { + /** AddGovernanceSource newSource */ + newSource?: pyth_lazer_transaction.IGovernanceSource | null; + + /** AddGovernanceSource permissions */ + permissions?: pyth_lazer_transaction.IPermissions | null; + } + + /** Represents an AddGovernanceSource. */ + class AddGovernanceSource implements IAddGovernanceSource { + /** + * Constructs a new AddGovernanceSource. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IAddGovernanceSource); + + /** AddGovernanceSource newSource. */ + public newSource?: pyth_lazer_transaction.IGovernanceSource | null; + + /** AddGovernanceSource permissions. */ + public permissions?: pyth_lazer_transaction.IPermissions | null; + + /** AddGovernanceSource _newSource. */ + public _newSource?: "newSource"; + + /** AddGovernanceSource _permissions. */ + public _permissions?: "permissions"; + + /** + * Creates a new AddGovernanceSource instance using the specified properties. + * @param [properties] Properties to set + * @returns AddGovernanceSource instance + */ + public static create( + properties?: pyth_lazer_transaction.IAddGovernanceSource, + ): pyth_lazer_transaction.AddGovernanceSource; + + /** + * Encodes the specified AddGovernanceSource message. Does not implicitly {@link pyth_lazer_transaction.AddGovernanceSource.verify|verify} messages. + * @param message AddGovernanceSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IAddGovernanceSource, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified AddGovernanceSource message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddGovernanceSource.verify|verify} messages. + * @param message AddGovernanceSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IAddGovernanceSource, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes an AddGovernanceSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AddGovernanceSource + * @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, + ): pyth_lazer_transaction.AddGovernanceSource; + + /** + * Decodes an AddGovernanceSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AddGovernanceSource + * @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, + ): pyth_lazer_transaction.AddGovernanceSource; + + /** + * Verifies an AddGovernanceSource 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 AddGovernanceSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AddGovernanceSource + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.AddGovernanceSource; + + /** + * Creates a plain object from an AddGovernanceSource message. Also converts values to other types if specified. + * @param message AddGovernanceSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.AddGovernanceSource, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this AddGovernanceSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AddGovernanceSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateGovernanceSource. */ + interface IUpdateGovernanceSource { + /** UpdateGovernanceSource source */ + source?: pyth_lazer_transaction.IGovernanceSource | null; + + /** UpdateGovernanceSource setGovernanceSourcePermissions */ + setGovernanceSourcePermissions?: pyth_lazer_transaction.ISetGovernanceSourcePermissions | null; + + /** UpdateGovernanceSource removeGovernanceSource */ + removeGovernanceSource?: google.protobuf.IEmpty | null; + } + + /** Represents an UpdateGovernanceSource. */ + class UpdateGovernanceSource implements IUpdateGovernanceSource { + /** + * Constructs a new UpdateGovernanceSource. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IUpdateGovernanceSource); + + /** UpdateGovernanceSource source. */ + public source?: pyth_lazer_transaction.IGovernanceSource | null; + + /** UpdateGovernanceSource setGovernanceSourcePermissions. */ + public setGovernanceSourcePermissions?: pyth_lazer_transaction.ISetGovernanceSourcePermissions | null; + + /** UpdateGovernanceSource removeGovernanceSource. */ + public removeGovernanceSource?: google.protobuf.IEmpty | null; + + /** UpdateGovernanceSource _source. */ + public _source?: "source"; + + /** UpdateGovernanceSource action. */ + public action?: "setGovernanceSourcePermissions" | "removeGovernanceSource"; + + /** + * Creates a new UpdateGovernanceSource instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateGovernanceSource instance + */ + public static create( + properties?: pyth_lazer_transaction.IUpdateGovernanceSource, + ): pyth_lazer_transaction.UpdateGovernanceSource; + + /** + * Encodes the specified UpdateGovernanceSource message. Does not implicitly {@link pyth_lazer_transaction.UpdateGovernanceSource.verify|verify} messages. + * @param message UpdateGovernanceSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IUpdateGovernanceSource, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified UpdateGovernanceSource message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdateGovernanceSource.verify|verify} messages. + * @param message UpdateGovernanceSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IUpdateGovernanceSource, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes an UpdateGovernanceSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateGovernanceSource + * @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, + ): pyth_lazer_transaction.UpdateGovernanceSource; + + /** + * Decodes an UpdateGovernanceSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateGovernanceSource + * @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, + ): pyth_lazer_transaction.UpdateGovernanceSource; + + /** + * Verifies an UpdateGovernanceSource 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 UpdateGovernanceSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateGovernanceSource + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.UpdateGovernanceSource; + + /** + * Creates a plain object from an UpdateGovernanceSource message. Also converts values to other types if specified. + * @param message UpdateGovernanceSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.UpdateGovernanceSource, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this UpdateGovernanceSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateGovernanceSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetGovernanceSourcePermissions. */ + interface ISetGovernanceSourcePermissions { + /** SetGovernanceSourcePermissions permissions */ + permissions?: pyth_lazer_transaction.IPermissions | null; + } + + /** Represents a SetGovernanceSourcePermissions. */ + class SetGovernanceSourcePermissions + implements ISetGovernanceSourcePermissions + { + /** + * Constructs a new SetGovernanceSourcePermissions. + * @param [properties] Properties to set + */ + constructor( + properties?: pyth_lazer_transaction.ISetGovernanceSourcePermissions, + ); + + /** SetGovernanceSourcePermissions permissions. */ + public permissions?: pyth_lazer_transaction.IPermissions | null; + + /** SetGovernanceSourcePermissions _permissions. */ + public _permissions?: "permissions"; + + /** + * Creates a new SetGovernanceSourcePermissions instance using the specified properties. + * @param [properties] Properties to set + * @returns SetGovernanceSourcePermissions instance + */ + public static create( + properties?: pyth_lazer_transaction.ISetGovernanceSourcePermissions, + ): pyth_lazer_transaction.SetGovernanceSourcePermissions; + + /** + * Encodes the specified SetGovernanceSourcePermissions message. Does not implicitly {@link pyth_lazer_transaction.SetGovernanceSourcePermissions.verify|verify} messages. + * @param message SetGovernanceSourcePermissions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.ISetGovernanceSourcePermissions, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified SetGovernanceSourcePermissions message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetGovernanceSourcePermissions.verify|verify} messages. + * @param message SetGovernanceSourcePermissions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.ISetGovernanceSourcePermissions, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a SetGovernanceSourcePermissions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetGovernanceSourcePermissions + * @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, + ): pyth_lazer_transaction.SetGovernanceSourcePermissions; + + /** + * Decodes a SetGovernanceSourcePermissions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetGovernanceSourcePermissions + * @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, + ): pyth_lazer_transaction.SetGovernanceSourcePermissions; + + /** + * Verifies a SetGovernanceSourcePermissions 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 SetGovernanceSourcePermissions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetGovernanceSourcePermissions + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.SetGovernanceSourcePermissions; + + /** + * Creates a plain object from a SetGovernanceSourcePermissions message. Also converts values to other types if specified. + * @param message SetGovernanceSourcePermissions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.SetGovernanceSourcePermissions, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this SetGovernanceSourcePermissions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetGovernanceSourcePermissions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetShardName. */ + interface ISetShardName { + /** SetShardName shardName */ + shardName?: string | null; + } + + /** Represents a SetShardName. */ + class SetShardName implements ISetShardName { + /** + * Constructs a new SetShardName. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ISetShardName); + + /** SetShardName shardName. */ + public shardName?: string | null; + + /** SetShardName _shardName. */ + public _shardName?: "shardName"; + + /** + * Creates a new SetShardName instance using the specified properties. + * @param [properties] Properties to set + * @returns SetShardName instance + */ + public static create( + properties?: pyth_lazer_transaction.ISetShardName, + ): pyth_lazer_transaction.SetShardName; + + /** + * Encodes the specified SetShardName message. Does not implicitly {@link pyth_lazer_transaction.SetShardName.verify|verify} messages. + * @param message SetShardName message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.ISetShardName, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified SetShardName message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetShardName.verify|verify} messages. + * @param message SetShardName message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.ISetShardName, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a SetShardName message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetShardName + * @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, + ): pyth_lazer_transaction.SetShardName; + + /** + * Decodes a SetShardName message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetShardName + * @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, + ): pyth_lazer_transaction.SetShardName; + + /** + * Verifies a SetShardName 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 SetShardName message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetShardName + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.SetShardName; + + /** + * Creates a plain object from a SetShardName message. Also converts values to other types if specified. + * @param message SetShardName + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.SetShardName, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this SetShardName to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetShardName + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetShardGroup. */ + interface ISetShardGroup { + /** SetShardGroup shardGroup */ + shardGroup?: string | null; + } + + /** Represents a SetShardGroup. */ + class SetShardGroup implements ISetShardGroup { + /** + * Constructs a new SetShardGroup. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ISetShardGroup); + + /** SetShardGroup shardGroup. */ + public shardGroup?: string | null; + + /** SetShardGroup _shardGroup. */ + public _shardGroup?: "shardGroup"; + + /** + * Creates a new SetShardGroup instance using the specified properties. + * @param [properties] Properties to set + * @returns SetShardGroup instance + */ + public static create( + properties?: pyth_lazer_transaction.ISetShardGroup, + ): pyth_lazer_transaction.SetShardGroup; + + /** + * Encodes the specified SetShardGroup message. Does not implicitly {@link pyth_lazer_transaction.SetShardGroup.verify|verify} messages. + * @param message SetShardGroup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.ISetShardGroup, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified SetShardGroup message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetShardGroup.verify|verify} messages. + * @param message SetShardGroup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.ISetShardGroup, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a SetShardGroup message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetShardGroup + * @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, + ): pyth_lazer_transaction.SetShardGroup; + + /** + * Decodes a SetShardGroup message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetShardGroup + * @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, + ): pyth_lazer_transaction.SetShardGroup; + + /** + * Verifies a SetShardGroup 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 SetShardGroup message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetShardGroup + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.SetShardGroup; + + /** + * Creates a plain object from a SetShardGroup message. Also converts values to other types if specified. + * @param message SetShardGroup + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.SetShardGroup, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this SetShardGroup to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetShardGroup + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ResetLastSequenceNo. */ + interface IResetLastSequenceNo { + /** ResetLastSequenceNo lastSequenceNo */ + lastSequenceNo?: number | Long | null; + } + + /** Represents a ResetLastSequenceNo. */ + class ResetLastSequenceNo implements IResetLastSequenceNo { + /** + * Constructs a new ResetLastSequenceNo. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IResetLastSequenceNo); + + /** ResetLastSequenceNo lastSequenceNo. */ + public lastSequenceNo?: number | Long | null; + + /** ResetLastSequenceNo _lastSequenceNo. */ + public _lastSequenceNo?: "lastSequenceNo"; + + /** + * Creates a new ResetLastSequenceNo instance using the specified properties. + * @param [properties] Properties to set + * @returns ResetLastSequenceNo instance + */ + public static create( + properties?: pyth_lazer_transaction.IResetLastSequenceNo, + ): pyth_lazer_transaction.ResetLastSequenceNo; + + /** + * Encodes the specified ResetLastSequenceNo message. Does not implicitly {@link pyth_lazer_transaction.ResetLastSequenceNo.verify|verify} messages. + * @param message ResetLastSequenceNo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IResetLastSequenceNo, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified ResetLastSequenceNo message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ResetLastSequenceNo.verify|verify} messages. + * @param message ResetLastSequenceNo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IResetLastSequenceNo, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ResetLastSequenceNo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResetLastSequenceNo + * @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, + ): pyth_lazer_transaction.ResetLastSequenceNo; + + /** + * Decodes a ResetLastSequenceNo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResetLastSequenceNo + * @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, + ): pyth_lazer_transaction.ResetLastSequenceNo; + + /** + * Verifies a ResetLastSequenceNo 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 ResetLastSequenceNo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResetLastSequenceNo + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.ResetLastSequenceNo; + + /** + * Creates a plain object from a ResetLastSequenceNo message. Also converts values to other types if specified. + * @param message ResetLastSequenceNo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.ResetLastSequenceNo, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this ResetLastSequenceNo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResetLastSequenceNo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AddPublisher. */ + interface IAddPublisher { + /** AddPublisher publisherId */ + publisherId?: number | null; + + /** AddPublisher name */ + name?: string | null; + + /** AddPublisher publicKeys */ + publicKeys?: Uint8Array[] | null; + + /** AddPublisher isActive */ + isActive?: boolean | null; + } + + /** Represents an AddPublisher. */ + class AddPublisher implements IAddPublisher { + /** + * Constructs a new AddPublisher. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IAddPublisher); + + /** AddPublisher publisherId. */ + public publisherId?: number | null; + + /** AddPublisher name. */ + public name?: string | null; + + /** AddPublisher publicKeys. */ + public publicKeys: Uint8Array[]; + + /** AddPublisher isActive. */ + public isActive?: boolean | null; + + /** AddPublisher _publisherId. */ + public _publisherId?: "publisherId"; + + /** AddPublisher _name. */ + public _name?: "name"; + + /** AddPublisher _isActive. */ + public _isActive?: "isActive"; + + /** + * Creates a new AddPublisher instance using the specified properties. + * @param [properties] Properties to set + * @returns AddPublisher instance + */ + public static create( + properties?: pyth_lazer_transaction.IAddPublisher, + ): pyth_lazer_transaction.AddPublisher; + + /** + * Encodes the specified AddPublisher message. Does not implicitly {@link pyth_lazer_transaction.AddPublisher.verify|verify} messages. + * @param message AddPublisher message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IAddPublisher, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified AddPublisher message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddPublisher.verify|verify} messages. + * @param message AddPublisher message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IAddPublisher, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes an AddPublisher message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AddPublisher + * @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, + ): pyth_lazer_transaction.AddPublisher; + + /** + * Decodes an AddPublisher message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AddPublisher + * @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, + ): pyth_lazer_transaction.AddPublisher; + + /** + * Verifies an AddPublisher 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 AddPublisher message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AddPublisher + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.AddPublisher; + + /** + * Creates a plain object from an AddPublisher message. Also converts values to other types if specified. + * @param message AddPublisher + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.AddPublisher, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this AddPublisher to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AddPublisher + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdatePublisher. */ + interface IUpdatePublisher { + /** UpdatePublisher publisherId */ + publisherId?: number | null; + + /** UpdatePublisher setPublisherName */ + setPublisherName?: pyth_lazer_transaction.ISetPublisherName | null; + + /** UpdatePublisher addPublisherPublicKeys */ + addPublisherPublicKeys?: pyth_lazer_transaction.IAddPublisherPublicKeys | null; + + /** UpdatePublisher removePublisherPublicKeys */ + removePublisherPublicKeys?: pyth_lazer_transaction.IRemovePublisherPublicKeys | null; + + /** UpdatePublisher setPublisherPublicKeys */ + setPublisherPublicKeys?: pyth_lazer_transaction.ISetPublisherPublicKeys | null; + + /** UpdatePublisher setPublisherActive */ + setPublisherActive?: pyth_lazer_transaction.ISetPublisherActive | null; + + /** UpdatePublisher removePublisher */ + removePublisher?: google.protobuf.IEmpty | null; + } + + /** Represents an UpdatePublisher. */ + class UpdatePublisher implements IUpdatePublisher { + /** + * Constructs a new UpdatePublisher. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IUpdatePublisher); + + /** UpdatePublisher publisherId. */ + public publisherId?: number | null; + + /** UpdatePublisher setPublisherName. */ + public setPublisherName?: pyth_lazer_transaction.ISetPublisherName | null; + + /** UpdatePublisher addPublisherPublicKeys. */ + public addPublisherPublicKeys?: pyth_lazer_transaction.IAddPublisherPublicKeys | null; + + /** UpdatePublisher removePublisherPublicKeys. */ + public removePublisherPublicKeys?: pyth_lazer_transaction.IRemovePublisherPublicKeys | null; + + /** UpdatePublisher setPublisherPublicKeys. */ + public setPublisherPublicKeys?: pyth_lazer_transaction.ISetPublisherPublicKeys | null; + + /** UpdatePublisher setPublisherActive. */ + public setPublisherActive?: pyth_lazer_transaction.ISetPublisherActive | null; + + /** UpdatePublisher removePublisher. */ + public removePublisher?: google.protobuf.IEmpty | null; + + /** UpdatePublisher _publisherId. */ + public _publisherId?: "publisherId"; + + /** UpdatePublisher action. */ + public action?: + | "setPublisherName" + | "addPublisherPublicKeys" + | "removePublisherPublicKeys" + | "setPublisherPublicKeys" + | "setPublisherActive" + | "removePublisher"; + + /** + * Creates a new UpdatePublisher instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdatePublisher instance + */ + public static create( + properties?: pyth_lazer_transaction.IUpdatePublisher, + ): pyth_lazer_transaction.UpdatePublisher; + + /** + * Encodes the specified UpdatePublisher message. Does not implicitly {@link pyth_lazer_transaction.UpdatePublisher.verify|verify} messages. + * @param message UpdatePublisher message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IUpdatePublisher, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified UpdatePublisher message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdatePublisher.verify|verify} messages. + * @param message UpdatePublisher message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IUpdatePublisher, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes an UpdatePublisher message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdatePublisher + * @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, + ): pyth_lazer_transaction.UpdatePublisher; + + /** + * Decodes an UpdatePublisher message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdatePublisher + * @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, + ): pyth_lazer_transaction.UpdatePublisher; + + /** + * Verifies an UpdatePublisher 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 UpdatePublisher message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdatePublisher + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.UpdatePublisher; + + /** + * Creates a plain object from an UpdatePublisher message. Also converts values to other types if specified. + * @param message UpdatePublisher + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.UpdatePublisher, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this UpdatePublisher to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdatePublisher + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetPublisherName. */ + interface ISetPublisherName { + /** SetPublisherName name */ + name?: string | null; + } + + /** Represents a SetPublisherName. */ + class SetPublisherName implements ISetPublisherName { + /** + * Constructs a new SetPublisherName. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ISetPublisherName); + + /** SetPublisherName name. */ + public name?: string | null; + + /** SetPublisherName _name. */ + public _name?: "name"; + + /** + * Creates a new SetPublisherName instance using the specified properties. + * @param [properties] Properties to set + * @returns SetPublisherName instance + */ + public static create( + properties?: pyth_lazer_transaction.ISetPublisherName, + ): pyth_lazer_transaction.SetPublisherName; + + /** + * Encodes the specified SetPublisherName message. Does not implicitly {@link pyth_lazer_transaction.SetPublisherName.verify|verify} messages. + * @param message SetPublisherName message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.ISetPublisherName, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified SetPublisherName message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetPublisherName.verify|verify} messages. + * @param message SetPublisherName message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.ISetPublisherName, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a SetPublisherName message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetPublisherName + * @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, + ): pyth_lazer_transaction.SetPublisherName; + + /** + * Decodes a SetPublisherName message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetPublisherName + * @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, + ): pyth_lazer_transaction.SetPublisherName; + + /** + * Verifies a SetPublisherName 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 SetPublisherName message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetPublisherName + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.SetPublisherName; + + /** + * Creates a plain object from a SetPublisherName message. Also converts values to other types if specified. + * @param message SetPublisherName + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.SetPublisherName, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this SetPublisherName to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetPublisherName + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AddPublisherPublicKeys. */ + interface IAddPublisherPublicKeys { + /** AddPublisherPublicKeys publicKeys */ + publicKeys?: Uint8Array[] | null; + } + + /** Represents an AddPublisherPublicKeys. */ + class AddPublisherPublicKeys implements IAddPublisherPublicKeys { + /** + * Constructs a new AddPublisherPublicKeys. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IAddPublisherPublicKeys); + + /** AddPublisherPublicKeys publicKeys. */ + public publicKeys: Uint8Array[]; + + /** + * Creates a new AddPublisherPublicKeys instance using the specified properties. + * @param [properties] Properties to set + * @returns AddPublisherPublicKeys instance + */ + public static create( + properties?: pyth_lazer_transaction.IAddPublisherPublicKeys, + ): pyth_lazer_transaction.AddPublisherPublicKeys; + + /** + * Encodes the specified AddPublisherPublicKeys message. Does not implicitly {@link pyth_lazer_transaction.AddPublisherPublicKeys.verify|verify} messages. + * @param message AddPublisherPublicKeys message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IAddPublisherPublicKeys, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified AddPublisherPublicKeys message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddPublisherPublicKeys.verify|verify} messages. + * @param message AddPublisherPublicKeys message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IAddPublisherPublicKeys, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes an AddPublisherPublicKeys message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AddPublisherPublicKeys + * @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, + ): pyth_lazer_transaction.AddPublisherPublicKeys; + + /** + * Decodes an AddPublisherPublicKeys message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AddPublisherPublicKeys + * @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, + ): pyth_lazer_transaction.AddPublisherPublicKeys; + + /** + * Verifies an AddPublisherPublicKeys 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 AddPublisherPublicKeys message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AddPublisherPublicKeys + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.AddPublisherPublicKeys; + + /** + * Creates a plain object from an AddPublisherPublicKeys message. Also converts values to other types if specified. + * @param message AddPublisherPublicKeys + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.AddPublisherPublicKeys, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this AddPublisherPublicKeys to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AddPublisherPublicKeys + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RemovePublisherPublicKeys. */ + interface IRemovePublisherPublicKeys { + /** RemovePublisherPublicKeys publicKeys */ + publicKeys?: Uint8Array[] | null; + } + + /** Represents a RemovePublisherPublicKeys. */ + class RemovePublisherPublicKeys implements IRemovePublisherPublicKeys { + /** + * Constructs a new RemovePublisherPublicKeys. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IRemovePublisherPublicKeys); + + /** RemovePublisherPublicKeys publicKeys. */ + public publicKeys: Uint8Array[]; + + /** + * Creates a new RemovePublisherPublicKeys instance using the specified properties. + * @param [properties] Properties to set + * @returns RemovePublisherPublicKeys instance + */ + public static create( + properties?: pyth_lazer_transaction.IRemovePublisherPublicKeys, + ): pyth_lazer_transaction.RemovePublisherPublicKeys; + + /** + * Encodes the specified RemovePublisherPublicKeys message. Does not implicitly {@link pyth_lazer_transaction.RemovePublisherPublicKeys.verify|verify} messages. + * @param message RemovePublisherPublicKeys message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IRemovePublisherPublicKeys, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified RemovePublisherPublicKeys message, length delimited. Does not implicitly {@link pyth_lazer_transaction.RemovePublisherPublicKeys.verify|verify} messages. + * @param message RemovePublisherPublicKeys message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IRemovePublisherPublicKeys, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a RemovePublisherPublicKeys message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RemovePublisherPublicKeys + * @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, + ): pyth_lazer_transaction.RemovePublisherPublicKeys; + + /** + * Decodes a RemovePublisherPublicKeys message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RemovePublisherPublicKeys + * @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, + ): pyth_lazer_transaction.RemovePublisherPublicKeys; + + /** + * Verifies a RemovePublisherPublicKeys 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 RemovePublisherPublicKeys message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RemovePublisherPublicKeys + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.RemovePublisherPublicKeys; + + /** + * Creates a plain object from a RemovePublisherPublicKeys message. Also converts values to other types if specified. + * @param message RemovePublisherPublicKeys + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.RemovePublisherPublicKeys, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this RemovePublisherPublicKeys to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RemovePublisherPublicKeys + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetPublisherPublicKeys. */ + interface ISetPublisherPublicKeys { + /** SetPublisherPublicKeys publicKeys */ + publicKeys?: Uint8Array[] | null; + } + + /** Represents a SetPublisherPublicKeys. */ + class SetPublisherPublicKeys implements ISetPublisherPublicKeys { + /** + * Constructs a new SetPublisherPublicKeys. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ISetPublisherPublicKeys); + + /** SetPublisherPublicKeys publicKeys. */ + public publicKeys: Uint8Array[]; + + /** + * Creates a new SetPublisherPublicKeys instance using the specified properties. + * @param [properties] Properties to set + * @returns SetPublisherPublicKeys instance + */ + public static create( + properties?: pyth_lazer_transaction.ISetPublisherPublicKeys, + ): pyth_lazer_transaction.SetPublisherPublicKeys; + + /** + * Encodes the specified SetPublisherPublicKeys message. Does not implicitly {@link pyth_lazer_transaction.SetPublisherPublicKeys.verify|verify} messages. + * @param message SetPublisherPublicKeys message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.ISetPublisherPublicKeys, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified SetPublisherPublicKeys message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetPublisherPublicKeys.verify|verify} messages. + * @param message SetPublisherPublicKeys message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.ISetPublisherPublicKeys, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a SetPublisherPublicKeys message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetPublisherPublicKeys + * @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, + ): pyth_lazer_transaction.SetPublisherPublicKeys; + + /** + * Decodes a SetPublisherPublicKeys message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetPublisherPublicKeys + * @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, + ): pyth_lazer_transaction.SetPublisherPublicKeys; + + /** + * Verifies a SetPublisherPublicKeys 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 SetPublisherPublicKeys message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetPublisherPublicKeys + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.SetPublisherPublicKeys; + + /** + * Creates a plain object from a SetPublisherPublicKeys message. Also converts values to other types if specified. + * @param message SetPublisherPublicKeys + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.SetPublisherPublicKeys, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this SetPublisherPublicKeys to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetPublisherPublicKeys + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetPublisherActive. */ + interface ISetPublisherActive { + /** SetPublisherActive isActive */ + isActive?: boolean | null; + } + + /** Represents a SetPublisherActive. */ + class SetPublisherActive implements ISetPublisherActive { + /** + * Constructs a new SetPublisherActive. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ISetPublisherActive); + + /** SetPublisherActive isActive. */ + public isActive?: boolean | null; + + /** SetPublisherActive _isActive. */ + public _isActive?: "isActive"; + + /** + * Creates a new SetPublisherActive instance using the specified properties. + * @param [properties] Properties to set + * @returns SetPublisherActive instance + */ + public static create( + properties?: pyth_lazer_transaction.ISetPublisherActive, + ): pyth_lazer_transaction.SetPublisherActive; + + /** + * Encodes the specified SetPublisherActive message. Does not implicitly {@link pyth_lazer_transaction.SetPublisherActive.verify|verify} messages. + * @param message SetPublisherActive message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.ISetPublisherActive, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified SetPublisherActive message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetPublisherActive.verify|verify} messages. + * @param message SetPublisherActive message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.ISetPublisherActive, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a SetPublisherActive message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetPublisherActive + * @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, + ): pyth_lazer_transaction.SetPublisherActive; + + /** + * Decodes a SetPublisherActive message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetPublisherActive + * @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, + ): pyth_lazer_transaction.SetPublisherActive; + + /** + * Verifies a SetPublisherActive 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 SetPublisherActive message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetPublisherActive + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.SetPublisherActive; + + /** + * Creates a plain object from a SetPublisherActive message. Also converts values to other types if specified. + * @param message SetPublisherActive + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.SetPublisherActive, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this SetPublisherActive to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetPublisherActive + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AddFeed. */ + interface IAddFeed { + /** AddFeed feedId */ + feedId?: number | null; + + /** AddFeed metadata */ + metadata?: pyth_lazer_transaction.DynamicValue.IMap | null; + + /** AddFeed permissionedPublishers */ + permissionedPublishers?: number[] | null; + } + + /** Represents an AddFeed. */ + class AddFeed implements IAddFeed { + /** + * Constructs a new AddFeed. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IAddFeed); + + /** AddFeed feedId. */ + public feedId?: number | null; + + /** AddFeed metadata. */ + public metadata?: pyth_lazer_transaction.DynamicValue.IMap | null; + + /** AddFeed permissionedPublishers. */ + public permissionedPublishers: number[]; + + /** AddFeed _feedId. */ + public _feedId?: "feedId"; + + /** AddFeed _metadata. */ + public _metadata?: "metadata"; + + /** + * Creates a new AddFeed instance using the specified properties. + * @param [properties] Properties to set + * @returns AddFeed instance + */ + public static create( + properties?: pyth_lazer_transaction.IAddFeed, + ): pyth_lazer_transaction.AddFeed; + + /** + * Encodes the specified AddFeed message. Does not implicitly {@link pyth_lazer_transaction.AddFeed.verify|verify} messages. + * @param message AddFeed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IAddFeed, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified AddFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddFeed.verify|verify} messages. + * @param message AddFeed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IAddFeed, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes an AddFeed message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AddFeed + * @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, + ): pyth_lazer_transaction.AddFeed; + + /** + * Decodes an AddFeed message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AddFeed + * @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, + ): pyth_lazer_transaction.AddFeed; + + /** + * Verifies an AddFeed 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 AddFeed message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AddFeed + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.AddFeed; + + /** + * Creates a plain object from an AddFeed message. Also converts values to other types if specified. + * @param message AddFeed + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.AddFeed, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this AddFeed to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AddFeed + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateFeed. */ + interface IUpdateFeed { + /** UpdateFeed feedId */ + feedId?: number | null; + + /** UpdateFeed updateFeedMetadata */ + updateFeedMetadata?: pyth_lazer_transaction.IUpdateFeedMetadata | null; + + /** UpdateFeed activateFeed */ + activateFeed?: pyth_lazer_transaction.IActivateFeed | null; + + /** UpdateFeed deactivateFeed */ + deactivateFeed?: pyth_lazer_transaction.IDeactivateFeed | null; + + /** UpdateFeed removeFeed */ + removeFeed?: google.protobuf.IEmpty | null; + } + + /** Represents an UpdateFeed. */ + class UpdateFeed implements IUpdateFeed { + /** + * Constructs a new UpdateFeed. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IUpdateFeed); + + /** UpdateFeed feedId. */ + public feedId?: number | null; + + /** UpdateFeed updateFeedMetadata. */ + public updateFeedMetadata?: pyth_lazer_transaction.IUpdateFeedMetadata | null; + + /** UpdateFeed activateFeed. */ + public activateFeed?: pyth_lazer_transaction.IActivateFeed | null; + + /** UpdateFeed deactivateFeed. */ + public deactivateFeed?: pyth_lazer_transaction.IDeactivateFeed | null; + + /** UpdateFeed removeFeed. */ + public removeFeed?: google.protobuf.IEmpty | null; + + /** UpdateFeed _feedId. */ + public _feedId?: "feedId"; + + /** UpdateFeed action. */ + public action?: + | "updateFeedMetadata" + | "activateFeed" + | "deactivateFeed" + | "removeFeed"; + + /** + * Creates a new UpdateFeed instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateFeed instance + */ + public static create( + properties?: pyth_lazer_transaction.IUpdateFeed, + ): pyth_lazer_transaction.UpdateFeed; + + /** + * Encodes the specified UpdateFeed message. Does not implicitly {@link pyth_lazer_transaction.UpdateFeed.verify|verify} messages. + * @param message UpdateFeed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IUpdateFeed, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified UpdateFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdateFeed.verify|verify} messages. + * @param message UpdateFeed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IUpdateFeed, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes an UpdateFeed message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateFeed + * @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, + ): pyth_lazer_transaction.UpdateFeed; + + /** + * Decodes an UpdateFeed message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateFeed + * @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, + ): pyth_lazer_transaction.UpdateFeed; + + /** + * Verifies an UpdateFeed 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 UpdateFeed message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateFeed + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.UpdateFeed; + + /** + * Creates a plain object from an UpdateFeed message. Also converts values to other types if specified. + * @param message UpdateFeed + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.UpdateFeed, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this UpdateFeed to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateFeed + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateFeedMetadata. */ + interface IUpdateFeedMetadata { + /** UpdateFeedMetadata name */ + name?: string | null; + + /** UpdateFeedMetadata value */ + value?: pyth_lazer_transaction.IDynamicValue | null; + } + + /** Represents an UpdateFeedMetadata. */ + class UpdateFeedMetadata implements IUpdateFeedMetadata { + /** + * Constructs a new UpdateFeedMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IUpdateFeedMetadata); + + /** UpdateFeedMetadata name. */ + public name?: string | null; + + /** UpdateFeedMetadata value. */ + public value?: pyth_lazer_transaction.IDynamicValue | null; + + /** UpdateFeedMetadata _name. */ + public _name?: "name"; + + /** UpdateFeedMetadata _value. */ + public _value?: "value"; + + /** + * Creates a new UpdateFeedMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateFeedMetadata instance + */ + public static create( + properties?: pyth_lazer_transaction.IUpdateFeedMetadata, + ): pyth_lazer_transaction.UpdateFeedMetadata; + + /** + * Encodes the specified UpdateFeedMetadata message. Does not implicitly {@link pyth_lazer_transaction.UpdateFeedMetadata.verify|verify} messages. + * @param message UpdateFeedMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IUpdateFeedMetadata, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified UpdateFeedMetadata message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdateFeedMetadata.verify|verify} messages. + * @param message UpdateFeedMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IUpdateFeedMetadata, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes an UpdateFeedMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateFeedMetadata + * @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, + ): pyth_lazer_transaction.UpdateFeedMetadata; + + /** + * Decodes an UpdateFeedMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateFeedMetadata + * @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, + ): pyth_lazer_transaction.UpdateFeedMetadata; + + /** + * Verifies an UpdateFeedMetadata 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 UpdateFeedMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateFeedMetadata + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.UpdateFeedMetadata; + + /** + * Creates a plain object from an UpdateFeedMetadata message. Also converts values to other types if specified. + * @param message UpdateFeedMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.UpdateFeedMetadata, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this UpdateFeedMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateFeedMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ActivateFeed. */ + interface IActivateFeed { + /** ActivateFeed activationTimestamp */ + activationTimestamp?: google.protobuf.ITimestamp | null; + } + + /** Represents an ActivateFeed. */ + class ActivateFeed implements IActivateFeed { + /** + * Constructs a new ActivateFeed. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IActivateFeed); + + /** ActivateFeed activationTimestamp. */ + public activationTimestamp?: google.protobuf.ITimestamp | null; + + /** ActivateFeed _activationTimestamp. */ + public _activationTimestamp?: "activationTimestamp"; + + /** + * Creates a new ActivateFeed instance using the specified properties. + * @param [properties] Properties to set + * @returns ActivateFeed instance + */ + public static create( + properties?: pyth_lazer_transaction.IActivateFeed, + ): pyth_lazer_transaction.ActivateFeed; + + /** + * Encodes the specified ActivateFeed message. Does not implicitly {@link pyth_lazer_transaction.ActivateFeed.verify|verify} messages. + * @param message ActivateFeed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IActivateFeed, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified ActivateFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ActivateFeed.verify|verify} messages. + * @param message ActivateFeed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IActivateFeed, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes an ActivateFeed message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ActivateFeed + * @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, + ): pyth_lazer_transaction.ActivateFeed; + + /** + * Decodes an ActivateFeed message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ActivateFeed + * @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, + ): pyth_lazer_transaction.ActivateFeed; + + /** + * Verifies an ActivateFeed 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 ActivateFeed message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ActivateFeed + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.ActivateFeed; + + /** + * Creates a plain object from an ActivateFeed message. Also converts values to other types if specified. + * @param message ActivateFeed + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.ActivateFeed, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this ActivateFeed to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ActivateFeed + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeactivateFeed. */ + interface IDeactivateFeed { + /** DeactivateFeed deactivationTimestamp */ + deactivationTimestamp?: google.protobuf.ITimestamp | null; + } + + /** Represents a DeactivateFeed. */ + class DeactivateFeed implements IDeactivateFeed { + /** + * Constructs a new DeactivateFeed. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IDeactivateFeed); + + /** DeactivateFeed deactivationTimestamp. */ + public deactivationTimestamp?: google.protobuf.ITimestamp | null; + + /** DeactivateFeed _deactivationTimestamp. */ + public _deactivationTimestamp?: "deactivationTimestamp"; + + /** + * Creates a new DeactivateFeed instance using the specified properties. + * @param [properties] Properties to set + * @returns DeactivateFeed instance + */ + public static create( + properties?: pyth_lazer_transaction.IDeactivateFeed, + ): pyth_lazer_transaction.DeactivateFeed; + + /** + * Encodes the specified DeactivateFeed message. Does not implicitly {@link pyth_lazer_transaction.DeactivateFeed.verify|verify} messages. + * @param message DeactivateFeed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IDeactivateFeed, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified DeactivateFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DeactivateFeed.verify|verify} messages. + * @param message DeactivateFeed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IDeactivateFeed, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a DeactivateFeed message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeactivateFeed + * @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, + ): pyth_lazer_transaction.DeactivateFeed; + + /** + * Decodes a DeactivateFeed message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeactivateFeed + * @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, + ): pyth_lazer_transaction.DeactivateFeed; + + /** + * Verifies a DeactivateFeed 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 DeactivateFeed message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeactivateFeed + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.DeactivateFeed; + + /** + * Creates a plain object from a DeactivateFeed message. Also converts values to other types if specified. + * @param message DeactivateFeed + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.DeactivateFeed, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this DeactivateFeed to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeactivateFeed + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DynamicValue. */ + interface IDynamicValue { + /** DynamicValue stringValue */ + stringValue?: string | null; + + /** DynamicValue doubleValue */ + doubleValue?: number | null; + + /** DynamicValue uintValue */ + uintValue?: number | Long | null; + + /** DynamicValue intValue */ + intValue?: number | Long | null; + + /** DynamicValue boolValue */ + boolValue?: boolean | null; + + /** DynamicValue bytesValue */ + bytesValue?: Uint8Array | null; + + /** DynamicValue durationValue */ + durationValue?: google.protobuf.IDuration | null; + + /** DynamicValue timestampValue */ + timestampValue?: google.protobuf.ITimestamp | null; + + /** DynamicValue list */ + list?: pyth_lazer_transaction.DynamicValue.IList | null; + + /** DynamicValue map */ + map?: pyth_lazer_transaction.DynamicValue.IMap | null; + } + + /** Represents a DynamicValue. */ + class DynamicValue implements IDynamicValue { + /** + * Constructs a new DynamicValue. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IDynamicValue); + + /** DynamicValue stringValue. */ + public stringValue?: string | null; + + /** DynamicValue doubleValue. */ + public doubleValue?: number | null; + + /** DynamicValue uintValue. */ + public uintValue?: number | Long | null; + + /** DynamicValue intValue. */ + public intValue?: number | Long | null; + + /** DynamicValue boolValue. */ + public boolValue?: boolean | null; + + /** DynamicValue bytesValue. */ + public bytesValue?: Uint8Array | null; + + /** DynamicValue durationValue. */ + public durationValue?: google.protobuf.IDuration | null; + + /** DynamicValue timestampValue. */ + public timestampValue?: google.protobuf.ITimestamp | null; + + /** DynamicValue list. */ + public list?: pyth_lazer_transaction.DynamicValue.IList | null; + + /** DynamicValue map. */ + public map?: pyth_lazer_transaction.DynamicValue.IMap | null; + + /** DynamicValue value. */ + public value?: + | "stringValue" + | "doubleValue" + | "uintValue" + | "intValue" + | "boolValue" + | "bytesValue" + | "durationValue" + | "timestampValue" + | "list" + | "map"; + + /** + * Creates a new DynamicValue instance using the specified properties. + * @param [properties] Properties to set + * @returns DynamicValue instance + */ + public static create( + properties?: pyth_lazer_transaction.IDynamicValue, + ): pyth_lazer_transaction.DynamicValue; + + /** + * Encodes the specified DynamicValue message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.verify|verify} messages. + * @param message DynamicValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IDynamicValue, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified DynamicValue message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.verify|verify} messages. + * @param message DynamicValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IDynamicValue, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a DynamicValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DynamicValue + * @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, + ): pyth_lazer_transaction.DynamicValue; + + /** + * Decodes a DynamicValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DynamicValue + * @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, + ): pyth_lazer_transaction.DynamicValue; + + /** + * Verifies a DynamicValue 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 DynamicValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DynamicValue + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.DynamicValue; + + /** + * Creates a plain object from a DynamicValue message. Also converts values to other types if specified. + * @param message DynamicValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.DynamicValue, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this DynamicValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DynamicValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DynamicValue { + /** Properties of a List. */ + interface IList { + /** List items */ + items?: pyth_lazer_transaction.IDynamicValue[] | null; } - /** Represents a SetShardName. */ - class SetShardName implements ISetShardName { - - /** - * Constructs a new SetShardName. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.ISetShardName); - - /** SetShardName shardName. */ - public shardName?: (string|null); - - /** SetShardName _shardName. */ - public _shardName?: "shardName"; - - /** - * Creates a new SetShardName instance using the specified properties. - * @param [properties] Properties to set - * @returns SetShardName instance - */ - public static create(properties?: pyth_lazer_transaction.ISetShardName): pyth_lazer_transaction.SetShardName; - - /** - * Encodes the specified SetShardName message. Does not implicitly {@link pyth_lazer_transaction.SetShardName.verify|verify} messages. - * @param message SetShardName message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.ISetShardName, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetShardName message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetShardName.verify|verify} messages. - * @param message SetShardName message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.ISetShardName, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetShardName message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetShardName - * @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): pyth_lazer_transaction.SetShardName; - - /** - * Decodes a SetShardName message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetShardName - * @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)): pyth_lazer_transaction.SetShardName; - - /** - * Verifies a SetShardName 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 SetShardName message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetShardName - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.SetShardName; - - /** - * Creates a plain object from a SetShardName message. Also converts values to other types if specified. - * @param message SetShardName - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.SetShardName, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetShardName to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetShardName - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** Represents a List. */ + class List implements IList { + /** + * Constructs a new List. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.DynamicValue.IList); + + /** List items. */ + public items: pyth_lazer_transaction.IDynamicValue[]; + + /** + * Creates a new List instance using the specified properties. + * @param [properties] Properties to set + * @returns List instance + */ + public static create( + properties?: pyth_lazer_transaction.DynamicValue.IList, + ): pyth_lazer_transaction.DynamicValue.List; + + /** + * Encodes the specified List message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.List.verify|verify} messages. + * @param message List message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.DynamicValue.IList, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified List message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.List.verify|verify} messages. + * @param message List message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.DynamicValue.IList, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a List message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns List + * @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, + ): pyth_lazer_transaction.DynamicValue.List; + + /** + * Decodes a List message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns List + * @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, + ): pyth_lazer_transaction.DynamicValue.List; + + /** + * Verifies a List 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 List message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns List + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.DynamicValue.List; + + /** + * Creates a plain object from a List message. Also converts values to other types if specified. + * @param message List + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.DynamicValue.List, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this List to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for List + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SetShardGroup. */ - interface ISetShardGroup { + /** Properties of a MapItem. */ + interface IMapItem { + /** MapItem key */ + key?: string | null; - /** SetShardGroup shardGroup */ - shardGroup?: (string|null); + /** MapItem value */ + value?: pyth_lazer_transaction.IDynamicValue | null; } - /** Represents a SetShardGroup. */ - class SetShardGroup implements ISetShardGroup { - - /** - * Constructs a new SetShardGroup. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.ISetShardGroup); - - /** SetShardGroup shardGroup. */ - public shardGroup?: (string|null); - - /** SetShardGroup _shardGroup. */ - public _shardGroup?: "shardGroup"; - - /** - * Creates a new SetShardGroup instance using the specified properties. - * @param [properties] Properties to set - * @returns SetShardGroup instance - */ - public static create(properties?: pyth_lazer_transaction.ISetShardGroup): pyth_lazer_transaction.SetShardGroup; - - /** - * Encodes the specified SetShardGroup message. Does not implicitly {@link pyth_lazer_transaction.SetShardGroup.verify|verify} messages. - * @param message SetShardGroup message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.ISetShardGroup, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetShardGroup message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetShardGroup.verify|verify} messages. - * @param message SetShardGroup message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.ISetShardGroup, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetShardGroup message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetShardGroup - * @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): pyth_lazer_transaction.SetShardGroup; - - /** - * Decodes a SetShardGroup message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetShardGroup - * @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)): pyth_lazer_transaction.SetShardGroup; - - /** - * Verifies a SetShardGroup 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 SetShardGroup message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetShardGroup - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.SetShardGroup; - - /** - * Creates a plain object from a SetShardGroup message. Also converts values to other types if specified. - * @param message SetShardGroup - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.SetShardGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetShardGroup to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetShardGroup - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** Represents a MapItem. */ + class MapItem implements IMapItem { + /** + * Constructs a new MapItem. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.DynamicValue.IMapItem); + + /** MapItem key. */ + public key?: string | null; + + /** MapItem value. */ + public value?: pyth_lazer_transaction.IDynamicValue | null; + + /** MapItem _key. */ + public _key?: "key"; + + /** MapItem _value. */ + public _value?: "value"; + + /** + * Creates a new MapItem instance using the specified properties. + * @param [properties] Properties to set + * @returns MapItem instance + */ + public static create( + properties?: pyth_lazer_transaction.DynamicValue.IMapItem, + ): pyth_lazer_transaction.DynamicValue.MapItem; + + /** + * Encodes the specified MapItem message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.MapItem.verify|verify} messages. + * @param message MapItem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.DynamicValue.IMapItem, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified MapItem message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.MapItem.verify|verify} messages. + * @param message MapItem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.DynamicValue.IMapItem, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a MapItem message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MapItem + * @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, + ): pyth_lazer_transaction.DynamicValue.MapItem; + + /** + * Decodes a MapItem message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MapItem + * @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, + ): pyth_lazer_transaction.DynamicValue.MapItem; + + /** + * Verifies a MapItem 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 MapItem message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MapItem + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.DynamicValue.MapItem; + + /** + * Creates a plain object from a MapItem message. Also converts values to other types if specified. + * @param message MapItem + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.DynamicValue.MapItem, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this MapItem to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MapItem + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ResetLastSequenceNo. */ - interface IResetLastSequenceNo { - - /** ResetLastSequenceNo lastSequenceNo */ - lastSequenceNo?: (number|Long|null); - } - - /** Represents a ResetLastSequenceNo. */ - class ResetLastSequenceNo implements IResetLastSequenceNo { - - /** - * Constructs a new ResetLastSequenceNo. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IResetLastSequenceNo); - - /** ResetLastSequenceNo lastSequenceNo. */ - public lastSequenceNo?: (number|Long|null); - - /** ResetLastSequenceNo _lastSequenceNo. */ - public _lastSequenceNo?: "lastSequenceNo"; - - /** - * Creates a new ResetLastSequenceNo instance using the specified properties. - * @param [properties] Properties to set - * @returns ResetLastSequenceNo instance - */ - public static create(properties?: pyth_lazer_transaction.IResetLastSequenceNo): pyth_lazer_transaction.ResetLastSequenceNo; - - /** - * Encodes the specified ResetLastSequenceNo message. Does not implicitly {@link pyth_lazer_transaction.ResetLastSequenceNo.verify|verify} messages. - * @param message ResetLastSequenceNo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IResetLastSequenceNo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResetLastSequenceNo message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ResetLastSequenceNo.verify|verify} messages. - * @param message ResetLastSequenceNo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IResetLastSequenceNo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResetLastSequenceNo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResetLastSequenceNo - * @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): pyth_lazer_transaction.ResetLastSequenceNo; - - /** - * Decodes a ResetLastSequenceNo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResetLastSequenceNo - * @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)): pyth_lazer_transaction.ResetLastSequenceNo; - - /** - * Verifies a ResetLastSequenceNo 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 ResetLastSequenceNo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResetLastSequenceNo - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.ResetLastSequenceNo; - - /** - * Creates a plain object from a ResetLastSequenceNo message. Also converts values to other types if specified. - * @param message ResetLastSequenceNo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.ResetLastSequenceNo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResetLastSequenceNo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResetLastSequenceNo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AddPublisher. */ - interface IAddPublisher { - - /** AddPublisher publisherId */ - publisherId?: (number|null); - - /** AddPublisher name */ - name?: (string|null); - - /** AddPublisher publicKeys */ - publicKeys?: (Uint8Array[]|null); - - /** AddPublisher isActive */ - isActive?: (boolean|null); + /** Properties of a Map. */ + interface IMap { + /** Map items */ + items?: pyth_lazer_transaction.DynamicValue.IMapItem[] | null; } - /** Represents an AddPublisher. */ - class AddPublisher implements IAddPublisher { - - /** - * Constructs a new AddPublisher. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IAddPublisher); - - /** AddPublisher publisherId. */ - public publisherId?: (number|null); - - /** AddPublisher name. */ - public name?: (string|null); - - /** AddPublisher publicKeys. */ - public publicKeys: Uint8Array[]; - - /** AddPublisher isActive. */ - public isActive?: (boolean|null); - - /** AddPublisher _publisherId. */ - public _publisherId?: "publisherId"; - - /** AddPublisher _name. */ - public _name?: "name"; - - /** AddPublisher _isActive. */ - public _isActive?: "isActive"; - - /** - * Creates a new AddPublisher instance using the specified properties. - * @param [properties] Properties to set - * @returns AddPublisher instance - */ - public static create(properties?: pyth_lazer_transaction.IAddPublisher): pyth_lazer_transaction.AddPublisher; - - /** - * Encodes the specified AddPublisher message. Does not implicitly {@link pyth_lazer_transaction.AddPublisher.verify|verify} messages. - * @param message AddPublisher message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IAddPublisher, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AddPublisher message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddPublisher.verify|verify} messages. - * @param message AddPublisher message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IAddPublisher, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AddPublisher message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AddPublisher - * @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): pyth_lazer_transaction.AddPublisher; - - /** - * Decodes an AddPublisher message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AddPublisher - * @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)): pyth_lazer_transaction.AddPublisher; - - /** - * Verifies an AddPublisher 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 AddPublisher message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AddPublisher - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.AddPublisher; - - /** - * Creates a plain object from an AddPublisher message. Also converts values to other types if specified. - * @param message AddPublisher - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.AddPublisher, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AddPublisher to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AddPublisher - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdatePublisher. */ - interface IUpdatePublisher { - - /** UpdatePublisher publisherId */ - publisherId?: (number|null); - - /** UpdatePublisher setPublisherName */ - setPublisherName?: (pyth_lazer_transaction.ISetPublisherName|null); - - /** UpdatePublisher addPublisherPublicKeys */ - addPublisherPublicKeys?: (pyth_lazer_transaction.IAddPublisherPublicKeys|null); - - /** UpdatePublisher removePublisherPublicKeys */ - removePublisherPublicKeys?: (pyth_lazer_transaction.IRemovePublisherPublicKeys|null); - - /** UpdatePublisher setPublisherPublicKeys */ - setPublisherPublicKeys?: (pyth_lazer_transaction.ISetPublisherPublicKeys|null); - - /** UpdatePublisher setPublisherActive */ - setPublisherActive?: (pyth_lazer_transaction.ISetPublisherActive|null); - - /** UpdatePublisher removePublisher */ - removePublisher?: (google.protobuf.IEmpty|null); + /** Represents a Map. */ + class Map implements IMap { + /** + * Constructs a new Map. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.DynamicValue.IMap); + + /** Map items. */ + public items: pyth_lazer_transaction.DynamicValue.IMapItem[]; + + /** + * Creates a new Map instance using the specified properties. + * @param [properties] Properties to set + * @returns Map instance + */ + public static create( + properties?: pyth_lazer_transaction.DynamicValue.IMap, + ): pyth_lazer_transaction.DynamicValue.Map; + + /** + * Encodes the specified Map message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.Map.verify|verify} messages. + * @param message Map message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.DynamicValue.IMap, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified Map message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.Map.verify|verify} messages. + * @param message Map message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.DynamicValue.IMap, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a Map message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Map + * @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, + ): pyth_lazer_transaction.DynamicValue.Map; + + /** + * Decodes a Map message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Map + * @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, + ): pyth_lazer_transaction.DynamicValue.Map; + + /** + * Verifies a Map 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 Map message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Map + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.DynamicValue.Map; + + /** + * Creates a plain object from a Map message. Also converts values to other types if specified. + * @param message Map + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.DynamicValue.Map, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Map to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Map + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } + } +} - /** Represents an UpdatePublisher. */ - class UpdatePublisher implements IUpdatePublisher { - - /** - * Constructs a new UpdatePublisher. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IUpdatePublisher); - - /** UpdatePublisher publisherId. */ - public publisherId?: (number|null); - - /** UpdatePublisher setPublisherName. */ - public setPublisherName?: (pyth_lazer_transaction.ISetPublisherName|null); - - /** UpdatePublisher addPublisherPublicKeys. */ - public addPublisherPublicKeys?: (pyth_lazer_transaction.IAddPublisherPublicKeys|null); - - /** UpdatePublisher removePublisherPublicKeys. */ - public removePublisherPublicKeys?: (pyth_lazer_transaction.IRemovePublisherPublicKeys|null); - - /** UpdatePublisher setPublisherPublicKeys. */ - public setPublisherPublicKeys?: (pyth_lazer_transaction.ISetPublisherPublicKeys|null); - - /** UpdatePublisher setPublisherActive. */ - public setPublisherActive?: (pyth_lazer_transaction.ISetPublisherActive|null); - - /** UpdatePublisher removePublisher. */ - public removePublisher?: (google.protobuf.IEmpty|null); - - /** UpdatePublisher _publisherId. */ - public _publisherId?: "publisherId"; - - /** UpdatePublisher action. */ - public action?: ("setPublisherName"|"addPublisherPublicKeys"|"removePublisherPublicKeys"|"setPublisherPublicKeys"|"setPublisherActive"|"removePublisher"); - - /** - * Creates a new UpdatePublisher instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdatePublisher instance - */ - public static create(properties?: pyth_lazer_transaction.IUpdatePublisher): pyth_lazer_transaction.UpdatePublisher; - - /** - * Encodes the specified UpdatePublisher message. Does not implicitly {@link pyth_lazer_transaction.UpdatePublisher.verify|verify} messages. - * @param message UpdatePublisher message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IUpdatePublisher, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdatePublisher message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdatePublisher.verify|verify} messages. - * @param message UpdatePublisher message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IUpdatePublisher, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdatePublisher message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdatePublisher - * @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): pyth_lazer_transaction.UpdatePublisher; - - /** - * Decodes an UpdatePublisher message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdatePublisher - * @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)): pyth_lazer_transaction.UpdatePublisher; - - /** - * Verifies an UpdatePublisher 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 UpdatePublisher message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdatePublisher - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.UpdatePublisher; - - /** - * Creates a plain object from an UpdatePublisher message. Also converts values to other types if specified. - * @param message UpdatePublisher - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.UpdatePublisher, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdatePublisher to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdatePublisher - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetPublisherName. */ - interface ISetPublisherName { - - /** SetPublisherName name */ - name?: (string|null); - } - - /** Represents a SetPublisherName. */ - class SetPublisherName implements ISetPublisherName { - - /** - * Constructs a new SetPublisherName. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.ISetPublisherName); - - /** SetPublisherName name. */ - public name?: (string|null); - - /** SetPublisherName _name. */ - public _name?: "name"; - - /** - * Creates a new SetPublisherName instance using the specified properties. - * @param [properties] Properties to set - * @returns SetPublisherName instance - */ - public static create(properties?: pyth_lazer_transaction.ISetPublisherName): pyth_lazer_transaction.SetPublisherName; - - /** - * Encodes the specified SetPublisherName message. Does not implicitly {@link pyth_lazer_transaction.SetPublisherName.verify|verify} messages. - * @param message SetPublisherName message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.ISetPublisherName, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetPublisherName message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetPublisherName.verify|verify} messages. - * @param message SetPublisherName message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.ISetPublisherName, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetPublisherName message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetPublisherName - * @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): pyth_lazer_transaction.SetPublisherName; - - /** - * Decodes a SetPublisherName message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetPublisherName - * @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)): pyth_lazer_transaction.SetPublisherName; - - /** - * Verifies a SetPublisherName 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 SetPublisherName message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetPublisherName - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.SetPublisherName; - - /** - * Creates a plain object from a SetPublisherName message. Also converts values to other types if specified. - * @param message SetPublisherName - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.SetPublisherName, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetPublisherName to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetPublisherName - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AddPublisherPublicKeys. */ - interface IAddPublisherPublicKeys { - - /** AddPublisherPublicKeys publicKeys */ - publicKeys?: (Uint8Array[]|null); - } - - /** Represents an AddPublisherPublicKeys. */ - class AddPublisherPublicKeys implements IAddPublisherPublicKeys { - - /** - * Constructs a new AddPublisherPublicKeys. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IAddPublisherPublicKeys); - - /** AddPublisherPublicKeys publicKeys. */ - public publicKeys: Uint8Array[]; - - /** - * Creates a new AddPublisherPublicKeys instance using the specified properties. - * @param [properties] Properties to set - * @returns AddPublisherPublicKeys instance - */ - public static create(properties?: pyth_lazer_transaction.IAddPublisherPublicKeys): pyth_lazer_transaction.AddPublisherPublicKeys; - - /** - * Encodes the specified AddPublisherPublicKeys message. Does not implicitly {@link pyth_lazer_transaction.AddPublisherPublicKeys.verify|verify} messages. - * @param message AddPublisherPublicKeys message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IAddPublisherPublicKeys, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AddPublisherPublicKeys message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddPublisherPublicKeys.verify|verify} messages. - * @param message AddPublisherPublicKeys message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IAddPublisherPublicKeys, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AddPublisherPublicKeys message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AddPublisherPublicKeys - * @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): pyth_lazer_transaction.AddPublisherPublicKeys; - - /** - * Decodes an AddPublisherPublicKeys message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AddPublisherPublicKeys - * @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)): pyth_lazer_transaction.AddPublisherPublicKeys; - - /** - * Verifies an AddPublisherPublicKeys 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 AddPublisherPublicKeys message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AddPublisherPublicKeys - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.AddPublisherPublicKeys; - - /** - * Creates a plain object from an AddPublisherPublicKeys message. Also converts values to other types if specified. - * @param message AddPublisherPublicKeys - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.AddPublisherPublicKeys, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AddPublisherPublicKeys to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AddPublisherPublicKeys - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RemovePublisherPublicKeys. */ - interface IRemovePublisherPublicKeys { - - /** RemovePublisherPublicKeys publicKeys */ - publicKeys?: (Uint8Array[]|null); - } - - /** Represents a RemovePublisherPublicKeys. */ - class RemovePublisherPublicKeys implements IRemovePublisherPublicKeys { - - /** - * Constructs a new RemovePublisherPublicKeys. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IRemovePublisherPublicKeys); - - /** RemovePublisherPublicKeys publicKeys. */ - public publicKeys: Uint8Array[]; - - /** - * Creates a new RemovePublisherPublicKeys instance using the specified properties. - * @param [properties] Properties to set - * @returns RemovePublisherPublicKeys instance - */ - public static create(properties?: pyth_lazer_transaction.IRemovePublisherPublicKeys): pyth_lazer_transaction.RemovePublisherPublicKeys; - - /** - * Encodes the specified RemovePublisherPublicKeys message. Does not implicitly {@link pyth_lazer_transaction.RemovePublisherPublicKeys.verify|verify} messages. - * @param message RemovePublisherPublicKeys message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IRemovePublisherPublicKeys, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RemovePublisherPublicKeys message, length delimited. Does not implicitly {@link pyth_lazer_transaction.RemovePublisherPublicKeys.verify|verify} messages. - * @param message RemovePublisherPublicKeys message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IRemovePublisherPublicKeys, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RemovePublisherPublicKeys message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RemovePublisherPublicKeys - * @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): pyth_lazer_transaction.RemovePublisherPublicKeys; - - /** - * Decodes a RemovePublisherPublicKeys message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RemovePublisherPublicKeys - * @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)): pyth_lazer_transaction.RemovePublisherPublicKeys; - - /** - * Verifies a RemovePublisherPublicKeys 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 RemovePublisherPublicKeys message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RemovePublisherPublicKeys - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.RemovePublisherPublicKeys; - - /** - * Creates a plain object from a RemovePublisherPublicKeys message. Also converts values to other types if specified. - * @param message RemovePublisherPublicKeys - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.RemovePublisherPublicKeys, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RemovePublisherPublicKeys to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RemovePublisherPublicKeys - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetPublisherPublicKeys. */ - interface ISetPublisherPublicKeys { - - /** SetPublisherPublicKeys publicKeys */ - publicKeys?: (Uint8Array[]|null); - } - - /** Represents a SetPublisherPublicKeys. */ - class SetPublisherPublicKeys implements ISetPublisherPublicKeys { - - /** - * Constructs a new SetPublisherPublicKeys. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.ISetPublisherPublicKeys); - - /** SetPublisherPublicKeys publicKeys. */ - public publicKeys: Uint8Array[]; - - /** - * Creates a new SetPublisherPublicKeys instance using the specified properties. - * @param [properties] Properties to set - * @returns SetPublisherPublicKeys instance - */ - public static create(properties?: pyth_lazer_transaction.ISetPublisherPublicKeys): pyth_lazer_transaction.SetPublisherPublicKeys; - - /** - * Encodes the specified SetPublisherPublicKeys message. Does not implicitly {@link pyth_lazer_transaction.SetPublisherPublicKeys.verify|verify} messages. - * @param message SetPublisherPublicKeys message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.ISetPublisherPublicKeys, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetPublisherPublicKeys message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetPublisherPublicKeys.verify|verify} messages. - * @param message SetPublisherPublicKeys message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.ISetPublisherPublicKeys, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetPublisherPublicKeys message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetPublisherPublicKeys - * @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): pyth_lazer_transaction.SetPublisherPublicKeys; - - /** - * Decodes a SetPublisherPublicKeys message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetPublisherPublicKeys - * @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)): pyth_lazer_transaction.SetPublisherPublicKeys; - - /** - * Verifies a SetPublisherPublicKeys 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 SetPublisherPublicKeys message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetPublisherPublicKeys - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.SetPublisherPublicKeys; - - /** - * Creates a plain object from a SetPublisherPublicKeys message. Also converts values to other types if specified. - * @param message SetPublisherPublicKeys - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.SetPublisherPublicKeys, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetPublisherPublicKeys to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetPublisherPublicKeys - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetPublisherActive. */ - interface ISetPublisherActive { - - /** SetPublisherActive isActive */ - isActive?: (boolean|null); - } - - /** Represents a SetPublisherActive. */ - class SetPublisherActive implements ISetPublisherActive { - - /** - * Constructs a new SetPublisherActive. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.ISetPublisherActive); - - /** SetPublisherActive isActive. */ - public isActive?: (boolean|null); - - /** SetPublisherActive _isActive. */ - public _isActive?: "isActive"; - - /** - * Creates a new SetPublisherActive instance using the specified properties. - * @param [properties] Properties to set - * @returns SetPublisherActive instance - */ - public static create(properties?: pyth_lazer_transaction.ISetPublisherActive): pyth_lazer_transaction.SetPublisherActive; - - /** - * Encodes the specified SetPublisherActive message. Does not implicitly {@link pyth_lazer_transaction.SetPublisherActive.verify|verify} messages. - * @param message SetPublisherActive message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.ISetPublisherActive, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetPublisherActive message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetPublisherActive.verify|verify} messages. - * @param message SetPublisherActive message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.ISetPublisherActive, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetPublisherActive message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetPublisherActive - * @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): pyth_lazer_transaction.SetPublisherActive; - - /** - * Decodes a SetPublisherActive message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetPublisherActive - * @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)): pyth_lazer_transaction.SetPublisherActive; - - /** - * Verifies a SetPublisherActive 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 SetPublisherActive message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetPublisherActive - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.SetPublisherActive; - - /** - * Creates a plain object from a SetPublisherActive message. Also converts values to other types if specified. - * @param message SetPublisherActive - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.SetPublisherActive, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetPublisherActive to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetPublisherActive - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AddFeed. */ - interface IAddFeed { - - /** AddFeed feedId */ - feedId?: (number|null); - - /** AddFeed metadata */ - metadata?: (pyth_lazer_transaction.DynamicValue.IMap|null); - - /** AddFeed permissionedPublishers */ - permissionedPublishers?: (number[]|null); - } - - /** Represents an AddFeed. */ - class AddFeed implements IAddFeed { - - /** - * Constructs a new AddFeed. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IAddFeed); - - /** AddFeed feedId. */ - public feedId?: (number|null); - - /** AddFeed metadata. */ - public metadata?: (pyth_lazer_transaction.DynamicValue.IMap|null); - - /** AddFeed permissionedPublishers. */ - public permissionedPublishers: number[]; - - /** AddFeed _feedId. */ - public _feedId?: "feedId"; - - /** AddFeed _metadata. */ - public _metadata?: "metadata"; - - /** - * Creates a new AddFeed instance using the specified properties. - * @param [properties] Properties to set - * @returns AddFeed instance - */ - public static create(properties?: pyth_lazer_transaction.IAddFeed): pyth_lazer_transaction.AddFeed; - - /** - * Encodes the specified AddFeed message. Does not implicitly {@link pyth_lazer_transaction.AddFeed.verify|verify} messages. - * @param message AddFeed message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IAddFeed, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AddFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddFeed.verify|verify} messages. - * @param message AddFeed message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IAddFeed, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AddFeed message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AddFeed - * @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): pyth_lazer_transaction.AddFeed; - - /** - * Decodes an AddFeed message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AddFeed - * @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)): pyth_lazer_transaction.AddFeed; - - /** - * Verifies an AddFeed 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 AddFeed message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AddFeed - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.AddFeed; - - /** - * Creates a plain object from an AddFeed message. Also converts values to other types if specified. - * @param message AddFeed - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.AddFeed, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AddFeed to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AddFeed - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateFeed. */ - interface IUpdateFeed { - - /** UpdateFeed feedId */ - feedId?: (number|null); - - /** UpdateFeed updateFeedMetadata */ - updateFeedMetadata?: (pyth_lazer_transaction.IUpdateFeedMetadata|null); - - /** UpdateFeed activateFeed */ - activateFeed?: (pyth_lazer_transaction.IActivateFeed|null); - - /** UpdateFeed deactivateFeed */ - deactivateFeed?: (pyth_lazer_transaction.IDeactivateFeed|null); - - /** UpdateFeed removeFeed */ - removeFeed?: (google.protobuf.IEmpty|null); - } - - /** Represents an UpdateFeed. */ - class UpdateFeed implements IUpdateFeed { - - /** - * Constructs a new UpdateFeed. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IUpdateFeed); - - /** UpdateFeed feedId. */ - public feedId?: (number|null); - - /** UpdateFeed updateFeedMetadata. */ - public updateFeedMetadata?: (pyth_lazer_transaction.IUpdateFeedMetadata|null); - - /** UpdateFeed activateFeed. */ - public activateFeed?: (pyth_lazer_transaction.IActivateFeed|null); - - /** UpdateFeed deactivateFeed. */ - public deactivateFeed?: (pyth_lazer_transaction.IDeactivateFeed|null); - - /** UpdateFeed removeFeed. */ - public removeFeed?: (google.protobuf.IEmpty|null); - - /** UpdateFeed _feedId. */ - public _feedId?: "feedId"; - - /** UpdateFeed action. */ - public action?: ("updateFeedMetadata"|"activateFeed"|"deactivateFeed"|"removeFeed"); - - /** - * Creates a new UpdateFeed instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateFeed instance - */ - public static create(properties?: pyth_lazer_transaction.IUpdateFeed): pyth_lazer_transaction.UpdateFeed; - - /** - * Encodes the specified UpdateFeed message. Does not implicitly {@link pyth_lazer_transaction.UpdateFeed.verify|verify} messages. - * @param message UpdateFeed message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IUpdateFeed, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdateFeed.verify|verify} messages. - * @param message UpdateFeed message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IUpdateFeed, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateFeed message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateFeed - * @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): pyth_lazer_transaction.UpdateFeed; - - /** - * Decodes an UpdateFeed message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateFeed - * @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)): pyth_lazer_transaction.UpdateFeed; - - /** - * Verifies an UpdateFeed 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 UpdateFeed message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateFeed - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.UpdateFeed; - - /** - * Creates a plain object from an UpdateFeed message. Also converts values to other types if specified. - * @param message UpdateFeed - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.UpdateFeed, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateFeed to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateFeed - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateFeedMetadata. */ - interface IUpdateFeedMetadata { - - /** UpdateFeedMetadata name */ - name?: (string|null); - - /** UpdateFeedMetadata value */ - value?: (pyth_lazer_transaction.IDynamicValue|null); - } - - /** Represents an UpdateFeedMetadata. */ - class UpdateFeedMetadata implements IUpdateFeedMetadata { - - /** - * Constructs a new UpdateFeedMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IUpdateFeedMetadata); - - /** UpdateFeedMetadata name. */ - public name?: (string|null); - - /** UpdateFeedMetadata value. */ - public value?: (pyth_lazer_transaction.IDynamicValue|null); - - /** UpdateFeedMetadata _name. */ - public _name?: "name"; - - /** UpdateFeedMetadata _value. */ - public _value?: "value"; - - /** - * Creates a new UpdateFeedMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateFeedMetadata instance - */ - public static create(properties?: pyth_lazer_transaction.IUpdateFeedMetadata): pyth_lazer_transaction.UpdateFeedMetadata; - - /** - * Encodes the specified UpdateFeedMetadata message. Does not implicitly {@link pyth_lazer_transaction.UpdateFeedMetadata.verify|verify} messages. - * @param message UpdateFeedMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IUpdateFeedMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateFeedMetadata message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdateFeedMetadata.verify|verify} messages. - * @param message UpdateFeedMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IUpdateFeedMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateFeedMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateFeedMetadata - * @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): pyth_lazer_transaction.UpdateFeedMetadata; - - /** - * Decodes an UpdateFeedMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateFeedMetadata - * @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)): pyth_lazer_transaction.UpdateFeedMetadata; - - /** - * Verifies an UpdateFeedMetadata 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 UpdateFeedMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateFeedMetadata - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.UpdateFeedMetadata; - - /** - * Creates a plain object from an UpdateFeedMetadata message. Also converts values to other types if specified. - * @param message UpdateFeedMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.UpdateFeedMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateFeedMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateFeedMetadata - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ActivateFeed. */ - interface IActivateFeed { - - /** ActivateFeed activationTimestamp */ - activationTimestamp?: (google.protobuf.ITimestamp|null); - } - - /** Represents an ActivateFeed. */ - class ActivateFeed implements IActivateFeed { - - /** - * Constructs a new ActivateFeed. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IActivateFeed); - - /** ActivateFeed activationTimestamp. */ - public activationTimestamp?: (google.protobuf.ITimestamp|null); - - /** ActivateFeed _activationTimestamp. */ - public _activationTimestamp?: "activationTimestamp"; - - /** - * Creates a new ActivateFeed instance using the specified properties. - * @param [properties] Properties to set - * @returns ActivateFeed instance - */ - public static create(properties?: pyth_lazer_transaction.IActivateFeed): pyth_lazer_transaction.ActivateFeed; - - /** - * Encodes the specified ActivateFeed message. Does not implicitly {@link pyth_lazer_transaction.ActivateFeed.verify|verify} messages. - * @param message ActivateFeed message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IActivateFeed, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ActivateFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ActivateFeed.verify|verify} messages. - * @param message ActivateFeed message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IActivateFeed, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ActivateFeed message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ActivateFeed - * @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): pyth_lazer_transaction.ActivateFeed; - - /** - * Decodes an ActivateFeed message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ActivateFeed - * @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)): pyth_lazer_transaction.ActivateFeed; - - /** - * Verifies an ActivateFeed 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 ActivateFeed message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ActivateFeed - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.ActivateFeed; - - /** - * Creates a plain object from an ActivateFeed message. Also converts values to other types if specified. - * @param message ActivateFeed - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.ActivateFeed, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ActivateFeed to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ActivateFeed - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeactivateFeed. */ - interface IDeactivateFeed { - - /** DeactivateFeed deactivationTimestamp */ - deactivationTimestamp?: (google.protobuf.ITimestamp|null); +/** Namespace google. */ +export namespace google { + /** Namespace protobuf. */ + namespace protobuf { + /** Properties of a Timestamp. */ + interface ITimestamp { + /** Timestamp seconds */ + seconds?: number | Long | null; + + /** Timestamp nanos */ + nanos?: number | null; } - /** Represents a DeactivateFeed. */ - class DeactivateFeed implements IDeactivateFeed { - - /** - * Constructs a new DeactivateFeed. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IDeactivateFeed); - - /** DeactivateFeed deactivationTimestamp. */ - public deactivationTimestamp?: (google.protobuf.ITimestamp|null); - - /** DeactivateFeed _deactivationTimestamp. */ - public _deactivationTimestamp?: "deactivationTimestamp"; - - /** - * Creates a new DeactivateFeed instance using the specified properties. - * @param [properties] Properties to set - * @returns DeactivateFeed instance - */ - public static create(properties?: pyth_lazer_transaction.IDeactivateFeed): pyth_lazer_transaction.DeactivateFeed; - - /** - * Encodes the specified DeactivateFeed message. Does not implicitly {@link pyth_lazer_transaction.DeactivateFeed.verify|verify} messages. - * @param message DeactivateFeed message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IDeactivateFeed, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeactivateFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DeactivateFeed.verify|verify} messages. - * @param message DeactivateFeed message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IDeactivateFeed, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeactivateFeed message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeactivateFeed - * @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): pyth_lazer_transaction.DeactivateFeed; - - /** - * Decodes a DeactivateFeed message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeactivateFeed - * @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)): pyth_lazer_transaction.DeactivateFeed; - - /** - * Verifies a DeactivateFeed 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 DeactivateFeed message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeactivateFeed - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.DeactivateFeed; - - /** - * Creates a plain object from a DeactivateFeed message. Also converts values to other types if specified. - * @param message DeactivateFeed - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.DeactivateFeed, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeactivateFeed to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeactivateFeed - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { + /** + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ITimestamp); + + /** Timestamp seconds. */ + public seconds: number | Long; + + /** Timestamp nanos. */ + public nanos: number; + + /** + * Creates a new Timestamp instance using the specified properties. + * @param [properties] Properties to set + * @returns Timestamp instance + */ + public static create( + properties?: google.protobuf.ITimestamp, + ): google.protobuf.Timestamp; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: google.protobuf.ITimestamp, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: google.protobuf.ITimestamp, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Timestamp + * @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.Timestamp; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Timestamp + * @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.Timestamp; + + /** + * Verifies a Timestamp 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 Timestamp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Timestamp + */ + public static fromObject(object: { + [k: string]: any; + }): google.protobuf.Timestamp; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @param message Timestamp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: google.protobuf.Timestamp, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Timestamp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Timestamp + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DynamicValue. */ - interface IDynamicValue { - - /** DynamicValue stringValue */ - stringValue?: (string|null); - - /** DynamicValue doubleValue */ - doubleValue?: (number|null); - - /** DynamicValue uintValue */ - uintValue?: (number|Long|null); - - /** DynamicValue intValue */ - intValue?: (number|Long|null); - - /** DynamicValue boolValue */ - boolValue?: (boolean|null); - - /** DynamicValue bytesValue */ - bytesValue?: (Uint8Array|null); + /** Properties of a Duration. */ + interface IDuration { + /** Duration seconds */ + seconds?: number | Long | null; - /** DynamicValue durationValue */ - durationValue?: (google.protobuf.IDuration|null); - - /** DynamicValue timestampValue */ - timestampValue?: (google.protobuf.ITimestamp|null); - - /** DynamicValue list */ - list?: (pyth_lazer_transaction.DynamicValue.IList|null); - - /** DynamicValue map */ - map?: (pyth_lazer_transaction.DynamicValue.IMap|null); - } - - /** Represents a DynamicValue. */ - class DynamicValue implements IDynamicValue { - - /** - * Constructs a new DynamicValue. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IDynamicValue); - - /** DynamicValue stringValue. */ - public stringValue?: (string|null); - - /** DynamicValue doubleValue. */ - public doubleValue?: (number|null); - - /** DynamicValue uintValue. */ - public uintValue?: (number|Long|null); - - /** DynamicValue intValue. */ - public intValue?: (number|Long|null); - - /** DynamicValue boolValue. */ - public boolValue?: (boolean|null); - - /** DynamicValue bytesValue. */ - public bytesValue?: (Uint8Array|null); - - /** DynamicValue durationValue. */ - public durationValue?: (google.protobuf.IDuration|null); - - /** DynamicValue timestampValue. */ - public timestampValue?: (google.protobuf.ITimestamp|null); - - /** DynamicValue list. */ - public list?: (pyth_lazer_transaction.DynamicValue.IList|null); - - /** DynamicValue map. */ - public map?: (pyth_lazer_transaction.DynamicValue.IMap|null); - - /** DynamicValue value. */ - public value?: ("stringValue"|"doubleValue"|"uintValue"|"intValue"|"boolValue"|"bytesValue"|"durationValue"|"timestampValue"|"list"|"map"); - - /** - * Creates a new DynamicValue instance using the specified properties. - * @param [properties] Properties to set - * @returns DynamicValue instance - */ - public static create(properties?: pyth_lazer_transaction.IDynamicValue): pyth_lazer_transaction.DynamicValue; - - /** - * Encodes the specified DynamicValue message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.verify|verify} messages. - * @param message DynamicValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IDynamicValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DynamicValue message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.verify|verify} messages. - * @param message DynamicValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IDynamicValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DynamicValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DynamicValue - * @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): pyth_lazer_transaction.DynamicValue; - - /** - * Decodes a DynamicValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DynamicValue - * @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)): pyth_lazer_transaction.DynamicValue; - - /** - * Verifies a DynamicValue 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 DynamicValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DynamicValue - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.DynamicValue; - - /** - * Creates a plain object from a DynamicValue message. Also converts values to other types if specified. - * @param message DynamicValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.DynamicValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DynamicValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DynamicValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** Duration nanos */ + nanos?: number | null; } - namespace DynamicValue { - - /** Properties of a List. */ - interface IList { - - /** List items */ - items?: (pyth_lazer_transaction.IDynamicValue[]|null); - } - - /** Represents a List. */ - class List implements IList { - - /** - * Constructs a new List. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.DynamicValue.IList); - - /** List items. */ - public items: pyth_lazer_transaction.IDynamicValue[]; - - /** - * Creates a new List instance using the specified properties. - * @param [properties] Properties to set - * @returns List instance - */ - public static create(properties?: pyth_lazer_transaction.DynamicValue.IList): pyth_lazer_transaction.DynamicValue.List; - - /** - * Encodes the specified List message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.List.verify|verify} messages. - * @param message List message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.DynamicValue.IList, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified List message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.List.verify|verify} messages. - * @param message List message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.DynamicValue.IList, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a List message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns List - * @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): pyth_lazer_transaction.DynamicValue.List; - - /** - * Decodes a List message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns List - * @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)): pyth_lazer_transaction.DynamicValue.List; - - /** - * Verifies a List 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 List message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns List - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.DynamicValue.List; - - /** - * Creates a plain object from a List message. Also converts values to other types if specified. - * @param message List - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.DynamicValue.List, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this List to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for List - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MapItem. */ - interface IMapItem { - - /** MapItem key */ - key?: (string|null); - - /** MapItem value */ - value?: (pyth_lazer_transaction.IDynamicValue|null); - } - - /** Represents a MapItem. */ - class MapItem implements IMapItem { - - /** - * Constructs a new MapItem. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.DynamicValue.IMapItem); - - /** MapItem key. */ - public key?: (string|null); - - /** MapItem value. */ - public value?: (pyth_lazer_transaction.IDynamicValue|null); - - /** MapItem _key. */ - public _key?: "key"; - - /** MapItem _value. */ - public _value?: "value"; - - /** - * Creates a new MapItem instance using the specified properties. - * @param [properties] Properties to set - * @returns MapItem instance - */ - public static create(properties?: pyth_lazer_transaction.DynamicValue.IMapItem): pyth_lazer_transaction.DynamicValue.MapItem; - - /** - * Encodes the specified MapItem message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.MapItem.verify|verify} messages. - * @param message MapItem message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.DynamicValue.IMapItem, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MapItem message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.MapItem.verify|verify} messages. - * @param message MapItem message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.DynamicValue.IMapItem, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MapItem message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MapItem - * @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): pyth_lazer_transaction.DynamicValue.MapItem; - - /** - * Decodes a MapItem message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MapItem - * @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)): pyth_lazer_transaction.DynamicValue.MapItem; - - /** - * Verifies a MapItem 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 MapItem message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MapItem - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.DynamicValue.MapItem; - - /** - * Creates a plain object from a MapItem message. Also converts values to other types if specified. - * @param message MapItem - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.DynamicValue.MapItem, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MapItem to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MapItem - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Map. */ - interface IMap { - - /** Map items */ - items?: (pyth_lazer_transaction.DynamicValue.IMapItem[]|null); - } - - /** Represents a Map. */ - class Map implements IMap { - - /** - * Constructs a new Map. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.DynamicValue.IMap); - - /** Map items. */ - public items: pyth_lazer_transaction.DynamicValue.IMapItem[]; - - /** - * Creates a new Map instance using the specified properties. - * @param [properties] Properties to set - * @returns Map instance - */ - public static create(properties?: pyth_lazer_transaction.DynamicValue.IMap): pyth_lazer_transaction.DynamicValue.Map; - - /** - * Encodes the specified Map message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.Map.verify|verify} messages. - * @param message Map message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.DynamicValue.IMap, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Map message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.Map.verify|verify} messages. - * @param message Map message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.DynamicValue.IMap, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Map message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Map - * @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): pyth_lazer_transaction.DynamicValue.Map; - - /** - * Decodes a Map message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Map - * @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)): pyth_lazer_transaction.DynamicValue.Map; - - /** - * Verifies a Map 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 Map message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Map - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.DynamicValue.Map; - - /** - * Creates a plain object from a Map message. Also converts values to other types if specified. - * @param message Map - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.DynamicValue.Map, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Map to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Map - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** Represents a Duration. */ + class Duration implements IDuration { + /** + * Constructs a new Duration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDuration); + + /** Duration seconds. */ + public seconds: number | Long; + + /** Duration nanos. */ + public nanos: number; + + /** + * Creates a new Duration instance using the specified properties. + * @param [properties] Properties to set + * @returns Duration instance + */ + public static create( + properties?: google.protobuf.IDuration, + ): google.protobuf.Duration; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: google.protobuf.IDuration, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: google.protobuf.IDuration, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Duration + * @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.Duration; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Duration + * @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.Duration; + + /** + * Verifies a Duration 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 Duration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Duration + */ + public static fromObject(object: { + [k: string]: any; + }): google.protobuf.Duration; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @param message Duration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: google.protobuf.Duration, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Duration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Duration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } -} - -/** Namespace google. */ -export namespace google { - /** Namespace protobuf. */ - namespace protobuf { - - /** Properties of a Timestamp. */ - interface ITimestamp { - - /** Timestamp seconds */ - seconds?: (number|Long|null); - - /** Timestamp nanos */ - nanos?: (number|null); - } - - /** Represents a Timestamp. */ - class Timestamp implements ITimestamp { - - /** - * Constructs a new Timestamp. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ITimestamp); - - /** Timestamp seconds. */ - public seconds: (number|Long); - - /** Timestamp nanos. */ - public nanos: number; - - /** - * Creates a new Timestamp instance using the specified properties. - * @param [properties] Properties to set - * @returns Timestamp instance - */ - public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; - - /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Timestamp message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Timestamp - * @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.Timestamp; - - /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Timestamp - * @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.Timestamp; - - /** - * Verifies a Timestamp 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 Timestamp message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Timestamp - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; - - /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @param message Timestamp - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Timestamp to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Timestamp - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Duration. */ - interface IDuration { - - /** Duration seconds */ - seconds?: (number|Long|null); - - /** Duration nanos */ - nanos?: (number|null); - } - - /** Represents a Duration. */ - class Duration implements IDuration { - - /** - * Constructs a new Duration. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDuration); - - /** Duration seconds. */ - public seconds: (number|Long); - - /** Duration nanos. */ - public nanos: number; - - /** - * Creates a new Duration instance using the specified properties. - * @param [properties] Properties to set - * @returns Duration instance - */ - public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; - - /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Duration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Duration - * @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.Duration; - - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Duration - * @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.Duration; - - /** - * Verifies a Duration 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 Duration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Duration - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; - - /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @param message Duration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Duration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Duration - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** 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 }; - - /** - * Gets the default type url for Empty - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** 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 }; + + /** + * Gets the default type url for Empty + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } + } } diff --git a/lazer/state_sdk/js/src/generated/governance_instruction.js b/lazer/state_sdk/js/src/generated/governance_instruction.js index 180772d1b9..53702a0dec 100644 --- a/lazer/state_sdk/js/src/generated/governance_instruction.js +++ b/lazer/state_sdk/js/src/generated/governance_instruction.js @@ -2,10276 +2,11731 @@ 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 pyth_lazer_transaction = $root.pyth_lazer_transaction = (() => { +export const pyth_lazer_transaction = ($root.pyth_lazer_transaction = (() => { + /** + * Namespace pyth_lazer_transaction. + * @exports pyth_lazer_transaction + * @namespace + */ + const pyth_lazer_transaction = {}; + pyth_lazer_transaction.GovernanceInstruction = (function () { /** - * Namespace pyth_lazer_transaction. - * @exports pyth_lazer_transaction - * @namespace + * Properties of a GovernanceInstruction. + * @memberof pyth_lazer_transaction + * @interface IGovernanceInstruction + * @property {Array.|null} [directives] GovernanceInstruction directives + * @property {google.protobuf.ITimestamp|null} [minExecutionTimestamp] GovernanceInstruction minExecutionTimestamp + * @property {google.protobuf.ITimestamp|null} [maxExecutionTimestamp] GovernanceInstruction maxExecutionTimestamp + * @property {number|null} [governanceSequenceNo] GovernanceInstruction governanceSequenceNo */ - const pyth_lazer_transaction = {}; - - pyth_lazer_transaction.GovernanceInstruction = (function() { - - /** - * Properties of a GovernanceInstruction. - * @memberof pyth_lazer_transaction - * @interface IGovernanceInstruction - * @property {Array.|null} [directives] GovernanceInstruction directives - * @property {google.protobuf.ITimestamp|null} [minExecutionTimestamp] GovernanceInstruction minExecutionTimestamp - * @property {google.protobuf.ITimestamp|null} [maxExecutionTimestamp] GovernanceInstruction maxExecutionTimestamp - * @property {number|null} [governanceSequenceNo] GovernanceInstruction governanceSequenceNo - */ - - /** - * Constructs a new GovernanceInstruction. - * @memberof pyth_lazer_transaction - * @classdesc Represents a GovernanceInstruction. - * @implements IGovernanceInstruction - * @constructor - * @param {pyth_lazer_transaction.IGovernanceInstruction=} [properties] Properties to set - */ - function GovernanceInstruction(properties) { - this.directives = []; - 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]]; - } - /** - * GovernanceInstruction directives. - * @member {Array.} directives - * @memberof pyth_lazer_transaction.GovernanceInstruction - * @instance - */ - GovernanceInstruction.prototype.directives = $util.emptyArray; - - /** - * GovernanceInstruction minExecutionTimestamp. - * @member {google.protobuf.ITimestamp|null|undefined} minExecutionTimestamp - * @memberof pyth_lazer_transaction.GovernanceInstruction - * @instance - */ - GovernanceInstruction.prototype.minExecutionTimestamp = null; - - /** - * GovernanceInstruction maxExecutionTimestamp. - * @member {google.protobuf.ITimestamp|null|undefined} maxExecutionTimestamp - * @memberof pyth_lazer_transaction.GovernanceInstruction - * @instance - */ - GovernanceInstruction.prototype.maxExecutionTimestamp = null; - - /** - * GovernanceInstruction governanceSequenceNo. - * @member {number|null|undefined} governanceSequenceNo - * @memberof pyth_lazer_transaction.GovernanceInstruction - * @instance - */ - GovernanceInstruction.prototype.governanceSequenceNo = null; - - // OneOf field names bound to virtual getters and setters - let $oneOfFields; - - /** - * GovernanceInstruction _minExecutionTimestamp. - * @member {"minExecutionTimestamp"|undefined} _minExecutionTimestamp - * @memberof pyth_lazer_transaction.GovernanceInstruction - * @instance - */ - Object.defineProperty(GovernanceInstruction.prototype, "_minExecutionTimestamp", { - get: $util.oneOfGetter($oneOfFields = ["minExecutionTimestamp"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * GovernanceInstruction _maxExecutionTimestamp. - * @member {"maxExecutionTimestamp"|undefined} _maxExecutionTimestamp - * @memberof pyth_lazer_transaction.GovernanceInstruction - * @instance - */ - Object.defineProperty(GovernanceInstruction.prototype, "_maxExecutionTimestamp", { - get: $util.oneOfGetter($oneOfFields = ["maxExecutionTimestamp"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * GovernanceInstruction _governanceSequenceNo. - * @member {"governanceSequenceNo"|undefined} _governanceSequenceNo - * @memberof pyth_lazer_transaction.GovernanceInstruction - * @instance - */ - Object.defineProperty(GovernanceInstruction.prototype, "_governanceSequenceNo", { - get: $util.oneOfGetter($oneOfFields = ["governanceSequenceNo"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new GovernanceInstruction instance using the specified properties. - * @function create - * @memberof pyth_lazer_transaction.GovernanceInstruction - * @static - * @param {pyth_lazer_transaction.IGovernanceInstruction=} [properties] Properties to set - * @returns {pyth_lazer_transaction.GovernanceInstruction} GovernanceInstruction instance - */ - GovernanceInstruction.create = function create(properties) { - return new GovernanceInstruction(properties); - }; - - /** - * Encodes the specified GovernanceInstruction message. Does not implicitly {@link pyth_lazer_transaction.GovernanceInstruction.verify|verify} messages. - * @function encode - * @memberof pyth_lazer_transaction.GovernanceInstruction - * @static - * @param {pyth_lazer_transaction.IGovernanceInstruction} message GovernanceInstruction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GovernanceInstruction.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.directives != null && message.directives.length) - for (let i = 0; i < message.directives.length; ++i) - $root.pyth_lazer_transaction.GovernanceDirective.encode(message.directives[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.minExecutionTimestamp != null && Object.hasOwnProperty.call(message, "minExecutionTimestamp")) - $root.google.protobuf.Timestamp.encode(message.minExecutionTimestamp, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.maxExecutionTimestamp != null && Object.hasOwnProperty.call(message, "maxExecutionTimestamp")) - $root.google.protobuf.Timestamp.encode(message.maxExecutionTimestamp, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.governanceSequenceNo != null && Object.hasOwnProperty.call(message, "governanceSequenceNo")) - writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.governanceSequenceNo); - return writer; - }; - - /** - * Encodes the specified GovernanceInstruction message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceInstruction.verify|verify} messages. - * @function encodeDelimited - * @memberof pyth_lazer_transaction.GovernanceInstruction - * @static - * @param {pyth_lazer_transaction.IGovernanceInstruction} message GovernanceInstruction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GovernanceInstruction.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GovernanceInstruction message from the specified reader or buffer. - * @function decode - * @memberof pyth_lazer_transaction.GovernanceInstruction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pyth_lazer_transaction.GovernanceInstruction} GovernanceInstruction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GovernanceInstruction.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.GovernanceInstruction(); - while (reader.pos < end) { - let tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 2: { - if (!(message.directives && message.directives.length)) - message.directives = []; - message.directives.push($root.pyth_lazer_transaction.GovernanceDirective.decode(reader, reader.uint32())); - break; - } - case 3: { - message.minExecutionTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.maxExecutionTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - message.governanceSequenceNo = reader.uint32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GovernanceInstruction message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pyth_lazer_transaction.GovernanceInstruction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pyth_lazer_transaction.GovernanceInstruction} GovernanceInstruction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GovernanceInstruction.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GovernanceInstruction message. - * @function verify - * @memberof pyth_lazer_transaction.GovernanceInstruction - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GovernanceInstruction.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - let properties = {}; - if (message.directives != null && message.hasOwnProperty("directives")) { - if (!Array.isArray(message.directives)) - return "directives: array expected"; - for (let i = 0; i < message.directives.length; ++i) { - let error = $root.pyth_lazer_transaction.GovernanceDirective.verify(message.directives[i]); - if (error) - return "directives." + error; - } - } - if (message.minExecutionTimestamp != null && message.hasOwnProperty("minExecutionTimestamp")) { - properties._minExecutionTimestamp = 1; - { - let error = $root.google.protobuf.Timestamp.verify(message.minExecutionTimestamp); - if (error) - return "minExecutionTimestamp." + error; - } - } - if (message.maxExecutionTimestamp != null && message.hasOwnProperty("maxExecutionTimestamp")) { - properties._maxExecutionTimestamp = 1; - { - let error = $root.google.protobuf.Timestamp.verify(message.maxExecutionTimestamp); - if (error) - return "maxExecutionTimestamp." + error; - } - } - if (message.governanceSequenceNo != null && message.hasOwnProperty("governanceSequenceNo")) { - properties._governanceSequenceNo = 1; - if (!$util.isInteger(message.governanceSequenceNo)) - return "governanceSequenceNo: integer expected"; - } - return null; - }; - - /** - * Creates a GovernanceInstruction message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pyth_lazer_transaction.GovernanceInstruction - * @static - * @param {Object.} object Plain object - * @returns {pyth_lazer_transaction.GovernanceInstruction} GovernanceInstruction - */ - GovernanceInstruction.fromObject = function fromObject(object) { - if (object instanceof $root.pyth_lazer_transaction.GovernanceInstruction) - return object; - let message = new $root.pyth_lazer_transaction.GovernanceInstruction(); - if (object.directives) { - if (!Array.isArray(object.directives)) - throw TypeError(".pyth_lazer_transaction.GovernanceInstruction.directives: array expected"); - message.directives = []; - for (let i = 0; i < object.directives.length; ++i) { - if (typeof object.directives[i] !== "object") - throw TypeError(".pyth_lazer_transaction.GovernanceInstruction.directives: object expected"); - message.directives[i] = $root.pyth_lazer_transaction.GovernanceDirective.fromObject(object.directives[i]); - } - } - if (object.minExecutionTimestamp != null) { - if (typeof object.minExecutionTimestamp !== "object") - throw TypeError(".pyth_lazer_transaction.GovernanceInstruction.minExecutionTimestamp: object expected"); - message.minExecutionTimestamp = $root.google.protobuf.Timestamp.fromObject(object.minExecutionTimestamp); - } - if (object.maxExecutionTimestamp != null) { - if (typeof object.maxExecutionTimestamp !== "object") - throw TypeError(".pyth_lazer_transaction.GovernanceInstruction.maxExecutionTimestamp: object expected"); - message.maxExecutionTimestamp = $root.google.protobuf.Timestamp.fromObject(object.maxExecutionTimestamp); - } - if (object.governanceSequenceNo != null) - message.governanceSequenceNo = object.governanceSequenceNo >>> 0; - return message; - }; - - /** - * Creates a plain object from a GovernanceInstruction message. Also converts values to other types if specified. - * @function toObject - * @memberof pyth_lazer_transaction.GovernanceInstruction - * @static - * @param {pyth_lazer_transaction.GovernanceInstruction} message GovernanceInstruction - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GovernanceInstruction.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.directives = []; - if (message.directives && message.directives.length) { - object.directives = []; - for (let j = 0; j < message.directives.length; ++j) - object.directives[j] = $root.pyth_lazer_transaction.GovernanceDirective.toObject(message.directives[j], options); - } - if (message.minExecutionTimestamp != null && message.hasOwnProperty("minExecutionTimestamp")) { - object.minExecutionTimestamp = $root.google.protobuf.Timestamp.toObject(message.minExecutionTimestamp, options); - if (options.oneofs) - object._minExecutionTimestamp = "minExecutionTimestamp"; - } - if (message.maxExecutionTimestamp != null && message.hasOwnProperty("maxExecutionTimestamp")) { - object.maxExecutionTimestamp = $root.google.protobuf.Timestamp.toObject(message.maxExecutionTimestamp, options); - if (options.oneofs) - object._maxExecutionTimestamp = "maxExecutionTimestamp"; - } - if (message.governanceSequenceNo != null && message.hasOwnProperty("governanceSequenceNo")) { - object.governanceSequenceNo = message.governanceSequenceNo; - if (options.oneofs) - object._governanceSequenceNo = "governanceSequenceNo"; - } - return object; - }; - - /** - * Converts this GovernanceInstruction to JSON. - * @function toJSON - * @memberof pyth_lazer_transaction.GovernanceInstruction - * @instance - * @returns {Object.} JSON object - */ - GovernanceInstruction.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GovernanceInstruction - * @function getTypeUrl - * @memberof pyth_lazer_transaction.GovernanceInstruction - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GovernanceInstruction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pyth_lazer_transaction.GovernanceInstruction"; - }; + /** + * Constructs a new GovernanceInstruction. + * @memberof pyth_lazer_transaction + * @classdesc Represents a GovernanceInstruction. + * @implements IGovernanceInstruction + * @constructor + * @param {pyth_lazer_transaction.IGovernanceInstruction=} [properties] Properties to set + */ + function GovernanceInstruction(properties) { + this.directives = []; + 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 GovernanceInstruction; - })(); + /** + * GovernanceInstruction directives. + * @member {Array.} directives + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @instance + */ + GovernanceInstruction.prototype.directives = $util.emptyArray; - pyth_lazer_transaction.ShardFilter = (function() { - - /** - * Properties of a ShardFilter. - * @memberof pyth_lazer_transaction - * @interface IShardFilter - * @property {google.protobuf.IEmpty|null} [allShards] ShardFilter allShards - * @property {pyth_lazer_transaction.ShardFilter.IShardNames|null} [shardNames] ShardFilter shardNames - * @property {pyth_lazer_transaction.ShardFilter.IShardGroups|null} [shardGroups] ShardFilter shardGroups - */ - - /** - * Constructs a new ShardFilter. - * @memberof pyth_lazer_transaction - * @classdesc Represents a ShardFilter. - * @implements IShardFilter - * @constructor - * @param {pyth_lazer_transaction.IShardFilter=} [properties] Properties to set - */ - function ShardFilter(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]]; - } + /** + * GovernanceInstruction minExecutionTimestamp. + * @member {google.protobuf.ITimestamp|null|undefined} minExecutionTimestamp + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @instance + */ + GovernanceInstruction.prototype.minExecutionTimestamp = null; - /** - * ShardFilter allShards. - * @member {google.protobuf.IEmpty|null|undefined} allShards - * @memberof pyth_lazer_transaction.ShardFilter - * @instance - */ - ShardFilter.prototype.allShards = null; - - /** - * ShardFilter shardNames. - * @member {pyth_lazer_transaction.ShardFilter.IShardNames|null|undefined} shardNames - * @memberof pyth_lazer_transaction.ShardFilter - * @instance - */ - ShardFilter.prototype.shardNames = null; - - /** - * ShardFilter shardGroups. - * @member {pyth_lazer_transaction.ShardFilter.IShardGroups|null|undefined} shardGroups - * @memberof pyth_lazer_transaction.ShardFilter - * @instance - */ - ShardFilter.prototype.shardGroups = null; - - // OneOf field names bound to virtual getters and setters - let $oneOfFields; - - /** - * ShardFilter filter. - * @member {"allShards"|"shardNames"|"shardGroups"|undefined} filter - * @memberof pyth_lazer_transaction.ShardFilter - * @instance - */ - Object.defineProperty(ShardFilter.prototype, "filter", { - get: $util.oneOfGetter($oneOfFields = ["allShards", "shardNames", "shardGroups"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ShardFilter instance using the specified properties. - * @function create - * @memberof pyth_lazer_transaction.ShardFilter - * @static - * @param {pyth_lazer_transaction.IShardFilter=} [properties] Properties to set - * @returns {pyth_lazer_transaction.ShardFilter} ShardFilter instance - */ - ShardFilter.create = function create(properties) { - return new ShardFilter(properties); - }; - - /** - * Encodes the specified ShardFilter message. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.verify|verify} messages. - * @function encode - * @memberof pyth_lazer_transaction.ShardFilter - * @static - * @param {pyth_lazer_transaction.IShardFilter} message ShardFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ShardFilter.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.allShards != null && Object.hasOwnProperty.call(message, "allShards")) - $root.google.protobuf.Empty.encode(message.allShards, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.shardNames != null && Object.hasOwnProperty.call(message, "shardNames")) - $root.pyth_lazer_transaction.ShardFilter.ShardNames.encode(message.shardNames, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.shardGroups != null && Object.hasOwnProperty.call(message, "shardGroups")) - $root.pyth_lazer_transaction.ShardFilter.ShardGroups.encode(message.shardGroups, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ShardFilter message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.verify|verify} messages. - * @function encodeDelimited - * @memberof pyth_lazer_transaction.ShardFilter - * @static - * @param {pyth_lazer_transaction.IShardFilter} message ShardFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ShardFilter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ShardFilter message from the specified reader or buffer. - * @function decode - * @memberof pyth_lazer_transaction.ShardFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pyth_lazer_transaction.ShardFilter} ShardFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ShardFilter.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.ShardFilter(); - while (reader.pos < end) { - let tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.allShards = $root.google.protobuf.Empty.decode(reader, reader.uint32()); - break; - } - case 2: { - message.shardNames = $root.pyth_lazer_transaction.ShardFilter.ShardNames.decode(reader, reader.uint32()); - break; - } - case 3: { - message.shardGroups = $root.pyth_lazer_transaction.ShardFilter.ShardGroups.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ShardFilter message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pyth_lazer_transaction.ShardFilter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pyth_lazer_transaction.ShardFilter} ShardFilter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ShardFilter.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ShardFilter message. - * @function verify - * @memberof pyth_lazer_transaction.ShardFilter - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ShardFilter.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - let properties = {}; - if (message.allShards != null && message.hasOwnProperty("allShards")) { - properties.filter = 1; - { - let error = $root.google.protobuf.Empty.verify(message.allShards); - if (error) - return "allShards." + error; - } - } - if (message.shardNames != null && message.hasOwnProperty("shardNames")) { - if (properties.filter === 1) - return "filter: multiple values"; - properties.filter = 1; - { - let error = $root.pyth_lazer_transaction.ShardFilter.ShardNames.verify(message.shardNames); - if (error) - return "shardNames." + error; - } - } - if (message.shardGroups != null && message.hasOwnProperty("shardGroups")) { - if (properties.filter === 1) - return "filter: multiple values"; - properties.filter = 1; - { - let error = $root.pyth_lazer_transaction.ShardFilter.ShardGroups.verify(message.shardGroups); - if (error) - return "shardGroups." + error; - } - } - return null; - }; - - /** - * Creates a ShardFilter message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pyth_lazer_transaction.ShardFilter - * @static - * @param {Object.} object Plain object - * @returns {pyth_lazer_transaction.ShardFilter} ShardFilter - */ - ShardFilter.fromObject = function fromObject(object) { - if (object instanceof $root.pyth_lazer_transaction.ShardFilter) - return object; - let message = new $root.pyth_lazer_transaction.ShardFilter(); - if (object.allShards != null) { - if (typeof object.allShards !== "object") - throw TypeError(".pyth_lazer_transaction.ShardFilter.allShards: object expected"); - message.allShards = $root.google.protobuf.Empty.fromObject(object.allShards); - } - if (object.shardNames != null) { - if (typeof object.shardNames !== "object") - throw TypeError(".pyth_lazer_transaction.ShardFilter.shardNames: object expected"); - message.shardNames = $root.pyth_lazer_transaction.ShardFilter.ShardNames.fromObject(object.shardNames); - } - if (object.shardGroups != null) { - if (typeof object.shardGroups !== "object") - throw TypeError(".pyth_lazer_transaction.ShardFilter.shardGroups: object expected"); - message.shardGroups = $root.pyth_lazer_transaction.ShardFilter.ShardGroups.fromObject(object.shardGroups); - } - return message; - }; - - /** - * Creates a plain object from a ShardFilter message. Also converts values to other types if specified. - * @function toObject - * @memberof pyth_lazer_transaction.ShardFilter - * @static - * @param {pyth_lazer_transaction.ShardFilter} message ShardFilter - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ShardFilter.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (message.allShards != null && message.hasOwnProperty("allShards")) { - object.allShards = $root.google.protobuf.Empty.toObject(message.allShards, options); - if (options.oneofs) - object.filter = "allShards"; - } - if (message.shardNames != null && message.hasOwnProperty("shardNames")) { - object.shardNames = $root.pyth_lazer_transaction.ShardFilter.ShardNames.toObject(message.shardNames, options); - if (options.oneofs) - object.filter = "shardNames"; - } - if (message.shardGroups != null && message.hasOwnProperty("shardGroups")) { - object.shardGroups = $root.pyth_lazer_transaction.ShardFilter.ShardGroups.toObject(message.shardGroups, options); - if (options.oneofs) - object.filter = "shardGroups"; - } - return object; - }; - - /** - * Converts this ShardFilter to JSON. - * @function toJSON - * @memberof pyth_lazer_transaction.ShardFilter - * @instance - * @returns {Object.} JSON object - */ - ShardFilter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ShardFilter - * @function getTypeUrl - * @memberof pyth_lazer_transaction.ShardFilter - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ShardFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pyth_lazer_transaction.ShardFilter"; - }; - - ShardFilter.ShardNames = (function() { - - /** - * Properties of a ShardNames. - * @memberof pyth_lazer_transaction.ShardFilter - * @interface IShardNames - * @property {Array.|null} [shardNames] ShardNames shardNames - */ - - /** - * Constructs a new ShardNames. - * @memberof pyth_lazer_transaction.ShardFilter - * @classdesc Represents a ShardNames. - * @implements IShardNames - * @constructor - * @param {pyth_lazer_transaction.ShardFilter.IShardNames=} [properties] Properties to set - */ - function ShardNames(properties) { - this.shardNames = []; - 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]]; - } + /** + * GovernanceInstruction maxExecutionTimestamp. + * @member {google.protobuf.ITimestamp|null|undefined} maxExecutionTimestamp + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @instance + */ + GovernanceInstruction.prototype.maxExecutionTimestamp = null; - /** - * ShardNames shardNames. - * @member {Array.} shardNames - * @memberof pyth_lazer_transaction.ShardFilter.ShardNames - * @instance - */ - ShardNames.prototype.shardNames = $util.emptyArray; - - /** - * Creates a new ShardNames instance using the specified properties. - * @function create - * @memberof pyth_lazer_transaction.ShardFilter.ShardNames - * @static - * @param {pyth_lazer_transaction.ShardFilter.IShardNames=} [properties] Properties to set - * @returns {pyth_lazer_transaction.ShardFilter.ShardNames} ShardNames instance - */ - ShardNames.create = function create(properties) { - return new ShardNames(properties); - }; - - /** - * Encodes the specified ShardNames message. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardNames.verify|verify} messages. - * @function encode - * @memberof pyth_lazer_transaction.ShardFilter.ShardNames - * @static - * @param {pyth_lazer_transaction.ShardFilter.IShardNames} message ShardNames message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ShardNames.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.shardNames != null && message.shardNames.length) - for (let i = 0; i < message.shardNames.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.shardNames[i]); - return writer; - }; - - /** - * Encodes the specified ShardNames message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardNames.verify|verify} messages. - * @function encodeDelimited - * @memberof pyth_lazer_transaction.ShardFilter.ShardNames - * @static - * @param {pyth_lazer_transaction.ShardFilter.IShardNames} message ShardNames message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ShardNames.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ShardNames message from the specified reader or buffer. - * @function decode - * @memberof pyth_lazer_transaction.ShardFilter.ShardNames - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pyth_lazer_transaction.ShardFilter.ShardNames} ShardNames - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ShardNames.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.ShardFilter.ShardNames(); - while (reader.pos < end) { - let tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.shardNames && message.shardNames.length)) - message.shardNames = []; - message.shardNames.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ShardNames message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pyth_lazer_transaction.ShardFilter.ShardNames - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pyth_lazer_transaction.ShardFilter.ShardNames} ShardNames - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ShardNames.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ShardNames message. - * @function verify - * @memberof pyth_lazer_transaction.ShardFilter.ShardNames - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ShardNames.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.shardNames != null && message.hasOwnProperty("shardNames")) { - if (!Array.isArray(message.shardNames)) - return "shardNames: array expected"; - for (let i = 0; i < message.shardNames.length; ++i) - if (!$util.isString(message.shardNames[i])) - return "shardNames: string[] expected"; - } - return null; - }; - - /** - * Creates a ShardNames message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pyth_lazer_transaction.ShardFilter.ShardNames - * @static - * @param {Object.} object Plain object - * @returns {pyth_lazer_transaction.ShardFilter.ShardNames} ShardNames - */ - ShardNames.fromObject = function fromObject(object) { - if (object instanceof $root.pyth_lazer_transaction.ShardFilter.ShardNames) - return object; - let message = new $root.pyth_lazer_transaction.ShardFilter.ShardNames(); - if (object.shardNames) { - if (!Array.isArray(object.shardNames)) - throw TypeError(".pyth_lazer_transaction.ShardFilter.ShardNames.shardNames: array expected"); - message.shardNames = []; - for (let i = 0; i < object.shardNames.length; ++i) - message.shardNames[i] = String(object.shardNames[i]); - } - return message; - }; - - /** - * Creates a plain object from a ShardNames message. Also converts values to other types if specified. - * @function toObject - * @memberof pyth_lazer_transaction.ShardFilter.ShardNames - * @static - * @param {pyth_lazer_transaction.ShardFilter.ShardNames} message ShardNames - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ShardNames.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.shardNames = []; - if (message.shardNames && message.shardNames.length) { - object.shardNames = []; - for (let j = 0; j < message.shardNames.length; ++j) - object.shardNames[j] = message.shardNames[j]; - } - return object; - }; - - /** - * Converts this ShardNames to JSON. - * @function toJSON - * @memberof pyth_lazer_transaction.ShardFilter.ShardNames - * @instance - * @returns {Object.} JSON object - */ - ShardNames.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ShardNames - * @function getTypeUrl - * @memberof pyth_lazer_transaction.ShardFilter.ShardNames - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ShardNames.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pyth_lazer_transaction.ShardFilter.ShardNames"; - }; - - return ShardNames; - })(); - - ShardFilter.ShardGroups = (function() { - - /** - * Properties of a ShardGroups. - * @memberof pyth_lazer_transaction.ShardFilter - * @interface IShardGroups - * @property {Array.|null} [shardGroups] ShardGroups shardGroups - */ - - /** - * Constructs a new ShardGroups. - * @memberof pyth_lazer_transaction.ShardFilter - * @classdesc Represents a ShardGroups. - * @implements IShardGroups - * @constructor - * @param {pyth_lazer_transaction.ShardFilter.IShardGroups=} [properties] Properties to set - */ - function ShardGroups(properties) { - this.shardGroups = []; - 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]]; - } + /** + * GovernanceInstruction governanceSequenceNo. + * @member {number|null|undefined} governanceSequenceNo + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @instance + */ + GovernanceInstruction.prototype.governanceSequenceNo = null; - /** - * ShardGroups shardGroups. - * @member {Array.} shardGroups - * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups - * @instance - */ - ShardGroups.prototype.shardGroups = $util.emptyArray; - - /** - * Creates a new ShardGroups instance using the specified properties. - * @function create - * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups - * @static - * @param {pyth_lazer_transaction.ShardFilter.IShardGroups=} [properties] Properties to set - * @returns {pyth_lazer_transaction.ShardFilter.ShardGroups} ShardGroups instance - */ - ShardGroups.create = function create(properties) { - return new ShardGroups(properties); - }; - - /** - * Encodes the specified ShardGroups message. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardGroups.verify|verify} messages. - * @function encode - * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups - * @static - * @param {pyth_lazer_transaction.ShardFilter.IShardGroups} message ShardGroups message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ShardGroups.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.shardGroups != null && message.shardGroups.length) - for (let i = 0; i < message.shardGroups.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.shardGroups[i]); - return writer; - }; - - /** - * Encodes the specified ShardGroups message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardGroups.verify|verify} messages. - * @function encodeDelimited - * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups - * @static - * @param {pyth_lazer_transaction.ShardFilter.IShardGroups} message ShardGroups message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ShardGroups.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ShardGroups message from the specified reader or buffer. - * @function decode - * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pyth_lazer_transaction.ShardFilter.ShardGroups} ShardGroups - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ShardGroups.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.ShardFilter.ShardGroups(); - while (reader.pos < end) { - let tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.shardGroups && message.shardGroups.length)) - message.shardGroups = []; - message.shardGroups.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ShardGroups message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pyth_lazer_transaction.ShardFilter.ShardGroups} ShardGroups - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ShardGroups.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ShardGroups message. - * @function verify - * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ShardGroups.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.shardGroups != null && message.hasOwnProperty("shardGroups")) { - if (!Array.isArray(message.shardGroups)) - return "shardGroups: array expected"; - for (let i = 0; i < message.shardGroups.length; ++i) - if (!$util.isString(message.shardGroups[i])) - return "shardGroups: string[] expected"; - } - return null; - }; - - /** - * Creates a ShardGroups message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups - * @static - * @param {Object.} object Plain object - * @returns {pyth_lazer_transaction.ShardFilter.ShardGroups} ShardGroups - */ - ShardGroups.fromObject = function fromObject(object) { - if (object instanceof $root.pyth_lazer_transaction.ShardFilter.ShardGroups) - return object; - let message = new $root.pyth_lazer_transaction.ShardFilter.ShardGroups(); - if (object.shardGroups) { - if (!Array.isArray(object.shardGroups)) - throw TypeError(".pyth_lazer_transaction.ShardFilter.ShardGroups.shardGroups: array expected"); - message.shardGroups = []; - for (let i = 0; i < object.shardGroups.length; ++i) - message.shardGroups[i] = String(object.shardGroups[i]); - } - return message; - }; - - /** - * Creates a plain object from a ShardGroups message. Also converts values to other types if specified. - * @function toObject - * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups - * @static - * @param {pyth_lazer_transaction.ShardFilter.ShardGroups} message ShardGroups - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ShardGroups.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.shardGroups = []; - if (message.shardGroups && message.shardGroups.length) { - object.shardGroups = []; - for (let j = 0; j < message.shardGroups.length; ++j) - object.shardGroups[j] = message.shardGroups[j]; - } - return object; - }; - - /** - * Converts this ShardGroups to JSON. - * @function toJSON - * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups - * @instance - * @returns {Object.} JSON object - */ - ShardGroups.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ShardGroups - * @function getTypeUrl - * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ShardGroups.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pyth_lazer_transaction.ShardFilter.ShardGroups"; - }; - - return ShardGroups; - })(); - - return ShardFilter; - })(); + // OneOf field names bound to virtual getters and setters + let $oneOfFields; - pyth_lazer_transaction.GovernanceDirective = (function() { - - /** - * Properties of a GovernanceDirective. - * @memberof pyth_lazer_transaction - * @interface IGovernanceDirective - * @property {pyth_lazer_transaction.IShardFilter|null} [shardFilter] GovernanceDirective shardFilter - * @property {pyth_lazer_transaction.ICreateShard|null} [createShard] GovernanceDirective createShard - * @property {pyth_lazer_transaction.IAddGovernanceSource|null} [addGovernanceSource] GovernanceDirective addGovernanceSource - * @property {pyth_lazer_transaction.IUpdateGovernanceSource|null} [updateGovernanceSource] GovernanceDirective updateGovernanceSource - * @property {pyth_lazer_transaction.ISetShardName|null} [setShardName] GovernanceDirective setShardName - * @property {pyth_lazer_transaction.ISetShardGroup|null} [setShardGroup] GovernanceDirective setShardGroup - * @property {pyth_lazer_transaction.IResetLastSequenceNo|null} [resetLastSequenceNo] GovernanceDirective resetLastSequenceNo - * @property {pyth_lazer_transaction.IAddPublisher|null} [addPublisher] GovernanceDirective addPublisher - * @property {pyth_lazer_transaction.IUpdatePublisher|null} [updatePublisher] GovernanceDirective updatePublisher - * @property {pyth_lazer_transaction.IAddFeed|null} [addFeed] GovernanceDirective addFeed - * @property {pyth_lazer_transaction.IUpdateFeed|null} [updateFeed] GovernanceDirective updateFeed - */ - - /** - * Constructs a new GovernanceDirective. - * @memberof pyth_lazer_transaction - * @classdesc Represents a GovernanceDirective. - * @implements IGovernanceDirective - * @constructor - * @param {pyth_lazer_transaction.IGovernanceDirective=} [properties] Properties to set - */ - function GovernanceDirective(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]]; - } + /** + * GovernanceInstruction _minExecutionTimestamp. + * @member {"minExecutionTimestamp"|undefined} _minExecutionTimestamp + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @instance + */ + Object.defineProperty( + GovernanceInstruction.prototype, + "_minExecutionTimestamp", + { + get: $util.oneOfGetter(($oneOfFields = ["minExecutionTimestamp"])), + set: $util.oneOfSetter($oneOfFields), + }, + ); - /** - * GovernanceDirective shardFilter. - * @member {pyth_lazer_transaction.IShardFilter|null|undefined} shardFilter - * @memberof pyth_lazer_transaction.GovernanceDirective - * @instance - */ - GovernanceDirective.prototype.shardFilter = null; - - /** - * GovernanceDirective createShard. - * @member {pyth_lazer_transaction.ICreateShard|null|undefined} createShard - * @memberof pyth_lazer_transaction.GovernanceDirective - * @instance - */ - GovernanceDirective.prototype.createShard = null; - - /** - * GovernanceDirective addGovernanceSource. - * @member {pyth_lazer_transaction.IAddGovernanceSource|null|undefined} addGovernanceSource - * @memberof pyth_lazer_transaction.GovernanceDirective - * @instance - */ - GovernanceDirective.prototype.addGovernanceSource = null; - - /** - * GovernanceDirective updateGovernanceSource. - * @member {pyth_lazer_transaction.IUpdateGovernanceSource|null|undefined} updateGovernanceSource - * @memberof pyth_lazer_transaction.GovernanceDirective - * @instance - */ - GovernanceDirective.prototype.updateGovernanceSource = null; - - /** - * GovernanceDirective setShardName. - * @member {pyth_lazer_transaction.ISetShardName|null|undefined} setShardName - * @memberof pyth_lazer_transaction.GovernanceDirective - * @instance - */ - GovernanceDirective.prototype.setShardName = null; - - /** - * GovernanceDirective setShardGroup. - * @member {pyth_lazer_transaction.ISetShardGroup|null|undefined} setShardGroup - * @memberof pyth_lazer_transaction.GovernanceDirective - * @instance - */ - GovernanceDirective.prototype.setShardGroup = null; - - /** - * GovernanceDirective resetLastSequenceNo. - * @member {pyth_lazer_transaction.IResetLastSequenceNo|null|undefined} resetLastSequenceNo - * @memberof pyth_lazer_transaction.GovernanceDirective - * @instance - */ - GovernanceDirective.prototype.resetLastSequenceNo = null; - - /** - * GovernanceDirective addPublisher. - * @member {pyth_lazer_transaction.IAddPublisher|null|undefined} addPublisher - * @memberof pyth_lazer_transaction.GovernanceDirective - * @instance - */ - GovernanceDirective.prototype.addPublisher = null; - - /** - * GovernanceDirective updatePublisher. - * @member {pyth_lazer_transaction.IUpdatePublisher|null|undefined} updatePublisher - * @memberof pyth_lazer_transaction.GovernanceDirective - * @instance - */ - GovernanceDirective.prototype.updatePublisher = null; - - /** - * GovernanceDirective addFeed. - * @member {pyth_lazer_transaction.IAddFeed|null|undefined} addFeed - * @memberof pyth_lazer_transaction.GovernanceDirective - * @instance - */ - GovernanceDirective.prototype.addFeed = null; - - /** - * GovernanceDirective updateFeed. - * @member {pyth_lazer_transaction.IUpdateFeed|null|undefined} updateFeed - * @memberof pyth_lazer_transaction.GovernanceDirective - * @instance - */ - GovernanceDirective.prototype.updateFeed = null; - - // OneOf field names bound to virtual getters and setters - let $oneOfFields; - - /** - * GovernanceDirective _shardFilter. - * @member {"shardFilter"|undefined} _shardFilter - * @memberof pyth_lazer_transaction.GovernanceDirective - * @instance - */ - Object.defineProperty(GovernanceDirective.prototype, "_shardFilter", { - get: $util.oneOfGetter($oneOfFields = ["shardFilter"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * GovernanceDirective action. - * @member {"createShard"|"addGovernanceSource"|"updateGovernanceSource"|"setShardName"|"setShardGroup"|"resetLastSequenceNo"|"addPublisher"|"updatePublisher"|"addFeed"|"updateFeed"|undefined} action - * @memberof pyth_lazer_transaction.GovernanceDirective - * @instance - */ - Object.defineProperty(GovernanceDirective.prototype, "action", { - get: $util.oneOfGetter($oneOfFields = ["createShard", "addGovernanceSource", "updateGovernanceSource", "setShardName", "setShardGroup", "resetLastSequenceNo", "addPublisher", "updatePublisher", "addFeed", "updateFeed"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new GovernanceDirective instance using the specified properties. - * @function create - * @memberof pyth_lazer_transaction.GovernanceDirective - * @static - * @param {pyth_lazer_transaction.IGovernanceDirective=} [properties] Properties to set - * @returns {pyth_lazer_transaction.GovernanceDirective} GovernanceDirective instance - */ - GovernanceDirective.create = function create(properties) { - return new GovernanceDirective(properties); - }; - - /** - * Encodes the specified GovernanceDirective message. Does not implicitly {@link pyth_lazer_transaction.GovernanceDirective.verify|verify} messages. - * @function encode - * @memberof pyth_lazer_transaction.GovernanceDirective - * @static - * @param {pyth_lazer_transaction.IGovernanceDirective} message GovernanceDirective message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GovernanceDirective.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.shardFilter != null && Object.hasOwnProperty.call(message, "shardFilter")) - $root.pyth_lazer_transaction.ShardFilter.encode(message.shardFilter, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.createShard != null && Object.hasOwnProperty.call(message, "createShard")) - $root.pyth_lazer_transaction.CreateShard.encode(message.createShard, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); - if (message.addGovernanceSource != null && Object.hasOwnProperty.call(message, "addGovernanceSource")) - $root.pyth_lazer_transaction.AddGovernanceSource.encode(message.addGovernanceSource, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); - if (message.updateGovernanceSource != null && Object.hasOwnProperty.call(message, "updateGovernanceSource")) - $root.pyth_lazer_transaction.UpdateGovernanceSource.encode(message.updateGovernanceSource, writer.uint32(/* id 103, wireType 2 =*/826).fork()).ldelim(); - if (message.setShardName != null && Object.hasOwnProperty.call(message, "setShardName")) - $root.pyth_lazer_transaction.SetShardName.encode(message.setShardName, writer.uint32(/* id 104, wireType 2 =*/834).fork()).ldelim(); - if (message.setShardGroup != null && Object.hasOwnProperty.call(message, "setShardGroup")) - $root.pyth_lazer_transaction.SetShardGroup.encode(message.setShardGroup, writer.uint32(/* id 105, wireType 2 =*/842).fork()).ldelim(); - if (message.resetLastSequenceNo != null && Object.hasOwnProperty.call(message, "resetLastSequenceNo")) - $root.pyth_lazer_transaction.ResetLastSequenceNo.encode(message.resetLastSequenceNo, writer.uint32(/* id 106, wireType 2 =*/850).fork()).ldelim(); - if (message.addPublisher != null && Object.hasOwnProperty.call(message, "addPublisher")) - $root.pyth_lazer_transaction.AddPublisher.encode(message.addPublisher, writer.uint32(/* id 107, wireType 2 =*/858).fork()).ldelim(); - if (message.updatePublisher != null && Object.hasOwnProperty.call(message, "updatePublisher")) - $root.pyth_lazer_transaction.UpdatePublisher.encode(message.updatePublisher, writer.uint32(/* id 108, wireType 2 =*/866).fork()).ldelim(); - if (message.addFeed != null && Object.hasOwnProperty.call(message, "addFeed")) - $root.pyth_lazer_transaction.AddFeed.encode(message.addFeed, writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim(); - if (message.updateFeed != null && Object.hasOwnProperty.call(message, "updateFeed")) - $root.pyth_lazer_transaction.UpdateFeed.encode(message.updateFeed, writer.uint32(/* id 110, wireType 2 =*/882).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GovernanceDirective message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceDirective.verify|verify} messages. - * @function encodeDelimited - * @memberof pyth_lazer_transaction.GovernanceDirective - * @static - * @param {pyth_lazer_transaction.IGovernanceDirective} message GovernanceDirective message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GovernanceDirective.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GovernanceDirective message from the specified reader or buffer. - * @function decode - * @memberof pyth_lazer_transaction.GovernanceDirective - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pyth_lazer_transaction.GovernanceDirective} GovernanceDirective - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GovernanceDirective.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.GovernanceDirective(); - while (reader.pos < end) { - let tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.shardFilter = $root.pyth_lazer_transaction.ShardFilter.decode(reader, reader.uint32()); - break; - } - case 101: { - message.createShard = $root.pyth_lazer_transaction.CreateShard.decode(reader, reader.uint32()); - break; - } - case 102: { - message.addGovernanceSource = $root.pyth_lazer_transaction.AddGovernanceSource.decode(reader, reader.uint32()); - break; - } - case 103: { - message.updateGovernanceSource = $root.pyth_lazer_transaction.UpdateGovernanceSource.decode(reader, reader.uint32()); - break; - } - case 104: { - message.setShardName = $root.pyth_lazer_transaction.SetShardName.decode(reader, reader.uint32()); - break; - } - case 105: { - message.setShardGroup = $root.pyth_lazer_transaction.SetShardGroup.decode(reader, reader.uint32()); - break; - } - case 106: { - message.resetLastSequenceNo = $root.pyth_lazer_transaction.ResetLastSequenceNo.decode(reader, reader.uint32()); - break; - } - case 107: { - message.addPublisher = $root.pyth_lazer_transaction.AddPublisher.decode(reader, reader.uint32()); - break; - } - case 108: { - message.updatePublisher = $root.pyth_lazer_transaction.UpdatePublisher.decode(reader, reader.uint32()); - break; - } - case 109: { - message.addFeed = $root.pyth_lazer_transaction.AddFeed.decode(reader, reader.uint32()); - break; - } - case 110: { - message.updateFeed = $root.pyth_lazer_transaction.UpdateFeed.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GovernanceDirective message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pyth_lazer_transaction.GovernanceDirective - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pyth_lazer_transaction.GovernanceDirective} GovernanceDirective - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GovernanceDirective.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GovernanceDirective message. - * @function verify - * @memberof pyth_lazer_transaction.GovernanceDirective - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GovernanceDirective.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - let properties = {}; - if (message.shardFilter != null && message.hasOwnProperty("shardFilter")) { - properties._shardFilter = 1; - { - let error = $root.pyth_lazer_transaction.ShardFilter.verify(message.shardFilter); - if (error) - return "shardFilter." + error; - } - } - if (message.createShard != null && message.hasOwnProperty("createShard")) { - properties.action = 1; - { - let error = $root.pyth_lazer_transaction.CreateShard.verify(message.createShard); - if (error) - return "createShard." + error; - } - } - if (message.addGovernanceSource != null && message.hasOwnProperty("addGovernanceSource")) { - if (properties.action === 1) - return "action: multiple values"; - properties.action = 1; - { - let error = $root.pyth_lazer_transaction.AddGovernanceSource.verify(message.addGovernanceSource); - if (error) - return "addGovernanceSource." + error; - } - } - if (message.updateGovernanceSource != null && message.hasOwnProperty("updateGovernanceSource")) { - if (properties.action === 1) - return "action: multiple values"; - properties.action = 1; - { - let error = $root.pyth_lazer_transaction.UpdateGovernanceSource.verify(message.updateGovernanceSource); - if (error) - return "updateGovernanceSource." + error; - } - } - if (message.setShardName != null && message.hasOwnProperty("setShardName")) { - if (properties.action === 1) - return "action: multiple values"; - properties.action = 1; - { - let error = $root.pyth_lazer_transaction.SetShardName.verify(message.setShardName); - if (error) - return "setShardName." + error; - } - } - if (message.setShardGroup != null && message.hasOwnProperty("setShardGroup")) { - if (properties.action === 1) - return "action: multiple values"; - properties.action = 1; - { - let error = $root.pyth_lazer_transaction.SetShardGroup.verify(message.setShardGroup); - if (error) - return "setShardGroup." + error; - } - } - if (message.resetLastSequenceNo != null && message.hasOwnProperty("resetLastSequenceNo")) { - if (properties.action === 1) - return "action: multiple values"; - properties.action = 1; - { - let error = $root.pyth_lazer_transaction.ResetLastSequenceNo.verify(message.resetLastSequenceNo); - if (error) - return "resetLastSequenceNo." + error; - } - } - if (message.addPublisher != null && message.hasOwnProperty("addPublisher")) { - if (properties.action === 1) - return "action: multiple values"; - properties.action = 1; - { - let error = $root.pyth_lazer_transaction.AddPublisher.verify(message.addPublisher); - if (error) - return "addPublisher." + error; - } - } - if (message.updatePublisher != null && message.hasOwnProperty("updatePublisher")) { - if (properties.action === 1) - return "action: multiple values"; - properties.action = 1; - { - let error = $root.pyth_lazer_transaction.UpdatePublisher.verify(message.updatePublisher); - if (error) - return "updatePublisher." + error; - } - } - if (message.addFeed != null && message.hasOwnProperty("addFeed")) { - if (properties.action === 1) - return "action: multiple values"; - properties.action = 1; - { - let error = $root.pyth_lazer_transaction.AddFeed.verify(message.addFeed); - if (error) - return "addFeed." + error; - } - } - if (message.updateFeed != null && message.hasOwnProperty("updateFeed")) { - if (properties.action === 1) - return "action: multiple values"; - properties.action = 1; - { - let error = $root.pyth_lazer_transaction.UpdateFeed.verify(message.updateFeed); - if (error) - return "updateFeed." + error; - } - } - return null; - }; - - /** - * Creates a GovernanceDirective message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pyth_lazer_transaction.GovernanceDirective - * @static - * @param {Object.} object Plain object - * @returns {pyth_lazer_transaction.GovernanceDirective} GovernanceDirective - */ - GovernanceDirective.fromObject = function fromObject(object) { - if (object instanceof $root.pyth_lazer_transaction.GovernanceDirective) - return object; - let message = new $root.pyth_lazer_transaction.GovernanceDirective(); - if (object.shardFilter != null) { - if (typeof object.shardFilter !== "object") - throw TypeError(".pyth_lazer_transaction.GovernanceDirective.shardFilter: object expected"); - message.shardFilter = $root.pyth_lazer_transaction.ShardFilter.fromObject(object.shardFilter); - } - if (object.createShard != null) { - if (typeof object.createShard !== "object") - throw TypeError(".pyth_lazer_transaction.GovernanceDirective.createShard: object expected"); - message.createShard = $root.pyth_lazer_transaction.CreateShard.fromObject(object.createShard); - } - if (object.addGovernanceSource != null) { - if (typeof object.addGovernanceSource !== "object") - throw TypeError(".pyth_lazer_transaction.GovernanceDirective.addGovernanceSource: object expected"); - message.addGovernanceSource = $root.pyth_lazer_transaction.AddGovernanceSource.fromObject(object.addGovernanceSource); - } - if (object.updateGovernanceSource != null) { - if (typeof object.updateGovernanceSource !== "object") - throw TypeError(".pyth_lazer_transaction.GovernanceDirective.updateGovernanceSource: object expected"); - message.updateGovernanceSource = $root.pyth_lazer_transaction.UpdateGovernanceSource.fromObject(object.updateGovernanceSource); - } - if (object.setShardName != null) { - if (typeof object.setShardName !== "object") - throw TypeError(".pyth_lazer_transaction.GovernanceDirective.setShardName: object expected"); - message.setShardName = $root.pyth_lazer_transaction.SetShardName.fromObject(object.setShardName); - } - if (object.setShardGroup != null) { - if (typeof object.setShardGroup !== "object") - throw TypeError(".pyth_lazer_transaction.GovernanceDirective.setShardGroup: object expected"); - message.setShardGroup = $root.pyth_lazer_transaction.SetShardGroup.fromObject(object.setShardGroup); - } - if (object.resetLastSequenceNo != null) { - if (typeof object.resetLastSequenceNo !== "object") - throw TypeError(".pyth_lazer_transaction.GovernanceDirective.resetLastSequenceNo: object expected"); - message.resetLastSequenceNo = $root.pyth_lazer_transaction.ResetLastSequenceNo.fromObject(object.resetLastSequenceNo); - } - if (object.addPublisher != null) { - if (typeof object.addPublisher !== "object") - throw TypeError(".pyth_lazer_transaction.GovernanceDirective.addPublisher: object expected"); - message.addPublisher = $root.pyth_lazer_transaction.AddPublisher.fromObject(object.addPublisher); - } - if (object.updatePublisher != null) { - if (typeof object.updatePublisher !== "object") - throw TypeError(".pyth_lazer_transaction.GovernanceDirective.updatePublisher: object expected"); - message.updatePublisher = $root.pyth_lazer_transaction.UpdatePublisher.fromObject(object.updatePublisher); - } - if (object.addFeed != null) { - if (typeof object.addFeed !== "object") - throw TypeError(".pyth_lazer_transaction.GovernanceDirective.addFeed: object expected"); - message.addFeed = $root.pyth_lazer_transaction.AddFeed.fromObject(object.addFeed); - } - if (object.updateFeed != null) { - if (typeof object.updateFeed !== "object") - throw TypeError(".pyth_lazer_transaction.GovernanceDirective.updateFeed: object expected"); - message.updateFeed = $root.pyth_lazer_transaction.UpdateFeed.fromObject(object.updateFeed); - } - return message; - }; - - /** - * Creates a plain object from a GovernanceDirective message. Also converts values to other types if specified. - * @function toObject - * @memberof pyth_lazer_transaction.GovernanceDirective - * @static - * @param {pyth_lazer_transaction.GovernanceDirective} message GovernanceDirective - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GovernanceDirective.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (message.shardFilter != null && message.hasOwnProperty("shardFilter")) { - object.shardFilter = $root.pyth_lazer_transaction.ShardFilter.toObject(message.shardFilter, options); - if (options.oneofs) - object._shardFilter = "shardFilter"; - } - if (message.createShard != null && message.hasOwnProperty("createShard")) { - object.createShard = $root.pyth_lazer_transaction.CreateShard.toObject(message.createShard, options); - if (options.oneofs) - object.action = "createShard"; - } - if (message.addGovernanceSource != null && message.hasOwnProperty("addGovernanceSource")) { - object.addGovernanceSource = $root.pyth_lazer_transaction.AddGovernanceSource.toObject(message.addGovernanceSource, options); - if (options.oneofs) - object.action = "addGovernanceSource"; - } - if (message.updateGovernanceSource != null && message.hasOwnProperty("updateGovernanceSource")) { - object.updateGovernanceSource = $root.pyth_lazer_transaction.UpdateGovernanceSource.toObject(message.updateGovernanceSource, options); - if (options.oneofs) - object.action = "updateGovernanceSource"; - } - if (message.setShardName != null && message.hasOwnProperty("setShardName")) { - object.setShardName = $root.pyth_lazer_transaction.SetShardName.toObject(message.setShardName, options); - if (options.oneofs) - object.action = "setShardName"; - } - if (message.setShardGroup != null && message.hasOwnProperty("setShardGroup")) { - object.setShardGroup = $root.pyth_lazer_transaction.SetShardGroup.toObject(message.setShardGroup, options); - if (options.oneofs) - object.action = "setShardGroup"; - } - if (message.resetLastSequenceNo != null && message.hasOwnProperty("resetLastSequenceNo")) { - object.resetLastSequenceNo = $root.pyth_lazer_transaction.ResetLastSequenceNo.toObject(message.resetLastSequenceNo, options); - if (options.oneofs) - object.action = "resetLastSequenceNo"; - } - if (message.addPublisher != null && message.hasOwnProperty("addPublisher")) { - object.addPublisher = $root.pyth_lazer_transaction.AddPublisher.toObject(message.addPublisher, options); - if (options.oneofs) - object.action = "addPublisher"; - } - if (message.updatePublisher != null && message.hasOwnProperty("updatePublisher")) { - object.updatePublisher = $root.pyth_lazer_transaction.UpdatePublisher.toObject(message.updatePublisher, options); - if (options.oneofs) - object.action = "updatePublisher"; - } - if (message.addFeed != null && message.hasOwnProperty("addFeed")) { - object.addFeed = $root.pyth_lazer_transaction.AddFeed.toObject(message.addFeed, options); - if (options.oneofs) - object.action = "addFeed"; - } - if (message.updateFeed != null && message.hasOwnProperty("updateFeed")) { - object.updateFeed = $root.pyth_lazer_transaction.UpdateFeed.toObject(message.updateFeed, options); - if (options.oneofs) - object.action = "updateFeed"; - } - return object; - }; - - /** - * Converts this GovernanceDirective to JSON. - * @function toJSON - * @memberof pyth_lazer_transaction.GovernanceDirective - * @instance - * @returns {Object.} JSON object - */ - GovernanceDirective.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GovernanceDirective - * @function getTypeUrl - * @memberof pyth_lazer_transaction.GovernanceDirective - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GovernanceDirective.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pyth_lazer_transaction.GovernanceDirective"; - }; + /** + * GovernanceInstruction _maxExecutionTimestamp. + * @member {"maxExecutionTimestamp"|undefined} _maxExecutionTimestamp + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @instance + */ + Object.defineProperty( + GovernanceInstruction.prototype, + "_maxExecutionTimestamp", + { + get: $util.oneOfGetter(($oneOfFields = ["maxExecutionTimestamp"])), + set: $util.oneOfSetter($oneOfFields), + }, + ); - return GovernanceDirective; - })(); + /** + * GovernanceInstruction _governanceSequenceNo. + * @member {"governanceSequenceNo"|undefined} _governanceSequenceNo + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @instance + */ + Object.defineProperty( + GovernanceInstruction.prototype, + "_governanceSequenceNo", + { + get: $util.oneOfGetter(($oneOfFields = ["governanceSequenceNo"])), + set: $util.oneOfSetter($oneOfFields), + }, + ); + + /** + * Creates a new GovernanceInstruction instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @static + * @param {pyth_lazer_transaction.IGovernanceInstruction=} [properties] Properties to set + * @returns {pyth_lazer_transaction.GovernanceInstruction} GovernanceInstruction instance + */ + GovernanceInstruction.create = function create(properties) { + return new GovernanceInstruction(properties); + }; + + /** + * Encodes the specified GovernanceInstruction message. Does not implicitly {@link pyth_lazer_transaction.GovernanceInstruction.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @static + * @param {pyth_lazer_transaction.IGovernanceInstruction} message GovernanceInstruction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GovernanceInstruction.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if (message.directives != null && message.directives.length) + for (let i = 0; i < message.directives.length; ++i) + $root.pyth_lazer_transaction.GovernanceDirective.encode( + message.directives[i], + writer.uint32(/* id 2, wireType 2 =*/ 18).fork(), + ).ldelim(); + if ( + message.minExecutionTimestamp != null && + Object.hasOwnProperty.call(message, "minExecutionTimestamp") + ) + $root.google.protobuf.Timestamp.encode( + message.minExecutionTimestamp, + writer.uint32(/* id 3, wireType 2 =*/ 26).fork(), + ).ldelim(); + if ( + message.maxExecutionTimestamp != null && + Object.hasOwnProperty.call(message, "maxExecutionTimestamp") + ) + $root.google.protobuf.Timestamp.encode( + message.maxExecutionTimestamp, + writer.uint32(/* id 4, wireType 2 =*/ 34).fork(), + ).ldelim(); + if ( + message.governanceSequenceNo != null && + Object.hasOwnProperty.call(message, "governanceSequenceNo") + ) + writer + .uint32(/* id 5, wireType 0 =*/ 40) + .uint32(message.governanceSequenceNo); + return writer; + }; + + /** + * Encodes the specified GovernanceInstruction message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceInstruction.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @static + * @param {pyth_lazer_transaction.IGovernanceInstruction} message GovernanceInstruction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GovernanceInstruction.encodeDelimited = function encodeDelimited( + message, + writer, + ) { + return this.encode(message, writer).ldelim(); + }; - pyth_lazer_transaction.Permissions = (function() { - - /** - * Properties of a Permissions. - * @memberof pyth_lazer_transaction - * @interface IPermissions - * @property {boolean|null} [allActions] Permissions allActions - * @property {Array.|null} [shardActions] Permissions shardActions - * @property {boolean|null} [allUpdateGovernanceSourceActions] Permissions allUpdateGovernanceSourceActions - * @property {Array.|null} [updateGovernanceSourceActions] Permissions updateGovernanceSourceActions - * @property {boolean|null} [allUpdatePublisherAction] Permissions allUpdatePublisherAction - * @property {Array.|null} [updatePublisherActions] Permissions updatePublisherActions - * @property {boolean|null} [allUpdateFeedActions] Permissions allUpdateFeedActions - * @property {Array.|null} [updateFeedActions] Permissions updateFeedActions - */ - - /** - * Constructs a new Permissions. - * @memberof pyth_lazer_transaction - * @classdesc Represents a Permissions. - * @implements IPermissions - * @constructor - * @param {pyth_lazer_transaction.IPermissions=} [properties] Properties to set - */ - function Permissions(properties) { - this.shardActions = []; - this.updateGovernanceSourceActions = []; - this.updatePublisherActions = []; - this.updateFeedActions = []; - 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 GovernanceInstruction message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.GovernanceInstruction} GovernanceInstruction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GovernanceInstruction.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pyth_lazer_transaction.GovernanceInstruction(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 2: { + if (!(message.directives && message.directives.length)) + message.directives = []; + message.directives.push( + $root.pyth_lazer_transaction.GovernanceDirective.decode( + reader, + reader.uint32(), + ), + ); + break; + } + case 3: { + message.minExecutionTimestamp = + $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.maxExecutionTimestamp = + $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.governanceSequenceNo = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; } + } + return message; + }; - /** - * Permissions allActions. - * @member {boolean|null|undefined} allActions - * @memberof pyth_lazer_transaction.Permissions - * @instance - */ - Permissions.prototype.allActions = null; - - /** - * Permissions shardActions. - * @member {Array.} shardActions - * @memberof pyth_lazer_transaction.Permissions - * @instance - */ - Permissions.prototype.shardActions = $util.emptyArray; - - /** - * Permissions allUpdateGovernanceSourceActions. - * @member {boolean|null|undefined} allUpdateGovernanceSourceActions - * @memberof pyth_lazer_transaction.Permissions - * @instance - */ - Permissions.prototype.allUpdateGovernanceSourceActions = null; - - /** - * Permissions updateGovernanceSourceActions. - * @member {Array.} updateGovernanceSourceActions - * @memberof pyth_lazer_transaction.Permissions - * @instance - */ - Permissions.prototype.updateGovernanceSourceActions = $util.emptyArray; - - /** - * Permissions allUpdatePublisherAction. - * @member {boolean|null|undefined} allUpdatePublisherAction - * @memberof pyth_lazer_transaction.Permissions - * @instance - */ - Permissions.prototype.allUpdatePublisherAction = null; - - /** - * Permissions updatePublisherActions. - * @member {Array.} updatePublisherActions - * @memberof pyth_lazer_transaction.Permissions - * @instance - */ - Permissions.prototype.updatePublisherActions = $util.emptyArray; - - /** - * Permissions allUpdateFeedActions. - * @member {boolean|null|undefined} allUpdateFeedActions - * @memberof pyth_lazer_transaction.Permissions - * @instance - */ - Permissions.prototype.allUpdateFeedActions = null; - - /** - * Permissions updateFeedActions. - * @member {Array.} updateFeedActions - * @memberof pyth_lazer_transaction.Permissions - * @instance - */ - Permissions.prototype.updateFeedActions = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - let $oneOfFields; - - /** - * Permissions _allActions. - * @member {"allActions"|undefined} _allActions - * @memberof pyth_lazer_transaction.Permissions - * @instance - */ - Object.defineProperty(Permissions.prototype, "_allActions", { - get: $util.oneOfGetter($oneOfFields = ["allActions"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Permissions _allUpdateGovernanceSourceActions. - * @member {"allUpdateGovernanceSourceActions"|undefined} _allUpdateGovernanceSourceActions - * @memberof pyth_lazer_transaction.Permissions - * @instance - */ - Object.defineProperty(Permissions.prototype, "_allUpdateGovernanceSourceActions", { - get: $util.oneOfGetter($oneOfFields = ["allUpdateGovernanceSourceActions"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Permissions _allUpdatePublisherAction. - * @member {"allUpdatePublisherAction"|undefined} _allUpdatePublisherAction - * @memberof pyth_lazer_transaction.Permissions - * @instance - */ - Object.defineProperty(Permissions.prototype, "_allUpdatePublisherAction", { - get: $util.oneOfGetter($oneOfFields = ["allUpdatePublisherAction"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Permissions _allUpdateFeedActions. - * @member {"allUpdateFeedActions"|undefined} _allUpdateFeedActions - * @memberof pyth_lazer_transaction.Permissions - * @instance - */ - Object.defineProperty(Permissions.prototype, "_allUpdateFeedActions", { - get: $util.oneOfGetter($oneOfFields = ["allUpdateFeedActions"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Permissions instance using the specified properties. - * @function create - * @memberof pyth_lazer_transaction.Permissions - * @static - * @param {pyth_lazer_transaction.IPermissions=} [properties] Properties to set - * @returns {pyth_lazer_transaction.Permissions} Permissions instance - */ - Permissions.create = function create(properties) { - return new Permissions(properties); - }; - - /** - * Encodes the specified Permissions message. Does not implicitly {@link pyth_lazer_transaction.Permissions.verify|verify} messages. - * @function encode - * @memberof pyth_lazer_transaction.Permissions - * @static - * @param {pyth_lazer_transaction.IPermissions} message Permissions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Permissions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.allActions != null && Object.hasOwnProperty.call(message, "allActions")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.allActions); - if (message.shardActions != null && message.shardActions.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (let i = 0; i < message.shardActions.length; ++i) - writer.int32(message.shardActions[i]); - writer.ldelim(); - } - if (message.allUpdateGovernanceSourceActions != null && Object.hasOwnProperty.call(message, "allUpdateGovernanceSourceActions")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allUpdateGovernanceSourceActions); - if (message.updateGovernanceSourceActions != null && message.updateGovernanceSourceActions.length) { - writer.uint32(/* id 4, wireType 2 =*/34).fork(); - for (let i = 0; i < message.updateGovernanceSourceActions.length; ++i) - writer.int32(message.updateGovernanceSourceActions[i]); - writer.ldelim(); - } - if (message.allUpdatePublisherAction != null && Object.hasOwnProperty.call(message, "allUpdatePublisherAction")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.allUpdatePublisherAction); - if (message.updatePublisherActions != null && message.updatePublisherActions.length) { - writer.uint32(/* id 6, wireType 2 =*/50).fork(); - for (let i = 0; i < message.updatePublisherActions.length; ++i) - writer.int32(message.updatePublisherActions[i]); - writer.ldelim(); - } - if (message.allUpdateFeedActions != null && Object.hasOwnProperty.call(message, "allUpdateFeedActions")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.allUpdateFeedActions); - if (message.updateFeedActions != null && message.updateFeedActions.length) { - writer.uint32(/* id 8, wireType 2 =*/66).fork(); - for (let i = 0; i < message.updateFeedActions.length; ++i) - writer.int32(message.updateFeedActions[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified Permissions message, length delimited. Does not implicitly {@link pyth_lazer_transaction.Permissions.verify|verify} messages. - * @function encodeDelimited - * @memberof pyth_lazer_transaction.Permissions - * @static - * @param {pyth_lazer_transaction.IPermissions} message Permissions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Permissions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Permissions message from the specified reader or buffer. - * @function decode - * @memberof pyth_lazer_transaction.Permissions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pyth_lazer_transaction.Permissions} Permissions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Permissions.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.Permissions(); - while (reader.pos < end) { - let tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.allActions = reader.bool(); - break; - } - case 2: { - if (!(message.shardActions && message.shardActions.length)) - message.shardActions = []; - if ((tag & 7) === 2) { - let end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.shardActions.push(reader.int32()); - } else - message.shardActions.push(reader.int32()); - break; - } - case 3: { - message.allUpdateGovernanceSourceActions = reader.bool(); - break; - } - case 4: { - if (!(message.updateGovernanceSourceActions && message.updateGovernanceSourceActions.length)) - message.updateGovernanceSourceActions = []; - if ((tag & 7) === 2) { - let end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.updateGovernanceSourceActions.push(reader.int32()); - } else - message.updateGovernanceSourceActions.push(reader.int32()); - break; - } - case 5: { - message.allUpdatePublisherAction = reader.bool(); - break; - } - case 6: { - if (!(message.updatePublisherActions && message.updatePublisherActions.length)) - message.updatePublisherActions = []; - if ((tag & 7) === 2) { - let end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.updatePublisherActions.push(reader.int32()); - } else - message.updatePublisherActions.push(reader.int32()); - break; - } - case 7: { - message.allUpdateFeedActions = reader.bool(); - break; - } - case 8: { - if (!(message.updateFeedActions && message.updateFeedActions.length)) - message.updateFeedActions = []; - if ((tag & 7) === 2) { - let end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.updateFeedActions.push(reader.int32()); - } else - message.updateFeedActions.push(reader.int32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Permissions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pyth_lazer_transaction.Permissions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pyth_lazer_transaction.Permissions} Permissions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Permissions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Permissions message. - * @function verify - * @memberof pyth_lazer_transaction.Permissions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Permissions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - let properties = {}; - if (message.allActions != null && message.hasOwnProperty("allActions")) { - properties._allActions = 1; - if (typeof message.allActions !== "boolean") - return "allActions: boolean expected"; - } - if (message.shardActions != null && message.hasOwnProperty("shardActions")) { - if (!Array.isArray(message.shardActions)) - return "shardActions: array expected"; - for (let i = 0; i < message.shardActions.length; ++i) - switch (message.shardActions[i]) { - default: - return "shardActions: enum value[] expected"; - case 0: - case 101: - case 102: - case 103: - case 104: - case 105: - case 106: - case 107: - case 109: - break; - } - } - if (message.allUpdateGovernanceSourceActions != null && message.hasOwnProperty("allUpdateGovernanceSourceActions")) { - properties._allUpdateGovernanceSourceActions = 1; - if (typeof message.allUpdateGovernanceSourceActions !== "boolean") - return "allUpdateGovernanceSourceActions: boolean expected"; - } - if (message.updateGovernanceSourceActions != null && message.hasOwnProperty("updateGovernanceSourceActions")) { - if (!Array.isArray(message.updateGovernanceSourceActions)) - return "updateGovernanceSourceActions: array expected"; - for (let i = 0; i < message.updateGovernanceSourceActions.length; ++i) - switch (message.updateGovernanceSourceActions[i]) { - default: - return "updateGovernanceSourceActions: enum value[] expected"; - case 0: - case 101: - case 199: - break; - } - } - if (message.allUpdatePublisherAction != null && message.hasOwnProperty("allUpdatePublisherAction")) { - properties._allUpdatePublisherAction = 1; - if (typeof message.allUpdatePublisherAction !== "boolean") - return "allUpdatePublisherAction: boolean expected"; - } - if (message.updatePublisherActions != null && message.hasOwnProperty("updatePublisherActions")) { - if (!Array.isArray(message.updatePublisherActions)) - return "updatePublisherActions: array expected"; - for (let i = 0; i < message.updatePublisherActions.length; ++i) - switch (message.updatePublisherActions[i]) { - default: - return "updatePublisherActions: enum value[] expected"; - case 0: - case 101: - case 102: - case 103: - case 104: - case 105: - case 199: - break; - } - } - if (message.allUpdateFeedActions != null && message.hasOwnProperty("allUpdateFeedActions")) { - properties._allUpdateFeedActions = 1; - if (typeof message.allUpdateFeedActions !== "boolean") - return "allUpdateFeedActions: boolean expected"; - } - if (message.updateFeedActions != null && message.hasOwnProperty("updateFeedActions")) { - if (!Array.isArray(message.updateFeedActions)) - return "updateFeedActions: array expected"; - for (let i = 0; i < message.updateFeedActions.length; ++i) - switch (message.updateFeedActions[i]) { - default: - return "updateFeedActions: enum value[] expected"; - case 0: - case 101: - case 102: - case 103: - case 199: - break; - } - } - return null; - }; - - /** - * Creates a Permissions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pyth_lazer_transaction.Permissions - * @static - * @param {Object.} object Plain object - * @returns {pyth_lazer_transaction.Permissions} Permissions - */ - Permissions.fromObject = function fromObject(object) { - if (object instanceof $root.pyth_lazer_transaction.Permissions) - return object; - let message = new $root.pyth_lazer_transaction.Permissions(); - if (object.allActions != null) - message.allActions = Boolean(object.allActions); - if (object.shardActions) { - if (!Array.isArray(object.shardActions)) - throw TypeError(".pyth_lazer_transaction.Permissions.shardActions: array expected"); - message.shardActions = []; - for (let i = 0; i < object.shardActions.length; ++i) - switch (object.shardActions[i]) { - default: - if (typeof object.shardActions[i] === "number") { - message.shardActions[i] = object.shardActions[i]; - break; - } - case "SHARD_ACTION_UNSPECIFIED": - case 0: - message.shardActions[i] = 0; - break; - case "CREATE_SHARD": - case 101: - message.shardActions[i] = 101; - break; - case "ADD_GOVERNANCE_SOURCE": - case 102: - message.shardActions[i] = 102; - break; - case "UPDATE_GOVERNANCE_SOURCE": - case 103: - message.shardActions[i] = 103; - break; - case "SET_SHARD_NAME": - case 104: - message.shardActions[i] = 104; - break; - case "SET_SHARD_GROUP": - case 105: - message.shardActions[i] = 105; - break; - case "RESET_LAST_SEQUENCE_NO": - case 106: - message.shardActions[i] = 106; - break; - case "ADD_PUBLISHER": - case 107: - message.shardActions[i] = 107; - break; - case "ADD_FEED": - case 109: - message.shardActions[i] = 109; - break; - } - } - if (object.allUpdateGovernanceSourceActions != null) - message.allUpdateGovernanceSourceActions = Boolean(object.allUpdateGovernanceSourceActions); - if (object.updateGovernanceSourceActions) { - if (!Array.isArray(object.updateGovernanceSourceActions)) - throw TypeError(".pyth_lazer_transaction.Permissions.updateGovernanceSourceActions: array expected"); - message.updateGovernanceSourceActions = []; - for (let i = 0; i < object.updateGovernanceSourceActions.length; ++i) - switch (object.updateGovernanceSourceActions[i]) { - default: - if (typeof object.updateGovernanceSourceActions[i] === "number") { - message.updateGovernanceSourceActions[i] = object.updateGovernanceSourceActions[i]; - break; - } - case "UPDATE_GOVERNANCE_SOURCE_ACTION_UNSPECIFIED": - case 0: - message.updateGovernanceSourceActions[i] = 0; - break; - case "SET_GOVERNANCE_SOURCE_PERMISSIONS": - case 101: - message.updateGovernanceSourceActions[i] = 101; - break; - case "REMOVE_GOVERNANCE_SOURCE": - case 199: - message.updateGovernanceSourceActions[i] = 199; - break; - } - } - if (object.allUpdatePublisherAction != null) - message.allUpdatePublisherAction = Boolean(object.allUpdatePublisherAction); - if (object.updatePublisherActions) { - if (!Array.isArray(object.updatePublisherActions)) - throw TypeError(".pyth_lazer_transaction.Permissions.updatePublisherActions: array expected"); - message.updatePublisherActions = []; - for (let i = 0; i < object.updatePublisherActions.length; ++i) - switch (object.updatePublisherActions[i]) { - default: - if (typeof object.updatePublisherActions[i] === "number") { - message.updatePublisherActions[i] = object.updatePublisherActions[i]; - break; - } - case "UPDATE_PUBLISHER_ACTION_UNSPECIFIED": - case 0: - message.updatePublisherActions[i] = 0; - break; - case "SET_PUBLISHER_NAME": - case 101: - message.updatePublisherActions[i] = 101; - break; - case "ADD_PUBLISHER_PUBLIC_KEYS": - case 102: - message.updatePublisherActions[i] = 102; - break; - case "REMOVE_PUBLISHER_PUBLIC_KEYS": - case 103: - message.updatePublisherActions[i] = 103; - break; - case "SET_PUBLISHER_PUBLIC_KEYS": - case 104: - message.updatePublisherActions[i] = 104; - break; - case "SET_PUBLISHER_ACTIVE": - case 105: - message.updatePublisherActions[i] = 105; - break; - case "REMOVE_PUBLISHER": - case 199: - message.updatePublisherActions[i] = 199; - break; - } - } - if (object.allUpdateFeedActions != null) - message.allUpdateFeedActions = Boolean(object.allUpdateFeedActions); - if (object.updateFeedActions) { - if (!Array.isArray(object.updateFeedActions)) - throw TypeError(".pyth_lazer_transaction.Permissions.updateFeedActions: array expected"); - message.updateFeedActions = []; - for (let i = 0; i < object.updateFeedActions.length; ++i) - switch (object.updateFeedActions[i]) { - default: - if (typeof object.updateFeedActions[i] === "number") { - message.updateFeedActions[i] = object.updateFeedActions[i]; - break; - } - case "UPDATE_FEED_ACTION_UNSPECIFIED": - case 0: - message.updateFeedActions[i] = 0; - break; - case "UPDATE_FEED_METADATA": - case 101: - message.updateFeedActions[i] = 101; - break; - case "ACTIVATE_FEED": - case 102: - message.updateFeedActions[i] = 102; - break; - case "DEACTIVATE_FEED": - case 103: - message.updateFeedActions[i] = 103; - break; - case "REMOVE_FEED": - case 199: - message.updateFeedActions[i] = 199; - break; - } - } - return message; - }; - - /** - * Creates a plain object from a Permissions message. Also converts values to other types if specified. - * @function toObject - * @memberof pyth_lazer_transaction.Permissions - * @static - * @param {pyth_lazer_transaction.Permissions} message Permissions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Permissions.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) { - object.shardActions = []; - object.updateGovernanceSourceActions = []; - object.updatePublisherActions = []; - object.updateFeedActions = []; - } - if (message.allActions != null && message.hasOwnProperty("allActions")) { - object.allActions = message.allActions; - if (options.oneofs) - object._allActions = "allActions"; - } - if (message.shardActions && message.shardActions.length) { - object.shardActions = []; - for (let j = 0; j < message.shardActions.length; ++j) - object.shardActions[j] = options.enums === String ? $root.pyth_lazer_transaction.Permissions.ShardAction[message.shardActions[j]] === undefined ? message.shardActions[j] : $root.pyth_lazer_transaction.Permissions.ShardAction[message.shardActions[j]] : message.shardActions[j]; - } - if (message.allUpdateGovernanceSourceActions != null && message.hasOwnProperty("allUpdateGovernanceSourceActions")) { - object.allUpdateGovernanceSourceActions = message.allUpdateGovernanceSourceActions; - if (options.oneofs) - object._allUpdateGovernanceSourceActions = "allUpdateGovernanceSourceActions"; - } - if (message.updateGovernanceSourceActions && message.updateGovernanceSourceActions.length) { - object.updateGovernanceSourceActions = []; - for (let j = 0; j < message.updateGovernanceSourceActions.length; ++j) - object.updateGovernanceSourceActions[j] = options.enums === String ? $root.pyth_lazer_transaction.Permissions.UpdateGovernanceSourceAction[message.updateGovernanceSourceActions[j]] === undefined ? message.updateGovernanceSourceActions[j] : $root.pyth_lazer_transaction.Permissions.UpdateGovernanceSourceAction[message.updateGovernanceSourceActions[j]] : message.updateGovernanceSourceActions[j]; - } - if (message.allUpdatePublisherAction != null && message.hasOwnProperty("allUpdatePublisherAction")) { - object.allUpdatePublisherAction = message.allUpdatePublisherAction; - if (options.oneofs) - object._allUpdatePublisherAction = "allUpdatePublisherAction"; - } - if (message.updatePublisherActions && message.updatePublisherActions.length) { - object.updatePublisherActions = []; - for (let j = 0; j < message.updatePublisherActions.length; ++j) - object.updatePublisherActions[j] = options.enums === String ? $root.pyth_lazer_transaction.Permissions.UpdatePublisherAction[message.updatePublisherActions[j]] === undefined ? message.updatePublisherActions[j] : $root.pyth_lazer_transaction.Permissions.UpdatePublisherAction[message.updatePublisherActions[j]] : message.updatePublisherActions[j]; - } - if (message.allUpdateFeedActions != null && message.hasOwnProperty("allUpdateFeedActions")) { - object.allUpdateFeedActions = message.allUpdateFeedActions; - if (options.oneofs) - object._allUpdateFeedActions = "allUpdateFeedActions"; - } - if (message.updateFeedActions && message.updateFeedActions.length) { - object.updateFeedActions = []; - for (let j = 0; j < message.updateFeedActions.length; ++j) - object.updateFeedActions[j] = options.enums === String ? $root.pyth_lazer_transaction.Permissions.UpdateFeedAction[message.updateFeedActions[j]] === undefined ? message.updateFeedActions[j] : $root.pyth_lazer_transaction.Permissions.UpdateFeedAction[message.updateFeedActions[j]] : message.updateFeedActions[j]; - } - return object; - }; - - /** - * Converts this Permissions to JSON. - * @function toJSON - * @memberof pyth_lazer_transaction.Permissions - * @instance - * @returns {Object.} JSON object - */ - Permissions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Permissions - * @function getTypeUrl - * @memberof pyth_lazer_transaction.Permissions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Permissions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pyth_lazer_transaction.Permissions"; - }; - - /** - * ShardAction enum. - * @name pyth_lazer_transaction.Permissions.ShardAction - * @enum {number} - * @property {number} SHARD_ACTION_UNSPECIFIED=0 SHARD_ACTION_UNSPECIFIED value - * @property {number} CREATE_SHARD=101 CREATE_SHARD value - * @property {number} ADD_GOVERNANCE_SOURCE=102 ADD_GOVERNANCE_SOURCE value - * @property {number} UPDATE_GOVERNANCE_SOURCE=103 UPDATE_GOVERNANCE_SOURCE value - * @property {number} SET_SHARD_NAME=104 SET_SHARD_NAME value - * @property {number} SET_SHARD_GROUP=105 SET_SHARD_GROUP value - * @property {number} RESET_LAST_SEQUENCE_NO=106 RESET_LAST_SEQUENCE_NO value - * @property {number} ADD_PUBLISHER=107 ADD_PUBLISHER value - * @property {number} ADD_FEED=109 ADD_FEED value - */ - Permissions.ShardAction = (function() { - const valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SHARD_ACTION_UNSPECIFIED"] = 0; - values[valuesById[101] = "CREATE_SHARD"] = 101; - values[valuesById[102] = "ADD_GOVERNANCE_SOURCE"] = 102; - values[valuesById[103] = "UPDATE_GOVERNANCE_SOURCE"] = 103; - values[valuesById[104] = "SET_SHARD_NAME"] = 104; - values[valuesById[105] = "SET_SHARD_GROUP"] = 105; - values[valuesById[106] = "RESET_LAST_SEQUENCE_NO"] = 106; - values[valuesById[107] = "ADD_PUBLISHER"] = 107; - values[valuesById[109] = "ADD_FEED"] = 109; - return values; - })(); - - /** - * UpdateGovernanceSourceAction enum. - * @name pyth_lazer_transaction.Permissions.UpdateGovernanceSourceAction - * @enum {number} - * @property {number} UPDATE_GOVERNANCE_SOURCE_ACTION_UNSPECIFIED=0 UPDATE_GOVERNANCE_SOURCE_ACTION_UNSPECIFIED value - * @property {number} SET_GOVERNANCE_SOURCE_PERMISSIONS=101 SET_GOVERNANCE_SOURCE_PERMISSIONS value - * @property {number} REMOVE_GOVERNANCE_SOURCE=199 REMOVE_GOVERNANCE_SOURCE value - */ - Permissions.UpdateGovernanceSourceAction = (function() { - const valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UPDATE_GOVERNANCE_SOURCE_ACTION_UNSPECIFIED"] = 0; - values[valuesById[101] = "SET_GOVERNANCE_SOURCE_PERMISSIONS"] = 101; - values[valuesById[199] = "REMOVE_GOVERNANCE_SOURCE"] = 199; - return values; - })(); - - /** - * UpdatePublisherAction enum. - * @name pyth_lazer_transaction.Permissions.UpdatePublisherAction - * @enum {number} - * @property {number} UPDATE_PUBLISHER_ACTION_UNSPECIFIED=0 UPDATE_PUBLISHER_ACTION_UNSPECIFIED value - * @property {number} SET_PUBLISHER_NAME=101 SET_PUBLISHER_NAME value - * @property {number} ADD_PUBLISHER_PUBLIC_KEYS=102 ADD_PUBLISHER_PUBLIC_KEYS value - * @property {number} REMOVE_PUBLISHER_PUBLIC_KEYS=103 REMOVE_PUBLISHER_PUBLIC_KEYS value - * @property {number} SET_PUBLISHER_PUBLIC_KEYS=104 SET_PUBLISHER_PUBLIC_KEYS value - * @property {number} SET_PUBLISHER_ACTIVE=105 SET_PUBLISHER_ACTIVE value - * @property {number} REMOVE_PUBLISHER=199 REMOVE_PUBLISHER value - */ - Permissions.UpdatePublisherAction = (function() { - const valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UPDATE_PUBLISHER_ACTION_UNSPECIFIED"] = 0; - values[valuesById[101] = "SET_PUBLISHER_NAME"] = 101; - values[valuesById[102] = "ADD_PUBLISHER_PUBLIC_KEYS"] = 102; - values[valuesById[103] = "REMOVE_PUBLISHER_PUBLIC_KEYS"] = 103; - values[valuesById[104] = "SET_PUBLISHER_PUBLIC_KEYS"] = 104; - values[valuesById[105] = "SET_PUBLISHER_ACTIVE"] = 105; - values[valuesById[199] = "REMOVE_PUBLISHER"] = 199; - return values; - })(); - - /** - * UpdateFeedAction enum. - * @name pyth_lazer_transaction.Permissions.UpdateFeedAction - * @enum {number} - * @property {number} UPDATE_FEED_ACTION_UNSPECIFIED=0 UPDATE_FEED_ACTION_UNSPECIFIED value - * @property {number} UPDATE_FEED_METADATA=101 UPDATE_FEED_METADATA value - * @property {number} ACTIVATE_FEED=102 ACTIVATE_FEED value - * @property {number} DEACTIVATE_FEED=103 DEACTIVATE_FEED value - * @property {number} REMOVE_FEED=199 REMOVE_FEED value - */ - Permissions.UpdateFeedAction = (function() { - const valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UPDATE_FEED_ACTION_UNSPECIFIED"] = 0; - values[valuesById[101] = "UPDATE_FEED_METADATA"] = 101; - values[valuesById[102] = "ACTIVATE_FEED"] = 102; - values[valuesById[103] = "DEACTIVATE_FEED"] = 103; - values[valuesById[199] = "REMOVE_FEED"] = 199; - return values; - })(); - - return Permissions; - })(); + /** + * Decodes a GovernanceInstruction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.GovernanceInstruction} GovernanceInstruction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GovernanceInstruction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GovernanceInstruction message. + * @function verify + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GovernanceInstruction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if (message.directives != null && message.hasOwnProperty("directives")) { + if (!Array.isArray(message.directives)) + return "directives: array expected"; + for (let i = 0; i < message.directives.length; ++i) { + let error = $root.pyth_lazer_transaction.GovernanceDirective.verify( + message.directives[i], + ); + if (error) return "directives." + error; + } + } + if ( + message.minExecutionTimestamp != null && + message.hasOwnProperty("minExecutionTimestamp") + ) { + properties._minExecutionTimestamp = 1; + { + let error = $root.google.protobuf.Timestamp.verify( + message.minExecutionTimestamp, + ); + if (error) return "minExecutionTimestamp." + error; + } + } + if ( + message.maxExecutionTimestamp != null && + message.hasOwnProperty("maxExecutionTimestamp") + ) { + properties._maxExecutionTimestamp = 1; + { + let error = $root.google.protobuf.Timestamp.verify( + message.maxExecutionTimestamp, + ); + if (error) return "maxExecutionTimestamp." + error; + } + } + if ( + message.governanceSequenceNo != null && + message.hasOwnProperty("governanceSequenceNo") + ) { + properties._governanceSequenceNo = 1; + if (!$util.isInteger(message.governanceSequenceNo)) + return "governanceSequenceNo: integer expected"; + } + return null; + }; - pyth_lazer_transaction.GovernanceSource = (function() { - - /** - * Properties of a GovernanceSource. - * @memberof pyth_lazer_transaction - * @interface IGovernanceSource - * @property {pyth_lazer_transaction.GovernanceSource.ISingleEd25519|null} [singleEd25519] GovernanceSource singleEd25519 - * @property {pyth_lazer_transaction.GovernanceSource.IWormholeEmitter|null} [wormholeEmitter] GovernanceSource wormholeEmitter - */ - - /** - * Constructs a new GovernanceSource. - * @memberof pyth_lazer_transaction - * @classdesc Represents a GovernanceSource. - * @implements IGovernanceSource - * @constructor - * @param {pyth_lazer_transaction.IGovernanceSource=} [properties] Properties to set - */ - function GovernanceSource(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 GovernanceInstruction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.GovernanceInstruction} GovernanceInstruction + */ + GovernanceInstruction.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.GovernanceInstruction) + return object; + let message = new $root.pyth_lazer_transaction.GovernanceInstruction(); + if (object.directives) { + if (!Array.isArray(object.directives)) + throw TypeError( + ".pyth_lazer_transaction.GovernanceInstruction.directives: array expected", + ); + message.directives = []; + for (let i = 0; i < object.directives.length; ++i) { + if (typeof object.directives[i] !== "object") + throw TypeError( + ".pyth_lazer_transaction.GovernanceInstruction.directives: object expected", + ); + message.directives[i] = + $root.pyth_lazer_transaction.GovernanceDirective.fromObject( + object.directives[i], + ); } + } + if (object.minExecutionTimestamp != null) { + if (typeof object.minExecutionTimestamp !== "object") + throw TypeError( + ".pyth_lazer_transaction.GovernanceInstruction.minExecutionTimestamp: object expected", + ); + message.minExecutionTimestamp = + $root.google.protobuf.Timestamp.fromObject( + object.minExecutionTimestamp, + ); + } + if (object.maxExecutionTimestamp != null) { + if (typeof object.maxExecutionTimestamp !== "object") + throw TypeError( + ".pyth_lazer_transaction.GovernanceInstruction.maxExecutionTimestamp: object expected", + ); + message.maxExecutionTimestamp = + $root.google.protobuf.Timestamp.fromObject( + object.maxExecutionTimestamp, + ); + } + if (object.governanceSequenceNo != null) + message.governanceSequenceNo = object.governanceSequenceNo >>> 0; + return message; + }; - /** - * GovernanceSource singleEd25519. - * @member {pyth_lazer_transaction.GovernanceSource.ISingleEd25519|null|undefined} singleEd25519 - * @memberof pyth_lazer_transaction.GovernanceSource - * @instance - */ - GovernanceSource.prototype.singleEd25519 = null; - - /** - * GovernanceSource wormholeEmitter. - * @member {pyth_lazer_transaction.GovernanceSource.IWormholeEmitter|null|undefined} wormholeEmitter - * @memberof pyth_lazer_transaction.GovernanceSource - * @instance - */ - GovernanceSource.prototype.wormholeEmitter = null; - - // OneOf field names bound to virtual getters and setters - let $oneOfFields; - - /** - * GovernanceSource source. - * @member {"singleEd25519"|"wormholeEmitter"|undefined} source - * @memberof pyth_lazer_transaction.GovernanceSource - * @instance - */ - Object.defineProperty(GovernanceSource.prototype, "source", { - get: $util.oneOfGetter($oneOfFields = ["singleEd25519", "wormholeEmitter"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new GovernanceSource instance using the specified properties. - * @function create - * @memberof pyth_lazer_transaction.GovernanceSource - * @static - * @param {pyth_lazer_transaction.IGovernanceSource=} [properties] Properties to set - * @returns {pyth_lazer_transaction.GovernanceSource} GovernanceSource instance - */ - GovernanceSource.create = function create(properties) { - return new GovernanceSource(properties); - }; - - /** - * Encodes the specified GovernanceSource message. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.verify|verify} messages. - * @function encode - * @memberof pyth_lazer_transaction.GovernanceSource - * @static - * @param {pyth_lazer_transaction.IGovernanceSource} message GovernanceSource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GovernanceSource.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.singleEd25519 != null && Object.hasOwnProperty.call(message, "singleEd25519")) - $root.pyth_lazer_transaction.GovernanceSource.SingleEd25519.encode(message.singleEd25519, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.wormholeEmitter != null && Object.hasOwnProperty.call(message, "wormholeEmitter")) - $root.pyth_lazer_transaction.GovernanceSource.WormholeEmitter.encode(message.wormholeEmitter, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GovernanceSource message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.verify|verify} messages. - * @function encodeDelimited - * @memberof pyth_lazer_transaction.GovernanceSource - * @static - * @param {pyth_lazer_transaction.IGovernanceSource} message GovernanceSource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GovernanceSource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GovernanceSource message from the specified reader or buffer. - * @function decode - * @memberof pyth_lazer_transaction.GovernanceSource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pyth_lazer_transaction.GovernanceSource} GovernanceSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GovernanceSource.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.GovernanceSource(); - while (reader.pos < end) { - let tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.singleEd25519 = $root.pyth_lazer_transaction.GovernanceSource.SingleEd25519.decode(reader, reader.uint32()); - break; - } - case 2: { - message.wormholeEmitter = $root.pyth_lazer_transaction.GovernanceSource.WormholeEmitter.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GovernanceSource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pyth_lazer_transaction.GovernanceSource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pyth_lazer_transaction.GovernanceSource} GovernanceSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GovernanceSource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GovernanceSource message. - * @function verify - * @memberof pyth_lazer_transaction.GovernanceSource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GovernanceSource.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - let properties = {}; - if (message.singleEd25519 != null && message.hasOwnProperty("singleEd25519")) { - properties.source = 1; - { - let error = $root.pyth_lazer_transaction.GovernanceSource.SingleEd25519.verify(message.singleEd25519); - if (error) - return "singleEd25519." + error; - } - } - if (message.wormholeEmitter != null && message.hasOwnProperty("wormholeEmitter")) { - if (properties.source === 1) - return "source: multiple values"; - properties.source = 1; - { - let error = $root.pyth_lazer_transaction.GovernanceSource.WormholeEmitter.verify(message.wormholeEmitter); - if (error) - return "wormholeEmitter." + error; - } - } - return null; - }; - - /** - * Creates a GovernanceSource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pyth_lazer_transaction.GovernanceSource - * @static - * @param {Object.} object Plain object - * @returns {pyth_lazer_transaction.GovernanceSource} GovernanceSource - */ - GovernanceSource.fromObject = function fromObject(object) { - if (object instanceof $root.pyth_lazer_transaction.GovernanceSource) - return object; - let message = new $root.pyth_lazer_transaction.GovernanceSource(); - if (object.singleEd25519 != null) { - if (typeof object.singleEd25519 !== "object") - throw TypeError(".pyth_lazer_transaction.GovernanceSource.singleEd25519: object expected"); - message.singleEd25519 = $root.pyth_lazer_transaction.GovernanceSource.SingleEd25519.fromObject(object.singleEd25519); - } - if (object.wormholeEmitter != null) { - if (typeof object.wormholeEmitter !== "object") - throw TypeError(".pyth_lazer_transaction.GovernanceSource.wormholeEmitter: object expected"); - message.wormholeEmitter = $root.pyth_lazer_transaction.GovernanceSource.WormholeEmitter.fromObject(object.wormholeEmitter); - } - return message; - }; - - /** - * Creates a plain object from a GovernanceSource message. Also converts values to other types if specified. - * @function toObject - * @memberof pyth_lazer_transaction.GovernanceSource - * @static - * @param {pyth_lazer_transaction.GovernanceSource} message GovernanceSource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GovernanceSource.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (message.singleEd25519 != null && message.hasOwnProperty("singleEd25519")) { - object.singleEd25519 = $root.pyth_lazer_transaction.GovernanceSource.SingleEd25519.toObject(message.singleEd25519, options); - if (options.oneofs) - object.source = "singleEd25519"; - } - if (message.wormholeEmitter != null && message.hasOwnProperty("wormholeEmitter")) { - object.wormholeEmitter = $root.pyth_lazer_transaction.GovernanceSource.WormholeEmitter.toObject(message.wormholeEmitter, options); - if (options.oneofs) - object.source = "wormholeEmitter"; - } - return object; - }; - - /** - * Converts this GovernanceSource to JSON. - * @function toJSON - * @memberof pyth_lazer_transaction.GovernanceSource - * @instance - * @returns {Object.} JSON object - */ - GovernanceSource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GovernanceSource - * @function getTypeUrl - * @memberof pyth_lazer_transaction.GovernanceSource - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GovernanceSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pyth_lazer_transaction.GovernanceSource"; - }; - - GovernanceSource.SingleEd25519 = (function() { - - /** - * Properties of a SingleEd25519. - * @memberof pyth_lazer_transaction.GovernanceSource - * @interface ISingleEd25519 - * @property {Uint8Array|null} [publicKey] SingleEd25519 publicKey - */ - - /** - * Constructs a new SingleEd25519. - * @memberof pyth_lazer_transaction.GovernanceSource - * @classdesc Represents a SingleEd25519. - * @implements ISingleEd25519 - * @constructor - * @param {pyth_lazer_transaction.GovernanceSource.ISingleEd25519=} [properties] Properties to set - */ - function SingleEd25519(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 GovernanceInstruction message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @static + * @param {pyth_lazer_transaction.GovernanceInstruction} message GovernanceInstruction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GovernanceInstruction.toObject = function toObject(message, options) { + if (!options) options = {}; + let object = {}; + if (options.arrays || options.defaults) object.directives = []; + if (message.directives && message.directives.length) { + object.directives = []; + for (let j = 0; j < message.directives.length; ++j) + object.directives[j] = + $root.pyth_lazer_transaction.GovernanceDirective.toObject( + message.directives[j], + options, + ); + } + if ( + message.minExecutionTimestamp != null && + message.hasOwnProperty("minExecutionTimestamp") + ) { + object.minExecutionTimestamp = $root.google.protobuf.Timestamp.toObject( + message.minExecutionTimestamp, + options, + ); + if (options.oneofs) + object._minExecutionTimestamp = "minExecutionTimestamp"; + } + if ( + message.maxExecutionTimestamp != null && + message.hasOwnProperty("maxExecutionTimestamp") + ) { + object.maxExecutionTimestamp = $root.google.protobuf.Timestamp.toObject( + message.maxExecutionTimestamp, + options, + ); + if (options.oneofs) + object._maxExecutionTimestamp = "maxExecutionTimestamp"; + } + if ( + message.governanceSequenceNo != null && + message.hasOwnProperty("governanceSequenceNo") + ) { + object.governanceSequenceNo = message.governanceSequenceNo; + if (options.oneofs) + object._governanceSequenceNo = "governanceSequenceNo"; + } + return object; + }; - /** - * SingleEd25519 publicKey. - * @member {Uint8Array|null|undefined} publicKey - * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 - * @instance - */ - SingleEd25519.prototype.publicKey = null; - - // OneOf field names bound to virtual getters and setters - let $oneOfFields; - - /** - * SingleEd25519 _publicKey. - * @member {"publicKey"|undefined} _publicKey - * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 - * @instance - */ - Object.defineProperty(SingleEd25519.prototype, "_publicKey", { - get: $util.oneOfGetter($oneOfFields = ["publicKey"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new SingleEd25519 instance using the specified properties. - * @function create - * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 - * @static - * @param {pyth_lazer_transaction.GovernanceSource.ISingleEd25519=} [properties] Properties to set - * @returns {pyth_lazer_transaction.GovernanceSource.SingleEd25519} SingleEd25519 instance - */ - SingleEd25519.create = function create(properties) { - return new SingleEd25519(properties); - }; - - /** - * Encodes the specified SingleEd25519 message. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.SingleEd25519.verify|verify} messages. - * @function encode - * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 - * @static - * @param {pyth_lazer_transaction.GovernanceSource.ISingleEd25519} message SingleEd25519 message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SingleEd25519.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 SingleEd25519 message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.SingleEd25519.verify|verify} messages. - * @function encodeDelimited - * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 - * @static - * @param {pyth_lazer_transaction.GovernanceSource.ISingleEd25519} message SingleEd25519 message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SingleEd25519.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SingleEd25519 message from the specified reader or buffer. - * @function decode - * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pyth_lazer_transaction.GovernanceSource.SingleEd25519} SingleEd25519 - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SingleEd25519.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.GovernanceSource.SingleEd25519(); - while (reader.pos < end) { - let tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.publicKey = reader.bytes(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SingleEd25519 message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pyth_lazer_transaction.GovernanceSource.SingleEd25519} SingleEd25519 - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SingleEd25519.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SingleEd25519 message. - * @function verify - * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SingleEd25519.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - let properties = {}; - if (message.publicKey != null && message.hasOwnProperty("publicKey")) { - properties._publicKey = 1; - if (!(message.publicKey && typeof message.publicKey.length === "number" || $util.isString(message.publicKey))) - return "publicKey: buffer expected"; - } - return null; - }; - - /** - * Creates a SingleEd25519 message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 - * @static - * @param {Object.} object Plain object - * @returns {pyth_lazer_transaction.GovernanceSource.SingleEd25519} SingleEd25519 - */ - SingleEd25519.fromObject = function fromObject(object) { - if (object instanceof $root.pyth_lazer_transaction.GovernanceSource.SingleEd25519) - return object; - let message = new $root.pyth_lazer_transaction.GovernanceSource.SingleEd25519(); - if (object.publicKey != null) - if (typeof object.publicKey === "string") - $util.base64.decode(object.publicKey, message.publicKey = $util.newBuffer($util.base64.length(object.publicKey)), 0); - else if (object.publicKey.length >= 0) - message.publicKey = object.publicKey; - return message; - }; - - /** - * Creates a plain object from a SingleEd25519 message. Also converts values to other types if specified. - * @function toObject - * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 - * @static - * @param {pyth_lazer_transaction.GovernanceSource.SingleEd25519} message SingleEd25519 - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SingleEd25519.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - 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; - if (options.oneofs) - object._publicKey = "publicKey"; - } - return object; - }; - - /** - * Converts this SingleEd25519 to JSON. - * @function toJSON - * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 - * @instance - * @returns {Object.} JSON object - */ - SingleEd25519.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SingleEd25519 - * @function getTypeUrl - * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SingleEd25519.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pyth_lazer_transaction.GovernanceSource.SingleEd25519"; - }; - - return SingleEd25519; - })(); - - GovernanceSource.WormholeEmitter = (function() { - - /** - * Properties of a WormholeEmitter. - * @memberof pyth_lazer_transaction.GovernanceSource - * @interface IWormholeEmitter - * @property {Uint8Array|null} [address] WormholeEmitter address - * @property {number|null} [chainId] WormholeEmitter chainId - */ - - /** - * Constructs a new WormholeEmitter. - * @memberof pyth_lazer_transaction.GovernanceSource - * @classdesc Represents a WormholeEmitter. - * @implements IWormholeEmitter - * @constructor - * @param {pyth_lazer_transaction.GovernanceSource.IWormholeEmitter=} [properties] Properties to set - */ - function WormholeEmitter(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 GovernanceInstruction to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @instance + * @returns {Object.} JSON object + */ + GovernanceInstruction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * WormholeEmitter address. - * @member {Uint8Array|null|undefined} address - * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter - * @instance - */ - WormholeEmitter.prototype.address = null; - - /** - * WormholeEmitter chainId. - * @member {number|null|undefined} chainId - * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter - * @instance - */ - WormholeEmitter.prototype.chainId = null; - - // OneOf field names bound to virtual getters and setters - let $oneOfFields; - - /** - * WormholeEmitter _address. - * @member {"address"|undefined} _address - * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter - * @instance - */ - Object.defineProperty(WormholeEmitter.prototype, "_address", { - get: $util.oneOfGetter($oneOfFields = ["address"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * WormholeEmitter _chainId. - * @member {"chainId"|undefined} _chainId - * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter - * @instance - */ - Object.defineProperty(WormholeEmitter.prototype, "_chainId", { - get: $util.oneOfGetter($oneOfFields = ["chainId"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new WormholeEmitter instance using the specified properties. - * @function create - * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter - * @static - * @param {pyth_lazer_transaction.GovernanceSource.IWormholeEmitter=} [properties] Properties to set - * @returns {pyth_lazer_transaction.GovernanceSource.WormholeEmitter} WormholeEmitter instance - */ - WormholeEmitter.create = function create(properties) { - return new WormholeEmitter(properties); - }; - - /** - * Encodes the specified WormholeEmitter message. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.WormholeEmitter.verify|verify} messages. - * @function encode - * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter - * @static - * @param {pyth_lazer_transaction.GovernanceSource.IWormholeEmitter} message WormholeEmitter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WormholeEmitter.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.address != null && Object.hasOwnProperty.call(message, "address")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.address); - if (message.chainId != null && Object.hasOwnProperty.call(message, "chainId")) - writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.chainId); - return writer; - }; - - /** - * Encodes the specified WormholeEmitter message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.WormholeEmitter.verify|verify} messages. - * @function encodeDelimited - * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter - * @static - * @param {pyth_lazer_transaction.GovernanceSource.IWormholeEmitter} message WormholeEmitter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WormholeEmitter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WormholeEmitter message from the specified reader or buffer. - * @function decode - * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pyth_lazer_transaction.GovernanceSource.WormholeEmitter} WormholeEmitter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WormholeEmitter.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.GovernanceSource.WormholeEmitter(); - while (reader.pos < end) { - let tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.address = reader.bytes(); - break; - } - case 2: { - message.chainId = reader.uint32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WormholeEmitter message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pyth_lazer_transaction.GovernanceSource.WormholeEmitter} WormholeEmitter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WormholeEmitter.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WormholeEmitter message. - * @function verify - * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WormholeEmitter.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - let properties = {}; - if (message.address != null && message.hasOwnProperty("address")) { - properties._address = 1; - if (!(message.address && typeof message.address.length === "number" || $util.isString(message.address))) - return "address: buffer expected"; - } - if (message.chainId != null && message.hasOwnProperty("chainId")) { - properties._chainId = 1; - if (!$util.isInteger(message.chainId)) - return "chainId: integer expected"; - } - return null; - }; - - /** - * Creates a WormholeEmitter message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter - * @static - * @param {Object.} object Plain object - * @returns {pyth_lazer_transaction.GovernanceSource.WormholeEmitter} WormholeEmitter - */ - WormholeEmitter.fromObject = function fromObject(object) { - if (object instanceof $root.pyth_lazer_transaction.GovernanceSource.WormholeEmitter) - return object; - let message = new $root.pyth_lazer_transaction.GovernanceSource.WormholeEmitter(); - if (object.address != null) - if (typeof object.address === "string") - $util.base64.decode(object.address, message.address = $util.newBuffer($util.base64.length(object.address)), 0); - else if (object.address.length >= 0) - message.address = object.address; - if (object.chainId != null) - message.chainId = object.chainId >>> 0; - return message; - }; - - /** - * Creates a plain object from a WormholeEmitter message. Also converts values to other types if specified. - * @function toObject - * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter - * @static - * @param {pyth_lazer_transaction.GovernanceSource.WormholeEmitter} message WormholeEmitter - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WormholeEmitter.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (message.address != null && message.hasOwnProperty("address")) { - object.address = options.bytes === String ? $util.base64.encode(message.address, 0, message.address.length) : options.bytes === Array ? Array.prototype.slice.call(message.address) : message.address; - if (options.oneofs) - object._address = "address"; - } - if (message.chainId != null && message.hasOwnProperty("chainId")) { - object.chainId = message.chainId; - if (options.oneofs) - object._chainId = "chainId"; - } - return object; - }; - - /** - * Converts this WormholeEmitter to JSON. - * @function toJSON - * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter - * @instance - * @returns {Object.} JSON object - */ - WormholeEmitter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for WormholeEmitter - * @function getTypeUrl - * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - WormholeEmitter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pyth_lazer_transaction.GovernanceSource.WormholeEmitter"; - }; - - return WormholeEmitter; - })(); - - return GovernanceSource; - })(); + /** + * Gets the default type url for GovernanceInstruction + * @function getTypeUrl + * @memberof pyth_lazer_transaction.GovernanceInstruction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GovernanceInstruction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.GovernanceInstruction"; + }; - pyth_lazer_transaction.CreateShard = (function() { - - /** - * Properties of a CreateShard. - * @memberof pyth_lazer_transaction - * @interface ICreateShard - * @property {number|null} [shardId] CreateShard shardId - * @property {string|null} [shardGroup] CreateShard shardGroup - * @property {google.protobuf.IDuration|null} [minRate] CreateShard minRate - */ - - /** - * Constructs a new CreateShard. - * @memberof pyth_lazer_transaction - * @classdesc Represents a CreateShard. - * @implements ICreateShard - * @constructor - * @param {pyth_lazer_transaction.ICreateShard=} [properties] Properties to set - */ - function CreateShard(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 GovernanceInstruction; + })(); - /** - * CreateShard shardId. - * @member {number|null|undefined} shardId - * @memberof pyth_lazer_transaction.CreateShard - * @instance - */ - CreateShard.prototype.shardId = null; - - /** - * CreateShard shardGroup. - * @member {string|null|undefined} shardGroup - * @memberof pyth_lazer_transaction.CreateShard - * @instance - */ - CreateShard.prototype.shardGroup = null; - - /** - * CreateShard minRate. - * @member {google.protobuf.IDuration|null|undefined} minRate - * @memberof pyth_lazer_transaction.CreateShard - * @instance - */ - CreateShard.prototype.minRate = null; - - // OneOf field names bound to virtual getters and setters - let $oneOfFields; - - /** - * CreateShard _shardId. - * @member {"shardId"|undefined} _shardId - * @memberof pyth_lazer_transaction.CreateShard - * @instance - */ - Object.defineProperty(CreateShard.prototype, "_shardId", { - get: $util.oneOfGetter($oneOfFields = ["shardId"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * CreateShard _shardGroup. - * @member {"shardGroup"|undefined} _shardGroup - * @memberof pyth_lazer_transaction.CreateShard - * @instance - */ - Object.defineProperty(CreateShard.prototype, "_shardGroup", { - get: $util.oneOfGetter($oneOfFields = ["shardGroup"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * CreateShard _minRate. - * @member {"minRate"|undefined} _minRate - * @memberof pyth_lazer_transaction.CreateShard - * @instance - */ - Object.defineProperty(CreateShard.prototype, "_minRate", { - get: $util.oneOfGetter($oneOfFields = ["minRate"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new CreateShard instance using the specified properties. - * @function create - * @memberof pyth_lazer_transaction.CreateShard - * @static - * @param {pyth_lazer_transaction.ICreateShard=} [properties] Properties to set - * @returns {pyth_lazer_transaction.CreateShard} CreateShard instance - */ - CreateShard.create = function create(properties) { - return new CreateShard(properties); - }; - - /** - * Encodes the specified CreateShard message. Does not implicitly {@link pyth_lazer_transaction.CreateShard.verify|verify} messages. - * @function encode - * @memberof pyth_lazer_transaction.CreateShard - * @static - * @param {pyth_lazer_transaction.ICreateShard} message CreateShard message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateShard.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.shardId != null && Object.hasOwnProperty.call(message, "shardId")) - writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.shardId); - if (message.shardGroup != null && Object.hasOwnProperty.call(message, "shardGroup")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.shardGroup); - if (message.minRate != null && Object.hasOwnProperty.call(message, "minRate")) - $root.google.protobuf.Duration.encode(message.minRate, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CreateShard message, length delimited. Does not implicitly {@link pyth_lazer_transaction.CreateShard.verify|verify} messages. - * @function encodeDelimited - * @memberof pyth_lazer_transaction.CreateShard - * @static - * @param {pyth_lazer_transaction.ICreateShard} message CreateShard message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateShard.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateShard message from the specified reader or buffer. - * @function decode - * @memberof pyth_lazer_transaction.CreateShard - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pyth_lazer_transaction.CreateShard} CreateShard - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateShard.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.CreateShard(); - while (reader.pos < end) { - let tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.shardId = reader.uint32(); - break; - } - case 2: { - message.shardGroup = reader.string(); - break; - } - case 3: { - message.minRate = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateShard message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pyth_lazer_transaction.CreateShard - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pyth_lazer_transaction.CreateShard} CreateShard - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateShard.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateShard message. - * @function verify - * @memberof pyth_lazer_transaction.CreateShard - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateShard.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - let properties = {}; - if (message.shardId != null && message.hasOwnProperty("shardId")) { - properties._shardId = 1; - if (!$util.isInteger(message.shardId)) - return "shardId: integer expected"; - } - if (message.shardGroup != null && message.hasOwnProperty("shardGroup")) { - properties._shardGroup = 1; - if (!$util.isString(message.shardGroup)) - return "shardGroup: string expected"; - } - if (message.minRate != null && message.hasOwnProperty("minRate")) { - properties._minRate = 1; - { - let error = $root.google.protobuf.Duration.verify(message.minRate); - if (error) - return "minRate." + error; - } - } - return null; - }; - - /** - * Creates a CreateShard message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pyth_lazer_transaction.CreateShard - * @static - * @param {Object.} object Plain object - * @returns {pyth_lazer_transaction.CreateShard} CreateShard - */ - CreateShard.fromObject = function fromObject(object) { - if (object instanceof $root.pyth_lazer_transaction.CreateShard) - return object; - let message = new $root.pyth_lazer_transaction.CreateShard(); - if (object.shardId != null) - message.shardId = object.shardId >>> 0; - if (object.shardGroup != null) - message.shardGroup = String(object.shardGroup); - if (object.minRate != null) { - if (typeof object.minRate !== "object") - throw TypeError(".pyth_lazer_transaction.CreateShard.minRate: object expected"); - message.minRate = $root.google.protobuf.Duration.fromObject(object.minRate); - } - return message; - }; - - /** - * Creates a plain object from a CreateShard message. Also converts values to other types if specified. - * @function toObject - * @memberof pyth_lazer_transaction.CreateShard - * @static - * @param {pyth_lazer_transaction.CreateShard} message CreateShard - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateShard.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (message.shardId != null && message.hasOwnProperty("shardId")) { - object.shardId = message.shardId; - if (options.oneofs) - object._shardId = "shardId"; - } - if (message.shardGroup != null && message.hasOwnProperty("shardGroup")) { - object.shardGroup = message.shardGroup; - if (options.oneofs) - object._shardGroup = "shardGroup"; - } - if (message.minRate != null && message.hasOwnProperty("minRate")) { - object.minRate = $root.google.protobuf.Duration.toObject(message.minRate, options); - if (options.oneofs) - object._minRate = "minRate"; - } - return object; - }; - - /** - * Converts this CreateShard to JSON. - * @function toJSON - * @memberof pyth_lazer_transaction.CreateShard - * @instance - * @returns {Object.} JSON object - */ - CreateShard.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateShard - * @function getTypeUrl - * @memberof pyth_lazer_transaction.CreateShard - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateShard.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pyth_lazer_transaction.CreateShard"; - }; + pyth_lazer_transaction.ShardFilter = (function () { + /** + * Properties of a ShardFilter. + * @memberof pyth_lazer_transaction + * @interface IShardFilter + * @property {google.protobuf.IEmpty|null} [allShards] ShardFilter allShards + * @property {pyth_lazer_transaction.ShardFilter.IShardNames|null} [shardNames] ShardFilter shardNames + * @property {pyth_lazer_transaction.ShardFilter.IShardGroups|null} [shardGroups] ShardFilter shardGroups + */ - return CreateShard; - })(); + /** + * Constructs a new ShardFilter. + * @memberof pyth_lazer_transaction + * @classdesc Represents a ShardFilter. + * @implements IShardFilter + * @constructor + * @param {pyth_lazer_transaction.IShardFilter=} [properties] Properties to set + */ + function ShardFilter(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]]; + } - pyth_lazer_transaction.AddGovernanceSource = (function() { - - /** - * Properties of an AddGovernanceSource. - * @memberof pyth_lazer_transaction - * @interface IAddGovernanceSource - * @property {pyth_lazer_transaction.IGovernanceSource|null} [newSource] AddGovernanceSource newSource - * @property {pyth_lazer_transaction.IPermissions|null} [permissions] AddGovernanceSource permissions - */ - - /** - * Constructs a new AddGovernanceSource. - * @memberof pyth_lazer_transaction - * @classdesc Represents an AddGovernanceSource. - * @implements IAddGovernanceSource - * @constructor - * @param {pyth_lazer_transaction.IAddGovernanceSource=} [properties] Properties to set - */ - function AddGovernanceSource(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]]; - } + /** + * ShardFilter allShards. + * @member {google.protobuf.IEmpty|null|undefined} allShards + * @memberof pyth_lazer_transaction.ShardFilter + * @instance + */ + ShardFilter.prototype.allShards = null; - /** - * AddGovernanceSource newSource. - * @member {pyth_lazer_transaction.IGovernanceSource|null|undefined} newSource - * @memberof pyth_lazer_transaction.AddGovernanceSource - * @instance - */ - AddGovernanceSource.prototype.newSource = null; - - /** - * AddGovernanceSource permissions. - * @member {pyth_lazer_transaction.IPermissions|null|undefined} permissions - * @memberof pyth_lazer_transaction.AddGovernanceSource - * @instance - */ - AddGovernanceSource.prototype.permissions = null; - - // OneOf field names bound to virtual getters and setters - let $oneOfFields; - - /** - * AddGovernanceSource _newSource. - * @member {"newSource"|undefined} _newSource - * @memberof pyth_lazer_transaction.AddGovernanceSource - * @instance - */ - Object.defineProperty(AddGovernanceSource.prototype, "_newSource", { - get: $util.oneOfGetter($oneOfFields = ["newSource"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AddGovernanceSource _permissions. - * @member {"permissions"|undefined} _permissions - * @memberof pyth_lazer_transaction.AddGovernanceSource - * @instance - */ - Object.defineProperty(AddGovernanceSource.prototype, "_permissions", { - get: $util.oneOfGetter($oneOfFields = ["permissions"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new AddGovernanceSource instance using the specified properties. - * @function create - * @memberof pyth_lazer_transaction.AddGovernanceSource - * @static - * @param {pyth_lazer_transaction.IAddGovernanceSource=} [properties] Properties to set - * @returns {pyth_lazer_transaction.AddGovernanceSource} AddGovernanceSource instance - */ - AddGovernanceSource.create = function create(properties) { - return new AddGovernanceSource(properties); - }; - - /** - * Encodes the specified AddGovernanceSource message. Does not implicitly {@link pyth_lazer_transaction.AddGovernanceSource.verify|verify} messages. - * @function encode - * @memberof pyth_lazer_transaction.AddGovernanceSource - * @static - * @param {pyth_lazer_transaction.IAddGovernanceSource} message AddGovernanceSource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AddGovernanceSource.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.newSource != null && Object.hasOwnProperty.call(message, "newSource")) - $root.pyth_lazer_transaction.GovernanceSource.encode(message.newSource, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.permissions != null && Object.hasOwnProperty.call(message, "permissions")) - $root.pyth_lazer_transaction.Permissions.encode(message.permissions, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified AddGovernanceSource message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddGovernanceSource.verify|verify} messages. - * @function encodeDelimited - * @memberof pyth_lazer_transaction.AddGovernanceSource - * @static - * @param {pyth_lazer_transaction.IAddGovernanceSource} message AddGovernanceSource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AddGovernanceSource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AddGovernanceSource message from the specified reader or buffer. - * @function decode - * @memberof pyth_lazer_transaction.AddGovernanceSource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pyth_lazer_transaction.AddGovernanceSource} AddGovernanceSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AddGovernanceSource.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.AddGovernanceSource(); - while (reader.pos < end) { - let tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.newSource = $root.pyth_lazer_transaction.GovernanceSource.decode(reader, reader.uint32()); - break; - } - case 2: { - message.permissions = $root.pyth_lazer_transaction.Permissions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AddGovernanceSource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pyth_lazer_transaction.AddGovernanceSource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pyth_lazer_transaction.AddGovernanceSource} AddGovernanceSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AddGovernanceSource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AddGovernanceSource message. - * @function verify - * @memberof pyth_lazer_transaction.AddGovernanceSource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AddGovernanceSource.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - let properties = {}; - if (message.newSource != null && message.hasOwnProperty("newSource")) { - properties._newSource = 1; - { - let error = $root.pyth_lazer_transaction.GovernanceSource.verify(message.newSource); - if (error) - return "newSource." + error; - } - } - if (message.permissions != null && message.hasOwnProperty("permissions")) { - properties._permissions = 1; - { - let error = $root.pyth_lazer_transaction.Permissions.verify(message.permissions); - if (error) - return "permissions." + error; - } - } - return null; - }; - - /** - * Creates an AddGovernanceSource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pyth_lazer_transaction.AddGovernanceSource - * @static - * @param {Object.} object Plain object - * @returns {pyth_lazer_transaction.AddGovernanceSource} AddGovernanceSource - */ - AddGovernanceSource.fromObject = function fromObject(object) { - if (object instanceof $root.pyth_lazer_transaction.AddGovernanceSource) - return object; - let message = new $root.pyth_lazer_transaction.AddGovernanceSource(); - if (object.newSource != null) { - if (typeof object.newSource !== "object") - throw TypeError(".pyth_lazer_transaction.AddGovernanceSource.newSource: object expected"); - message.newSource = $root.pyth_lazer_transaction.GovernanceSource.fromObject(object.newSource); - } - if (object.permissions != null) { - if (typeof object.permissions !== "object") - throw TypeError(".pyth_lazer_transaction.AddGovernanceSource.permissions: object expected"); - message.permissions = $root.pyth_lazer_transaction.Permissions.fromObject(object.permissions); - } - return message; - }; - - /** - * Creates a plain object from an AddGovernanceSource message. Also converts values to other types if specified. - * @function toObject - * @memberof pyth_lazer_transaction.AddGovernanceSource - * @static - * @param {pyth_lazer_transaction.AddGovernanceSource} message AddGovernanceSource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AddGovernanceSource.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (message.newSource != null && message.hasOwnProperty("newSource")) { - object.newSource = $root.pyth_lazer_transaction.GovernanceSource.toObject(message.newSource, options); - if (options.oneofs) - object._newSource = "newSource"; - } - if (message.permissions != null && message.hasOwnProperty("permissions")) { - object.permissions = $root.pyth_lazer_transaction.Permissions.toObject(message.permissions, options); - if (options.oneofs) - object._permissions = "permissions"; - } - return object; - }; - - /** - * Converts this AddGovernanceSource to JSON. - * @function toJSON - * @memberof pyth_lazer_transaction.AddGovernanceSource - * @instance - * @returns {Object.} JSON object - */ - AddGovernanceSource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AddGovernanceSource - * @function getTypeUrl - * @memberof pyth_lazer_transaction.AddGovernanceSource - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AddGovernanceSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pyth_lazer_transaction.AddGovernanceSource"; - }; + /** + * ShardFilter shardNames. + * @member {pyth_lazer_transaction.ShardFilter.IShardNames|null|undefined} shardNames + * @memberof pyth_lazer_transaction.ShardFilter + * @instance + */ + ShardFilter.prototype.shardNames = null; - return AddGovernanceSource; - })(); + /** + * ShardFilter shardGroups. + * @member {pyth_lazer_transaction.ShardFilter.IShardGroups|null|undefined} shardGroups + * @memberof pyth_lazer_transaction.ShardFilter + * @instance + */ + ShardFilter.prototype.shardGroups = null; - pyth_lazer_transaction.UpdateGovernanceSource = (function() { - - /** - * Properties of an UpdateGovernanceSource. - * @memberof pyth_lazer_transaction - * @interface IUpdateGovernanceSource - * @property {pyth_lazer_transaction.IGovernanceSource|null} [source] UpdateGovernanceSource source - * @property {pyth_lazer_transaction.ISetGovernanceSourcePermissions|null} [setGovernanceSourcePermissions] UpdateGovernanceSource setGovernanceSourcePermissions - * @property {google.protobuf.IEmpty|null} [removeGovernanceSource] UpdateGovernanceSource removeGovernanceSource - */ - - /** - * Constructs a new UpdateGovernanceSource. - * @memberof pyth_lazer_transaction - * @classdesc Represents an UpdateGovernanceSource. - * @implements IUpdateGovernanceSource - * @constructor - * @param {pyth_lazer_transaction.IUpdateGovernanceSource=} [properties] Properties to set - */ - function UpdateGovernanceSource(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]]; - } + // OneOf field names bound to virtual getters and setters + let $oneOfFields; - /** - * UpdateGovernanceSource source. - * @member {pyth_lazer_transaction.IGovernanceSource|null|undefined} source - * @memberof pyth_lazer_transaction.UpdateGovernanceSource - * @instance - */ - UpdateGovernanceSource.prototype.source = null; - - /** - * UpdateGovernanceSource setGovernanceSourcePermissions. - * @member {pyth_lazer_transaction.ISetGovernanceSourcePermissions|null|undefined} setGovernanceSourcePermissions - * @memberof pyth_lazer_transaction.UpdateGovernanceSource - * @instance - */ - UpdateGovernanceSource.prototype.setGovernanceSourcePermissions = null; - - /** - * UpdateGovernanceSource removeGovernanceSource. - * @member {google.protobuf.IEmpty|null|undefined} removeGovernanceSource - * @memberof pyth_lazer_transaction.UpdateGovernanceSource - * @instance - */ - UpdateGovernanceSource.prototype.removeGovernanceSource = null; - - // OneOf field names bound to virtual getters and setters - let $oneOfFields; - - /** - * UpdateGovernanceSource _source. - * @member {"source"|undefined} _source - * @memberof pyth_lazer_transaction.UpdateGovernanceSource - * @instance - */ - Object.defineProperty(UpdateGovernanceSource.prototype, "_source", { - get: $util.oneOfGetter($oneOfFields = ["source"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * UpdateGovernanceSource action. - * @member {"setGovernanceSourcePermissions"|"removeGovernanceSource"|undefined} action - * @memberof pyth_lazer_transaction.UpdateGovernanceSource - * @instance - */ - Object.defineProperty(UpdateGovernanceSource.prototype, "action", { - get: $util.oneOfGetter($oneOfFields = ["setGovernanceSourcePermissions", "removeGovernanceSource"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new UpdateGovernanceSource instance using the specified properties. - * @function create - * @memberof pyth_lazer_transaction.UpdateGovernanceSource - * @static - * @param {pyth_lazer_transaction.IUpdateGovernanceSource=} [properties] Properties to set - * @returns {pyth_lazer_transaction.UpdateGovernanceSource} UpdateGovernanceSource instance - */ - UpdateGovernanceSource.create = function create(properties) { - return new UpdateGovernanceSource(properties); - }; - - /** - * Encodes the specified UpdateGovernanceSource message. Does not implicitly {@link pyth_lazer_transaction.UpdateGovernanceSource.verify|verify} messages. - * @function encode - * @memberof pyth_lazer_transaction.UpdateGovernanceSource - * @static - * @param {pyth_lazer_transaction.IUpdateGovernanceSource} message UpdateGovernanceSource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateGovernanceSource.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.source != null && Object.hasOwnProperty.call(message, "source")) - $root.pyth_lazer_transaction.GovernanceSource.encode(message.source, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.setGovernanceSourcePermissions != null && Object.hasOwnProperty.call(message, "setGovernanceSourcePermissions")) - $root.pyth_lazer_transaction.SetGovernanceSourcePermissions.encode(message.setGovernanceSourcePermissions, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); - if (message.removeGovernanceSource != null && Object.hasOwnProperty.call(message, "removeGovernanceSource")) - $root.google.protobuf.Empty.encode(message.removeGovernanceSource, writer.uint32(/* id 199, wireType 2 =*/1594).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpdateGovernanceSource message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdateGovernanceSource.verify|verify} messages. - * @function encodeDelimited - * @memberof pyth_lazer_transaction.UpdateGovernanceSource - * @static - * @param {pyth_lazer_transaction.IUpdateGovernanceSource} message UpdateGovernanceSource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateGovernanceSource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateGovernanceSource message from the specified reader or buffer. - * @function decode - * @memberof pyth_lazer_transaction.UpdateGovernanceSource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pyth_lazer_transaction.UpdateGovernanceSource} UpdateGovernanceSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateGovernanceSource.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.UpdateGovernanceSource(); - while (reader.pos < end) { - let tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.source = $root.pyth_lazer_transaction.GovernanceSource.decode(reader, reader.uint32()); - break; - } - case 101: { - message.setGovernanceSourcePermissions = $root.pyth_lazer_transaction.SetGovernanceSourcePermissions.decode(reader, reader.uint32()); - break; - } - case 199: { - message.removeGovernanceSource = $root.google.protobuf.Empty.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateGovernanceSource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pyth_lazer_transaction.UpdateGovernanceSource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pyth_lazer_transaction.UpdateGovernanceSource} UpdateGovernanceSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateGovernanceSource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateGovernanceSource message. - * @function verify - * @memberof pyth_lazer_transaction.UpdateGovernanceSource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateGovernanceSource.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - let properties = {}; - if (message.source != null && message.hasOwnProperty("source")) { - properties._source = 1; - { - let error = $root.pyth_lazer_transaction.GovernanceSource.verify(message.source); - if (error) - return "source." + error; - } - } - if (message.setGovernanceSourcePermissions != null && message.hasOwnProperty("setGovernanceSourcePermissions")) { - properties.action = 1; - { - let error = $root.pyth_lazer_transaction.SetGovernanceSourcePermissions.verify(message.setGovernanceSourcePermissions); - if (error) - return "setGovernanceSourcePermissions." + error; - } - } - if (message.removeGovernanceSource != null && message.hasOwnProperty("removeGovernanceSource")) { - if (properties.action === 1) - return "action: multiple values"; - properties.action = 1; - { - let error = $root.google.protobuf.Empty.verify(message.removeGovernanceSource); - if (error) - return "removeGovernanceSource." + error; - } - } - return null; - }; - - /** - * Creates an UpdateGovernanceSource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pyth_lazer_transaction.UpdateGovernanceSource - * @static - * @param {Object.} object Plain object - * @returns {pyth_lazer_transaction.UpdateGovernanceSource} UpdateGovernanceSource - */ - UpdateGovernanceSource.fromObject = function fromObject(object) { - if (object instanceof $root.pyth_lazer_transaction.UpdateGovernanceSource) - return object; - let message = new $root.pyth_lazer_transaction.UpdateGovernanceSource(); - if (object.source != null) { - if (typeof object.source !== "object") - throw TypeError(".pyth_lazer_transaction.UpdateGovernanceSource.source: object expected"); - message.source = $root.pyth_lazer_transaction.GovernanceSource.fromObject(object.source); - } - if (object.setGovernanceSourcePermissions != null) { - if (typeof object.setGovernanceSourcePermissions !== "object") - throw TypeError(".pyth_lazer_transaction.UpdateGovernanceSource.setGovernanceSourcePermissions: object expected"); - message.setGovernanceSourcePermissions = $root.pyth_lazer_transaction.SetGovernanceSourcePermissions.fromObject(object.setGovernanceSourcePermissions); - } - if (object.removeGovernanceSource != null) { - if (typeof object.removeGovernanceSource !== "object") - throw TypeError(".pyth_lazer_transaction.UpdateGovernanceSource.removeGovernanceSource: object expected"); - message.removeGovernanceSource = $root.google.protobuf.Empty.fromObject(object.removeGovernanceSource); - } - return message; - }; - - /** - * Creates a plain object from an UpdateGovernanceSource message. Also converts values to other types if specified. - * @function toObject - * @memberof pyth_lazer_transaction.UpdateGovernanceSource - * @static - * @param {pyth_lazer_transaction.UpdateGovernanceSource} message UpdateGovernanceSource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateGovernanceSource.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (message.source != null && message.hasOwnProperty("source")) { - object.source = $root.pyth_lazer_transaction.GovernanceSource.toObject(message.source, options); - if (options.oneofs) - object._source = "source"; - } - if (message.setGovernanceSourcePermissions != null && message.hasOwnProperty("setGovernanceSourcePermissions")) { - object.setGovernanceSourcePermissions = $root.pyth_lazer_transaction.SetGovernanceSourcePermissions.toObject(message.setGovernanceSourcePermissions, options); - if (options.oneofs) - object.action = "setGovernanceSourcePermissions"; - } - if (message.removeGovernanceSource != null && message.hasOwnProperty("removeGovernanceSource")) { - object.removeGovernanceSource = $root.google.protobuf.Empty.toObject(message.removeGovernanceSource, options); - if (options.oneofs) - object.action = "removeGovernanceSource"; - } - return object; - }; - - /** - * Converts this UpdateGovernanceSource to JSON. - * @function toJSON - * @memberof pyth_lazer_transaction.UpdateGovernanceSource - * @instance - * @returns {Object.} JSON object - */ - UpdateGovernanceSource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateGovernanceSource - * @function getTypeUrl - * @memberof pyth_lazer_transaction.UpdateGovernanceSource - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateGovernanceSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pyth_lazer_transaction.UpdateGovernanceSource"; - }; + /** + * ShardFilter filter. + * @member {"allShards"|"shardNames"|"shardGroups"|undefined} filter + * @memberof pyth_lazer_transaction.ShardFilter + * @instance + */ + Object.defineProperty(ShardFilter.prototype, "filter", { + get: $util.oneOfGetter( + ($oneOfFields = ["allShards", "shardNames", "shardGroups"]), + ), + set: $util.oneOfSetter($oneOfFields), + }); - return UpdateGovernanceSource; - })(); + /** + * Creates a new ShardFilter instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.ShardFilter + * @static + * @param {pyth_lazer_transaction.IShardFilter=} [properties] Properties to set + * @returns {pyth_lazer_transaction.ShardFilter} ShardFilter instance + */ + ShardFilter.create = function create(properties) { + return new ShardFilter(properties); + }; - pyth_lazer_transaction.SetGovernanceSourcePermissions = (function() { - - /** - * Properties of a SetGovernanceSourcePermissions. - * @memberof pyth_lazer_transaction - * @interface ISetGovernanceSourcePermissions - * @property {pyth_lazer_transaction.IPermissions|null} [permissions] SetGovernanceSourcePermissions permissions - */ - - /** - * Constructs a new SetGovernanceSourcePermissions. - * @memberof pyth_lazer_transaction - * @classdesc Represents a SetGovernanceSourcePermissions. - * @implements ISetGovernanceSourcePermissions - * @constructor - * @param {pyth_lazer_transaction.ISetGovernanceSourcePermissions=} [properties] Properties to set - */ - function SetGovernanceSourcePermissions(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 ShardFilter message. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.ShardFilter + * @static + * @param {pyth_lazer_transaction.IShardFilter} message ShardFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ShardFilter.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if ( + message.allShards != null && + Object.hasOwnProperty.call(message, "allShards") + ) + $root.google.protobuf.Empty.encode( + message.allShards, + writer.uint32(/* id 1, wireType 2 =*/ 10).fork(), + ).ldelim(); + if ( + message.shardNames != null && + Object.hasOwnProperty.call(message, "shardNames") + ) + $root.pyth_lazer_transaction.ShardFilter.ShardNames.encode( + message.shardNames, + writer.uint32(/* id 2, wireType 2 =*/ 18).fork(), + ).ldelim(); + if ( + message.shardGroups != null && + Object.hasOwnProperty.call(message, "shardGroups") + ) + $root.pyth_lazer_transaction.ShardFilter.ShardGroups.encode( + message.shardGroups, + writer.uint32(/* id 3, wireType 2 =*/ 26).fork(), + ).ldelim(); + return writer; + }; - /** - * SetGovernanceSourcePermissions permissions. - * @member {pyth_lazer_transaction.IPermissions|null|undefined} permissions - * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions - * @instance - */ - SetGovernanceSourcePermissions.prototype.permissions = null; - - // OneOf field names bound to virtual getters and setters - let $oneOfFields; - - /** - * SetGovernanceSourcePermissions _permissions. - * @member {"permissions"|undefined} _permissions - * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions - * @instance - */ - Object.defineProperty(SetGovernanceSourcePermissions.prototype, "_permissions", { - get: $util.oneOfGetter($oneOfFields = ["permissions"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new SetGovernanceSourcePermissions instance using the specified properties. - * @function create - * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions - * @static - * @param {pyth_lazer_transaction.ISetGovernanceSourcePermissions=} [properties] Properties to set - * @returns {pyth_lazer_transaction.SetGovernanceSourcePermissions} SetGovernanceSourcePermissions instance - */ - SetGovernanceSourcePermissions.create = function create(properties) { - return new SetGovernanceSourcePermissions(properties); - }; - - /** - * Encodes the specified SetGovernanceSourcePermissions message. Does not implicitly {@link pyth_lazer_transaction.SetGovernanceSourcePermissions.verify|verify} messages. - * @function encode - * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions - * @static - * @param {pyth_lazer_transaction.ISetGovernanceSourcePermissions} message SetGovernanceSourcePermissions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetGovernanceSourcePermissions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.permissions != null && Object.hasOwnProperty.call(message, "permissions")) - $root.pyth_lazer_transaction.Permissions.encode(message.permissions, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SetGovernanceSourcePermissions message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetGovernanceSourcePermissions.verify|verify} messages. - * @function encodeDelimited - * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions - * @static - * @param {pyth_lazer_transaction.ISetGovernanceSourcePermissions} message SetGovernanceSourcePermissions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetGovernanceSourcePermissions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SetGovernanceSourcePermissions message from the specified reader or buffer. - * @function decode - * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pyth_lazer_transaction.SetGovernanceSourcePermissions} SetGovernanceSourcePermissions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetGovernanceSourcePermissions.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.SetGovernanceSourcePermissions(); - while (reader.pos < end) { - let tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.permissions = $root.pyth_lazer_transaction.Permissions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SetGovernanceSourcePermissions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pyth_lazer_transaction.SetGovernanceSourcePermissions} SetGovernanceSourcePermissions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetGovernanceSourcePermissions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SetGovernanceSourcePermissions message. - * @function verify - * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SetGovernanceSourcePermissions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - let properties = {}; - if (message.permissions != null && message.hasOwnProperty("permissions")) { - properties._permissions = 1; - { - let error = $root.pyth_lazer_transaction.Permissions.verify(message.permissions); - if (error) - return "permissions." + error; - } - } - return null; - }; - - /** - * Creates a SetGovernanceSourcePermissions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions - * @static - * @param {Object.} object Plain object - * @returns {pyth_lazer_transaction.SetGovernanceSourcePermissions} SetGovernanceSourcePermissions - */ - SetGovernanceSourcePermissions.fromObject = function fromObject(object) { - if (object instanceof $root.pyth_lazer_transaction.SetGovernanceSourcePermissions) - return object; - let message = new $root.pyth_lazer_transaction.SetGovernanceSourcePermissions(); - if (object.permissions != null) { - if (typeof object.permissions !== "object") - throw TypeError(".pyth_lazer_transaction.SetGovernanceSourcePermissions.permissions: object expected"); - message.permissions = $root.pyth_lazer_transaction.Permissions.fromObject(object.permissions); - } - return message; - }; - - /** - * Creates a plain object from a SetGovernanceSourcePermissions message. Also converts values to other types if specified. - * @function toObject - * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions - * @static - * @param {pyth_lazer_transaction.SetGovernanceSourcePermissions} message SetGovernanceSourcePermissions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SetGovernanceSourcePermissions.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (message.permissions != null && message.hasOwnProperty("permissions")) { - object.permissions = $root.pyth_lazer_transaction.Permissions.toObject(message.permissions, options); - if (options.oneofs) - object._permissions = "permissions"; - } - return object; - }; - - /** - * Converts this SetGovernanceSourcePermissions to JSON. - * @function toJSON - * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions - * @instance - * @returns {Object.} JSON object - */ - SetGovernanceSourcePermissions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SetGovernanceSourcePermissions - * @function getTypeUrl - * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SetGovernanceSourcePermissions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pyth_lazer_transaction.SetGovernanceSourcePermissions"; - }; + /** + * Encodes the specified ShardFilter message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.ShardFilter + * @static + * @param {pyth_lazer_transaction.IShardFilter} message ShardFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ShardFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - return SetGovernanceSourcePermissions; - })(); + /** + * Decodes a ShardFilter message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.ShardFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.ShardFilter} ShardFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ShardFilter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pyth_lazer_transaction.ShardFilter(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.allShards = $root.google.protobuf.Empty.decode( + reader, + reader.uint32(), + ); + break; + } + case 2: { + message.shardNames = + $root.pyth_lazer_transaction.ShardFilter.ShardNames.decode( + reader, + reader.uint32(), + ); + break; + } + case 3: { + message.shardGroups = + $root.pyth_lazer_transaction.ShardFilter.ShardGroups.decode( + reader, + reader.uint32(), + ); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - pyth_lazer_transaction.SetShardName = (function() { - - /** - * Properties of a SetShardName. - * @memberof pyth_lazer_transaction - * @interface ISetShardName - * @property {string|null} [shardName] SetShardName shardName - */ - - /** - * Constructs a new SetShardName. - * @memberof pyth_lazer_transaction - * @classdesc Represents a SetShardName. - * @implements ISetShardName - * @constructor - * @param {pyth_lazer_transaction.ISetShardName=} [properties] Properties to set - */ - function SetShardName(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 ShardFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.ShardFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.ShardFilter} ShardFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ShardFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ShardFilter message. + * @function verify + * @memberof pyth_lazer_transaction.ShardFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ShardFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if (message.allShards != null && message.hasOwnProperty("allShards")) { + properties.filter = 1; + { + let error = $root.google.protobuf.Empty.verify(message.allShards); + if (error) return "allShards." + error; + } + } + if (message.shardNames != null && message.hasOwnProperty("shardNames")) { + if (properties.filter === 1) return "filter: multiple values"; + properties.filter = 1; + { + let error = + $root.pyth_lazer_transaction.ShardFilter.ShardNames.verify( + message.shardNames, + ); + if (error) return "shardNames." + error; } + } + if ( + message.shardGroups != null && + message.hasOwnProperty("shardGroups") + ) { + if (properties.filter === 1) return "filter: multiple values"; + properties.filter = 1; + { + let error = + $root.pyth_lazer_transaction.ShardFilter.ShardGroups.verify( + message.shardGroups, + ); + if (error) return "shardGroups." + error; + } + } + return null; + }; - /** - * SetShardName shardName. - * @member {string|null|undefined} shardName - * @memberof pyth_lazer_transaction.SetShardName - * @instance - */ - SetShardName.prototype.shardName = null; - - // OneOf field names bound to virtual getters and setters - let $oneOfFields; - - /** - * SetShardName _shardName. - * @member {"shardName"|undefined} _shardName - * @memberof pyth_lazer_transaction.SetShardName - * @instance - */ - Object.defineProperty(SetShardName.prototype, "_shardName", { - get: $util.oneOfGetter($oneOfFields = ["shardName"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new SetShardName instance using the specified properties. - * @function create - * @memberof pyth_lazer_transaction.SetShardName - * @static - * @param {pyth_lazer_transaction.ISetShardName=} [properties] Properties to set - * @returns {pyth_lazer_transaction.SetShardName} SetShardName instance - */ - SetShardName.create = function create(properties) { - return new SetShardName(properties); - }; - - /** - * Encodes the specified SetShardName message. Does not implicitly {@link pyth_lazer_transaction.SetShardName.verify|verify} messages. - * @function encode - * @memberof pyth_lazer_transaction.SetShardName - * @static - * @param {pyth_lazer_transaction.ISetShardName} message SetShardName message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetShardName.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.shardName != null && Object.hasOwnProperty.call(message, "shardName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.shardName); - return writer; - }; - - /** - * Encodes the specified SetShardName message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetShardName.verify|verify} messages. - * @function encodeDelimited - * @memberof pyth_lazer_transaction.SetShardName - * @static - * @param {pyth_lazer_transaction.ISetShardName} message SetShardName message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetShardName.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SetShardName message from the specified reader or buffer. - * @function decode - * @memberof pyth_lazer_transaction.SetShardName - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pyth_lazer_transaction.SetShardName} SetShardName - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetShardName.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.SetShardName(); - while (reader.pos < end) { - let tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.shardName = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SetShardName message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pyth_lazer_transaction.SetShardName - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pyth_lazer_transaction.SetShardName} SetShardName - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetShardName.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SetShardName message. - * @function verify - * @memberof pyth_lazer_transaction.SetShardName - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SetShardName.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - let properties = {}; - if (message.shardName != null && message.hasOwnProperty("shardName")) { - properties._shardName = 1; - if (!$util.isString(message.shardName)) - return "shardName: string expected"; - } - return null; - }; - - /** - * Creates a SetShardName message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pyth_lazer_transaction.SetShardName - * @static - * @param {Object.} object Plain object - * @returns {pyth_lazer_transaction.SetShardName} SetShardName - */ - SetShardName.fromObject = function fromObject(object) { - if (object instanceof $root.pyth_lazer_transaction.SetShardName) - return object; - let message = new $root.pyth_lazer_transaction.SetShardName(); - if (object.shardName != null) - message.shardName = String(object.shardName); - return message; - }; - - /** - * Creates a plain object from a SetShardName message. Also converts values to other types if specified. - * @function toObject - * @memberof pyth_lazer_transaction.SetShardName - * @static - * @param {pyth_lazer_transaction.SetShardName} message SetShardName - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SetShardName.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (message.shardName != null && message.hasOwnProperty("shardName")) { - object.shardName = message.shardName; - if (options.oneofs) - object._shardName = "shardName"; - } - return object; - }; - - /** - * Converts this SetShardName to JSON. - * @function toJSON - * @memberof pyth_lazer_transaction.SetShardName - * @instance - * @returns {Object.} JSON object - */ - SetShardName.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SetShardName - * @function getTypeUrl - * @memberof pyth_lazer_transaction.SetShardName - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SetShardName.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pyth_lazer_transaction.SetShardName"; - }; + /** + * Creates a ShardFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.ShardFilter + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.ShardFilter} ShardFilter + */ + ShardFilter.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.ShardFilter) + return object; + let message = new $root.pyth_lazer_transaction.ShardFilter(); + if (object.allShards != null) { + if (typeof object.allShards !== "object") + throw TypeError( + ".pyth_lazer_transaction.ShardFilter.allShards: object expected", + ); + message.allShards = $root.google.protobuf.Empty.fromObject( + object.allShards, + ); + } + if (object.shardNames != null) { + if (typeof object.shardNames !== "object") + throw TypeError( + ".pyth_lazer_transaction.ShardFilter.shardNames: object expected", + ); + message.shardNames = + $root.pyth_lazer_transaction.ShardFilter.ShardNames.fromObject( + object.shardNames, + ); + } + if (object.shardGroups != null) { + if (typeof object.shardGroups !== "object") + throw TypeError( + ".pyth_lazer_transaction.ShardFilter.shardGroups: object expected", + ); + message.shardGroups = + $root.pyth_lazer_transaction.ShardFilter.ShardGroups.fromObject( + object.shardGroups, + ); + } + return message; + }; - return SetShardName; - })(); + /** + * Creates a plain object from a ShardFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.ShardFilter + * @static + * @param {pyth_lazer_transaction.ShardFilter} message ShardFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ShardFilter.toObject = function toObject(message, options) { + if (!options) options = {}; + let object = {}; + if (message.allShards != null && message.hasOwnProperty("allShards")) { + object.allShards = $root.google.protobuf.Empty.toObject( + message.allShards, + options, + ); + if (options.oneofs) object.filter = "allShards"; + } + if (message.shardNames != null && message.hasOwnProperty("shardNames")) { + object.shardNames = + $root.pyth_lazer_transaction.ShardFilter.ShardNames.toObject( + message.shardNames, + options, + ); + if (options.oneofs) object.filter = "shardNames"; + } + if ( + message.shardGroups != null && + message.hasOwnProperty("shardGroups") + ) { + object.shardGroups = + $root.pyth_lazer_transaction.ShardFilter.ShardGroups.toObject( + message.shardGroups, + options, + ); + if (options.oneofs) object.filter = "shardGroups"; + } + return object; + }; - pyth_lazer_transaction.SetShardGroup = (function() { - - /** - * Properties of a SetShardGroup. - * @memberof pyth_lazer_transaction - * @interface ISetShardGroup - * @property {string|null} [shardGroup] SetShardGroup shardGroup - */ - - /** - * Constructs a new SetShardGroup. - * @memberof pyth_lazer_transaction - * @classdesc Represents a SetShardGroup. - * @implements ISetShardGroup - * @constructor - * @param {pyth_lazer_transaction.ISetShardGroup=} [properties] Properties to set - */ - function SetShardGroup(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 ShardFilter to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.ShardFilter + * @instance + * @returns {Object.} JSON object + */ + ShardFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ShardFilter + * @function getTypeUrl + * @memberof pyth_lazer_transaction.ShardFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ShardFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.ShardFilter"; + }; + + ShardFilter.ShardNames = (function () { + /** + * Properties of a ShardNames. + * @memberof pyth_lazer_transaction.ShardFilter + * @interface IShardNames + * @property {Array.|null} [shardNames] ShardNames shardNames + */ + + /** + * Constructs a new ShardNames. + * @memberof pyth_lazer_transaction.ShardFilter + * @classdesc Represents a ShardNames. + * @implements IShardNames + * @constructor + * @param {pyth_lazer_transaction.ShardFilter.IShardNames=} [properties] Properties to set + */ + function ShardNames(properties) { + this.shardNames = []; + 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]]; + } + + /** + * ShardNames shardNames. + * @member {Array.} shardNames + * @memberof pyth_lazer_transaction.ShardFilter.ShardNames + * @instance + */ + ShardNames.prototype.shardNames = $util.emptyArray; + + /** + * Creates a new ShardNames instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.ShardFilter.ShardNames + * @static + * @param {pyth_lazer_transaction.ShardFilter.IShardNames=} [properties] Properties to set + * @returns {pyth_lazer_transaction.ShardFilter.ShardNames} ShardNames instance + */ + ShardNames.create = function create(properties) { + return new ShardNames(properties); + }; + + /** + * Encodes the specified ShardNames message. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardNames.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.ShardFilter.ShardNames + * @static + * @param {pyth_lazer_transaction.ShardFilter.IShardNames} message ShardNames message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ShardNames.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if (message.shardNames != null && message.shardNames.length) + for (let i = 0; i < message.shardNames.length; ++i) + writer + .uint32(/* id 1, wireType 2 =*/ 10) + .string(message.shardNames[i]); + return writer; + }; + + /** + * Encodes the specified ShardNames message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardNames.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.ShardFilter.ShardNames + * @static + * @param {pyth_lazer_transaction.ShardFilter.IShardNames} message ShardNames message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ShardNames.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ShardNames message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.ShardFilter.ShardNames + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.ShardFilter.ShardNames} ShardNames + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ShardNames.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pyth_lazer_transaction.ShardFilter.ShardNames(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + if (!(message.shardNames && message.shardNames.length)) + message.shardNames = []; + message.shardNames.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ShardNames message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.ShardFilter.ShardNames + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.ShardFilter.ShardNames} ShardNames + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ShardNames.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ShardNames message. + * @function verify + * @memberof pyth_lazer_transaction.ShardFilter.ShardNames + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ShardNames.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if ( + message.shardNames != null && + message.hasOwnProperty("shardNames") + ) { + if (!Array.isArray(message.shardNames)) + return "shardNames: array expected"; + for (let i = 0; i < message.shardNames.length; ++i) + if (!$util.isString(message.shardNames[i])) + return "shardNames: string[] expected"; + } + return null; + }; + + /** + * Creates a ShardNames message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.ShardFilter.ShardNames + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.ShardFilter.ShardNames} ShardNames + */ + ShardNames.fromObject = function fromObject(object) { + if ( + object instanceof $root.pyth_lazer_transaction.ShardFilter.ShardNames + ) + return object; + let message = new $root.pyth_lazer_transaction.ShardFilter.ShardNames(); + if (object.shardNames) { + if (!Array.isArray(object.shardNames)) + throw TypeError( + ".pyth_lazer_transaction.ShardFilter.ShardNames.shardNames: array expected", + ); + message.shardNames = []; + for (let i = 0; i < object.shardNames.length; ++i) + message.shardNames[i] = String(object.shardNames[i]); + } + return message; + }; + + /** + * Creates a plain object from a ShardNames message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.ShardFilter.ShardNames + * @static + * @param {pyth_lazer_transaction.ShardFilter.ShardNames} message ShardNames + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ShardNames.toObject = function toObject(message, options) { + if (!options) options = {}; + let object = {}; + if (options.arrays || options.defaults) object.shardNames = []; + if (message.shardNames && message.shardNames.length) { + object.shardNames = []; + for (let j = 0; j < message.shardNames.length; ++j) + object.shardNames[j] = message.shardNames[j]; } + return object; + }; + + /** + * Converts this ShardNames to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.ShardFilter.ShardNames + * @instance + * @returns {Object.} JSON object + */ + ShardNames.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ShardNames + * @function getTypeUrl + * @memberof pyth_lazer_transaction.ShardFilter.ShardNames + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ShardNames.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.ShardFilter.ShardNames"; + }; - /** - * SetShardGroup shardGroup. - * @member {string|null|undefined} shardGroup - * @memberof pyth_lazer_transaction.SetShardGroup - * @instance - */ - SetShardGroup.prototype.shardGroup = null; - - // OneOf field names bound to virtual getters and setters - let $oneOfFields; - - /** - * SetShardGroup _shardGroup. - * @member {"shardGroup"|undefined} _shardGroup - * @memberof pyth_lazer_transaction.SetShardGroup - * @instance - */ - Object.defineProperty(SetShardGroup.prototype, "_shardGroup", { - get: $util.oneOfGetter($oneOfFields = ["shardGroup"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new SetShardGroup instance using the specified properties. - * @function create - * @memberof pyth_lazer_transaction.SetShardGroup - * @static - * @param {pyth_lazer_transaction.ISetShardGroup=} [properties] Properties to set - * @returns {pyth_lazer_transaction.SetShardGroup} SetShardGroup instance - */ - SetShardGroup.create = function create(properties) { - return new SetShardGroup(properties); - }; - - /** - * Encodes the specified SetShardGroup message. Does not implicitly {@link pyth_lazer_transaction.SetShardGroup.verify|verify} messages. - * @function encode - * @memberof pyth_lazer_transaction.SetShardGroup - * @static - * @param {pyth_lazer_transaction.ISetShardGroup} message SetShardGroup message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetShardGroup.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.shardGroup != null && Object.hasOwnProperty.call(message, "shardGroup")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.shardGroup); - return writer; - }; - - /** - * Encodes the specified SetShardGroup message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetShardGroup.verify|verify} messages. - * @function encodeDelimited - * @memberof pyth_lazer_transaction.SetShardGroup - * @static - * @param {pyth_lazer_transaction.ISetShardGroup} message SetShardGroup message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetShardGroup.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SetShardGroup message from the specified reader or buffer. - * @function decode - * @memberof pyth_lazer_transaction.SetShardGroup - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pyth_lazer_transaction.SetShardGroup} SetShardGroup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetShardGroup.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.SetShardGroup(); - while (reader.pos < end) { - let tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.shardGroup = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SetShardGroup message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pyth_lazer_transaction.SetShardGroup - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pyth_lazer_transaction.SetShardGroup} SetShardGroup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetShardGroup.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SetShardGroup message. - * @function verify - * @memberof pyth_lazer_transaction.SetShardGroup - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SetShardGroup.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - let properties = {}; - if (message.shardGroup != null && message.hasOwnProperty("shardGroup")) { - properties._shardGroup = 1; - if (!$util.isString(message.shardGroup)) - return "shardGroup: string expected"; - } - return null; - }; - - /** - * Creates a SetShardGroup message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pyth_lazer_transaction.SetShardGroup - * @static - * @param {Object.} object Plain object - * @returns {pyth_lazer_transaction.SetShardGroup} SetShardGroup - */ - SetShardGroup.fromObject = function fromObject(object) { - if (object instanceof $root.pyth_lazer_transaction.SetShardGroup) - return object; - let message = new $root.pyth_lazer_transaction.SetShardGroup(); - if (object.shardGroup != null) - message.shardGroup = String(object.shardGroup); - return message; - }; - - /** - * Creates a plain object from a SetShardGroup message. Also converts values to other types if specified. - * @function toObject - * @memberof pyth_lazer_transaction.SetShardGroup - * @static - * @param {pyth_lazer_transaction.SetShardGroup} message SetShardGroup - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SetShardGroup.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (message.shardGroup != null && message.hasOwnProperty("shardGroup")) { - object.shardGroup = message.shardGroup; - if (options.oneofs) - object._shardGroup = "shardGroup"; - } - return object; - }; - - /** - * Converts this SetShardGroup to JSON. - * @function toJSON - * @memberof pyth_lazer_transaction.SetShardGroup - * @instance - * @returns {Object.} JSON object - */ - SetShardGroup.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SetShardGroup - * @function getTypeUrl - * @memberof pyth_lazer_transaction.SetShardGroup - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SetShardGroup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pyth_lazer_transaction.SetShardGroup"; - }; + return ShardNames; + })(); + + ShardFilter.ShardGroups = (function () { + /** + * Properties of a ShardGroups. + * @memberof pyth_lazer_transaction.ShardFilter + * @interface IShardGroups + * @property {Array.|null} [shardGroups] ShardGroups shardGroups + */ + + /** + * Constructs a new ShardGroups. + * @memberof pyth_lazer_transaction.ShardFilter + * @classdesc Represents a ShardGroups. + * @implements IShardGroups + * @constructor + * @param {pyth_lazer_transaction.ShardFilter.IShardGroups=} [properties] Properties to set + */ + function ShardGroups(properties) { + this.shardGroups = []; + 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]]; + } + + /** + * ShardGroups shardGroups. + * @member {Array.} shardGroups + * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups + * @instance + */ + ShardGroups.prototype.shardGroups = $util.emptyArray; + + /** + * Creates a new ShardGroups instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups + * @static + * @param {pyth_lazer_transaction.ShardFilter.IShardGroups=} [properties] Properties to set + * @returns {pyth_lazer_transaction.ShardFilter.ShardGroups} ShardGroups instance + */ + ShardGroups.create = function create(properties) { + return new ShardGroups(properties); + }; + + /** + * Encodes the specified ShardGroups message. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardGroups.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups + * @static + * @param {pyth_lazer_transaction.ShardFilter.IShardGroups} message ShardGroups message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ShardGroups.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if (message.shardGroups != null && message.shardGroups.length) + for (let i = 0; i < message.shardGroups.length; ++i) + writer + .uint32(/* id 1, wireType 2 =*/ 10) + .string(message.shardGroups[i]); + return writer; + }; + + /** + * Encodes the specified ShardGroups message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardGroups.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups + * @static + * @param {pyth_lazer_transaction.ShardFilter.IShardGroups} message ShardGroups message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ShardGroups.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ShardGroups message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.ShardFilter.ShardGroups} ShardGroups + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ShardGroups.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pyth_lazer_transaction.ShardFilter.ShardGroups(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + if (!(message.shardGroups && message.shardGroups.length)) + message.shardGroups = []; + message.shardGroups.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ShardGroups message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.ShardFilter.ShardGroups} ShardGroups + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ShardGroups.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ShardGroups message. + * @function verify + * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ShardGroups.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if ( + message.shardGroups != null && + message.hasOwnProperty("shardGroups") + ) { + if (!Array.isArray(message.shardGroups)) + return "shardGroups: array expected"; + for (let i = 0; i < message.shardGroups.length; ++i) + if (!$util.isString(message.shardGroups[i])) + return "shardGroups: string[] expected"; + } + return null; + }; + + /** + * Creates a ShardGroups message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.ShardFilter.ShardGroups} ShardGroups + */ + ShardGroups.fromObject = function fromObject(object) { + if ( + object instanceof $root.pyth_lazer_transaction.ShardFilter.ShardGroups + ) + return object; + let message = + new $root.pyth_lazer_transaction.ShardFilter.ShardGroups(); + if (object.shardGroups) { + if (!Array.isArray(object.shardGroups)) + throw TypeError( + ".pyth_lazer_transaction.ShardFilter.ShardGroups.shardGroups: array expected", + ); + message.shardGroups = []; + for (let i = 0; i < object.shardGroups.length; ++i) + message.shardGroups[i] = String(object.shardGroups[i]); + } + return message; + }; + + /** + * Creates a plain object from a ShardGroups message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups + * @static + * @param {pyth_lazer_transaction.ShardFilter.ShardGroups} message ShardGroups + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ShardGroups.toObject = function toObject(message, options) { + if (!options) options = {}; + let object = {}; + if (options.arrays || options.defaults) object.shardGroups = []; + if (message.shardGroups && message.shardGroups.length) { + object.shardGroups = []; + for (let j = 0; j < message.shardGroups.length; ++j) + object.shardGroups[j] = message.shardGroups[j]; + } + return object; + }; + + /** + * Converts this ShardGroups to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups + * @instance + * @returns {Object.} JSON object + */ + ShardGroups.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ShardGroups + * @function getTypeUrl + * @memberof pyth_lazer_transaction.ShardFilter.ShardGroups + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ShardGroups.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return ( + typeUrlPrefix + "/pyth_lazer_transaction.ShardFilter.ShardGroups" + ); + }; - return SetShardGroup; + return ShardGroups; })(); - pyth_lazer_transaction.ResetLastSequenceNo = (function() { - - /** - * Properties of a ResetLastSequenceNo. - * @memberof pyth_lazer_transaction - * @interface IResetLastSequenceNo - * @property {number|Long|null} [lastSequenceNo] ResetLastSequenceNo lastSequenceNo - */ - - /** - * Constructs a new ResetLastSequenceNo. - * @memberof pyth_lazer_transaction - * @classdesc Represents a ResetLastSequenceNo. - * @implements IResetLastSequenceNo - * @constructor - * @param {pyth_lazer_transaction.IResetLastSequenceNo=} [properties] Properties to set - */ - function ResetLastSequenceNo(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 ShardFilter; + })(); + + pyth_lazer_transaction.GovernanceDirective = (function () { + /** + * Properties of a GovernanceDirective. + * @memberof pyth_lazer_transaction + * @interface IGovernanceDirective + * @property {pyth_lazer_transaction.IShardFilter|null} [shardFilter] GovernanceDirective shardFilter + * @property {pyth_lazer_transaction.ICreateShard|null} [createShard] GovernanceDirective createShard + * @property {pyth_lazer_transaction.IAddGovernanceSource|null} [addGovernanceSource] GovernanceDirective addGovernanceSource + * @property {pyth_lazer_transaction.IUpdateGovernanceSource|null} [updateGovernanceSource] GovernanceDirective updateGovernanceSource + * @property {pyth_lazer_transaction.ISetShardName|null} [setShardName] GovernanceDirective setShardName + * @property {pyth_lazer_transaction.ISetShardGroup|null} [setShardGroup] GovernanceDirective setShardGroup + * @property {pyth_lazer_transaction.IResetLastSequenceNo|null} [resetLastSequenceNo] GovernanceDirective resetLastSequenceNo + * @property {pyth_lazer_transaction.IAddPublisher|null} [addPublisher] GovernanceDirective addPublisher + * @property {pyth_lazer_transaction.IUpdatePublisher|null} [updatePublisher] GovernanceDirective updatePublisher + * @property {pyth_lazer_transaction.IAddFeed|null} [addFeed] GovernanceDirective addFeed + * @property {pyth_lazer_transaction.IUpdateFeed|null} [updateFeed] GovernanceDirective updateFeed + */ + + /** + * Constructs a new GovernanceDirective. + * @memberof pyth_lazer_transaction + * @classdesc Represents a GovernanceDirective. + * @implements IGovernanceDirective + * @constructor + * @param {pyth_lazer_transaction.IGovernanceDirective=} [properties] Properties to set + */ + function GovernanceDirective(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]]; + } + + /** + * GovernanceDirective shardFilter. + * @member {pyth_lazer_transaction.IShardFilter|null|undefined} shardFilter + * @memberof pyth_lazer_transaction.GovernanceDirective + * @instance + */ + GovernanceDirective.prototype.shardFilter = null; + + /** + * GovernanceDirective createShard. + * @member {pyth_lazer_transaction.ICreateShard|null|undefined} createShard + * @memberof pyth_lazer_transaction.GovernanceDirective + * @instance + */ + GovernanceDirective.prototype.createShard = null; + + /** + * GovernanceDirective addGovernanceSource. + * @member {pyth_lazer_transaction.IAddGovernanceSource|null|undefined} addGovernanceSource + * @memberof pyth_lazer_transaction.GovernanceDirective + * @instance + */ + GovernanceDirective.prototype.addGovernanceSource = null; + + /** + * GovernanceDirective updateGovernanceSource. + * @member {pyth_lazer_transaction.IUpdateGovernanceSource|null|undefined} updateGovernanceSource + * @memberof pyth_lazer_transaction.GovernanceDirective + * @instance + */ + GovernanceDirective.prototype.updateGovernanceSource = null; + + /** + * GovernanceDirective setShardName. + * @member {pyth_lazer_transaction.ISetShardName|null|undefined} setShardName + * @memberof pyth_lazer_transaction.GovernanceDirective + * @instance + */ + GovernanceDirective.prototype.setShardName = null; + + /** + * GovernanceDirective setShardGroup. + * @member {pyth_lazer_transaction.ISetShardGroup|null|undefined} setShardGroup + * @memberof pyth_lazer_transaction.GovernanceDirective + * @instance + */ + GovernanceDirective.prototype.setShardGroup = null; + + /** + * GovernanceDirective resetLastSequenceNo. + * @member {pyth_lazer_transaction.IResetLastSequenceNo|null|undefined} resetLastSequenceNo + * @memberof pyth_lazer_transaction.GovernanceDirective + * @instance + */ + GovernanceDirective.prototype.resetLastSequenceNo = null; + + /** + * GovernanceDirective addPublisher. + * @member {pyth_lazer_transaction.IAddPublisher|null|undefined} addPublisher + * @memberof pyth_lazer_transaction.GovernanceDirective + * @instance + */ + GovernanceDirective.prototype.addPublisher = null; + + /** + * GovernanceDirective updatePublisher. + * @member {pyth_lazer_transaction.IUpdatePublisher|null|undefined} updatePublisher + * @memberof pyth_lazer_transaction.GovernanceDirective + * @instance + */ + GovernanceDirective.prototype.updatePublisher = null; + + /** + * GovernanceDirective addFeed. + * @member {pyth_lazer_transaction.IAddFeed|null|undefined} addFeed + * @memberof pyth_lazer_transaction.GovernanceDirective + * @instance + */ + GovernanceDirective.prototype.addFeed = null; + + /** + * GovernanceDirective updateFeed. + * @member {pyth_lazer_transaction.IUpdateFeed|null|undefined} updateFeed + * @memberof pyth_lazer_transaction.GovernanceDirective + * @instance + */ + GovernanceDirective.prototype.updateFeed = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * GovernanceDirective _shardFilter. + * @member {"shardFilter"|undefined} _shardFilter + * @memberof pyth_lazer_transaction.GovernanceDirective + * @instance + */ + Object.defineProperty(GovernanceDirective.prototype, "_shardFilter", { + get: $util.oneOfGetter(($oneOfFields = ["shardFilter"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * GovernanceDirective action. + * @member {"createShard"|"addGovernanceSource"|"updateGovernanceSource"|"setShardName"|"setShardGroup"|"resetLastSequenceNo"|"addPublisher"|"updatePublisher"|"addFeed"|"updateFeed"|undefined} action + * @memberof pyth_lazer_transaction.GovernanceDirective + * @instance + */ + Object.defineProperty(GovernanceDirective.prototype, "action", { + get: $util.oneOfGetter( + ($oneOfFields = [ + "createShard", + "addGovernanceSource", + "updateGovernanceSource", + "setShardName", + "setShardGroup", + "resetLastSequenceNo", + "addPublisher", + "updatePublisher", + "addFeed", + "updateFeed", + ]), + ), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Creates a new GovernanceDirective instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.GovernanceDirective + * @static + * @param {pyth_lazer_transaction.IGovernanceDirective=} [properties] Properties to set + * @returns {pyth_lazer_transaction.GovernanceDirective} GovernanceDirective instance + */ + GovernanceDirective.create = function create(properties) { + return new GovernanceDirective(properties); + }; + + /** + * Encodes the specified GovernanceDirective message. Does not implicitly {@link pyth_lazer_transaction.GovernanceDirective.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.GovernanceDirective + * @static + * @param {pyth_lazer_transaction.IGovernanceDirective} message GovernanceDirective message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GovernanceDirective.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if ( + message.shardFilter != null && + Object.hasOwnProperty.call(message, "shardFilter") + ) + $root.pyth_lazer_transaction.ShardFilter.encode( + message.shardFilter, + writer.uint32(/* id 1, wireType 2 =*/ 10).fork(), + ).ldelim(); + if ( + message.createShard != null && + Object.hasOwnProperty.call(message, "createShard") + ) + $root.pyth_lazer_transaction.CreateShard.encode( + message.createShard, + writer.uint32(/* id 101, wireType 2 =*/ 810).fork(), + ).ldelim(); + if ( + message.addGovernanceSource != null && + Object.hasOwnProperty.call(message, "addGovernanceSource") + ) + $root.pyth_lazer_transaction.AddGovernanceSource.encode( + message.addGovernanceSource, + writer.uint32(/* id 102, wireType 2 =*/ 818).fork(), + ).ldelim(); + if ( + message.updateGovernanceSource != null && + Object.hasOwnProperty.call(message, "updateGovernanceSource") + ) + $root.pyth_lazer_transaction.UpdateGovernanceSource.encode( + message.updateGovernanceSource, + writer.uint32(/* id 103, wireType 2 =*/ 826).fork(), + ).ldelim(); + if ( + message.setShardName != null && + Object.hasOwnProperty.call(message, "setShardName") + ) + $root.pyth_lazer_transaction.SetShardName.encode( + message.setShardName, + writer.uint32(/* id 104, wireType 2 =*/ 834).fork(), + ).ldelim(); + if ( + message.setShardGroup != null && + Object.hasOwnProperty.call(message, "setShardGroup") + ) + $root.pyth_lazer_transaction.SetShardGroup.encode( + message.setShardGroup, + writer.uint32(/* id 105, wireType 2 =*/ 842).fork(), + ).ldelim(); + if ( + message.resetLastSequenceNo != null && + Object.hasOwnProperty.call(message, "resetLastSequenceNo") + ) + $root.pyth_lazer_transaction.ResetLastSequenceNo.encode( + message.resetLastSequenceNo, + writer.uint32(/* id 106, wireType 2 =*/ 850).fork(), + ).ldelim(); + if ( + message.addPublisher != null && + Object.hasOwnProperty.call(message, "addPublisher") + ) + $root.pyth_lazer_transaction.AddPublisher.encode( + message.addPublisher, + writer.uint32(/* id 107, wireType 2 =*/ 858).fork(), + ).ldelim(); + if ( + message.updatePublisher != null && + Object.hasOwnProperty.call(message, "updatePublisher") + ) + $root.pyth_lazer_transaction.UpdatePublisher.encode( + message.updatePublisher, + writer.uint32(/* id 108, wireType 2 =*/ 866).fork(), + ).ldelim(); + if ( + message.addFeed != null && + Object.hasOwnProperty.call(message, "addFeed") + ) + $root.pyth_lazer_transaction.AddFeed.encode( + message.addFeed, + writer.uint32(/* id 109, wireType 2 =*/ 874).fork(), + ).ldelim(); + if ( + message.updateFeed != null && + Object.hasOwnProperty.call(message, "updateFeed") + ) + $root.pyth_lazer_transaction.UpdateFeed.encode( + message.updateFeed, + writer.uint32(/* id 110, wireType 2 =*/ 882).fork(), + ).ldelim(); + return writer; + }; + + /** + * Encodes the specified GovernanceDirective message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceDirective.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.GovernanceDirective + * @static + * @param {pyth_lazer_transaction.IGovernanceDirective} message GovernanceDirective message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GovernanceDirective.encodeDelimited = function encodeDelimited( + message, + writer, + ) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GovernanceDirective message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.GovernanceDirective + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.GovernanceDirective} GovernanceDirective + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GovernanceDirective.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pyth_lazer_transaction.GovernanceDirective(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.shardFilter = + $root.pyth_lazer_transaction.ShardFilter.decode( + reader, + reader.uint32(), + ); + break; + } + case 101: { + message.createShard = + $root.pyth_lazer_transaction.CreateShard.decode( + reader, + reader.uint32(), + ); + break; + } + case 102: { + message.addGovernanceSource = + $root.pyth_lazer_transaction.AddGovernanceSource.decode( + reader, + reader.uint32(), + ); + break; + } + case 103: { + message.updateGovernanceSource = + $root.pyth_lazer_transaction.UpdateGovernanceSource.decode( + reader, + reader.uint32(), + ); + break; + } + case 104: { + message.setShardName = + $root.pyth_lazer_transaction.SetShardName.decode( + reader, + reader.uint32(), + ); + break; + } + case 105: { + message.setShardGroup = + $root.pyth_lazer_transaction.SetShardGroup.decode( + reader, + reader.uint32(), + ); + break; + } + case 106: { + message.resetLastSequenceNo = + $root.pyth_lazer_transaction.ResetLastSequenceNo.decode( + reader, + reader.uint32(), + ); + break; + } + case 107: { + message.addPublisher = + $root.pyth_lazer_transaction.AddPublisher.decode( + reader, + reader.uint32(), + ); + break; + } + case 108: { + message.updatePublisher = + $root.pyth_lazer_transaction.UpdatePublisher.decode( + reader, + reader.uint32(), + ); + break; + } + case 109: { + message.addFeed = $root.pyth_lazer_transaction.AddFeed.decode( + reader, + reader.uint32(), + ); + break; + } + case 110: { + message.updateFeed = $root.pyth_lazer_transaction.UpdateFeed.decode( + reader, + reader.uint32(), + ); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GovernanceDirective message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.GovernanceDirective + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.GovernanceDirective} GovernanceDirective + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GovernanceDirective.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GovernanceDirective message. + * @function verify + * @memberof pyth_lazer_transaction.GovernanceDirective + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GovernanceDirective.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if ( + message.shardFilter != null && + message.hasOwnProperty("shardFilter") + ) { + properties._shardFilter = 1; + { + let error = $root.pyth_lazer_transaction.ShardFilter.verify( + message.shardFilter, + ); + if (error) return "shardFilter." + error; + } + } + if ( + message.createShard != null && + message.hasOwnProperty("createShard") + ) { + properties.action = 1; + { + let error = $root.pyth_lazer_transaction.CreateShard.verify( + message.createShard, + ); + if (error) return "createShard." + error; + } + } + if ( + message.addGovernanceSource != null && + message.hasOwnProperty("addGovernanceSource") + ) { + if (properties.action === 1) return "action: multiple values"; + properties.action = 1; + { + let error = $root.pyth_lazer_transaction.AddGovernanceSource.verify( + message.addGovernanceSource, + ); + if (error) return "addGovernanceSource." + error; + } + } + if ( + message.updateGovernanceSource != null && + message.hasOwnProperty("updateGovernanceSource") + ) { + if (properties.action === 1) return "action: multiple values"; + properties.action = 1; + { + let error = + $root.pyth_lazer_transaction.UpdateGovernanceSource.verify( + message.updateGovernanceSource, + ); + if (error) return "updateGovernanceSource." + error; + } + } + if ( + message.setShardName != null && + message.hasOwnProperty("setShardName") + ) { + if (properties.action === 1) return "action: multiple values"; + properties.action = 1; + { + let error = $root.pyth_lazer_transaction.SetShardName.verify( + message.setShardName, + ); + if (error) return "setShardName." + error; + } + } + if ( + message.setShardGroup != null && + message.hasOwnProperty("setShardGroup") + ) { + if (properties.action === 1) return "action: multiple values"; + properties.action = 1; + { + let error = $root.pyth_lazer_transaction.SetShardGroup.verify( + message.setShardGroup, + ); + if (error) return "setShardGroup." + error; + } + } + if ( + message.resetLastSequenceNo != null && + message.hasOwnProperty("resetLastSequenceNo") + ) { + if (properties.action === 1) return "action: multiple values"; + properties.action = 1; + { + let error = $root.pyth_lazer_transaction.ResetLastSequenceNo.verify( + message.resetLastSequenceNo, + ); + if (error) return "resetLastSequenceNo." + error; + } + } + if ( + message.addPublisher != null && + message.hasOwnProperty("addPublisher") + ) { + if (properties.action === 1) return "action: multiple values"; + properties.action = 1; + { + let error = $root.pyth_lazer_transaction.AddPublisher.verify( + message.addPublisher, + ); + if (error) return "addPublisher." + error; + } + } + if ( + message.updatePublisher != null && + message.hasOwnProperty("updatePublisher") + ) { + if (properties.action === 1) return "action: multiple values"; + properties.action = 1; + { + let error = $root.pyth_lazer_transaction.UpdatePublisher.verify( + message.updatePublisher, + ); + if (error) return "updatePublisher." + error; + } + } + if (message.addFeed != null && message.hasOwnProperty("addFeed")) { + if (properties.action === 1) return "action: multiple values"; + properties.action = 1; + { + let error = $root.pyth_lazer_transaction.AddFeed.verify( + message.addFeed, + ); + if (error) return "addFeed." + error; + } + } + if (message.updateFeed != null && message.hasOwnProperty("updateFeed")) { + if (properties.action === 1) return "action: multiple values"; + properties.action = 1; + { + let error = $root.pyth_lazer_transaction.UpdateFeed.verify( + message.updateFeed, + ); + if (error) return "updateFeed." + error; + } + } + return null; + }; + + /** + * Creates a GovernanceDirective message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.GovernanceDirective + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.GovernanceDirective} GovernanceDirective + */ + GovernanceDirective.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.GovernanceDirective) + return object; + let message = new $root.pyth_lazer_transaction.GovernanceDirective(); + if (object.shardFilter != null) { + if (typeof object.shardFilter !== "object") + throw TypeError( + ".pyth_lazer_transaction.GovernanceDirective.shardFilter: object expected", + ); + message.shardFilter = + $root.pyth_lazer_transaction.ShardFilter.fromObject( + object.shardFilter, + ); + } + if (object.createShard != null) { + if (typeof object.createShard !== "object") + throw TypeError( + ".pyth_lazer_transaction.GovernanceDirective.createShard: object expected", + ); + message.createShard = + $root.pyth_lazer_transaction.CreateShard.fromObject( + object.createShard, + ); + } + if (object.addGovernanceSource != null) { + if (typeof object.addGovernanceSource !== "object") + throw TypeError( + ".pyth_lazer_transaction.GovernanceDirective.addGovernanceSource: object expected", + ); + message.addGovernanceSource = + $root.pyth_lazer_transaction.AddGovernanceSource.fromObject( + object.addGovernanceSource, + ); + } + if (object.updateGovernanceSource != null) { + if (typeof object.updateGovernanceSource !== "object") + throw TypeError( + ".pyth_lazer_transaction.GovernanceDirective.updateGovernanceSource: object expected", + ); + message.updateGovernanceSource = + $root.pyth_lazer_transaction.UpdateGovernanceSource.fromObject( + object.updateGovernanceSource, + ); + } + if (object.setShardName != null) { + if (typeof object.setShardName !== "object") + throw TypeError( + ".pyth_lazer_transaction.GovernanceDirective.setShardName: object expected", + ); + message.setShardName = + $root.pyth_lazer_transaction.SetShardName.fromObject( + object.setShardName, + ); + } + if (object.setShardGroup != null) { + if (typeof object.setShardGroup !== "object") + throw TypeError( + ".pyth_lazer_transaction.GovernanceDirective.setShardGroup: object expected", + ); + message.setShardGroup = + $root.pyth_lazer_transaction.SetShardGroup.fromObject( + object.setShardGroup, + ); + } + if (object.resetLastSequenceNo != null) { + if (typeof object.resetLastSequenceNo !== "object") + throw TypeError( + ".pyth_lazer_transaction.GovernanceDirective.resetLastSequenceNo: object expected", + ); + message.resetLastSequenceNo = + $root.pyth_lazer_transaction.ResetLastSequenceNo.fromObject( + object.resetLastSequenceNo, + ); + } + if (object.addPublisher != null) { + if (typeof object.addPublisher !== "object") + throw TypeError( + ".pyth_lazer_transaction.GovernanceDirective.addPublisher: object expected", + ); + message.addPublisher = + $root.pyth_lazer_transaction.AddPublisher.fromObject( + object.addPublisher, + ); + } + if (object.updatePublisher != null) { + if (typeof object.updatePublisher !== "object") + throw TypeError( + ".pyth_lazer_transaction.GovernanceDirective.updatePublisher: object expected", + ); + message.updatePublisher = + $root.pyth_lazer_transaction.UpdatePublisher.fromObject( + object.updatePublisher, + ); + } + if (object.addFeed != null) { + if (typeof object.addFeed !== "object") + throw TypeError( + ".pyth_lazer_transaction.GovernanceDirective.addFeed: object expected", + ); + message.addFeed = $root.pyth_lazer_transaction.AddFeed.fromObject( + object.addFeed, + ); + } + if (object.updateFeed != null) { + if (typeof object.updateFeed !== "object") + throw TypeError( + ".pyth_lazer_transaction.GovernanceDirective.updateFeed: object expected", + ); + message.updateFeed = $root.pyth_lazer_transaction.UpdateFeed.fromObject( + object.updateFeed, + ); + } + return message; + }; + + /** + * Creates a plain object from a GovernanceDirective message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.GovernanceDirective + * @static + * @param {pyth_lazer_transaction.GovernanceDirective} message GovernanceDirective + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GovernanceDirective.toObject = function toObject(message, options) { + if (!options) options = {}; + let object = {}; + if ( + message.shardFilter != null && + message.hasOwnProperty("shardFilter") + ) { + object.shardFilter = $root.pyth_lazer_transaction.ShardFilter.toObject( + message.shardFilter, + options, + ); + if (options.oneofs) object._shardFilter = "shardFilter"; + } + if ( + message.createShard != null && + message.hasOwnProperty("createShard") + ) { + object.createShard = $root.pyth_lazer_transaction.CreateShard.toObject( + message.createShard, + options, + ); + if (options.oneofs) object.action = "createShard"; + } + if ( + message.addGovernanceSource != null && + message.hasOwnProperty("addGovernanceSource") + ) { + object.addGovernanceSource = + $root.pyth_lazer_transaction.AddGovernanceSource.toObject( + message.addGovernanceSource, + options, + ); + if (options.oneofs) object.action = "addGovernanceSource"; + } + if ( + message.updateGovernanceSource != null && + message.hasOwnProperty("updateGovernanceSource") + ) { + object.updateGovernanceSource = + $root.pyth_lazer_transaction.UpdateGovernanceSource.toObject( + message.updateGovernanceSource, + options, + ); + if (options.oneofs) object.action = "updateGovernanceSource"; + } + if ( + message.setShardName != null && + message.hasOwnProperty("setShardName") + ) { + object.setShardName = + $root.pyth_lazer_transaction.SetShardName.toObject( + message.setShardName, + options, + ); + if (options.oneofs) object.action = "setShardName"; + } + if ( + message.setShardGroup != null && + message.hasOwnProperty("setShardGroup") + ) { + object.setShardGroup = + $root.pyth_lazer_transaction.SetShardGroup.toObject( + message.setShardGroup, + options, + ); + if (options.oneofs) object.action = "setShardGroup"; + } + if ( + message.resetLastSequenceNo != null && + message.hasOwnProperty("resetLastSequenceNo") + ) { + object.resetLastSequenceNo = + $root.pyth_lazer_transaction.ResetLastSequenceNo.toObject( + message.resetLastSequenceNo, + options, + ); + if (options.oneofs) object.action = "resetLastSequenceNo"; + } + if ( + message.addPublisher != null && + message.hasOwnProperty("addPublisher") + ) { + object.addPublisher = + $root.pyth_lazer_transaction.AddPublisher.toObject( + message.addPublisher, + options, + ); + if (options.oneofs) object.action = "addPublisher"; + } + if ( + message.updatePublisher != null && + message.hasOwnProperty("updatePublisher") + ) { + object.updatePublisher = + $root.pyth_lazer_transaction.UpdatePublisher.toObject( + message.updatePublisher, + options, + ); + if (options.oneofs) object.action = "updatePublisher"; + } + if (message.addFeed != null && message.hasOwnProperty("addFeed")) { + object.addFeed = $root.pyth_lazer_transaction.AddFeed.toObject( + message.addFeed, + options, + ); + if (options.oneofs) object.action = "addFeed"; + } + if (message.updateFeed != null && message.hasOwnProperty("updateFeed")) { + object.updateFeed = $root.pyth_lazer_transaction.UpdateFeed.toObject( + message.updateFeed, + options, + ); + if (options.oneofs) object.action = "updateFeed"; + } + return object; + }; + + /** + * Converts this GovernanceDirective to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.GovernanceDirective + * @instance + * @returns {Object.} JSON object + */ + GovernanceDirective.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GovernanceDirective + * @function getTypeUrl + * @memberof pyth_lazer_transaction.GovernanceDirective + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GovernanceDirective.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.GovernanceDirective"; + }; + + return GovernanceDirective; + })(); + + pyth_lazer_transaction.Permissions = (function () { + /** + * Properties of a Permissions. + * @memberof pyth_lazer_transaction + * @interface IPermissions + * @property {boolean|null} [allActions] Permissions allActions + * @property {Array.|null} [shardActions] Permissions shardActions + * @property {boolean|null} [allUpdateGovernanceSourceActions] Permissions allUpdateGovernanceSourceActions + * @property {Array.|null} [updateGovernanceSourceActions] Permissions updateGovernanceSourceActions + * @property {boolean|null} [allUpdatePublisherAction] Permissions allUpdatePublisherAction + * @property {Array.|null} [updatePublisherActions] Permissions updatePublisherActions + * @property {boolean|null} [allUpdateFeedActions] Permissions allUpdateFeedActions + * @property {Array.|null} [updateFeedActions] Permissions updateFeedActions + */ + + /** + * Constructs a new Permissions. + * @memberof pyth_lazer_transaction + * @classdesc Represents a Permissions. + * @implements IPermissions + * @constructor + * @param {pyth_lazer_transaction.IPermissions=} [properties] Properties to set + */ + function Permissions(properties) { + this.shardActions = []; + this.updateGovernanceSourceActions = []; + this.updatePublisherActions = []; + this.updateFeedActions = []; + 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]]; + } + + /** + * Permissions allActions. + * @member {boolean|null|undefined} allActions + * @memberof pyth_lazer_transaction.Permissions + * @instance + */ + Permissions.prototype.allActions = null; + + /** + * Permissions shardActions. + * @member {Array.} shardActions + * @memberof pyth_lazer_transaction.Permissions + * @instance + */ + Permissions.prototype.shardActions = $util.emptyArray; + + /** + * Permissions allUpdateGovernanceSourceActions. + * @member {boolean|null|undefined} allUpdateGovernanceSourceActions + * @memberof pyth_lazer_transaction.Permissions + * @instance + */ + Permissions.prototype.allUpdateGovernanceSourceActions = null; + + /** + * Permissions updateGovernanceSourceActions. + * @member {Array.} updateGovernanceSourceActions + * @memberof pyth_lazer_transaction.Permissions + * @instance + */ + Permissions.prototype.updateGovernanceSourceActions = $util.emptyArray; + + /** + * Permissions allUpdatePublisherAction. + * @member {boolean|null|undefined} allUpdatePublisherAction + * @memberof pyth_lazer_transaction.Permissions + * @instance + */ + Permissions.prototype.allUpdatePublisherAction = null; + + /** + * Permissions updatePublisherActions. + * @member {Array.} updatePublisherActions + * @memberof pyth_lazer_transaction.Permissions + * @instance + */ + Permissions.prototype.updatePublisherActions = $util.emptyArray; + + /** + * Permissions allUpdateFeedActions. + * @member {boolean|null|undefined} allUpdateFeedActions + * @memberof pyth_lazer_transaction.Permissions + * @instance + */ + Permissions.prototype.allUpdateFeedActions = null; + + /** + * Permissions updateFeedActions. + * @member {Array.} updateFeedActions + * @memberof pyth_lazer_transaction.Permissions + * @instance + */ + Permissions.prototype.updateFeedActions = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * Permissions _allActions. + * @member {"allActions"|undefined} _allActions + * @memberof pyth_lazer_transaction.Permissions + * @instance + */ + Object.defineProperty(Permissions.prototype, "_allActions", { + get: $util.oneOfGetter(($oneOfFields = ["allActions"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Permissions _allUpdateGovernanceSourceActions. + * @member {"allUpdateGovernanceSourceActions"|undefined} _allUpdateGovernanceSourceActions + * @memberof pyth_lazer_transaction.Permissions + * @instance + */ + Object.defineProperty( + Permissions.prototype, + "_allUpdateGovernanceSourceActions", + { + get: $util.oneOfGetter( + ($oneOfFields = ["allUpdateGovernanceSourceActions"]), + ), + set: $util.oneOfSetter($oneOfFields), + }, + ); + + /** + * Permissions _allUpdatePublisherAction. + * @member {"allUpdatePublisherAction"|undefined} _allUpdatePublisherAction + * @memberof pyth_lazer_transaction.Permissions + * @instance + */ + Object.defineProperty(Permissions.prototype, "_allUpdatePublisherAction", { + get: $util.oneOfGetter(($oneOfFields = ["allUpdatePublisherAction"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Permissions _allUpdateFeedActions. + * @member {"allUpdateFeedActions"|undefined} _allUpdateFeedActions + * @memberof pyth_lazer_transaction.Permissions + * @instance + */ + Object.defineProperty(Permissions.prototype, "_allUpdateFeedActions", { + get: $util.oneOfGetter(($oneOfFields = ["allUpdateFeedActions"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Creates a new Permissions instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.Permissions + * @static + * @param {pyth_lazer_transaction.IPermissions=} [properties] Properties to set + * @returns {pyth_lazer_transaction.Permissions} Permissions instance + */ + Permissions.create = function create(properties) { + return new Permissions(properties); + }; + + /** + * Encodes the specified Permissions message. Does not implicitly {@link pyth_lazer_transaction.Permissions.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.Permissions + * @static + * @param {pyth_lazer_transaction.IPermissions} message Permissions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Permissions.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if ( + message.allActions != null && + Object.hasOwnProperty.call(message, "allActions") + ) + writer.uint32(/* id 1, wireType 0 =*/ 8).bool(message.allActions); + if (message.shardActions != null && message.shardActions.length) { + writer.uint32(/* id 2, wireType 2 =*/ 18).fork(); + for (let i = 0; i < message.shardActions.length; ++i) + writer.int32(message.shardActions[i]); + writer.ldelim(); + } + if ( + message.allUpdateGovernanceSourceActions != null && + Object.hasOwnProperty.call(message, "allUpdateGovernanceSourceActions") + ) + writer + .uint32(/* id 3, wireType 0 =*/ 24) + .bool(message.allUpdateGovernanceSourceActions); + if ( + message.updateGovernanceSourceActions != null && + message.updateGovernanceSourceActions.length + ) { + writer.uint32(/* id 4, wireType 2 =*/ 34).fork(); + for (let i = 0; i < message.updateGovernanceSourceActions.length; ++i) + writer.int32(message.updateGovernanceSourceActions[i]); + writer.ldelim(); + } + if ( + message.allUpdatePublisherAction != null && + Object.hasOwnProperty.call(message, "allUpdatePublisherAction") + ) + writer + .uint32(/* id 5, wireType 0 =*/ 40) + .bool(message.allUpdatePublisherAction); + if ( + message.updatePublisherActions != null && + message.updatePublisherActions.length + ) { + writer.uint32(/* id 6, wireType 2 =*/ 50).fork(); + for (let i = 0; i < message.updatePublisherActions.length; ++i) + writer.int32(message.updatePublisherActions[i]); + writer.ldelim(); + } + if ( + message.allUpdateFeedActions != null && + Object.hasOwnProperty.call(message, "allUpdateFeedActions") + ) + writer + .uint32(/* id 7, wireType 0 =*/ 56) + .bool(message.allUpdateFeedActions); + if ( + message.updateFeedActions != null && + message.updateFeedActions.length + ) { + writer.uint32(/* id 8, wireType 2 =*/ 66).fork(); + for (let i = 0; i < message.updateFeedActions.length; ++i) + writer.int32(message.updateFeedActions[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified Permissions message, length delimited. Does not implicitly {@link pyth_lazer_transaction.Permissions.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.Permissions + * @static + * @param {pyth_lazer_transaction.IPermissions} message Permissions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Permissions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Permissions message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.Permissions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.Permissions} Permissions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Permissions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pyth_lazer_transaction.Permissions(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.allActions = reader.bool(); + break; + } + case 2: { + if (!(message.shardActions && message.shardActions.length)) + message.shardActions = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.shardActions.push(reader.int32()); + } else message.shardActions.push(reader.int32()); + break; + } + case 3: { + message.allUpdateGovernanceSourceActions = reader.bool(); + break; + } + case 4: { + if ( + !( + message.updateGovernanceSourceActions && + message.updateGovernanceSourceActions.length + ) + ) + message.updateGovernanceSourceActions = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.updateGovernanceSourceActions.push(reader.int32()); + } else message.updateGovernanceSourceActions.push(reader.int32()); + break; + } + case 5: { + message.allUpdatePublisherAction = reader.bool(); + break; + } + case 6: { + if ( + !( + message.updatePublisherActions && + message.updatePublisherActions.length + ) + ) + message.updatePublisherActions = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.updatePublisherActions.push(reader.int32()); + } else message.updatePublisherActions.push(reader.int32()); + break; + } + case 7: { + message.allUpdateFeedActions = reader.bool(); + break; + } + case 8: { + if ( + !(message.updateFeedActions && message.updateFeedActions.length) + ) + message.updateFeedActions = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.updateFeedActions.push(reader.int32()); + } else message.updateFeedActions.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Permissions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.Permissions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.Permissions} Permissions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Permissions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Permissions message. + * @function verify + * @memberof pyth_lazer_transaction.Permissions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Permissions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if (message.allActions != null && message.hasOwnProperty("allActions")) { + properties._allActions = 1; + if (typeof message.allActions !== "boolean") + return "allActions: boolean expected"; + } + if ( + message.shardActions != null && + message.hasOwnProperty("shardActions") + ) { + if (!Array.isArray(message.shardActions)) + return "shardActions: array expected"; + for (let i = 0; i < message.shardActions.length; ++i) + switch (message.shardActions[i]) { + default: + return "shardActions: enum value[] expected"; + case 0: + case 101: + case 102: + case 103: + case 104: + case 105: + case 106: + case 107: + case 109: + break; + } + } + if ( + message.allUpdateGovernanceSourceActions != null && + message.hasOwnProperty("allUpdateGovernanceSourceActions") + ) { + properties._allUpdateGovernanceSourceActions = 1; + if (typeof message.allUpdateGovernanceSourceActions !== "boolean") + return "allUpdateGovernanceSourceActions: boolean expected"; + } + if ( + message.updateGovernanceSourceActions != null && + message.hasOwnProperty("updateGovernanceSourceActions") + ) { + if (!Array.isArray(message.updateGovernanceSourceActions)) + return "updateGovernanceSourceActions: array expected"; + for (let i = 0; i < message.updateGovernanceSourceActions.length; ++i) + switch (message.updateGovernanceSourceActions[i]) { + default: + return "updateGovernanceSourceActions: enum value[] expected"; + case 0: + case 101: + case 199: + break; + } + } + if ( + message.allUpdatePublisherAction != null && + message.hasOwnProperty("allUpdatePublisherAction") + ) { + properties._allUpdatePublisherAction = 1; + if (typeof message.allUpdatePublisherAction !== "boolean") + return "allUpdatePublisherAction: boolean expected"; + } + if ( + message.updatePublisherActions != null && + message.hasOwnProperty("updatePublisherActions") + ) { + if (!Array.isArray(message.updatePublisherActions)) + return "updatePublisherActions: array expected"; + for (let i = 0; i < message.updatePublisherActions.length; ++i) + switch (message.updatePublisherActions[i]) { + default: + return "updatePublisherActions: enum value[] expected"; + case 0: + case 101: + case 102: + case 103: + case 104: + case 105: + case 199: + break; + } + } + if ( + message.allUpdateFeedActions != null && + message.hasOwnProperty("allUpdateFeedActions") + ) { + properties._allUpdateFeedActions = 1; + if (typeof message.allUpdateFeedActions !== "boolean") + return "allUpdateFeedActions: boolean expected"; + } + if ( + message.updateFeedActions != null && + message.hasOwnProperty("updateFeedActions") + ) { + if (!Array.isArray(message.updateFeedActions)) + return "updateFeedActions: array expected"; + for (let i = 0; i < message.updateFeedActions.length; ++i) + switch (message.updateFeedActions[i]) { + default: + return "updateFeedActions: enum value[] expected"; + case 0: + case 101: + case 102: + case 103: + case 199: + break; + } + } + return null; + }; + + /** + * Creates a Permissions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.Permissions + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.Permissions} Permissions + */ + Permissions.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.Permissions) + return object; + let message = new $root.pyth_lazer_transaction.Permissions(); + if (object.allActions != null) + message.allActions = Boolean(object.allActions); + if (object.shardActions) { + if (!Array.isArray(object.shardActions)) + throw TypeError( + ".pyth_lazer_transaction.Permissions.shardActions: array expected", + ); + message.shardActions = []; + for (let i = 0; i < object.shardActions.length; ++i) + switch (object.shardActions[i]) { + default: + if (typeof object.shardActions[i] === "number") { + message.shardActions[i] = object.shardActions[i]; + break; + } + case "SHARD_ACTION_UNSPECIFIED": + case 0: + message.shardActions[i] = 0; + break; + case "CREATE_SHARD": + case 101: + message.shardActions[i] = 101; + break; + case "ADD_GOVERNANCE_SOURCE": + case 102: + message.shardActions[i] = 102; + break; + case "UPDATE_GOVERNANCE_SOURCE": + case 103: + message.shardActions[i] = 103; + break; + case "SET_SHARD_NAME": + case 104: + message.shardActions[i] = 104; + break; + case "SET_SHARD_GROUP": + case 105: + message.shardActions[i] = 105; + break; + case "RESET_LAST_SEQUENCE_NO": + case 106: + message.shardActions[i] = 106; + break; + case "ADD_PUBLISHER": + case 107: + message.shardActions[i] = 107; + break; + case "ADD_FEED": + case 109: + message.shardActions[i] = 109; + break; + } + } + if (object.allUpdateGovernanceSourceActions != null) + message.allUpdateGovernanceSourceActions = Boolean( + object.allUpdateGovernanceSourceActions, + ); + if (object.updateGovernanceSourceActions) { + if (!Array.isArray(object.updateGovernanceSourceActions)) + throw TypeError( + ".pyth_lazer_transaction.Permissions.updateGovernanceSourceActions: array expected", + ); + message.updateGovernanceSourceActions = []; + for (let i = 0; i < object.updateGovernanceSourceActions.length; ++i) + switch (object.updateGovernanceSourceActions[i]) { + default: + if (typeof object.updateGovernanceSourceActions[i] === "number") { + message.updateGovernanceSourceActions[i] = + object.updateGovernanceSourceActions[i]; + break; + } + case "UPDATE_GOVERNANCE_SOURCE_ACTION_UNSPECIFIED": + case 0: + message.updateGovernanceSourceActions[i] = 0; + break; + case "SET_GOVERNANCE_SOURCE_PERMISSIONS": + case 101: + message.updateGovernanceSourceActions[i] = 101; + break; + case "REMOVE_GOVERNANCE_SOURCE": + case 199: + message.updateGovernanceSourceActions[i] = 199; + break; + } + } + if (object.allUpdatePublisherAction != null) + message.allUpdatePublisherAction = Boolean( + object.allUpdatePublisherAction, + ); + if (object.updatePublisherActions) { + if (!Array.isArray(object.updatePublisherActions)) + throw TypeError( + ".pyth_lazer_transaction.Permissions.updatePublisherActions: array expected", + ); + message.updatePublisherActions = []; + for (let i = 0; i < object.updatePublisherActions.length; ++i) + switch (object.updatePublisherActions[i]) { + default: + if (typeof object.updatePublisherActions[i] === "number") { + message.updatePublisherActions[i] = + object.updatePublisherActions[i]; + break; + } + case "UPDATE_PUBLISHER_ACTION_UNSPECIFIED": + case 0: + message.updatePublisherActions[i] = 0; + break; + case "SET_PUBLISHER_NAME": + case 101: + message.updatePublisherActions[i] = 101; + break; + case "ADD_PUBLISHER_PUBLIC_KEYS": + case 102: + message.updatePublisherActions[i] = 102; + break; + case "REMOVE_PUBLISHER_PUBLIC_KEYS": + case 103: + message.updatePublisherActions[i] = 103; + break; + case "SET_PUBLISHER_PUBLIC_KEYS": + case 104: + message.updatePublisherActions[i] = 104; + break; + case "SET_PUBLISHER_ACTIVE": + case 105: + message.updatePublisherActions[i] = 105; + break; + case "REMOVE_PUBLISHER": + case 199: + message.updatePublisherActions[i] = 199; + break; + } + } + if (object.allUpdateFeedActions != null) + message.allUpdateFeedActions = Boolean(object.allUpdateFeedActions); + if (object.updateFeedActions) { + if (!Array.isArray(object.updateFeedActions)) + throw TypeError( + ".pyth_lazer_transaction.Permissions.updateFeedActions: array expected", + ); + message.updateFeedActions = []; + for (let i = 0; i < object.updateFeedActions.length; ++i) + switch (object.updateFeedActions[i]) { + default: + if (typeof object.updateFeedActions[i] === "number") { + message.updateFeedActions[i] = object.updateFeedActions[i]; + break; + } + case "UPDATE_FEED_ACTION_UNSPECIFIED": + case 0: + message.updateFeedActions[i] = 0; + break; + case "UPDATE_FEED_METADATA": + case 101: + message.updateFeedActions[i] = 101; + break; + case "ACTIVATE_FEED": + case 102: + message.updateFeedActions[i] = 102; + break; + case "DEACTIVATE_FEED": + case 103: + message.updateFeedActions[i] = 103; + break; + case "REMOVE_FEED": + case 199: + message.updateFeedActions[i] = 199; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a Permissions message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.Permissions + * @static + * @param {pyth_lazer_transaction.Permissions} message Permissions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Permissions.toObject = function toObject(message, options) { + if (!options) options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.shardActions = []; + object.updateGovernanceSourceActions = []; + object.updatePublisherActions = []; + object.updateFeedActions = []; + } + if (message.allActions != null && message.hasOwnProperty("allActions")) { + object.allActions = message.allActions; + if (options.oneofs) object._allActions = "allActions"; + } + if (message.shardActions && message.shardActions.length) { + object.shardActions = []; + for (let j = 0; j < message.shardActions.length; ++j) + object.shardActions[j] = + options.enums === String + ? $root.pyth_lazer_transaction.Permissions.ShardAction[ + message.shardActions[j] + ] === undefined + ? message.shardActions[j] + : $root.pyth_lazer_transaction.Permissions.ShardAction[ + message.shardActions[j] + ] + : message.shardActions[j]; + } + if ( + message.allUpdateGovernanceSourceActions != null && + message.hasOwnProperty("allUpdateGovernanceSourceActions") + ) { + object.allUpdateGovernanceSourceActions = + message.allUpdateGovernanceSourceActions; + if (options.oneofs) + object._allUpdateGovernanceSourceActions = + "allUpdateGovernanceSourceActions"; + } + if ( + message.updateGovernanceSourceActions && + message.updateGovernanceSourceActions.length + ) { + object.updateGovernanceSourceActions = []; + for (let j = 0; j < message.updateGovernanceSourceActions.length; ++j) + object.updateGovernanceSourceActions[j] = + options.enums === String + ? $root.pyth_lazer_transaction.Permissions + .UpdateGovernanceSourceAction[ + message.updateGovernanceSourceActions[j] + ] === undefined + ? message.updateGovernanceSourceActions[j] + : $root.pyth_lazer_transaction.Permissions + .UpdateGovernanceSourceAction[ + message.updateGovernanceSourceActions[j] + ] + : message.updateGovernanceSourceActions[j]; + } + if ( + message.allUpdatePublisherAction != null && + message.hasOwnProperty("allUpdatePublisherAction") + ) { + object.allUpdatePublisherAction = message.allUpdatePublisherAction; + if (options.oneofs) + object._allUpdatePublisherAction = "allUpdatePublisherAction"; + } + if ( + message.updatePublisherActions && + message.updatePublisherActions.length + ) { + object.updatePublisherActions = []; + for (let j = 0; j < message.updatePublisherActions.length; ++j) + object.updatePublisherActions[j] = + options.enums === String + ? $root.pyth_lazer_transaction.Permissions.UpdatePublisherAction[ + message.updatePublisherActions[j] + ] === undefined + ? message.updatePublisherActions[j] + : $root.pyth_lazer_transaction.Permissions + .UpdatePublisherAction[message.updatePublisherActions[j]] + : message.updatePublisherActions[j]; + } + if ( + message.allUpdateFeedActions != null && + message.hasOwnProperty("allUpdateFeedActions") + ) { + object.allUpdateFeedActions = message.allUpdateFeedActions; + if (options.oneofs) + object._allUpdateFeedActions = "allUpdateFeedActions"; + } + if (message.updateFeedActions && message.updateFeedActions.length) { + object.updateFeedActions = []; + for (let j = 0; j < message.updateFeedActions.length; ++j) + object.updateFeedActions[j] = + options.enums === String + ? $root.pyth_lazer_transaction.Permissions.UpdateFeedAction[ + message.updateFeedActions[j] + ] === undefined + ? message.updateFeedActions[j] + : $root.pyth_lazer_transaction.Permissions.UpdateFeedAction[ + message.updateFeedActions[j] + ] + : message.updateFeedActions[j]; + } + return object; + }; + + /** + * Converts this Permissions to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.Permissions + * @instance + * @returns {Object.} JSON object + */ + Permissions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Permissions + * @function getTypeUrl + * @memberof pyth_lazer_transaction.Permissions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Permissions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.Permissions"; + }; + + /** + * ShardAction enum. + * @name pyth_lazer_transaction.Permissions.ShardAction + * @enum {number} + * @property {number} SHARD_ACTION_UNSPECIFIED=0 SHARD_ACTION_UNSPECIFIED value + * @property {number} CREATE_SHARD=101 CREATE_SHARD value + * @property {number} ADD_GOVERNANCE_SOURCE=102 ADD_GOVERNANCE_SOURCE value + * @property {number} UPDATE_GOVERNANCE_SOURCE=103 UPDATE_GOVERNANCE_SOURCE value + * @property {number} SET_SHARD_NAME=104 SET_SHARD_NAME value + * @property {number} SET_SHARD_GROUP=105 SET_SHARD_GROUP value + * @property {number} RESET_LAST_SEQUENCE_NO=106 RESET_LAST_SEQUENCE_NO value + * @property {number} ADD_PUBLISHER=107 ADD_PUBLISHER value + * @property {number} ADD_FEED=109 ADD_FEED value + */ + Permissions.ShardAction = (function () { + const valuesById = {}, + values = Object.create(valuesById); + values[(valuesById[0] = "SHARD_ACTION_UNSPECIFIED")] = 0; + values[(valuesById[101] = "CREATE_SHARD")] = 101; + values[(valuesById[102] = "ADD_GOVERNANCE_SOURCE")] = 102; + values[(valuesById[103] = "UPDATE_GOVERNANCE_SOURCE")] = 103; + values[(valuesById[104] = "SET_SHARD_NAME")] = 104; + values[(valuesById[105] = "SET_SHARD_GROUP")] = 105; + values[(valuesById[106] = "RESET_LAST_SEQUENCE_NO")] = 106; + values[(valuesById[107] = "ADD_PUBLISHER")] = 107; + values[(valuesById[109] = "ADD_FEED")] = 109; + return values; + })(); + + /** + * UpdateGovernanceSourceAction enum. + * @name pyth_lazer_transaction.Permissions.UpdateGovernanceSourceAction + * @enum {number} + * @property {number} UPDATE_GOVERNANCE_SOURCE_ACTION_UNSPECIFIED=0 UPDATE_GOVERNANCE_SOURCE_ACTION_UNSPECIFIED value + * @property {number} SET_GOVERNANCE_SOURCE_PERMISSIONS=101 SET_GOVERNANCE_SOURCE_PERMISSIONS value + * @property {number} REMOVE_GOVERNANCE_SOURCE=199 REMOVE_GOVERNANCE_SOURCE value + */ + Permissions.UpdateGovernanceSourceAction = (function () { + const valuesById = {}, + values = Object.create(valuesById); + values[(valuesById[0] = "UPDATE_GOVERNANCE_SOURCE_ACTION_UNSPECIFIED")] = + 0; + values[(valuesById[101] = "SET_GOVERNANCE_SOURCE_PERMISSIONS")] = 101; + values[(valuesById[199] = "REMOVE_GOVERNANCE_SOURCE")] = 199; + return values; + })(); + + /** + * UpdatePublisherAction enum. + * @name pyth_lazer_transaction.Permissions.UpdatePublisherAction + * @enum {number} + * @property {number} UPDATE_PUBLISHER_ACTION_UNSPECIFIED=0 UPDATE_PUBLISHER_ACTION_UNSPECIFIED value + * @property {number} SET_PUBLISHER_NAME=101 SET_PUBLISHER_NAME value + * @property {number} ADD_PUBLISHER_PUBLIC_KEYS=102 ADD_PUBLISHER_PUBLIC_KEYS value + * @property {number} REMOVE_PUBLISHER_PUBLIC_KEYS=103 REMOVE_PUBLISHER_PUBLIC_KEYS value + * @property {number} SET_PUBLISHER_PUBLIC_KEYS=104 SET_PUBLISHER_PUBLIC_KEYS value + * @property {number} SET_PUBLISHER_ACTIVE=105 SET_PUBLISHER_ACTIVE value + * @property {number} REMOVE_PUBLISHER=199 REMOVE_PUBLISHER value + */ + Permissions.UpdatePublisherAction = (function () { + const valuesById = {}, + values = Object.create(valuesById); + values[(valuesById[0] = "UPDATE_PUBLISHER_ACTION_UNSPECIFIED")] = 0; + values[(valuesById[101] = "SET_PUBLISHER_NAME")] = 101; + values[(valuesById[102] = "ADD_PUBLISHER_PUBLIC_KEYS")] = 102; + values[(valuesById[103] = "REMOVE_PUBLISHER_PUBLIC_KEYS")] = 103; + values[(valuesById[104] = "SET_PUBLISHER_PUBLIC_KEYS")] = 104; + values[(valuesById[105] = "SET_PUBLISHER_ACTIVE")] = 105; + values[(valuesById[199] = "REMOVE_PUBLISHER")] = 199; + return values; + })(); + + /** + * UpdateFeedAction enum. + * @name pyth_lazer_transaction.Permissions.UpdateFeedAction + * @enum {number} + * @property {number} UPDATE_FEED_ACTION_UNSPECIFIED=0 UPDATE_FEED_ACTION_UNSPECIFIED value + * @property {number} UPDATE_FEED_METADATA=101 UPDATE_FEED_METADATA value + * @property {number} ACTIVATE_FEED=102 ACTIVATE_FEED value + * @property {number} DEACTIVATE_FEED=103 DEACTIVATE_FEED value + * @property {number} REMOVE_FEED=199 REMOVE_FEED value + */ + Permissions.UpdateFeedAction = (function () { + const valuesById = {}, + values = Object.create(valuesById); + values[(valuesById[0] = "UPDATE_FEED_ACTION_UNSPECIFIED")] = 0; + values[(valuesById[101] = "UPDATE_FEED_METADATA")] = 101; + values[(valuesById[102] = "ACTIVATE_FEED")] = 102; + values[(valuesById[103] = "DEACTIVATE_FEED")] = 103; + values[(valuesById[199] = "REMOVE_FEED")] = 199; + return values; + })(); + + return Permissions; + })(); + + pyth_lazer_transaction.GovernanceSource = (function () { + /** + * Properties of a GovernanceSource. + * @memberof pyth_lazer_transaction + * @interface IGovernanceSource + * @property {pyth_lazer_transaction.GovernanceSource.ISingleEd25519|null} [singleEd25519] GovernanceSource singleEd25519 + * @property {pyth_lazer_transaction.GovernanceSource.IWormholeEmitter|null} [wormholeEmitter] GovernanceSource wormholeEmitter + */ + + /** + * Constructs a new GovernanceSource. + * @memberof pyth_lazer_transaction + * @classdesc Represents a GovernanceSource. + * @implements IGovernanceSource + * @constructor + * @param {pyth_lazer_transaction.IGovernanceSource=} [properties] Properties to set + */ + function GovernanceSource(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]]; + } + + /** + * GovernanceSource singleEd25519. + * @member {pyth_lazer_transaction.GovernanceSource.ISingleEd25519|null|undefined} singleEd25519 + * @memberof pyth_lazer_transaction.GovernanceSource + * @instance + */ + GovernanceSource.prototype.singleEd25519 = null; + + /** + * GovernanceSource wormholeEmitter. + * @member {pyth_lazer_transaction.GovernanceSource.IWormholeEmitter|null|undefined} wormholeEmitter + * @memberof pyth_lazer_transaction.GovernanceSource + * @instance + */ + GovernanceSource.prototype.wormholeEmitter = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * GovernanceSource source. + * @member {"singleEd25519"|"wormholeEmitter"|undefined} source + * @memberof pyth_lazer_transaction.GovernanceSource + * @instance + */ + Object.defineProperty(GovernanceSource.prototype, "source", { + get: $util.oneOfGetter( + ($oneOfFields = ["singleEd25519", "wormholeEmitter"]), + ), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Creates a new GovernanceSource instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.GovernanceSource + * @static + * @param {pyth_lazer_transaction.IGovernanceSource=} [properties] Properties to set + * @returns {pyth_lazer_transaction.GovernanceSource} GovernanceSource instance + */ + GovernanceSource.create = function create(properties) { + return new GovernanceSource(properties); + }; + + /** + * Encodes the specified GovernanceSource message. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.GovernanceSource + * @static + * @param {pyth_lazer_transaction.IGovernanceSource} message GovernanceSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GovernanceSource.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if ( + message.singleEd25519 != null && + Object.hasOwnProperty.call(message, "singleEd25519") + ) + $root.pyth_lazer_transaction.GovernanceSource.SingleEd25519.encode( + message.singleEd25519, + writer.uint32(/* id 1, wireType 2 =*/ 10).fork(), + ).ldelim(); + if ( + message.wormholeEmitter != null && + Object.hasOwnProperty.call(message, "wormholeEmitter") + ) + $root.pyth_lazer_transaction.GovernanceSource.WormholeEmitter.encode( + message.wormholeEmitter, + writer.uint32(/* id 2, wireType 2 =*/ 18).fork(), + ).ldelim(); + return writer; + }; + + /** + * Encodes the specified GovernanceSource message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.GovernanceSource + * @static + * @param {pyth_lazer_transaction.IGovernanceSource} message GovernanceSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GovernanceSource.encodeDelimited = function encodeDelimited( + message, + writer, + ) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GovernanceSource message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.GovernanceSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.GovernanceSource} GovernanceSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GovernanceSource.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pyth_lazer_transaction.GovernanceSource(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.singleEd25519 = + $root.pyth_lazer_transaction.GovernanceSource.SingleEd25519.decode( + reader, + reader.uint32(), + ); + break; + } + case 2: { + message.wormholeEmitter = + $root.pyth_lazer_transaction.GovernanceSource.WormholeEmitter.decode( + reader, + reader.uint32(), + ); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GovernanceSource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.GovernanceSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.GovernanceSource} GovernanceSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GovernanceSource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GovernanceSource message. + * @function verify + * @memberof pyth_lazer_transaction.GovernanceSource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GovernanceSource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if ( + message.singleEd25519 != null && + message.hasOwnProperty("singleEd25519") + ) { + properties.source = 1; + { + let error = + $root.pyth_lazer_transaction.GovernanceSource.SingleEd25519.verify( + message.singleEd25519, + ); + if (error) return "singleEd25519." + error; + } + } + if ( + message.wormholeEmitter != null && + message.hasOwnProperty("wormholeEmitter") + ) { + if (properties.source === 1) return "source: multiple values"; + properties.source = 1; + { + let error = + $root.pyth_lazer_transaction.GovernanceSource.WormholeEmitter.verify( + message.wormholeEmitter, + ); + if (error) return "wormholeEmitter." + error; + } + } + return null; + }; + + /** + * Creates a GovernanceSource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.GovernanceSource + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.GovernanceSource} GovernanceSource + */ + GovernanceSource.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.GovernanceSource) + return object; + let message = new $root.pyth_lazer_transaction.GovernanceSource(); + if (object.singleEd25519 != null) { + if (typeof object.singleEd25519 !== "object") + throw TypeError( + ".pyth_lazer_transaction.GovernanceSource.singleEd25519: object expected", + ); + message.singleEd25519 = + $root.pyth_lazer_transaction.GovernanceSource.SingleEd25519.fromObject( + object.singleEd25519, + ); + } + if (object.wormholeEmitter != null) { + if (typeof object.wormholeEmitter !== "object") + throw TypeError( + ".pyth_lazer_transaction.GovernanceSource.wormholeEmitter: object expected", + ); + message.wormholeEmitter = + $root.pyth_lazer_transaction.GovernanceSource.WormholeEmitter.fromObject( + object.wormholeEmitter, + ); + } + return message; + }; + + /** + * Creates a plain object from a GovernanceSource message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.GovernanceSource + * @static + * @param {pyth_lazer_transaction.GovernanceSource} message GovernanceSource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GovernanceSource.toObject = function toObject(message, options) { + if (!options) options = {}; + let object = {}; + if ( + message.singleEd25519 != null && + message.hasOwnProperty("singleEd25519") + ) { + object.singleEd25519 = + $root.pyth_lazer_transaction.GovernanceSource.SingleEd25519.toObject( + message.singleEd25519, + options, + ); + if (options.oneofs) object.source = "singleEd25519"; + } + if ( + message.wormholeEmitter != null && + message.hasOwnProperty("wormholeEmitter") + ) { + object.wormholeEmitter = + $root.pyth_lazer_transaction.GovernanceSource.WormholeEmitter.toObject( + message.wormholeEmitter, + options, + ); + if (options.oneofs) object.source = "wormholeEmitter"; + } + return object; + }; + + /** + * Converts this GovernanceSource to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.GovernanceSource + * @instance + * @returns {Object.} JSON object + */ + GovernanceSource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GovernanceSource + * @function getTypeUrl + * @memberof pyth_lazer_transaction.GovernanceSource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GovernanceSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.GovernanceSource"; + }; + + GovernanceSource.SingleEd25519 = (function () { + /** + * Properties of a SingleEd25519. + * @memberof pyth_lazer_transaction.GovernanceSource + * @interface ISingleEd25519 + * @property {Uint8Array|null} [publicKey] SingleEd25519 publicKey + */ + + /** + * Constructs a new SingleEd25519. + * @memberof pyth_lazer_transaction.GovernanceSource + * @classdesc Represents a SingleEd25519. + * @implements ISingleEd25519 + * @constructor + * @param {pyth_lazer_transaction.GovernanceSource.ISingleEd25519=} [properties] Properties to set + */ + function SingleEd25519(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]]; + } + + /** + * SingleEd25519 publicKey. + * @member {Uint8Array|null|undefined} publicKey + * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 + * @instance + */ + SingleEd25519.prototype.publicKey = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * SingleEd25519 _publicKey. + * @member {"publicKey"|undefined} _publicKey + * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 + * @instance + */ + Object.defineProperty(SingleEd25519.prototype, "_publicKey", { + get: $util.oneOfGetter(($oneOfFields = ["publicKey"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Creates a new SingleEd25519 instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 + * @static + * @param {pyth_lazer_transaction.GovernanceSource.ISingleEd25519=} [properties] Properties to set + * @returns {pyth_lazer_transaction.GovernanceSource.SingleEd25519} SingleEd25519 instance + */ + SingleEd25519.create = function create(properties) { + return new SingleEd25519(properties); + }; + + /** + * Encodes the specified SingleEd25519 message. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.SingleEd25519.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 + * @static + * @param {pyth_lazer_transaction.GovernanceSource.ISingleEd25519} message SingleEd25519 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SingleEd25519.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 SingleEd25519 message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.SingleEd25519.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 + * @static + * @param {pyth_lazer_transaction.GovernanceSource.ISingleEd25519} message SingleEd25519 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SingleEd25519.encodeDelimited = function encodeDelimited( + message, + writer, + ) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SingleEd25519 message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.GovernanceSource.SingleEd25519} SingleEd25519 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SingleEd25519.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, + message = + new $root.pyth_lazer_transaction.GovernanceSource.SingleEd25519(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.publicKey = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SingleEd25519 message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.GovernanceSource.SingleEd25519} SingleEd25519 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SingleEd25519.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SingleEd25519 message. + * @function verify + * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SingleEd25519.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if (message.publicKey != null && message.hasOwnProperty("publicKey")) { + properties._publicKey = 1; + if ( + !( + (message.publicKey && + typeof message.publicKey.length === "number") || + $util.isString(message.publicKey) + ) + ) + return "publicKey: buffer expected"; + } + return null; + }; + + /** + * Creates a SingleEd25519 message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.GovernanceSource.SingleEd25519} SingleEd25519 + */ + SingleEd25519.fromObject = function fromObject(object) { + if ( + object instanceof + $root.pyth_lazer_transaction.GovernanceSource.SingleEd25519 + ) + return object; + let message = + new $root.pyth_lazer_transaction.GovernanceSource.SingleEd25519(); + if (object.publicKey != null) + if (typeof object.publicKey === "string") + $util.base64.decode( + object.publicKey, + (message.publicKey = $util.newBuffer( + $util.base64.length(object.publicKey), + )), + 0, + ); + else if (object.publicKey.length >= 0) + message.publicKey = object.publicKey; + return message; + }; + + /** + * Creates a plain object from a SingleEd25519 message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 + * @static + * @param {pyth_lazer_transaction.GovernanceSource.SingleEd25519} message SingleEd25519 + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SingleEd25519.toObject = function toObject(message, options) { + if (!options) options = {}; + let object = {}; + 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; + if (options.oneofs) object._publicKey = "publicKey"; + } + return object; + }; + + /** + * Converts this SingleEd25519 to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 + * @instance + * @returns {Object.} JSON object + */ + SingleEd25519.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SingleEd25519 + * @function getTypeUrl + * @memberof pyth_lazer_transaction.GovernanceSource.SingleEd25519 + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SingleEd25519.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return ( + typeUrlPrefix + + "/pyth_lazer_transaction.GovernanceSource.SingleEd25519" + ); + }; + + return SingleEd25519; + })(); + + GovernanceSource.WormholeEmitter = (function () { + /** + * Properties of a WormholeEmitter. + * @memberof pyth_lazer_transaction.GovernanceSource + * @interface IWormholeEmitter + * @property {Uint8Array|null} [address] WormholeEmitter address + * @property {number|null} [chainId] WormholeEmitter chainId + */ + + /** + * Constructs a new WormholeEmitter. + * @memberof pyth_lazer_transaction.GovernanceSource + * @classdesc Represents a WormholeEmitter. + * @implements IWormholeEmitter + * @constructor + * @param {pyth_lazer_transaction.GovernanceSource.IWormholeEmitter=} [properties] Properties to set + */ + function WormholeEmitter(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]]; + } + + /** + * WormholeEmitter address. + * @member {Uint8Array|null|undefined} address + * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter + * @instance + */ + WormholeEmitter.prototype.address = null; + + /** + * WormholeEmitter chainId. + * @member {number|null|undefined} chainId + * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter + * @instance + */ + WormholeEmitter.prototype.chainId = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * WormholeEmitter _address. + * @member {"address"|undefined} _address + * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter + * @instance + */ + Object.defineProperty(WormholeEmitter.prototype, "_address", { + get: $util.oneOfGetter(($oneOfFields = ["address"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * WormholeEmitter _chainId. + * @member {"chainId"|undefined} _chainId + * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter + * @instance + */ + Object.defineProperty(WormholeEmitter.prototype, "_chainId", { + get: $util.oneOfGetter(($oneOfFields = ["chainId"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Creates a new WormholeEmitter instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter + * @static + * @param {pyth_lazer_transaction.GovernanceSource.IWormholeEmitter=} [properties] Properties to set + * @returns {pyth_lazer_transaction.GovernanceSource.WormholeEmitter} WormholeEmitter instance + */ + WormholeEmitter.create = function create(properties) { + return new WormholeEmitter(properties); + }; + + /** + * Encodes the specified WormholeEmitter message. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.WormholeEmitter.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter + * @static + * @param {pyth_lazer_transaction.GovernanceSource.IWormholeEmitter} message WormholeEmitter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WormholeEmitter.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if ( + message.address != null && + Object.hasOwnProperty.call(message, "address") + ) + writer.uint32(/* id 1, wireType 2 =*/ 10).bytes(message.address); + if ( + message.chainId != null && + Object.hasOwnProperty.call(message, "chainId") + ) + writer.uint32(/* id 2, wireType 0 =*/ 16).uint32(message.chainId); + return writer; + }; + + /** + * Encodes the specified WormholeEmitter message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.WormholeEmitter.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter + * @static + * @param {pyth_lazer_transaction.GovernanceSource.IWormholeEmitter} message WormholeEmitter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WormholeEmitter.encodeDelimited = function encodeDelimited( + message, + writer, + ) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WormholeEmitter message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.GovernanceSource.WormholeEmitter} WormholeEmitter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WormholeEmitter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, + message = + new $root.pyth_lazer_transaction.GovernanceSource.WormholeEmitter(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.address = reader.bytes(); + break; + } + case 2: { + message.chainId = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WormholeEmitter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.GovernanceSource.WormholeEmitter} WormholeEmitter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WormholeEmitter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WormholeEmitter message. + * @function verify + * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WormholeEmitter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if (message.address != null && message.hasOwnProperty("address")) { + properties._address = 1; + if ( + !( + (message.address && typeof message.address.length === "number") || + $util.isString(message.address) + ) + ) + return "address: buffer expected"; + } + if (message.chainId != null && message.hasOwnProperty("chainId")) { + properties._chainId = 1; + if (!$util.isInteger(message.chainId)) + return "chainId: integer expected"; + } + return null; + }; + + /** + * Creates a WormholeEmitter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.GovernanceSource.WormholeEmitter} WormholeEmitter + */ + WormholeEmitter.fromObject = function fromObject(object) { + if ( + object instanceof + $root.pyth_lazer_transaction.GovernanceSource.WormholeEmitter + ) + return object; + let message = + new $root.pyth_lazer_transaction.GovernanceSource.WormholeEmitter(); + if (object.address != null) + if (typeof object.address === "string") + $util.base64.decode( + object.address, + (message.address = $util.newBuffer( + $util.base64.length(object.address), + )), + 0, + ); + else if (object.address.length >= 0) message.address = object.address; + if (object.chainId != null) message.chainId = object.chainId >>> 0; + return message; + }; + + /** + * Creates a plain object from a WormholeEmitter message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter + * @static + * @param {pyth_lazer_transaction.GovernanceSource.WormholeEmitter} message WormholeEmitter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WormholeEmitter.toObject = function toObject(message, options) { + if (!options) options = {}; + let object = {}; + if (message.address != null && message.hasOwnProperty("address")) { + object.address = + options.bytes === String + ? $util.base64.encode(message.address, 0, message.address.length) + : options.bytes === Array + ? Array.prototype.slice.call(message.address) + : message.address; + if (options.oneofs) object._address = "address"; + } + if (message.chainId != null && message.hasOwnProperty("chainId")) { + object.chainId = message.chainId; + if (options.oneofs) object._chainId = "chainId"; + } + return object; + }; + + /** + * Converts this WormholeEmitter to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter + * @instance + * @returns {Object.} JSON object + */ + WormholeEmitter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WormholeEmitter + * @function getTypeUrl + * @memberof pyth_lazer_transaction.GovernanceSource.WormholeEmitter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WormholeEmitter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return ( + typeUrlPrefix + + "/pyth_lazer_transaction.GovernanceSource.WormholeEmitter" + ); + }; + + return WormholeEmitter; + })(); + + return GovernanceSource; + })(); + + pyth_lazer_transaction.CreateShard = (function () { + /** + * Properties of a CreateShard. + * @memberof pyth_lazer_transaction + * @interface ICreateShard + * @property {number|null} [shardId] CreateShard shardId + * @property {string|null} [shardGroup] CreateShard shardGroup + * @property {google.protobuf.IDuration|null} [minRate] CreateShard minRate + */ + + /** + * Constructs a new CreateShard. + * @memberof pyth_lazer_transaction + * @classdesc Represents a CreateShard. + * @implements ICreateShard + * @constructor + * @param {pyth_lazer_transaction.ICreateShard=} [properties] Properties to set + */ + function CreateShard(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]]; + } + + /** + * CreateShard shardId. + * @member {number|null|undefined} shardId + * @memberof pyth_lazer_transaction.CreateShard + * @instance + */ + CreateShard.prototype.shardId = null; + + /** + * CreateShard shardGroup. + * @member {string|null|undefined} shardGroup + * @memberof pyth_lazer_transaction.CreateShard + * @instance + */ + CreateShard.prototype.shardGroup = null; + + /** + * CreateShard minRate. + * @member {google.protobuf.IDuration|null|undefined} minRate + * @memberof pyth_lazer_transaction.CreateShard + * @instance + */ + CreateShard.prototype.minRate = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * CreateShard _shardId. + * @member {"shardId"|undefined} _shardId + * @memberof pyth_lazer_transaction.CreateShard + * @instance + */ + Object.defineProperty(CreateShard.prototype, "_shardId", { + get: $util.oneOfGetter(($oneOfFields = ["shardId"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * CreateShard _shardGroup. + * @member {"shardGroup"|undefined} _shardGroup + * @memberof pyth_lazer_transaction.CreateShard + * @instance + */ + Object.defineProperty(CreateShard.prototype, "_shardGroup", { + get: $util.oneOfGetter(($oneOfFields = ["shardGroup"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * CreateShard _minRate. + * @member {"minRate"|undefined} _minRate + * @memberof pyth_lazer_transaction.CreateShard + * @instance + */ + Object.defineProperty(CreateShard.prototype, "_minRate", { + get: $util.oneOfGetter(($oneOfFields = ["minRate"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Creates a new CreateShard instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.CreateShard + * @static + * @param {pyth_lazer_transaction.ICreateShard=} [properties] Properties to set + * @returns {pyth_lazer_transaction.CreateShard} CreateShard instance + */ + CreateShard.create = function create(properties) { + return new CreateShard(properties); + }; + + /** + * Encodes the specified CreateShard message. Does not implicitly {@link pyth_lazer_transaction.CreateShard.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.CreateShard + * @static + * @param {pyth_lazer_transaction.ICreateShard} message CreateShard message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateShard.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if ( + message.shardId != null && + Object.hasOwnProperty.call(message, "shardId") + ) + writer.uint32(/* id 1, wireType 0 =*/ 8).uint32(message.shardId); + if ( + message.shardGroup != null && + Object.hasOwnProperty.call(message, "shardGroup") + ) + writer.uint32(/* id 2, wireType 2 =*/ 18).string(message.shardGroup); + if ( + message.minRate != null && + Object.hasOwnProperty.call(message, "minRate") + ) + $root.google.protobuf.Duration.encode( + message.minRate, + writer.uint32(/* id 3, wireType 2 =*/ 26).fork(), + ).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateShard message, length delimited. Does not implicitly {@link pyth_lazer_transaction.CreateShard.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.CreateShard + * @static + * @param {pyth_lazer_transaction.ICreateShard} message CreateShard message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateShard.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateShard message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.CreateShard + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.CreateShard} CreateShard + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateShard.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pyth_lazer_transaction.CreateShard(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.shardId = reader.uint32(); + break; + } + case 2: { + message.shardGroup = reader.string(); + break; + } + case 3: { + message.minRate = $root.google.protobuf.Duration.decode( + reader, + reader.uint32(), + ); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateShard message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.CreateShard + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.CreateShard} CreateShard + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateShard.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateShard message. + * @function verify + * @memberof pyth_lazer_transaction.CreateShard + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateShard.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if (message.shardId != null && message.hasOwnProperty("shardId")) { + properties._shardId = 1; + if (!$util.isInteger(message.shardId)) + return "shardId: integer expected"; + } + if (message.shardGroup != null && message.hasOwnProperty("shardGroup")) { + properties._shardGroup = 1; + if (!$util.isString(message.shardGroup)) + return "shardGroup: string expected"; + } + if (message.minRate != null && message.hasOwnProperty("minRate")) { + properties._minRate = 1; + { + let error = $root.google.protobuf.Duration.verify(message.minRate); + if (error) return "minRate." + error; + } + } + return null; + }; + + /** + * Creates a CreateShard message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.CreateShard + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.CreateShard} CreateShard + */ + CreateShard.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.CreateShard) + return object; + let message = new $root.pyth_lazer_transaction.CreateShard(); + if (object.shardId != null) message.shardId = object.shardId >>> 0; + if (object.shardGroup != null) + message.shardGroup = String(object.shardGroup); + if (object.minRate != null) { + if (typeof object.minRate !== "object") + throw TypeError( + ".pyth_lazer_transaction.CreateShard.minRate: object expected", + ); + message.minRate = $root.google.protobuf.Duration.fromObject( + object.minRate, + ); + } + return message; + }; + + /** + * Creates a plain object from a CreateShard message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.CreateShard + * @static + * @param {pyth_lazer_transaction.CreateShard} message CreateShard + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateShard.toObject = function toObject(message, options) { + if (!options) options = {}; + let object = {}; + if (message.shardId != null && message.hasOwnProperty("shardId")) { + object.shardId = message.shardId; + if (options.oneofs) object._shardId = "shardId"; + } + if (message.shardGroup != null && message.hasOwnProperty("shardGroup")) { + object.shardGroup = message.shardGroup; + if (options.oneofs) object._shardGroup = "shardGroup"; + } + if (message.minRate != null && message.hasOwnProperty("minRate")) { + object.minRate = $root.google.protobuf.Duration.toObject( + message.minRate, + options, + ); + if (options.oneofs) object._minRate = "minRate"; + } + return object; + }; + + /** + * Converts this CreateShard to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.CreateShard + * @instance + * @returns {Object.} JSON object + */ + CreateShard.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateShard + * @function getTypeUrl + * @memberof pyth_lazer_transaction.CreateShard + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateShard.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.CreateShard"; + }; + + return CreateShard; + })(); + + pyth_lazer_transaction.AddGovernanceSource = (function () { + /** + * Properties of an AddGovernanceSource. + * @memberof pyth_lazer_transaction + * @interface IAddGovernanceSource + * @property {pyth_lazer_transaction.IGovernanceSource|null} [newSource] AddGovernanceSource newSource + * @property {pyth_lazer_transaction.IPermissions|null} [permissions] AddGovernanceSource permissions + */ + + /** + * Constructs a new AddGovernanceSource. + * @memberof pyth_lazer_transaction + * @classdesc Represents an AddGovernanceSource. + * @implements IAddGovernanceSource + * @constructor + * @param {pyth_lazer_transaction.IAddGovernanceSource=} [properties] Properties to set + */ + function AddGovernanceSource(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]]; + } + + /** + * AddGovernanceSource newSource. + * @member {pyth_lazer_transaction.IGovernanceSource|null|undefined} newSource + * @memberof pyth_lazer_transaction.AddGovernanceSource + * @instance + */ + AddGovernanceSource.prototype.newSource = null; + + /** + * AddGovernanceSource permissions. + * @member {pyth_lazer_transaction.IPermissions|null|undefined} permissions + * @memberof pyth_lazer_transaction.AddGovernanceSource + * @instance + */ + AddGovernanceSource.prototype.permissions = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * AddGovernanceSource _newSource. + * @member {"newSource"|undefined} _newSource + * @memberof pyth_lazer_transaction.AddGovernanceSource + * @instance + */ + Object.defineProperty(AddGovernanceSource.prototype, "_newSource", { + get: $util.oneOfGetter(($oneOfFields = ["newSource"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * AddGovernanceSource _permissions. + * @member {"permissions"|undefined} _permissions + * @memberof pyth_lazer_transaction.AddGovernanceSource + * @instance + */ + Object.defineProperty(AddGovernanceSource.prototype, "_permissions", { + get: $util.oneOfGetter(($oneOfFields = ["permissions"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Creates a new AddGovernanceSource instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.AddGovernanceSource + * @static + * @param {pyth_lazer_transaction.IAddGovernanceSource=} [properties] Properties to set + * @returns {pyth_lazer_transaction.AddGovernanceSource} AddGovernanceSource instance + */ + AddGovernanceSource.create = function create(properties) { + return new AddGovernanceSource(properties); + }; + + /** + * Encodes the specified AddGovernanceSource message. Does not implicitly {@link pyth_lazer_transaction.AddGovernanceSource.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.AddGovernanceSource + * @static + * @param {pyth_lazer_transaction.IAddGovernanceSource} message AddGovernanceSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddGovernanceSource.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if ( + message.newSource != null && + Object.hasOwnProperty.call(message, "newSource") + ) + $root.pyth_lazer_transaction.GovernanceSource.encode( + message.newSource, + writer.uint32(/* id 1, wireType 2 =*/ 10).fork(), + ).ldelim(); + if ( + message.permissions != null && + Object.hasOwnProperty.call(message, "permissions") + ) + $root.pyth_lazer_transaction.Permissions.encode( + message.permissions, + writer.uint32(/* id 2, wireType 2 =*/ 18).fork(), + ).ldelim(); + return writer; + }; + + /** + * Encodes the specified AddGovernanceSource message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddGovernanceSource.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.AddGovernanceSource + * @static + * @param {pyth_lazer_transaction.IAddGovernanceSource} message AddGovernanceSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddGovernanceSource.encodeDelimited = function encodeDelimited( + message, + writer, + ) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AddGovernanceSource message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.AddGovernanceSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.AddGovernanceSource} AddGovernanceSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddGovernanceSource.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pyth_lazer_transaction.AddGovernanceSource(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.newSource = + $root.pyth_lazer_transaction.GovernanceSource.decode( + reader, + reader.uint32(), + ); + break; + } + case 2: { + message.permissions = + $root.pyth_lazer_transaction.Permissions.decode( + reader, + reader.uint32(), + ); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AddGovernanceSource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.AddGovernanceSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.AddGovernanceSource} AddGovernanceSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddGovernanceSource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AddGovernanceSource message. + * @function verify + * @memberof pyth_lazer_transaction.AddGovernanceSource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AddGovernanceSource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if (message.newSource != null && message.hasOwnProperty("newSource")) { + properties._newSource = 1; + { + let error = $root.pyth_lazer_transaction.GovernanceSource.verify( + message.newSource, + ); + if (error) return "newSource." + error; + } + } + if ( + message.permissions != null && + message.hasOwnProperty("permissions") + ) { + properties._permissions = 1; + { + let error = $root.pyth_lazer_transaction.Permissions.verify( + message.permissions, + ); + if (error) return "permissions." + error; + } + } + return null; + }; + + /** + * Creates an AddGovernanceSource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.AddGovernanceSource + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.AddGovernanceSource} AddGovernanceSource + */ + AddGovernanceSource.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.AddGovernanceSource) + return object; + let message = new $root.pyth_lazer_transaction.AddGovernanceSource(); + if (object.newSource != null) { + if (typeof object.newSource !== "object") + throw TypeError( + ".pyth_lazer_transaction.AddGovernanceSource.newSource: object expected", + ); + message.newSource = + $root.pyth_lazer_transaction.GovernanceSource.fromObject( + object.newSource, + ); + } + if (object.permissions != null) { + if (typeof object.permissions !== "object") + throw TypeError( + ".pyth_lazer_transaction.AddGovernanceSource.permissions: object expected", + ); + message.permissions = + $root.pyth_lazer_transaction.Permissions.fromObject( + object.permissions, + ); + } + return message; + }; + + /** + * Creates a plain object from an AddGovernanceSource message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.AddGovernanceSource + * @static + * @param {pyth_lazer_transaction.AddGovernanceSource} message AddGovernanceSource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AddGovernanceSource.toObject = function toObject(message, options) { + if (!options) options = {}; + let object = {}; + if (message.newSource != null && message.hasOwnProperty("newSource")) { + object.newSource = + $root.pyth_lazer_transaction.GovernanceSource.toObject( + message.newSource, + options, + ); + if (options.oneofs) object._newSource = "newSource"; + } + if ( + message.permissions != null && + message.hasOwnProperty("permissions") + ) { + object.permissions = $root.pyth_lazer_transaction.Permissions.toObject( + message.permissions, + options, + ); + if (options.oneofs) object._permissions = "permissions"; + } + return object; + }; + + /** + * Converts this AddGovernanceSource to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.AddGovernanceSource + * @instance + * @returns {Object.} JSON object + */ + AddGovernanceSource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AddGovernanceSource + * @function getTypeUrl + * @memberof pyth_lazer_transaction.AddGovernanceSource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AddGovernanceSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.AddGovernanceSource"; + }; + + return AddGovernanceSource; + })(); + + pyth_lazer_transaction.UpdateGovernanceSource = (function () { + /** + * Properties of an UpdateGovernanceSource. + * @memberof pyth_lazer_transaction + * @interface IUpdateGovernanceSource + * @property {pyth_lazer_transaction.IGovernanceSource|null} [source] UpdateGovernanceSource source + * @property {pyth_lazer_transaction.ISetGovernanceSourcePermissions|null} [setGovernanceSourcePermissions] UpdateGovernanceSource setGovernanceSourcePermissions + * @property {google.protobuf.IEmpty|null} [removeGovernanceSource] UpdateGovernanceSource removeGovernanceSource + */ + + /** + * Constructs a new UpdateGovernanceSource. + * @memberof pyth_lazer_transaction + * @classdesc Represents an UpdateGovernanceSource. + * @implements IUpdateGovernanceSource + * @constructor + * @param {pyth_lazer_transaction.IUpdateGovernanceSource=} [properties] Properties to set + */ + function UpdateGovernanceSource(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]]; + } + + /** + * UpdateGovernanceSource source. + * @member {pyth_lazer_transaction.IGovernanceSource|null|undefined} source + * @memberof pyth_lazer_transaction.UpdateGovernanceSource + * @instance + */ + UpdateGovernanceSource.prototype.source = null; + + /** + * UpdateGovernanceSource setGovernanceSourcePermissions. + * @member {pyth_lazer_transaction.ISetGovernanceSourcePermissions|null|undefined} setGovernanceSourcePermissions + * @memberof pyth_lazer_transaction.UpdateGovernanceSource + * @instance + */ + UpdateGovernanceSource.prototype.setGovernanceSourcePermissions = null; + + /** + * UpdateGovernanceSource removeGovernanceSource. + * @member {google.protobuf.IEmpty|null|undefined} removeGovernanceSource + * @memberof pyth_lazer_transaction.UpdateGovernanceSource + * @instance + */ + UpdateGovernanceSource.prototype.removeGovernanceSource = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * UpdateGovernanceSource _source. + * @member {"source"|undefined} _source + * @memberof pyth_lazer_transaction.UpdateGovernanceSource + * @instance + */ + Object.defineProperty(UpdateGovernanceSource.prototype, "_source", { + get: $util.oneOfGetter(($oneOfFields = ["source"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * UpdateGovernanceSource action. + * @member {"setGovernanceSourcePermissions"|"removeGovernanceSource"|undefined} action + * @memberof pyth_lazer_transaction.UpdateGovernanceSource + * @instance + */ + Object.defineProperty(UpdateGovernanceSource.prototype, "action", { + get: $util.oneOfGetter( + ($oneOfFields = [ + "setGovernanceSourcePermissions", + "removeGovernanceSource", + ]), + ), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Creates a new UpdateGovernanceSource instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.UpdateGovernanceSource + * @static + * @param {pyth_lazer_transaction.IUpdateGovernanceSource=} [properties] Properties to set + * @returns {pyth_lazer_transaction.UpdateGovernanceSource} UpdateGovernanceSource instance + */ + UpdateGovernanceSource.create = function create(properties) { + return new UpdateGovernanceSource(properties); + }; + + /** + * Encodes the specified UpdateGovernanceSource message. Does not implicitly {@link pyth_lazer_transaction.UpdateGovernanceSource.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.UpdateGovernanceSource + * @static + * @param {pyth_lazer_transaction.IUpdateGovernanceSource} message UpdateGovernanceSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateGovernanceSource.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if ( + message.source != null && + Object.hasOwnProperty.call(message, "source") + ) + $root.pyth_lazer_transaction.GovernanceSource.encode( + message.source, + writer.uint32(/* id 1, wireType 2 =*/ 10).fork(), + ).ldelim(); + if ( + message.setGovernanceSourcePermissions != null && + Object.hasOwnProperty.call(message, "setGovernanceSourcePermissions") + ) + $root.pyth_lazer_transaction.SetGovernanceSourcePermissions.encode( + message.setGovernanceSourcePermissions, + writer.uint32(/* id 101, wireType 2 =*/ 810).fork(), + ).ldelim(); + if ( + message.removeGovernanceSource != null && + Object.hasOwnProperty.call(message, "removeGovernanceSource") + ) + $root.google.protobuf.Empty.encode( + message.removeGovernanceSource, + writer.uint32(/* id 199, wireType 2 =*/ 1594).fork(), + ).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateGovernanceSource message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdateGovernanceSource.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.UpdateGovernanceSource + * @static + * @param {pyth_lazer_transaction.IUpdateGovernanceSource} message UpdateGovernanceSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateGovernanceSource.encodeDelimited = function encodeDelimited( + message, + writer, + ) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateGovernanceSource message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.UpdateGovernanceSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.UpdateGovernanceSource} UpdateGovernanceSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateGovernanceSource.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pyth_lazer_transaction.UpdateGovernanceSource(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.source = + $root.pyth_lazer_transaction.GovernanceSource.decode( + reader, + reader.uint32(), + ); + break; + } + case 101: { + message.setGovernanceSourcePermissions = + $root.pyth_lazer_transaction.SetGovernanceSourcePermissions.decode( + reader, + reader.uint32(), + ); + break; + } + case 199: { + message.removeGovernanceSource = $root.google.protobuf.Empty.decode( + reader, + reader.uint32(), + ); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateGovernanceSource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.UpdateGovernanceSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.UpdateGovernanceSource} UpdateGovernanceSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateGovernanceSource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateGovernanceSource message. + * @function verify + * @memberof pyth_lazer_transaction.UpdateGovernanceSource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateGovernanceSource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if (message.source != null && message.hasOwnProperty("source")) { + properties._source = 1; + { + let error = $root.pyth_lazer_transaction.GovernanceSource.verify( + message.source, + ); + if (error) return "source." + error; + } + } + if ( + message.setGovernanceSourcePermissions != null && + message.hasOwnProperty("setGovernanceSourcePermissions") + ) { + properties.action = 1; + { + let error = + $root.pyth_lazer_transaction.SetGovernanceSourcePermissions.verify( + message.setGovernanceSourcePermissions, + ); + if (error) return "setGovernanceSourcePermissions." + error; + } + } + if ( + message.removeGovernanceSource != null && + message.hasOwnProperty("removeGovernanceSource") + ) { + if (properties.action === 1) return "action: multiple values"; + properties.action = 1; + { + let error = $root.google.protobuf.Empty.verify( + message.removeGovernanceSource, + ); + if (error) return "removeGovernanceSource." + error; + } + } + return null; + }; + + /** + * Creates an UpdateGovernanceSource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.UpdateGovernanceSource + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.UpdateGovernanceSource} UpdateGovernanceSource + */ + UpdateGovernanceSource.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.UpdateGovernanceSource) + return object; + let message = new $root.pyth_lazer_transaction.UpdateGovernanceSource(); + if (object.source != null) { + if (typeof object.source !== "object") + throw TypeError( + ".pyth_lazer_transaction.UpdateGovernanceSource.source: object expected", + ); + message.source = + $root.pyth_lazer_transaction.GovernanceSource.fromObject( + object.source, + ); + } + if (object.setGovernanceSourcePermissions != null) { + if (typeof object.setGovernanceSourcePermissions !== "object") + throw TypeError( + ".pyth_lazer_transaction.UpdateGovernanceSource.setGovernanceSourcePermissions: object expected", + ); + message.setGovernanceSourcePermissions = + $root.pyth_lazer_transaction.SetGovernanceSourcePermissions.fromObject( + object.setGovernanceSourcePermissions, + ); + } + if (object.removeGovernanceSource != null) { + if (typeof object.removeGovernanceSource !== "object") + throw TypeError( + ".pyth_lazer_transaction.UpdateGovernanceSource.removeGovernanceSource: object expected", + ); + message.removeGovernanceSource = $root.google.protobuf.Empty.fromObject( + object.removeGovernanceSource, + ); + } + return message; + }; + + /** + * Creates a plain object from an UpdateGovernanceSource message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.UpdateGovernanceSource + * @static + * @param {pyth_lazer_transaction.UpdateGovernanceSource} message UpdateGovernanceSource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateGovernanceSource.toObject = function toObject(message, options) { + if (!options) options = {}; + let object = {}; + if (message.source != null && message.hasOwnProperty("source")) { + object.source = $root.pyth_lazer_transaction.GovernanceSource.toObject( + message.source, + options, + ); + if (options.oneofs) object._source = "source"; + } + if ( + message.setGovernanceSourcePermissions != null && + message.hasOwnProperty("setGovernanceSourcePermissions") + ) { + object.setGovernanceSourcePermissions = + $root.pyth_lazer_transaction.SetGovernanceSourcePermissions.toObject( + message.setGovernanceSourcePermissions, + options, + ); + if (options.oneofs) object.action = "setGovernanceSourcePermissions"; + } + if ( + message.removeGovernanceSource != null && + message.hasOwnProperty("removeGovernanceSource") + ) { + object.removeGovernanceSource = $root.google.protobuf.Empty.toObject( + message.removeGovernanceSource, + options, + ); + if (options.oneofs) object.action = "removeGovernanceSource"; + } + return object; + }; + + /** + * Converts this UpdateGovernanceSource to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.UpdateGovernanceSource + * @instance + * @returns {Object.} JSON object + */ + UpdateGovernanceSource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateGovernanceSource + * @function getTypeUrl + * @memberof pyth_lazer_transaction.UpdateGovernanceSource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateGovernanceSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.UpdateGovernanceSource"; + }; + + return UpdateGovernanceSource; + })(); + + pyth_lazer_transaction.SetGovernanceSourcePermissions = (function () { + /** + * Properties of a SetGovernanceSourcePermissions. + * @memberof pyth_lazer_transaction + * @interface ISetGovernanceSourcePermissions + * @property {pyth_lazer_transaction.IPermissions|null} [permissions] SetGovernanceSourcePermissions permissions + */ + + /** + * Constructs a new SetGovernanceSourcePermissions. + * @memberof pyth_lazer_transaction + * @classdesc Represents a SetGovernanceSourcePermissions. + * @implements ISetGovernanceSourcePermissions + * @constructor + * @param {pyth_lazer_transaction.ISetGovernanceSourcePermissions=} [properties] Properties to set + */ + function SetGovernanceSourcePermissions(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]]; + } + + /** + * SetGovernanceSourcePermissions permissions. + * @member {pyth_lazer_transaction.IPermissions|null|undefined} permissions + * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions + * @instance + */ + SetGovernanceSourcePermissions.prototype.permissions = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * SetGovernanceSourcePermissions _permissions. + * @member {"permissions"|undefined} _permissions + * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions + * @instance + */ + Object.defineProperty( + SetGovernanceSourcePermissions.prototype, + "_permissions", + { + get: $util.oneOfGetter(($oneOfFields = ["permissions"])), + set: $util.oneOfSetter($oneOfFields), + }, + ); + + /** + * Creates a new SetGovernanceSourcePermissions instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions + * @static + * @param {pyth_lazer_transaction.ISetGovernanceSourcePermissions=} [properties] Properties to set + * @returns {pyth_lazer_transaction.SetGovernanceSourcePermissions} SetGovernanceSourcePermissions instance + */ + SetGovernanceSourcePermissions.create = function create(properties) { + return new SetGovernanceSourcePermissions(properties); + }; + + /** + * Encodes the specified SetGovernanceSourcePermissions message. Does not implicitly {@link pyth_lazer_transaction.SetGovernanceSourcePermissions.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions + * @static + * @param {pyth_lazer_transaction.ISetGovernanceSourcePermissions} message SetGovernanceSourcePermissions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetGovernanceSourcePermissions.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if ( + message.permissions != null && + Object.hasOwnProperty.call(message, "permissions") + ) + $root.pyth_lazer_transaction.Permissions.encode( + message.permissions, + writer.uint32(/* id 1, wireType 2 =*/ 10).fork(), + ).ldelim(); + return writer; + }; + + /** + * Encodes the specified SetGovernanceSourcePermissions message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetGovernanceSourcePermissions.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions + * @static + * @param {pyth_lazer_transaction.ISetGovernanceSourcePermissions} message SetGovernanceSourcePermissions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetGovernanceSourcePermissions.encodeDelimited = function encodeDelimited( + message, + writer, + ) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetGovernanceSourcePermissions message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.SetGovernanceSourcePermissions} SetGovernanceSourcePermissions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetGovernanceSourcePermissions.decode = function decode( + reader, + length, + error, + ) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, + message = + new $root.pyth_lazer_transaction.SetGovernanceSourcePermissions(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.permissions = + $root.pyth_lazer_transaction.Permissions.decode( + reader, + reader.uint32(), + ); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetGovernanceSourcePermissions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.SetGovernanceSourcePermissions} SetGovernanceSourcePermissions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetGovernanceSourcePermissions.decodeDelimited = function decodeDelimited( + reader, + ) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetGovernanceSourcePermissions message. + * @function verify + * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetGovernanceSourcePermissions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if ( + message.permissions != null && + message.hasOwnProperty("permissions") + ) { + properties._permissions = 1; + { + let error = $root.pyth_lazer_transaction.Permissions.verify( + message.permissions, + ); + if (error) return "permissions." + error; + } + } + return null; + }; + + /** + * Creates a SetGovernanceSourcePermissions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.SetGovernanceSourcePermissions} SetGovernanceSourcePermissions + */ + SetGovernanceSourcePermissions.fromObject = function fromObject(object) { + if ( + object instanceof + $root.pyth_lazer_transaction.SetGovernanceSourcePermissions + ) + return object; + let message = + new $root.pyth_lazer_transaction.SetGovernanceSourcePermissions(); + if (object.permissions != null) { + if (typeof object.permissions !== "object") + throw TypeError( + ".pyth_lazer_transaction.SetGovernanceSourcePermissions.permissions: object expected", + ); + message.permissions = + $root.pyth_lazer_transaction.Permissions.fromObject( + object.permissions, + ); + } + return message; + }; + + /** + * Creates a plain object from a SetGovernanceSourcePermissions message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions + * @static + * @param {pyth_lazer_transaction.SetGovernanceSourcePermissions} message SetGovernanceSourcePermissions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetGovernanceSourcePermissions.toObject = function toObject( + message, + options, + ) { + if (!options) options = {}; + let object = {}; + if ( + message.permissions != null && + message.hasOwnProperty("permissions") + ) { + object.permissions = $root.pyth_lazer_transaction.Permissions.toObject( + message.permissions, + options, + ); + if (options.oneofs) object._permissions = "permissions"; + } + return object; + }; + + /** + * Converts this SetGovernanceSourcePermissions to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions + * @instance + * @returns {Object.} JSON object + */ + SetGovernanceSourcePermissions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetGovernanceSourcePermissions + * @function getTypeUrl + * @memberof pyth_lazer_transaction.SetGovernanceSourcePermissions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetGovernanceSourcePermissions.getTypeUrl = function getTypeUrl( + typeUrlPrefix, + ) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return ( + typeUrlPrefix + "/pyth_lazer_transaction.SetGovernanceSourcePermissions" + ); + }; + + return SetGovernanceSourcePermissions; + })(); + + pyth_lazer_transaction.SetShardName = (function () { + /** + * Properties of a SetShardName. + * @memberof pyth_lazer_transaction + * @interface ISetShardName + * @property {string|null} [shardName] SetShardName shardName + */ + + /** + * Constructs a new SetShardName. + * @memberof pyth_lazer_transaction + * @classdesc Represents a SetShardName. + * @implements ISetShardName + * @constructor + * @param {pyth_lazer_transaction.ISetShardName=} [properties] Properties to set + */ + function SetShardName(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]]; + } + + /** + * SetShardName shardName. + * @member {string|null|undefined} shardName + * @memberof pyth_lazer_transaction.SetShardName + * @instance + */ + SetShardName.prototype.shardName = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * SetShardName _shardName. + * @member {"shardName"|undefined} _shardName + * @memberof pyth_lazer_transaction.SetShardName + * @instance + */ + Object.defineProperty(SetShardName.prototype, "_shardName", { + get: $util.oneOfGetter(($oneOfFields = ["shardName"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Creates a new SetShardName instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.SetShardName + * @static + * @param {pyth_lazer_transaction.ISetShardName=} [properties] Properties to set + * @returns {pyth_lazer_transaction.SetShardName} SetShardName instance + */ + SetShardName.create = function create(properties) { + return new SetShardName(properties); + }; + + /** + * Encodes the specified SetShardName message. Does not implicitly {@link pyth_lazer_transaction.SetShardName.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.SetShardName + * @static + * @param {pyth_lazer_transaction.ISetShardName} message SetShardName message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetShardName.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if ( + message.shardName != null && + Object.hasOwnProperty.call(message, "shardName") + ) + writer.uint32(/* id 1, wireType 2 =*/ 10).string(message.shardName); + return writer; + }; + + /** + * Encodes the specified SetShardName message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetShardName.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.SetShardName + * @static + * @param {pyth_lazer_transaction.ISetShardName} message SetShardName message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetShardName.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetShardName message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.SetShardName + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.SetShardName} SetShardName + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetShardName.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pyth_lazer_transaction.SetShardName(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.shardName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetShardName message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.SetShardName + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.SetShardName} SetShardName + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetShardName.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetShardName message. + * @function verify + * @memberof pyth_lazer_transaction.SetShardName + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetShardName.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if (message.shardName != null && message.hasOwnProperty("shardName")) { + properties._shardName = 1; + if (!$util.isString(message.shardName)) + return "shardName: string expected"; + } + return null; + }; + + /** + * Creates a SetShardName message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.SetShardName + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.SetShardName} SetShardName + */ + SetShardName.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.SetShardName) + return object; + let message = new $root.pyth_lazer_transaction.SetShardName(); + if (object.shardName != null) + message.shardName = String(object.shardName); + return message; + }; + + /** + * Creates a plain object from a SetShardName message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.SetShardName + * @static + * @param {pyth_lazer_transaction.SetShardName} message SetShardName + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetShardName.toObject = function toObject(message, options) { + if (!options) options = {}; + let object = {}; + if (message.shardName != null && message.hasOwnProperty("shardName")) { + object.shardName = message.shardName; + if (options.oneofs) object._shardName = "shardName"; + } + return object; + }; + + /** + * Converts this SetShardName to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.SetShardName + * @instance + * @returns {Object.} JSON object + */ + SetShardName.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetShardName + * @function getTypeUrl + * @memberof pyth_lazer_transaction.SetShardName + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetShardName.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.SetShardName"; + }; + + return SetShardName; + })(); + + pyth_lazer_transaction.SetShardGroup = (function () { + /** + * Properties of a SetShardGroup. + * @memberof pyth_lazer_transaction + * @interface ISetShardGroup + * @property {string|null} [shardGroup] SetShardGroup shardGroup + */ + + /** + * Constructs a new SetShardGroup. + * @memberof pyth_lazer_transaction + * @classdesc Represents a SetShardGroup. + * @implements ISetShardGroup + * @constructor + * @param {pyth_lazer_transaction.ISetShardGroup=} [properties] Properties to set + */ + function SetShardGroup(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]]; + } + + /** + * SetShardGroup shardGroup. + * @member {string|null|undefined} shardGroup + * @memberof pyth_lazer_transaction.SetShardGroup + * @instance + */ + SetShardGroup.prototype.shardGroup = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * SetShardGroup _shardGroup. + * @member {"shardGroup"|undefined} _shardGroup + * @memberof pyth_lazer_transaction.SetShardGroup + * @instance + */ + Object.defineProperty(SetShardGroup.prototype, "_shardGroup", { + get: $util.oneOfGetter(($oneOfFields = ["shardGroup"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Creates a new SetShardGroup instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.SetShardGroup + * @static + * @param {pyth_lazer_transaction.ISetShardGroup=} [properties] Properties to set + * @returns {pyth_lazer_transaction.SetShardGroup} SetShardGroup instance + */ + SetShardGroup.create = function create(properties) { + return new SetShardGroup(properties); + }; + + /** + * Encodes the specified SetShardGroup message. Does not implicitly {@link pyth_lazer_transaction.SetShardGroup.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.SetShardGroup + * @static + * @param {pyth_lazer_transaction.ISetShardGroup} message SetShardGroup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetShardGroup.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if ( + message.shardGroup != null && + Object.hasOwnProperty.call(message, "shardGroup") + ) + writer.uint32(/* id 1, wireType 2 =*/ 10).string(message.shardGroup); + return writer; + }; + + /** + * Encodes the specified SetShardGroup message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetShardGroup.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.SetShardGroup + * @static + * @param {pyth_lazer_transaction.ISetShardGroup} message SetShardGroup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetShardGroup.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetShardGroup message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.SetShardGroup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.SetShardGroup} SetShardGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetShardGroup.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pyth_lazer_transaction.SetShardGroup(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.shardGroup = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetShardGroup message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.SetShardGroup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.SetShardGroup} SetShardGroup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetShardGroup.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetShardGroup message. + * @function verify + * @memberof pyth_lazer_transaction.SetShardGroup + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetShardGroup.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if (message.shardGroup != null && message.hasOwnProperty("shardGroup")) { + properties._shardGroup = 1; + if (!$util.isString(message.shardGroup)) + return "shardGroup: string expected"; + } + return null; + }; + + /** + * Creates a SetShardGroup message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.SetShardGroup + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.SetShardGroup} SetShardGroup + */ + SetShardGroup.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.SetShardGroup) + return object; + let message = new $root.pyth_lazer_transaction.SetShardGroup(); + if (object.shardGroup != null) + message.shardGroup = String(object.shardGroup); + return message; + }; + + /** + * Creates a plain object from a SetShardGroup message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.SetShardGroup + * @static + * @param {pyth_lazer_transaction.SetShardGroup} message SetShardGroup + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetShardGroup.toObject = function toObject(message, options) { + if (!options) options = {}; + let object = {}; + if (message.shardGroup != null && message.hasOwnProperty("shardGroup")) { + object.shardGroup = message.shardGroup; + if (options.oneofs) object._shardGroup = "shardGroup"; + } + return object; + }; + + /** + * Converts this SetShardGroup to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.SetShardGroup + * @instance + * @returns {Object.} JSON object + */ + SetShardGroup.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetShardGroup + * @function getTypeUrl + * @memberof pyth_lazer_transaction.SetShardGroup + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetShardGroup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.SetShardGroup"; + }; + + return SetShardGroup; + })(); + + pyth_lazer_transaction.ResetLastSequenceNo = (function () { + /** + * Properties of a ResetLastSequenceNo. + * @memberof pyth_lazer_transaction + * @interface IResetLastSequenceNo + * @property {number|Long|null} [lastSequenceNo] ResetLastSequenceNo lastSequenceNo + */ + + /** + * Constructs a new ResetLastSequenceNo. + * @memberof pyth_lazer_transaction + * @classdesc Represents a ResetLastSequenceNo. + * @implements IResetLastSequenceNo + * @constructor + * @param {pyth_lazer_transaction.IResetLastSequenceNo=} [properties] Properties to set + */ + function ResetLastSequenceNo(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]]; + } + + /** + * ResetLastSequenceNo lastSequenceNo. + * @member {number|Long|null|undefined} lastSequenceNo + * @memberof pyth_lazer_transaction.ResetLastSequenceNo + * @instance + */ + ResetLastSequenceNo.prototype.lastSequenceNo = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * ResetLastSequenceNo _lastSequenceNo. + * @member {"lastSequenceNo"|undefined} _lastSequenceNo + * @memberof pyth_lazer_transaction.ResetLastSequenceNo + * @instance + */ + Object.defineProperty(ResetLastSequenceNo.prototype, "_lastSequenceNo", { + get: $util.oneOfGetter(($oneOfFields = ["lastSequenceNo"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Creates a new ResetLastSequenceNo instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.ResetLastSequenceNo + * @static + * @param {pyth_lazer_transaction.IResetLastSequenceNo=} [properties] Properties to set + * @returns {pyth_lazer_transaction.ResetLastSequenceNo} ResetLastSequenceNo instance + */ + ResetLastSequenceNo.create = function create(properties) { + return new ResetLastSequenceNo(properties); + }; + + /** + * Encodes the specified ResetLastSequenceNo message. Does not implicitly {@link pyth_lazer_transaction.ResetLastSequenceNo.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.ResetLastSequenceNo + * @static + * @param {pyth_lazer_transaction.IResetLastSequenceNo} message ResetLastSequenceNo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResetLastSequenceNo.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if ( + message.lastSequenceNo != null && + Object.hasOwnProperty.call(message, "lastSequenceNo") + ) + writer.uint32(/* id 1, wireType 0 =*/ 8).uint64(message.lastSequenceNo); + return writer; + }; + + /** + * Encodes the specified ResetLastSequenceNo message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ResetLastSequenceNo.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.ResetLastSequenceNo + * @static + * @param {pyth_lazer_transaction.IResetLastSequenceNo} message ResetLastSequenceNo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResetLastSequenceNo.encodeDelimited = function encodeDelimited( + message, + writer, + ) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResetLastSequenceNo message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.ResetLastSequenceNo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.ResetLastSequenceNo} ResetLastSequenceNo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResetLastSequenceNo.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pyth_lazer_transaction.ResetLastSequenceNo(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.lastSequenceNo = reader.uint64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResetLastSequenceNo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.ResetLastSequenceNo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.ResetLastSequenceNo} ResetLastSequenceNo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResetLastSequenceNo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResetLastSequenceNo message. + * @function verify + * @memberof pyth_lazer_transaction.ResetLastSequenceNo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResetLastSequenceNo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if ( + message.lastSequenceNo != null && + message.hasOwnProperty("lastSequenceNo") + ) { + properties._lastSequenceNo = 1; + if ( + !$util.isInteger(message.lastSequenceNo) && + !( + message.lastSequenceNo && + $util.isInteger(message.lastSequenceNo.low) && + $util.isInteger(message.lastSequenceNo.high) + ) + ) + return "lastSequenceNo: integer|Long expected"; + } + return null; + }; + + /** + * Creates a ResetLastSequenceNo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.ResetLastSequenceNo + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.ResetLastSequenceNo} ResetLastSequenceNo + */ + ResetLastSequenceNo.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.ResetLastSequenceNo) + return object; + let message = new $root.pyth_lazer_transaction.ResetLastSequenceNo(); + if (object.lastSequenceNo != null) + if ($util.Long) + (message.lastSequenceNo = $util.Long.fromValue( + object.lastSequenceNo, + )).unsigned = true; + else if (typeof object.lastSequenceNo === "string") + message.lastSequenceNo = parseInt(object.lastSequenceNo, 10); + else if (typeof object.lastSequenceNo === "number") + message.lastSequenceNo = object.lastSequenceNo; + else if (typeof object.lastSequenceNo === "object") + message.lastSequenceNo = new $util.LongBits( + object.lastSequenceNo.low >>> 0, + object.lastSequenceNo.high >>> 0, + ).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a ResetLastSequenceNo message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.ResetLastSequenceNo + * @static + * @param {pyth_lazer_transaction.ResetLastSequenceNo} message ResetLastSequenceNo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResetLastSequenceNo.toObject = function toObject(message, options) { + if (!options) options = {}; + let object = {}; + if ( + message.lastSequenceNo != null && + message.hasOwnProperty("lastSequenceNo") + ) { + if (typeof message.lastSequenceNo === "number") + object.lastSequenceNo = + options.longs === String + ? String(message.lastSequenceNo) + : message.lastSequenceNo; + else + object.lastSequenceNo = + options.longs === String + ? $util.Long.prototype.toString.call(message.lastSequenceNo) + : options.longs === Number + ? new $util.LongBits( + message.lastSequenceNo.low >>> 0, + message.lastSequenceNo.high >>> 0, + ).toNumber(true) + : message.lastSequenceNo; + if (options.oneofs) object._lastSequenceNo = "lastSequenceNo"; + } + return object; + }; + + /** + * Converts this ResetLastSequenceNo to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.ResetLastSequenceNo + * @instance + * @returns {Object.} JSON object + */ + ResetLastSequenceNo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResetLastSequenceNo + * @function getTypeUrl + * @memberof pyth_lazer_transaction.ResetLastSequenceNo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResetLastSequenceNo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.ResetLastSequenceNo"; + }; + + return ResetLastSequenceNo; + })(); + + pyth_lazer_transaction.AddPublisher = (function () { + /** + * Properties of an AddPublisher. + * @memberof pyth_lazer_transaction + * @interface IAddPublisher + * @property {number|null} [publisherId] AddPublisher publisherId + * @property {string|null} [name] AddPublisher name + * @property {Array.|null} [publicKeys] AddPublisher publicKeys + * @property {boolean|null} [isActive] AddPublisher isActive + */ + + /** + * Constructs a new AddPublisher. + * @memberof pyth_lazer_transaction + * @classdesc Represents an AddPublisher. + * @implements IAddPublisher + * @constructor + * @param {pyth_lazer_transaction.IAddPublisher=} [properties] Properties to set + */ + function AddPublisher(properties) { + this.publicKeys = []; + 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]]; + } + + /** + * AddPublisher publisherId. + * @member {number|null|undefined} publisherId + * @memberof pyth_lazer_transaction.AddPublisher + * @instance + */ + AddPublisher.prototype.publisherId = null; + + /** + * AddPublisher name. + * @member {string|null|undefined} name + * @memberof pyth_lazer_transaction.AddPublisher + * @instance + */ + AddPublisher.prototype.name = null; + + /** + * AddPublisher publicKeys. + * @member {Array.} publicKeys + * @memberof pyth_lazer_transaction.AddPublisher + * @instance + */ + AddPublisher.prototype.publicKeys = $util.emptyArray; + + /** + * AddPublisher isActive. + * @member {boolean|null|undefined} isActive + * @memberof pyth_lazer_transaction.AddPublisher + * @instance + */ + AddPublisher.prototype.isActive = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * AddPublisher _publisherId. + * @member {"publisherId"|undefined} _publisherId + * @memberof pyth_lazer_transaction.AddPublisher + * @instance + */ + Object.defineProperty(AddPublisher.prototype, "_publisherId", { + get: $util.oneOfGetter(($oneOfFields = ["publisherId"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * AddPublisher _name. + * @member {"name"|undefined} _name + * @memberof pyth_lazer_transaction.AddPublisher + * @instance + */ + Object.defineProperty(AddPublisher.prototype, "_name", { + get: $util.oneOfGetter(($oneOfFields = ["name"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * AddPublisher _isActive. + * @member {"isActive"|undefined} _isActive + * @memberof pyth_lazer_transaction.AddPublisher + * @instance + */ + Object.defineProperty(AddPublisher.prototype, "_isActive", { + get: $util.oneOfGetter(($oneOfFields = ["isActive"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Creates a new AddPublisher instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.AddPublisher + * @static + * @param {pyth_lazer_transaction.IAddPublisher=} [properties] Properties to set + * @returns {pyth_lazer_transaction.AddPublisher} AddPublisher instance + */ + AddPublisher.create = function create(properties) { + return new AddPublisher(properties); + }; + + /** + * Encodes the specified AddPublisher message. Does not implicitly {@link pyth_lazer_transaction.AddPublisher.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.AddPublisher + * @static + * @param {pyth_lazer_transaction.IAddPublisher} message AddPublisher message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddPublisher.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if ( + message.publisherId != null && + Object.hasOwnProperty.call(message, "publisherId") + ) + writer.uint32(/* id 1, wireType 0 =*/ 8).uint32(message.publisherId); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 2, wireType 2 =*/ 18).string(message.name); + if (message.publicKeys != null && message.publicKeys.length) + for (let i = 0; i < message.publicKeys.length; ++i) + writer + .uint32(/* id 3, wireType 2 =*/ 26) + .bytes(message.publicKeys[i]); + if ( + message.isActive != null && + Object.hasOwnProperty.call(message, "isActive") + ) + writer.uint32(/* id 4, wireType 0 =*/ 32).bool(message.isActive); + return writer; + }; + + /** + * Encodes the specified AddPublisher message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddPublisher.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.AddPublisher + * @static + * @param {pyth_lazer_transaction.IAddPublisher} message AddPublisher message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddPublisher.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AddPublisher message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.AddPublisher + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.AddPublisher} AddPublisher + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddPublisher.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pyth_lazer_transaction.AddPublisher(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.publisherId = reader.uint32(); + break; + } + case 2: { + message.name = reader.string(); + break; + } + case 3: { + if (!(message.publicKeys && message.publicKeys.length)) + message.publicKeys = []; + message.publicKeys.push(reader.bytes()); + break; + } + case 4: { + message.isActive = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AddPublisher message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.AddPublisher + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.AddPublisher} AddPublisher + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddPublisher.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AddPublisher message. + * @function verify + * @memberof pyth_lazer_transaction.AddPublisher + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AddPublisher.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if ( + message.publisherId != null && + message.hasOwnProperty("publisherId") + ) { + properties._publisherId = 1; + if (!$util.isInteger(message.publisherId)) + return "publisherId: integer expected"; + } + if (message.name != null && message.hasOwnProperty("name")) { + properties._name = 1; + if (!$util.isString(message.name)) return "name: string expected"; + } + if (message.publicKeys != null && message.hasOwnProperty("publicKeys")) { + if (!Array.isArray(message.publicKeys)) + return "publicKeys: array expected"; + for (let i = 0; i < message.publicKeys.length; ++i) + if ( + !( + (message.publicKeys[i] && + typeof message.publicKeys[i].length === "number") || + $util.isString(message.publicKeys[i]) + ) + ) + return "publicKeys: buffer[] expected"; + } + if (message.isActive != null && message.hasOwnProperty("isActive")) { + properties._isActive = 1; + if (typeof message.isActive !== "boolean") + return "isActive: boolean expected"; + } + return null; + }; + + /** + * Creates an AddPublisher message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.AddPublisher + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.AddPublisher} AddPublisher + */ + AddPublisher.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.AddPublisher) + return object; + let message = new $root.pyth_lazer_transaction.AddPublisher(); + if (object.publisherId != null) + message.publisherId = object.publisherId >>> 0; + if (object.name != null) message.name = String(object.name); + if (object.publicKeys) { + if (!Array.isArray(object.publicKeys)) + throw TypeError( + ".pyth_lazer_transaction.AddPublisher.publicKeys: array expected", + ); + message.publicKeys = []; + for (let i = 0; i < object.publicKeys.length; ++i) + if (typeof object.publicKeys[i] === "string") + $util.base64.decode( + object.publicKeys[i], + (message.publicKeys[i] = $util.newBuffer( + $util.base64.length(object.publicKeys[i]), + )), + 0, + ); + else if (object.publicKeys[i].length >= 0) + message.publicKeys[i] = object.publicKeys[i]; + } + if (object.isActive != null) message.isActive = Boolean(object.isActive); + return message; + }; + + /** + * Creates a plain object from an AddPublisher message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.AddPublisher + * @static + * @param {pyth_lazer_transaction.AddPublisher} message AddPublisher + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AddPublisher.toObject = function toObject(message, options) { + if (!options) options = {}; + let object = {}; + if (options.arrays || options.defaults) object.publicKeys = []; + if ( + message.publisherId != null && + message.hasOwnProperty("publisherId") + ) { + object.publisherId = message.publisherId; + if (options.oneofs) object._publisherId = "publisherId"; + } + if (message.name != null && message.hasOwnProperty("name")) { + object.name = message.name; + if (options.oneofs) object._name = "name"; + } + if (message.publicKeys && message.publicKeys.length) { + object.publicKeys = []; + for (let j = 0; j < message.publicKeys.length; ++j) + object.publicKeys[j] = + options.bytes === String + ? $util.base64.encode( + message.publicKeys[j], + 0, + message.publicKeys[j].length, + ) + : options.bytes === Array + ? Array.prototype.slice.call(message.publicKeys[j]) + : message.publicKeys[j]; + } + if (message.isActive != null && message.hasOwnProperty("isActive")) { + object.isActive = message.isActive; + if (options.oneofs) object._isActive = "isActive"; + } + return object; + }; + + /** + * Converts this AddPublisher to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.AddPublisher + * @instance + * @returns {Object.} JSON object + */ + AddPublisher.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AddPublisher + * @function getTypeUrl + * @memberof pyth_lazer_transaction.AddPublisher + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AddPublisher.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.AddPublisher"; + }; + + return AddPublisher; + })(); + + pyth_lazer_transaction.UpdatePublisher = (function () { + /** + * Properties of an UpdatePublisher. + * @memberof pyth_lazer_transaction + * @interface IUpdatePublisher + * @property {number|null} [publisherId] UpdatePublisher publisherId + * @property {pyth_lazer_transaction.ISetPublisherName|null} [setPublisherName] UpdatePublisher setPublisherName + * @property {pyth_lazer_transaction.IAddPublisherPublicKeys|null} [addPublisherPublicKeys] UpdatePublisher addPublisherPublicKeys + * @property {pyth_lazer_transaction.IRemovePublisherPublicKeys|null} [removePublisherPublicKeys] UpdatePublisher removePublisherPublicKeys + * @property {pyth_lazer_transaction.ISetPublisherPublicKeys|null} [setPublisherPublicKeys] UpdatePublisher setPublisherPublicKeys + * @property {pyth_lazer_transaction.ISetPublisherActive|null} [setPublisherActive] UpdatePublisher setPublisherActive + * @property {google.protobuf.IEmpty|null} [removePublisher] UpdatePublisher removePublisher + */ + + /** + * Constructs a new UpdatePublisher. + * @memberof pyth_lazer_transaction + * @classdesc Represents an UpdatePublisher. + * @implements IUpdatePublisher + * @constructor + * @param {pyth_lazer_transaction.IUpdatePublisher=} [properties] Properties to set + */ + function UpdatePublisher(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]]; + } + + /** + * UpdatePublisher publisherId. + * @member {number|null|undefined} publisherId + * @memberof pyth_lazer_transaction.UpdatePublisher + * @instance + */ + UpdatePublisher.prototype.publisherId = null; + + /** + * UpdatePublisher setPublisherName. + * @member {pyth_lazer_transaction.ISetPublisherName|null|undefined} setPublisherName + * @memberof pyth_lazer_transaction.UpdatePublisher + * @instance + */ + UpdatePublisher.prototype.setPublisherName = null; + + /** + * UpdatePublisher addPublisherPublicKeys. + * @member {pyth_lazer_transaction.IAddPublisherPublicKeys|null|undefined} addPublisherPublicKeys + * @memberof pyth_lazer_transaction.UpdatePublisher + * @instance + */ + UpdatePublisher.prototype.addPublisherPublicKeys = null; + + /** + * UpdatePublisher removePublisherPublicKeys. + * @member {pyth_lazer_transaction.IRemovePublisherPublicKeys|null|undefined} removePublisherPublicKeys + * @memberof pyth_lazer_transaction.UpdatePublisher + * @instance + */ + UpdatePublisher.prototype.removePublisherPublicKeys = null; + + /** + * UpdatePublisher setPublisherPublicKeys. + * @member {pyth_lazer_transaction.ISetPublisherPublicKeys|null|undefined} setPublisherPublicKeys + * @memberof pyth_lazer_transaction.UpdatePublisher + * @instance + */ + UpdatePublisher.prototype.setPublisherPublicKeys = null; + + /** + * UpdatePublisher setPublisherActive. + * @member {pyth_lazer_transaction.ISetPublisherActive|null|undefined} setPublisherActive + * @memberof pyth_lazer_transaction.UpdatePublisher + * @instance + */ + UpdatePublisher.prototype.setPublisherActive = null; + + /** + * UpdatePublisher removePublisher. + * @member {google.protobuf.IEmpty|null|undefined} removePublisher + * @memberof pyth_lazer_transaction.UpdatePublisher + * @instance + */ + UpdatePublisher.prototype.removePublisher = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * UpdatePublisher _publisherId. + * @member {"publisherId"|undefined} _publisherId + * @memberof pyth_lazer_transaction.UpdatePublisher + * @instance + */ + Object.defineProperty(UpdatePublisher.prototype, "_publisherId", { + get: $util.oneOfGetter(($oneOfFields = ["publisherId"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * UpdatePublisher action. + * @member {"setPublisherName"|"addPublisherPublicKeys"|"removePublisherPublicKeys"|"setPublisherPublicKeys"|"setPublisherActive"|"removePublisher"|undefined} action + * @memberof pyth_lazer_transaction.UpdatePublisher + * @instance + */ + Object.defineProperty(UpdatePublisher.prototype, "action", { + get: $util.oneOfGetter( + ($oneOfFields = [ + "setPublisherName", + "addPublisherPublicKeys", + "removePublisherPublicKeys", + "setPublisherPublicKeys", + "setPublisherActive", + "removePublisher", + ]), + ), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Creates a new UpdatePublisher instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.UpdatePublisher + * @static + * @param {pyth_lazer_transaction.IUpdatePublisher=} [properties] Properties to set + * @returns {pyth_lazer_transaction.UpdatePublisher} UpdatePublisher instance + */ + UpdatePublisher.create = function create(properties) { + return new UpdatePublisher(properties); + }; + + /** + * Encodes the specified UpdatePublisher message. Does not implicitly {@link pyth_lazer_transaction.UpdatePublisher.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.UpdatePublisher + * @static + * @param {pyth_lazer_transaction.IUpdatePublisher} message UpdatePublisher message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdatePublisher.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if ( + message.publisherId != null && + Object.hasOwnProperty.call(message, "publisherId") + ) + writer.uint32(/* id 1, wireType 0 =*/ 8).uint32(message.publisherId); + if ( + message.setPublisherName != null && + Object.hasOwnProperty.call(message, "setPublisherName") + ) + $root.pyth_lazer_transaction.SetPublisherName.encode( + message.setPublisherName, + writer.uint32(/* id 101, wireType 2 =*/ 810).fork(), + ).ldelim(); + if ( + message.addPublisherPublicKeys != null && + Object.hasOwnProperty.call(message, "addPublisherPublicKeys") + ) + $root.pyth_lazer_transaction.AddPublisherPublicKeys.encode( + message.addPublisherPublicKeys, + writer.uint32(/* id 102, wireType 2 =*/ 818).fork(), + ).ldelim(); + if ( + message.removePublisherPublicKeys != null && + Object.hasOwnProperty.call(message, "removePublisherPublicKeys") + ) + $root.pyth_lazer_transaction.RemovePublisherPublicKeys.encode( + message.removePublisherPublicKeys, + writer.uint32(/* id 103, wireType 2 =*/ 826).fork(), + ).ldelim(); + if ( + message.setPublisherPublicKeys != null && + Object.hasOwnProperty.call(message, "setPublisherPublicKeys") + ) + $root.pyth_lazer_transaction.SetPublisherPublicKeys.encode( + message.setPublisherPublicKeys, + writer.uint32(/* id 104, wireType 2 =*/ 834).fork(), + ).ldelim(); + if ( + message.setPublisherActive != null && + Object.hasOwnProperty.call(message, "setPublisherActive") + ) + $root.pyth_lazer_transaction.SetPublisherActive.encode( + message.setPublisherActive, + writer.uint32(/* id 105, wireType 2 =*/ 842).fork(), + ).ldelim(); + if ( + message.removePublisher != null && + Object.hasOwnProperty.call(message, "removePublisher") + ) + $root.google.protobuf.Empty.encode( + message.removePublisher, + writer.uint32(/* id 199, wireType 2 =*/ 1594).fork(), + ).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdatePublisher message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdatePublisher.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.UpdatePublisher + * @static + * @param {pyth_lazer_transaction.IUpdatePublisher} message UpdatePublisher message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdatePublisher.encodeDelimited = function encodeDelimited( + message, + writer, + ) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdatePublisher message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.UpdatePublisher + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.UpdatePublisher} UpdatePublisher + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdatePublisher.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pyth_lazer_transaction.UpdatePublisher(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.publisherId = reader.uint32(); + break; + } + case 101: { + message.setPublisherName = + $root.pyth_lazer_transaction.SetPublisherName.decode( + reader, + reader.uint32(), + ); + break; + } + case 102: { + message.addPublisherPublicKeys = + $root.pyth_lazer_transaction.AddPublisherPublicKeys.decode( + reader, + reader.uint32(), + ); + break; + } + case 103: { + message.removePublisherPublicKeys = + $root.pyth_lazer_transaction.RemovePublisherPublicKeys.decode( + reader, + reader.uint32(), + ); + break; + } + case 104: { + message.setPublisherPublicKeys = + $root.pyth_lazer_transaction.SetPublisherPublicKeys.decode( + reader, + reader.uint32(), + ); + break; + } + case 105: { + message.setPublisherActive = + $root.pyth_lazer_transaction.SetPublisherActive.decode( + reader, + reader.uint32(), + ); + break; + } + case 199: { + message.removePublisher = $root.google.protobuf.Empty.decode( + reader, + reader.uint32(), + ); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdatePublisher message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.UpdatePublisher + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.UpdatePublisher} UpdatePublisher + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdatePublisher.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdatePublisher message. + * @function verify + * @memberof pyth_lazer_transaction.UpdatePublisher + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdatePublisher.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if ( + message.publisherId != null && + message.hasOwnProperty("publisherId") + ) { + properties._publisherId = 1; + if (!$util.isInteger(message.publisherId)) + return "publisherId: integer expected"; + } + if ( + message.setPublisherName != null && + message.hasOwnProperty("setPublisherName") + ) { + properties.action = 1; + { + let error = $root.pyth_lazer_transaction.SetPublisherName.verify( + message.setPublisherName, + ); + if (error) return "setPublisherName." + error; + } + } + if ( + message.addPublisherPublicKeys != null && + message.hasOwnProperty("addPublisherPublicKeys") + ) { + if (properties.action === 1) return "action: multiple values"; + properties.action = 1; + { + let error = + $root.pyth_lazer_transaction.AddPublisherPublicKeys.verify( + message.addPublisherPublicKeys, + ); + if (error) return "addPublisherPublicKeys." + error; + } + } + if ( + message.removePublisherPublicKeys != null && + message.hasOwnProperty("removePublisherPublicKeys") + ) { + if (properties.action === 1) return "action: multiple values"; + properties.action = 1; + { + let error = + $root.pyth_lazer_transaction.RemovePublisherPublicKeys.verify( + message.removePublisherPublicKeys, + ); + if (error) return "removePublisherPublicKeys." + error; + } + } + if ( + message.setPublisherPublicKeys != null && + message.hasOwnProperty("setPublisherPublicKeys") + ) { + if (properties.action === 1) return "action: multiple values"; + properties.action = 1; + { + let error = + $root.pyth_lazer_transaction.SetPublisherPublicKeys.verify( + message.setPublisherPublicKeys, + ); + if (error) return "setPublisherPublicKeys." + error; + } + } + if ( + message.setPublisherActive != null && + message.hasOwnProperty("setPublisherActive") + ) { + if (properties.action === 1) return "action: multiple values"; + properties.action = 1; + { + let error = $root.pyth_lazer_transaction.SetPublisherActive.verify( + message.setPublisherActive, + ); + if (error) return "setPublisherActive." + error; + } + } + if ( + message.removePublisher != null && + message.hasOwnProperty("removePublisher") + ) { + if (properties.action === 1) return "action: multiple values"; + properties.action = 1; + { + let error = $root.google.protobuf.Empty.verify( + message.removePublisher, + ); + if (error) return "removePublisher." + error; + } + } + return null; + }; + + /** + * Creates an UpdatePublisher message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.UpdatePublisher + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.UpdatePublisher} UpdatePublisher + */ + UpdatePublisher.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.UpdatePublisher) + return object; + let message = new $root.pyth_lazer_transaction.UpdatePublisher(); + if (object.publisherId != null) + message.publisherId = object.publisherId >>> 0; + if (object.setPublisherName != null) { + if (typeof object.setPublisherName !== "object") + throw TypeError( + ".pyth_lazer_transaction.UpdatePublisher.setPublisherName: object expected", + ); + message.setPublisherName = + $root.pyth_lazer_transaction.SetPublisherName.fromObject( + object.setPublisherName, + ); + } + if (object.addPublisherPublicKeys != null) { + if (typeof object.addPublisherPublicKeys !== "object") + throw TypeError( + ".pyth_lazer_transaction.UpdatePublisher.addPublisherPublicKeys: object expected", + ); + message.addPublisherPublicKeys = + $root.pyth_lazer_transaction.AddPublisherPublicKeys.fromObject( + object.addPublisherPublicKeys, + ); + } + if (object.removePublisherPublicKeys != null) { + if (typeof object.removePublisherPublicKeys !== "object") + throw TypeError( + ".pyth_lazer_transaction.UpdatePublisher.removePublisherPublicKeys: object expected", + ); + message.removePublisherPublicKeys = + $root.pyth_lazer_transaction.RemovePublisherPublicKeys.fromObject( + object.removePublisherPublicKeys, + ); + } + if (object.setPublisherPublicKeys != null) { + if (typeof object.setPublisherPublicKeys !== "object") + throw TypeError( + ".pyth_lazer_transaction.UpdatePublisher.setPublisherPublicKeys: object expected", + ); + message.setPublisherPublicKeys = + $root.pyth_lazer_transaction.SetPublisherPublicKeys.fromObject( + object.setPublisherPublicKeys, + ); + } + if (object.setPublisherActive != null) { + if (typeof object.setPublisherActive !== "object") + throw TypeError( + ".pyth_lazer_transaction.UpdatePublisher.setPublisherActive: object expected", + ); + message.setPublisherActive = + $root.pyth_lazer_transaction.SetPublisherActive.fromObject( + object.setPublisherActive, + ); + } + if (object.removePublisher != null) { + if (typeof object.removePublisher !== "object") + throw TypeError( + ".pyth_lazer_transaction.UpdatePublisher.removePublisher: object expected", + ); + message.removePublisher = $root.google.protobuf.Empty.fromObject( + object.removePublisher, + ); + } + return message; + }; + + /** + * Creates a plain object from an UpdatePublisher message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.UpdatePublisher + * @static + * @param {pyth_lazer_transaction.UpdatePublisher} message UpdatePublisher + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdatePublisher.toObject = function toObject(message, options) { + if (!options) options = {}; + let object = {}; + if ( + message.publisherId != null && + message.hasOwnProperty("publisherId") + ) { + object.publisherId = message.publisherId; + if (options.oneofs) object._publisherId = "publisherId"; + } + if ( + message.setPublisherName != null && + message.hasOwnProperty("setPublisherName") + ) { + object.setPublisherName = + $root.pyth_lazer_transaction.SetPublisherName.toObject( + message.setPublisherName, + options, + ); + if (options.oneofs) object.action = "setPublisherName"; + } + if ( + message.addPublisherPublicKeys != null && + message.hasOwnProperty("addPublisherPublicKeys") + ) { + object.addPublisherPublicKeys = + $root.pyth_lazer_transaction.AddPublisherPublicKeys.toObject( + message.addPublisherPublicKeys, + options, + ); + if (options.oneofs) object.action = "addPublisherPublicKeys"; + } + if ( + message.removePublisherPublicKeys != null && + message.hasOwnProperty("removePublisherPublicKeys") + ) { + object.removePublisherPublicKeys = + $root.pyth_lazer_transaction.RemovePublisherPublicKeys.toObject( + message.removePublisherPublicKeys, + options, + ); + if (options.oneofs) object.action = "removePublisherPublicKeys"; + } + if ( + message.setPublisherPublicKeys != null && + message.hasOwnProperty("setPublisherPublicKeys") + ) { + object.setPublisherPublicKeys = + $root.pyth_lazer_transaction.SetPublisherPublicKeys.toObject( + message.setPublisherPublicKeys, + options, + ); + if (options.oneofs) object.action = "setPublisherPublicKeys"; + } + if ( + message.setPublisherActive != null && + message.hasOwnProperty("setPublisherActive") + ) { + object.setPublisherActive = + $root.pyth_lazer_transaction.SetPublisherActive.toObject( + message.setPublisherActive, + options, + ); + if (options.oneofs) object.action = "setPublisherActive"; + } + if ( + message.removePublisher != null && + message.hasOwnProperty("removePublisher") + ) { + object.removePublisher = $root.google.protobuf.Empty.toObject( + message.removePublisher, + options, + ); + if (options.oneofs) object.action = "removePublisher"; + } + return object; + }; + + /** + * Converts this UpdatePublisher to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.UpdatePublisher + * @instance + * @returns {Object.} JSON object + */ + UpdatePublisher.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdatePublisher + * @function getTypeUrl + * @memberof pyth_lazer_transaction.UpdatePublisher + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdatePublisher.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.UpdatePublisher"; + }; + + return UpdatePublisher; + })(); + + pyth_lazer_transaction.SetPublisherName = (function () { + /** + * Properties of a SetPublisherName. + * @memberof pyth_lazer_transaction + * @interface ISetPublisherName + * @property {string|null} [name] SetPublisherName name + */ + + /** + * Constructs a new SetPublisherName. + * @memberof pyth_lazer_transaction + * @classdesc Represents a SetPublisherName. + * @implements ISetPublisherName + * @constructor + * @param {pyth_lazer_transaction.ISetPublisherName=} [properties] Properties to set + */ + function SetPublisherName(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]]; + } + + /** + * SetPublisherName name. + * @member {string|null|undefined} name + * @memberof pyth_lazer_transaction.SetPublisherName + * @instance + */ + SetPublisherName.prototype.name = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * SetPublisherName _name. + * @member {"name"|undefined} _name + * @memberof pyth_lazer_transaction.SetPublisherName + * @instance + */ + Object.defineProperty(SetPublisherName.prototype, "_name", { + get: $util.oneOfGetter(($oneOfFields = ["name"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Creates a new SetPublisherName instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.SetPublisherName + * @static + * @param {pyth_lazer_transaction.ISetPublisherName=} [properties] Properties to set + * @returns {pyth_lazer_transaction.SetPublisherName} SetPublisherName instance + */ + SetPublisherName.create = function create(properties) { + return new SetPublisherName(properties); + }; + + /** + * Encodes the specified SetPublisherName message. Does not implicitly {@link pyth_lazer_transaction.SetPublisherName.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.SetPublisherName + * @static + * @param {pyth_lazer_transaction.ISetPublisherName} message SetPublisherName message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetPublisherName.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); + return writer; + }; + + /** + * Encodes the specified SetPublisherName message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetPublisherName.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.SetPublisherName + * @static + * @param {pyth_lazer_transaction.ISetPublisherName} message SetPublisherName message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetPublisherName.encodeDelimited = function encodeDelimited( + message, + writer, + ) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetPublisherName message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.SetPublisherName + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.SetPublisherName} SetPublisherName + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetPublisherName.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pyth_lazer_transaction.SetPublisherName(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetPublisherName message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.SetPublisherName + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.SetPublisherName} SetPublisherName + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetPublisherName.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetPublisherName message. + * @function verify + * @memberof pyth_lazer_transaction.SetPublisherName + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetPublisherName.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if (message.name != null && message.hasOwnProperty("name")) { + properties._name = 1; + if (!$util.isString(message.name)) return "name: string expected"; + } + return null; + }; + + /** + * Creates a SetPublisherName message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.SetPublisherName + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.SetPublisherName} SetPublisherName + */ + SetPublisherName.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.SetPublisherName) + return object; + let message = new $root.pyth_lazer_transaction.SetPublisherName(); + if (object.name != null) message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a SetPublisherName message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.SetPublisherName + * @static + * @param {pyth_lazer_transaction.SetPublisherName} message SetPublisherName + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetPublisherName.toObject = function toObject(message, options) { + if (!options) options = {}; + let object = {}; + if (message.name != null && message.hasOwnProperty("name")) { + object.name = message.name; + if (options.oneofs) object._name = "name"; + } + return object; + }; + + /** + * Converts this SetPublisherName to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.SetPublisherName + * @instance + * @returns {Object.} JSON object + */ + SetPublisherName.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetPublisherName + * @function getTypeUrl + * @memberof pyth_lazer_transaction.SetPublisherName + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetPublisherName.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.SetPublisherName"; + }; + + return SetPublisherName; + })(); + + pyth_lazer_transaction.AddPublisherPublicKeys = (function () { + /** + * Properties of an AddPublisherPublicKeys. + * @memberof pyth_lazer_transaction + * @interface IAddPublisherPublicKeys + * @property {Array.|null} [publicKeys] AddPublisherPublicKeys publicKeys + */ + + /** + * Constructs a new AddPublisherPublicKeys. + * @memberof pyth_lazer_transaction + * @classdesc Represents an AddPublisherPublicKeys. + * @implements IAddPublisherPublicKeys + * @constructor + * @param {pyth_lazer_transaction.IAddPublisherPublicKeys=} [properties] Properties to set + */ + function AddPublisherPublicKeys(properties) { + this.publicKeys = []; + 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]]; + } + + /** + * AddPublisherPublicKeys publicKeys. + * @member {Array.} publicKeys + * @memberof pyth_lazer_transaction.AddPublisherPublicKeys + * @instance + */ + AddPublisherPublicKeys.prototype.publicKeys = $util.emptyArray; + + /** + * Creates a new AddPublisherPublicKeys instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.AddPublisherPublicKeys + * @static + * @param {pyth_lazer_transaction.IAddPublisherPublicKeys=} [properties] Properties to set + * @returns {pyth_lazer_transaction.AddPublisherPublicKeys} AddPublisherPublicKeys instance + */ + AddPublisherPublicKeys.create = function create(properties) { + return new AddPublisherPublicKeys(properties); + }; + + /** + * Encodes the specified AddPublisherPublicKeys message. Does not implicitly {@link pyth_lazer_transaction.AddPublisherPublicKeys.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.AddPublisherPublicKeys + * @static + * @param {pyth_lazer_transaction.IAddPublisherPublicKeys} message AddPublisherPublicKeys message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddPublisherPublicKeys.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if (message.publicKeys != null && message.publicKeys.length) + for (let i = 0; i < message.publicKeys.length; ++i) + writer + .uint32(/* id 1, wireType 2 =*/ 10) + .bytes(message.publicKeys[i]); + return writer; + }; + + /** + * Encodes the specified AddPublisherPublicKeys message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddPublisherPublicKeys.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.AddPublisherPublicKeys + * @static + * @param {pyth_lazer_transaction.IAddPublisherPublicKeys} message AddPublisherPublicKeys message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddPublisherPublicKeys.encodeDelimited = function encodeDelimited( + message, + writer, + ) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AddPublisherPublicKeys message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.AddPublisherPublicKeys + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.AddPublisherPublicKeys} AddPublisherPublicKeys + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddPublisherPublicKeys.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pyth_lazer_transaction.AddPublisherPublicKeys(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + if (!(message.publicKeys && message.publicKeys.length)) + message.publicKeys = []; + message.publicKeys.push(reader.bytes()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AddPublisherPublicKeys message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.AddPublisherPublicKeys + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.AddPublisherPublicKeys} AddPublisherPublicKeys + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddPublisherPublicKeys.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AddPublisherPublicKeys message. + * @function verify + * @memberof pyth_lazer_transaction.AddPublisherPublicKeys + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AddPublisherPublicKeys.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.publicKeys != null && message.hasOwnProperty("publicKeys")) { + if (!Array.isArray(message.publicKeys)) + return "publicKeys: array expected"; + for (let i = 0; i < message.publicKeys.length; ++i) + if ( + !( + (message.publicKeys[i] && + typeof message.publicKeys[i].length === "number") || + $util.isString(message.publicKeys[i]) + ) + ) + return "publicKeys: buffer[] expected"; + } + return null; + }; + + /** + * Creates an AddPublisherPublicKeys message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.AddPublisherPublicKeys + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.AddPublisherPublicKeys} AddPublisherPublicKeys + */ + AddPublisherPublicKeys.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.AddPublisherPublicKeys) + return object; + let message = new $root.pyth_lazer_transaction.AddPublisherPublicKeys(); + if (object.publicKeys) { + if (!Array.isArray(object.publicKeys)) + throw TypeError( + ".pyth_lazer_transaction.AddPublisherPublicKeys.publicKeys: array expected", + ); + message.publicKeys = []; + for (let i = 0; i < object.publicKeys.length; ++i) + if (typeof object.publicKeys[i] === "string") + $util.base64.decode( + object.publicKeys[i], + (message.publicKeys[i] = $util.newBuffer( + $util.base64.length(object.publicKeys[i]), + )), + 0, + ); + else if (object.publicKeys[i].length >= 0) + message.publicKeys[i] = object.publicKeys[i]; + } + return message; + }; + + /** + * Creates a plain object from an AddPublisherPublicKeys message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.AddPublisherPublicKeys + * @static + * @param {pyth_lazer_transaction.AddPublisherPublicKeys} message AddPublisherPublicKeys + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AddPublisherPublicKeys.toObject = function toObject(message, options) { + if (!options) options = {}; + let object = {}; + if (options.arrays || options.defaults) object.publicKeys = []; + if (message.publicKeys && message.publicKeys.length) { + object.publicKeys = []; + for (let j = 0; j < message.publicKeys.length; ++j) + object.publicKeys[j] = + options.bytes === String + ? $util.base64.encode( + message.publicKeys[j], + 0, + message.publicKeys[j].length, + ) + : options.bytes === Array + ? Array.prototype.slice.call(message.publicKeys[j]) + : message.publicKeys[j]; + } + return object; + }; + + /** + * Converts this AddPublisherPublicKeys to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.AddPublisherPublicKeys + * @instance + * @returns {Object.} JSON object + */ + AddPublisherPublicKeys.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AddPublisherPublicKeys + * @function getTypeUrl + * @memberof pyth_lazer_transaction.AddPublisherPublicKeys + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AddPublisherPublicKeys.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.AddPublisherPublicKeys"; + }; + + return AddPublisherPublicKeys; + })(); + + pyth_lazer_transaction.RemovePublisherPublicKeys = (function () { + /** + * Properties of a RemovePublisherPublicKeys. + * @memberof pyth_lazer_transaction + * @interface IRemovePublisherPublicKeys + * @property {Array.|null} [publicKeys] RemovePublisherPublicKeys publicKeys + */ + + /** + * Constructs a new RemovePublisherPublicKeys. + * @memberof pyth_lazer_transaction + * @classdesc Represents a RemovePublisherPublicKeys. + * @implements IRemovePublisherPublicKeys + * @constructor + * @param {pyth_lazer_transaction.IRemovePublisherPublicKeys=} [properties] Properties to set + */ + function RemovePublisherPublicKeys(properties) { + this.publicKeys = []; + 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]]; + } + + /** + * RemovePublisherPublicKeys publicKeys. + * @member {Array.} publicKeys + * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys + * @instance + */ + RemovePublisherPublicKeys.prototype.publicKeys = $util.emptyArray; + + /** + * Creates a new RemovePublisherPublicKeys instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys + * @static + * @param {pyth_lazer_transaction.IRemovePublisherPublicKeys=} [properties] Properties to set + * @returns {pyth_lazer_transaction.RemovePublisherPublicKeys} RemovePublisherPublicKeys instance + */ + RemovePublisherPublicKeys.create = function create(properties) { + return new RemovePublisherPublicKeys(properties); + }; + + /** + * Encodes the specified RemovePublisherPublicKeys message. Does not implicitly {@link pyth_lazer_transaction.RemovePublisherPublicKeys.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys + * @static + * @param {pyth_lazer_transaction.IRemovePublisherPublicKeys} message RemovePublisherPublicKeys message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemovePublisherPublicKeys.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if (message.publicKeys != null && message.publicKeys.length) + for (let i = 0; i < message.publicKeys.length; ++i) + writer + .uint32(/* id 1, wireType 2 =*/ 10) + .bytes(message.publicKeys[i]); + return writer; + }; + + /** + * Encodes the specified RemovePublisherPublicKeys message, length delimited. Does not implicitly {@link pyth_lazer_transaction.RemovePublisherPublicKeys.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys + * @static + * @param {pyth_lazer_transaction.IRemovePublisherPublicKeys} message RemovePublisherPublicKeys message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemovePublisherPublicKeys.encodeDelimited = function encodeDelimited( + message, + writer, + ) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RemovePublisherPublicKeys message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.RemovePublisherPublicKeys} RemovePublisherPublicKeys + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemovePublisherPublicKeys.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pyth_lazer_transaction.RemovePublisherPublicKeys(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + if (!(message.publicKeys && message.publicKeys.length)) + message.publicKeys = []; + message.publicKeys.push(reader.bytes()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RemovePublisherPublicKeys message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.RemovePublisherPublicKeys} RemovePublisherPublicKeys + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemovePublisherPublicKeys.decodeDelimited = function decodeDelimited( + reader, + ) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RemovePublisherPublicKeys message. + * @function verify + * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RemovePublisherPublicKeys.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.publicKeys != null && message.hasOwnProperty("publicKeys")) { + if (!Array.isArray(message.publicKeys)) + return "publicKeys: array expected"; + for (let i = 0; i < message.publicKeys.length; ++i) + if ( + !( + (message.publicKeys[i] && + typeof message.publicKeys[i].length === "number") || + $util.isString(message.publicKeys[i]) + ) + ) + return "publicKeys: buffer[] expected"; + } + return null; + }; + + /** + * Creates a RemovePublisherPublicKeys message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.RemovePublisherPublicKeys} RemovePublisherPublicKeys + */ + RemovePublisherPublicKeys.fromObject = function fromObject(object) { + if ( + object instanceof $root.pyth_lazer_transaction.RemovePublisherPublicKeys + ) + return object; + let message = + new $root.pyth_lazer_transaction.RemovePublisherPublicKeys(); + if (object.publicKeys) { + if (!Array.isArray(object.publicKeys)) + throw TypeError( + ".pyth_lazer_transaction.RemovePublisherPublicKeys.publicKeys: array expected", + ); + message.publicKeys = []; + for (let i = 0; i < object.publicKeys.length; ++i) + if (typeof object.publicKeys[i] === "string") + $util.base64.decode( + object.publicKeys[i], + (message.publicKeys[i] = $util.newBuffer( + $util.base64.length(object.publicKeys[i]), + )), + 0, + ); + else if (object.publicKeys[i].length >= 0) + message.publicKeys[i] = object.publicKeys[i]; + } + return message; + }; + + /** + * Creates a plain object from a RemovePublisherPublicKeys message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys + * @static + * @param {pyth_lazer_transaction.RemovePublisherPublicKeys} message RemovePublisherPublicKeys + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RemovePublisherPublicKeys.toObject = function toObject(message, options) { + if (!options) options = {}; + let object = {}; + if (options.arrays || options.defaults) object.publicKeys = []; + if (message.publicKeys && message.publicKeys.length) { + object.publicKeys = []; + for (let j = 0; j < message.publicKeys.length; ++j) + object.publicKeys[j] = + options.bytes === String + ? $util.base64.encode( + message.publicKeys[j], + 0, + message.publicKeys[j].length, + ) + : options.bytes === Array + ? Array.prototype.slice.call(message.publicKeys[j]) + : message.publicKeys[j]; + } + return object; + }; + + /** + * Converts this RemovePublisherPublicKeys to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys + * @instance + * @returns {Object.} JSON object + */ + RemovePublisherPublicKeys.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RemovePublisherPublicKeys + * @function getTypeUrl + * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RemovePublisherPublicKeys.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return ( + typeUrlPrefix + "/pyth_lazer_transaction.RemovePublisherPublicKeys" + ); + }; + + return RemovePublisherPublicKeys; + })(); + + pyth_lazer_transaction.SetPublisherPublicKeys = (function () { + /** + * Properties of a SetPublisherPublicKeys. + * @memberof pyth_lazer_transaction + * @interface ISetPublisherPublicKeys + * @property {Array.|null} [publicKeys] SetPublisherPublicKeys publicKeys + */ + + /** + * Constructs a new SetPublisherPublicKeys. + * @memberof pyth_lazer_transaction + * @classdesc Represents a SetPublisherPublicKeys. + * @implements ISetPublisherPublicKeys + * @constructor + * @param {pyth_lazer_transaction.ISetPublisherPublicKeys=} [properties] Properties to set + */ + function SetPublisherPublicKeys(properties) { + this.publicKeys = []; + 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]]; + } + + /** + * SetPublisherPublicKeys publicKeys. + * @member {Array.} publicKeys + * @memberof pyth_lazer_transaction.SetPublisherPublicKeys + * @instance + */ + SetPublisherPublicKeys.prototype.publicKeys = $util.emptyArray; + + /** + * Creates a new SetPublisherPublicKeys instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.SetPublisherPublicKeys + * @static + * @param {pyth_lazer_transaction.ISetPublisherPublicKeys=} [properties] Properties to set + * @returns {pyth_lazer_transaction.SetPublisherPublicKeys} SetPublisherPublicKeys instance + */ + SetPublisherPublicKeys.create = function create(properties) { + return new SetPublisherPublicKeys(properties); + }; + + /** + * Encodes the specified SetPublisherPublicKeys message. Does not implicitly {@link pyth_lazer_transaction.SetPublisherPublicKeys.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.SetPublisherPublicKeys + * @static + * @param {pyth_lazer_transaction.ISetPublisherPublicKeys} message SetPublisherPublicKeys message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetPublisherPublicKeys.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if (message.publicKeys != null && message.publicKeys.length) + for (let i = 0; i < message.publicKeys.length; ++i) + writer + .uint32(/* id 1, wireType 2 =*/ 10) + .bytes(message.publicKeys[i]); + return writer; + }; + + /** + * Encodes the specified SetPublisherPublicKeys message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetPublisherPublicKeys.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.SetPublisherPublicKeys + * @static + * @param {pyth_lazer_transaction.ISetPublisherPublicKeys} message SetPublisherPublicKeys message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetPublisherPublicKeys.encodeDelimited = function encodeDelimited( + message, + writer, + ) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetPublisherPublicKeys message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.SetPublisherPublicKeys + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.SetPublisherPublicKeys} SetPublisherPublicKeys + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetPublisherPublicKeys.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pyth_lazer_transaction.SetPublisherPublicKeys(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + if (!(message.publicKeys && message.publicKeys.length)) + message.publicKeys = []; + message.publicKeys.push(reader.bytes()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetPublisherPublicKeys message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.SetPublisherPublicKeys + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.SetPublisherPublicKeys} SetPublisherPublicKeys + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetPublisherPublicKeys.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetPublisherPublicKeys message. + * @function verify + * @memberof pyth_lazer_transaction.SetPublisherPublicKeys + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetPublisherPublicKeys.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.publicKeys != null && message.hasOwnProperty("publicKeys")) { + if (!Array.isArray(message.publicKeys)) + return "publicKeys: array expected"; + for (let i = 0; i < message.publicKeys.length; ++i) + if ( + !( + (message.publicKeys[i] && + typeof message.publicKeys[i].length === "number") || + $util.isString(message.publicKeys[i]) + ) + ) + return "publicKeys: buffer[] expected"; + } + return null; + }; + + /** + * Creates a SetPublisherPublicKeys message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.SetPublisherPublicKeys + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.SetPublisherPublicKeys} SetPublisherPublicKeys + */ + SetPublisherPublicKeys.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.SetPublisherPublicKeys) + return object; + let message = new $root.pyth_lazer_transaction.SetPublisherPublicKeys(); + if (object.publicKeys) { + if (!Array.isArray(object.publicKeys)) + throw TypeError( + ".pyth_lazer_transaction.SetPublisherPublicKeys.publicKeys: array expected", + ); + message.publicKeys = []; + for (let i = 0; i < object.publicKeys.length; ++i) + if (typeof object.publicKeys[i] === "string") + $util.base64.decode( + object.publicKeys[i], + (message.publicKeys[i] = $util.newBuffer( + $util.base64.length(object.publicKeys[i]), + )), + 0, + ); + else if (object.publicKeys[i].length >= 0) + message.publicKeys[i] = object.publicKeys[i]; + } + return message; + }; + + /** + * Creates a plain object from a SetPublisherPublicKeys message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.SetPublisherPublicKeys + * @static + * @param {pyth_lazer_transaction.SetPublisherPublicKeys} message SetPublisherPublicKeys + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetPublisherPublicKeys.toObject = function toObject(message, options) { + if (!options) options = {}; + let object = {}; + if (options.arrays || options.defaults) object.publicKeys = []; + if (message.publicKeys && message.publicKeys.length) { + object.publicKeys = []; + for (let j = 0; j < message.publicKeys.length; ++j) + object.publicKeys[j] = + options.bytes === String + ? $util.base64.encode( + message.publicKeys[j], + 0, + message.publicKeys[j].length, + ) + : options.bytes === Array + ? Array.prototype.slice.call(message.publicKeys[j]) + : message.publicKeys[j]; + } + return object; + }; + + /** + * Converts this SetPublisherPublicKeys to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.SetPublisherPublicKeys + * @instance + * @returns {Object.} JSON object + */ + SetPublisherPublicKeys.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetPublisherPublicKeys + * @function getTypeUrl + * @memberof pyth_lazer_transaction.SetPublisherPublicKeys + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetPublisherPublicKeys.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.SetPublisherPublicKeys"; + }; + + return SetPublisherPublicKeys; + })(); + + pyth_lazer_transaction.SetPublisherActive = (function () { + /** + * Properties of a SetPublisherActive. + * @memberof pyth_lazer_transaction + * @interface ISetPublisherActive + * @property {boolean|null} [isActive] SetPublisherActive isActive + */ + + /** + * Constructs a new SetPublisherActive. + * @memberof pyth_lazer_transaction + * @classdesc Represents a SetPublisherActive. + * @implements ISetPublisherActive + * @constructor + * @param {pyth_lazer_transaction.ISetPublisherActive=} [properties] Properties to set + */ + function SetPublisherActive(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]]; + } + + /** + * SetPublisherActive isActive. + * @member {boolean|null|undefined} isActive + * @memberof pyth_lazer_transaction.SetPublisherActive + * @instance + */ + SetPublisherActive.prototype.isActive = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * SetPublisherActive _isActive. + * @member {"isActive"|undefined} _isActive + * @memberof pyth_lazer_transaction.SetPublisherActive + * @instance + */ + Object.defineProperty(SetPublisherActive.prototype, "_isActive", { + get: $util.oneOfGetter(($oneOfFields = ["isActive"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Creates a new SetPublisherActive instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.SetPublisherActive + * @static + * @param {pyth_lazer_transaction.ISetPublisherActive=} [properties] Properties to set + * @returns {pyth_lazer_transaction.SetPublisherActive} SetPublisherActive instance + */ + SetPublisherActive.create = function create(properties) { + return new SetPublisherActive(properties); + }; + + /** + * Encodes the specified SetPublisherActive message. Does not implicitly {@link pyth_lazer_transaction.SetPublisherActive.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.SetPublisherActive + * @static + * @param {pyth_lazer_transaction.ISetPublisherActive} message SetPublisherActive message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetPublisherActive.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if ( + message.isActive != null && + Object.hasOwnProperty.call(message, "isActive") + ) + writer.uint32(/* id 1, wireType 0 =*/ 8).bool(message.isActive); + return writer; + }; + + /** + * Encodes the specified SetPublisherActive message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetPublisherActive.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.SetPublisherActive + * @static + * @param {pyth_lazer_transaction.ISetPublisherActive} message SetPublisherActive message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetPublisherActive.encodeDelimited = function encodeDelimited( + message, + writer, + ) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetPublisherActive message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.SetPublisherActive + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.SetPublisherActive} SetPublisherActive + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetPublisherActive.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pyth_lazer_transaction.SetPublisherActive(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.isActive = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetPublisherActive message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.SetPublisherActive + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.SetPublisherActive} SetPublisherActive + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetPublisherActive.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetPublisherActive message. + * @function verify + * @memberof pyth_lazer_transaction.SetPublisherActive + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetPublisherActive.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if (message.isActive != null && message.hasOwnProperty("isActive")) { + properties._isActive = 1; + if (typeof message.isActive !== "boolean") + return "isActive: boolean expected"; + } + return null; + }; + + /** + * Creates a SetPublisherActive message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.SetPublisherActive + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.SetPublisherActive} SetPublisherActive + */ + SetPublisherActive.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.SetPublisherActive) + return object; + let message = new $root.pyth_lazer_transaction.SetPublisherActive(); + if (object.isActive != null) message.isActive = Boolean(object.isActive); + return message; + }; + + /** + * Creates a plain object from a SetPublisherActive message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.SetPublisherActive + * @static + * @param {pyth_lazer_transaction.SetPublisherActive} message SetPublisherActive + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetPublisherActive.toObject = function toObject(message, options) { + if (!options) options = {}; + let object = {}; + if (message.isActive != null && message.hasOwnProperty("isActive")) { + object.isActive = message.isActive; + if (options.oneofs) object._isActive = "isActive"; + } + return object; + }; + + /** + * Converts this SetPublisherActive to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.SetPublisherActive + * @instance + * @returns {Object.} JSON object + */ + SetPublisherActive.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetPublisherActive + * @function getTypeUrl + * @memberof pyth_lazer_transaction.SetPublisherActive + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetPublisherActive.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.SetPublisherActive"; + }; + + return SetPublisherActive; + })(); + + pyth_lazer_transaction.AddFeed = (function () { + /** + * Properties of an AddFeed. + * @memberof pyth_lazer_transaction + * @interface IAddFeed + * @property {number|null} [feedId] AddFeed feedId + * @property {pyth_lazer_transaction.DynamicValue.IMap|null} [metadata] AddFeed metadata + * @property {Array.|null} [permissionedPublishers] AddFeed permissionedPublishers + */ + + /** + * Constructs a new AddFeed. + * @memberof pyth_lazer_transaction + * @classdesc Represents an AddFeed. + * @implements IAddFeed + * @constructor + * @param {pyth_lazer_transaction.IAddFeed=} [properties] Properties to set + */ + function AddFeed(properties) { + this.permissionedPublishers = []; + 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]]; + } + + /** + * AddFeed feedId. + * @member {number|null|undefined} feedId + * @memberof pyth_lazer_transaction.AddFeed + * @instance + */ + AddFeed.prototype.feedId = null; + + /** + * AddFeed metadata. + * @member {pyth_lazer_transaction.DynamicValue.IMap|null|undefined} metadata + * @memberof pyth_lazer_transaction.AddFeed + * @instance + */ + AddFeed.prototype.metadata = null; + + /** + * AddFeed permissionedPublishers. + * @member {Array.} permissionedPublishers + * @memberof pyth_lazer_transaction.AddFeed + * @instance + */ + AddFeed.prototype.permissionedPublishers = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * AddFeed _feedId. + * @member {"feedId"|undefined} _feedId + * @memberof pyth_lazer_transaction.AddFeed + * @instance + */ + Object.defineProperty(AddFeed.prototype, "_feedId", { + get: $util.oneOfGetter(($oneOfFields = ["feedId"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * AddFeed _metadata. + * @member {"metadata"|undefined} _metadata + * @memberof pyth_lazer_transaction.AddFeed + * @instance + */ + Object.defineProperty(AddFeed.prototype, "_metadata", { + get: $util.oneOfGetter(($oneOfFields = ["metadata"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Creates a new AddFeed instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.AddFeed + * @static + * @param {pyth_lazer_transaction.IAddFeed=} [properties] Properties to set + * @returns {pyth_lazer_transaction.AddFeed} AddFeed instance + */ + AddFeed.create = function create(properties) { + return new AddFeed(properties); + }; + + /** + * Encodes the specified AddFeed message. Does not implicitly {@link pyth_lazer_transaction.AddFeed.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.AddFeed + * @static + * @param {pyth_lazer_transaction.IAddFeed} message AddFeed message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddFeed.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if ( + message.feedId != null && + Object.hasOwnProperty.call(message, "feedId") + ) + writer.uint32(/* id 1, wireType 0 =*/ 8).uint32(message.feedId); + if ( + message.metadata != null && + Object.hasOwnProperty.call(message, "metadata") + ) + $root.pyth_lazer_transaction.DynamicValue.Map.encode( + message.metadata, + writer.uint32(/* id 2, wireType 2 =*/ 18).fork(), + ).ldelim(); + if ( + message.permissionedPublishers != null && + message.permissionedPublishers.length + ) { + writer.uint32(/* id 3, wireType 2 =*/ 26).fork(); + for (let i = 0; i < message.permissionedPublishers.length; ++i) + writer.uint32(message.permissionedPublishers[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified AddFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddFeed.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.AddFeed + * @static + * @param {pyth_lazer_transaction.IAddFeed} message AddFeed message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddFeed.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AddFeed message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.AddFeed + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.AddFeed} AddFeed + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddFeed.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pyth_lazer_transaction.AddFeed(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.feedId = reader.uint32(); + break; + } + case 2: { + message.metadata = + $root.pyth_lazer_transaction.DynamicValue.Map.decode( + reader, + reader.uint32(), + ); + break; + } + case 3: { + if ( + !( + message.permissionedPublishers && + message.permissionedPublishers.length + ) + ) + message.permissionedPublishers = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.permissionedPublishers.push(reader.uint32()); + } else message.permissionedPublishers.push(reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AddFeed message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.AddFeed + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.AddFeed} AddFeed + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddFeed.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AddFeed message. + * @function verify + * @memberof pyth_lazer_transaction.AddFeed + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AddFeed.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if (message.feedId != null && message.hasOwnProperty("feedId")) { + properties._feedId = 1; + if (!$util.isInteger(message.feedId)) return "feedId: integer expected"; + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + properties._metadata = 1; + { + let error = $root.pyth_lazer_transaction.DynamicValue.Map.verify( + message.metadata, + ); + if (error) return "metadata." + error; + } + } + if ( + message.permissionedPublishers != null && + message.hasOwnProperty("permissionedPublishers") + ) { + if (!Array.isArray(message.permissionedPublishers)) + return "permissionedPublishers: array expected"; + for (let i = 0; i < message.permissionedPublishers.length; ++i) + if (!$util.isInteger(message.permissionedPublishers[i])) + return "permissionedPublishers: integer[] expected"; + } + return null; + }; + + /** + * Creates an AddFeed message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.AddFeed + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.AddFeed} AddFeed + */ + AddFeed.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.AddFeed) return object; + let message = new $root.pyth_lazer_transaction.AddFeed(); + if (object.feedId != null) message.feedId = object.feedId >>> 0; + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError( + ".pyth_lazer_transaction.AddFeed.metadata: object expected", + ); + message.metadata = + $root.pyth_lazer_transaction.DynamicValue.Map.fromObject( + object.metadata, + ); + } + if (object.permissionedPublishers) { + if (!Array.isArray(object.permissionedPublishers)) + throw TypeError( + ".pyth_lazer_transaction.AddFeed.permissionedPublishers: array expected", + ); + message.permissionedPublishers = []; + for (let i = 0; i < object.permissionedPublishers.length; ++i) + message.permissionedPublishers[i] = + object.permissionedPublishers[i] >>> 0; + } + return message; + }; + + /** + * Creates a plain object from an AddFeed message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.AddFeed + * @static + * @param {pyth_lazer_transaction.AddFeed} message AddFeed + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AddFeed.toObject = function toObject(message, options) { + if (!options) options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.permissionedPublishers = []; + if (message.feedId != null && message.hasOwnProperty("feedId")) { + object.feedId = message.feedId; + if (options.oneofs) object._feedId = "feedId"; + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + object.metadata = + $root.pyth_lazer_transaction.DynamicValue.Map.toObject( + message.metadata, + options, + ); + if (options.oneofs) object._metadata = "metadata"; + } + if ( + message.permissionedPublishers && + message.permissionedPublishers.length + ) { + object.permissionedPublishers = []; + for (let j = 0; j < message.permissionedPublishers.length; ++j) + object.permissionedPublishers[j] = message.permissionedPublishers[j]; + } + return object; + }; + + /** + * Converts this AddFeed to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.AddFeed + * @instance + * @returns {Object.} JSON object + */ + AddFeed.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AddFeed + * @function getTypeUrl + * @memberof pyth_lazer_transaction.AddFeed + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AddFeed.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.AddFeed"; + }; + + return AddFeed; + })(); + + pyth_lazer_transaction.UpdateFeed = (function () { + /** + * Properties of an UpdateFeed. + * @memberof pyth_lazer_transaction + * @interface IUpdateFeed + * @property {number|null} [feedId] UpdateFeed feedId + * @property {pyth_lazer_transaction.IUpdateFeedMetadata|null} [updateFeedMetadata] UpdateFeed updateFeedMetadata + * @property {pyth_lazer_transaction.IActivateFeed|null} [activateFeed] UpdateFeed activateFeed + * @property {pyth_lazer_transaction.IDeactivateFeed|null} [deactivateFeed] UpdateFeed deactivateFeed + * @property {google.protobuf.IEmpty|null} [removeFeed] UpdateFeed removeFeed + */ + + /** + * Constructs a new UpdateFeed. + * @memberof pyth_lazer_transaction + * @classdesc Represents an UpdateFeed. + * @implements IUpdateFeed + * @constructor + * @param {pyth_lazer_transaction.IUpdateFeed=} [properties] Properties to set + */ + function UpdateFeed(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]]; + } + + /** + * UpdateFeed feedId. + * @member {number|null|undefined} feedId + * @memberof pyth_lazer_transaction.UpdateFeed + * @instance + */ + UpdateFeed.prototype.feedId = null; + + /** + * UpdateFeed updateFeedMetadata. + * @member {pyth_lazer_transaction.IUpdateFeedMetadata|null|undefined} updateFeedMetadata + * @memberof pyth_lazer_transaction.UpdateFeed + * @instance + */ + UpdateFeed.prototype.updateFeedMetadata = null; + + /** + * UpdateFeed activateFeed. + * @member {pyth_lazer_transaction.IActivateFeed|null|undefined} activateFeed + * @memberof pyth_lazer_transaction.UpdateFeed + * @instance + */ + UpdateFeed.prototype.activateFeed = null; + + /** + * UpdateFeed deactivateFeed. + * @member {pyth_lazer_transaction.IDeactivateFeed|null|undefined} deactivateFeed + * @memberof pyth_lazer_transaction.UpdateFeed + * @instance + */ + UpdateFeed.prototype.deactivateFeed = null; + + /** + * UpdateFeed removeFeed. + * @member {google.protobuf.IEmpty|null|undefined} removeFeed + * @memberof pyth_lazer_transaction.UpdateFeed + * @instance + */ + UpdateFeed.prototype.removeFeed = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * UpdateFeed _feedId. + * @member {"feedId"|undefined} _feedId + * @memberof pyth_lazer_transaction.UpdateFeed + * @instance + */ + Object.defineProperty(UpdateFeed.prototype, "_feedId", { + get: $util.oneOfGetter(($oneOfFields = ["feedId"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * UpdateFeed action. + * @member {"updateFeedMetadata"|"activateFeed"|"deactivateFeed"|"removeFeed"|undefined} action + * @memberof pyth_lazer_transaction.UpdateFeed + * @instance + */ + Object.defineProperty(UpdateFeed.prototype, "action", { + get: $util.oneOfGetter( + ($oneOfFields = [ + "updateFeedMetadata", + "activateFeed", + "deactivateFeed", + "removeFeed", + ]), + ), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Creates a new UpdateFeed instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.UpdateFeed + * @static + * @param {pyth_lazer_transaction.IUpdateFeed=} [properties] Properties to set + * @returns {pyth_lazer_transaction.UpdateFeed} UpdateFeed instance + */ + UpdateFeed.create = function create(properties) { + return new UpdateFeed(properties); + }; + + /** + * Encodes the specified UpdateFeed message. Does not implicitly {@link pyth_lazer_transaction.UpdateFeed.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.UpdateFeed + * @static + * @param {pyth_lazer_transaction.IUpdateFeed} message UpdateFeed message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateFeed.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if ( + message.feedId != null && + Object.hasOwnProperty.call(message, "feedId") + ) + writer.uint32(/* id 1, wireType 0 =*/ 8).uint32(message.feedId); + if ( + message.updateFeedMetadata != null && + Object.hasOwnProperty.call(message, "updateFeedMetadata") + ) + $root.pyth_lazer_transaction.UpdateFeedMetadata.encode( + message.updateFeedMetadata, + writer.uint32(/* id 101, wireType 2 =*/ 810).fork(), + ).ldelim(); + if ( + message.activateFeed != null && + Object.hasOwnProperty.call(message, "activateFeed") + ) + $root.pyth_lazer_transaction.ActivateFeed.encode( + message.activateFeed, + writer.uint32(/* id 102, wireType 2 =*/ 818).fork(), + ).ldelim(); + if ( + message.deactivateFeed != null && + Object.hasOwnProperty.call(message, "deactivateFeed") + ) + $root.pyth_lazer_transaction.DeactivateFeed.encode( + message.deactivateFeed, + writer.uint32(/* id 103, wireType 2 =*/ 826).fork(), + ).ldelim(); + if ( + message.removeFeed != null && + Object.hasOwnProperty.call(message, "removeFeed") + ) + $root.google.protobuf.Empty.encode( + message.removeFeed, + writer.uint32(/* id 199, wireType 2 =*/ 1594).fork(), + ).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdateFeed.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.UpdateFeed + * @static + * @param {pyth_lazer_transaction.IUpdateFeed} message UpdateFeed message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateFeed.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateFeed message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.UpdateFeed + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.UpdateFeed} UpdateFeed + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateFeed.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pyth_lazer_transaction.UpdateFeed(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.feedId = reader.uint32(); + break; + } + case 101: { + message.updateFeedMetadata = + $root.pyth_lazer_transaction.UpdateFeedMetadata.decode( + reader, + reader.uint32(), + ); + break; + } + case 102: { + message.activateFeed = + $root.pyth_lazer_transaction.ActivateFeed.decode( + reader, + reader.uint32(), + ); + break; + } + case 103: { + message.deactivateFeed = + $root.pyth_lazer_transaction.DeactivateFeed.decode( + reader, + reader.uint32(), + ); + break; + } + case 199: { + message.removeFeed = $root.google.protobuf.Empty.decode( + reader, + reader.uint32(), + ); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateFeed message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.UpdateFeed + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.UpdateFeed} UpdateFeed + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateFeed.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateFeed message. + * @function verify + * @memberof pyth_lazer_transaction.UpdateFeed + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateFeed.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if (message.feedId != null && message.hasOwnProperty("feedId")) { + properties._feedId = 1; + if (!$util.isInteger(message.feedId)) return "feedId: integer expected"; + } + if ( + message.updateFeedMetadata != null && + message.hasOwnProperty("updateFeedMetadata") + ) { + properties.action = 1; + { + let error = $root.pyth_lazer_transaction.UpdateFeedMetadata.verify( + message.updateFeedMetadata, + ); + if (error) return "updateFeedMetadata." + error; + } + } + if ( + message.activateFeed != null && + message.hasOwnProperty("activateFeed") + ) { + if (properties.action === 1) return "action: multiple values"; + properties.action = 1; + { + let error = $root.pyth_lazer_transaction.ActivateFeed.verify( + message.activateFeed, + ); + if (error) return "activateFeed." + error; + } + } + if ( + message.deactivateFeed != null && + message.hasOwnProperty("deactivateFeed") + ) { + if (properties.action === 1) return "action: multiple values"; + properties.action = 1; + { + let error = $root.pyth_lazer_transaction.DeactivateFeed.verify( + message.deactivateFeed, + ); + if (error) return "deactivateFeed." + error; + } + } + if (message.removeFeed != null && message.hasOwnProperty("removeFeed")) { + if (properties.action === 1) return "action: multiple values"; + properties.action = 1; + { + let error = $root.google.protobuf.Empty.verify(message.removeFeed); + if (error) return "removeFeed." + error; + } + } + return null; + }; + + /** + * Creates an UpdateFeed message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.UpdateFeed + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.UpdateFeed} UpdateFeed + */ + UpdateFeed.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.UpdateFeed) + return object; + let message = new $root.pyth_lazer_transaction.UpdateFeed(); + if (object.feedId != null) message.feedId = object.feedId >>> 0; + if (object.updateFeedMetadata != null) { + if (typeof object.updateFeedMetadata !== "object") + throw TypeError( + ".pyth_lazer_transaction.UpdateFeed.updateFeedMetadata: object expected", + ); + message.updateFeedMetadata = + $root.pyth_lazer_transaction.UpdateFeedMetadata.fromObject( + object.updateFeedMetadata, + ); + } + if (object.activateFeed != null) { + if (typeof object.activateFeed !== "object") + throw TypeError( + ".pyth_lazer_transaction.UpdateFeed.activateFeed: object expected", + ); + message.activateFeed = + $root.pyth_lazer_transaction.ActivateFeed.fromObject( + object.activateFeed, + ); + } + if (object.deactivateFeed != null) { + if (typeof object.deactivateFeed !== "object") + throw TypeError( + ".pyth_lazer_transaction.UpdateFeed.deactivateFeed: object expected", + ); + message.deactivateFeed = + $root.pyth_lazer_transaction.DeactivateFeed.fromObject( + object.deactivateFeed, + ); + } + if (object.removeFeed != null) { + if (typeof object.removeFeed !== "object") + throw TypeError( + ".pyth_lazer_transaction.UpdateFeed.removeFeed: object expected", + ); + message.removeFeed = $root.google.protobuf.Empty.fromObject( + object.removeFeed, + ); + } + return message; + }; + + /** + * Creates a plain object from an UpdateFeed message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.UpdateFeed + * @static + * @param {pyth_lazer_transaction.UpdateFeed} message UpdateFeed + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateFeed.toObject = function toObject(message, options) { + if (!options) options = {}; + let object = {}; + if (message.feedId != null && message.hasOwnProperty("feedId")) { + object.feedId = message.feedId; + if (options.oneofs) object._feedId = "feedId"; + } + if ( + message.updateFeedMetadata != null && + message.hasOwnProperty("updateFeedMetadata") + ) { + object.updateFeedMetadata = + $root.pyth_lazer_transaction.UpdateFeedMetadata.toObject( + message.updateFeedMetadata, + options, + ); + if (options.oneofs) object.action = "updateFeedMetadata"; + } + if ( + message.activateFeed != null && + message.hasOwnProperty("activateFeed") + ) { + object.activateFeed = + $root.pyth_lazer_transaction.ActivateFeed.toObject( + message.activateFeed, + options, + ); + if (options.oneofs) object.action = "activateFeed"; + } + if ( + message.deactivateFeed != null && + message.hasOwnProperty("deactivateFeed") + ) { + object.deactivateFeed = + $root.pyth_lazer_transaction.DeactivateFeed.toObject( + message.deactivateFeed, + options, + ); + if (options.oneofs) object.action = "deactivateFeed"; + } + if (message.removeFeed != null && message.hasOwnProperty("removeFeed")) { + object.removeFeed = $root.google.protobuf.Empty.toObject( + message.removeFeed, + options, + ); + if (options.oneofs) object.action = "removeFeed"; + } + return object; + }; + + /** + * Converts this UpdateFeed to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.UpdateFeed + * @instance + * @returns {Object.} JSON object + */ + UpdateFeed.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateFeed + * @function getTypeUrl + * @memberof pyth_lazer_transaction.UpdateFeed + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateFeed.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.UpdateFeed"; + }; + + return UpdateFeed; + })(); + + pyth_lazer_transaction.UpdateFeedMetadata = (function () { + /** + * Properties of an UpdateFeedMetadata. + * @memberof pyth_lazer_transaction + * @interface IUpdateFeedMetadata + * @property {string|null} [name] UpdateFeedMetadata name + * @property {pyth_lazer_transaction.IDynamicValue|null} [value] UpdateFeedMetadata value + */ + + /** + * Constructs a new UpdateFeedMetadata. + * @memberof pyth_lazer_transaction + * @classdesc Represents an UpdateFeedMetadata. + * @implements IUpdateFeedMetadata + * @constructor + * @param {pyth_lazer_transaction.IUpdateFeedMetadata=} [properties] Properties to set + */ + function UpdateFeedMetadata(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]]; + } + + /** + * UpdateFeedMetadata name. + * @member {string|null|undefined} name + * @memberof pyth_lazer_transaction.UpdateFeedMetadata + * @instance + */ + UpdateFeedMetadata.prototype.name = null; + + /** + * UpdateFeedMetadata value. + * @member {pyth_lazer_transaction.IDynamicValue|null|undefined} value + * @memberof pyth_lazer_transaction.UpdateFeedMetadata + * @instance + */ + UpdateFeedMetadata.prototype.value = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * UpdateFeedMetadata _name. + * @member {"name"|undefined} _name + * @memberof pyth_lazer_transaction.UpdateFeedMetadata + * @instance + */ + Object.defineProperty(UpdateFeedMetadata.prototype, "_name", { + get: $util.oneOfGetter(($oneOfFields = ["name"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * UpdateFeedMetadata _value. + * @member {"value"|undefined} _value + * @memberof pyth_lazer_transaction.UpdateFeedMetadata + * @instance + */ + Object.defineProperty(UpdateFeedMetadata.prototype, "_value", { + get: $util.oneOfGetter(($oneOfFields = ["value"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Creates a new UpdateFeedMetadata instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.UpdateFeedMetadata + * @static + * @param {pyth_lazer_transaction.IUpdateFeedMetadata=} [properties] Properties to set + * @returns {pyth_lazer_transaction.UpdateFeedMetadata} UpdateFeedMetadata instance + */ + UpdateFeedMetadata.create = function create(properties) { + return new UpdateFeedMetadata(properties); + }; + + /** + * Encodes the specified UpdateFeedMetadata message. Does not implicitly {@link pyth_lazer_transaction.UpdateFeedMetadata.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.UpdateFeedMetadata + * @static + * @param {pyth_lazer_transaction.IUpdateFeedMetadata} message UpdateFeedMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateFeedMetadata.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")) + $root.pyth_lazer_transaction.DynamicValue.encode( + message.value, + writer.uint32(/* id 2, wireType 2 =*/ 18).fork(), + ).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateFeedMetadata message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdateFeedMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.UpdateFeedMetadata + * @static + * @param {pyth_lazer_transaction.IUpdateFeedMetadata} message UpdateFeedMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateFeedMetadata.encodeDelimited = function encodeDelimited( + message, + writer, + ) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateFeedMetadata message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.UpdateFeedMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.UpdateFeedMetadata} UpdateFeedMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateFeedMetadata.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pyth_lazer_transaction.UpdateFeedMetadata(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.value = $root.pyth_lazer_transaction.DynamicValue.decode( + reader, + reader.uint32(), + ); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateFeedMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.UpdateFeedMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.UpdateFeedMetadata} UpdateFeedMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateFeedMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateFeedMetadata message. + * @function verify + * @memberof pyth_lazer_transaction.UpdateFeedMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateFeedMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if (message.name != null && message.hasOwnProperty("name")) { + properties._name = 1; + if (!$util.isString(message.name)) return "name: string expected"; + } + if (message.value != null && message.hasOwnProperty("value")) { + properties._value = 1; + { + let error = $root.pyth_lazer_transaction.DynamicValue.verify( + message.value, + ); + if (error) return "value." + error; + } + } + return null; + }; + + /** + * Creates an UpdateFeedMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.UpdateFeedMetadata + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.UpdateFeedMetadata} UpdateFeedMetadata + */ + UpdateFeedMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.UpdateFeedMetadata) + return object; + let message = new $root.pyth_lazer_transaction.UpdateFeedMetadata(); + if (object.name != null) message.name = String(object.name); + if (object.value != null) { + if (typeof object.value !== "object") + throw TypeError( + ".pyth_lazer_transaction.UpdateFeedMetadata.value: object expected", + ); + message.value = $root.pyth_lazer_transaction.DynamicValue.fromObject( + object.value, + ); + } + return message; + }; + + /** + * Creates a plain object from an UpdateFeedMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.UpdateFeedMetadata + * @static + * @param {pyth_lazer_transaction.UpdateFeedMetadata} message UpdateFeedMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateFeedMetadata.toObject = function toObject(message, options) { + if (!options) options = {}; + let object = {}; + if (message.name != null && message.hasOwnProperty("name")) { + object.name = message.name; + if (options.oneofs) object._name = "name"; + } + if (message.value != null && message.hasOwnProperty("value")) { + object.value = $root.pyth_lazer_transaction.DynamicValue.toObject( + message.value, + options, + ); + if (options.oneofs) object._value = "value"; + } + return object; + }; + + /** + * Converts this UpdateFeedMetadata to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.UpdateFeedMetadata + * @instance + * @returns {Object.} JSON object + */ + UpdateFeedMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateFeedMetadata + * @function getTypeUrl + * @memberof pyth_lazer_transaction.UpdateFeedMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateFeedMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.UpdateFeedMetadata"; + }; + + return UpdateFeedMetadata; + })(); + + pyth_lazer_transaction.ActivateFeed = (function () { + /** + * Properties of an ActivateFeed. + * @memberof pyth_lazer_transaction + * @interface IActivateFeed + * @property {google.protobuf.ITimestamp|null} [activationTimestamp] ActivateFeed activationTimestamp + */ + + /** + * Constructs a new ActivateFeed. + * @memberof pyth_lazer_transaction + * @classdesc Represents an ActivateFeed. + * @implements IActivateFeed + * @constructor + * @param {pyth_lazer_transaction.IActivateFeed=} [properties] Properties to set + */ + function ActivateFeed(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]]; + } + + /** + * ActivateFeed activationTimestamp. + * @member {google.protobuf.ITimestamp|null|undefined} activationTimestamp + * @memberof pyth_lazer_transaction.ActivateFeed + * @instance + */ + ActivateFeed.prototype.activationTimestamp = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * ActivateFeed _activationTimestamp. + * @member {"activationTimestamp"|undefined} _activationTimestamp + * @memberof pyth_lazer_transaction.ActivateFeed + * @instance + */ + Object.defineProperty(ActivateFeed.prototype, "_activationTimestamp", { + get: $util.oneOfGetter(($oneOfFields = ["activationTimestamp"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Creates a new ActivateFeed instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.ActivateFeed + * @static + * @param {pyth_lazer_transaction.IActivateFeed=} [properties] Properties to set + * @returns {pyth_lazer_transaction.ActivateFeed} ActivateFeed instance + */ + ActivateFeed.create = function create(properties) { + return new ActivateFeed(properties); + }; + + /** + * Encodes the specified ActivateFeed message. Does not implicitly {@link pyth_lazer_transaction.ActivateFeed.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.ActivateFeed + * @static + * @param {pyth_lazer_transaction.IActivateFeed} message ActivateFeed message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ActivateFeed.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if ( + message.activationTimestamp != null && + Object.hasOwnProperty.call(message, "activationTimestamp") + ) + $root.google.protobuf.Timestamp.encode( + message.activationTimestamp, + writer.uint32(/* id 1, wireType 2 =*/ 10).fork(), + ).ldelim(); + return writer; + }; + + /** + * Encodes the specified ActivateFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ActivateFeed.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.ActivateFeed + * @static + * @param {pyth_lazer_transaction.IActivateFeed} message ActivateFeed message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ActivateFeed.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ActivateFeed message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.ActivateFeed + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.ActivateFeed} ActivateFeed + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ActivateFeed.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pyth_lazer_transaction.ActivateFeed(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.activationTimestamp = + $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ActivateFeed message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.ActivateFeed + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.ActivateFeed} ActivateFeed + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ActivateFeed.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ActivateFeed message. + * @function verify + * @memberof pyth_lazer_transaction.ActivateFeed + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ActivateFeed.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if ( + message.activationTimestamp != null && + message.hasOwnProperty("activationTimestamp") + ) { + properties._activationTimestamp = 1; + { + let error = $root.google.protobuf.Timestamp.verify( + message.activationTimestamp, + ); + if (error) return "activationTimestamp." + error; + } + } + return null; + }; + + /** + * Creates an ActivateFeed message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.ActivateFeed + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.ActivateFeed} ActivateFeed + */ + ActivateFeed.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.ActivateFeed) + return object; + let message = new $root.pyth_lazer_transaction.ActivateFeed(); + if (object.activationTimestamp != null) { + if (typeof object.activationTimestamp !== "object") + throw TypeError( + ".pyth_lazer_transaction.ActivateFeed.activationTimestamp: object expected", + ); + message.activationTimestamp = + $root.google.protobuf.Timestamp.fromObject( + object.activationTimestamp, + ); + } + return message; + }; + + /** + * Creates a plain object from an ActivateFeed message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.ActivateFeed + * @static + * @param {pyth_lazer_transaction.ActivateFeed} message ActivateFeed + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ActivateFeed.toObject = function toObject(message, options) { + if (!options) options = {}; + let object = {}; + if ( + message.activationTimestamp != null && + message.hasOwnProperty("activationTimestamp") + ) { + object.activationTimestamp = $root.google.protobuf.Timestamp.toObject( + message.activationTimestamp, + options, + ); + if (options.oneofs) object._activationTimestamp = "activationTimestamp"; + } + return object; + }; + + /** + * Converts this ActivateFeed to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.ActivateFeed + * @instance + * @returns {Object.} JSON object + */ + ActivateFeed.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ActivateFeed + * @function getTypeUrl + * @memberof pyth_lazer_transaction.ActivateFeed + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ActivateFeed.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.ActivateFeed"; + }; + + return ActivateFeed; + })(); + + pyth_lazer_transaction.DeactivateFeed = (function () { + /** + * Properties of a DeactivateFeed. + * @memberof pyth_lazer_transaction + * @interface IDeactivateFeed + * @property {google.protobuf.ITimestamp|null} [deactivationTimestamp] DeactivateFeed deactivationTimestamp + */ + + /** + * Constructs a new DeactivateFeed. + * @memberof pyth_lazer_transaction + * @classdesc Represents a DeactivateFeed. + * @implements IDeactivateFeed + * @constructor + * @param {pyth_lazer_transaction.IDeactivateFeed=} [properties] Properties to set + */ + function DeactivateFeed(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]]; + } + + /** + * DeactivateFeed deactivationTimestamp. + * @member {google.protobuf.ITimestamp|null|undefined} deactivationTimestamp + * @memberof pyth_lazer_transaction.DeactivateFeed + * @instance + */ + DeactivateFeed.prototype.deactivationTimestamp = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * DeactivateFeed _deactivationTimestamp. + * @member {"deactivationTimestamp"|undefined} _deactivationTimestamp + * @memberof pyth_lazer_transaction.DeactivateFeed + * @instance + */ + Object.defineProperty(DeactivateFeed.prototype, "_deactivationTimestamp", { + get: $util.oneOfGetter(($oneOfFields = ["deactivationTimestamp"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Creates a new DeactivateFeed instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.DeactivateFeed + * @static + * @param {pyth_lazer_transaction.IDeactivateFeed=} [properties] Properties to set + * @returns {pyth_lazer_transaction.DeactivateFeed} DeactivateFeed instance + */ + DeactivateFeed.create = function create(properties) { + return new DeactivateFeed(properties); + }; + + /** + * Encodes the specified DeactivateFeed message. Does not implicitly {@link pyth_lazer_transaction.DeactivateFeed.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.DeactivateFeed + * @static + * @param {pyth_lazer_transaction.IDeactivateFeed} message DeactivateFeed message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeactivateFeed.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if ( + message.deactivationTimestamp != null && + Object.hasOwnProperty.call(message, "deactivationTimestamp") + ) + $root.google.protobuf.Timestamp.encode( + message.deactivationTimestamp, + writer.uint32(/* id 1, wireType 2 =*/ 10).fork(), + ).ldelim(); + return writer; + }; + + /** + * Encodes the specified DeactivateFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DeactivateFeed.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.DeactivateFeed + * @static + * @param {pyth_lazer_transaction.IDeactivateFeed} message DeactivateFeed message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeactivateFeed.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeactivateFeed message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.DeactivateFeed + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.DeactivateFeed} DeactivateFeed + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeactivateFeed.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pyth_lazer_transaction.DeactivateFeed(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.deactivationTimestamp = + $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; } + } + return message; + }; - /** - * ResetLastSequenceNo lastSequenceNo. - * @member {number|Long|null|undefined} lastSequenceNo - * @memberof pyth_lazer_transaction.ResetLastSequenceNo - * @instance - */ - ResetLastSequenceNo.prototype.lastSequenceNo = null; - - // OneOf field names bound to virtual getters and setters - let $oneOfFields; - - /** - * ResetLastSequenceNo _lastSequenceNo. - * @member {"lastSequenceNo"|undefined} _lastSequenceNo - * @memberof pyth_lazer_transaction.ResetLastSequenceNo - * @instance - */ - Object.defineProperty(ResetLastSequenceNo.prototype, "_lastSequenceNo", { - get: $util.oneOfGetter($oneOfFields = ["lastSequenceNo"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ResetLastSequenceNo instance using the specified properties. - * @function create - * @memberof pyth_lazer_transaction.ResetLastSequenceNo - * @static - * @param {pyth_lazer_transaction.IResetLastSequenceNo=} [properties] Properties to set - * @returns {pyth_lazer_transaction.ResetLastSequenceNo} ResetLastSequenceNo instance - */ - ResetLastSequenceNo.create = function create(properties) { - return new ResetLastSequenceNo(properties); - }; - - /** - * Encodes the specified ResetLastSequenceNo message. Does not implicitly {@link pyth_lazer_transaction.ResetLastSequenceNo.verify|verify} messages. - * @function encode - * @memberof pyth_lazer_transaction.ResetLastSequenceNo - * @static - * @param {pyth_lazer_transaction.IResetLastSequenceNo} message ResetLastSequenceNo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResetLastSequenceNo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.lastSequenceNo != null && Object.hasOwnProperty.call(message, "lastSequenceNo")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.lastSequenceNo); - return writer; - }; - - /** - * Encodes the specified ResetLastSequenceNo message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ResetLastSequenceNo.verify|verify} messages. - * @function encodeDelimited - * @memberof pyth_lazer_transaction.ResetLastSequenceNo - * @static - * @param {pyth_lazer_transaction.IResetLastSequenceNo} message ResetLastSequenceNo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResetLastSequenceNo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResetLastSequenceNo message from the specified reader or buffer. - * @function decode - * @memberof pyth_lazer_transaction.ResetLastSequenceNo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pyth_lazer_transaction.ResetLastSequenceNo} ResetLastSequenceNo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResetLastSequenceNo.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.ResetLastSequenceNo(); - while (reader.pos < end) { - let tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.lastSequenceNo = reader.uint64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResetLastSequenceNo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pyth_lazer_transaction.ResetLastSequenceNo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pyth_lazer_transaction.ResetLastSequenceNo} ResetLastSequenceNo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResetLastSequenceNo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResetLastSequenceNo message. - * @function verify - * @memberof pyth_lazer_transaction.ResetLastSequenceNo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResetLastSequenceNo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - let properties = {}; - if (message.lastSequenceNo != null && message.hasOwnProperty("lastSequenceNo")) { - properties._lastSequenceNo = 1; - if (!$util.isInteger(message.lastSequenceNo) && !(message.lastSequenceNo && $util.isInteger(message.lastSequenceNo.low) && $util.isInteger(message.lastSequenceNo.high))) - return "lastSequenceNo: integer|Long expected"; - } - return null; - }; - - /** - * Creates a ResetLastSequenceNo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pyth_lazer_transaction.ResetLastSequenceNo - * @static - * @param {Object.} object Plain object - * @returns {pyth_lazer_transaction.ResetLastSequenceNo} ResetLastSequenceNo - */ - ResetLastSequenceNo.fromObject = function fromObject(object) { - if (object instanceof $root.pyth_lazer_transaction.ResetLastSequenceNo) - return object; - let message = new $root.pyth_lazer_transaction.ResetLastSequenceNo(); - if (object.lastSequenceNo != null) - if ($util.Long) - (message.lastSequenceNo = $util.Long.fromValue(object.lastSequenceNo)).unsigned = true; - else if (typeof object.lastSequenceNo === "string") - message.lastSequenceNo = parseInt(object.lastSequenceNo, 10); - else if (typeof object.lastSequenceNo === "number") - message.lastSequenceNo = object.lastSequenceNo; - else if (typeof object.lastSequenceNo === "object") - message.lastSequenceNo = new $util.LongBits(object.lastSequenceNo.low >>> 0, object.lastSequenceNo.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a ResetLastSequenceNo message. Also converts values to other types if specified. - * @function toObject - * @memberof pyth_lazer_transaction.ResetLastSequenceNo - * @static - * @param {pyth_lazer_transaction.ResetLastSequenceNo} message ResetLastSequenceNo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResetLastSequenceNo.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (message.lastSequenceNo != null && message.hasOwnProperty("lastSequenceNo")) { - if (typeof message.lastSequenceNo === "number") - object.lastSequenceNo = options.longs === String ? String(message.lastSequenceNo) : message.lastSequenceNo; - else - object.lastSequenceNo = options.longs === String ? $util.Long.prototype.toString.call(message.lastSequenceNo) : options.longs === Number ? new $util.LongBits(message.lastSequenceNo.low >>> 0, message.lastSequenceNo.high >>> 0).toNumber(true) : message.lastSequenceNo; - if (options.oneofs) - object._lastSequenceNo = "lastSequenceNo"; - } - return object; - }; - - /** - * Converts this ResetLastSequenceNo to JSON. - * @function toJSON - * @memberof pyth_lazer_transaction.ResetLastSequenceNo - * @instance - * @returns {Object.} JSON object - */ - ResetLastSequenceNo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ResetLastSequenceNo - * @function getTypeUrl - * @memberof pyth_lazer_transaction.ResetLastSequenceNo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ResetLastSequenceNo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pyth_lazer_transaction.ResetLastSequenceNo"; - }; - - return ResetLastSequenceNo; - })(); + /** + * Decodes a DeactivateFeed message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.DeactivateFeed + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.DeactivateFeed} DeactivateFeed + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeactivateFeed.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - pyth_lazer_transaction.AddPublisher = (function() { - - /** - * Properties of an AddPublisher. - * @memberof pyth_lazer_transaction - * @interface IAddPublisher - * @property {number|null} [publisherId] AddPublisher publisherId - * @property {string|null} [name] AddPublisher name - * @property {Array.|null} [publicKeys] AddPublisher publicKeys - * @property {boolean|null} [isActive] AddPublisher isActive - */ - - /** - * Constructs a new AddPublisher. - * @memberof pyth_lazer_transaction - * @classdesc Represents an AddPublisher. - * @implements IAddPublisher - * @constructor - * @param {pyth_lazer_transaction.IAddPublisher=} [properties] Properties to set - */ - function AddPublisher(properties) { - this.publicKeys = []; - 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 DeactivateFeed message. + * @function verify + * @memberof pyth_lazer_transaction.DeactivateFeed + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeactivateFeed.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if ( + message.deactivationTimestamp != null && + message.hasOwnProperty("deactivationTimestamp") + ) { + properties._deactivationTimestamp = 1; + { + let error = $root.google.protobuf.Timestamp.verify( + message.deactivationTimestamp, + ); + if (error) return "deactivationTimestamp." + error; } + } + return null; + }; - /** - * AddPublisher publisherId. - * @member {number|null|undefined} publisherId - * @memberof pyth_lazer_transaction.AddPublisher - * @instance - */ - AddPublisher.prototype.publisherId = null; - - /** - * AddPublisher name. - * @member {string|null|undefined} name - * @memberof pyth_lazer_transaction.AddPublisher - * @instance - */ - AddPublisher.prototype.name = null; - - /** - * AddPublisher publicKeys. - * @member {Array.} publicKeys - * @memberof pyth_lazer_transaction.AddPublisher - * @instance - */ - AddPublisher.prototype.publicKeys = $util.emptyArray; - - /** - * AddPublisher isActive. - * @member {boolean|null|undefined} isActive - * @memberof pyth_lazer_transaction.AddPublisher - * @instance - */ - AddPublisher.prototype.isActive = null; - - // OneOf field names bound to virtual getters and setters - let $oneOfFields; - - /** - * AddPublisher _publisherId. - * @member {"publisherId"|undefined} _publisherId - * @memberof pyth_lazer_transaction.AddPublisher - * @instance - */ - Object.defineProperty(AddPublisher.prototype, "_publisherId", { - get: $util.oneOfGetter($oneOfFields = ["publisherId"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AddPublisher _name. - * @member {"name"|undefined} _name - * @memberof pyth_lazer_transaction.AddPublisher - * @instance - */ - Object.defineProperty(AddPublisher.prototype, "_name", { - get: $util.oneOfGetter($oneOfFields = ["name"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AddPublisher _isActive. - * @member {"isActive"|undefined} _isActive - * @memberof pyth_lazer_transaction.AddPublisher - * @instance - */ - Object.defineProperty(AddPublisher.prototype, "_isActive", { - get: $util.oneOfGetter($oneOfFields = ["isActive"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new AddPublisher instance using the specified properties. - * @function create - * @memberof pyth_lazer_transaction.AddPublisher - * @static - * @param {pyth_lazer_transaction.IAddPublisher=} [properties] Properties to set - * @returns {pyth_lazer_transaction.AddPublisher} AddPublisher instance - */ - AddPublisher.create = function create(properties) { - return new AddPublisher(properties); - }; - - /** - * Encodes the specified AddPublisher message. Does not implicitly {@link pyth_lazer_transaction.AddPublisher.verify|verify} messages. - * @function encode - * @memberof pyth_lazer_transaction.AddPublisher - * @static - * @param {pyth_lazer_transaction.IAddPublisher} message AddPublisher message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AddPublisher.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.publisherId != null && Object.hasOwnProperty.call(message, "publisherId")) - writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.publisherId); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); - if (message.publicKeys != null && message.publicKeys.length) - for (let i = 0; i < message.publicKeys.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.publicKeys[i]); - if (message.isActive != null && Object.hasOwnProperty.call(message, "isActive")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.isActive); - return writer; - }; - - /** - * Encodes the specified AddPublisher message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddPublisher.verify|verify} messages. - * @function encodeDelimited - * @memberof pyth_lazer_transaction.AddPublisher - * @static - * @param {pyth_lazer_transaction.IAddPublisher} message AddPublisher message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AddPublisher.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AddPublisher message from the specified reader or buffer. - * @function decode - * @memberof pyth_lazer_transaction.AddPublisher - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pyth_lazer_transaction.AddPublisher} AddPublisher - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AddPublisher.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.AddPublisher(); - while (reader.pos < end) { - let tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.publisherId = reader.uint32(); - break; - } - case 2: { - message.name = reader.string(); - break; - } - case 3: { - if (!(message.publicKeys && message.publicKeys.length)) - message.publicKeys = []; - message.publicKeys.push(reader.bytes()); - break; - } - case 4: { - message.isActive = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AddPublisher message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pyth_lazer_transaction.AddPublisher - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pyth_lazer_transaction.AddPublisher} AddPublisher - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AddPublisher.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AddPublisher message. - * @function verify - * @memberof pyth_lazer_transaction.AddPublisher - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AddPublisher.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - let properties = {}; - if (message.publisherId != null && message.hasOwnProperty("publisherId")) { - properties._publisherId = 1; - if (!$util.isInteger(message.publisherId)) - return "publisherId: integer expected"; - } - if (message.name != null && message.hasOwnProperty("name")) { - properties._name = 1; - if (!$util.isString(message.name)) - return "name: string expected"; - } - if (message.publicKeys != null && message.hasOwnProperty("publicKeys")) { - if (!Array.isArray(message.publicKeys)) - return "publicKeys: array expected"; - for (let i = 0; i < message.publicKeys.length; ++i) - if (!(message.publicKeys[i] && typeof message.publicKeys[i].length === "number" || $util.isString(message.publicKeys[i]))) - return "publicKeys: buffer[] expected"; - } - if (message.isActive != null && message.hasOwnProperty("isActive")) { - properties._isActive = 1; - if (typeof message.isActive !== "boolean") - return "isActive: boolean expected"; - } - return null; - }; - - /** - * Creates an AddPublisher message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pyth_lazer_transaction.AddPublisher - * @static - * @param {Object.} object Plain object - * @returns {pyth_lazer_transaction.AddPublisher} AddPublisher - */ - AddPublisher.fromObject = function fromObject(object) { - if (object instanceof $root.pyth_lazer_transaction.AddPublisher) - return object; - let message = new $root.pyth_lazer_transaction.AddPublisher(); - if (object.publisherId != null) - message.publisherId = object.publisherId >>> 0; - if (object.name != null) - message.name = String(object.name); - if (object.publicKeys) { - if (!Array.isArray(object.publicKeys)) - throw TypeError(".pyth_lazer_transaction.AddPublisher.publicKeys: array expected"); - message.publicKeys = []; - for (let i = 0; i < object.publicKeys.length; ++i) - if (typeof object.publicKeys[i] === "string") - $util.base64.decode(object.publicKeys[i], message.publicKeys[i] = $util.newBuffer($util.base64.length(object.publicKeys[i])), 0); - else if (object.publicKeys[i].length >= 0) - message.publicKeys[i] = object.publicKeys[i]; - } - if (object.isActive != null) - message.isActive = Boolean(object.isActive); - return message; - }; - - /** - * Creates a plain object from an AddPublisher message. Also converts values to other types if specified. - * @function toObject - * @memberof pyth_lazer_transaction.AddPublisher - * @static - * @param {pyth_lazer_transaction.AddPublisher} message AddPublisher - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AddPublisher.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.publicKeys = []; - if (message.publisherId != null && message.hasOwnProperty("publisherId")) { - object.publisherId = message.publisherId; - if (options.oneofs) - object._publisherId = "publisherId"; - } - if (message.name != null && message.hasOwnProperty("name")) { - object.name = message.name; - if (options.oneofs) - object._name = "name"; - } - if (message.publicKeys && message.publicKeys.length) { - object.publicKeys = []; - for (let j = 0; j < message.publicKeys.length; ++j) - object.publicKeys[j] = options.bytes === String ? $util.base64.encode(message.publicKeys[j], 0, message.publicKeys[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.publicKeys[j]) : message.publicKeys[j]; - } - if (message.isActive != null && message.hasOwnProperty("isActive")) { - object.isActive = message.isActive; - if (options.oneofs) - object._isActive = "isActive"; - } - return object; - }; - - /** - * Converts this AddPublisher to JSON. - * @function toJSON - * @memberof pyth_lazer_transaction.AddPublisher - * @instance - * @returns {Object.} JSON object - */ - AddPublisher.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AddPublisher - * @function getTypeUrl - * @memberof pyth_lazer_transaction.AddPublisher - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AddPublisher.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pyth_lazer_transaction.AddPublisher"; - }; - - return AddPublisher; - })(); + /** + * Creates a DeactivateFeed message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.DeactivateFeed + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.DeactivateFeed} DeactivateFeed + */ + DeactivateFeed.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.DeactivateFeed) + return object; + let message = new $root.pyth_lazer_transaction.DeactivateFeed(); + if (object.deactivationTimestamp != null) { + if (typeof object.deactivationTimestamp !== "object") + throw TypeError( + ".pyth_lazer_transaction.DeactivateFeed.deactivationTimestamp: object expected", + ); + message.deactivationTimestamp = + $root.google.protobuf.Timestamp.fromObject( + object.deactivationTimestamp, + ); + } + return message; + }; - pyth_lazer_transaction.UpdatePublisher = (function() { - - /** - * Properties of an UpdatePublisher. - * @memberof pyth_lazer_transaction - * @interface IUpdatePublisher - * @property {number|null} [publisherId] UpdatePublisher publisherId - * @property {pyth_lazer_transaction.ISetPublisherName|null} [setPublisherName] UpdatePublisher setPublisherName - * @property {pyth_lazer_transaction.IAddPublisherPublicKeys|null} [addPublisherPublicKeys] UpdatePublisher addPublisherPublicKeys - * @property {pyth_lazer_transaction.IRemovePublisherPublicKeys|null} [removePublisherPublicKeys] UpdatePublisher removePublisherPublicKeys - * @property {pyth_lazer_transaction.ISetPublisherPublicKeys|null} [setPublisherPublicKeys] UpdatePublisher setPublisherPublicKeys - * @property {pyth_lazer_transaction.ISetPublisherActive|null} [setPublisherActive] UpdatePublisher setPublisherActive - * @property {google.protobuf.IEmpty|null} [removePublisher] UpdatePublisher removePublisher - */ - - /** - * Constructs a new UpdatePublisher. - * @memberof pyth_lazer_transaction - * @classdesc Represents an UpdatePublisher. - * @implements IUpdatePublisher - * @constructor - * @param {pyth_lazer_transaction.IUpdatePublisher=} [properties] Properties to set - */ - function UpdatePublisher(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 DeactivateFeed message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.DeactivateFeed + * @static + * @param {pyth_lazer_transaction.DeactivateFeed} message DeactivateFeed + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeactivateFeed.toObject = function toObject(message, options) { + if (!options) options = {}; + let object = {}; + if ( + message.deactivationTimestamp != null && + message.hasOwnProperty("deactivationTimestamp") + ) { + object.deactivationTimestamp = $root.google.protobuf.Timestamp.toObject( + message.deactivationTimestamp, + options, + ); + if (options.oneofs) + object._deactivationTimestamp = "deactivationTimestamp"; + } + return object; + }; - /** - * UpdatePublisher publisherId. - * @member {number|null|undefined} publisherId - * @memberof pyth_lazer_transaction.UpdatePublisher - * @instance - */ - UpdatePublisher.prototype.publisherId = null; - - /** - * UpdatePublisher setPublisherName. - * @member {pyth_lazer_transaction.ISetPublisherName|null|undefined} setPublisherName - * @memberof pyth_lazer_transaction.UpdatePublisher - * @instance - */ - UpdatePublisher.prototype.setPublisherName = null; - - /** - * UpdatePublisher addPublisherPublicKeys. - * @member {pyth_lazer_transaction.IAddPublisherPublicKeys|null|undefined} addPublisherPublicKeys - * @memberof pyth_lazer_transaction.UpdatePublisher - * @instance - */ - UpdatePublisher.prototype.addPublisherPublicKeys = null; - - /** - * UpdatePublisher removePublisherPublicKeys. - * @member {pyth_lazer_transaction.IRemovePublisherPublicKeys|null|undefined} removePublisherPublicKeys - * @memberof pyth_lazer_transaction.UpdatePublisher - * @instance - */ - UpdatePublisher.prototype.removePublisherPublicKeys = null; - - /** - * UpdatePublisher setPublisherPublicKeys. - * @member {pyth_lazer_transaction.ISetPublisherPublicKeys|null|undefined} setPublisherPublicKeys - * @memberof pyth_lazer_transaction.UpdatePublisher - * @instance - */ - UpdatePublisher.prototype.setPublisherPublicKeys = null; - - /** - * UpdatePublisher setPublisherActive. - * @member {pyth_lazer_transaction.ISetPublisherActive|null|undefined} setPublisherActive - * @memberof pyth_lazer_transaction.UpdatePublisher - * @instance - */ - UpdatePublisher.prototype.setPublisherActive = null; - - /** - * UpdatePublisher removePublisher. - * @member {google.protobuf.IEmpty|null|undefined} removePublisher - * @memberof pyth_lazer_transaction.UpdatePublisher - * @instance - */ - UpdatePublisher.prototype.removePublisher = null; - - // OneOf field names bound to virtual getters and setters - let $oneOfFields; - - /** - * UpdatePublisher _publisherId. - * @member {"publisherId"|undefined} _publisherId - * @memberof pyth_lazer_transaction.UpdatePublisher - * @instance - */ - Object.defineProperty(UpdatePublisher.prototype, "_publisherId", { - get: $util.oneOfGetter($oneOfFields = ["publisherId"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * UpdatePublisher action. - * @member {"setPublisherName"|"addPublisherPublicKeys"|"removePublisherPublicKeys"|"setPublisherPublicKeys"|"setPublisherActive"|"removePublisher"|undefined} action - * @memberof pyth_lazer_transaction.UpdatePublisher - * @instance - */ - Object.defineProperty(UpdatePublisher.prototype, "action", { - get: $util.oneOfGetter($oneOfFields = ["setPublisherName", "addPublisherPublicKeys", "removePublisherPublicKeys", "setPublisherPublicKeys", "setPublisherActive", "removePublisher"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new UpdatePublisher instance using the specified properties. - * @function create - * @memberof pyth_lazer_transaction.UpdatePublisher - * @static - * @param {pyth_lazer_transaction.IUpdatePublisher=} [properties] Properties to set - * @returns {pyth_lazer_transaction.UpdatePublisher} UpdatePublisher instance - */ - UpdatePublisher.create = function create(properties) { - return new UpdatePublisher(properties); - }; - - /** - * Encodes the specified UpdatePublisher message. Does not implicitly {@link pyth_lazer_transaction.UpdatePublisher.verify|verify} messages. - * @function encode - * @memberof pyth_lazer_transaction.UpdatePublisher - * @static - * @param {pyth_lazer_transaction.IUpdatePublisher} message UpdatePublisher message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdatePublisher.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.publisherId != null && Object.hasOwnProperty.call(message, "publisherId")) - writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.publisherId); - if (message.setPublisherName != null && Object.hasOwnProperty.call(message, "setPublisherName")) - $root.pyth_lazer_transaction.SetPublisherName.encode(message.setPublisherName, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); - if (message.addPublisherPublicKeys != null && Object.hasOwnProperty.call(message, "addPublisherPublicKeys")) - $root.pyth_lazer_transaction.AddPublisherPublicKeys.encode(message.addPublisherPublicKeys, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); - if (message.removePublisherPublicKeys != null && Object.hasOwnProperty.call(message, "removePublisherPublicKeys")) - $root.pyth_lazer_transaction.RemovePublisherPublicKeys.encode(message.removePublisherPublicKeys, writer.uint32(/* id 103, wireType 2 =*/826).fork()).ldelim(); - if (message.setPublisherPublicKeys != null && Object.hasOwnProperty.call(message, "setPublisherPublicKeys")) - $root.pyth_lazer_transaction.SetPublisherPublicKeys.encode(message.setPublisherPublicKeys, writer.uint32(/* id 104, wireType 2 =*/834).fork()).ldelim(); - if (message.setPublisherActive != null && Object.hasOwnProperty.call(message, "setPublisherActive")) - $root.pyth_lazer_transaction.SetPublisherActive.encode(message.setPublisherActive, writer.uint32(/* id 105, wireType 2 =*/842).fork()).ldelim(); - if (message.removePublisher != null && Object.hasOwnProperty.call(message, "removePublisher")) - $root.google.protobuf.Empty.encode(message.removePublisher, writer.uint32(/* id 199, wireType 2 =*/1594).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpdatePublisher message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdatePublisher.verify|verify} messages. - * @function encodeDelimited - * @memberof pyth_lazer_transaction.UpdatePublisher - * @static - * @param {pyth_lazer_transaction.IUpdatePublisher} message UpdatePublisher message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdatePublisher.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdatePublisher message from the specified reader or buffer. - * @function decode - * @memberof pyth_lazer_transaction.UpdatePublisher - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pyth_lazer_transaction.UpdatePublisher} UpdatePublisher - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdatePublisher.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.UpdatePublisher(); - while (reader.pos < end) { - let tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.publisherId = reader.uint32(); - break; - } - case 101: { - message.setPublisherName = $root.pyth_lazer_transaction.SetPublisherName.decode(reader, reader.uint32()); - break; - } - case 102: { - message.addPublisherPublicKeys = $root.pyth_lazer_transaction.AddPublisherPublicKeys.decode(reader, reader.uint32()); - break; - } - case 103: { - message.removePublisherPublicKeys = $root.pyth_lazer_transaction.RemovePublisherPublicKeys.decode(reader, reader.uint32()); - break; - } - case 104: { - message.setPublisherPublicKeys = $root.pyth_lazer_transaction.SetPublisherPublicKeys.decode(reader, reader.uint32()); - break; - } - case 105: { - message.setPublisherActive = $root.pyth_lazer_transaction.SetPublisherActive.decode(reader, reader.uint32()); - break; - } - case 199: { - message.removePublisher = $root.google.protobuf.Empty.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdatePublisher message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pyth_lazer_transaction.UpdatePublisher - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pyth_lazer_transaction.UpdatePublisher} UpdatePublisher - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdatePublisher.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdatePublisher message. - * @function verify - * @memberof pyth_lazer_transaction.UpdatePublisher - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdatePublisher.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - let properties = {}; - if (message.publisherId != null && message.hasOwnProperty("publisherId")) { - properties._publisherId = 1; - if (!$util.isInteger(message.publisherId)) - return "publisherId: integer expected"; - } - if (message.setPublisherName != null && message.hasOwnProperty("setPublisherName")) { - properties.action = 1; - { - let error = $root.pyth_lazer_transaction.SetPublisherName.verify(message.setPublisherName); - if (error) - return "setPublisherName." + error; - } - } - if (message.addPublisherPublicKeys != null && message.hasOwnProperty("addPublisherPublicKeys")) { - if (properties.action === 1) - return "action: multiple values"; - properties.action = 1; - { - let error = $root.pyth_lazer_transaction.AddPublisherPublicKeys.verify(message.addPublisherPublicKeys); - if (error) - return "addPublisherPublicKeys." + error; - } - } - if (message.removePublisherPublicKeys != null && message.hasOwnProperty("removePublisherPublicKeys")) { - if (properties.action === 1) - return "action: multiple values"; - properties.action = 1; - { - let error = $root.pyth_lazer_transaction.RemovePublisherPublicKeys.verify(message.removePublisherPublicKeys); - if (error) - return "removePublisherPublicKeys." + error; - } - } - if (message.setPublisherPublicKeys != null && message.hasOwnProperty("setPublisherPublicKeys")) { - if (properties.action === 1) - return "action: multiple values"; - properties.action = 1; - { - let error = $root.pyth_lazer_transaction.SetPublisherPublicKeys.verify(message.setPublisherPublicKeys); - if (error) - return "setPublisherPublicKeys." + error; - } - } - if (message.setPublisherActive != null && message.hasOwnProperty("setPublisherActive")) { - if (properties.action === 1) - return "action: multiple values"; - properties.action = 1; - { - let error = $root.pyth_lazer_transaction.SetPublisherActive.verify(message.setPublisherActive); - if (error) - return "setPublisherActive." + error; - } - } - if (message.removePublisher != null && message.hasOwnProperty("removePublisher")) { - if (properties.action === 1) - return "action: multiple values"; - properties.action = 1; - { - let error = $root.google.protobuf.Empty.verify(message.removePublisher); - if (error) - return "removePublisher." + error; - } - } - return null; - }; - - /** - * Creates an UpdatePublisher message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pyth_lazer_transaction.UpdatePublisher - * @static - * @param {Object.} object Plain object - * @returns {pyth_lazer_transaction.UpdatePublisher} UpdatePublisher - */ - UpdatePublisher.fromObject = function fromObject(object) { - if (object instanceof $root.pyth_lazer_transaction.UpdatePublisher) - return object; - let message = new $root.pyth_lazer_transaction.UpdatePublisher(); - if (object.publisherId != null) - message.publisherId = object.publisherId >>> 0; - if (object.setPublisherName != null) { - if (typeof object.setPublisherName !== "object") - throw TypeError(".pyth_lazer_transaction.UpdatePublisher.setPublisherName: object expected"); - message.setPublisherName = $root.pyth_lazer_transaction.SetPublisherName.fromObject(object.setPublisherName); - } - if (object.addPublisherPublicKeys != null) { - if (typeof object.addPublisherPublicKeys !== "object") - throw TypeError(".pyth_lazer_transaction.UpdatePublisher.addPublisherPublicKeys: object expected"); - message.addPublisherPublicKeys = $root.pyth_lazer_transaction.AddPublisherPublicKeys.fromObject(object.addPublisherPublicKeys); - } - if (object.removePublisherPublicKeys != null) { - if (typeof object.removePublisherPublicKeys !== "object") - throw TypeError(".pyth_lazer_transaction.UpdatePublisher.removePublisherPublicKeys: object expected"); - message.removePublisherPublicKeys = $root.pyth_lazer_transaction.RemovePublisherPublicKeys.fromObject(object.removePublisherPublicKeys); - } - if (object.setPublisherPublicKeys != null) { - if (typeof object.setPublisherPublicKeys !== "object") - throw TypeError(".pyth_lazer_transaction.UpdatePublisher.setPublisherPublicKeys: object expected"); - message.setPublisherPublicKeys = $root.pyth_lazer_transaction.SetPublisherPublicKeys.fromObject(object.setPublisherPublicKeys); - } - if (object.setPublisherActive != null) { - if (typeof object.setPublisherActive !== "object") - throw TypeError(".pyth_lazer_transaction.UpdatePublisher.setPublisherActive: object expected"); - message.setPublisherActive = $root.pyth_lazer_transaction.SetPublisherActive.fromObject(object.setPublisherActive); - } - if (object.removePublisher != null) { - if (typeof object.removePublisher !== "object") - throw TypeError(".pyth_lazer_transaction.UpdatePublisher.removePublisher: object expected"); - message.removePublisher = $root.google.protobuf.Empty.fromObject(object.removePublisher); - } - return message; - }; - - /** - * Creates a plain object from an UpdatePublisher message. Also converts values to other types if specified. - * @function toObject - * @memberof pyth_lazer_transaction.UpdatePublisher - * @static - * @param {pyth_lazer_transaction.UpdatePublisher} message UpdatePublisher - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdatePublisher.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (message.publisherId != null && message.hasOwnProperty("publisherId")) { - object.publisherId = message.publisherId; - if (options.oneofs) - object._publisherId = "publisherId"; - } - if (message.setPublisherName != null && message.hasOwnProperty("setPublisherName")) { - object.setPublisherName = $root.pyth_lazer_transaction.SetPublisherName.toObject(message.setPublisherName, options); - if (options.oneofs) - object.action = "setPublisherName"; - } - if (message.addPublisherPublicKeys != null && message.hasOwnProperty("addPublisherPublicKeys")) { - object.addPublisherPublicKeys = $root.pyth_lazer_transaction.AddPublisherPublicKeys.toObject(message.addPublisherPublicKeys, options); - if (options.oneofs) - object.action = "addPublisherPublicKeys"; - } - if (message.removePublisherPublicKeys != null && message.hasOwnProperty("removePublisherPublicKeys")) { - object.removePublisherPublicKeys = $root.pyth_lazer_transaction.RemovePublisherPublicKeys.toObject(message.removePublisherPublicKeys, options); - if (options.oneofs) - object.action = "removePublisherPublicKeys"; - } - if (message.setPublisherPublicKeys != null && message.hasOwnProperty("setPublisherPublicKeys")) { - object.setPublisherPublicKeys = $root.pyth_lazer_transaction.SetPublisherPublicKeys.toObject(message.setPublisherPublicKeys, options); - if (options.oneofs) - object.action = "setPublisherPublicKeys"; - } - if (message.setPublisherActive != null && message.hasOwnProperty("setPublisherActive")) { - object.setPublisherActive = $root.pyth_lazer_transaction.SetPublisherActive.toObject(message.setPublisherActive, options); - if (options.oneofs) - object.action = "setPublisherActive"; - } - if (message.removePublisher != null && message.hasOwnProperty("removePublisher")) { - object.removePublisher = $root.google.protobuf.Empty.toObject(message.removePublisher, options); - if (options.oneofs) - object.action = "removePublisher"; - } - return object; - }; - - /** - * Converts this UpdatePublisher to JSON. - * @function toJSON - * @memberof pyth_lazer_transaction.UpdatePublisher - * @instance - * @returns {Object.} JSON object - */ - UpdatePublisher.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdatePublisher - * @function getTypeUrl - * @memberof pyth_lazer_transaction.UpdatePublisher - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdatePublisher.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pyth_lazer_transaction.UpdatePublisher"; - }; + /** + * Converts this DeactivateFeed to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.DeactivateFeed + * @instance + * @returns {Object.} JSON object + */ + DeactivateFeed.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return UpdatePublisher; - })(); + /** + * Gets the default type url for DeactivateFeed + * @function getTypeUrl + * @memberof pyth_lazer_transaction.DeactivateFeed + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeactivateFeed.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.DeactivateFeed"; + }; - pyth_lazer_transaction.SetPublisherName = (function() { - - /** - * Properties of a SetPublisherName. - * @memberof pyth_lazer_transaction - * @interface ISetPublisherName - * @property {string|null} [name] SetPublisherName name - */ - - /** - * Constructs a new SetPublisherName. - * @memberof pyth_lazer_transaction - * @classdesc Represents a SetPublisherName. - * @implements ISetPublisherName - * @constructor - * @param {pyth_lazer_transaction.ISetPublisherName=} [properties] Properties to set - */ - function SetPublisherName(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 DeactivateFeed; + })(); - /** - * SetPublisherName name. - * @member {string|null|undefined} name - * @memberof pyth_lazer_transaction.SetPublisherName - * @instance - */ - SetPublisherName.prototype.name = null; - - // OneOf field names bound to virtual getters and setters - let $oneOfFields; - - /** - * SetPublisherName _name. - * @member {"name"|undefined} _name - * @memberof pyth_lazer_transaction.SetPublisherName - * @instance - */ - Object.defineProperty(SetPublisherName.prototype, "_name", { - get: $util.oneOfGetter($oneOfFields = ["name"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new SetPublisherName instance using the specified properties. - * @function create - * @memberof pyth_lazer_transaction.SetPublisherName - * @static - * @param {pyth_lazer_transaction.ISetPublisherName=} [properties] Properties to set - * @returns {pyth_lazer_transaction.SetPublisherName} SetPublisherName instance - */ - SetPublisherName.create = function create(properties) { - return new SetPublisherName(properties); - }; - - /** - * Encodes the specified SetPublisherName message. Does not implicitly {@link pyth_lazer_transaction.SetPublisherName.verify|verify} messages. - * @function encode - * @memberof pyth_lazer_transaction.SetPublisherName - * @static - * @param {pyth_lazer_transaction.ISetPublisherName} message SetPublisherName message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetPublisherName.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); - return writer; - }; - - /** - * Encodes the specified SetPublisherName message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetPublisherName.verify|verify} messages. - * @function encodeDelimited - * @memberof pyth_lazer_transaction.SetPublisherName - * @static - * @param {pyth_lazer_transaction.ISetPublisherName} message SetPublisherName message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetPublisherName.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SetPublisherName message from the specified reader or buffer. - * @function decode - * @memberof pyth_lazer_transaction.SetPublisherName - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pyth_lazer_transaction.SetPublisherName} SetPublisherName - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetPublisherName.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.SetPublisherName(); - while (reader.pos < end) { - let tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SetPublisherName message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pyth_lazer_transaction.SetPublisherName - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pyth_lazer_transaction.SetPublisherName} SetPublisherName - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetPublisherName.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SetPublisherName message. - * @function verify - * @memberof pyth_lazer_transaction.SetPublisherName - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SetPublisherName.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - let properties = {}; - if (message.name != null && message.hasOwnProperty("name")) { - properties._name = 1; - if (!$util.isString(message.name)) - return "name: string expected"; - } - return null; - }; - - /** - * Creates a SetPublisherName message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pyth_lazer_transaction.SetPublisherName - * @static - * @param {Object.} object Plain object - * @returns {pyth_lazer_transaction.SetPublisherName} SetPublisherName - */ - SetPublisherName.fromObject = function fromObject(object) { - if (object instanceof $root.pyth_lazer_transaction.SetPublisherName) - return object; - let message = new $root.pyth_lazer_transaction.SetPublisherName(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a SetPublisherName message. Also converts values to other types if specified. - * @function toObject - * @memberof pyth_lazer_transaction.SetPublisherName - * @static - * @param {pyth_lazer_transaction.SetPublisherName} message SetPublisherName - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SetPublisherName.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (message.name != null && message.hasOwnProperty("name")) { - object.name = message.name; - if (options.oneofs) - object._name = "name"; - } - return object; - }; - - /** - * Converts this SetPublisherName to JSON. - * @function toJSON - * @memberof pyth_lazer_transaction.SetPublisherName - * @instance - * @returns {Object.} JSON object - */ - SetPublisherName.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SetPublisherName - * @function getTypeUrl - * @memberof pyth_lazer_transaction.SetPublisherName - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SetPublisherName.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pyth_lazer_transaction.SetPublisherName"; - }; + pyth_lazer_transaction.DynamicValue = (function () { + /** + * Properties of a DynamicValue. + * @memberof pyth_lazer_transaction + * @interface IDynamicValue + * @property {string|null} [stringValue] DynamicValue stringValue + * @property {number|null} [doubleValue] DynamicValue doubleValue + * @property {number|Long|null} [uintValue] DynamicValue uintValue + * @property {number|Long|null} [intValue] DynamicValue intValue + * @property {boolean|null} [boolValue] DynamicValue boolValue + * @property {Uint8Array|null} [bytesValue] DynamicValue bytesValue + * @property {google.protobuf.IDuration|null} [durationValue] DynamicValue durationValue + * @property {google.protobuf.ITimestamp|null} [timestampValue] DynamicValue timestampValue + * @property {pyth_lazer_transaction.DynamicValue.IList|null} [list] DynamicValue list + * @property {pyth_lazer_transaction.DynamicValue.IMap|null} [map] DynamicValue map + */ - return SetPublisherName; - })(); + /** + * Constructs a new DynamicValue. + * @memberof pyth_lazer_transaction + * @classdesc Represents a DynamicValue. + * @implements IDynamicValue + * @constructor + * @param {pyth_lazer_transaction.IDynamicValue=} [properties] Properties to set + */ + function DynamicValue(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]]; + } - pyth_lazer_transaction.AddPublisherPublicKeys = (function() { - - /** - * Properties of an AddPublisherPublicKeys. - * @memberof pyth_lazer_transaction - * @interface IAddPublisherPublicKeys - * @property {Array.|null} [publicKeys] AddPublisherPublicKeys publicKeys - */ - - /** - * Constructs a new AddPublisherPublicKeys. - * @memberof pyth_lazer_transaction - * @classdesc Represents an AddPublisherPublicKeys. - * @implements IAddPublisherPublicKeys - * @constructor - * @param {pyth_lazer_transaction.IAddPublisherPublicKeys=} [properties] Properties to set - */ - function AddPublisherPublicKeys(properties) { - this.publicKeys = []; - 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]]; - } + /** + * DynamicValue stringValue. + * @member {string|null|undefined} stringValue + * @memberof pyth_lazer_transaction.DynamicValue + * @instance + */ + DynamicValue.prototype.stringValue = null; - /** - * AddPublisherPublicKeys publicKeys. - * @member {Array.} publicKeys - * @memberof pyth_lazer_transaction.AddPublisherPublicKeys - * @instance - */ - AddPublisherPublicKeys.prototype.publicKeys = $util.emptyArray; - - /** - * Creates a new AddPublisherPublicKeys instance using the specified properties. - * @function create - * @memberof pyth_lazer_transaction.AddPublisherPublicKeys - * @static - * @param {pyth_lazer_transaction.IAddPublisherPublicKeys=} [properties] Properties to set - * @returns {pyth_lazer_transaction.AddPublisherPublicKeys} AddPublisherPublicKeys instance - */ - AddPublisherPublicKeys.create = function create(properties) { - return new AddPublisherPublicKeys(properties); - }; - - /** - * Encodes the specified AddPublisherPublicKeys message. Does not implicitly {@link pyth_lazer_transaction.AddPublisherPublicKeys.verify|verify} messages. - * @function encode - * @memberof pyth_lazer_transaction.AddPublisherPublicKeys - * @static - * @param {pyth_lazer_transaction.IAddPublisherPublicKeys} message AddPublisherPublicKeys message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AddPublisherPublicKeys.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.publicKeys != null && message.publicKeys.length) - for (let i = 0; i < message.publicKeys.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.publicKeys[i]); - return writer; - }; - - /** - * Encodes the specified AddPublisherPublicKeys message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddPublisherPublicKeys.verify|verify} messages. - * @function encodeDelimited - * @memberof pyth_lazer_transaction.AddPublisherPublicKeys - * @static - * @param {pyth_lazer_transaction.IAddPublisherPublicKeys} message AddPublisherPublicKeys message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AddPublisherPublicKeys.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AddPublisherPublicKeys message from the specified reader or buffer. - * @function decode - * @memberof pyth_lazer_transaction.AddPublisherPublicKeys - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pyth_lazer_transaction.AddPublisherPublicKeys} AddPublisherPublicKeys - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AddPublisherPublicKeys.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.AddPublisherPublicKeys(); - while (reader.pos < end) { - let tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.publicKeys && message.publicKeys.length)) - message.publicKeys = []; - message.publicKeys.push(reader.bytes()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AddPublisherPublicKeys message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pyth_lazer_transaction.AddPublisherPublicKeys - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pyth_lazer_transaction.AddPublisherPublicKeys} AddPublisherPublicKeys - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AddPublisherPublicKeys.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AddPublisherPublicKeys message. - * @function verify - * @memberof pyth_lazer_transaction.AddPublisherPublicKeys - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AddPublisherPublicKeys.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.publicKeys != null && message.hasOwnProperty("publicKeys")) { - if (!Array.isArray(message.publicKeys)) - return "publicKeys: array expected"; - for (let i = 0; i < message.publicKeys.length; ++i) - if (!(message.publicKeys[i] && typeof message.publicKeys[i].length === "number" || $util.isString(message.publicKeys[i]))) - return "publicKeys: buffer[] expected"; - } - return null; - }; - - /** - * Creates an AddPublisherPublicKeys message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pyth_lazer_transaction.AddPublisherPublicKeys - * @static - * @param {Object.} object Plain object - * @returns {pyth_lazer_transaction.AddPublisherPublicKeys} AddPublisherPublicKeys - */ - AddPublisherPublicKeys.fromObject = function fromObject(object) { - if (object instanceof $root.pyth_lazer_transaction.AddPublisherPublicKeys) - return object; - let message = new $root.pyth_lazer_transaction.AddPublisherPublicKeys(); - if (object.publicKeys) { - if (!Array.isArray(object.publicKeys)) - throw TypeError(".pyth_lazer_transaction.AddPublisherPublicKeys.publicKeys: array expected"); - message.publicKeys = []; - for (let i = 0; i < object.publicKeys.length; ++i) - if (typeof object.publicKeys[i] === "string") - $util.base64.decode(object.publicKeys[i], message.publicKeys[i] = $util.newBuffer($util.base64.length(object.publicKeys[i])), 0); - else if (object.publicKeys[i].length >= 0) - message.publicKeys[i] = object.publicKeys[i]; - } - return message; - }; - - /** - * Creates a plain object from an AddPublisherPublicKeys message. Also converts values to other types if specified. - * @function toObject - * @memberof pyth_lazer_transaction.AddPublisherPublicKeys - * @static - * @param {pyth_lazer_transaction.AddPublisherPublicKeys} message AddPublisherPublicKeys - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AddPublisherPublicKeys.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.publicKeys = []; - if (message.publicKeys && message.publicKeys.length) { - object.publicKeys = []; - for (let j = 0; j < message.publicKeys.length; ++j) - object.publicKeys[j] = options.bytes === String ? $util.base64.encode(message.publicKeys[j], 0, message.publicKeys[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.publicKeys[j]) : message.publicKeys[j]; - } - return object; - }; - - /** - * Converts this AddPublisherPublicKeys to JSON. - * @function toJSON - * @memberof pyth_lazer_transaction.AddPublisherPublicKeys - * @instance - * @returns {Object.} JSON object - */ - AddPublisherPublicKeys.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AddPublisherPublicKeys - * @function getTypeUrl - * @memberof pyth_lazer_transaction.AddPublisherPublicKeys - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AddPublisherPublicKeys.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pyth_lazer_transaction.AddPublisherPublicKeys"; - }; + /** + * DynamicValue doubleValue. + * @member {number|null|undefined} doubleValue + * @memberof pyth_lazer_transaction.DynamicValue + * @instance + */ + DynamicValue.prototype.doubleValue = null; - return AddPublisherPublicKeys; - })(); + /** + * DynamicValue uintValue. + * @member {number|Long|null|undefined} uintValue + * @memberof pyth_lazer_transaction.DynamicValue + * @instance + */ + DynamicValue.prototype.uintValue = null; - pyth_lazer_transaction.RemovePublisherPublicKeys = (function() { - - /** - * Properties of a RemovePublisherPublicKeys. - * @memberof pyth_lazer_transaction - * @interface IRemovePublisherPublicKeys - * @property {Array.|null} [publicKeys] RemovePublisherPublicKeys publicKeys - */ - - /** - * Constructs a new RemovePublisherPublicKeys. - * @memberof pyth_lazer_transaction - * @classdesc Represents a RemovePublisherPublicKeys. - * @implements IRemovePublisherPublicKeys - * @constructor - * @param {pyth_lazer_transaction.IRemovePublisherPublicKeys=} [properties] Properties to set - */ - function RemovePublisherPublicKeys(properties) { - this.publicKeys = []; - 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]]; - } + /** + * DynamicValue intValue. + * @member {number|Long|null|undefined} intValue + * @memberof pyth_lazer_transaction.DynamicValue + * @instance + */ + DynamicValue.prototype.intValue = null; - /** - * RemovePublisherPublicKeys publicKeys. - * @member {Array.} publicKeys - * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys - * @instance - */ - RemovePublisherPublicKeys.prototype.publicKeys = $util.emptyArray; - - /** - * Creates a new RemovePublisherPublicKeys instance using the specified properties. - * @function create - * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys - * @static - * @param {pyth_lazer_transaction.IRemovePublisherPublicKeys=} [properties] Properties to set - * @returns {pyth_lazer_transaction.RemovePublisherPublicKeys} RemovePublisherPublicKeys instance - */ - RemovePublisherPublicKeys.create = function create(properties) { - return new RemovePublisherPublicKeys(properties); - }; - - /** - * Encodes the specified RemovePublisherPublicKeys message. Does not implicitly {@link pyth_lazer_transaction.RemovePublisherPublicKeys.verify|verify} messages. - * @function encode - * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys - * @static - * @param {pyth_lazer_transaction.IRemovePublisherPublicKeys} message RemovePublisherPublicKeys message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RemovePublisherPublicKeys.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.publicKeys != null && message.publicKeys.length) - for (let i = 0; i < message.publicKeys.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.publicKeys[i]); - return writer; - }; - - /** - * Encodes the specified RemovePublisherPublicKeys message, length delimited. Does not implicitly {@link pyth_lazer_transaction.RemovePublisherPublicKeys.verify|verify} messages. - * @function encodeDelimited - * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys - * @static - * @param {pyth_lazer_transaction.IRemovePublisherPublicKeys} message RemovePublisherPublicKeys message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RemovePublisherPublicKeys.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RemovePublisherPublicKeys message from the specified reader or buffer. - * @function decode - * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pyth_lazer_transaction.RemovePublisherPublicKeys} RemovePublisherPublicKeys - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RemovePublisherPublicKeys.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.RemovePublisherPublicKeys(); - while (reader.pos < end) { - let tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.publicKeys && message.publicKeys.length)) - message.publicKeys = []; - message.publicKeys.push(reader.bytes()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RemovePublisherPublicKeys message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pyth_lazer_transaction.RemovePublisherPublicKeys} RemovePublisherPublicKeys - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RemovePublisherPublicKeys.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RemovePublisherPublicKeys message. - * @function verify - * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RemovePublisherPublicKeys.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.publicKeys != null && message.hasOwnProperty("publicKeys")) { - if (!Array.isArray(message.publicKeys)) - return "publicKeys: array expected"; - for (let i = 0; i < message.publicKeys.length; ++i) - if (!(message.publicKeys[i] && typeof message.publicKeys[i].length === "number" || $util.isString(message.publicKeys[i]))) - return "publicKeys: buffer[] expected"; - } - return null; - }; - - /** - * Creates a RemovePublisherPublicKeys message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys - * @static - * @param {Object.} object Plain object - * @returns {pyth_lazer_transaction.RemovePublisherPublicKeys} RemovePublisherPublicKeys - */ - RemovePublisherPublicKeys.fromObject = function fromObject(object) { - if (object instanceof $root.pyth_lazer_transaction.RemovePublisherPublicKeys) - return object; - let message = new $root.pyth_lazer_transaction.RemovePublisherPublicKeys(); - if (object.publicKeys) { - if (!Array.isArray(object.publicKeys)) - throw TypeError(".pyth_lazer_transaction.RemovePublisherPublicKeys.publicKeys: array expected"); - message.publicKeys = []; - for (let i = 0; i < object.publicKeys.length; ++i) - if (typeof object.publicKeys[i] === "string") - $util.base64.decode(object.publicKeys[i], message.publicKeys[i] = $util.newBuffer($util.base64.length(object.publicKeys[i])), 0); - else if (object.publicKeys[i].length >= 0) - message.publicKeys[i] = object.publicKeys[i]; - } - return message; - }; - - /** - * Creates a plain object from a RemovePublisherPublicKeys message. Also converts values to other types if specified. - * @function toObject - * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys - * @static - * @param {pyth_lazer_transaction.RemovePublisherPublicKeys} message RemovePublisherPublicKeys - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RemovePublisherPublicKeys.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.publicKeys = []; - if (message.publicKeys && message.publicKeys.length) { - object.publicKeys = []; - for (let j = 0; j < message.publicKeys.length; ++j) - object.publicKeys[j] = options.bytes === String ? $util.base64.encode(message.publicKeys[j], 0, message.publicKeys[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.publicKeys[j]) : message.publicKeys[j]; - } - return object; - }; - - /** - * Converts this RemovePublisherPublicKeys to JSON. - * @function toJSON - * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys - * @instance - * @returns {Object.} JSON object - */ - RemovePublisherPublicKeys.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RemovePublisherPublicKeys - * @function getTypeUrl - * @memberof pyth_lazer_transaction.RemovePublisherPublicKeys - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RemovePublisherPublicKeys.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pyth_lazer_transaction.RemovePublisherPublicKeys"; - }; + /** + * DynamicValue boolValue. + * @member {boolean|null|undefined} boolValue + * @memberof pyth_lazer_transaction.DynamicValue + * @instance + */ + DynamicValue.prototype.boolValue = null; - return RemovePublisherPublicKeys; - })(); + /** + * DynamicValue bytesValue. + * @member {Uint8Array|null|undefined} bytesValue + * @memberof pyth_lazer_transaction.DynamicValue + * @instance + */ + DynamicValue.prototype.bytesValue = null; - pyth_lazer_transaction.SetPublisherPublicKeys = (function() { - - /** - * Properties of a SetPublisherPublicKeys. - * @memberof pyth_lazer_transaction - * @interface ISetPublisherPublicKeys - * @property {Array.|null} [publicKeys] SetPublisherPublicKeys publicKeys - */ - - /** - * Constructs a new SetPublisherPublicKeys. - * @memberof pyth_lazer_transaction - * @classdesc Represents a SetPublisherPublicKeys. - * @implements ISetPublisherPublicKeys - * @constructor - * @param {pyth_lazer_transaction.ISetPublisherPublicKeys=} [properties] Properties to set - */ - function SetPublisherPublicKeys(properties) { - this.publicKeys = []; - 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]]; - } + /** + * DynamicValue durationValue. + * @member {google.protobuf.IDuration|null|undefined} durationValue + * @memberof pyth_lazer_transaction.DynamicValue + * @instance + */ + DynamicValue.prototype.durationValue = null; - /** - * SetPublisherPublicKeys publicKeys. - * @member {Array.} publicKeys - * @memberof pyth_lazer_transaction.SetPublisherPublicKeys - * @instance - */ - SetPublisherPublicKeys.prototype.publicKeys = $util.emptyArray; - - /** - * Creates a new SetPublisherPublicKeys instance using the specified properties. - * @function create - * @memberof pyth_lazer_transaction.SetPublisherPublicKeys - * @static - * @param {pyth_lazer_transaction.ISetPublisherPublicKeys=} [properties] Properties to set - * @returns {pyth_lazer_transaction.SetPublisherPublicKeys} SetPublisherPublicKeys instance - */ - SetPublisherPublicKeys.create = function create(properties) { - return new SetPublisherPublicKeys(properties); - }; - - /** - * Encodes the specified SetPublisherPublicKeys message. Does not implicitly {@link pyth_lazer_transaction.SetPublisherPublicKeys.verify|verify} messages. - * @function encode - * @memberof pyth_lazer_transaction.SetPublisherPublicKeys - * @static - * @param {pyth_lazer_transaction.ISetPublisherPublicKeys} message SetPublisherPublicKeys message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetPublisherPublicKeys.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.publicKeys != null && message.publicKeys.length) - for (let i = 0; i < message.publicKeys.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.publicKeys[i]); - return writer; - }; - - /** - * Encodes the specified SetPublisherPublicKeys message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetPublisherPublicKeys.verify|verify} messages. - * @function encodeDelimited - * @memberof pyth_lazer_transaction.SetPublisherPublicKeys - * @static - * @param {pyth_lazer_transaction.ISetPublisherPublicKeys} message SetPublisherPublicKeys message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetPublisherPublicKeys.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SetPublisherPublicKeys message from the specified reader or buffer. - * @function decode - * @memberof pyth_lazer_transaction.SetPublisherPublicKeys - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pyth_lazer_transaction.SetPublisherPublicKeys} SetPublisherPublicKeys - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetPublisherPublicKeys.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.SetPublisherPublicKeys(); - while (reader.pos < end) { - let tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.publicKeys && message.publicKeys.length)) - message.publicKeys = []; - message.publicKeys.push(reader.bytes()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SetPublisherPublicKeys message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pyth_lazer_transaction.SetPublisherPublicKeys - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pyth_lazer_transaction.SetPublisherPublicKeys} SetPublisherPublicKeys - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetPublisherPublicKeys.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SetPublisherPublicKeys message. - * @function verify - * @memberof pyth_lazer_transaction.SetPublisherPublicKeys - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SetPublisherPublicKeys.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.publicKeys != null && message.hasOwnProperty("publicKeys")) { - if (!Array.isArray(message.publicKeys)) - return "publicKeys: array expected"; - for (let i = 0; i < message.publicKeys.length; ++i) - if (!(message.publicKeys[i] && typeof message.publicKeys[i].length === "number" || $util.isString(message.publicKeys[i]))) - return "publicKeys: buffer[] expected"; - } - return null; - }; - - /** - * Creates a SetPublisherPublicKeys message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pyth_lazer_transaction.SetPublisherPublicKeys - * @static - * @param {Object.} object Plain object - * @returns {pyth_lazer_transaction.SetPublisherPublicKeys} SetPublisherPublicKeys - */ - SetPublisherPublicKeys.fromObject = function fromObject(object) { - if (object instanceof $root.pyth_lazer_transaction.SetPublisherPublicKeys) - return object; - let message = new $root.pyth_lazer_transaction.SetPublisherPublicKeys(); - if (object.publicKeys) { - if (!Array.isArray(object.publicKeys)) - throw TypeError(".pyth_lazer_transaction.SetPublisherPublicKeys.publicKeys: array expected"); - message.publicKeys = []; - for (let i = 0; i < object.publicKeys.length; ++i) - if (typeof object.publicKeys[i] === "string") - $util.base64.decode(object.publicKeys[i], message.publicKeys[i] = $util.newBuffer($util.base64.length(object.publicKeys[i])), 0); - else if (object.publicKeys[i].length >= 0) - message.publicKeys[i] = object.publicKeys[i]; - } - return message; - }; - - /** - * Creates a plain object from a SetPublisherPublicKeys message. Also converts values to other types if specified. - * @function toObject - * @memberof pyth_lazer_transaction.SetPublisherPublicKeys - * @static - * @param {pyth_lazer_transaction.SetPublisherPublicKeys} message SetPublisherPublicKeys - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SetPublisherPublicKeys.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.publicKeys = []; - if (message.publicKeys && message.publicKeys.length) { - object.publicKeys = []; - for (let j = 0; j < message.publicKeys.length; ++j) - object.publicKeys[j] = options.bytes === String ? $util.base64.encode(message.publicKeys[j], 0, message.publicKeys[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.publicKeys[j]) : message.publicKeys[j]; - } - return object; - }; - - /** - * Converts this SetPublisherPublicKeys to JSON. - * @function toJSON - * @memberof pyth_lazer_transaction.SetPublisherPublicKeys - * @instance - * @returns {Object.} JSON object - */ - SetPublisherPublicKeys.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SetPublisherPublicKeys - * @function getTypeUrl - * @memberof pyth_lazer_transaction.SetPublisherPublicKeys - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SetPublisherPublicKeys.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pyth_lazer_transaction.SetPublisherPublicKeys"; - }; + /** + * DynamicValue timestampValue. + * @member {google.protobuf.ITimestamp|null|undefined} timestampValue + * @memberof pyth_lazer_transaction.DynamicValue + * @instance + */ + DynamicValue.prototype.timestampValue = null; - return SetPublisherPublicKeys; - })(); + /** + * DynamicValue list. + * @member {pyth_lazer_transaction.DynamicValue.IList|null|undefined} list + * @memberof pyth_lazer_transaction.DynamicValue + * @instance + */ + DynamicValue.prototype.list = null; - pyth_lazer_transaction.SetPublisherActive = (function() { - - /** - * Properties of a SetPublisherActive. - * @memberof pyth_lazer_transaction - * @interface ISetPublisherActive - * @property {boolean|null} [isActive] SetPublisherActive isActive - */ - - /** - * Constructs a new SetPublisherActive. - * @memberof pyth_lazer_transaction - * @classdesc Represents a SetPublisherActive. - * @implements ISetPublisherActive - * @constructor - * @param {pyth_lazer_transaction.ISetPublisherActive=} [properties] Properties to set - */ - function SetPublisherActive(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]]; - } + /** + * DynamicValue map. + * @member {pyth_lazer_transaction.DynamicValue.IMap|null|undefined} map + * @memberof pyth_lazer_transaction.DynamicValue + * @instance + */ + DynamicValue.prototype.map = null; - /** - * SetPublisherActive isActive. - * @member {boolean|null|undefined} isActive - * @memberof pyth_lazer_transaction.SetPublisherActive - * @instance - */ - SetPublisherActive.prototype.isActive = null; - - // OneOf field names bound to virtual getters and setters - let $oneOfFields; - - /** - * SetPublisherActive _isActive. - * @member {"isActive"|undefined} _isActive - * @memberof pyth_lazer_transaction.SetPublisherActive - * @instance - */ - Object.defineProperty(SetPublisherActive.prototype, "_isActive", { - get: $util.oneOfGetter($oneOfFields = ["isActive"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new SetPublisherActive instance using the specified properties. - * @function create - * @memberof pyth_lazer_transaction.SetPublisherActive - * @static - * @param {pyth_lazer_transaction.ISetPublisherActive=} [properties] Properties to set - * @returns {pyth_lazer_transaction.SetPublisherActive} SetPublisherActive instance - */ - SetPublisherActive.create = function create(properties) { - return new SetPublisherActive(properties); - }; - - /** - * Encodes the specified SetPublisherActive message. Does not implicitly {@link pyth_lazer_transaction.SetPublisherActive.verify|verify} messages. - * @function encode - * @memberof pyth_lazer_transaction.SetPublisherActive - * @static - * @param {pyth_lazer_transaction.ISetPublisherActive} message SetPublisherActive message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetPublisherActive.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.isActive != null && Object.hasOwnProperty.call(message, "isActive")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.isActive); - return writer; - }; - - /** - * Encodes the specified SetPublisherActive message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetPublisherActive.verify|verify} messages. - * @function encodeDelimited - * @memberof pyth_lazer_transaction.SetPublisherActive - * @static - * @param {pyth_lazer_transaction.ISetPublisherActive} message SetPublisherActive message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetPublisherActive.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SetPublisherActive message from the specified reader or buffer. - * @function decode - * @memberof pyth_lazer_transaction.SetPublisherActive - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pyth_lazer_transaction.SetPublisherActive} SetPublisherActive - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetPublisherActive.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.SetPublisherActive(); - while (reader.pos < end) { - let tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.isActive = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SetPublisherActive message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pyth_lazer_transaction.SetPublisherActive - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pyth_lazer_transaction.SetPublisherActive} SetPublisherActive - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetPublisherActive.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SetPublisherActive message. - * @function verify - * @memberof pyth_lazer_transaction.SetPublisherActive - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SetPublisherActive.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - let properties = {}; - if (message.isActive != null && message.hasOwnProperty("isActive")) { - properties._isActive = 1; - if (typeof message.isActive !== "boolean") - return "isActive: boolean expected"; - } - return null; - }; - - /** - * Creates a SetPublisherActive message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pyth_lazer_transaction.SetPublisherActive - * @static - * @param {Object.} object Plain object - * @returns {pyth_lazer_transaction.SetPublisherActive} SetPublisherActive - */ - SetPublisherActive.fromObject = function fromObject(object) { - if (object instanceof $root.pyth_lazer_transaction.SetPublisherActive) - return object; - let message = new $root.pyth_lazer_transaction.SetPublisherActive(); - if (object.isActive != null) - message.isActive = Boolean(object.isActive); - return message; - }; - - /** - * Creates a plain object from a SetPublisherActive message. Also converts values to other types if specified. - * @function toObject - * @memberof pyth_lazer_transaction.SetPublisherActive - * @static - * @param {pyth_lazer_transaction.SetPublisherActive} message SetPublisherActive - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SetPublisherActive.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (message.isActive != null && message.hasOwnProperty("isActive")) { - object.isActive = message.isActive; - if (options.oneofs) - object._isActive = "isActive"; - } - return object; - }; - - /** - * Converts this SetPublisherActive to JSON. - * @function toJSON - * @memberof pyth_lazer_transaction.SetPublisherActive - * @instance - * @returns {Object.} JSON object - */ - SetPublisherActive.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SetPublisherActive - * @function getTypeUrl - * @memberof pyth_lazer_transaction.SetPublisherActive - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SetPublisherActive.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pyth_lazer_transaction.SetPublisherActive"; - }; + // OneOf field names bound to virtual getters and setters + let $oneOfFields; - return SetPublisherActive; - })(); + /** + * DynamicValue value. + * @member {"stringValue"|"doubleValue"|"uintValue"|"intValue"|"boolValue"|"bytesValue"|"durationValue"|"timestampValue"|"list"|"map"|undefined} value + * @memberof pyth_lazer_transaction.DynamicValue + * @instance + */ + Object.defineProperty(DynamicValue.prototype, "value", { + get: $util.oneOfGetter( + ($oneOfFields = [ + "stringValue", + "doubleValue", + "uintValue", + "intValue", + "boolValue", + "bytesValue", + "durationValue", + "timestampValue", + "list", + "map", + ]), + ), + set: $util.oneOfSetter($oneOfFields), + }); - pyth_lazer_transaction.AddFeed = (function() { - - /** - * Properties of an AddFeed. - * @memberof pyth_lazer_transaction - * @interface IAddFeed - * @property {number|null} [feedId] AddFeed feedId - * @property {pyth_lazer_transaction.DynamicValue.IMap|null} [metadata] AddFeed metadata - * @property {Array.|null} [permissionedPublishers] AddFeed permissionedPublishers - */ - - /** - * Constructs a new AddFeed. - * @memberof pyth_lazer_transaction - * @classdesc Represents an AddFeed. - * @implements IAddFeed - * @constructor - * @param {pyth_lazer_transaction.IAddFeed=} [properties] Properties to set - */ - function AddFeed(properties) { - this.permissionedPublishers = []; - 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 DynamicValue instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.DynamicValue + * @static + * @param {pyth_lazer_transaction.IDynamicValue=} [properties] Properties to set + * @returns {pyth_lazer_transaction.DynamicValue} DynamicValue instance + */ + DynamicValue.create = function create(properties) { + return new DynamicValue(properties); + }; - /** - * AddFeed feedId. - * @member {number|null|undefined} feedId - * @memberof pyth_lazer_transaction.AddFeed - * @instance - */ - AddFeed.prototype.feedId = null; - - /** - * AddFeed metadata. - * @member {pyth_lazer_transaction.DynamicValue.IMap|null|undefined} metadata - * @memberof pyth_lazer_transaction.AddFeed - * @instance - */ - AddFeed.prototype.metadata = null; - - /** - * AddFeed permissionedPublishers. - * @member {Array.} permissionedPublishers - * @memberof pyth_lazer_transaction.AddFeed - * @instance - */ - AddFeed.prototype.permissionedPublishers = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - let $oneOfFields; - - /** - * AddFeed _feedId. - * @member {"feedId"|undefined} _feedId - * @memberof pyth_lazer_transaction.AddFeed - * @instance - */ - Object.defineProperty(AddFeed.prototype, "_feedId", { - get: $util.oneOfGetter($oneOfFields = ["feedId"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AddFeed _metadata. - * @member {"metadata"|undefined} _metadata - * @memberof pyth_lazer_transaction.AddFeed - * @instance - */ - Object.defineProperty(AddFeed.prototype, "_metadata", { - get: $util.oneOfGetter($oneOfFields = ["metadata"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new AddFeed instance using the specified properties. - * @function create - * @memberof pyth_lazer_transaction.AddFeed - * @static - * @param {pyth_lazer_transaction.IAddFeed=} [properties] Properties to set - * @returns {pyth_lazer_transaction.AddFeed} AddFeed instance - */ - AddFeed.create = function create(properties) { - return new AddFeed(properties); - }; - - /** - * Encodes the specified AddFeed message. Does not implicitly {@link pyth_lazer_transaction.AddFeed.verify|verify} messages. - * @function encode - * @memberof pyth_lazer_transaction.AddFeed - * @static - * @param {pyth_lazer_transaction.IAddFeed} message AddFeed message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AddFeed.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.feedId != null && Object.hasOwnProperty.call(message, "feedId")) - writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.feedId); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.pyth_lazer_transaction.DynamicValue.Map.encode(message.metadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.permissionedPublishers != null && message.permissionedPublishers.length) { - writer.uint32(/* id 3, wireType 2 =*/26).fork(); - for (let i = 0; i < message.permissionedPublishers.length; ++i) - writer.uint32(message.permissionedPublishers[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified AddFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddFeed.verify|verify} messages. - * @function encodeDelimited - * @memberof pyth_lazer_transaction.AddFeed - * @static - * @param {pyth_lazer_transaction.IAddFeed} message AddFeed message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AddFeed.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AddFeed message from the specified reader or buffer. - * @function decode - * @memberof pyth_lazer_transaction.AddFeed - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pyth_lazer_transaction.AddFeed} AddFeed - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AddFeed.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.AddFeed(); - while (reader.pos < end) { - let tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.feedId = reader.uint32(); - break; - } - case 2: { - message.metadata = $root.pyth_lazer_transaction.DynamicValue.Map.decode(reader, reader.uint32()); - break; - } - case 3: { - if (!(message.permissionedPublishers && message.permissionedPublishers.length)) - message.permissionedPublishers = []; - if ((tag & 7) === 2) { - let end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.permissionedPublishers.push(reader.uint32()); - } else - message.permissionedPublishers.push(reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AddFeed message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pyth_lazer_transaction.AddFeed - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pyth_lazer_transaction.AddFeed} AddFeed - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AddFeed.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AddFeed message. - * @function verify - * @memberof pyth_lazer_transaction.AddFeed - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AddFeed.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - let properties = {}; - if (message.feedId != null && message.hasOwnProperty("feedId")) { - properties._feedId = 1; - if (!$util.isInteger(message.feedId)) - return "feedId: integer expected"; - } - if (message.metadata != null && message.hasOwnProperty("metadata")) { - properties._metadata = 1; - { - let error = $root.pyth_lazer_transaction.DynamicValue.Map.verify(message.metadata); - if (error) - return "metadata." + error; - } - } - if (message.permissionedPublishers != null && message.hasOwnProperty("permissionedPublishers")) { - if (!Array.isArray(message.permissionedPublishers)) - return "permissionedPublishers: array expected"; - for (let i = 0; i < message.permissionedPublishers.length; ++i) - if (!$util.isInteger(message.permissionedPublishers[i])) - return "permissionedPublishers: integer[] expected"; - } - return null; - }; - - /** - * Creates an AddFeed message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pyth_lazer_transaction.AddFeed - * @static - * @param {Object.} object Plain object - * @returns {pyth_lazer_transaction.AddFeed} AddFeed - */ - AddFeed.fromObject = function fromObject(object) { - if (object instanceof $root.pyth_lazer_transaction.AddFeed) - return object; - let message = new $root.pyth_lazer_transaction.AddFeed(); - if (object.feedId != null) - message.feedId = object.feedId >>> 0; - if (object.metadata != null) { - if (typeof object.metadata !== "object") - throw TypeError(".pyth_lazer_transaction.AddFeed.metadata: object expected"); - message.metadata = $root.pyth_lazer_transaction.DynamicValue.Map.fromObject(object.metadata); - } - if (object.permissionedPublishers) { - if (!Array.isArray(object.permissionedPublishers)) - throw TypeError(".pyth_lazer_transaction.AddFeed.permissionedPublishers: array expected"); - message.permissionedPublishers = []; - for (let i = 0; i < object.permissionedPublishers.length; ++i) - message.permissionedPublishers[i] = object.permissionedPublishers[i] >>> 0; - } - return message; - }; - - /** - * Creates a plain object from an AddFeed message. Also converts values to other types if specified. - * @function toObject - * @memberof pyth_lazer_transaction.AddFeed - * @static - * @param {pyth_lazer_transaction.AddFeed} message AddFeed - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AddFeed.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.permissionedPublishers = []; - if (message.feedId != null && message.hasOwnProperty("feedId")) { - object.feedId = message.feedId; - if (options.oneofs) - object._feedId = "feedId"; - } - if (message.metadata != null && message.hasOwnProperty("metadata")) { - object.metadata = $root.pyth_lazer_transaction.DynamicValue.Map.toObject(message.metadata, options); - if (options.oneofs) - object._metadata = "metadata"; - } - if (message.permissionedPublishers && message.permissionedPublishers.length) { - object.permissionedPublishers = []; - for (let j = 0; j < message.permissionedPublishers.length; ++j) - object.permissionedPublishers[j] = message.permissionedPublishers[j]; - } - return object; - }; - - /** - * Converts this AddFeed to JSON. - * @function toJSON - * @memberof pyth_lazer_transaction.AddFeed - * @instance - * @returns {Object.} JSON object - */ - AddFeed.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AddFeed - * @function getTypeUrl - * @memberof pyth_lazer_transaction.AddFeed - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AddFeed.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pyth_lazer_transaction.AddFeed"; - }; + /** + * Encodes the specified DynamicValue message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.DynamicValue + * @static + * @param {pyth_lazer_transaction.IDynamicValue} message DynamicValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DynamicValue.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if ( + message.stringValue != null && + Object.hasOwnProperty.call(message, "stringValue") + ) + writer.uint32(/* id 1, wireType 2 =*/ 10).string(message.stringValue); + if ( + message.doubleValue != null && + Object.hasOwnProperty.call(message, "doubleValue") + ) + writer.uint32(/* id 2, wireType 1 =*/ 17).double(message.doubleValue); + if ( + message.uintValue != null && + Object.hasOwnProperty.call(message, "uintValue") + ) + writer.uint32(/* id 3, wireType 0 =*/ 24).uint64(message.uintValue); + if ( + message.intValue != null && + Object.hasOwnProperty.call(message, "intValue") + ) + writer.uint32(/* id 4, wireType 0 =*/ 32).sint64(message.intValue); + if ( + message.boolValue != null && + Object.hasOwnProperty.call(message, "boolValue") + ) + writer.uint32(/* id 5, wireType 0 =*/ 40).bool(message.boolValue); + if ( + message.bytesValue != null && + Object.hasOwnProperty.call(message, "bytesValue") + ) + writer.uint32(/* id 6, wireType 2 =*/ 50).bytes(message.bytesValue); + if ( + message.durationValue != null && + Object.hasOwnProperty.call(message, "durationValue") + ) + $root.google.protobuf.Duration.encode( + message.durationValue, + writer.uint32(/* id 7, wireType 2 =*/ 58).fork(), + ).ldelim(); + if ( + message.timestampValue != null && + Object.hasOwnProperty.call(message, "timestampValue") + ) + $root.google.protobuf.Timestamp.encode( + message.timestampValue, + writer.uint32(/* id 8, wireType 2 =*/ 66).fork(), + ).ldelim(); + if (message.list != null && Object.hasOwnProperty.call(message, "list")) + $root.pyth_lazer_transaction.DynamicValue.List.encode( + message.list, + writer.uint32(/* id 9, wireType 2 =*/ 74).fork(), + ).ldelim(); + if (message.map != null && Object.hasOwnProperty.call(message, "map")) + $root.pyth_lazer_transaction.DynamicValue.Map.encode( + message.map, + writer.uint32(/* id 10, wireType 2 =*/ 82).fork(), + ).ldelim(); + return writer; + }; - return AddFeed; - })(); + /** + * Encodes the specified DynamicValue message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.DynamicValue + * @static + * @param {pyth_lazer_transaction.IDynamicValue} message DynamicValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DynamicValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - pyth_lazer_transaction.UpdateFeed = (function() { - - /** - * Properties of an UpdateFeed. - * @memberof pyth_lazer_transaction - * @interface IUpdateFeed - * @property {number|null} [feedId] UpdateFeed feedId - * @property {pyth_lazer_transaction.IUpdateFeedMetadata|null} [updateFeedMetadata] UpdateFeed updateFeedMetadata - * @property {pyth_lazer_transaction.IActivateFeed|null} [activateFeed] UpdateFeed activateFeed - * @property {pyth_lazer_transaction.IDeactivateFeed|null} [deactivateFeed] UpdateFeed deactivateFeed - * @property {google.protobuf.IEmpty|null} [removeFeed] UpdateFeed removeFeed - */ - - /** - * Constructs a new UpdateFeed. - * @memberof pyth_lazer_transaction - * @classdesc Represents an UpdateFeed. - * @implements IUpdateFeed - * @constructor - * @param {pyth_lazer_transaction.IUpdateFeed=} [properties] Properties to set - */ - function UpdateFeed(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 DynamicValue message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.DynamicValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.DynamicValue} DynamicValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DynamicValue.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pyth_lazer_transaction.DynamicValue(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.stringValue = reader.string(); + break; + } + case 2: { + message.doubleValue = reader.double(); + break; + } + case 3: { + message.uintValue = reader.uint64(); + break; + } + case 4: { + message.intValue = reader.sint64(); + break; + } + case 5: { + message.boolValue = reader.bool(); + break; + } + case 6: { + message.bytesValue = reader.bytes(); + break; + } + case 7: { + message.durationValue = $root.google.protobuf.Duration.decode( + reader, + reader.uint32(), + ); + break; + } + case 8: { + message.timestampValue = $root.google.protobuf.Timestamp.decode( + reader, + reader.uint32(), + ); + break; + } + case 9: { + message.list = + $root.pyth_lazer_transaction.DynamicValue.List.decode( + reader, + reader.uint32(), + ); + break; + } + case 10: { + message.map = $root.pyth_lazer_transaction.DynamicValue.Map.decode( + reader, + reader.uint32(), + ); + break; + } + default: + reader.skipType(tag & 7); + break; } + } + return message; + }; - /** - * UpdateFeed feedId. - * @member {number|null|undefined} feedId - * @memberof pyth_lazer_transaction.UpdateFeed - * @instance - */ - UpdateFeed.prototype.feedId = null; - - /** - * UpdateFeed updateFeedMetadata. - * @member {pyth_lazer_transaction.IUpdateFeedMetadata|null|undefined} updateFeedMetadata - * @memberof pyth_lazer_transaction.UpdateFeed - * @instance - */ - UpdateFeed.prototype.updateFeedMetadata = null; - - /** - * UpdateFeed activateFeed. - * @member {pyth_lazer_transaction.IActivateFeed|null|undefined} activateFeed - * @memberof pyth_lazer_transaction.UpdateFeed - * @instance - */ - UpdateFeed.prototype.activateFeed = null; - - /** - * UpdateFeed deactivateFeed. - * @member {pyth_lazer_transaction.IDeactivateFeed|null|undefined} deactivateFeed - * @memberof pyth_lazer_transaction.UpdateFeed - * @instance - */ - UpdateFeed.prototype.deactivateFeed = null; - - /** - * UpdateFeed removeFeed. - * @member {google.protobuf.IEmpty|null|undefined} removeFeed - * @memberof pyth_lazer_transaction.UpdateFeed - * @instance - */ - UpdateFeed.prototype.removeFeed = null; - - // OneOf field names bound to virtual getters and setters - let $oneOfFields; - - /** - * UpdateFeed _feedId. - * @member {"feedId"|undefined} _feedId - * @memberof pyth_lazer_transaction.UpdateFeed - * @instance - */ - Object.defineProperty(UpdateFeed.prototype, "_feedId", { - get: $util.oneOfGetter($oneOfFields = ["feedId"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * UpdateFeed action. - * @member {"updateFeedMetadata"|"activateFeed"|"deactivateFeed"|"removeFeed"|undefined} action - * @memberof pyth_lazer_transaction.UpdateFeed - * @instance - */ - Object.defineProperty(UpdateFeed.prototype, "action", { - get: $util.oneOfGetter($oneOfFields = ["updateFeedMetadata", "activateFeed", "deactivateFeed", "removeFeed"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new UpdateFeed instance using the specified properties. - * @function create - * @memberof pyth_lazer_transaction.UpdateFeed - * @static - * @param {pyth_lazer_transaction.IUpdateFeed=} [properties] Properties to set - * @returns {pyth_lazer_transaction.UpdateFeed} UpdateFeed instance - */ - UpdateFeed.create = function create(properties) { - return new UpdateFeed(properties); - }; - - /** - * Encodes the specified UpdateFeed message. Does not implicitly {@link pyth_lazer_transaction.UpdateFeed.verify|verify} messages. - * @function encode - * @memberof pyth_lazer_transaction.UpdateFeed - * @static - * @param {pyth_lazer_transaction.IUpdateFeed} message UpdateFeed message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateFeed.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.feedId != null && Object.hasOwnProperty.call(message, "feedId")) - writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.feedId); - if (message.updateFeedMetadata != null && Object.hasOwnProperty.call(message, "updateFeedMetadata")) - $root.pyth_lazer_transaction.UpdateFeedMetadata.encode(message.updateFeedMetadata, writer.uint32(/* id 101, wireType 2 =*/810).fork()).ldelim(); - if (message.activateFeed != null && Object.hasOwnProperty.call(message, "activateFeed")) - $root.pyth_lazer_transaction.ActivateFeed.encode(message.activateFeed, writer.uint32(/* id 102, wireType 2 =*/818).fork()).ldelim(); - if (message.deactivateFeed != null && Object.hasOwnProperty.call(message, "deactivateFeed")) - $root.pyth_lazer_transaction.DeactivateFeed.encode(message.deactivateFeed, writer.uint32(/* id 103, wireType 2 =*/826).fork()).ldelim(); - if (message.removeFeed != null && Object.hasOwnProperty.call(message, "removeFeed")) - $root.google.protobuf.Empty.encode(message.removeFeed, writer.uint32(/* id 199, wireType 2 =*/1594).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpdateFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdateFeed.verify|verify} messages. - * @function encodeDelimited - * @memberof pyth_lazer_transaction.UpdateFeed - * @static - * @param {pyth_lazer_transaction.IUpdateFeed} message UpdateFeed message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateFeed.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateFeed message from the specified reader or buffer. - * @function decode - * @memberof pyth_lazer_transaction.UpdateFeed - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pyth_lazer_transaction.UpdateFeed} UpdateFeed - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateFeed.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.UpdateFeed(); - while (reader.pos < end) { - let tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.feedId = reader.uint32(); - break; - } - case 101: { - message.updateFeedMetadata = $root.pyth_lazer_transaction.UpdateFeedMetadata.decode(reader, reader.uint32()); - break; - } - case 102: { - message.activateFeed = $root.pyth_lazer_transaction.ActivateFeed.decode(reader, reader.uint32()); - break; - } - case 103: { - message.deactivateFeed = $root.pyth_lazer_transaction.DeactivateFeed.decode(reader, reader.uint32()); - break; - } - case 199: { - message.removeFeed = $root.google.protobuf.Empty.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateFeed message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pyth_lazer_transaction.UpdateFeed - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pyth_lazer_transaction.UpdateFeed} UpdateFeed - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateFeed.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateFeed message. - * @function verify - * @memberof pyth_lazer_transaction.UpdateFeed - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateFeed.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - let properties = {}; - if (message.feedId != null && message.hasOwnProperty("feedId")) { - properties._feedId = 1; - if (!$util.isInteger(message.feedId)) - return "feedId: integer expected"; - } - if (message.updateFeedMetadata != null && message.hasOwnProperty("updateFeedMetadata")) { - properties.action = 1; - { - let error = $root.pyth_lazer_transaction.UpdateFeedMetadata.verify(message.updateFeedMetadata); - if (error) - return "updateFeedMetadata." + error; - } - } - if (message.activateFeed != null && message.hasOwnProperty("activateFeed")) { - if (properties.action === 1) - return "action: multiple values"; - properties.action = 1; - { - let error = $root.pyth_lazer_transaction.ActivateFeed.verify(message.activateFeed); - if (error) - return "activateFeed." + error; - } - } - if (message.deactivateFeed != null && message.hasOwnProperty("deactivateFeed")) { - if (properties.action === 1) - return "action: multiple values"; - properties.action = 1; - { - let error = $root.pyth_lazer_transaction.DeactivateFeed.verify(message.deactivateFeed); - if (error) - return "deactivateFeed." + error; - } - } - if (message.removeFeed != null && message.hasOwnProperty("removeFeed")) { - if (properties.action === 1) - return "action: multiple values"; - properties.action = 1; - { - let error = $root.google.protobuf.Empty.verify(message.removeFeed); - if (error) - return "removeFeed." + error; - } - } - return null; - }; - - /** - * Creates an UpdateFeed message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pyth_lazer_transaction.UpdateFeed - * @static - * @param {Object.} object Plain object - * @returns {pyth_lazer_transaction.UpdateFeed} UpdateFeed - */ - UpdateFeed.fromObject = function fromObject(object) { - if (object instanceof $root.pyth_lazer_transaction.UpdateFeed) - return object; - let message = new $root.pyth_lazer_transaction.UpdateFeed(); - if (object.feedId != null) - message.feedId = object.feedId >>> 0; - if (object.updateFeedMetadata != null) { - if (typeof object.updateFeedMetadata !== "object") - throw TypeError(".pyth_lazer_transaction.UpdateFeed.updateFeedMetadata: object expected"); - message.updateFeedMetadata = $root.pyth_lazer_transaction.UpdateFeedMetadata.fromObject(object.updateFeedMetadata); - } - if (object.activateFeed != null) { - if (typeof object.activateFeed !== "object") - throw TypeError(".pyth_lazer_transaction.UpdateFeed.activateFeed: object expected"); - message.activateFeed = $root.pyth_lazer_transaction.ActivateFeed.fromObject(object.activateFeed); - } - if (object.deactivateFeed != null) { - if (typeof object.deactivateFeed !== "object") - throw TypeError(".pyth_lazer_transaction.UpdateFeed.deactivateFeed: object expected"); - message.deactivateFeed = $root.pyth_lazer_transaction.DeactivateFeed.fromObject(object.deactivateFeed); - } - if (object.removeFeed != null) { - if (typeof object.removeFeed !== "object") - throw TypeError(".pyth_lazer_transaction.UpdateFeed.removeFeed: object expected"); - message.removeFeed = $root.google.protobuf.Empty.fromObject(object.removeFeed); - } - return message; - }; - - /** - * Creates a plain object from an UpdateFeed message. Also converts values to other types if specified. - * @function toObject - * @memberof pyth_lazer_transaction.UpdateFeed - * @static - * @param {pyth_lazer_transaction.UpdateFeed} message UpdateFeed - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateFeed.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (message.feedId != null && message.hasOwnProperty("feedId")) { - object.feedId = message.feedId; - if (options.oneofs) - object._feedId = "feedId"; - } - if (message.updateFeedMetadata != null && message.hasOwnProperty("updateFeedMetadata")) { - object.updateFeedMetadata = $root.pyth_lazer_transaction.UpdateFeedMetadata.toObject(message.updateFeedMetadata, options); - if (options.oneofs) - object.action = "updateFeedMetadata"; - } - if (message.activateFeed != null && message.hasOwnProperty("activateFeed")) { - object.activateFeed = $root.pyth_lazer_transaction.ActivateFeed.toObject(message.activateFeed, options); - if (options.oneofs) - object.action = "activateFeed"; - } - if (message.deactivateFeed != null && message.hasOwnProperty("deactivateFeed")) { - object.deactivateFeed = $root.pyth_lazer_transaction.DeactivateFeed.toObject(message.deactivateFeed, options); - if (options.oneofs) - object.action = "deactivateFeed"; - } - if (message.removeFeed != null && message.hasOwnProperty("removeFeed")) { - object.removeFeed = $root.google.protobuf.Empty.toObject(message.removeFeed, options); - if (options.oneofs) - object.action = "removeFeed"; - } - return object; - }; - - /** - * Converts this UpdateFeed to JSON. - * @function toJSON - * @memberof pyth_lazer_transaction.UpdateFeed - * @instance - * @returns {Object.} JSON object - */ - UpdateFeed.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateFeed - * @function getTypeUrl - * @memberof pyth_lazer_transaction.UpdateFeed - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateFeed.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pyth_lazer_transaction.UpdateFeed"; - }; - - return UpdateFeed; - })(); + /** + * Decodes a DynamicValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.DynamicValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.DynamicValue} DynamicValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DynamicValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - pyth_lazer_transaction.UpdateFeedMetadata = (function() { - - /** - * Properties of an UpdateFeedMetadata. - * @memberof pyth_lazer_transaction - * @interface IUpdateFeedMetadata - * @property {string|null} [name] UpdateFeedMetadata name - * @property {pyth_lazer_transaction.IDynamicValue|null} [value] UpdateFeedMetadata value - */ - - /** - * Constructs a new UpdateFeedMetadata. - * @memberof pyth_lazer_transaction - * @classdesc Represents an UpdateFeedMetadata. - * @implements IUpdateFeedMetadata - * @constructor - * @param {pyth_lazer_transaction.IUpdateFeedMetadata=} [properties] Properties to set - */ - function UpdateFeedMetadata(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 DynamicValue message. + * @function verify + * @memberof pyth_lazer_transaction.DynamicValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DynamicValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if ( + message.stringValue != null && + message.hasOwnProperty("stringValue") + ) { + properties.value = 1; + if (!$util.isString(message.stringValue)) + return "stringValue: string expected"; + } + if ( + message.doubleValue != null && + message.hasOwnProperty("doubleValue") + ) { + if (properties.value === 1) return "value: multiple values"; + properties.value = 1; + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + } + if (message.uintValue != null && message.hasOwnProperty("uintValue")) { + if (properties.value === 1) return "value: multiple values"; + properties.value = 1; + if ( + !$util.isInteger(message.uintValue) && + !( + message.uintValue && + $util.isInteger(message.uintValue.low) && + $util.isInteger(message.uintValue.high) + ) + ) + return "uintValue: integer|Long expected"; + } + if (message.intValue != null && message.hasOwnProperty("intValue")) { + if (properties.value === 1) return "value: multiple values"; + properties.value = 1; + if ( + !$util.isInteger(message.intValue) && + !( + message.intValue && + $util.isInteger(message.intValue.low) && + $util.isInteger(message.intValue.high) + ) + ) + return "intValue: integer|Long expected"; + } + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + if (properties.value === 1) return "value: multiple values"; + properties.value = 1; + if (typeof message.boolValue !== "boolean") + return "boolValue: boolean expected"; + } + if (message.bytesValue != null && message.hasOwnProperty("bytesValue")) { + if (properties.value === 1) return "value: multiple values"; + properties.value = 1; + if ( + !( + (message.bytesValue && + typeof message.bytesValue.length === "number") || + $util.isString(message.bytesValue) + ) + ) + return "bytesValue: buffer expected"; + } + if ( + message.durationValue != null && + message.hasOwnProperty("durationValue") + ) { + if (properties.value === 1) return "value: multiple values"; + properties.value = 1; + { + let error = $root.google.protobuf.Duration.verify( + message.durationValue, + ); + if (error) return "durationValue." + error; + } + } + if ( + message.timestampValue != null && + message.hasOwnProperty("timestampValue") + ) { + if (properties.value === 1) return "value: multiple values"; + properties.value = 1; + { + let error = $root.google.protobuf.Timestamp.verify( + message.timestampValue, + ); + if (error) return "timestampValue." + error; + } + } + if (message.list != null && message.hasOwnProperty("list")) { + if (properties.value === 1) return "value: multiple values"; + properties.value = 1; + { + let error = $root.pyth_lazer_transaction.DynamicValue.List.verify( + message.list, + ); + if (error) return "list." + error; + } + } + if (message.map != null && message.hasOwnProperty("map")) { + if (properties.value === 1) return "value: multiple values"; + properties.value = 1; + { + let error = $root.pyth_lazer_transaction.DynamicValue.Map.verify( + message.map, + ); + if (error) return "map." + error; } + } + return null; + }; - /** - * UpdateFeedMetadata name. - * @member {string|null|undefined} name - * @memberof pyth_lazer_transaction.UpdateFeedMetadata - * @instance - */ - UpdateFeedMetadata.prototype.name = null; - - /** - * UpdateFeedMetadata value. - * @member {pyth_lazer_transaction.IDynamicValue|null|undefined} value - * @memberof pyth_lazer_transaction.UpdateFeedMetadata - * @instance - */ - UpdateFeedMetadata.prototype.value = null; - - // OneOf field names bound to virtual getters and setters - let $oneOfFields; - - /** - * UpdateFeedMetadata _name. - * @member {"name"|undefined} _name - * @memberof pyth_lazer_transaction.UpdateFeedMetadata - * @instance - */ - Object.defineProperty(UpdateFeedMetadata.prototype, "_name", { - get: $util.oneOfGetter($oneOfFields = ["name"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * UpdateFeedMetadata _value. - * @member {"value"|undefined} _value - * @memberof pyth_lazer_transaction.UpdateFeedMetadata - * @instance - */ - Object.defineProperty(UpdateFeedMetadata.prototype, "_value", { - get: $util.oneOfGetter($oneOfFields = ["value"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new UpdateFeedMetadata instance using the specified properties. - * @function create - * @memberof pyth_lazer_transaction.UpdateFeedMetadata - * @static - * @param {pyth_lazer_transaction.IUpdateFeedMetadata=} [properties] Properties to set - * @returns {pyth_lazer_transaction.UpdateFeedMetadata} UpdateFeedMetadata instance - */ - UpdateFeedMetadata.create = function create(properties) { - return new UpdateFeedMetadata(properties); - }; - - /** - * Encodes the specified UpdateFeedMetadata message. Does not implicitly {@link pyth_lazer_transaction.UpdateFeedMetadata.verify|verify} messages. - * @function encode - * @memberof pyth_lazer_transaction.UpdateFeedMetadata - * @static - * @param {pyth_lazer_transaction.IUpdateFeedMetadata} message UpdateFeedMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateFeedMetadata.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")) - $root.pyth_lazer_transaction.DynamicValue.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpdateFeedMetadata message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdateFeedMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof pyth_lazer_transaction.UpdateFeedMetadata - * @static - * @param {pyth_lazer_transaction.IUpdateFeedMetadata} message UpdateFeedMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateFeedMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateFeedMetadata message from the specified reader or buffer. - * @function decode - * @memberof pyth_lazer_transaction.UpdateFeedMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pyth_lazer_transaction.UpdateFeedMetadata} UpdateFeedMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateFeedMetadata.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.UpdateFeedMetadata(); - while (reader.pos < end) { - let tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.value = $root.pyth_lazer_transaction.DynamicValue.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateFeedMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pyth_lazer_transaction.UpdateFeedMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pyth_lazer_transaction.UpdateFeedMetadata} UpdateFeedMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateFeedMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateFeedMetadata message. - * @function verify - * @memberof pyth_lazer_transaction.UpdateFeedMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateFeedMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - let properties = {}; - if (message.name != null && message.hasOwnProperty("name")) { - properties._name = 1; - if (!$util.isString(message.name)) - return "name: string expected"; - } - if (message.value != null && message.hasOwnProperty("value")) { - properties._value = 1; - { - let error = $root.pyth_lazer_transaction.DynamicValue.verify(message.value); - if (error) - return "value." + error; - } - } - return null; - }; - - /** - * Creates an UpdateFeedMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pyth_lazer_transaction.UpdateFeedMetadata - * @static - * @param {Object.} object Plain object - * @returns {pyth_lazer_transaction.UpdateFeedMetadata} UpdateFeedMetadata - */ - UpdateFeedMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.pyth_lazer_transaction.UpdateFeedMetadata) - return object; - let message = new $root.pyth_lazer_transaction.UpdateFeedMetadata(); - if (object.name != null) - message.name = String(object.name); - if (object.value != null) { - if (typeof object.value !== "object") - throw TypeError(".pyth_lazer_transaction.UpdateFeedMetadata.value: object expected"); - message.value = $root.pyth_lazer_transaction.DynamicValue.fromObject(object.value); - } - return message; - }; - - /** - * Creates a plain object from an UpdateFeedMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof pyth_lazer_transaction.UpdateFeedMetadata - * @static - * @param {pyth_lazer_transaction.UpdateFeedMetadata} message UpdateFeedMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateFeedMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (message.name != null && message.hasOwnProperty("name")) { - object.name = message.name; - if (options.oneofs) - object._name = "name"; - } - if (message.value != null && message.hasOwnProperty("value")) { - object.value = $root.pyth_lazer_transaction.DynamicValue.toObject(message.value, options); - if (options.oneofs) - object._value = "value"; - } - return object; - }; - - /** - * Converts this UpdateFeedMetadata to JSON. - * @function toJSON - * @memberof pyth_lazer_transaction.UpdateFeedMetadata - * @instance - * @returns {Object.} JSON object - */ - UpdateFeedMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateFeedMetadata - * @function getTypeUrl - * @memberof pyth_lazer_transaction.UpdateFeedMetadata - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateFeedMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pyth_lazer_transaction.UpdateFeedMetadata"; - }; + /** + * Creates a DynamicValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.DynamicValue + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.DynamicValue} DynamicValue + */ + DynamicValue.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.DynamicValue) + return object; + let message = new $root.pyth_lazer_transaction.DynamicValue(); + if (object.stringValue != null) + message.stringValue = String(object.stringValue); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.uintValue != null) + if ($util.Long) + (message.uintValue = $util.Long.fromValue( + object.uintValue, + )).unsigned = true; + else if (typeof object.uintValue === "string") + message.uintValue = parseInt(object.uintValue, 10); + else if (typeof object.uintValue === "number") + message.uintValue = object.uintValue; + else if (typeof object.uintValue === "object") + message.uintValue = new $util.LongBits( + object.uintValue.low >>> 0, + object.uintValue.high >>> 0, + ).toNumber(true); + if (object.intValue != null) + if ($util.Long) + (message.intValue = $util.Long.fromValue(object.intValue)).unsigned = + false; + else if (typeof object.intValue === "string") + message.intValue = parseInt(object.intValue, 10); + else if (typeof object.intValue === "number") + message.intValue = object.intValue; + else if (typeof object.intValue === "object") + message.intValue = new $util.LongBits( + object.intValue.low >>> 0, + object.intValue.high >>> 0, + ).toNumber(); + if (object.boolValue != null) + message.boolValue = Boolean(object.boolValue); + if (object.bytesValue != null) + if (typeof object.bytesValue === "string") + $util.base64.decode( + object.bytesValue, + (message.bytesValue = $util.newBuffer( + $util.base64.length(object.bytesValue), + )), + 0, + ); + else if (object.bytesValue.length >= 0) + message.bytesValue = object.bytesValue; + if (object.durationValue != null) { + if (typeof object.durationValue !== "object") + throw TypeError( + ".pyth_lazer_transaction.DynamicValue.durationValue: object expected", + ); + message.durationValue = $root.google.protobuf.Duration.fromObject( + object.durationValue, + ); + } + if (object.timestampValue != null) { + if (typeof object.timestampValue !== "object") + throw TypeError( + ".pyth_lazer_transaction.DynamicValue.timestampValue: object expected", + ); + message.timestampValue = $root.google.protobuf.Timestamp.fromObject( + object.timestampValue, + ); + } + if (object.list != null) { + if (typeof object.list !== "object") + throw TypeError( + ".pyth_lazer_transaction.DynamicValue.list: object expected", + ); + message.list = + $root.pyth_lazer_transaction.DynamicValue.List.fromObject( + object.list, + ); + } + if (object.map != null) { + if (typeof object.map !== "object") + throw TypeError( + ".pyth_lazer_transaction.DynamicValue.map: object expected", + ); + message.map = $root.pyth_lazer_transaction.DynamicValue.Map.fromObject( + object.map, + ); + } + return message; + }; - return UpdateFeedMetadata; - })(); + /** + * Creates a plain object from a DynamicValue message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.DynamicValue + * @static + * @param {pyth_lazer_transaction.DynamicValue} message DynamicValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DynamicValue.toObject = function toObject(message, options) { + if (!options) options = {}; + let object = {}; + if ( + message.stringValue != null && + message.hasOwnProperty("stringValue") + ) { + object.stringValue = message.stringValue; + if (options.oneofs) object.value = "stringValue"; + } + if ( + message.doubleValue != null && + message.hasOwnProperty("doubleValue") + ) { + object.doubleValue = + options.json && !isFinite(message.doubleValue) + ? String(message.doubleValue) + : message.doubleValue; + if (options.oneofs) object.value = "doubleValue"; + } + if (message.uintValue != null && message.hasOwnProperty("uintValue")) { + if (typeof message.uintValue === "number") + object.uintValue = + options.longs === String + ? String(message.uintValue) + : message.uintValue; + else + object.uintValue = + options.longs === String + ? $util.Long.prototype.toString.call(message.uintValue) + : options.longs === Number + ? new $util.LongBits( + message.uintValue.low >>> 0, + message.uintValue.high >>> 0, + ).toNumber(true) + : message.uintValue; + if (options.oneofs) object.value = "uintValue"; + } + if (message.intValue != null && message.hasOwnProperty("intValue")) { + if (typeof message.intValue === "number") + object.intValue = + options.longs === String + ? String(message.intValue) + : message.intValue; + else + object.intValue = + options.longs === String + ? $util.Long.prototype.toString.call(message.intValue) + : options.longs === Number + ? new $util.LongBits( + message.intValue.low >>> 0, + message.intValue.high >>> 0, + ).toNumber() + : message.intValue; + if (options.oneofs) object.value = "intValue"; + } + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + object.boolValue = message.boolValue; + if (options.oneofs) object.value = "boolValue"; + } + if (message.bytesValue != null && message.hasOwnProperty("bytesValue")) { + object.bytesValue = + options.bytes === String + ? $util.base64.encode( + message.bytesValue, + 0, + message.bytesValue.length, + ) + : options.bytes === Array + ? Array.prototype.slice.call(message.bytesValue) + : message.bytesValue; + if (options.oneofs) object.value = "bytesValue"; + } + if ( + message.durationValue != null && + message.hasOwnProperty("durationValue") + ) { + object.durationValue = $root.google.protobuf.Duration.toObject( + message.durationValue, + options, + ); + if (options.oneofs) object.value = "durationValue"; + } + if ( + message.timestampValue != null && + message.hasOwnProperty("timestampValue") + ) { + object.timestampValue = $root.google.protobuf.Timestamp.toObject( + message.timestampValue, + options, + ); + if (options.oneofs) object.value = "timestampValue"; + } + if (message.list != null && message.hasOwnProperty("list")) { + object.list = $root.pyth_lazer_transaction.DynamicValue.List.toObject( + message.list, + options, + ); + if (options.oneofs) object.value = "list"; + } + if (message.map != null && message.hasOwnProperty("map")) { + object.map = $root.pyth_lazer_transaction.DynamicValue.Map.toObject( + message.map, + options, + ); + if (options.oneofs) object.value = "map"; + } + return object; + }; - pyth_lazer_transaction.ActivateFeed = (function() { - - /** - * Properties of an ActivateFeed. - * @memberof pyth_lazer_transaction - * @interface IActivateFeed - * @property {google.protobuf.ITimestamp|null} [activationTimestamp] ActivateFeed activationTimestamp - */ - - /** - * Constructs a new ActivateFeed. - * @memberof pyth_lazer_transaction - * @classdesc Represents an ActivateFeed. - * @implements IActivateFeed - * @constructor - * @param {pyth_lazer_transaction.IActivateFeed=} [properties] Properties to set - */ - function ActivateFeed(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 DynamicValue to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.DynamicValue + * @instance + * @returns {Object.} JSON object + */ + DynamicValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * ActivateFeed activationTimestamp. - * @member {google.protobuf.ITimestamp|null|undefined} activationTimestamp - * @memberof pyth_lazer_transaction.ActivateFeed - * @instance - */ - ActivateFeed.prototype.activationTimestamp = null; - - // OneOf field names bound to virtual getters and setters - let $oneOfFields; - - /** - * ActivateFeed _activationTimestamp. - * @member {"activationTimestamp"|undefined} _activationTimestamp - * @memberof pyth_lazer_transaction.ActivateFeed - * @instance - */ - Object.defineProperty(ActivateFeed.prototype, "_activationTimestamp", { - get: $util.oneOfGetter($oneOfFields = ["activationTimestamp"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ActivateFeed instance using the specified properties. - * @function create - * @memberof pyth_lazer_transaction.ActivateFeed - * @static - * @param {pyth_lazer_transaction.IActivateFeed=} [properties] Properties to set - * @returns {pyth_lazer_transaction.ActivateFeed} ActivateFeed instance - */ - ActivateFeed.create = function create(properties) { - return new ActivateFeed(properties); - }; - - /** - * Encodes the specified ActivateFeed message. Does not implicitly {@link pyth_lazer_transaction.ActivateFeed.verify|verify} messages. - * @function encode - * @memberof pyth_lazer_transaction.ActivateFeed - * @static - * @param {pyth_lazer_transaction.IActivateFeed} message ActivateFeed message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ActivateFeed.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.activationTimestamp != null && Object.hasOwnProperty.call(message, "activationTimestamp")) - $root.google.protobuf.Timestamp.encode(message.activationTimestamp, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ActivateFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ActivateFeed.verify|verify} messages. - * @function encodeDelimited - * @memberof pyth_lazer_transaction.ActivateFeed - * @static - * @param {pyth_lazer_transaction.IActivateFeed} message ActivateFeed message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ActivateFeed.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ActivateFeed message from the specified reader or buffer. - * @function decode - * @memberof pyth_lazer_transaction.ActivateFeed - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pyth_lazer_transaction.ActivateFeed} ActivateFeed - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ActivateFeed.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.ActivateFeed(); - while (reader.pos < end) { - let tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.activationTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ActivateFeed message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pyth_lazer_transaction.ActivateFeed - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pyth_lazer_transaction.ActivateFeed} ActivateFeed - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ActivateFeed.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ActivateFeed message. - * @function verify - * @memberof pyth_lazer_transaction.ActivateFeed - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ActivateFeed.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - let properties = {}; - if (message.activationTimestamp != null && message.hasOwnProperty("activationTimestamp")) { - properties._activationTimestamp = 1; - { - let error = $root.google.protobuf.Timestamp.verify(message.activationTimestamp); - if (error) - return "activationTimestamp." + error; - } - } - return null; - }; - - /** - * Creates an ActivateFeed message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pyth_lazer_transaction.ActivateFeed - * @static - * @param {Object.} object Plain object - * @returns {pyth_lazer_transaction.ActivateFeed} ActivateFeed - */ - ActivateFeed.fromObject = function fromObject(object) { - if (object instanceof $root.pyth_lazer_transaction.ActivateFeed) - return object; - let message = new $root.pyth_lazer_transaction.ActivateFeed(); - if (object.activationTimestamp != null) { - if (typeof object.activationTimestamp !== "object") - throw TypeError(".pyth_lazer_transaction.ActivateFeed.activationTimestamp: object expected"); - message.activationTimestamp = $root.google.protobuf.Timestamp.fromObject(object.activationTimestamp); - } - return message; - }; - - /** - * Creates a plain object from an ActivateFeed message. Also converts values to other types if specified. - * @function toObject - * @memberof pyth_lazer_transaction.ActivateFeed - * @static - * @param {pyth_lazer_transaction.ActivateFeed} message ActivateFeed - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ActivateFeed.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (message.activationTimestamp != null && message.hasOwnProperty("activationTimestamp")) { - object.activationTimestamp = $root.google.protobuf.Timestamp.toObject(message.activationTimestamp, options); - if (options.oneofs) - object._activationTimestamp = "activationTimestamp"; - } - return object; - }; - - /** - * Converts this ActivateFeed to JSON. - * @function toJSON - * @memberof pyth_lazer_transaction.ActivateFeed - * @instance - * @returns {Object.} JSON object - */ - ActivateFeed.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ActivateFeed - * @function getTypeUrl - * @memberof pyth_lazer_transaction.ActivateFeed - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ActivateFeed.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pyth_lazer_transaction.ActivateFeed"; - }; + /** + * Gets the default type url for DynamicValue + * @function getTypeUrl + * @memberof pyth_lazer_transaction.DynamicValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DynamicValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.DynamicValue"; + }; + + DynamicValue.List = (function () { + /** + * Properties of a List. + * @memberof pyth_lazer_transaction.DynamicValue + * @interface IList + * @property {Array.|null} [items] List items + */ + + /** + * Constructs a new List. + * @memberof pyth_lazer_transaction.DynamicValue + * @classdesc Represents a List. + * @implements IList + * @constructor + * @param {pyth_lazer_transaction.DynamicValue.IList=} [properties] Properties to set + */ + function List(properties) { + this.items = []; + 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]]; + } + + /** + * List items. + * @member {Array.} items + * @memberof pyth_lazer_transaction.DynamicValue.List + * @instance + */ + List.prototype.items = $util.emptyArray; + + /** + * Creates a new List instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.DynamicValue.List + * @static + * @param {pyth_lazer_transaction.DynamicValue.IList=} [properties] Properties to set + * @returns {pyth_lazer_transaction.DynamicValue.List} List instance + */ + List.create = function create(properties) { + return new List(properties); + }; + + /** + * Encodes the specified List message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.List.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.DynamicValue.List + * @static + * @param {pyth_lazer_transaction.DynamicValue.IList} message List message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + List.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if (message.items != null && message.items.length) + for (let i = 0; i < message.items.length; ++i) + $root.pyth_lazer_transaction.DynamicValue.encode( + message.items[i], + writer.uint32(/* id 1, wireType 2 =*/ 10).fork(), + ).ldelim(); + return writer; + }; + + /** + * Encodes the specified List message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.List.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.DynamicValue.List + * @static + * @param {pyth_lazer_transaction.DynamicValue.IList} message List message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + List.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a List message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.DynamicValue.List + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.DynamicValue.List} List + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + List.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pyth_lazer_transaction.DynamicValue.List(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + if (!(message.items && message.items.length)) message.items = []; + message.items.push( + $root.pyth_lazer_transaction.DynamicValue.decode( + reader, + reader.uint32(), + ), + ); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a List message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.DynamicValue.List + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.DynamicValue.List} List + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + List.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a List message. + * @function verify + * @memberof pyth_lazer_transaction.DynamicValue.List + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + List.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.items != null && message.hasOwnProperty("items")) { + if (!Array.isArray(message.items)) return "items: array expected"; + for (let i = 0; i < message.items.length; ++i) { + let error = $root.pyth_lazer_transaction.DynamicValue.verify( + message.items[i], + ); + if (error) return "items." + error; + } + } + return null; + }; + + /** + * Creates a List message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.DynamicValue.List + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.DynamicValue.List} List + */ + List.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.DynamicValue.List) + return object; + let message = new $root.pyth_lazer_transaction.DynamicValue.List(); + if (object.items) { + if (!Array.isArray(object.items)) + throw TypeError( + ".pyth_lazer_transaction.DynamicValue.List.items: array expected", + ); + message.items = []; + for (let i = 0; i < object.items.length; ++i) { + if (typeof object.items[i] !== "object") + throw TypeError( + ".pyth_lazer_transaction.DynamicValue.List.items: object expected", + ); + message.items[i] = + $root.pyth_lazer_transaction.DynamicValue.fromObject( + object.items[i], + ); + } + } + return message; + }; + + /** + * Creates a plain object from a List message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.DynamicValue.List + * @static + * @param {pyth_lazer_transaction.DynamicValue.List} message List + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + List.toObject = function toObject(message, options) { + if (!options) options = {}; + let object = {}; + if (options.arrays || options.defaults) object.items = []; + if (message.items && message.items.length) { + object.items = []; + for (let j = 0; j < message.items.length; ++j) + object.items[j] = + $root.pyth_lazer_transaction.DynamicValue.toObject( + message.items[j], + options, + ); + } + return object; + }; + + /** + * Converts this List to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.DynamicValue.List + * @instance + * @returns {Object.} JSON object + */ + List.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for List + * @function getTypeUrl + * @memberof pyth_lazer_transaction.DynamicValue.List + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + List.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.DynamicValue.List"; + }; - return ActivateFeed; + return List; })(); - pyth_lazer_transaction.DeactivateFeed = (function() { - - /** - * Properties of a DeactivateFeed. - * @memberof pyth_lazer_transaction - * @interface IDeactivateFeed - * @property {google.protobuf.ITimestamp|null} [deactivationTimestamp] DeactivateFeed deactivationTimestamp - */ - - /** - * Constructs a new DeactivateFeed. - * @memberof pyth_lazer_transaction - * @classdesc Represents a DeactivateFeed. - * @implements IDeactivateFeed - * @constructor - * @param {pyth_lazer_transaction.IDeactivateFeed=} [properties] Properties to set - */ - function DeactivateFeed(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]]; + DynamicValue.MapItem = (function () { + /** + * Properties of a MapItem. + * @memberof pyth_lazer_transaction.DynamicValue + * @interface IMapItem + * @property {string|null} [key] MapItem key + * @property {pyth_lazer_transaction.IDynamicValue|null} [value] MapItem value + */ + + /** + * Constructs a new MapItem. + * @memberof pyth_lazer_transaction.DynamicValue + * @classdesc Represents a MapItem. + * @implements IMapItem + * @constructor + * @param {pyth_lazer_transaction.DynamicValue.IMapItem=} [properties] Properties to set + */ + function MapItem(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]]; + } + + /** + * MapItem key. + * @member {string|null|undefined} key + * @memberof pyth_lazer_transaction.DynamicValue.MapItem + * @instance + */ + MapItem.prototype.key = null; + + /** + * MapItem value. + * @member {pyth_lazer_transaction.IDynamicValue|null|undefined} value + * @memberof pyth_lazer_transaction.DynamicValue.MapItem + * @instance + */ + MapItem.prototype.value = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * MapItem _key. + * @member {"key"|undefined} _key + * @memberof pyth_lazer_transaction.DynamicValue.MapItem + * @instance + */ + Object.defineProperty(MapItem.prototype, "_key", { + get: $util.oneOfGetter(($oneOfFields = ["key"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * MapItem _value. + * @member {"value"|undefined} _value + * @memberof pyth_lazer_transaction.DynamicValue.MapItem + * @instance + */ + Object.defineProperty(MapItem.prototype, "_value", { + get: $util.oneOfGetter(($oneOfFields = ["value"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Creates a new MapItem instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.DynamicValue.MapItem + * @static + * @param {pyth_lazer_transaction.DynamicValue.IMapItem=} [properties] Properties to set + * @returns {pyth_lazer_transaction.DynamicValue.MapItem} MapItem instance + */ + MapItem.create = function create(properties) { + return new MapItem(properties); + }; + + /** + * Encodes the specified MapItem message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.MapItem.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.DynamicValue.MapItem + * @static + * @param {pyth_lazer_transaction.DynamicValue.IMapItem} message MapItem message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MapItem.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/ 10).string(message.key); + if ( + message.value != null && + Object.hasOwnProperty.call(message, "value") + ) + $root.pyth_lazer_transaction.DynamicValue.encode( + message.value, + writer.uint32(/* id 2, wireType 2 =*/ 18).fork(), + ).ldelim(); + return writer; + }; + + /** + * Encodes the specified MapItem message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.MapItem.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.DynamicValue.MapItem + * @static + * @param {pyth_lazer_transaction.DynamicValue.IMapItem} message MapItem message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MapItem.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MapItem message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.DynamicValue.MapItem + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.DynamicValue.MapItem} MapItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MapItem.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pyth_lazer_transaction.DynamicValue.MapItem(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.key = reader.string(); + break; + } + case 2: { + message.value = $root.pyth_lazer_transaction.DynamicValue.decode( + reader, + reader.uint32(), + ); + break; + } + default: + reader.skipType(tag & 7); + break; + } } + return message; + }; + + /** + * Decodes a MapItem message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.DynamicValue.MapItem + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.DynamicValue.MapItem} MapItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MapItem.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MapItem message. + * @function verify + * @memberof pyth_lazer_transaction.DynamicValue.MapItem + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MapItem.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if (message.key != null && message.hasOwnProperty("key")) { + properties._key = 1; + if (!$util.isString(message.key)) return "key: string expected"; + } + if (message.value != null && message.hasOwnProperty("value")) { + properties._value = 1; + { + let error = $root.pyth_lazer_transaction.DynamicValue.verify( + message.value, + ); + if (error) return "value." + error; + } + } + return null; + }; + + /** + * Creates a MapItem message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.DynamicValue.MapItem + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.DynamicValue.MapItem} MapItem + */ + MapItem.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.DynamicValue.MapItem) + return object; + let message = new $root.pyth_lazer_transaction.DynamicValue.MapItem(); + if (object.key != null) message.key = String(object.key); + if (object.value != null) { + if (typeof object.value !== "object") + throw TypeError( + ".pyth_lazer_transaction.DynamicValue.MapItem.value: object expected", + ); + message.value = $root.pyth_lazer_transaction.DynamicValue.fromObject( + object.value, + ); + } + return message; + }; + + /** + * Creates a plain object from a MapItem message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.DynamicValue.MapItem + * @static + * @param {pyth_lazer_transaction.DynamicValue.MapItem} message MapItem + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MapItem.toObject = function toObject(message, options) { + if (!options) options = {}; + let object = {}; + if (message.key != null && message.hasOwnProperty("key")) { + object.key = message.key; + if (options.oneofs) object._key = "key"; + } + if (message.value != null && message.hasOwnProperty("value")) { + object.value = $root.pyth_lazer_transaction.DynamicValue.toObject( + message.value, + options, + ); + if (options.oneofs) object._value = "value"; + } + return object; + }; + + /** + * Converts this MapItem to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.DynamicValue.MapItem + * @instance + * @returns {Object.} JSON object + */ + MapItem.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MapItem + * @function getTypeUrl + * @memberof pyth_lazer_transaction.DynamicValue.MapItem + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MapItem.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.DynamicValue.MapItem"; + }; - /** - * DeactivateFeed deactivationTimestamp. - * @member {google.protobuf.ITimestamp|null|undefined} deactivationTimestamp - * @memberof pyth_lazer_transaction.DeactivateFeed - * @instance - */ - DeactivateFeed.prototype.deactivationTimestamp = null; - - // OneOf field names bound to virtual getters and setters - let $oneOfFields; - - /** - * DeactivateFeed _deactivationTimestamp. - * @member {"deactivationTimestamp"|undefined} _deactivationTimestamp - * @memberof pyth_lazer_transaction.DeactivateFeed - * @instance - */ - Object.defineProperty(DeactivateFeed.prototype, "_deactivationTimestamp", { - get: $util.oneOfGetter($oneOfFields = ["deactivationTimestamp"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new DeactivateFeed instance using the specified properties. - * @function create - * @memberof pyth_lazer_transaction.DeactivateFeed - * @static - * @param {pyth_lazer_transaction.IDeactivateFeed=} [properties] Properties to set - * @returns {pyth_lazer_transaction.DeactivateFeed} DeactivateFeed instance - */ - DeactivateFeed.create = function create(properties) { - return new DeactivateFeed(properties); - }; - - /** - * Encodes the specified DeactivateFeed message. Does not implicitly {@link pyth_lazer_transaction.DeactivateFeed.verify|verify} messages. - * @function encode - * @memberof pyth_lazer_transaction.DeactivateFeed - * @static - * @param {pyth_lazer_transaction.IDeactivateFeed} message DeactivateFeed message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeactivateFeed.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.deactivationTimestamp != null && Object.hasOwnProperty.call(message, "deactivationTimestamp")) - $root.google.protobuf.Timestamp.encode(message.deactivationTimestamp, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified DeactivateFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DeactivateFeed.verify|verify} messages. - * @function encodeDelimited - * @memberof pyth_lazer_transaction.DeactivateFeed - * @static - * @param {pyth_lazer_transaction.IDeactivateFeed} message DeactivateFeed message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeactivateFeed.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeactivateFeed message from the specified reader or buffer. - * @function decode - * @memberof pyth_lazer_transaction.DeactivateFeed - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pyth_lazer_transaction.DeactivateFeed} DeactivateFeed - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeactivateFeed.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.DeactivateFeed(); - while (reader.pos < end) { - let tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.deactivationTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeactivateFeed message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pyth_lazer_transaction.DeactivateFeed - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pyth_lazer_transaction.DeactivateFeed} DeactivateFeed - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeactivateFeed.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeactivateFeed message. - * @function verify - * @memberof pyth_lazer_transaction.DeactivateFeed - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeactivateFeed.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - let properties = {}; - if (message.deactivationTimestamp != null && message.hasOwnProperty("deactivationTimestamp")) { - properties._deactivationTimestamp = 1; - { - let error = $root.google.protobuf.Timestamp.verify(message.deactivationTimestamp); - if (error) - return "deactivationTimestamp." + error; - } - } - return null; - }; - - /** - * Creates a DeactivateFeed message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pyth_lazer_transaction.DeactivateFeed - * @static - * @param {Object.} object Plain object - * @returns {pyth_lazer_transaction.DeactivateFeed} DeactivateFeed - */ - DeactivateFeed.fromObject = function fromObject(object) { - if (object instanceof $root.pyth_lazer_transaction.DeactivateFeed) - return object; - let message = new $root.pyth_lazer_transaction.DeactivateFeed(); - if (object.deactivationTimestamp != null) { - if (typeof object.deactivationTimestamp !== "object") - throw TypeError(".pyth_lazer_transaction.DeactivateFeed.deactivationTimestamp: object expected"); - message.deactivationTimestamp = $root.google.protobuf.Timestamp.fromObject(object.deactivationTimestamp); - } - return message; - }; - - /** - * Creates a plain object from a DeactivateFeed message. Also converts values to other types if specified. - * @function toObject - * @memberof pyth_lazer_transaction.DeactivateFeed - * @static - * @param {pyth_lazer_transaction.DeactivateFeed} message DeactivateFeed - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeactivateFeed.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (message.deactivationTimestamp != null && message.hasOwnProperty("deactivationTimestamp")) { - object.deactivationTimestamp = $root.google.protobuf.Timestamp.toObject(message.deactivationTimestamp, options); - if (options.oneofs) - object._deactivationTimestamp = "deactivationTimestamp"; - } - return object; - }; - - /** - * Converts this DeactivateFeed to JSON. - * @function toJSON - * @memberof pyth_lazer_transaction.DeactivateFeed - * @instance - * @returns {Object.} JSON object - */ - DeactivateFeed.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeactivateFeed - * @function getTypeUrl - * @memberof pyth_lazer_transaction.DeactivateFeed - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeactivateFeed.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pyth_lazer_transaction.DeactivateFeed"; - }; - - return DeactivateFeed; + return MapItem; })(); - pyth_lazer_transaction.DynamicValue = (function() { - - /** - * Properties of a DynamicValue. - * @memberof pyth_lazer_transaction - * @interface IDynamicValue - * @property {string|null} [stringValue] DynamicValue stringValue - * @property {number|null} [doubleValue] DynamicValue doubleValue - * @property {number|Long|null} [uintValue] DynamicValue uintValue - * @property {number|Long|null} [intValue] DynamicValue intValue - * @property {boolean|null} [boolValue] DynamicValue boolValue - * @property {Uint8Array|null} [bytesValue] DynamicValue bytesValue - * @property {google.protobuf.IDuration|null} [durationValue] DynamicValue durationValue - * @property {google.protobuf.ITimestamp|null} [timestampValue] DynamicValue timestampValue - * @property {pyth_lazer_transaction.DynamicValue.IList|null} [list] DynamicValue list - * @property {pyth_lazer_transaction.DynamicValue.IMap|null} [map] DynamicValue map - */ - - /** - * Constructs a new DynamicValue. - * @memberof pyth_lazer_transaction - * @classdesc Represents a DynamicValue. - * @implements IDynamicValue - * @constructor - * @param {pyth_lazer_transaction.IDynamicValue=} [properties] Properties to set - */ - function DynamicValue(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]]; + DynamicValue.Map = (function () { + /** + * Properties of a Map. + * @memberof pyth_lazer_transaction.DynamicValue + * @interface IMap + * @property {Array.|null} [items] Map items + */ + + /** + * Constructs a new Map. + * @memberof pyth_lazer_transaction.DynamicValue + * @classdesc Represents a Map. + * @implements IMap + * @constructor + * @param {pyth_lazer_transaction.DynamicValue.IMap=} [properties] Properties to set + */ + function Map(properties) { + this.items = []; + 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]]; + } + + /** + * Map items. + * @member {Array.} items + * @memberof pyth_lazer_transaction.DynamicValue.Map + * @instance + */ + Map.prototype.items = $util.emptyArray; + + /** + * Creates a new Map instance using the specified properties. + * @function create + * @memberof pyth_lazer_transaction.DynamicValue.Map + * @static + * @param {pyth_lazer_transaction.DynamicValue.IMap=} [properties] Properties to set + * @returns {pyth_lazer_transaction.DynamicValue.Map} Map instance + */ + Map.create = function create(properties) { + return new Map(properties); + }; + + /** + * Encodes the specified Map message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.Map.verify|verify} messages. + * @function encode + * @memberof pyth_lazer_transaction.DynamicValue.Map + * @static + * @param {pyth_lazer_transaction.DynamicValue.IMap} message Map message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Map.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if (message.items != null && message.items.length) + for (let i = 0; i < message.items.length; ++i) + $root.pyth_lazer_transaction.DynamicValue.MapItem.encode( + message.items[i], + writer.uint32(/* id 1, wireType 2 =*/ 10).fork(), + ).ldelim(); + return writer; + }; + + /** + * Encodes the specified Map message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.Map.verify|verify} messages. + * @function encodeDelimited + * @memberof pyth_lazer_transaction.DynamicValue.Map + * @static + * @param {pyth_lazer_transaction.DynamicValue.IMap} message Map message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Map.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Map message from the specified reader or buffer. + * @function decode + * @memberof pyth_lazer_transaction.DynamicValue.Map + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {pyth_lazer_transaction.DynamicValue.Map} Map + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Map.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.pyth_lazer_transaction.DynamicValue.Map(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + if (!(message.items && message.items.length)) message.items = []; + message.items.push( + $root.pyth_lazer_transaction.DynamicValue.MapItem.decode( + reader, + reader.uint32(), + ), + ); + break; + } + default: + reader.skipType(tag & 7); + break; + } } + return message; + }; + + /** + * Decodes a Map message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof pyth_lazer_transaction.DynamicValue.Map + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {pyth_lazer_transaction.DynamicValue.Map} Map + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Map.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Map message. + * @function verify + * @memberof pyth_lazer_transaction.DynamicValue.Map + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Map.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.items != null && message.hasOwnProperty("items")) { + if (!Array.isArray(message.items)) return "items: array expected"; + for (let i = 0; i < message.items.length; ++i) { + let error = + $root.pyth_lazer_transaction.DynamicValue.MapItem.verify( + message.items[i], + ); + if (error) return "items." + error; + } + } + return null; + }; + + /** + * Creates a Map message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof pyth_lazer_transaction.DynamicValue.Map + * @static + * @param {Object.} object Plain object + * @returns {pyth_lazer_transaction.DynamicValue.Map} Map + */ + Map.fromObject = function fromObject(object) { + if (object instanceof $root.pyth_lazer_transaction.DynamicValue.Map) + return object; + let message = new $root.pyth_lazer_transaction.DynamicValue.Map(); + if (object.items) { + if (!Array.isArray(object.items)) + throw TypeError( + ".pyth_lazer_transaction.DynamicValue.Map.items: array expected", + ); + message.items = []; + for (let i = 0; i < object.items.length; ++i) { + if (typeof object.items[i] !== "object") + throw TypeError( + ".pyth_lazer_transaction.DynamicValue.Map.items: object expected", + ); + message.items[i] = + $root.pyth_lazer_transaction.DynamicValue.MapItem.fromObject( + object.items[i], + ); + } + } + return message; + }; + + /** + * Creates a plain object from a Map message. Also converts values to other types if specified. + * @function toObject + * @memberof pyth_lazer_transaction.DynamicValue.Map + * @static + * @param {pyth_lazer_transaction.DynamicValue.Map} message Map + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Map.toObject = function toObject(message, options) { + if (!options) options = {}; + let object = {}; + if (options.arrays || options.defaults) object.items = []; + if (message.items && message.items.length) { + object.items = []; + for (let j = 0; j < message.items.length; ++j) + object.items[j] = + $root.pyth_lazer_transaction.DynamicValue.MapItem.toObject( + message.items[j], + options, + ); + } + return object; + }; + + /** + * Converts this Map to JSON. + * @function toJSON + * @memberof pyth_lazer_transaction.DynamicValue.Map + * @instance + * @returns {Object.} JSON object + */ + Map.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Map + * @function getTypeUrl + * @memberof pyth_lazer_transaction.DynamicValue.Map + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Map.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/pyth_lazer_transaction.DynamicValue.Map"; + }; - /** - * DynamicValue stringValue. - * @member {string|null|undefined} stringValue - * @memberof pyth_lazer_transaction.DynamicValue - * @instance - */ - DynamicValue.prototype.stringValue = null; - - /** - * DynamicValue doubleValue. - * @member {number|null|undefined} doubleValue - * @memberof pyth_lazer_transaction.DynamicValue - * @instance - */ - DynamicValue.prototype.doubleValue = null; - - /** - * DynamicValue uintValue. - * @member {number|Long|null|undefined} uintValue - * @memberof pyth_lazer_transaction.DynamicValue - * @instance - */ - DynamicValue.prototype.uintValue = null; - - /** - * DynamicValue intValue. - * @member {number|Long|null|undefined} intValue - * @memberof pyth_lazer_transaction.DynamicValue - * @instance - */ - DynamicValue.prototype.intValue = null; - - /** - * DynamicValue boolValue. - * @member {boolean|null|undefined} boolValue - * @memberof pyth_lazer_transaction.DynamicValue - * @instance - */ - DynamicValue.prototype.boolValue = null; - - /** - * DynamicValue bytesValue. - * @member {Uint8Array|null|undefined} bytesValue - * @memberof pyth_lazer_transaction.DynamicValue - * @instance - */ - DynamicValue.prototype.bytesValue = null; - - /** - * DynamicValue durationValue. - * @member {google.protobuf.IDuration|null|undefined} durationValue - * @memberof pyth_lazer_transaction.DynamicValue - * @instance - */ - DynamicValue.prototype.durationValue = null; - - /** - * DynamicValue timestampValue. - * @member {google.protobuf.ITimestamp|null|undefined} timestampValue - * @memberof pyth_lazer_transaction.DynamicValue - * @instance - */ - DynamicValue.prototype.timestampValue = null; - - /** - * DynamicValue list. - * @member {pyth_lazer_transaction.DynamicValue.IList|null|undefined} list - * @memberof pyth_lazer_transaction.DynamicValue - * @instance - */ - DynamicValue.prototype.list = null; - - /** - * DynamicValue map. - * @member {pyth_lazer_transaction.DynamicValue.IMap|null|undefined} map - * @memberof pyth_lazer_transaction.DynamicValue - * @instance - */ - DynamicValue.prototype.map = null; - - // OneOf field names bound to virtual getters and setters - let $oneOfFields; - - /** - * DynamicValue value. - * @member {"stringValue"|"doubleValue"|"uintValue"|"intValue"|"boolValue"|"bytesValue"|"durationValue"|"timestampValue"|"list"|"map"|undefined} value - * @memberof pyth_lazer_transaction.DynamicValue - * @instance - */ - Object.defineProperty(DynamicValue.prototype, "value", { - get: $util.oneOfGetter($oneOfFields = ["stringValue", "doubleValue", "uintValue", "intValue", "boolValue", "bytesValue", "durationValue", "timestampValue", "list", "map"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new DynamicValue instance using the specified properties. - * @function create - * @memberof pyth_lazer_transaction.DynamicValue - * @static - * @param {pyth_lazer_transaction.IDynamicValue=} [properties] Properties to set - * @returns {pyth_lazer_transaction.DynamicValue} DynamicValue instance - */ - DynamicValue.create = function create(properties) { - return new DynamicValue(properties); - }; - - /** - * Encodes the specified DynamicValue message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.verify|verify} messages. - * @function encode - * @memberof pyth_lazer_transaction.DynamicValue - * @static - * @param {pyth_lazer_transaction.IDynamicValue} message DynamicValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DynamicValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.stringValue); - if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.doubleValue); - if (message.uintValue != null && Object.hasOwnProperty.call(message, "uintValue")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.uintValue); - if (message.intValue != null && Object.hasOwnProperty.call(message, "intValue")) - writer.uint32(/* id 4, wireType 0 =*/32).sint64(message.intValue); - if (message.boolValue != null && Object.hasOwnProperty.call(message, "boolValue")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.boolValue); - if (message.bytesValue != null && Object.hasOwnProperty.call(message, "bytesValue")) - writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.bytesValue); - if (message.durationValue != null && Object.hasOwnProperty.call(message, "durationValue")) - $root.google.protobuf.Duration.encode(message.durationValue, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.timestampValue != null && Object.hasOwnProperty.call(message, "timestampValue")) - $root.google.protobuf.Timestamp.encode(message.timestampValue, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.list != null && Object.hasOwnProperty.call(message, "list")) - $root.pyth_lazer_transaction.DynamicValue.List.encode(message.list, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.map != null && Object.hasOwnProperty.call(message, "map")) - $root.pyth_lazer_transaction.DynamicValue.Map.encode(message.map, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified DynamicValue message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.verify|verify} messages. - * @function encodeDelimited - * @memberof pyth_lazer_transaction.DynamicValue - * @static - * @param {pyth_lazer_transaction.IDynamicValue} message DynamicValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DynamicValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DynamicValue message from the specified reader or buffer. - * @function decode - * @memberof pyth_lazer_transaction.DynamicValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pyth_lazer_transaction.DynamicValue} DynamicValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DynamicValue.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.DynamicValue(); - while (reader.pos < end) { - let tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.stringValue = reader.string(); - break; - } - case 2: { - message.doubleValue = reader.double(); - break; - } - case 3: { - message.uintValue = reader.uint64(); - break; - } - case 4: { - message.intValue = reader.sint64(); - break; - } - case 5: { - message.boolValue = reader.bool(); - break; - } - case 6: { - message.bytesValue = reader.bytes(); - break; - } - case 7: { - message.durationValue = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 8: { - message.timestampValue = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 9: { - message.list = $root.pyth_lazer_transaction.DynamicValue.List.decode(reader, reader.uint32()); - break; - } - case 10: { - message.map = $root.pyth_lazer_transaction.DynamicValue.Map.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DynamicValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pyth_lazer_transaction.DynamicValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pyth_lazer_transaction.DynamicValue} DynamicValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DynamicValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DynamicValue message. - * @function verify - * @memberof pyth_lazer_transaction.DynamicValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DynamicValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - let properties = {}; - if (message.stringValue != null && message.hasOwnProperty("stringValue")) { - properties.value = 1; - if (!$util.isString(message.stringValue)) - return "stringValue: string expected"; - } - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - if (typeof message.doubleValue !== "number") - return "doubleValue: number expected"; - } - if (message.uintValue != null && message.hasOwnProperty("uintValue")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - if (!$util.isInteger(message.uintValue) && !(message.uintValue && $util.isInteger(message.uintValue.low) && $util.isInteger(message.uintValue.high))) - return "uintValue: integer|Long expected"; - } - if (message.intValue != null && message.hasOwnProperty("intValue")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - if (!$util.isInteger(message.intValue) && !(message.intValue && $util.isInteger(message.intValue.low) && $util.isInteger(message.intValue.high))) - return "intValue: integer|Long expected"; - } - if (message.boolValue != null && message.hasOwnProperty("boolValue")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - if (typeof message.boolValue !== "boolean") - return "boolValue: boolean expected"; - } - if (message.bytesValue != null && message.hasOwnProperty("bytesValue")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - if (!(message.bytesValue && typeof message.bytesValue.length === "number" || $util.isString(message.bytesValue))) - return "bytesValue: buffer expected"; - } - if (message.durationValue != null && message.hasOwnProperty("durationValue")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - { - let error = $root.google.protobuf.Duration.verify(message.durationValue); - if (error) - return "durationValue." + error; - } - } - if (message.timestampValue != null && message.hasOwnProperty("timestampValue")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - { - let error = $root.google.protobuf.Timestamp.verify(message.timestampValue); - if (error) - return "timestampValue." + error; - } - } - if (message.list != null && message.hasOwnProperty("list")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - { - let error = $root.pyth_lazer_transaction.DynamicValue.List.verify(message.list); - if (error) - return "list." + error; - } - } - if (message.map != null && message.hasOwnProperty("map")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - { - let error = $root.pyth_lazer_transaction.DynamicValue.Map.verify(message.map); - if (error) - return "map." + error; - } - } - return null; - }; - - /** - * Creates a DynamicValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pyth_lazer_transaction.DynamicValue - * @static - * @param {Object.} object Plain object - * @returns {pyth_lazer_transaction.DynamicValue} DynamicValue - */ - DynamicValue.fromObject = function fromObject(object) { - if (object instanceof $root.pyth_lazer_transaction.DynamicValue) - return object; - let message = new $root.pyth_lazer_transaction.DynamicValue(); - if (object.stringValue != null) - message.stringValue = String(object.stringValue); - if (object.doubleValue != null) - message.doubleValue = Number(object.doubleValue); - if (object.uintValue != null) - if ($util.Long) - (message.uintValue = $util.Long.fromValue(object.uintValue)).unsigned = true; - else if (typeof object.uintValue === "string") - message.uintValue = parseInt(object.uintValue, 10); - else if (typeof object.uintValue === "number") - message.uintValue = object.uintValue; - else if (typeof object.uintValue === "object") - message.uintValue = new $util.LongBits(object.uintValue.low >>> 0, object.uintValue.high >>> 0).toNumber(true); - if (object.intValue != null) - if ($util.Long) - (message.intValue = $util.Long.fromValue(object.intValue)).unsigned = false; - else if (typeof object.intValue === "string") - message.intValue = parseInt(object.intValue, 10); - else if (typeof object.intValue === "number") - message.intValue = object.intValue; - else if (typeof object.intValue === "object") - message.intValue = new $util.LongBits(object.intValue.low >>> 0, object.intValue.high >>> 0).toNumber(); - if (object.boolValue != null) - message.boolValue = Boolean(object.boolValue); - if (object.bytesValue != null) - if (typeof object.bytesValue === "string") - $util.base64.decode(object.bytesValue, message.bytesValue = $util.newBuffer($util.base64.length(object.bytesValue)), 0); - else if (object.bytesValue.length >= 0) - message.bytesValue = object.bytesValue; - if (object.durationValue != null) { - if (typeof object.durationValue !== "object") - throw TypeError(".pyth_lazer_transaction.DynamicValue.durationValue: object expected"); - message.durationValue = $root.google.protobuf.Duration.fromObject(object.durationValue); - } - if (object.timestampValue != null) { - if (typeof object.timestampValue !== "object") - throw TypeError(".pyth_lazer_transaction.DynamicValue.timestampValue: object expected"); - message.timestampValue = $root.google.protobuf.Timestamp.fromObject(object.timestampValue); - } - if (object.list != null) { - if (typeof object.list !== "object") - throw TypeError(".pyth_lazer_transaction.DynamicValue.list: object expected"); - message.list = $root.pyth_lazer_transaction.DynamicValue.List.fromObject(object.list); - } - if (object.map != null) { - if (typeof object.map !== "object") - throw TypeError(".pyth_lazer_transaction.DynamicValue.map: object expected"); - message.map = $root.pyth_lazer_transaction.DynamicValue.Map.fromObject(object.map); - } - return message; - }; - - /** - * Creates a plain object from a DynamicValue message. Also converts values to other types if specified. - * @function toObject - * @memberof pyth_lazer_transaction.DynamicValue - * @static - * @param {pyth_lazer_transaction.DynamicValue} message DynamicValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DynamicValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (message.stringValue != null && message.hasOwnProperty("stringValue")) { - object.stringValue = message.stringValue; - if (options.oneofs) - object.value = "stringValue"; - } - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { - object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; - if (options.oneofs) - object.value = "doubleValue"; - } - if (message.uintValue != null && message.hasOwnProperty("uintValue")) { - if (typeof message.uintValue === "number") - object.uintValue = options.longs === String ? String(message.uintValue) : message.uintValue; - else - object.uintValue = options.longs === String ? $util.Long.prototype.toString.call(message.uintValue) : options.longs === Number ? new $util.LongBits(message.uintValue.low >>> 0, message.uintValue.high >>> 0).toNumber(true) : message.uintValue; - if (options.oneofs) - object.value = "uintValue"; - } - if (message.intValue != null && message.hasOwnProperty("intValue")) { - if (typeof message.intValue === "number") - object.intValue = options.longs === String ? String(message.intValue) : message.intValue; - else - object.intValue = options.longs === String ? $util.Long.prototype.toString.call(message.intValue) : options.longs === Number ? new $util.LongBits(message.intValue.low >>> 0, message.intValue.high >>> 0).toNumber() : message.intValue; - if (options.oneofs) - object.value = "intValue"; - } - if (message.boolValue != null && message.hasOwnProperty("boolValue")) { - object.boolValue = message.boolValue; - if (options.oneofs) - object.value = "boolValue"; - } - if (message.bytesValue != null && message.hasOwnProperty("bytesValue")) { - object.bytesValue = options.bytes === String ? $util.base64.encode(message.bytesValue, 0, message.bytesValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.bytesValue) : message.bytesValue; - if (options.oneofs) - object.value = "bytesValue"; - } - if (message.durationValue != null && message.hasOwnProperty("durationValue")) { - object.durationValue = $root.google.protobuf.Duration.toObject(message.durationValue, options); - if (options.oneofs) - object.value = "durationValue"; - } - if (message.timestampValue != null && message.hasOwnProperty("timestampValue")) { - object.timestampValue = $root.google.protobuf.Timestamp.toObject(message.timestampValue, options); - if (options.oneofs) - object.value = "timestampValue"; - } - if (message.list != null && message.hasOwnProperty("list")) { - object.list = $root.pyth_lazer_transaction.DynamicValue.List.toObject(message.list, options); - if (options.oneofs) - object.value = "list"; - } - if (message.map != null && message.hasOwnProperty("map")) { - object.map = $root.pyth_lazer_transaction.DynamicValue.Map.toObject(message.map, options); - if (options.oneofs) - object.value = "map"; - } - return object; - }; - - /** - * Converts this DynamicValue to JSON. - * @function toJSON - * @memberof pyth_lazer_transaction.DynamicValue - * @instance - * @returns {Object.} JSON object - */ - DynamicValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DynamicValue - * @function getTypeUrl - * @memberof pyth_lazer_transaction.DynamicValue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DynamicValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pyth_lazer_transaction.DynamicValue"; - }; - - DynamicValue.List = (function() { - - /** - * Properties of a List. - * @memberof pyth_lazer_transaction.DynamicValue - * @interface IList - * @property {Array.|null} [items] List items - */ - - /** - * Constructs a new List. - * @memberof pyth_lazer_transaction.DynamicValue - * @classdesc Represents a List. - * @implements IList - * @constructor - * @param {pyth_lazer_transaction.DynamicValue.IList=} [properties] Properties to set - */ - function List(properties) { - this.items = []; - 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]]; - } - - /** - * List items. - * @member {Array.} items - * @memberof pyth_lazer_transaction.DynamicValue.List - * @instance - */ - List.prototype.items = $util.emptyArray; - - /** - * Creates a new List instance using the specified properties. - * @function create - * @memberof pyth_lazer_transaction.DynamicValue.List - * @static - * @param {pyth_lazer_transaction.DynamicValue.IList=} [properties] Properties to set - * @returns {pyth_lazer_transaction.DynamicValue.List} List instance - */ - List.create = function create(properties) { - return new List(properties); - }; - - /** - * Encodes the specified List message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.List.verify|verify} messages. - * @function encode - * @memberof pyth_lazer_transaction.DynamicValue.List - * @static - * @param {pyth_lazer_transaction.DynamicValue.IList} message List message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - List.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.items != null && message.items.length) - for (let i = 0; i < message.items.length; ++i) - $root.pyth_lazer_transaction.DynamicValue.encode(message.items[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified List message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.List.verify|verify} messages. - * @function encodeDelimited - * @memberof pyth_lazer_transaction.DynamicValue.List - * @static - * @param {pyth_lazer_transaction.DynamicValue.IList} message List message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - List.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a List message from the specified reader or buffer. - * @function decode - * @memberof pyth_lazer_transaction.DynamicValue.List - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pyth_lazer_transaction.DynamicValue.List} List - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - List.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.DynamicValue.List(); - while (reader.pos < end) { - let tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.items && message.items.length)) - message.items = []; - message.items.push($root.pyth_lazer_transaction.DynamicValue.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a List message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pyth_lazer_transaction.DynamicValue.List - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pyth_lazer_transaction.DynamicValue.List} List - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - List.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a List message. - * @function verify - * @memberof pyth_lazer_transaction.DynamicValue.List - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - List.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.items != null && message.hasOwnProperty("items")) { - if (!Array.isArray(message.items)) - return "items: array expected"; - for (let i = 0; i < message.items.length; ++i) { - let error = $root.pyth_lazer_transaction.DynamicValue.verify(message.items[i]); - if (error) - return "items." + error; - } - } - return null; - }; - - /** - * Creates a List message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pyth_lazer_transaction.DynamicValue.List - * @static - * @param {Object.} object Plain object - * @returns {pyth_lazer_transaction.DynamicValue.List} List - */ - List.fromObject = function fromObject(object) { - if (object instanceof $root.pyth_lazer_transaction.DynamicValue.List) - return object; - let message = new $root.pyth_lazer_transaction.DynamicValue.List(); - if (object.items) { - if (!Array.isArray(object.items)) - throw TypeError(".pyth_lazer_transaction.DynamicValue.List.items: array expected"); - message.items = []; - for (let i = 0; i < object.items.length; ++i) { - if (typeof object.items[i] !== "object") - throw TypeError(".pyth_lazer_transaction.DynamicValue.List.items: object expected"); - message.items[i] = $root.pyth_lazer_transaction.DynamicValue.fromObject(object.items[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a List message. Also converts values to other types if specified. - * @function toObject - * @memberof pyth_lazer_transaction.DynamicValue.List - * @static - * @param {pyth_lazer_transaction.DynamicValue.List} message List - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - List.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.items = []; - if (message.items && message.items.length) { - object.items = []; - for (let j = 0; j < message.items.length; ++j) - object.items[j] = $root.pyth_lazer_transaction.DynamicValue.toObject(message.items[j], options); - } - return object; - }; - - /** - * Converts this List to JSON. - * @function toJSON - * @memberof pyth_lazer_transaction.DynamicValue.List - * @instance - * @returns {Object.} JSON object - */ - List.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for List - * @function getTypeUrl - * @memberof pyth_lazer_transaction.DynamicValue.List - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - List.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pyth_lazer_transaction.DynamicValue.List"; - }; - - return List; - })(); - - DynamicValue.MapItem = (function() { - - /** - * Properties of a MapItem. - * @memberof pyth_lazer_transaction.DynamicValue - * @interface IMapItem - * @property {string|null} [key] MapItem key - * @property {pyth_lazer_transaction.IDynamicValue|null} [value] MapItem value - */ - - /** - * Constructs a new MapItem. - * @memberof pyth_lazer_transaction.DynamicValue - * @classdesc Represents a MapItem. - * @implements IMapItem - * @constructor - * @param {pyth_lazer_transaction.DynamicValue.IMapItem=} [properties] Properties to set - */ - function MapItem(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]]; - } - - /** - * MapItem key. - * @member {string|null|undefined} key - * @memberof pyth_lazer_transaction.DynamicValue.MapItem - * @instance - */ - MapItem.prototype.key = null; - - /** - * MapItem value. - * @member {pyth_lazer_transaction.IDynamicValue|null|undefined} value - * @memberof pyth_lazer_transaction.DynamicValue.MapItem - * @instance - */ - MapItem.prototype.value = null; - - // OneOf field names bound to virtual getters and setters - let $oneOfFields; - - /** - * MapItem _key. - * @member {"key"|undefined} _key - * @memberof pyth_lazer_transaction.DynamicValue.MapItem - * @instance - */ - Object.defineProperty(MapItem.prototype, "_key", { - get: $util.oneOfGetter($oneOfFields = ["key"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * MapItem _value. - * @member {"value"|undefined} _value - * @memberof pyth_lazer_transaction.DynamicValue.MapItem - * @instance - */ - Object.defineProperty(MapItem.prototype, "_value", { - get: $util.oneOfGetter($oneOfFields = ["value"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new MapItem instance using the specified properties. - * @function create - * @memberof pyth_lazer_transaction.DynamicValue.MapItem - * @static - * @param {pyth_lazer_transaction.DynamicValue.IMapItem=} [properties] Properties to set - * @returns {pyth_lazer_transaction.DynamicValue.MapItem} MapItem instance - */ - MapItem.create = function create(properties) { - return new MapItem(properties); - }; - - /** - * Encodes the specified MapItem message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.MapItem.verify|verify} messages. - * @function encode - * @memberof pyth_lazer_transaction.DynamicValue.MapItem - * @static - * @param {pyth_lazer_transaction.DynamicValue.IMapItem} message MapItem message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MapItem.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - $root.pyth_lazer_transaction.DynamicValue.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MapItem message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.MapItem.verify|verify} messages. - * @function encodeDelimited - * @memberof pyth_lazer_transaction.DynamicValue.MapItem - * @static - * @param {pyth_lazer_transaction.DynamicValue.IMapItem} message MapItem message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MapItem.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MapItem message from the specified reader or buffer. - * @function decode - * @memberof pyth_lazer_transaction.DynamicValue.MapItem - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pyth_lazer_transaction.DynamicValue.MapItem} MapItem - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MapItem.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.DynamicValue.MapItem(); - while (reader.pos < end) { - let tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.key = reader.string(); - break; - } - case 2: { - message.value = $root.pyth_lazer_transaction.DynamicValue.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MapItem message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pyth_lazer_transaction.DynamicValue.MapItem - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pyth_lazer_transaction.DynamicValue.MapItem} MapItem - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MapItem.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MapItem message. - * @function verify - * @memberof pyth_lazer_transaction.DynamicValue.MapItem - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MapItem.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - let properties = {}; - if (message.key != null && message.hasOwnProperty("key")) { - properties._key = 1; - if (!$util.isString(message.key)) - return "key: string expected"; - } - if (message.value != null && message.hasOwnProperty("value")) { - properties._value = 1; - { - let error = $root.pyth_lazer_transaction.DynamicValue.verify(message.value); - if (error) - return "value." + error; - } - } - return null; - }; - - /** - * Creates a MapItem message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pyth_lazer_transaction.DynamicValue.MapItem - * @static - * @param {Object.} object Plain object - * @returns {pyth_lazer_transaction.DynamicValue.MapItem} MapItem - */ - MapItem.fromObject = function fromObject(object) { - if (object instanceof $root.pyth_lazer_transaction.DynamicValue.MapItem) - return object; - let message = new $root.pyth_lazer_transaction.DynamicValue.MapItem(); - if (object.key != null) - message.key = String(object.key); - if (object.value != null) { - if (typeof object.value !== "object") - throw TypeError(".pyth_lazer_transaction.DynamicValue.MapItem.value: object expected"); - message.value = $root.pyth_lazer_transaction.DynamicValue.fromObject(object.value); - } - return message; - }; - - /** - * Creates a plain object from a MapItem message. Also converts values to other types if specified. - * @function toObject - * @memberof pyth_lazer_transaction.DynamicValue.MapItem - * @static - * @param {pyth_lazer_transaction.DynamicValue.MapItem} message MapItem - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MapItem.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (message.key != null && message.hasOwnProperty("key")) { - object.key = message.key; - if (options.oneofs) - object._key = "key"; - } - if (message.value != null && message.hasOwnProperty("value")) { - object.value = $root.pyth_lazer_transaction.DynamicValue.toObject(message.value, options); - if (options.oneofs) - object._value = "value"; - } - return object; - }; - - /** - * Converts this MapItem to JSON. - * @function toJSON - * @memberof pyth_lazer_transaction.DynamicValue.MapItem - * @instance - * @returns {Object.} JSON object - */ - MapItem.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MapItem - * @function getTypeUrl - * @memberof pyth_lazer_transaction.DynamicValue.MapItem - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MapItem.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pyth_lazer_transaction.DynamicValue.MapItem"; - }; - - return MapItem; - })(); - - DynamicValue.Map = (function() { - - /** - * Properties of a Map. - * @memberof pyth_lazer_transaction.DynamicValue - * @interface IMap - * @property {Array.|null} [items] Map items - */ - - /** - * Constructs a new Map. - * @memberof pyth_lazer_transaction.DynamicValue - * @classdesc Represents a Map. - * @implements IMap - * @constructor - * @param {pyth_lazer_transaction.DynamicValue.IMap=} [properties] Properties to set - */ - function Map(properties) { - this.items = []; - 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]]; - } - - /** - * Map items. - * @member {Array.} items - * @memberof pyth_lazer_transaction.DynamicValue.Map - * @instance - */ - Map.prototype.items = $util.emptyArray; - - /** - * Creates a new Map instance using the specified properties. - * @function create - * @memberof pyth_lazer_transaction.DynamicValue.Map - * @static - * @param {pyth_lazer_transaction.DynamicValue.IMap=} [properties] Properties to set - * @returns {pyth_lazer_transaction.DynamicValue.Map} Map instance - */ - Map.create = function create(properties) { - return new Map(properties); - }; - - /** - * Encodes the specified Map message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.Map.verify|verify} messages. - * @function encode - * @memberof pyth_lazer_transaction.DynamicValue.Map - * @static - * @param {pyth_lazer_transaction.DynamicValue.IMap} message Map message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Map.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.items != null && message.items.length) - for (let i = 0; i < message.items.length; ++i) - $root.pyth_lazer_transaction.DynamicValue.MapItem.encode(message.items[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Map message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.Map.verify|verify} messages. - * @function encodeDelimited - * @memberof pyth_lazer_transaction.DynamicValue.Map - * @static - * @param {pyth_lazer_transaction.DynamicValue.IMap} message Map message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Map.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Map message from the specified reader or buffer. - * @function decode - * @memberof pyth_lazer_transaction.DynamicValue.Map - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {pyth_lazer_transaction.DynamicValue.Map} Map - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Map.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.pyth_lazer_transaction.DynamicValue.Map(); - while (reader.pos < end) { - let tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.items && message.items.length)) - message.items = []; - message.items.push($root.pyth_lazer_transaction.DynamicValue.MapItem.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Map message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof pyth_lazer_transaction.DynamicValue.Map - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {pyth_lazer_transaction.DynamicValue.Map} Map - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Map.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Map message. - * @function verify - * @memberof pyth_lazer_transaction.DynamicValue.Map - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Map.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.items != null && message.hasOwnProperty("items")) { - if (!Array.isArray(message.items)) - return "items: array expected"; - for (let i = 0; i < message.items.length; ++i) { - let error = $root.pyth_lazer_transaction.DynamicValue.MapItem.verify(message.items[i]); - if (error) - return "items." + error; - } - } - return null; - }; - - /** - * Creates a Map message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof pyth_lazer_transaction.DynamicValue.Map - * @static - * @param {Object.} object Plain object - * @returns {pyth_lazer_transaction.DynamicValue.Map} Map - */ - Map.fromObject = function fromObject(object) { - if (object instanceof $root.pyth_lazer_transaction.DynamicValue.Map) - return object; - let message = new $root.pyth_lazer_transaction.DynamicValue.Map(); - if (object.items) { - if (!Array.isArray(object.items)) - throw TypeError(".pyth_lazer_transaction.DynamicValue.Map.items: array expected"); - message.items = []; - for (let i = 0; i < object.items.length; ++i) { - if (typeof object.items[i] !== "object") - throw TypeError(".pyth_lazer_transaction.DynamicValue.Map.items: object expected"); - message.items[i] = $root.pyth_lazer_transaction.DynamicValue.MapItem.fromObject(object.items[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Map message. Also converts values to other types if specified. - * @function toObject - * @memberof pyth_lazer_transaction.DynamicValue.Map - * @static - * @param {pyth_lazer_transaction.DynamicValue.Map} message Map - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Map.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.items = []; - if (message.items && message.items.length) { - object.items = []; - for (let j = 0; j < message.items.length; ++j) - object.items[j] = $root.pyth_lazer_transaction.DynamicValue.MapItem.toObject(message.items[j], options); - } - return object; - }; - - /** - * Converts this Map to JSON. - * @function toJSON - * @memberof pyth_lazer_transaction.DynamicValue.Map - * @instance - * @returns {Object.} JSON object - */ - Map.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Map - * @function getTypeUrl - * @memberof pyth_lazer_transaction.DynamicValue.Map - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Map.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/pyth_lazer_transaction.DynamicValue.Map"; - }; - - return Map; - })(); - - return DynamicValue; + return Map; })(); - return pyth_lazer_transaction; -})(); + return DynamicValue; + })(); + + return pyth_lazer_transaction; +})()); -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.Timestamp = (function() { - - /** - * Properties of a Timestamp. - * @memberof google.protobuf - * @interface ITimestamp - * @property {number|Long|null} [seconds] Timestamp seconds - * @property {number|null} [nanos] Timestamp nanos - */ - - /** - * Constructs a new Timestamp. - * @memberof google.protobuf - * @classdesc Represents a Timestamp. - * @implements ITimestamp - * @constructor - * @param {google.protobuf.ITimestamp=} [properties] Properties to set - */ - function Timestamp(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]]; - } + const protobuf = {}; + + protobuf.Timestamp = (function () { + /** + * Properties of a Timestamp. + * @memberof google.protobuf + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos + */ + + /** + * Constructs a new Timestamp. + * @memberof google.protobuf + * @classdesc Represents a Timestamp. + * @implements ITimestamp + * @constructor + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + */ + function Timestamp(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]]; + } + + /** + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.seconds = $util.Long + ? $util.Long.fromBits(0, 0, false) + : 0; + + /** + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.nanos = 0; + + /** + * Creates a new Timestamp instance using the specified properties. + * @function create + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance + */ + Timestamp.create = function create(properties) { + return new Timestamp(properties); + }; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if ( + message.seconds != null && + Object.hasOwnProperty.call(message, "seconds") + ) + writer.uint32(/* id 1, wireType 0 =*/ 8).int64(message.seconds); + if ( + message.nanos != null && + Object.hasOwnProperty.call(message, "nanos") + ) + writer.uint32(/* id 2, wireType 0 =*/ 16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.google.protobuf.Timestamp(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Timestamp message. + * @function verify + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Timestamp.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if ( + !$util.isInteger(message.seconds) && + !( + message.seconds && + $util.isInteger(message.seconds.low) && + $util.isInteger(message.seconds.high) + ) + ) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Timestamp} Timestamp + */ + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) return object; + let message = new $root.google.protobuf.Timestamp(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = + false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits( + object.seconds.low >>> 0, + object.seconds.high >>> 0, + ).toNumber(); + if (object.nanos != null) message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.Timestamp} message Timestamp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Timestamp.toObject = function toObject(message, options) { + if (!options) options = {}; + let object = {}; + if (options.defaults) { + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.seconds = + options.longs === String + ? long.toString() + : options.longs === Number + ? long.toNumber() + : long; + } else object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = + options.longs === String + ? String(message.seconds) + : message.seconds; + else + object.seconds = + options.longs === String + ? $util.Long.prototype.toString.call(message.seconds) + : options.longs === Number + ? new $util.LongBits( + message.seconds.low >>> 0, + message.seconds.high >>> 0, + ).toNumber() + : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Timestamp to JSON. + * @function toJSON + * @memberof google.protobuf.Timestamp + * @instance + * @returns {Object.} JSON object + */ + Timestamp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Timestamp + * @function getTypeUrl + * @memberof google.protobuf.Timestamp + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Timestamp"; + }; - /** - * Timestamp seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Timestamp - * @instance - */ - Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Timestamp nanos. - * @member {number} nanos - * @memberof google.protobuf.Timestamp - * @instance - */ - Timestamp.prototype.nanos = 0; - - /** - * Creates a new Timestamp instance using the specified properties. - * @function create - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp=} [properties] Properties to set - * @returns {google.protobuf.Timestamp} Timestamp instance - */ - Timestamp.create = function create(properties) { - return new Timestamp(properties); - }; - - /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Timestamp.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); - return writer; - }; - - /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Timestamp.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Timestamp message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Timestamp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Timestamp} Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Timestamp.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); - while (reader.pos < end) { - let tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.seconds = reader.int64(); - break; - } - case 2: { - message.nanos = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Timestamp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Timestamp} Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Timestamp.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Timestamp message. - * @function verify - * @memberof google.protobuf.Timestamp - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Timestamp.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; - return null; - }; - - /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Timestamp - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Timestamp} Timestamp - */ - Timestamp.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Timestamp) - return object; - let message = new $root.google.protobuf.Timestamp(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; - return message; - }; - - /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.Timestamp} message Timestamp - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Timestamp.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - if ($util.Long) { - let long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; - } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; - return object; - }; - - /** - * Converts this Timestamp to JSON. - * @function toJSON - * @memberof google.protobuf.Timestamp - * @instance - * @returns {Object.} JSON object - */ - Timestamp.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Timestamp - * @function getTypeUrl - * @memberof google.protobuf.Timestamp - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Timestamp"; - }; - - return Timestamp; - })(); - - protobuf.Duration = (function() { - - /** - * Properties of a Duration. - * @memberof google.protobuf - * @interface IDuration - * @property {number|Long|null} [seconds] Duration seconds - * @property {number|null} [nanos] Duration nanos - */ - - /** - * Constructs a new Duration. - * @memberof google.protobuf - * @classdesc Represents a Duration. - * @implements IDuration - * @constructor - * @param {google.protobuf.IDuration=} [properties] Properties to set - */ - function Duration(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 Timestamp; + })(); - /** - * Duration seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Duration nanos. - * @member {number} nanos - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.nanos = 0; - - /** - * Creates a new Duration instance using the specified properties. - * @function create - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration=} [properties] Properties to set - * @returns {google.protobuf.Duration} Duration instance - */ - Duration.create = function create(properties) { - return new Duration(properties); - }; - - /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Duration.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); - return writer; - }; - - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Duration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Duration message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Duration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Duration} Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Duration.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); - while (reader.pos < end) { - let tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.seconds = reader.int64(); - break; - } - case 2: { - message.nanos = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Duration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Duration} Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Duration.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Duration message. - * @function verify - * @memberof google.protobuf.Duration - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Duration.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; - return null; - }; - - /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Duration - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Duration} Duration - */ - Duration.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Duration) - return object; - let message = new $root.google.protobuf.Duration(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; - return message; - }; - - /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.Duration} message Duration - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Duration.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - if ($util.Long) { - let long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; - } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; - return object; - }; - - /** - * Converts this Duration to JSON. - * @function toJSON - * @memberof google.protobuf.Duration - * @instance - * @returns {Object.} JSON object - */ - Duration.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Duration - * @function getTypeUrl - * @memberof google.protobuf.Duration - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Duration"; - }; - - return Duration; - })(); - - 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]]; - } + protobuf.Duration = (function () { + /** + * Properties of a Duration. + * @memberof google.protobuf + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos + */ + + /** + * Constructs a new Duration. + * @memberof google.protobuf + * @classdesc Represents a Duration. + * @implements IDuration + * @constructor + * @param {google.protobuf.IDuration=} [properties] Properties to set + */ + function Duration(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]]; + } + + /** + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.seconds = $util.Long + ? $util.Long.fromBits(0, 0, false) + : 0; + + /** + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; + + /** + * Creates a new Duration instance using the specified properties. + * @function create + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance + */ + Duration.create = function create(properties) { + return new Duration(properties); + }; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if ( + message.seconds != null && + Object.hasOwnProperty.call(message, "seconds") + ) + writer.uint32(/* id 1, wireType 0 =*/ 8).int64(message.seconds); + if ( + message.nanos != null && + Object.hasOwnProperty.call(message, "nanos") + ) + writer.uint32(/* id 2, wireType 0 =*/ 16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.google.protobuf.Duration(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Duration message. + * @function verify + * @memberof google.protobuf.Duration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Duration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if ( + !$util.isInteger(message.seconds) && + !( + message.seconds && + $util.isInteger(message.seconds.low) && + $util.isInteger(message.seconds.high) + ) + ) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Duration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Duration} Duration + */ + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) return object; + let message = new $root.google.protobuf.Duration(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = + false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits( + object.seconds.low >>> 0, + object.seconds.high >>> 0, + ).toNumber(); + if (object.nanos != null) message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.Duration} message Duration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Duration.toObject = function toObject(message, options) { + if (!options) options = {}; + let object = {}; + if (options.defaults) { + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.seconds = + options.longs === String + ? long.toString() + : options.longs === Number + ? long.toNumber() + : long; + } else object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = + options.longs === String + ? String(message.seconds) + : message.seconds; + else + object.seconds = + options.longs === String + ? $util.Long.prototype.toString.call(message.seconds) + : options.longs === Number + ? new $util.LongBits( + message.seconds.low >>> 0, + message.seconds.high >>> 0, + ).toNumber() + : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Duration to JSON. + * @function toJSON + * @memberof google.protobuf.Duration + * @instance + * @returns {Object.} JSON object + */ + Duration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Duration + * @function getTypeUrl + * @memberof google.protobuf.Duration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Duration"; + }; + + return Duration; + })(); - /** - * 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, error) { - 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(); - if (tag === error) - break; - 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.} 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.} 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.} Plain object - */ - Empty.toObject = function toObject() { - return {}; - }; - - /** - * Converts this Empty to JSON. - * @function toJSON - * @memberof google.protobuf.Empty - * @instance - * @returns {Object.} JSON object - */ - Empty.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Empty - * @function getTypeUrl - * @memberof google.protobuf.Empty - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Empty"; - }; - - return Empty; - })(); - - return 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, error) { + 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(); + if (tag === error) break; + 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.} 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.} 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.} Plain object + */ + Empty.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Empty to JSON. + * @function toJSON + * @memberof google.protobuf.Empty + * @instance + * @returns {Object.} JSON object + */ + Empty.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Empty + * @function getTypeUrl + * @memberof google.protobuf.Empty + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Empty"; + }; + + return Empty; })(); - return google; -})(); + return protobuf; + })(); + + return google; +})()); export { $root as default }; diff --git a/lazer/state_sdk/js/src/generated/state.cjs b/lazer/state_sdk/js/src/generated/state.cjs index ac86ea91cf..8d016c3732 100644 --- a/lazer/state_sdk/js/src/generated/state.cjs +++ b/lazer/state_sdk/js/src/generated/state.cjs @@ -4,3404 +4,3922 @@ var $protobuf = require("protobufjs/minimal"); // Common aliases -var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; +var $Reader = $protobuf.Reader, + $Writer = $protobuf.Writer, + $util = $protobuf.util; // Exported root namespace var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); -$root.lazer = (function() { +$root.lazer = (function () { + /** + * Namespace lazer. + * @exports lazer + * @namespace + */ + var lazer = {}; + lazer.State = (function () { /** - * Namespace lazer. - * @exports lazer - * @namespace + * Properties of a State. + * @memberof lazer + * @interface IState + * @property {number|null} [shardId] State shardId + * @property {number|Long|null} [lastSequenceNo] State lastSequenceNo + * @property {google.protobuf.ITimestamp|null} [lastTimestamp] State lastTimestamp + * @property {string|null} [shardName] State shardName + * @property {google.protobuf.IDuration|null} [minRate] State minRate + * @property {Array.|null} [feeds] State feeds + * @property {Array.|null} [publishers] State publishers + */ + + /** + * Constructs a new State. + * @memberof lazer + * @classdesc Represents a State. + * @implements IState + * @constructor + * @param {lazer.IState=} [properties] Properties to set + */ + function State(properties) { + this.feeds = []; + this.publishers = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + } + + /** + * State shardId. + * @member {number|null|undefined} shardId + * @memberof lazer.State + * @instance + */ + State.prototype.shardId = null; + + /** + * State lastSequenceNo. + * @member {number|Long|null|undefined} lastSequenceNo + * @memberof lazer.State + * @instance + */ + State.prototype.lastSequenceNo = null; + + /** + * State lastTimestamp. + * @member {google.protobuf.ITimestamp|null|undefined} lastTimestamp + * @memberof lazer.State + * @instance + */ + State.prototype.lastTimestamp = null; + + /** + * State shardName. + * @member {string|null|undefined} shardName + * @memberof lazer.State + * @instance + */ + State.prototype.shardName = null; + + /** + * State minRate. + * @member {google.protobuf.IDuration|null|undefined} minRate + * @memberof lazer.State + * @instance + */ + State.prototype.minRate = null; + + /** + * State feeds. + * @member {Array.} feeds + * @memberof lazer.State + * @instance + */ + State.prototype.feeds = $util.emptyArray; + + /** + * State publishers. + * @member {Array.} publishers + * @memberof lazer.State + * @instance + */ + State.prototype.publishers = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * State _shardId. + * @member {"shardId"|undefined} _shardId + * @memberof lazer.State + * @instance + */ + Object.defineProperty(State.prototype, "_shardId", { + get: $util.oneOfGetter(($oneOfFields = ["shardId"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * State _lastSequenceNo. + * @member {"lastSequenceNo"|undefined} _lastSequenceNo + * @memberof lazer.State + * @instance + */ + Object.defineProperty(State.prototype, "_lastSequenceNo", { + get: $util.oneOfGetter(($oneOfFields = ["lastSequenceNo"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * State _lastTimestamp. + * @member {"lastTimestamp"|undefined} _lastTimestamp + * @memberof lazer.State + * @instance + */ + Object.defineProperty(State.prototype, "_lastTimestamp", { + get: $util.oneOfGetter(($oneOfFields = ["lastTimestamp"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * State _shardName. + * @member {"shardName"|undefined} _shardName + * @memberof lazer.State + * @instance + */ + Object.defineProperty(State.prototype, "_shardName", { + get: $util.oneOfGetter(($oneOfFields = ["shardName"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * State _minRate. + * @member {"minRate"|undefined} _minRate + * @memberof lazer.State + * @instance + */ + Object.defineProperty(State.prototype, "_minRate", { + get: $util.oneOfGetter(($oneOfFields = ["minRate"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Creates a new State instance using the specified properties. + * @function create + * @memberof lazer.State + * @static + * @param {lazer.IState=} [properties] Properties to set + * @returns {lazer.State} State instance + */ + State.create = function create(properties) { + return new State(properties); + }; + + /** + * Encodes the specified State message. Does not implicitly {@link lazer.State.verify|verify} messages. + * @function encode + * @memberof lazer.State + * @static + * @param {lazer.IState} message State message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + State.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if ( + message.shardId != null && + Object.hasOwnProperty.call(message, "shardId") + ) + writer.uint32(/* id 1, wireType 0 =*/ 8).uint32(message.shardId); + if ( + message.lastSequenceNo != null && + Object.hasOwnProperty.call(message, "lastSequenceNo") + ) + writer + .uint32(/* id 2, wireType 0 =*/ 16) + .uint64(message.lastSequenceNo); + if ( + message.lastTimestamp != null && + Object.hasOwnProperty.call(message, "lastTimestamp") + ) + $root.google.protobuf.Timestamp.encode( + message.lastTimestamp, + writer.uint32(/* id 3, wireType 2 =*/ 26).fork(), + ).ldelim(); + if ( + message.shardName != null && + Object.hasOwnProperty.call(message, "shardName") + ) + writer.uint32(/* id 4, wireType 2 =*/ 34).string(message.shardName); + if ( + message.minRate != null && + Object.hasOwnProperty.call(message, "minRate") + ) + $root.google.protobuf.Duration.encode( + message.minRate, + writer.uint32(/* id 5, wireType 2 =*/ 42).fork(), + ).ldelim(); + if (message.feeds != null && message.feeds.length) + for (var i = 0; i < message.feeds.length; ++i) + $root.lazer.Feed.encode( + message.feeds[i], + writer.uint32(/* id 7, wireType 2 =*/ 58).fork(), + ).ldelim(); + if (message.publishers != null && message.publishers.length) + for (var i = 0; i < message.publishers.length; ++i) + $root.lazer.Publisher.encode( + message.publishers[i], + writer.uint32(/* id 8, wireType 2 =*/ 66).fork(), + ).ldelim(); + return writer; + }; + + /** + * Encodes the specified State message, length delimited. Does not implicitly {@link lazer.State.verify|verify} messages. + * @function encodeDelimited + * @memberof lazer.State + * @static + * @param {lazer.IState} message State message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + State.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a State message from the specified reader or buffer. + * @function decode + * @memberof lazer.State + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {lazer.State} State + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + State.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, + message = new $root.lazer.State(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.shardId = reader.uint32(); + break; + } + case 2: { + message.lastSequenceNo = reader.uint64(); + break; + } + case 3: { + message.lastTimestamp = $root.google.protobuf.Timestamp.decode( + reader, + reader.uint32(), + ); + break; + } + case 4: { + message.shardName = reader.string(); + break; + } + case 5: { + message.minRate = $root.google.protobuf.Duration.decode( + reader, + reader.uint32(), + ); + break; + } + case 7: { + if (!(message.feeds && message.feeds.length)) message.feeds = []; + message.feeds.push( + $root.lazer.Feed.decode(reader, reader.uint32()), + ); + break; + } + case 8: { + if (!(message.publishers && message.publishers.length)) + message.publishers = []; + message.publishers.push( + $root.lazer.Publisher.decode(reader, reader.uint32()), + ); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a State message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof lazer.State + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {lazer.State} State + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + State.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a State message. + * @function verify + * @memberof lazer.State + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + State.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.shardId != null && message.hasOwnProperty("shardId")) { + properties._shardId = 1; + if (!$util.isInteger(message.shardId)) + return "shardId: integer expected"; + } + if ( + message.lastSequenceNo != null && + message.hasOwnProperty("lastSequenceNo") + ) { + properties._lastSequenceNo = 1; + if ( + !$util.isInteger(message.lastSequenceNo) && + !( + message.lastSequenceNo && + $util.isInteger(message.lastSequenceNo.low) && + $util.isInteger(message.lastSequenceNo.high) + ) + ) + return "lastSequenceNo: integer|Long expected"; + } + if ( + message.lastTimestamp != null && + message.hasOwnProperty("lastTimestamp") + ) { + properties._lastTimestamp = 1; + { + var error = $root.google.protobuf.Timestamp.verify( + message.lastTimestamp, + ); + if (error) return "lastTimestamp." + error; + } + } + if (message.shardName != null && message.hasOwnProperty("shardName")) { + properties._shardName = 1; + if (!$util.isString(message.shardName)) + return "shardName: string expected"; + } + if (message.minRate != null && message.hasOwnProperty("minRate")) { + properties._minRate = 1; + { + var error = $root.google.protobuf.Duration.verify(message.minRate); + if (error) return "minRate." + error; + } + } + if (message.feeds != null && message.hasOwnProperty("feeds")) { + if (!Array.isArray(message.feeds)) return "feeds: array expected"; + for (var i = 0; i < message.feeds.length; ++i) { + var error = $root.lazer.Feed.verify(message.feeds[i]); + if (error) return "feeds." + error; + } + } + if (message.publishers != null && message.hasOwnProperty("publishers")) { + if (!Array.isArray(message.publishers)) + return "publishers: array expected"; + for (var i = 0; i < message.publishers.length; ++i) { + var error = $root.lazer.Publisher.verify(message.publishers[i]); + if (error) return "publishers." + error; + } + } + return null; + }; + + /** + * Creates a State message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof lazer.State + * @static + * @param {Object.} object Plain object + * @returns {lazer.State} State + */ + State.fromObject = function fromObject(object) { + if (object instanceof $root.lazer.State) return object; + var message = new $root.lazer.State(); + if (object.shardId != null) message.shardId = object.shardId >>> 0; + if (object.lastSequenceNo != null) + if ($util.Long) + (message.lastSequenceNo = $util.Long.fromValue( + object.lastSequenceNo, + )).unsigned = true; + else if (typeof object.lastSequenceNo === "string") + message.lastSequenceNo = parseInt(object.lastSequenceNo, 10); + else if (typeof object.lastSequenceNo === "number") + message.lastSequenceNo = object.lastSequenceNo; + else if (typeof object.lastSequenceNo === "object") + message.lastSequenceNo = new $util.LongBits( + object.lastSequenceNo.low >>> 0, + object.lastSequenceNo.high >>> 0, + ).toNumber(true); + if (object.lastTimestamp != null) { + if (typeof object.lastTimestamp !== "object") + throw TypeError(".lazer.State.lastTimestamp: object expected"); + message.lastTimestamp = $root.google.protobuf.Timestamp.fromObject( + object.lastTimestamp, + ); + } + if (object.shardName != null) + message.shardName = String(object.shardName); + if (object.minRate != null) { + if (typeof object.minRate !== "object") + throw TypeError(".lazer.State.minRate: object expected"); + message.minRate = $root.google.protobuf.Duration.fromObject( + object.minRate, + ); + } + if (object.feeds) { + if (!Array.isArray(object.feeds)) + throw TypeError(".lazer.State.feeds: array expected"); + message.feeds = []; + for (var i = 0; i < object.feeds.length; ++i) { + if (typeof object.feeds[i] !== "object") + throw TypeError(".lazer.State.feeds: object expected"); + message.feeds[i] = $root.lazer.Feed.fromObject(object.feeds[i]); + } + } + if (object.publishers) { + if (!Array.isArray(object.publishers)) + throw TypeError(".lazer.State.publishers: array expected"); + message.publishers = []; + for (var i = 0; i < object.publishers.length; ++i) { + if (typeof object.publishers[i] !== "object") + throw TypeError(".lazer.State.publishers: object expected"); + message.publishers[i] = $root.lazer.Publisher.fromObject( + object.publishers[i], + ); + } + } + return message; + }; + + /** + * Creates a plain object from a State message. Also converts values to other types if specified. + * @function toObject + * @memberof lazer.State + * @static + * @param {lazer.State} message State + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + State.toObject = function toObject(message, options) { + if (!options) options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.feeds = []; + object.publishers = []; + } + if (message.shardId != null && message.hasOwnProperty("shardId")) { + object.shardId = message.shardId; + if (options.oneofs) object._shardId = "shardId"; + } + if ( + message.lastSequenceNo != null && + message.hasOwnProperty("lastSequenceNo") + ) { + if (typeof message.lastSequenceNo === "number") + object.lastSequenceNo = + options.longs === String + ? String(message.lastSequenceNo) + : message.lastSequenceNo; + else + object.lastSequenceNo = + options.longs === String + ? $util.Long.prototype.toString.call(message.lastSequenceNo) + : options.longs === Number + ? new $util.LongBits( + message.lastSequenceNo.low >>> 0, + message.lastSequenceNo.high >>> 0, + ).toNumber(true) + : message.lastSequenceNo; + if (options.oneofs) object._lastSequenceNo = "lastSequenceNo"; + } + if ( + message.lastTimestamp != null && + message.hasOwnProperty("lastTimestamp") + ) { + object.lastTimestamp = $root.google.protobuf.Timestamp.toObject( + message.lastTimestamp, + options, + ); + if (options.oneofs) object._lastTimestamp = "lastTimestamp"; + } + if (message.shardName != null && message.hasOwnProperty("shardName")) { + object.shardName = message.shardName; + if (options.oneofs) object._shardName = "shardName"; + } + if (message.minRate != null && message.hasOwnProperty("minRate")) { + object.minRate = $root.google.protobuf.Duration.toObject( + message.minRate, + options, + ); + if (options.oneofs) object._minRate = "minRate"; + } + if (message.feeds && message.feeds.length) { + object.feeds = []; + for (var j = 0; j < message.feeds.length; ++j) + object.feeds[j] = $root.lazer.Feed.toObject( + message.feeds[j], + options, + ); + } + if (message.publishers && message.publishers.length) { + object.publishers = []; + for (var j = 0; j < message.publishers.length; ++j) + object.publishers[j] = $root.lazer.Publisher.toObject( + message.publishers[j], + options, + ); + } + return object; + }; + + /** + * Converts this State to JSON. + * @function toJSON + * @memberof lazer.State + * @instance + * @returns {Object.} JSON object + */ + State.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for State + * @function getTypeUrl + * @memberof lazer.State + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + State.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/lazer.State"; + }; + + return State; + })(); + + lazer.Publisher = (function () { + /** + * Properties of a Publisher. + * @memberof lazer + * @interface IPublisher + * @property {number|null} [publisherId] Publisher publisherId + * @property {string|null} [name] Publisher name + * @property {Array.|null} [publicKeys] Publisher publicKeys + * @property {boolean|null} [isActive] Publisher isActive + */ + + /** + * Constructs a new Publisher. + * @memberof lazer + * @classdesc Represents a Publisher. + * @implements IPublisher + * @constructor + * @param {lazer.IPublisher=} [properties] Properties to set + */ + function Publisher(properties) { + this.publicKeys = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + } + + /** + * Publisher publisherId. + * @member {number|null|undefined} publisherId + * @memberof lazer.Publisher + * @instance + */ + Publisher.prototype.publisherId = null; + + /** + * Publisher name. + * @member {string|null|undefined} name + * @memberof lazer.Publisher + * @instance + */ + Publisher.prototype.name = null; + + /** + * Publisher publicKeys. + * @member {Array.} publicKeys + * @memberof lazer.Publisher + * @instance + */ + Publisher.prototype.publicKeys = $util.emptyArray; + + /** + * Publisher isActive. + * @member {boolean|null|undefined} isActive + * @memberof lazer.Publisher + * @instance + */ + Publisher.prototype.isActive = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Publisher _publisherId. + * @member {"publisherId"|undefined} _publisherId + * @memberof lazer.Publisher + * @instance + */ + Object.defineProperty(Publisher.prototype, "_publisherId", { + get: $util.oneOfGetter(($oneOfFields = ["publisherId"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Publisher _name. + * @member {"name"|undefined} _name + * @memberof lazer.Publisher + * @instance + */ + Object.defineProperty(Publisher.prototype, "_name", { + get: $util.oneOfGetter(($oneOfFields = ["name"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Publisher _isActive. + * @member {"isActive"|undefined} _isActive + * @memberof lazer.Publisher + * @instance + */ + Object.defineProperty(Publisher.prototype, "_isActive", { + get: $util.oneOfGetter(($oneOfFields = ["isActive"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Creates a new Publisher instance using the specified properties. + * @function create + * @memberof lazer.Publisher + * @static + * @param {lazer.IPublisher=} [properties] Properties to set + * @returns {lazer.Publisher} Publisher instance + */ + Publisher.create = function create(properties) { + return new Publisher(properties); + }; + + /** + * Encodes the specified Publisher message. Does not implicitly {@link lazer.Publisher.verify|verify} messages. + * @function encode + * @memberof lazer.Publisher + * @static + * @param {lazer.IPublisher} message Publisher message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Publisher.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if ( + message.publisherId != null && + Object.hasOwnProperty.call(message, "publisherId") + ) + writer.uint32(/* id 1, wireType 0 =*/ 8).uint32(message.publisherId); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 2, wireType 2 =*/ 18).string(message.name); + if (message.publicKeys != null && message.publicKeys.length) + for (var i = 0; i < message.publicKeys.length; ++i) + writer + .uint32(/* id 3, wireType 2 =*/ 26) + .bytes(message.publicKeys[i]); + if ( + message.isActive != null && + Object.hasOwnProperty.call(message, "isActive") + ) + writer.uint32(/* id 4, wireType 0 =*/ 32).bool(message.isActive); + return writer; + }; + + /** + * Encodes the specified Publisher message, length delimited. Does not implicitly {@link lazer.Publisher.verify|verify} messages. + * @function encodeDelimited + * @memberof lazer.Publisher + * @static + * @param {lazer.IPublisher} message Publisher message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Publisher.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Publisher message from the specified reader or buffer. + * @function decode + * @memberof lazer.Publisher + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {lazer.Publisher} Publisher + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Publisher.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, + message = new $root.lazer.Publisher(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.publisherId = reader.uint32(); + break; + } + case 2: { + message.name = reader.string(); + break; + } + case 3: { + if (!(message.publicKeys && message.publicKeys.length)) + message.publicKeys = []; + message.publicKeys.push(reader.bytes()); + break; + } + case 4: { + message.isActive = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Publisher message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof lazer.Publisher + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {lazer.Publisher} Publisher + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Publisher.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Publisher message. + * @function verify + * @memberof lazer.Publisher + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Publisher.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if ( + message.publisherId != null && + message.hasOwnProperty("publisherId") + ) { + properties._publisherId = 1; + if (!$util.isInteger(message.publisherId)) + return "publisherId: integer expected"; + } + if (message.name != null && message.hasOwnProperty("name")) { + properties._name = 1; + if (!$util.isString(message.name)) return "name: string expected"; + } + if (message.publicKeys != null && message.hasOwnProperty("publicKeys")) { + if (!Array.isArray(message.publicKeys)) + return "publicKeys: array expected"; + for (var i = 0; i < message.publicKeys.length; ++i) + if ( + !( + (message.publicKeys[i] && + typeof message.publicKeys[i].length === "number") || + $util.isString(message.publicKeys[i]) + ) + ) + return "publicKeys: buffer[] expected"; + } + if (message.isActive != null && message.hasOwnProperty("isActive")) { + properties._isActive = 1; + if (typeof message.isActive !== "boolean") + return "isActive: boolean expected"; + } + return null; + }; + + /** + * Creates a Publisher message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof lazer.Publisher + * @static + * @param {Object.} object Plain object + * @returns {lazer.Publisher} Publisher + */ + Publisher.fromObject = function fromObject(object) { + if (object instanceof $root.lazer.Publisher) return object; + var message = new $root.lazer.Publisher(); + if (object.publisherId != null) + message.publisherId = object.publisherId >>> 0; + if (object.name != null) message.name = String(object.name); + if (object.publicKeys) { + if (!Array.isArray(object.publicKeys)) + throw TypeError(".lazer.Publisher.publicKeys: array expected"); + message.publicKeys = []; + for (var i = 0; i < object.publicKeys.length; ++i) + if (typeof object.publicKeys[i] === "string") + $util.base64.decode( + object.publicKeys[i], + (message.publicKeys[i] = $util.newBuffer( + $util.base64.length(object.publicKeys[i]), + )), + 0, + ); + else if (object.publicKeys[i].length >= 0) + message.publicKeys[i] = object.publicKeys[i]; + } + if (object.isActive != null) message.isActive = Boolean(object.isActive); + return message; + }; + + /** + * Creates a plain object from a Publisher message. Also converts values to other types if specified. + * @function toObject + * @memberof lazer.Publisher + * @static + * @param {lazer.Publisher} message Publisher + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Publisher.toObject = function toObject(message, options) { + if (!options) options = {}; + var object = {}; + if (options.arrays || options.defaults) object.publicKeys = []; + if ( + message.publisherId != null && + message.hasOwnProperty("publisherId") + ) { + object.publisherId = message.publisherId; + if (options.oneofs) object._publisherId = "publisherId"; + } + if (message.name != null && message.hasOwnProperty("name")) { + object.name = message.name; + if (options.oneofs) object._name = "name"; + } + if (message.publicKeys && message.publicKeys.length) { + object.publicKeys = []; + for (var j = 0; j < message.publicKeys.length; ++j) + object.publicKeys[j] = + options.bytes === String + ? $util.base64.encode( + message.publicKeys[j], + 0, + message.publicKeys[j].length, + ) + : options.bytes === Array + ? Array.prototype.slice.call(message.publicKeys[j]) + : message.publicKeys[j]; + } + if (message.isActive != null && message.hasOwnProperty("isActive")) { + object.isActive = message.isActive; + if (options.oneofs) object._isActive = "isActive"; + } + return object; + }; + + /** + * Converts this Publisher to JSON. + * @function toJSON + * @memberof lazer.Publisher + * @instance + * @returns {Object.} JSON object + */ + Publisher.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Publisher + * @function getTypeUrl + * @memberof lazer.Publisher + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Publisher.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/lazer.Publisher"; + }; + + return Publisher; + })(); + + /** + * AssetType enum. + * @name lazer.AssetType + * @enum {number} + * @property {number} CRYPTO=0 CRYPTO value + * @property {number} FUNDING_RATE=1 FUNDING_RATE value + * @property {number} FX=2 FX value + * @property {number} COMMODITY=3 COMMODITY value + * @property {number} NAV=4 NAV value + * @property {number} CRYPTO_INDEX=5 CRYPTO_INDEX value + * @property {number} CRYPTO_REDEMPTION_RATE=6 CRYPTO_REDEMPTION_RATE value + * @property {number} EQUITY=7 EQUITY value + * @property {number} METAL=8 METAL value + * @property {number} RATES=9 RATES value + */ + lazer.AssetType = (function () { + var valuesById = {}, + values = Object.create(valuesById); + values[(valuesById[0] = "CRYPTO")] = 0; + values[(valuesById[1] = "FUNDING_RATE")] = 1; + values[(valuesById[2] = "FX")] = 2; + values[(valuesById[3] = "COMMODITY")] = 3; + values[(valuesById[4] = "NAV")] = 4; + values[(valuesById[5] = "CRYPTO_INDEX")] = 5; + values[(valuesById[6] = "CRYPTO_REDEMPTION_RATE")] = 6; + values[(valuesById[7] = "EQUITY")] = 7; + values[(valuesById[8] = "METAL")] = 8; + values[(valuesById[9] = "RATES")] = 9; + return values; + })(); + + lazer.FeedMetadata = (function () { + /** + * Properties of a FeedMetadata. + * @memberof lazer + * @interface IFeedMetadata + * @property {number|null} [priceFeedId] FeedMetadata priceFeedId + * @property {string|null} [name] FeedMetadata name + * @property {string|null} [symbol] FeedMetadata symbol + * @property {string|null} [description] FeedMetadata description + * @property {lazer.AssetType|null} [assetType] FeedMetadata assetType + * @property {number|null} [exponent] FeedMetadata exponent + * @property {number|null} [cmcId] FeedMetadata cmcId + * @property {google.protobuf.IDuration|null} [fundingRateInterval] FeedMetadata fundingRateInterval + * @property {number|null} [minPublishers] FeedMetadata minPublishers + * @property {google.protobuf.IDuration|null} [minRate] FeedMetadata minRate + * @property {google.protobuf.IDuration|null} [expiryTime] FeedMetadata expiryTime + * @property {boolean|null} [isActivated] FeedMetadata isActivated + * @property {string|null} [hermesId] FeedMetadata hermesId + * @property {string|null} [quoteCurrency] FeedMetadata quoteCurrency + * @property {string|null} [marketSchedule] FeedMetadata marketSchedule + */ + + /** + * Constructs a new FeedMetadata. + * @memberof lazer + * @classdesc Represents a FeedMetadata. + * @implements IFeedMetadata + * @constructor + * @param {lazer.IFeedMetadata=} [properties] Properties to set + */ + function FeedMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + } + + /** + * FeedMetadata priceFeedId. + * @member {number|null|undefined} priceFeedId + * @memberof lazer.FeedMetadata + * @instance + */ + FeedMetadata.prototype.priceFeedId = null; + + /** + * FeedMetadata name. + * @member {string|null|undefined} name + * @memberof lazer.FeedMetadata + * @instance + */ + FeedMetadata.prototype.name = null; + + /** + * FeedMetadata symbol. + * @member {string|null|undefined} symbol + * @memberof lazer.FeedMetadata + * @instance + */ + FeedMetadata.prototype.symbol = null; + + /** + * FeedMetadata description. + * @member {string|null|undefined} description + * @memberof lazer.FeedMetadata + * @instance + */ + FeedMetadata.prototype.description = null; + + /** + * FeedMetadata assetType. + * @member {lazer.AssetType|null|undefined} assetType + * @memberof lazer.FeedMetadata + * @instance + */ + FeedMetadata.prototype.assetType = null; + + /** + * FeedMetadata exponent. + * @member {number|null|undefined} exponent + * @memberof lazer.FeedMetadata + * @instance + */ + FeedMetadata.prototype.exponent = null; + + /** + * FeedMetadata cmcId. + * @member {number|null|undefined} cmcId + * @memberof lazer.FeedMetadata + * @instance + */ + FeedMetadata.prototype.cmcId = null; + + /** + * FeedMetadata fundingRateInterval. + * @member {google.protobuf.IDuration|null|undefined} fundingRateInterval + * @memberof lazer.FeedMetadata + * @instance + */ + FeedMetadata.prototype.fundingRateInterval = null; + + /** + * FeedMetadata minPublishers. + * @member {number|null|undefined} minPublishers + * @memberof lazer.FeedMetadata + * @instance + */ + FeedMetadata.prototype.minPublishers = null; + + /** + * FeedMetadata minRate. + * @member {google.protobuf.IDuration|null|undefined} minRate + * @memberof lazer.FeedMetadata + * @instance + */ + FeedMetadata.prototype.minRate = null; + + /** + * FeedMetadata expiryTime. + * @member {google.protobuf.IDuration|null|undefined} expiryTime + * @memberof lazer.FeedMetadata + * @instance + */ + FeedMetadata.prototype.expiryTime = null; + + /** + * FeedMetadata isActivated. + * @member {boolean|null|undefined} isActivated + * @memberof lazer.FeedMetadata + * @instance + */ + FeedMetadata.prototype.isActivated = null; + + /** + * FeedMetadata hermesId. + * @member {string|null|undefined} hermesId + * @memberof lazer.FeedMetadata + * @instance + */ + FeedMetadata.prototype.hermesId = null; + + /** + * FeedMetadata quoteCurrency. + * @member {string|null|undefined} quoteCurrency + * @memberof lazer.FeedMetadata + * @instance + */ + FeedMetadata.prototype.quoteCurrency = null; + + /** + * FeedMetadata marketSchedule. + * @member {string|null|undefined} marketSchedule + * @memberof lazer.FeedMetadata + * @instance + */ + FeedMetadata.prototype.marketSchedule = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * FeedMetadata _priceFeedId. + * @member {"priceFeedId"|undefined} _priceFeedId + * @memberof lazer.FeedMetadata + * @instance + */ + Object.defineProperty(FeedMetadata.prototype, "_priceFeedId", { + get: $util.oneOfGetter(($oneOfFields = ["priceFeedId"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * FeedMetadata _name. + * @member {"name"|undefined} _name + * @memberof lazer.FeedMetadata + * @instance + */ + Object.defineProperty(FeedMetadata.prototype, "_name", { + get: $util.oneOfGetter(($oneOfFields = ["name"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * FeedMetadata _symbol. + * @member {"symbol"|undefined} _symbol + * @memberof lazer.FeedMetadata + * @instance + */ + Object.defineProperty(FeedMetadata.prototype, "_symbol", { + get: $util.oneOfGetter(($oneOfFields = ["symbol"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * FeedMetadata _description. + * @member {"description"|undefined} _description + * @memberof lazer.FeedMetadata + * @instance + */ + Object.defineProperty(FeedMetadata.prototype, "_description", { + get: $util.oneOfGetter(($oneOfFields = ["description"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * FeedMetadata _assetType. + * @member {"assetType"|undefined} _assetType + * @memberof lazer.FeedMetadata + * @instance + */ + Object.defineProperty(FeedMetadata.prototype, "_assetType", { + get: $util.oneOfGetter(($oneOfFields = ["assetType"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * FeedMetadata _exponent. + * @member {"exponent"|undefined} _exponent + * @memberof lazer.FeedMetadata + * @instance + */ + Object.defineProperty(FeedMetadata.prototype, "_exponent", { + get: $util.oneOfGetter(($oneOfFields = ["exponent"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * FeedMetadata _cmcId. + * @member {"cmcId"|undefined} _cmcId + * @memberof lazer.FeedMetadata + * @instance + */ + Object.defineProperty(FeedMetadata.prototype, "_cmcId", { + get: $util.oneOfGetter(($oneOfFields = ["cmcId"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * FeedMetadata _fundingRateInterval. + * @member {"fundingRateInterval"|undefined} _fundingRateInterval + * @memberof lazer.FeedMetadata + * @instance + */ + Object.defineProperty(FeedMetadata.prototype, "_fundingRateInterval", { + get: $util.oneOfGetter(($oneOfFields = ["fundingRateInterval"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * FeedMetadata _minPublishers. + * @member {"minPublishers"|undefined} _minPublishers + * @memberof lazer.FeedMetadata + * @instance + */ + Object.defineProperty(FeedMetadata.prototype, "_minPublishers", { + get: $util.oneOfGetter(($oneOfFields = ["minPublishers"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * FeedMetadata _minRate. + * @member {"minRate"|undefined} _minRate + * @memberof lazer.FeedMetadata + * @instance + */ + Object.defineProperty(FeedMetadata.prototype, "_minRate", { + get: $util.oneOfGetter(($oneOfFields = ["minRate"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * FeedMetadata _expiryTime. + * @member {"expiryTime"|undefined} _expiryTime + * @memberof lazer.FeedMetadata + * @instance + */ + Object.defineProperty(FeedMetadata.prototype, "_expiryTime", { + get: $util.oneOfGetter(($oneOfFields = ["expiryTime"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * FeedMetadata _isActivated. + * @member {"isActivated"|undefined} _isActivated + * @memberof lazer.FeedMetadata + * @instance + */ + Object.defineProperty(FeedMetadata.prototype, "_isActivated", { + get: $util.oneOfGetter(($oneOfFields = ["isActivated"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * FeedMetadata _hermesId. + * @member {"hermesId"|undefined} _hermesId + * @memberof lazer.FeedMetadata + * @instance + */ + Object.defineProperty(FeedMetadata.prototype, "_hermesId", { + get: $util.oneOfGetter(($oneOfFields = ["hermesId"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * FeedMetadata _quoteCurrency. + * @member {"quoteCurrency"|undefined} _quoteCurrency + * @memberof lazer.FeedMetadata + * @instance + */ + Object.defineProperty(FeedMetadata.prototype, "_quoteCurrency", { + get: $util.oneOfGetter(($oneOfFields = ["quoteCurrency"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * FeedMetadata _marketSchedule. + * @member {"marketSchedule"|undefined} _marketSchedule + * @memberof lazer.FeedMetadata + * @instance + */ + Object.defineProperty(FeedMetadata.prototype, "_marketSchedule", { + get: $util.oneOfGetter(($oneOfFields = ["marketSchedule"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Creates a new FeedMetadata instance using the specified properties. + * @function create + * @memberof lazer.FeedMetadata + * @static + * @param {lazer.IFeedMetadata=} [properties] Properties to set + * @returns {lazer.FeedMetadata} FeedMetadata instance + */ + FeedMetadata.create = function create(properties) { + return new FeedMetadata(properties); + }; + + /** + * Encodes the specified FeedMetadata message. Does not implicitly {@link lazer.FeedMetadata.verify|verify} messages. + * @function encode + * @memberof lazer.FeedMetadata + * @static + * @param {lazer.IFeedMetadata} message FeedMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeedMetadata.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if ( + message.priceFeedId != null && + Object.hasOwnProperty.call(message, "priceFeedId") + ) + writer.uint32(/* id 1, wireType 0 =*/ 8).uint32(message.priceFeedId); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 2, wireType 2 =*/ 18).string(message.name); + if ( + message.symbol != null && + Object.hasOwnProperty.call(message, "symbol") + ) + writer.uint32(/* id 3, wireType 2 =*/ 26).string(message.symbol); + if ( + message.description != null && + Object.hasOwnProperty.call(message, "description") + ) + writer.uint32(/* id 4, wireType 2 =*/ 34).string(message.description); + if ( + message.assetType != null && + Object.hasOwnProperty.call(message, "assetType") + ) + writer.uint32(/* id 5, wireType 0 =*/ 40).int32(message.assetType); + if ( + message.exponent != null && + Object.hasOwnProperty.call(message, "exponent") + ) + writer.uint32(/* id 6, wireType 0 =*/ 48).sint32(message.exponent); + if (message.cmcId != null && Object.hasOwnProperty.call(message, "cmcId")) + writer.uint32(/* id 7, wireType 0 =*/ 56).uint32(message.cmcId); + if ( + message.fundingRateInterval != null && + Object.hasOwnProperty.call(message, "fundingRateInterval") + ) + $root.google.protobuf.Duration.encode( + message.fundingRateInterval, + writer.uint32(/* id 8, wireType 2 =*/ 66).fork(), + ).ldelim(); + if ( + message.minPublishers != null && + Object.hasOwnProperty.call(message, "minPublishers") + ) + writer.uint32(/* id 9, wireType 0 =*/ 72).uint32(message.minPublishers); + if ( + message.minRate != null && + Object.hasOwnProperty.call(message, "minRate") + ) + $root.google.protobuf.Duration.encode( + message.minRate, + writer.uint32(/* id 10, wireType 2 =*/ 82).fork(), + ).ldelim(); + if ( + message.expiryTime != null && + Object.hasOwnProperty.call(message, "expiryTime") + ) + $root.google.protobuf.Duration.encode( + message.expiryTime, + writer.uint32(/* id 11, wireType 2 =*/ 90).fork(), + ).ldelim(); + if ( + message.isActivated != null && + Object.hasOwnProperty.call(message, "isActivated") + ) + writer.uint32(/* id 12, wireType 0 =*/ 96).bool(message.isActivated); + if ( + message.hermesId != null && + Object.hasOwnProperty.call(message, "hermesId") + ) + writer.uint32(/* id 13, wireType 2 =*/ 106).string(message.hermesId); + if ( + message.quoteCurrency != null && + Object.hasOwnProperty.call(message, "quoteCurrency") + ) + writer + .uint32(/* id 14, wireType 2 =*/ 114) + .string(message.quoteCurrency); + if ( + message.marketSchedule != null && + Object.hasOwnProperty.call(message, "marketSchedule") + ) + writer + .uint32(/* id 15, wireType 2 =*/ 122) + .string(message.marketSchedule); + return writer; + }; + + /** + * Encodes the specified FeedMetadata message, length delimited. Does not implicitly {@link lazer.FeedMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof lazer.FeedMetadata + * @static + * @param {lazer.IFeedMetadata} message FeedMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeedMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeedMetadata message from the specified reader or buffer. + * @function decode + * @memberof lazer.FeedMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {lazer.FeedMetadata} FeedMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeedMetadata.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, + message = new $root.lazer.FeedMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.priceFeedId = reader.uint32(); + break; + } + case 2: { + message.name = reader.string(); + break; + } + case 3: { + message.symbol = reader.string(); + break; + } + case 4: { + message.description = reader.string(); + break; + } + case 5: { + message.assetType = reader.int32(); + break; + } + case 6: { + message.exponent = reader.sint32(); + break; + } + case 7: { + message.cmcId = reader.uint32(); + break; + } + case 8: { + message.fundingRateInterval = $root.google.protobuf.Duration.decode( + reader, + reader.uint32(), + ); + break; + } + case 9: { + message.minPublishers = reader.uint32(); + break; + } + case 10: { + message.minRate = $root.google.protobuf.Duration.decode( + reader, + reader.uint32(), + ); + break; + } + case 11: { + message.expiryTime = $root.google.protobuf.Duration.decode( + reader, + reader.uint32(), + ); + break; + } + case 12: { + message.isActivated = reader.bool(); + break; + } + case 13: { + message.hermesId = reader.string(); + break; + } + case 14: { + message.quoteCurrency = reader.string(); + break; + } + case 15: { + message.marketSchedule = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeedMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof lazer.FeedMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {lazer.FeedMetadata} FeedMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeedMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeedMetadata message. + * @function verify + * @memberof lazer.FeedMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeedMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if ( + message.priceFeedId != null && + message.hasOwnProperty("priceFeedId") + ) { + properties._priceFeedId = 1; + if (!$util.isInteger(message.priceFeedId)) + return "priceFeedId: integer expected"; + } + if (message.name != null && message.hasOwnProperty("name")) { + properties._name = 1; + if (!$util.isString(message.name)) return "name: string expected"; + } + if (message.symbol != null && message.hasOwnProperty("symbol")) { + properties._symbol = 1; + if (!$util.isString(message.symbol)) return "symbol: string expected"; + } + if ( + message.description != null && + message.hasOwnProperty("description") + ) { + properties._description = 1; + if (!$util.isString(message.description)) + return "description: string expected"; + } + if (message.assetType != null && message.hasOwnProperty("assetType")) { + properties._assetType = 1; + switch (message.assetType) { + default: + return "assetType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + break; + } + } + if (message.exponent != null && message.hasOwnProperty("exponent")) { + properties._exponent = 1; + if (!$util.isInteger(message.exponent)) + return "exponent: integer expected"; + } + if (message.cmcId != null && message.hasOwnProperty("cmcId")) { + properties._cmcId = 1; + if (!$util.isInteger(message.cmcId)) return "cmcId: integer expected"; + } + if ( + message.fundingRateInterval != null && + message.hasOwnProperty("fundingRateInterval") + ) { + properties._fundingRateInterval = 1; + { + var error = $root.google.protobuf.Duration.verify( + message.fundingRateInterval, + ); + if (error) return "fundingRateInterval." + error; + } + } + if ( + message.minPublishers != null && + message.hasOwnProperty("minPublishers") + ) { + properties._minPublishers = 1; + if (!$util.isInteger(message.minPublishers)) + return "minPublishers: integer expected"; + } + if (message.minRate != null && message.hasOwnProperty("minRate")) { + properties._minRate = 1; + { + var error = $root.google.protobuf.Duration.verify(message.minRate); + if (error) return "minRate." + error; + } + } + if (message.expiryTime != null && message.hasOwnProperty("expiryTime")) { + properties._expiryTime = 1; + { + var error = $root.google.protobuf.Duration.verify(message.expiryTime); + if (error) return "expiryTime." + error; + } + } + if ( + message.isActivated != null && + message.hasOwnProperty("isActivated") + ) { + properties._isActivated = 1; + if (typeof message.isActivated !== "boolean") + return "isActivated: boolean expected"; + } + if (message.hermesId != null && message.hasOwnProperty("hermesId")) { + properties._hermesId = 1; + if (!$util.isString(message.hermesId)) + return "hermesId: string expected"; + } + if ( + message.quoteCurrency != null && + message.hasOwnProperty("quoteCurrency") + ) { + properties._quoteCurrency = 1; + if (!$util.isString(message.quoteCurrency)) + return "quoteCurrency: string expected"; + } + if ( + message.marketSchedule != null && + message.hasOwnProperty("marketSchedule") + ) { + properties._marketSchedule = 1; + if (!$util.isString(message.marketSchedule)) + return "marketSchedule: string expected"; + } + return null; + }; + + /** + * Creates a FeedMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof lazer.FeedMetadata + * @static + * @param {Object.} object Plain object + * @returns {lazer.FeedMetadata} FeedMetadata + */ + FeedMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.lazer.FeedMetadata) return object; + var message = new $root.lazer.FeedMetadata(); + if (object.priceFeedId != null) + message.priceFeedId = object.priceFeedId >>> 0; + if (object.name != null) message.name = String(object.name); + if (object.symbol != null) message.symbol = String(object.symbol); + if (object.description != null) + message.description = String(object.description); + switch (object.assetType) { + default: + if (typeof object.assetType === "number") { + message.assetType = object.assetType; + break; + } + break; + case "CRYPTO": + case 0: + message.assetType = 0; + break; + case "FUNDING_RATE": + case 1: + message.assetType = 1; + break; + case "FX": + case 2: + message.assetType = 2; + break; + case "COMMODITY": + case 3: + message.assetType = 3; + break; + case "NAV": + case 4: + message.assetType = 4; + break; + case "CRYPTO_INDEX": + case 5: + message.assetType = 5; + break; + case "CRYPTO_REDEMPTION_RATE": + case 6: + message.assetType = 6; + break; + case "EQUITY": + case 7: + message.assetType = 7; + break; + case "METAL": + case 8: + message.assetType = 8; + break; + case "RATES": + case 9: + message.assetType = 9; + break; + } + if (object.exponent != null) message.exponent = object.exponent | 0; + if (object.cmcId != null) message.cmcId = object.cmcId >>> 0; + if (object.fundingRateInterval != null) { + if (typeof object.fundingRateInterval !== "object") + throw TypeError( + ".lazer.FeedMetadata.fundingRateInterval: object expected", + ); + message.fundingRateInterval = $root.google.protobuf.Duration.fromObject( + object.fundingRateInterval, + ); + } + if (object.minPublishers != null) + message.minPublishers = object.minPublishers >>> 0; + if (object.minRate != null) { + if (typeof object.minRate !== "object") + throw TypeError(".lazer.FeedMetadata.minRate: object expected"); + message.minRate = $root.google.protobuf.Duration.fromObject( + object.minRate, + ); + } + if (object.expiryTime != null) { + if (typeof object.expiryTime !== "object") + throw TypeError(".lazer.FeedMetadata.expiryTime: object expected"); + message.expiryTime = $root.google.protobuf.Duration.fromObject( + object.expiryTime, + ); + } + if (object.isActivated != null) + message.isActivated = Boolean(object.isActivated); + if (object.hermesId != null) message.hermesId = String(object.hermesId); + if (object.quoteCurrency != null) + message.quoteCurrency = String(object.quoteCurrency); + if (object.marketSchedule != null) + message.marketSchedule = String(object.marketSchedule); + return message; + }; + + /** + * Creates a plain object from a FeedMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof lazer.FeedMetadata + * @static + * @param {lazer.FeedMetadata} message FeedMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeedMetadata.toObject = function toObject(message, options) { + if (!options) options = {}; + var object = {}; + if ( + message.priceFeedId != null && + message.hasOwnProperty("priceFeedId") + ) { + object.priceFeedId = message.priceFeedId; + if (options.oneofs) object._priceFeedId = "priceFeedId"; + } + if (message.name != null && message.hasOwnProperty("name")) { + object.name = message.name; + if (options.oneofs) object._name = "name"; + } + if (message.symbol != null && message.hasOwnProperty("symbol")) { + object.symbol = message.symbol; + if (options.oneofs) object._symbol = "symbol"; + } + if ( + message.description != null && + message.hasOwnProperty("description") + ) { + object.description = message.description; + if (options.oneofs) object._description = "description"; + } + if (message.assetType != null && message.hasOwnProperty("assetType")) { + object.assetType = + options.enums === String + ? $root.lazer.AssetType[message.assetType] === undefined + ? message.assetType + : $root.lazer.AssetType[message.assetType] + : message.assetType; + if (options.oneofs) object._assetType = "assetType"; + } + if (message.exponent != null && message.hasOwnProperty("exponent")) { + object.exponent = message.exponent; + if (options.oneofs) object._exponent = "exponent"; + } + if (message.cmcId != null && message.hasOwnProperty("cmcId")) { + object.cmcId = message.cmcId; + if (options.oneofs) object._cmcId = "cmcId"; + } + if ( + message.fundingRateInterval != null && + message.hasOwnProperty("fundingRateInterval") + ) { + object.fundingRateInterval = $root.google.protobuf.Duration.toObject( + message.fundingRateInterval, + options, + ); + if (options.oneofs) object._fundingRateInterval = "fundingRateInterval"; + } + if ( + message.minPublishers != null && + message.hasOwnProperty("minPublishers") + ) { + object.minPublishers = message.minPublishers; + if (options.oneofs) object._minPublishers = "minPublishers"; + } + if (message.minRate != null && message.hasOwnProperty("minRate")) { + object.minRate = $root.google.protobuf.Duration.toObject( + message.minRate, + options, + ); + if (options.oneofs) object._minRate = "minRate"; + } + if (message.expiryTime != null && message.hasOwnProperty("expiryTime")) { + object.expiryTime = $root.google.protobuf.Duration.toObject( + message.expiryTime, + options, + ); + if (options.oneofs) object._expiryTime = "expiryTime"; + } + if ( + message.isActivated != null && + message.hasOwnProperty("isActivated") + ) { + object.isActivated = message.isActivated; + if (options.oneofs) object._isActivated = "isActivated"; + } + if (message.hermesId != null && message.hasOwnProperty("hermesId")) { + object.hermesId = message.hermesId; + if (options.oneofs) object._hermesId = "hermesId"; + } + if ( + message.quoteCurrency != null && + message.hasOwnProperty("quoteCurrency") + ) { + object.quoteCurrency = message.quoteCurrency; + if (options.oneofs) object._quoteCurrency = "quoteCurrency"; + } + if ( + message.marketSchedule != null && + message.hasOwnProperty("marketSchedule") + ) { + object.marketSchedule = message.marketSchedule; + if (options.oneofs) object._marketSchedule = "marketSchedule"; + } + return object; + }; + + /** + * Converts this FeedMetadata to JSON. + * @function toJSON + * @memberof lazer.FeedMetadata + * @instance + * @returns {Object.} JSON object + */ + FeedMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeedMetadata + * @function getTypeUrl + * @memberof lazer.FeedMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeedMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/lazer.FeedMetadata"; + }; + + return FeedMetadata; + })(); + + lazer.Feed = (function () { + /** + * Properties of a Feed. + * @memberof lazer + * @interface IFeed + * @property {lazer.IFeedMetadata|null} [metadata] Feed metadata + * @property {google.protobuf.ITimestamp|null} [pendingActivation] Feed pendingActivation + * @property {google.protobuf.ITimestamp|null} [pendingDeactivation] Feed pendingDeactivation + * @property {Array.|null} [perPublisher] Feed perPublisher + */ + + /** + * Constructs a new Feed. + * @memberof lazer + * @classdesc Represents a Feed. + * @implements IFeed + * @constructor + * @param {lazer.IFeed=} [properties] Properties to set + */ + function Feed(properties) { + this.perPublisher = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + } + + /** + * Feed metadata. + * @member {lazer.IFeedMetadata|null|undefined} metadata + * @memberof lazer.Feed + * @instance + */ + Feed.prototype.metadata = null; + + /** + * Feed pendingActivation. + * @member {google.protobuf.ITimestamp|null|undefined} pendingActivation + * @memberof lazer.Feed + * @instance + */ + Feed.prototype.pendingActivation = null; + + /** + * Feed pendingDeactivation. + * @member {google.protobuf.ITimestamp|null|undefined} pendingDeactivation + * @memberof lazer.Feed + * @instance + */ + Feed.prototype.pendingDeactivation = null; + + /** + * Feed perPublisher. + * @member {Array.} perPublisher + * @memberof lazer.Feed + * @instance + */ + Feed.prototype.perPublisher = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Feed _metadata. + * @member {"metadata"|undefined} _metadata + * @memberof lazer.Feed + * @instance + */ + Object.defineProperty(Feed.prototype, "_metadata", { + get: $util.oneOfGetter(($oneOfFields = ["metadata"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Feed _pendingActivation. + * @member {"pendingActivation"|undefined} _pendingActivation + * @memberof lazer.Feed + * @instance + */ + Object.defineProperty(Feed.prototype, "_pendingActivation", { + get: $util.oneOfGetter(($oneOfFields = ["pendingActivation"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Feed _pendingDeactivation. + * @member {"pendingDeactivation"|undefined} _pendingDeactivation + * @memberof lazer.Feed + * @instance + */ + Object.defineProperty(Feed.prototype, "_pendingDeactivation", { + get: $util.oneOfGetter(($oneOfFields = ["pendingDeactivation"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Creates a new Feed instance using the specified properties. + * @function create + * @memberof lazer.Feed + * @static + * @param {lazer.IFeed=} [properties] Properties to set + * @returns {lazer.Feed} Feed instance + */ + Feed.create = function create(properties) { + return new Feed(properties); + }; + + /** + * Encodes the specified Feed message. Does not implicitly {@link lazer.Feed.verify|verify} messages. + * @function encode + * @memberof lazer.Feed + * @static + * @param {lazer.IFeed} message Feed message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Feed.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if ( + message.metadata != null && + Object.hasOwnProperty.call(message, "metadata") + ) + $root.lazer.FeedMetadata.encode( + message.metadata, + writer.uint32(/* id 1, wireType 2 =*/ 10).fork(), + ).ldelim(); + if ( + message.pendingActivation != null && + Object.hasOwnProperty.call(message, "pendingActivation") + ) + $root.google.protobuf.Timestamp.encode( + message.pendingActivation, + writer.uint32(/* id 2, wireType 2 =*/ 18).fork(), + ).ldelim(); + if ( + message.pendingDeactivation != null && + Object.hasOwnProperty.call(message, "pendingDeactivation") + ) + $root.google.protobuf.Timestamp.encode( + message.pendingDeactivation, + writer.uint32(/* id 3, wireType 2 =*/ 26).fork(), + ).ldelim(); + if (message.perPublisher != null && message.perPublisher.length) + for (var i = 0; i < message.perPublisher.length; ++i) + $root.lazer.FeedPublisherState.encode( + message.perPublisher[i], + writer.uint32(/* id 4, wireType 2 =*/ 34).fork(), + ).ldelim(); + return writer; + }; + + /** + * Encodes the specified Feed message, length delimited. Does not implicitly {@link lazer.Feed.verify|verify} messages. + * @function encodeDelimited + * @memberof lazer.Feed + * @static + * @param {lazer.IFeed} message Feed message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Feed.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Feed message from the specified reader or buffer. + * @function decode + * @memberof lazer.Feed + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {lazer.Feed} Feed + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Feed.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, + message = new $root.lazer.Feed(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.metadata = $root.lazer.FeedMetadata.decode( + reader, + reader.uint32(), + ); + break; + } + case 2: { + message.pendingActivation = $root.google.protobuf.Timestamp.decode( + reader, + reader.uint32(), + ); + break; + } + case 3: { + message.pendingDeactivation = + $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.perPublisher && message.perPublisher.length)) + message.perPublisher = []; + message.perPublisher.push( + $root.lazer.FeedPublisherState.decode(reader, reader.uint32()), + ); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Feed message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof lazer.Feed + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {lazer.Feed} Feed + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Feed.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Feed message. + * @function verify + * @memberof lazer.Feed + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Feed.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + properties._metadata = 1; + { + var error = $root.lazer.FeedMetadata.verify(message.metadata); + if (error) return "metadata." + error; + } + } + if ( + message.pendingActivation != null && + message.hasOwnProperty("pendingActivation") + ) { + properties._pendingActivation = 1; + { + var error = $root.google.protobuf.Timestamp.verify( + message.pendingActivation, + ); + if (error) return "pendingActivation." + error; + } + } + if ( + message.pendingDeactivation != null && + message.hasOwnProperty("pendingDeactivation") + ) { + properties._pendingDeactivation = 1; + { + var error = $root.google.protobuf.Timestamp.verify( + message.pendingDeactivation, + ); + if (error) return "pendingDeactivation." + error; + } + } + if ( + message.perPublisher != null && + message.hasOwnProperty("perPublisher") + ) { + if (!Array.isArray(message.perPublisher)) + return "perPublisher: array expected"; + for (var i = 0; i < message.perPublisher.length; ++i) { + var error = $root.lazer.FeedPublisherState.verify( + message.perPublisher[i], + ); + if (error) return "perPublisher." + error; + } + } + return null; + }; + + /** + * Creates a Feed message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof lazer.Feed + * @static + * @param {Object.} object Plain object + * @returns {lazer.Feed} Feed + */ + Feed.fromObject = function fromObject(object) { + if (object instanceof $root.lazer.Feed) return object; + var message = new $root.lazer.Feed(); + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".lazer.Feed.metadata: object expected"); + message.metadata = $root.lazer.FeedMetadata.fromObject(object.metadata); + } + if (object.pendingActivation != null) { + if (typeof object.pendingActivation !== "object") + throw TypeError(".lazer.Feed.pendingActivation: object expected"); + message.pendingActivation = $root.google.protobuf.Timestamp.fromObject( + object.pendingActivation, + ); + } + if (object.pendingDeactivation != null) { + if (typeof object.pendingDeactivation !== "object") + throw TypeError(".lazer.Feed.pendingDeactivation: object expected"); + message.pendingDeactivation = + $root.google.protobuf.Timestamp.fromObject( + object.pendingDeactivation, + ); + } + if (object.perPublisher) { + if (!Array.isArray(object.perPublisher)) + throw TypeError(".lazer.Feed.perPublisher: array expected"); + message.perPublisher = []; + for (var i = 0; i < object.perPublisher.length; ++i) { + if (typeof object.perPublisher[i] !== "object") + throw TypeError(".lazer.Feed.perPublisher: object expected"); + message.perPublisher[i] = $root.lazer.FeedPublisherState.fromObject( + object.perPublisher[i], + ); + } + } + return message; + }; + + /** + * Creates a plain object from a Feed message. Also converts values to other types if specified. + * @function toObject + * @memberof lazer.Feed + * @static + * @param {lazer.Feed} message Feed + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Feed.toObject = function toObject(message, options) { + if (!options) options = {}; + var object = {}; + if (options.arrays || options.defaults) object.perPublisher = []; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + object.metadata = $root.lazer.FeedMetadata.toObject( + message.metadata, + options, + ); + if (options.oneofs) object._metadata = "metadata"; + } + if ( + message.pendingActivation != null && + message.hasOwnProperty("pendingActivation") + ) { + object.pendingActivation = $root.google.protobuf.Timestamp.toObject( + message.pendingActivation, + options, + ); + if (options.oneofs) object._pendingActivation = "pendingActivation"; + } + if ( + message.pendingDeactivation != null && + message.hasOwnProperty("pendingDeactivation") + ) { + object.pendingDeactivation = $root.google.protobuf.Timestamp.toObject( + message.pendingDeactivation, + options, + ); + if (options.oneofs) object._pendingDeactivation = "pendingDeactivation"; + } + if (message.perPublisher && message.perPublisher.length) { + object.perPublisher = []; + for (var j = 0; j < message.perPublisher.length; ++j) + object.perPublisher[j] = $root.lazer.FeedPublisherState.toObject( + message.perPublisher[j], + options, + ); + } + return object; + }; + + /** + * Converts this Feed to JSON. + * @function toJSON + * @memberof lazer.Feed + * @instance + * @returns {Object.} JSON object + */ + Feed.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Feed + * @function getTypeUrl + * @memberof lazer.Feed + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Feed.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/lazer.Feed"; + }; + + return Feed; + })(); + + lazer.FeedPublisherState = (function () { + /** + * Properties of a FeedPublisherState. + * @memberof lazer + * @interface IFeedPublisherState + * @property {number|null} [publisherId] FeedPublisherState publisherId + * @property {google.protobuf.ITimestamp|null} [lastUpdateTimestamp] FeedPublisherState lastUpdateTimestamp + * @property {google.protobuf.ITimestamp|null} [lastPublisherTimestamp] FeedPublisherState lastPublisherTimestamp + * @property {lazer.IFeedData|null} [lastFeedData] FeedPublisherState lastFeedData */ - var lazer = {}; - - lazer.State = (function() { - - /** - * Properties of a State. - * @memberof lazer - * @interface IState - * @property {number|null} [shardId] State shardId - * @property {number|Long|null} [lastSequenceNo] State lastSequenceNo - * @property {google.protobuf.ITimestamp|null} [lastTimestamp] State lastTimestamp - * @property {string|null} [shardName] State shardName - * @property {google.protobuf.IDuration|null} [minRate] State minRate - * @property {Array.|null} [feeds] State feeds - * @property {Array.|null} [publishers] State publishers - */ - - /** - * Constructs a new State. - * @memberof lazer - * @classdesc Represents a State. - * @implements IState - * @constructor - * @param {lazer.IState=} [properties] Properties to set - */ - function State(properties) { - this.feeds = []; - this.publishers = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - /** - * State shardId. - * @member {number|null|undefined} shardId - * @memberof lazer.State - * @instance - */ - State.prototype.shardId = null; - - /** - * State lastSequenceNo. - * @member {number|Long|null|undefined} lastSequenceNo - * @memberof lazer.State - * @instance - */ - State.prototype.lastSequenceNo = null; - - /** - * State lastTimestamp. - * @member {google.protobuf.ITimestamp|null|undefined} lastTimestamp - * @memberof lazer.State - * @instance - */ - State.prototype.lastTimestamp = null; - - /** - * State shardName. - * @member {string|null|undefined} shardName - * @memberof lazer.State - * @instance - */ - State.prototype.shardName = null; - - /** - * State minRate. - * @member {google.protobuf.IDuration|null|undefined} minRate - * @memberof lazer.State - * @instance - */ - State.prototype.minRate = null; - - /** - * State feeds. - * @member {Array.} feeds - * @memberof lazer.State - * @instance - */ - State.prototype.feeds = $util.emptyArray; - - /** - * State publishers. - * @member {Array.} publishers - * @memberof lazer.State - * @instance - */ - State.prototype.publishers = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * State _shardId. - * @member {"shardId"|undefined} _shardId - * @memberof lazer.State - * @instance - */ - Object.defineProperty(State.prototype, "_shardId", { - get: $util.oneOfGetter($oneOfFields = ["shardId"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * State _lastSequenceNo. - * @member {"lastSequenceNo"|undefined} _lastSequenceNo - * @memberof lazer.State - * @instance - */ - Object.defineProperty(State.prototype, "_lastSequenceNo", { - get: $util.oneOfGetter($oneOfFields = ["lastSequenceNo"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * State _lastTimestamp. - * @member {"lastTimestamp"|undefined} _lastTimestamp - * @memberof lazer.State - * @instance - */ - Object.defineProperty(State.prototype, "_lastTimestamp", { - get: $util.oneOfGetter($oneOfFields = ["lastTimestamp"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * State _shardName. - * @member {"shardName"|undefined} _shardName - * @memberof lazer.State - * @instance - */ - Object.defineProperty(State.prototype, "_shardName", { - get: $util.oneOfGetter($oneOfFields = ["shardName"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * State _minRate. - * @member {"minRate"|undefined} _minRate - * @memberof lazer.State - * @instance - */ - Object.defineProperty(State.prototype, "_minRate", { - get: $util.oneOfGetter($oneOfFields = ["minRate"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new State instance using the specified properties. - * @function create - * @memberof lazer.State - * @static - * @param {lazer.IState=} [properties] Properties to set - * @returns {lazer.State} State instance - */ - State.create = function create(properties) { - return new State(properties); - }; - - /** - * Encodes the specified State message. Does not implicitly {@link lazer.State.verify|verify} messages. - * @function encode - * @memberof lazer.State - * @static - * @param {lazer.IState} message State message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - State.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.shardId != null && Object.hasOwnProperty.call(message, "shardId")) - writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.shardId); - if (message.lastSequenceNo != null && Object.hasOwnProperty.call(message, "lastSequenceNo")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.lastSequenceNo); - if (message.lastTimestamp != null && Object.hasOwnProperty.call(message, "lastTimestamp")) - $root.google.protobuf.Timestamp.encode(message.lastTimestamp, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.shardName != null && Object.hasOwnProperty.call(message, "shardName")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.shardName); - if (message.minRate != null && Object.hasOwnProperty.call(message, "minRate")) - $root.google.protobuf.Duration.encode(message.minRate, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.feeds != null && message.feeds.length) - for (var i = 0; i < message.feeds.length; ++i) - $root.lazer.Feed.encode(message.feeds[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.publishers != null && message.publishers.length) - for (var i = 0; i < message.publishers.length; ++i) - $root.lazer.Publisher.encode(message.publishers[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified State message, length delimited. Does not implicitly {@link lazer.State.verify|verify} messages. - * @function encodeDelimited - * @memberof lazer.State - * @static - * @param {lazer.IState} message State message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - State.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a State message from the specified reader or buffer. - * @function decode - * @memberof lazer.State - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {lazer.State} State - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - State.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.lazer.State(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.shardId = reader.uint32(); - break; - } - case 2: { - message.lastSequenceNo = reader.uint64(); - break; - } - case 3: { - message.lastTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.shardName = reader.string(); - break; - } - case 5: { - message.minRate = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 7: { - if (!(message.feeds && message.feeds.length)) - message.feeds = []; - message.feeds.push($root.lazer.Feed.decode(reader, reader.uint32())); - break; - } - case 8: { - if (!(message.publishers && message.publishers.length)) - message.publishers = []; - message.publishers.push($root.lazer.Publisher.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a State message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof lazer.State - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {lazer.State} State - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - State.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a State message. - * @function verify - * @memberof lazer.State - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - State.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.shardId != null && message.hasOwnProperty("shardId")) { - properties._shardId = 1; - if (!$util.isInteger(message.shardId)) - return "shardId: integer expected"; - } - if (message.lastSequenceNo != null && message.hasOwnProperty("lastSequenceNo")) { - properties._lastSequenceNo = 1; - if (!$util.isInteger(message.lastSequenceNo) && !(message.lastSequenceNo && $util.isInteger(message.lastSequenceNo.low) && $util.isInteger(message.lastSequenceNo.high))) - return "lastSequenceNo: integer|Long expected"; - } - if (message.lastTimestamp != null && message.hasOwnProperty("lastTimestamp")) { - properties._lastTimestamp = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.lastTimestamp); - if (error) - return "lastTimestamp." + error; - } - } - if (message.shardName != null && message.hasOwnProperty("shardName")) { - properties._shardName = 1; - if (!$util.isString(message.shardName)) - return "shardName: string expected"; - } - if (message.minRate != null && message.hasOwnProperty("minRate")) { - properties._minRate = 1; - { - var error = $root.google.protobuf.Duration.verify(message.minRate); - if (error) - return "minRate." + error; - } - } - if (message.feeds != null && message.hasOwnProperty("feeds")) { - if (!Array.isArray(message.feeds)) - return "feeds: array expected"; - for (var i = 0; i < message.feeds.length; ++i) { - var error = $root.lazer.Feed.verify(message.feeds[i]); - if (error) - return "feeds." + error; - } - } - if (message.publishers != null && message.hasOwnProperty("publishers")) { - if (!Array.isArray(message.publishers)) - return "publishers: array expected"; - for (var i = 0; i < message.publishers.length; ++i) { - var error = $root.lazer.Publisher.verify(message.publishers[i]); - if (error) - return "publishers." + error; - } - } - return null; - }; - - /** - * Creates a State message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof lazer.State - * @static - * @param {Object.} object Plain object - * @returns {lazer.State} State - */ - State.fromObject = function fromObject(object) { - if (object instanceof $root.lazer.State) - return object; - var message = new $root.lazer.State(); - if (object.shardId != null) - message.shardId = object.shardId >>> 0; - if (object.lastSequenceNo != null) - if ($util.Long) - (message.lastSequenceNo = $util.Long.fromValue(object.lastSequenceNo)).unsigned = true; - else if (typeof object.lastSequenceNo === "string") - message.lastSequenceNo = parseInt(object.lastSequenceNo, 10); - else if (typeof object.lastSequenceNo === "number") - message.lastSequenceNo = object.lastSequenceNo; - else if (typeof object.lastSequenceNo === "object") - message.lastSequenceNo = new $util.LongBits(object.lastSequenceNo.low >>> 0, object.lastSequenceNo.high >>> 0).toNumber(true); - if (object.lastTimestamp != null) { - if (typeof object.lastTimestamp !== "object") - throw TypeError(".lazer.State.lastTimestamp: object expected"); - message.lastTimestamp = $root.google.protobuf.Timestamp.fromObject(object.lastTimestamp); - } - if (object.shardName != null) - message.shardName = String(object.shardName); - if (object.minRate != null) { - if (typeof object.minRate !== "object") - throw TypeError(".lazer.State.minRate: object expected"); - message.minRate = $root.google.protobuf.Duration.fromObject(object.minRate); - } - if (object.feeds) { - if (!Array.isArray(object.feeds)) - throw TypeError(".lazer.State.feeds: array expected"); - message.feeds = []; - for (var i = 0; i < object.feeds.length; ++i) { - if (typeof object.feeds[i] !== "object") - throw TypeError(".lazer.State.feeds: object expected"); - message.feeds[i] = $root.lazer.Feed.fromObject(object.feeds[i]); - } - } - if (object.publishers) { - if (!Array.isArray(object.publishers)) - throw TypeError(".lazer.State.publishers: array expected"); - message.publishers = []; - for (var i = 0; i < object.publishers.length; ++i) { - if (typeof object.publishers[i] !== "object") - throw TypeError(".lazer.State.publishers: object expected"); - message.publishers[i] = $root.lazer.Publisher.fromObject(object.publishers[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a State message. Also converts values to other types if specified. - * @function toObject - * @memberof lazer.State - * @static - * @param {lazer.State} message State - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - State.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.feeds = []; - object.publishers = []; - } - if (message.shardId != null && message.hasOwnProperty("shardId")) { - object.shardId = message.shardId; - if (options.oneofs) - object._shardId = "shardId"; - } - if (message.lastSequenceNo != null && message.hasOwnProperty("lastSequenceNo")) { - if (typeof message.lastSequenceNo === "number") - object.lastSequenceNo = options.longs === String ? String(message.lastSequenceNo) : message.lastSequenceNo; - else - object.lastSequenceNo = options.longs === String ? $util.Long.prototype.toString.call(message.lastSequenceNo) : options.longs === Number ? new $util.LongBits(message.lastSequenceNo.low >>> 0, message.lastSequenceNo.high >>> 0).toNumber(true) : message.lastSequenceNo; - if (options.oneofs) - object._lastSequenceNo = "lastSequenceNo"; - } - if (message.lastTimestamp != null && message.hasOwnProperty("lastTimestamp")) { - object.lastTimestamp = $root.google.protobuf.Timestamp.toObject(message.lastTimestamp, options); - if (options.oneofs) - object._lastTimestamp = "lastTimestamp"; - } - if (message.shardName != null && message.hasOwnProperty("shardName")) { - object.shardName = message.shardName; - if (options.oneofs) - object._shardName = "shardName"; - } - if (message.minRate != null && message.hasOwnProperty("minRate")) { - object.minRate = $root.google.protobuf.Duration.toObject(message.minRate, options); - if (options.oneofs) - object._minRate = "minRate"; - } - if (message.feeds && message.feeds.length) { - object.feeds = []; - for (var j = 0; j < message.feeds.length; ++j) - object.feeds[j] = $root.lazer.Feed.toObject(message.feeds[j], options); - } - if (message.publishers && message.publishers.length) { - object.publishers = []; - for (var j = 0; j < message.publishers.length; ++j) - object.publishers[j] = $root.lazer.Publisher.toObject(message.publishers[j], options); - } - return object; - }; - - /** - * Converts this State to JSON. - * @function toJSON - * @memberof lazer.State - * @instance - * @returns {Object.} JSON object - */ - State.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for State - * @function getTypeUrl - * @memberof lazer.State - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - State.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/lazer.State"; - }; + /** + * Constructs a new FeedPublisherState. + * @memberof lazer + * @classdesc Represents a FeedPublisherState. + * @implements IFeedPublisherState + * @constructor + * @param {lazer.IFeedPublisherState=} [properties] Properties to set + */ + function FeedPublisherState(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + } - return State; - })(); + /** + * FeedPublisherState publisherId. + * @member {number|null|undefined} publisherId + * @memberof lazer.FeedPublisherState + * @instance + */ + FeedPublisherState.prototype.publisherId = null; - lazer.Publisher = (function() { - - /** - * Properties of a Publisher. - * @memberof lazer - * @interface IPublisher - * @property {number|null} [publisherId] Publisher publisherId - * @property {string|null} [name] Publisher name - * @property {Array.|null} [publicKeys] Publisher publicKeys - * @property {boolean|null} [isActive] Publisher isActive - */ - - /** - * Constructs a new Publisher. - * @memberof lazer - * @classdesc Represents a Publisher. - * @implements IPublisher - * @constructor - * @param {lazer.IPublisher=} [properties] Properties to set - */ - function Publisher(properties) { - this.publicKeys = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * FeedPublisherState lastUpdateTimestamp. + * @member {google.protobuf.ITimestamp|null|undefined} lastUpdateTimestamp + * @memberof lazer.FeedPublisherState + * @instance + */ + FeedPublisherState.prototype.lastUpdateTimestamp = null; - /** - * Publisher publisherId. - * @member {number|null|undefined} publisherId - * @memberof lazer.Publisher - * @instance - */ - Publisher.prototype.publisherId = null; - - /** - * Publisher name. - * @member {string|null|undefined} name - * @memberof lazer.Publisher - * @instance - */ - Publisher.prototype.name = null; - - /** - * Publisher publicKeys. - * @member {Array.} publicKeys - * @memberof lazer.Publisher - * @instance - */ - Publisher.prototype.publicKeys = $util.emptyArray; - - /** - * Publisher isActive. - * @member {boolean|null|undefined} isActive - * @memberof lazer.Publisher - * @instance - */ - Publisher.prototype.isActive = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Publisher _publisherId. - * @member {"publisherId"|undefined} _publisherId - * @memberof lazer.Publisher - * @instance - */ - Object.defineProperty(Publisher.prototype, "_publisherId", { - get: $util.oneOfGetter($oneOfFields = ["publisherId"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Publisher _name. - * @member {"name"|undefined} _name - * @memberof lazer.Publisher - * @instance - */ - Object.defineProperty(Publisher.prototype, "_name", { - get: $util.oneOfGetter($oneOfFields = ["name"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Publisher _isActive. - * @member {"isActive"|undefined} _isActive - * @memberof lazer.Publisher - * @instance - */ - Object.defineProperty(Publisher.prototype, "_isActive", { - get: $util.oneOfGetter($oneOfFields = ["isActive"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Publisher instance using the specified properties. - * @function create - * @memberof lazer.Publisher - * @static - * @param {lazer.IPublisher=} [properties] Properties to set - * @returns {lazer.Publisher} Publisher instance - */ - Publisher.create = function create(properties) { - return new Publisher(properties); - }; - - /** - * Encodes the specified Publisher message. Does not implicitly {@link lazer.Publisher.verify|verify} messages. - * @function encode - * @memberof lazer.Publisher - * @static - * @param {lazer.IPublisher} message Publisher message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Publisher.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.publisherId != null && Object.hasOwnProperty.call(message, "publisherId")) - writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.publisherId); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); - if (message.publicKeys != null && message.publicKeys.length) - for (var i = 0; i < message.publicKeys.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.publicKeys[i]); - if (message.isActive != null && Object.hasOwnProperty.call(message, "isActive")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.isActive); - return writer; - }; - - /** - * Encodes the specified Publisher message, length delimited. Does not implicitly {@link lazer.Publisher.verify|verify} messages. - * @function encodeDelimited - * @memberof lazer.Publisher - * @static - * @param {lazer.IPublisher} message Publisher message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Publisher.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Publisher message from the specified reader or buffer. - * @function decode - * @memberof lazer.Publisher - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {lazer.Publisher} Publisher - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Publisher.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.lazer.Publisher(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.publisherId = reader.uint32(); - break; - } - case 2: { - message.name = reader.string(); - break; - } - case 3: { - if (!(message.publicKeys && message.publicKeys.length)) - message.publicKeys = []; - message.publicKeys.push(reader.bytes()); - break; - } - case 4: { - message.isActive = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Publisher message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof lazer.Publisher - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {lazer.Publisher} Publisher - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Publisher.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Publisher message. - * @function verify - * @memberof lazer.Publisher - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Publisher.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.publisherId != null && message.hasOwnProperty("publisherId")) { - properties._publisherId = 1; - if (!$util.isInteger(message.publisherId)) - return "publisherId: integer expected"; - } - if (message.name != null && message.hasOwnProperty("name")) { - properties._name = 1; - if (!$util.isString(message.name)) - return "name: string expected"; - } - if (message.publicKeys != null && message.hasOwnProperty("publicKeys")) { - if (!Array.isArray(message.publicKeys)) - return "publicKeys: array expected"; - for (var i = 0; i < message.publicKeys.length; ++i) - if (!(message.publicKeys[i] && typeof message.publicKeys[i].length === "number" || $util.isString(message.publicKeys[i]))) - return "publicKeys: buffer[] expected"; - } - if (message.isActive != null && message.hasOwnProperty("isActive")) { - properties._isActive = 1; - if (typeof message.isActive !== "boolean") - return "isActive: boolean expected"; - } - return null; - }; - - /** - * Creates a Publisher message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof lazer.Publisher - * @static - * @param {Object.} object Plain object - * @returns {lazer.Publisher} Publisher - */ - Publisher.fromObject = function fromObject(object) { - if (object instanceof $root.lazer.Publisher) - return object; - var message = new $root.lazer.Publisher(); - if (object.publisherId != null) - message.publisherId = object.publisherId >>> 0; - if (object.name != null) - message.name = String(object.name); - if (object.publicKeys) { - if (!Array.isArray(object.publicKeys)) - throw TypeError(".lazer.Publisher.publicKeys: array expected"); - message.publicKeys = []; - for (var i = 0; i < object.publicKeys.length; ++i) - if (typeof object.publicKeys[i] === "string") - $util.base64.decode(object.publicKeys[i], message.publicKeys[i] = $util.newBuffer($util.base64.length(object.publicKeys[i])), 0); - else if (object.publicKeys[i].length >= 0) - message.publicKeys[i] = object.publicKeys[i]; - } - if (object.isActive != null) - message.isActive = Boolean(object.isActive); - return message; - }; - - /** - * Creates a plain object from a Publisher message. Also converts values to other types if specified. - * @function toObject - * @memberof lazer.Publisher - * @static - * @param {lazer.Publisher} message Publisher - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Publisher.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.publicKeys = []; - if (message.publisherId != null && message.hasOwnProperty("publisherId")) { - object.publisherId = message.publisherId; - if (options.oneofs) - object._publisherId = "publisherId"; - } - if (message.name != null && message.hasOwnProperty("name")) { - object.name = message.name; - if (options.oneofs) - object._name = "name"; - } - if (message.publicKeys && message.publicKeys.length) { - object.publicKeys = []; - for (var j = 0; j < message.publicKeys.length; ++j) - object.publicKeys[j] = options.bytes === String ? $util.base64.encode(message.publicKeys[j], 0, message.publicKeys[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.publicKeys[j]) : message.publicKeys[j]; - } - if (message.isActive != null && message.hasOwnProperty("isActive")) { - object.isActive = message.isActive; - if (options.oneofs) - object._isActive = "isActive"; - } - return object; - }; - - /** - * Converts this Publisher to JSON. - * @function toJSON - * @memberof lazer.Publisher - * @instance - * @returns {Object.} JSON object - */ - Publisher.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Publisher - * @function getTypeUrl - * @memberof lazer.Publisher - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Publisher.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/lazer.Publisher"; - }; + /** + * FeedPublisherState lastPublisherTimestamp. + * @member {google.protobuf.ITimestamp|null|undefined} lastPublisherTimestamp + * @memberof lazer.FeedPublisherState + * @instance + */ + FeedPublisherState.prototype.lastPublisherTimestamp = null; - return Publisher; - })(); + /** + * FeedPublisherState lastFeedData. + * @member {lazer.IFeedData|null|undefined} lastFeedData + * @memberof lazer.FeedPublisherState + * @instance + */ + FeedPublisherState.prototype.lastFeedData = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * AssetType enum. - * @name lazer.AssetType - * @enum {number} - * @property {number} CRYPTO=0 CRYPTO value - * @property {number} FUNDING_RATE=1 FUNDING_RATE value - * @property {number} FX=2 FX value - * @property {number} COMMODITY=3 COMMODITY value - * @property {number} NAV=4 NAV value - * @property {number} CRYPTO_INDEX=5 CRYPTO_INDEX value - * @property {number} CRYPTO_REDEMPTION_RATE=6 CRYPTO_REDEMPTION_RATE value - * @property {number} EQUITY=7 EQUITY value - * @property {number} METAL=8 METAL value - * @property {number} RATES=9 RATES value - */ - lazer.AssetType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CRYPTO"] = 0; - values[valuesById[1] = "FUNDING_RATE"] = 1; - values[valuesById[2] = "FX"] = 2; - values[valuesById[3] = "COMMODITY"] = 3; - values[valuesById[4] = "NAV"] = 4; - values[valuesById[5] = "CRYPTO_INDEX"] = 5; - values[valuesById[6] = "CRYPTO_REDEMPTION_RATE"] = 6; - values[valuesById[7] = "EQUITY"] = 7; - values[valuesById[8] = "METAL"] = 8; - values[valuesById[9] = "RATES"] = 9; - return values; - })(); + * FeedPublisherState _publisherId. + * @member {"publisherId"|undefined} _publisherId + * @memberof lazer.FeedPublisherState + * @instance + */ + Object.defineProperty(FeedPublisherState.prototype, "_publisherId", { + get: $util.oneOfGetter(($oneOfFields = ["publisherId"])), + set: $util.oneOfSetter($oneOfFields), + }); - lazer.FeedMetadata = (function() { - - /** - * Properties of a FeedMetadata. - * @memberof lazer - * @interface IFeedMetadata - * @property {number|null} [priceFeedId] FeedMetadata priceFeedId - * @property {string|null} [name] FeedMetadata name - * @property {string|null} [symbol] FeedMetadata symbol - * @property {string|null} [description] FeedMetadata description - * @property {lazer.AssetType|null} [assetType] FeedMetadata assetType - * @property {number|null} [exponent] FeedMetadata exponent - * @property {number|null} [cmcId] FeedMetadata cmcId - * @property {google.protobuf.IDuration|null} [fundingRateInterval] FeedMetadata fundingRateInterval - * @property {number|null} [minPublishers] FeedMetadata minPublishers - * @property {google.protobuf.IDuration|null} [minRate] FeedMetadata minRate - * @property {google.protobuf.IDuration|null} [expiryTime] FeedMetadata expiryTime - * @property {boolean|null} [isActivated] FeedMetadata isActivated - * @property {string|null} [hermesId] FeedMetadata hermesId - * @property {string|null} [quoteCurrency] FeedMetadata quoteCurrency - * @property {string|null} [marketSchedule] FeedMetadata marketSchedule - */ - - /** - * Constructs a new FeedMetadata. - * @memberof lazer - * @classdesc Represents a FeedMetadata. - * @implements IFeedMetadata - * @constructor - * @param {lazer.IFeedMetadata=} [properties] Properties to set - */ - function FeedMetadata(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * FeedPublisherState _lastUpdateTimestamp. + * @member {"lastUpdateTimestamp"|undefined} _lastUpdateTimestamp + * @memberof lazer.FeedPublisherState + * @instance + */ + Object.defineProperty( + FeedPublisherState.prototype, + "_lastUpdateTimestamp", + { + get: $util.oneOfGetter(($oneOfFields = ["lastUpdateTimestamp"])), + set: $util.oneOfSetter($oneOfFields), + }, + ); - /** - * FeedMetadata priceFeedId. - * @member {number|null|undefined} priceFeedId - * @memberof lazer.FeedMetadata - * @instance - */ - FeedMetadata.prototype.priceFeedId = null; - - /** - * FeedMetadata name. - * @member {string|null|undefined} name - * @memberof lazer.FeedMetadata - * @instance - */ - FeedMetadata.prototype.name = null; - - /** - * FeedMetadata symbol. - * @member {string|null|undefined} symbol - * @memberof lazer.FeedMetadata - * @instance - */ - FeedMetadata.prototype.symbol = null; - - /** - * FeedMetadata description. - * @member {string|null|undefined} description - * @memberof lazer.FeedMetadata - * @instance - */ - FeedMetadata.prototype.description = null; - - /** - * FeedMetadata assetType. - * @member {lazer.AssetType|null|undefined} assetType - * @memberof lazer.FeedMetadata - * @instance - */ - FeedMetadata.prototype.assetType = null; - - /** - * FeedMetadata exponent. - * @member {number|null|undefined} exponent - * @memberof lazer.FeedMetadata - * @instance - */ - FeedMetadata.prototype.exponent = null; - - /** - * FeedMetadata cmcId. - * @member {number|null|undefined} cmcId - * @memberof lazer.FeedMetadata - * @instance - */ - FeedMetadata.prototype.cmcId = null; - - /** - * FeedMetadata fundingRateInterval. - * @member {google.protobuf.IDuration|null|undefined} fundingRateInterval - * @memberof lazer.FeedMetadata - * @instance - */ - FeedMetadata.prototype.fundingRateInterval = null; - - /** - * FeedMetadata minPublishers. - * @member {number|null|undefined} minPublishers - * @memberof lazer.FeedMetadata - * @instance - */ - FeedMetadata.prototype.minPublishers = null; - - /** - * FeedMetadata minRate. - * @member {google.protobuf.IDuration|null|undefined} minRate - * @memberof lazer.FeedMetadata - * @instance - */ - FeedMetadata.prototype.minRate = null; - - /** - * FeedMetadata expiryTime. - * @member {google.protobuf.IDuration|null|undefined} expiryTime - * @memberof lazer.FeedMetadata - * @instance - */ - FeedMetadata.prototype.expiryTime = null; - - /** - * FeedMetadata isActivated. - * @member {boolean|null|undefined} isActivated - * @memberof lazer.FeedMetadata - * @instance - */ - FeedMetadata.prototype.isActivated = null; - - /** - * FeedMetadata hermesId. - * @member {string|null|undefined} hermesId - * @memberof lazer.FeedMetadata - * @instance - */ - FeedMetadata.prototype.hermesId = null; - - /** - * FeedMetadata quoteCurrency. - * @member {string|null|undefined} quoteCurrency - * @memberof lazer.FeedMetadata - * @instance - */ - FeedMetadata.prototype.quoteCurrency = null; - - /** - * FeedMetadata marketSchedule. - * @member {string|null|undefined} marketSchedule - * @memberof lazer.FeedMetadata - * @instance - */ - FeedMetadata.prototype.marketSchedule = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * FeedMetadata _priceFeedId. - * @member {"priceFeedId"|undefined} _priceFeedId - * @memberof lazer.FeedMetadata - * @instance - */ - Object.defineProperty(FeedMetadata.prototype, "_priceFeedId", { - get: $util.oneOfGetter($oneOfFields = ["priceFeedId"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * FeedMetadata _name. - * @member {"name"|undefined} _name - * @memberof lazer.FeedMetadata - * @instance - */ - Object.defineProperty(FeedMetadata.prototype, "_name", { - get: $util.oneOfGetter($oneOfFields = ["name"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * FeedMetadata _symbol. - * @member {"symbol"|undefined} _symbol - * @memberof lazer.FeedMetadata - * @instance - */ - Object.defineProperty(FeedMetadata.prototype, "_symbol", { - get: $util.oneOfGetter($oneOfFields = ["symbol"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * FeedMetadata _description. - * @member {"description"|undefined} _description - * @memberof lazer.FeedMetadata - * @instance - */ - Object.defineProperty(FeedMetadata.prototype, "_description", { - get: $util.oneOfGetter($oneOfFields = ["description"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * FeedMetadata _assetType. - * @member {"assetType"|undefined} _assetType - * @memberof lazer.FeedMetadata - * @instance - */ - Object.defineProperty(FeedMetadata.prototype, "_assetType", { - get: $util.oneOfGetter($oneOfFields = ["assetType"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * FeedMetadata _exponent. - * @member {"exponent"|undefined} _exponent - * @memberof lazer.FeedMetadata - * @instance - */ - Object.defineProperty(FeedMetadata.prototype, "_exponent", { - get: $util.oneOfGetter($oneOfFields = ["exponent"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * FeedMetadata _cmcId. - * @member {"cmcId"|undefined} _cmcId - * @memberof lazer.FeedMetadata - * @instance - */ - Object.defineProperty(FeedMetadata.prototype, "_cmcId", { - get: $util.oneOfGetter($oneOfFields = ["cmcId"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * FeedMetadata _fundingRateInterval. - * @member {"fundingRateInterval"|undefined} _fundingRateInterval - * @memberof lazer.FeedMetadata - * @instance - */ - Object.defineProperty(FeedMetadata.prototype, "_fundingRateInterval", { - get: $util.oneOfGetter($oneOfFields = ["fundingRateInterval"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * FeedMetadata _minPublishers. - * @member {"minPublishers"|undefined} _minPublishers - * @memberof lazer.FeedMetadata - * @instance - */ - Object.defineProperty(FeedMetadata.prototype, "_minPublishers", { - get: $util.oneOfGetter($oneOfFields = ["minPublishers"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * FeedMetadata _minRate. - * @member {"minRate"|undefined} _minRate - * @memberof lazer.FeedMetadata - * @instance - */ - Object.defineProperty(FeedMetadata.prototype, "_minRate", { - get: $util.oneOfGetter($oneOfFields = ["minRate"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * FeedMetadata _expiryTime. - * @member {"expiryTime"|undefined} _expiryTime - * @memberof lazer.FeedMetadata - * @instance - */ - Object.defineProperty(FeedMetadata.prototype, "_expiryTime", { - get: $util.oneOfGetter($oneOfFields = ["expiryTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * FeedMetadata _isActivated. - * @member {"isActivated"|undefined} _isActivated - * @memberof lazer.FeedMetadata - * @instance - */ - Object.defineProperty(FeedMetadata.prototype, "_isActivated", { - get: $util.oneOfGetter($oneOfFields = ["isActivated"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * FeedMetadata _hermesId. - * @member {"hermesId"|undefined} _hermesId - * @memberof lazer.FeedMetadata - * @instance - */ - Object.defineProperty(FeedMetadata.prototype, "_hermesId", { - get: $util.oneOfGetter($oneOfFields = ["hermesId"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * FeedMetadata _quoteCurrency. - * @member {"quoteCurrency"|undefined} _quoteCurrency - * @memberof lazer.FeedMetadata - * @instance - */ - Object.defineProperty(FeedMetadata.prototype, "_quoteCurrency", { - get: $util.oneOfGetter($oneOfFields = ["quoteCurrency"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * FeedMetadata _marketSchedule. - * @member {"marketSchedule"|undefined} _marketSchedule - * @memberof lazer.FeedMetadata - * @instance - */ - Object.defineProperty(FeedMetadata.prototype, "_marketSchedule", { - get: $util.oneOfGetter($oneOfFields = ["marketSchedule"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new FeedMetadata instance using the specified properties. - * @function create - * @memberof lazer.FeedMetadata - * @static - * @param {lazer.IFeedMetadata=} [properties] Properties to set - * @returns {lazer.FeedMetadata} FeedMetadata instance - */ - FeedMetadata.create = function create(properties) { - return new FeedMetadata(properties); - }; - - /** - * Encodes the specified FeedMetadata message. Does not implicitly {@link lazer.FeedMetadata.verify|verify} messages. - * @function encode - * @memberof lazer.FeedMetadata - * @static - * @param {lazer.IFeedMetadata} message FeedMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeedMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.priceFeedId != null && Object.hasOwnProperty.call(message, "priceFeedId")) - writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.priceFeedId); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); - if (message.symbol != null && Object.hasOwnProperty.call(message, "symbol")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.symbol); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.description); - if (message.assetType != null && Object.hasOwnProperty.call(message, "assetType")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.assetType); - if (message.exponent != null && Object.hasOwnProperty.call(message, "exponent")) - writer.uint32(/* id 6, wireType 0 =*/48).sint32(message.exponent); - if (message.cmcId != null && Object.hasOwnProperty.call(message, "cmcId")) - writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.cmcId); - if (message.fundingRateInterval != null && Object.hasOwnProperty.call(message, "fundingRateInterval")) - $root.google.protobuf.Duration.encode(message.fundingRateInterval, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.minPublishers != null && Object.hasOwnProperty.call(message, "minPublishers")) - writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.minPublishers); - if (message.minRate != null && Object.hasOwnProperty.call(message, "minRate")) - $root.google.protobuf.Duration.encode(message.minRate, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.expiryTime != null && Object.hasOwnProperty.call(message, "expiryTime")) - $root.google.protobuf.Duration.encode(message.expiryTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.isActivated != null && Object.hasOwnProperty.call(message, "isActivated")) - writer.uint32(/* id 12, wireType 0 =*/96).bool(message.isActivated); - if (message.hermesId != null && Object.hasOwnProperty.call(message, "hermesId")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.hermesId); - if (message.quoteCurrency != null && Object.hasOwnProperty.call(message, "quoteCurrency")) - writer.uint32(/* id 14, wireType 2 =*/114).string(message.quoteCurrency); - if (message.marketSchedule != null && Object.hasOwnProperty.call(message, "marketSchedule")) - writer.uint32(/* id 15, wireType 2 =*/122).string(message.marketSchedule); - return writer; - }; - - /** - * Encodes the specified FeedMetadata message, length delimited. Does not implicitly {@link lazer.FeedMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof lazer.FeedMetadata - * @static - * @param {lazer.IFeedMetadata} message FeedMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeedMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FeedMetadata message from the specified reader or buffer. - * @function decode - * @memberof lazer.FeedMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {lazer.FeedMetadata} FeedMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeedMetadata.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.lazer.FeedMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.priceFeedId = reader.uint32(); - break; - } - case 2: { - message.name = reader.string(); - break; - } - case 3: { - message.symbol = reader.string(); - break; - } - case 4: { - message.description = reader.string(); - break; - } - case 5: { - message.assetType = reader.int32(); - break; - } - case 6: { - message.exponent = reader.sint32(); - break; - } - case 7: { - message.cmcId = reader.uint32(); - break; - } - case 8: { - message.fundingRateInterval = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 9: { - message.minPublishers = reader.uint32(); - break; - } - case 10: { - message.minRate = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 11: { - message.expiryTime = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 12: { - message.isActivated = reader.bool(); - break; - } - case 13: { - message.hermesId = reader.string(); - break; - } - case 14: { - message.quoteCurrency = reader.string(); - break; - } - case 15: { - message.marketSchedule = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FeedMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof lazer.FeedMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {lazer.FeedMetadata} FeedMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeedMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FeedMetadata message. - * @function verify - * @memberof lazer.FeedMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FeedMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.priceFeedId != null && message.hasOwnProperty("priceFeedId")) { - properties._priceFeedId = 1; - if (!$util.isInteger(message.priceFeedId)) - return "priceFeedId: integer expected"; - } - if (message.name != null && message.hasOwnProperty("name")) { - properties._name = 1; - if (!$util.isString(message.name)) - return "name: string expected"; - } - if (message.symbol != null && message.hasOwnProperty("symbol")) { - properties._symbol = 1; - if (!$util.isString(message.symbol)) - return "symbol: string expected"; - } - if (message.description != null && message.hasOwnProperty("description")) { - properties._description = 1; - if (!$util.isString(message.description)) - return "description: string expected"; - } - if (message.assetType != null && message.hasOwnProperty("assetType")) { - properties._assetType = 1; - switch (message.assetType) { - default: - return "assetType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - break; - } - } - if (message.exponent != null && message.hasOwnProperty("exponent")) { - properties._exponent = 1; - if (!$util.isInteger(message.exponent)) - return "exponent: integer expected"; - } - if (message.cmcId != null && message.hasOwnProperty("cmcId")) { - properties._cmcId = 1; - if (!$util.isInteger(message.cmcId)) - return "cmcId: integer expected"; - } - if (message.fundingRateInterval != null && message.hasOwnProperty("fundingRateInterval")) { - properties._fundingRateInterval = 1; - { - var error = $root.google.protobuf.Duration.verify(message.fundingRateInterval); - if (error) - return "fundingRateInterval." + error; - } - } - if (message.minPublishers != null && message.hasOwnProperty("minPublishers")) { - properties._minPublishers = 1; - if (!$util.isInteger(message.minPublishers)) - return "minPublishers: integer expected"; - } - if (message.minRate != null && message.hasOwnProperty("minRate")) { - properties._minRate = 1; - { - var error = $root.google.protobuf.Duration.verify(message.minRate); - if (error) - return "minRate." + error; - } - } - if (message.expiryTime != null && message.hasOwnProperty("expiryTime")) { - properties._expiryTime = 1; - { - var error = $root.google.protobuf.Duration.verify(message.expiryTime); - if (error) - return "expiryTime." + error; - } - } - if (message.isActivated != null && message.hasOwnProperty("isActivated")) { - properties._isActivated = 1; - if (typeof message.isActivated !== "boolean") - return "isActivated: boolean expected"; - } - if (message.hermesId != null && message.hasOwnProperty("hermesId")) { - properties._hermesId = 1; - if (!$util.isString(message.hermesId)) - return "hermesId: string expected"; - } - if (message.quoteCurrency != null && message.hasOwnProperty("quoteCurrency")) { - properties._quoteCurrency = 1; - if (!$util.isString(message.quoteCurrency)) - return "quoteCurrency: string expected"; - } - if (message.marketSchedule != null && message.hasOwnProperty("marketSchedule")) { - properties._marketSchedule = 1; - if (!$util.isString(message.marketSchedule)) - return "marketSchedule: string expected"; - } - return null; - }; - - /** - * Creates a FeedMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof lazer.FeedMetadata - * @static - * @param {Object.} object Plain object - * @returns {lazer.FeedMetadata} FeedMetadata - */ - FeedMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.lazer.FeedMetadata) - return object; - var message = new $root.lazer.FeedMetadata(); - if (object.priceFeedId != null) - message.priceFeedId = object.priceFeedId >>> 0; - if (object.name != null) - message.name = String(object.name); - if (object.symbol != null) - message.symbol = String(object.symbol); - if (object.description != null) - message.description = String(object.description); - switch (object.assetType) { - default: - if (typeof object.assetType === "number") { - message.assetType = object.assetType; - break; - } - break; - case "CRYPTO": - case 0: - message.assetType = 0; - break; - case "FUNDING_RATE": - case 1: - message.assetType = 1; - break; - case "FX": - case 2: - message.assetType = 2; - break; - case "COMMODITY": - case 3: - message.assetType = 3; - break; - case "NAV": - case 4: - message.assetType = 4; - break; - case "CRYPTO_INDEX": - case 5: - message.assetType = 5; - break; - case "CRYPTO_REDEMPTION_RATE": - case 6: - message.assetType = 6; - break; - case "EQUITY": - case 7: - message.assetType = 7; - break; - case "METAL": - case 8: - message.assetType = 8; - break; - case "RATES": - case 9: - message.assetType = 9; - break; - } - if (object.exponent != null) - message.exponent = object.exponent | 0; - if (object.cmcId != null) - message.cmcId = object.cmcId >>> 0; - if (object.fundingRateInterval != null) { - if (typeof object.fundingRateInterval !== "object") - throw TypeError(".lazer.FeedMetadata.fundingRateInterval: object expected"); - message.fundingRateInterval = $root.google.protobuf.Duration.fromObject(object.fundingRateInterval); - } - if (object.minPublishers != null) - message.minPublishers = object.minPublishers >>> 0; - if (object.minRate != null) { - if (typeof object.minRate !== "object") - throw TypeError(".lazer.FeedMetadata.minRate: object expected"); - message.minRate = $root.google.protobuf.Duration.fromObject(object.minRate); - } - if (object.expiryTime != null) { - if (typeof object.expiryTime !== "object") - throw TypeError(".lazer.FeedMetadata.expiryTime: object expected"); - message.expiryTime = $root.google.protobuf.Duration.fromObject(object.expiryTime); - } - if (object.isActivated != null) - message.isActivated = Boolean(object.isActivated); - if (object.hermesId != null) - message.hermesId = String(object.hermesId); - if (object.quoteCurrency != null) - message.quoteCurrency = String(object.quoteCurrency); - if (object.marketSchedule != null) - message.marketSchedule = String(object.marketSchedule); - return message; - }; - - /** - * Creates a plain object from a FeedMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof lazer.FeedMetadata - * @static - * @param {lazer.FeedMetadata} message FeedMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FeedMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.priceFeedId != null && message.hasOwnProperty("priceFeedId")) { - object.priceFeedId = message.priceFeedId; - if (options.oneofs) - object._priceFeedId = "priceFeedId"; - } - if (message.name != null && message.hasOwnProperty("name")) { - object.name = message.name; - if (options.oneofs) - object._name = "name"; - } - if (message.symbol != null && message.hasOwnProperty("symbol")) { - object.symbol = message.symbol; - if (options.oneofs) - object._symbol = "symbol"; - } - if (message.description != null && message.hasOwnProperty("description")) { - object.description = message.description; - if (options.oneofs) - object._description = "description"; - } - if (message.assetType != null && message.hasOwnProperty("assetType")) { - object.assetType = options.enums === String ? $root.lazer.AssetType[message.assetType] === undefined ? message.assetType : $root.lazer.AssetType[message.assetType] : message.assetType; - if (options.oneofs) - object._assetType = "assetType"; - } - if (message.exponent != null && message.hasOwnProperty("exponent")) { - object.exponent = message.exponent; - if (options.oneofs) - object._exponent = "exponent"; - } - if (message.cmcId != null && message.hasOwnProperty("cmcId")) { - object.cmcId = message.cmcId; - if (options.oneofs) - object._cmcId = "cmcId"; - } - if (message.fundingRateInterval != null && message.hasOwnProperty("fundingRateInterval")) { - object.fundingRateInterval = $root.google.protobuf.Duration.toObject(message.fundingRateInterval, options); - if (options.oneofs) - object._fundingRateInterval = "fundingRateInterval"; - } - if (message.minPublishers != null && message.hasOwnProperty("minPublishers")) { - object.minPublishers = message.minPublishers; - if (options.oneofs) - object._minPublishers = "minPublishers"; - } - if (message.minRate != null && message.hasOwnProperty("minRate")) { - object.minRate = $root.google.protobuf.Duration.toObject(message.minRate, options); - if (options.oneofs) - object._minRate = "minRate"; - } - if (message.expiryTime != null && message.hasOwnProperty("expiryTime")) { - object.expiryTime = $root.google.protobuf.Duration.toObject(message.expiryTime, options); - if (options.oneofs) - object._expiryTime = "expiryTime"; - } - if (message.isActivated != null && message.hasOwnProperty("isActivated")) { - object.isActivated = message.isActivated; - if (options.oneofs) - object._isActivated = "isActivated"; - } - if (message.hermesId != null && message.hasOwnProperty("hermesId")) { - object.hermesId = message.hermesId; - if (options.oneofs) - object._hermesId = "hermesId"; - } - if (message.quoteCurrency != null && message.hasOwnProperty("quoteCurrency")) { - object.quoteCurrency = message.quoteCurrency; - if (options.oneofs) - object._quoteCurrency = "quoteCurrency"; - } - if (message.marketSchedule != null && message.hasOwnProperty("marketSchedule")) { - object.marketSchedule = message.marketSchedule; - if (options.oneofs) - object._marketSchedule = "marketSchedule"; - } - return object; - }; - - /** - * Converts this FeedMetadata to JSON. - * @function toJSON - * @memberof lazer.FeedMetadata - * @instance - * @returns {Object.} JSON object - */ - FeedMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FeedMetadata - * @function getTypeUrl - * @memberof lazer.FeedMetadata - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FeedMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/lazer.FeedMetadata"; - }; + /** + * FeedPublisherState _lastPublisherTimestamp. + * @member {"lastPublisherTimestamp"|undefined} _lastPublisherTimestamp + * @memberof lazer.FeedPublisherState + * @instance + */ + Object.defineProperty( + FeedPublisherState.prototype, + "_lastPublisherTimestamp", + { + get: $util.oneOfGetter(($oneOfFields = ["lastPublisherTimestamp"])), + set: $util.oneOfSetter($oneOfFields), + }, + ); - return FeedMetadata; - })(); + /** + * FeedPublisherState _lastFeedData. + * @member {"lastFeedData"|undefined} _lastFeedData + * @memberof lazer.FeedPublisherState + * @instance + */ + Object.defineProperty(FeedPublisherState.prototype, "_lastFeedData", { + get: $util.oneOfGetter(($oneOfFields = ["lastFeedData"])), + set: $util.oneOfSetter($oneOfFields), + }); - lazer.Feed = (function() { - - /** - * Properties of a Feed. - * @memberof lazer - * @interface IFeed - * @property {lazer.IFeedMetadata|null} [metadata] Feed metadata - * @property {google.protobuf.ITimestamp|null} [pendingActivation] Feed pendingActivation - * @property {google.protobuf.ITimestamp|null} [pendingDeactivation] Feed pendingDeactivation - * @property {Array.|null} [perPublisher] Feed perPublisher - */ - - /** - * Constructs a new Feed. - * @memberof lazer - * @classdesc Represents a Feed. - * @implements IFeed - * @constructor - * @param {lazer.IFeed=} [properties] Properties to set - */ - function Feed(properties) { - this.perPublisher = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Creates a new FeedPublisherState instance using the specified properties. + * @function create + * @memberof lazer.FeedPublisherState + * @static + * @param {lazer.IFeedPublisherState=} [properties] Properties to set + * @returns {lazer.FeedPublisherState} FeedPublisherState instance + */ + FeedPublisherState.create = function create(properties) { + return new FeedPublisherState(properties); + }; - /** - * Feed metadata. - * @member {lazer.IFeedMetadata|null|undefined} metadata - * @memberof lazer.Feed - * @instance - */ - Feed.prototype.metadata = null; - - /** - * Feed pendingActivation. - * @member {google.protobuf.ITimestamp|null|undefined} pendingActivation - * @memberof lazer.Feed - * @instance - */ - Feed.prototype.pendingActivation = null; - - /** - * Feed pendingDeactivation. - * @member {google.protobuf.ITimestamp|null|undefined} pendingDeactivation - * @memberof lazer.Feed - * @instance - */ - Feed.prototype.pendingDeactivation = null; - - /** - * Feed perPublisher. - * @member {Array.} perPublisher - * @memberof lazer.Feed - * @instance - */ - Feed.prototype.perPublisher = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Feed _metadata. - * @member {"metadata"|undefined} _metadata - * @memberof lazer.Feed - * @instance - */ - Object.defineProperty(Feed.prototype, "_metadata", { - get: $util.oneOfGetter($oneOfFields = ["metadata"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Feed _pendingActivation. - * @member {"pendingActivation"|undefined} _pendingActivation - * @memberof lazer.Feed - * @instance - */ - Object.defineProperty(Feed.prototype, "_pendingActivation", { - get: $util.oneOfGetter($oneOfFields = ["pendingActivation"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Feed _pendingDeactivation. - * @member {"pendingDeactivation"|undefined} _pendingDeactivation - * @memberof lazer.Feed - * @instance - */ - Object.defineProperty(Feed.prototype, "_pendingDeactivation", { - get: $util.oneOfGetter($oneOfFields = ["pendingDeactivation"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Feed instance using the specified properties. - * @function create - * @memberof lazer.Feed - * @static - * @param {lazer.IFeed=} [properties] Properties to set - * @returns {lazer.Feed} Feed instance - */ - Feed.create = function create(properties) { - return new Feed(properties); - }; - - /** - * Encodes the specified Feed message. Does not implicitly {@link lazer.Feed.verify|verify} messages. - * @function encode - * @memberof lazer.Feed - * @static - * @param {lazer.IFeed} message Feed message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Feed.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.lazer.FeedMetadata.encode(message.metadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.pendingActivation != null && Object.hasOwnProperty.call(message, "pendingActivation")) - $root.google.protobuf.Timestamp.encode(message.pendingActivation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.pendingDeactivation != null && Object.hasOwnProperty.call(message, "pendingDeactivation")) - $root.google.protobuf.Timestamp.encode(message.pendingDeactivation, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.perPublisher != null && message.perPublisher.length) - for (var i = 0; i < message.perPublisher.length; ++i) - $root.lazer.FeedPublisherState.encode(message.perPublisher[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Feed message, length delimited. Does not implicitly {@link lazer.Feed.verify|verify} messages. - * @function encodeDelimited - * @memberof lazer.Feed - * @static - * @param {lazer.IFeed} message Feed message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Feed.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Feed message from the specified reader or buffer. - * @function decode - * @memberof lazer.Feed - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {lazer.Feed} Feed - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Feed.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.lazer.Feed(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.metadata = $root.lazer.FeedMetadata.decode(reader, reader.uint32()); - break; - } - case 2: { - message.pendingActivation = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.pendingDeactivation = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - if (!(message.perPublisher && message.perPublisher.length)) - message.perPublisher = []; - message.perPublisher.push($root.lazer.FeedPublisherState.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Feed message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof lazer.Feed - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {lazer.Feed} Feed - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Feed.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Feed message. - * @function verify - * @memberof lazer.Feed - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Feed.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.metadata != null && message.hasOwnProperty("metadata")) { - properties._metadata = 1; - { - var error = $root.lazer.FeedMetadata.verify(message.metadata); - if (error) - return "metadata." + error; - } - } - if (message.pendingActivation != null && message.hasOwnProperty("pendingActivation")) { - properties._pendingActivation = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.pendingActivation); - if (error) - return "pendingActivation." + error; - } - } - if (message.pendingDeactivation != null && message.hasOwnProperty("pendingDeactivation")) { - properties._pendingDeactivation = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.pendingDeactivation); - if (error) - return "pendingDeactivation." + error; - } - } - if (message.perPublisher != null && message.hasOwnProperty("perPublisher")) { - if (!Array.isArray(message.perPublisher)) - return "perPublisher: array expected"; - for (var i = 0; i < message.perPublisher.length; ++i) { - var error = $root.lazer.FeedPublisherState.verify(message.perPublisher[i]); - if (error) - return "perPublisher." + error; - } - } - return null; - }; - - /** - * Creates a Feed message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof lazer.Feed - * @static - * @param {Object.} object Plain object - * @returns {lazer.Feed} Feed - */ - Feed.fromObject = function fromObject(object) { - if (object instanceof $root.lazer.Feed) - return object; - var message = new $root.lazer.Feed(); - if (object.metadata != null) { - if (typeof object.metadata !== "object") - throw TypeError(".lazer.Feed.metadata: object expected"); - message.metadata = $root.lazer.FeedMetadata.fromObject(object.metadata); - } - if (object.pendingActivation != null) { - if (typeof object.pendingActivation !== "object") - throw TypeError(".lazer.Feed.pendingActivation: object expected"); - message.pendingActivation = $root.google.protobuf.Timestamp.fromObject(object.pendingActivation); - } - if (object.pendingDeactivation != null) { - if (typeof object.pendingDeactivation !== "object") - throw TypeError(".lazer.Feed.pendingDeactivation: object expected"); - message.pendingDeactivation = $root.google.protobuf.Timestamp.fromObject(object.pendingDeactivation); - } - if (object.perPublisher) { - if (!Array.isArray(object.perPublisher)) - throw TypeError(".lazer.Feed.perPublisher: array expected"); - message.perPublisher = []; - for (var i = 0; i < object.perPublisher.length; ++i) { - if (typeof object.perPublisher[i] !== "object") - throw TypeError(".lazer.Feed.perPublisher: object expected"); - message.perPublisher[i] = $root.lazer.FeedPublisherState.fromObject(object.perPublisher[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Feed message. Also converts values to other types if specified. - * @function toObject - * @memberof lazer.Feed - * @static - * @param {lazer.Feed} message Feed - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Feed.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.perPublisher = []; - if (message.metadata != null && message.hasOwnProperty("metadata")) { - object.metadata = $root.lazer.FeedMetadata.toObject(message.metadata, options); - if (options.oneofs) - object._metadata = "metadata"; - } - if (message.pendingActivation != null && message.hasOwnProperty("pendingActivation")) { - object.pendingActivation = $root.google.protobuf.Timestamp.toObject(message.pendingActivation, options); - if (options.oneofs) - object._pendingActivation = "pendingActivation"; - } - if (message.pendingDeactivation != null && message.hasOwnProperty("pendingDeactivation")) { - object.pendingDeactivation = $root.google.protobuf.Timestamp.toObject(message.pendingDeactivation, options); - if (options.oneofs) - object._pendingDeactivation = "pendingDeactivation"; - } - if (message.perPublisher && message.perPublisher.length) { - object.perPublisher = []; - for (var j = 0; j < message.perPublisher.length; ++j) - object.perPublisher[j] = $root.lazer.FeedPublisherState.toObject(message.perPublisher[j], options); - } - return object; - }; - - /** - * Converts this Feed to JSON. - * @function toJSON - * @memberof lazer.Feed - * @instance - * @returns {Object.} JSON object - */ - Feed.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Feed - * @function getTypeUrl - * @memberof lazer.Feed - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Feed.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/lazer.Feed"; - }; + /** + * Encodes the specified FeedPublisherState message. Does not implicitly {@link lazer.FeedPublisherState.verify|verify} messages. + * @function encode + * @memberof lazer.FeedPublisherState + * @static + * @param {lazer.IFeedPublisherState} message FeedPublisherState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeedPublisherState.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if ( + message.publisherId != null && + Object.hasOwnProperty.call(message, "publisherId") + ) + writer.uint32(/* id 1, wireType 0 =*/ 8).uint32(message.publisherId); + if ( + message.lastUpdateTimestamp != null && + Object.hasOwnProperty.call(message, "lastUpdateTimestamp") + ) + $root.google.protobuf.Timestamp.encode( + message.lastUpdateTimestamp, + writer.uint32(/* id 2, wireType 2 =*/ 18).fork(), + ).ldelim(); + if ( + message.lastPublisherTimestamp != null && + Object.hasOwnProperty.call(message, "lastPublisherTimestamp") + ) + $root.google.protobuf.Timestamp.encode( + message.lastPublisherTimestamp, + writer.uint32(/* id 3, wireType 2 =*/ 26).fork(), + ).ldelim(); + if ( + message.lastFeedData != null && + Object.hasOwnProperty.call(message, "lastFeedData") + ) + $root.lazer.FeedData.encode( + message.lastFeedData, + writer.uint32(/* id 4, wireType 2 =*/ 34).fork(), + ).ldelim(); + return writer; + }; - return Feed; - })(); + /** + * Encodes the specified FeedPublisherState message, length delimited. Does not implicitly {@link lazer.FeedPublisherState.verify|verify} messages. + * @function encodeDelimited + * @memberof lazer.FeedPublisherState + * @static + * @param {lazer.IFeedPublisherState} message FeedPublisherState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeedPublisherState.encodeDelimited = function encodeDelimited( + message, + writer, + ) { + return this.encode(message, writer).ldelim(); + }; - lazer.FeedPublisherState = (function() { - - /** - * Properties of a FeedPublisherState. - * @memberof lazer - * @interface IFeedPublisherState - * @property {number|null} [publisherId] FeedPublisherState publisherId - * @property {google.protobuf.ITimestamp|null} [lastUpdateTimestamp] FeedPublisherState lastUpdateTimestamp - * @property {google.protobuf.ITimestamp|null} [lastPublisherTimestamp] FeedPublisherState lastPublisherTimestamp - * @property {lazer.IFeedData|null} [lastFeedData] FeedPublisherState lastFeedData - */ - - /** - * Constructs a new FeedPublisherState. - * @memberof lazer - * @classdesc Represents a FeedPublisherState. - * @implements IFeedPublisherState - * @constructor - * @param {lazer.IFeedPublisherState=} [properties] Properties to set - */ - function FeedPublisherState(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Decodes a FeedPublisherState message from the specified reader or buffer. + * @function decode + * @memberof lazer.FeedPublisherState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {lazer.FeedPublisherState} FeedPublisherState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeedPublisherState.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, + message = new $root.lazer.FeedPublisherState(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.publisherId = reader.uint32(); + break; + } + case 2: { + message.lastUpdateTimestamp = + $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.lastPublisherTimestamp = + $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.lastFeedData = $root.lazer.FeedData.decode( + reader, + reader.uint32(), + ); + break; + } + default: + reader.skipType(tag & 7); + break; } + } + return message; + }; - /** - * FeedPublisherState publisherId. - * @member {number|null|undefined} publisherId - * @memberof lazer.FeedPublisherState - * @instance - */ - FeedPublisherState.prototype.publisherId = null; - - /** - * FeedPublisherState lastUpdateTimestamp. - * @member {google.protobuf.ITimestamp|null|undefined} lastUpdateTimestamp - * @memberof lazer.FeedPublisherState - * @instance - */ - FeedPublisherState.prototype.lastUpdateTimestamp = null; - - /** - * FeedPublisherState lastPublisherTimestamp. - * @member {google.protobuf.ITimestamp|null|undefined} lastPublisherTimestamp - * @memberof lazer.FeedPublisherState - * @instance - */ - FeedPublisherState.prototype.lastPublisherTimestamp = null; - - /** - * FeedPublisherState lastFeedData. - * @member {lazer.IFeedData|null|undefined} lastFeedData - * @memberof lazer.FeedPublisherState - * @instance - */ - FeedPublisherState.prototype.lastFeedData = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * FeedPublisherState _publisherId. - * @member {"publisherId"|undefined} _publisherId - * @memberof lazer.FeedPublisherState - * @instance - */ - Object.defineProperty(FeedPublisherState.prototype, "_publisherId", { - get: $util.oneOfGetter($oneOfFields = ["publisherId"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * FeedPublisherState _lastUpdateTimestamp. - * @member {"lastUpdateTimestamp"|undefined} _lastUpdateTimestamp - * @memberof lazer.FeedPublisherState - * @instance - */ - Object.defineProperty(FeedPublisherState.prototype, "_lastUpdateTimestamp", { - get: $util.oneOfGetter($oneOfFields = ["lastUpdateTimestamp"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * FeedPublisherState _lastPublisherTimestamp. - * @member {"lastPublisherTimestamp"|undefined} _lastPublisherTimestamp - * @memberof lazer.FeedPublisherState - * @instance - */ - Object.defineProperty(FeedPublisherState.prototype, "_lastPublisherTimestamp", { - get: $util.oneOfGetter($oneOfFields = ["lastPublisherTimestamp"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * FeedPublisherState _lastFeedData. - * @member {"lastFeedData"|undefined} _lastFeedData - * @memberof lazer.FeedPublisherState - * @instance - */ - Object.defineProperty(FeedPublisherState.prototype, "_lastFeedData", { - get: $util.oneOfGetter($oneOfFields = ["lastFeedData"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new FeedPublisherState instance using the specified properties. - * @function create - * @memberof lazer.FeedPublisherState - * @static - * @param {lazer.IFeedPublisherState=} [properties] Properties to set - * @returns {lazer.FeedPublisherState} FeedPublisherState instance - */ - FeedPublisherState.create = function create(properties) { - return new FeedPublisherState(properties); - }; - - /** - * Encodes the specified FeedPublisherState message. Does not implicitly {@link lazer.FeedPublisherState.verify|verify} messages. - * @function encode - * @memberof lazer.FeedPublisherState - * @static - * @param {lazer.IFeedPublisherState} message FeedPublisherState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeedPublisherState.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.publisherId != null && Object.hasOwnProperty.call(message, "publisherId")) - writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.publisherId); - if (message.lastUpdateTimestamp != null && Object.hasOwnProperty.call(message, "lastUpdateTimestamp")) - $root.google.protobuf.Timestamp.encode(message.lastUpdateTimestamp, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.lastPublisherTimestamp != null && Object.hasOwnProperty.call(message, "lastPublisherTimestamp")) - $root.google.protobuf.Timestamp.encode(message.lastPublisherTimestamp, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.lastFeedData != null && Object.hasOwnProperty.call(message, "lastFeedData")) - $root.lazer.FeedData.encode(message.lastFeedData, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FeedPublisherState message, length delimited. Does not implicitly {@link lazer.FeedPublisherState.verify|verify} messages. - * @function encodeDelimited - * @memberof lazer.FeedPublisherState - * @static - * @param {lazer.IFeedPublisherState} message FeedPublisherState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeedPublisherState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FeedPublisherState message from the specified reader or buffer. - * @function decode - * @memberof lazer.FeedPublisherState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {lazer.FeedPublisherState} FeedPublisherState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeedPublisherState.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.lazer.FeedPublisherState(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.publisherId = reader.uint32(); - break; - } - case 2: { - message.lastUpdateTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.lastPublisherTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.lastFeedData = $root.lazer.FeedData.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FeedPublisherState message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof lazer.FeedPublisherState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {lazer.FeedPublisherState} FeedPublisherState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeedPublisherState.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FeedPublisherState message. - * @function verify - * @memberof lazer.FeedPublisherState - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FeedPublisherState.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.publisherId != null && message.hasOwnProperty("publisherId")) { - properties._publisherId = 1; - if (!$util.isInteger(message.publisherId)) - return "publisherId: integer expected"; - } - if (message.lastUpdateTimestamp != null && message.hasOwnProperty("lastUpdateTimestamp")) { - properties._lastUpdateTimestamp = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.lastUpdateTimestamp); - if (error) - return "lastUpdateTimestamp." + error; - } - } - if (message.lastPublisherTimestamp != null && message.hasOwnProperty("lastPublisherTimestamp")) { - properties._lastPublisherTimestamp = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.lastPublisherTimestamp); - if (error) - return "lastPublisherTimestamp." + error; - } - } - if (message.lastFeedData != null && message.hasOwnProperty("lastFeedData")) { - properties._lastFeedData = 1; - { - var error = $root.lazer.FeedData.verify(message.lastFeedData); - if (error) - return "lastFeedData." + error; - } - } - return null; - }; - - /** - * Creates a FeedPublisherState message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof lazer.FeedPublisherState - * @static - * @param {Object.} object Plain object - * @returns {lazer.FeedPublisherState} FeedPublisherState - */ - FeedPublisherState.fromObject = function fromObject(object) { - if (object instanceof $root.lazer.FeedPublisherState) - return object; - var message = new $root.lazer.FeedPublisherState(); - if (object.publisherId != null) - message.publisherId = object.publisherId >>> 0; - if (object.lastUpdateTimestamp != null) { - if (typeof object.lastUpdateTimestamp !== "object") - throw TypeError(".lazer.FeedPublisherState.lastUpdateTimestamp: object expected"); - message.lastUpdateTimestamp = $root.google.protobuf.Timestamp.fromObject(object.lastUpdateTimestamp); - } - if (object.lastPublisherTimestamp != null) { - if (typeof object.lastPublisherTimestamp !== "object") - throw TypeError(".lazer.FeedPublisherState.lastPublisherTimestamp: object expected"); - message.lastPublisherTimestamp = $root.google.protobuf.Timestamp.fromObject(object.lastPublisherTimestamp); - } - if (object.lastFeedData != null) { - if (typeof object.lastFeedData !== "object") - throw TypeError(".lazer.FeedPublisherState.lastFeedData: object expected"); - message.lastFeedData = $root.lazer.FeedData.fromObject(object.lastFeedData); - } - return message; - }; - - /** - * Creates a plain object from a FeedPublisherState message. Also converts values to other types if specified. - * @function toObject - * @memberof lazer.FeedPublisherState - * @static - * @param {lazer.FeedPublisherState} message FeedPublisherState - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FeedPublisherState.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.publisherId != null && message.hasOwnProperty("publisherId")) { - object.publisherId = message.publisherId; - if (options.oneofs) - object._publisherId = "publisherId"; - } - if (message.lastUpdateTimestamp != null && message.hasOwnProperty("lastUpdateTimestamp")) { - object.lastUpdateTimestamp = $root.google.protobuf.Timestamp.toObject(message.lastUpdateTimestamp, options); - if (options.oneofs) - object._lastUpdateTimestamp = "lastUpdateTimestamp"; - } - if (message.lastPublisherTimestamp != null && message.hasOwnProperty("lastPublisherTimestamp")) { - object.lastPublisherTimestamp = $root.google.protobuf.Timestamp.toObject(message.lastPublisherTimestamp, options); - if (options.oneofs) - object._lastPublisherTimestamp = "lastPublisherTimestamp"; - } - if (message.lastFeedData != null && message.hasOwnProperty("lastFeedData")) { - object.lastFeedData = $root.lazer.FeedData.toObject(message.lastFeedData, options); - if (options.oneofs) - object._lastFeedData = "lastFeedData"; - } - return object; - }; - - /** - * Converts this FeedPublisherState to JSON. - * @function toJSON - * @memberof lazer.FeedPublisherState - * @instance - * @returns {Object.} JSON object - */ - FeedPublisherState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FeedPublisherState - * @function getTypeUrl - * @memberof lazer.FeedPublisherState - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FeedPublisherState.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/lazer.FeedPublisherState"; - }; + /** + * Decodes a FeedPublisherState message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof lazer.FeedPublisherState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {lazer.FeedPublisherState} FeedPublisherState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeedPublisherState.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - return FeedPublisherState; - })(); + /** + * Verifies a FeedPublisherState message. + * @function verify + * @memberof lazer.FeedPublisherState + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeedPublisherState.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if ( + message.publisherId != null && + message.hasOwnProperty("publisherId") + ) { + properties._publisherId = 1; + if (!$util.isInteger(message.publisherId)) + return "publisherId: integer expected"; + } + if ( + message.lastUpdateTimestamp != null && + message.hasOwnProperty("lastUpdateTimestamp") + ) { + properties._lastUpdateTimestamp = 1; + { + var error = $root.google.protobuf.Timestamp.verify( + message.lastUpdateTimestamp, + ); + if (error) return "lastUpdateTimestamp." + error; + } + } + if ( + message.lastPublisherTimestamp != null && + message.hasOwnProperty("lastPublisherTimestamp") + ) { + properties._lastPublisherTimestamp = 1; + { + var error = $root.google.protobuf.Timestamp.verify( + message.lastPublisherTimestamp, + ); + if (error) return "lastPublisherTimestamp." + error; + } + } + if ( + message.lastFeedData != null && + message.hasOwnProperty("lastFeedData") + ) { + properties._lastFeedData = 1; + { + var error = $root.lazer.FeedData.verify(message.lastFeedData); + if (error) return "lastFeedData." + error; + } + } + return null; + }; + + /** + * Creates a FeedPublisherState message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof lazer.FeedPublisherState + * @static + * @param {Object.} object Plain object + * @returns {lazer.FeedPublisherState} FeedPublisherState + */ + FeedPublisherState.fromObject = function fromObject(object) { + if (object instanceof $root.lazer.FeedPublisherState) return object; + var message = new $root.lazer.FeedPublisherState(); + if (object.publisherId != null) + message.publisherId = object.publisherId >>> 0; + if (object.lastUpdateTimestamp != null) { + if (typeof object.lastUpdateTimestamp !== "object") + throw TypeError( + ".lazer.FeedPublisherState.lastUpdateTimestamp: object expected", + ); + message.lastUpdateTimestamp = + $root.google.protobuf.Timestamp.fromObject( + object.lastUpdateTimestamp, + ); + } + if (object.lastPublisherTimestamp != null) { + if (typeof object.lastPublisherTimestamp !== "object") + throw TypeError( + ".lazer.FeedPublisherState.lastPublisherTimestamp: object expected", + ); + message.lastPublisherTimestamp = + $root.google.protobuf.Timestamp.fromObject( + object.lastPublisherTimestamp, + ); + } + if (object.lastFeedData != null) { + if (typeof object.lastFeedData !== "object") + throw TypeError( + ".lazer.FeedPublisherState.lastFeedData: object expected", + ); + message.lastFeedData = $root.lazer.FeedData.fromObject( + object.lastFeedData, + ); + } + return message; + }; + + /** + * Creates a plain object from a FeedPublisherState message. Also converts values to other types if specified. + * @function toObject + * @memberof lazer.FeedPublisherState + * @static + * @param {lazer.FeedPublisherState} message FeedPublisherState + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeedPublisherState.toObject = function toObject(message, options) { + if (!options) options = {}; + var object = {}; + if ( + message.publisherId != null && + message.hasOwnProperty("publisherId") + ) { + object.publisherId = message.publisherId; + if (options.oneofs) object._publisherId = "publisherId"; + } + if ( + message.lastUpdateTimestamp != null && + message.hasOwnProperty("lastUpdateTimestamp") + ) { + object.lastUpdateTimestamp = $root.google.protobuf.Timestamp.toObject( + message.lastUpdateTimestamp, + options, + ); + if (options.oneofs) object._lastUpdateTimestamp = "lastUpdateTimestamp"; + } + if ( + message.lastPublisherTimestamp != null && + message.hasOwnProperty("lastPublisherTimestamp") + ) { + object.lastPublisherTimestamp = + $root.google.protobuf.Timestamp.toObject( + message.lastPublisherTimestamp, + options, + ); + if (options.oneofs) + object._lastPublisherTimestamp = "lastPublisherTimestamp"; + } + if ( + message.lastFeedData != null && + message.hasOwnProperty("lastFeedData") + ) { + object.lastFeedData = $root.lazer.FeedData.toObject( + message.lastFeedData, + options, + ); + if (options.oneofs) object._lastFeedData = "lastFeedData"; + } + return object; + }; + + /** + * Converts this FeedPublisherState to JSON. + * @function toJSON + * @memberof lazer.FeedPublisherState + * @instance + * @returns {Object.} JSON object + */ + FeedPublisherState.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeedPublisherState + * @function getTypeUrl + * @memberof lazer.FeedPublisherState + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeedPublisherState.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/lazer.FeedPublisherState"; + }; + + return FeedPublisherState; + })(); + + lazer.FeedData = (function () { + /** + * Properties of a FeedData. + * @memberof lazer + * @interface IFeedData + * @property {google.protobuf.ITimestamp|null} [sourceTimestamp] FeedData sourceTimestamp + * @property {google.protobuf.ITimestamp|null} [publisherTimestamp] FeedData publisherTimestamp + * @property {number|Long|null} [price] FeedData price + * @property {number|Long|null} [bestBidPrice] FeedData bestBidPrice + * @property {number|Long|null} [bestAskPrice] FeedData bestAskPrice + * @property {number|Long|null} [fundingRate] FeedData fundingRate + */ + + /** + * Constructs a new FeedData. + * @memberof lazer + * @classdesc Represents a FeedData. + * @implements IFeedData + * @constructor + * @param {lazer.IFeedData=} [properties] Properties to set + */ + function FeedData(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; + } + + /** + * FeedData sourceTimestamp. + * @member {google.protobuf.ITimestamp|null|undefined} sourceTimestamp + * @memberof lazer.FeedData + * @instance + */ + FeedData.prototype.sourceTimestamp = null; + + /** + * FeedData publisherTimestamp. + * @member {google.protobuf.ITimestamp|null|undefined} publisherTimestamp + * @memberof lazer.FeedData + * @instance + */ + FeedData.prototype.publisherTimestamp = null; + + /** + * FeedData price. + * @member {number|Long|null|undefined} price + * @memberof lazer.FeedData + * @instance + */ + FeedData.prototype.price = null; + + /** + * FeedData bestBidPrice. + * @member {number|Long|null|undefined} bestBidPrice + * @memberof lazer.FeedData + * @instance + */ + FeedData.prototype.bestBidPrice = null; + + /** + * FeedData bestAskPrice. + * @member {number|Long|null|undefined} bestAskPrice + * @memberof lazer.FeedData + * @instance + */ + FeedData.prototype.bestAskPrice = null; + + /** + * FeedData fundingRate. + * @member {number|Long|null|undefined} fundingRate + * @memberof lazer.FeedData + * @instance + */ + FeedData.prototype.fundingRate = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * FeedData _sourceTimestamp. + * @member {"sourceTimestamp"|undefined} _sourceTimestamp + * @memberof lazer.FeedData + * @instance + */ + Object.defineProperty(FeedData.prototype, "_sourceTimestamp", { + get: $util.oneOfGetter(($oneOfFields = ["sourceTimestamp"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * FeedData _publisherTimestamp. + * @member {"publisherTimestamp"|undefined} _publisherTimestamp + * @memberof lazer.FeedData + * @instance + */ + Object.defineProperty(FeedData.prototype, "_publisherTimestamp", { + get: $util.oneOfGetter(($oneOfFields = ["publisherTimestamp"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * FeedData _price. + * @member {"price"|undefined} _price + * @memberof lazer.FeedData + * @instance + */ + Object.defineProperty(FeedData.prototype, "_price", { + get: $util.oneOfGetter(($oneOfFields = ["price"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * FeedData _bestBidPrice. + * @member {"bestBidPrice"|undefined} _bestBidPrice + * @memberof lazer.FeedData + * @instance + */ + Object.defineProperty(FeedData.prototype, "_bestBidPrice", { + get: $util.oneOfGetter(($oneOfFields = ["bestBidPrice"])), + set: $util.oneOfSetter($oneOfFields), + }); - lazer.FeedData = (function() { - - /** - * Properties of a FeedData. - * @memberof lazer - * @interface IFeedData - * @property {google.protobuf.ITimestamp|null} [sourceTimestamp] FeedData sourceTimestamp - * @property {google.protobuf.ITimestamp|null} [publisherTimestamp] FeedData publisherTimestamp - * @property {number|Long|null} [price] FeedData price - * @property {number|Long|null} [bestBidPrice] FeedData bestBidPrice - * @property {number|Long|null} [bestAskPrice] FeedData bestAskPrice - * @property {number|Long|null} [fundingRate] FeedData fundingRate - */ - - /** - * Constructs a new FeedData. - * @memberof lazer - * @classdesc Represents a FeedData. - * @implements IFeedData - * @constructor - * @param {lazer.IFeedData=} [properties] Properties to set - */ - function FeedData(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * FeedData _bestAskPrice. + * @member {"bestAskPrice"|undefined} _bestAskPrice + * @memberof lazer.FeedData + * @instance + */ + Object.defineProperty(FeedData.prototype, "_bestAskPrice", { + get: $util.oneOfGetter(($oneOfFields = ["bestAskPrice"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * FeedData _fundingRate. + * @member {"fundingRate"|undefined} _fundingRate + * @memberof lazer.FeedData + * @instance + */ + Object.defineProperty(FeedData.prototype, "_fundingRate", { + get: $util.oneOfGetter(($oneOfFields = ["fundingRate"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Creates a new FeedData instance using the specified properties. + * @function create + * @memberof lazer.FeedData + * @static + * @param {lazer.IFeedData=} [properties] Properties to set + * @returns {lazer.FeedData} FeedData instance + */ + FeedData.create = function create(properties) { + return new FeedData(properties); + }; + + /** + * Encodes the specified FeedData message. Does not implicitly {@link lazer.FeedData.verify|verify} messages. + * @function encode + * @memberof lazer.FeedData + * @static + * @param {lazer.IFeedData} message FeedData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeedData.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if ( + message.sourceTimestamp != null && + Object.hasOwnProperty.call(message, "sourceTimestamp") + ) + $root.google.protobuf.Timestamp.encode( + message.sourceTimestamp, + writer.uint32(/* id 1, wireType 2 =*/ 10).fork(), + ).ldelim(); + if ( + message.publisherTimestamp != null && + Object.hasOwnProperty.call(message, "publisherTimestamp") + ) + $root.google.protobuf.Timestamp.encode( + message.publisherTimestamp, + writer.uint32(/* id 2, wireType 2 =*/ 18).fork(), + ).ldelim(); + if (message.price != null && Object.hasOwnProperty.call(message, "price")) + writer.uint32(/* id 3, wireType 0 =*/ 24).int64(message.price); + if ( + message.bestBidPrice != null && + Object.hasOwnProperty.call(message, "bestBidPrice") + ) + writer.uint32(/* id 4, wireType 0 =*/ 32).int64(message.bestBidPrice); + if ( + message.bestAskPrice != null && + Object.hasOwnProperty.call(message, "bestAskPrice") + ) + writer.uint32(/* id 5, wireType 0 =*/ 40).int64(message.bestAskPrice); + if ( + message.fundingRate != null && + Object.hasOwnProperty.call(message, "fundingRate") + ) + writer.uint32(/* id 6, wireType 0 =*/ 48).int64(message.fundingRate); + return writer; + }; + + /** + * Encodes the specified FeedData message, length delimited. Does not implicitly {@link lazer.FeedData.verify|verify} messages. + * @function encodeDelimited + * @memberof lazer.FeedData + * @static + * @param {lazer.IFeedData} message FeedData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeedData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeedData message from the specified reader or buffer. + * @function decode + * @memberof lazer.FeedData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {lazer.FeedData} FeedData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeedData.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, + message = new $root.lazer.FeedData(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.sourceTimestamp = $root.google.protobuf.Timestamp.decode( + reader, + reader.uint32(), + ); + break; + } + case 2: { + message.publisherTimestamp = $root.google.protobuf.Timestamp.decode( + reader, + reader.uint32(), + ); + break; + } + case 3: { + message.price = reader.int64(); + break; + } + case 4: { + message.bestBidPrice = reader.int64(); + break; + } + case 5: { + message.bestAskPrice = reader.int64(); + break; + } + case 6: { + message.fundingRate = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; } + } + return message; + }; - /** - * FeedData sourceTimestamp. - * @member {google.protobuf.ITimestamp|null|undefined} sourceTimestamp - * @memberof lazer.FeedData - * @instance - */ - FeedData.prototype.sourceTimestamp = null; - - /** - * FeedData publisherTimestamp. - * @member {google.protobuf.ITimestamp|null|undefined} publisherTimestamp - * @memberof lazer.FeedData - * @instance - */ - FeedData.prototype.publisherTimestamp = null; - - /** - * FeedData price. - * @member {number|Long|null|undefined} price - * @memberof lazer.FeedData - * @instance - */ - FeedData.prototype.price = null; - - /** - * FeedData bestBidPrice. - * @member {number|Long|null|undefined} bestBidPrice - * @memberof lazer.FeedData - * @instance - */ - FeedData.prototype.bestBidPrice = null; - - /** - * FeedData bestAskPrice. - * @member {number|Long|null|undefined} bestAskPrice - * @memberof lazer.FeedData - * @instance - */ - FeedData.prototype.bestAskPrice = null; - - /** - * FeedData fundingRate. - * @member {number|Long|null|undefined} fundingRate - * @memberof lazer.FeedData - * @instance - */ - FeedData.prototype.fundingRate = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * FeedData _sourceTimestamp. - * @member {"sourceTimestamp"|undefined} _sourceTimestamp - * @memberof lazer.FeedData - * @instance - */ - Object.defineProperty(FeedData.prototype, "_sourceTimestamp", { - get: $util.oneOfGetter($oneOfFields = ["sourceTimestamp"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * FeedData _publisherTimestamp. - * @member {"publisherTimestamp"|undefined} _publisherTimestamp - * @memberof lazer.FeedData - * @instance - */ - Object.defineProperty(FeedData.prototype, "_publisherTimestamp", { - get: $util.oneOfGetter($oneOfFields = ["publisherTimestamp"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * FeedData _price. - * @member {"price"|undefined} _price - * @memberof lazer.FeedData - * @instance - */ - Object.defineProperty(FeedData.prototype, "_price", { - get: $util.oneOfGetter($oneOfFields = ["price"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * FeedData _bestBidPrice. - * @member {"bestBidPrice"|undefined} _bestBidPrice - * @memberof lazer.FeedData - * @instance - */ - Object.defineProperty(FeedData.prototype, "_bestBidPrice", { - get: $util.oneOfGetter($oneOfFields = ["bestBidPrice"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * FeedData _bestAskPrice. - * @member {"bestAskPrice"|undefined} _bestAskPrice - * @memberof lazer.FeedData - * @instance - */ - Object.defineProperty(FeedData.prototype, "_bestAskPrice", { - get: $util.oneOfGetter($oneOfFields = ["bestAskPrice"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * FeedData _fundingRate. - * @member {"fundingRate"|undefined} _fundingRate - * @memberof lazer.FeedData - * @instance - */ - Object.defineProperty(FeedData.prototype, "_fundingRate", { - get: $util.oneOfGetter($oneOfFields = ["fundingRate"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new FeedData instance using the specified properties. - * @function create - * @memberof lazer.FeedData - * @static - * @param {lazer.IFeedData=} [properties] Properties to set - * @returns {lazer.FeedData} FeedData instance - */ - FeedData.create = function create(properties) { - return new FeedData(properties); - }; - - /** - * Encodes the specified FeedData message. Does not implicitly {@link lazer.FeedData.verify|verify} messages. - * @function encode - * @memberof lazer.FeedData - * @static - * @param {lazer.IFeedData} message FeedData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeedData.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.sourceTimestamp != null && Object.hasOwnProperty.call(message, "sourceTimestamp")) - $root.google.protobuf.Timestamp.encode(message.sourceTimestamp, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.publisherTimestamp != null && Object.hasOwnProperty.call(message, "publisherTimestamp")) - $root.google.protobuf.Timestamp.encode(message.publisherTimestamp, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.price != null && Object.hasOwnProperty.call(message, "price")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.price); - if (message.bestBidPrice != null && Object.hasOwnProperty.call(message, "bestBidPrice")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.bestBidPrice); - if (message.bestAskPrice != null && Object.hasOwnProperty.call(message, "bestAskPrice")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.bestAskPrice); - if (message.fundingRate != null && Object.hasOwnProperty.call(message, "fundingRate")) - writer.uint32(/* id 6, wireType 0 =*/48).int64(message.fundingRate); - return writer; - }; - - /** - * Encodes the specified FeedData message, length delimited. Does not implicitly {@link lazer.FeedData.verify|verify} messages. - * @function encodeDelimited - * @memberof lazer.FeedData - * @static - * @param {lazer.IFeedData} message FeedData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeedData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FeedData message from the specified reader or buffer. - * @function decode - * @memberof lazer.FeedData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {lazer.FeedData} FeedData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeedData.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.lazer.FeedData(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.sourceTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 2: { - message.publisherTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.price = reader.int64(); - break; - } - case 4: { - message.bestBidPrice = reader.int64(); - break; - } - case 5: { - message.bestAskPrice = reader.int64(); - break; - } - case 6: { - message.fundingRate = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FeedData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof lazer.FeedData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {lazer.FeedData} FeedData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeedData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FeedData message. - * @function verify - * @memberof lazer.FeedData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FeedData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.sourceTimestamp != null && message.hasOwnProperty("sourceTimestamp")) { - properties._sourceTimestamp = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.sourceTimestamp); - if (error) - return "sourceTimestamp." + error; - } - } - if (message.publisherTimestamp != null && message.hasOwnProperty("publisherTimestamp")) { - properties._publisherTimestamp = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.publisherTimestamp); - if (error) - return "publisherTimestamp." + error; - } - } - if (message.price != null && message.hasOwnProperty("price")) { - properties._price = 1; - if (!$util.isInteger(message.price) && !(message.price && $util.isInteger(message.price.low) && $util.isInteger(message.price.high))) - return "price: integer|Long expected"; - } - if (message.bestBidPrice != null && message.hasOwnProperty("bestBidPrice")) { - properties._bestBidPrice = 1; - if (!$util.isInteger(message.bestBidPrice) && !(message.bestBidPrice && $util.isInteger(message.bestBidPrice.low) && $util.isInteger(message.bestBidPrice.high))) - return "bestBidPrice: integer|Long expected"; - } - if (message.bestAskPrice != null && message.hasOwnProperty("bestAskPrice")) { - properties._bestAskPrice = 1; - if (!$util.isInteger(message.bestAskPrice) && !(message.bestAskPrice && $util.isInteger(message.bestAskPrice.low) && $util.isInteger(message.bestAskPrice.high))) - return "bestAskPrice: integer|Long expected"; - } - if (message.fundingRate != null && message.hasOwnProperty("fundingRate")) { - properties._fundingRate = 1; - if (!$util.isInteger(message.fundingRate) && !(message.fundingRate && $util.isInteger(message.fundingRate.low) && $util.isInteger(message.fundingRate.high))) - return "fundingRate: integer|Long expected"; - } - return null; - }; - - /** - * Creates a FeedData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof lazer.FeedData - * @static - * @param {Object.} object Plain object - * @returns {lazer.FeedData} FeedData - */ - FeedData.fromObject = function fromObject(object) { - if (object instanceof $root.lazer.FeedData) - return object; - var message = new $root.lazer.FeedData(); - if (object.sourceTimestamp != null) { - if (typeof object.sourceTimestamp !== "object") - throw TypeError(".lazer.FeedData.sourceTimestamp: object expected"); - message.sourceTimestamp = $root.google.protobuf.Timestamp.fromObject(object.sourceTimestamp); - } - if (object.publisherTimestamp != null) { - if (typeof object.publisherTimestamp !== "object") - throw TypeError(".lazer.FeedData.publisherTimestamp: object expected"); - message.publisherTimestamp = $root.google.protobuf.Timestamp.fromObject(object.publisherTimestamp); - } - if (object.price != null) - if ($util.Long) - (message.price = $util.Long.fromValue(object.price)).unsigned = false; - else if (typeof object.price === "string") - message.price = parseInt(object.price, 10); - else if (typeof object.price === "number") - message.price = object.price; - else if (typeof object.price === "object") - message.price = new $util.LongBits(object.price.low >>> 0, object.price.high >>> 0).toNumber(); - if (object.bestBidPrice != null) - if ($util.Long) - (message.bestBidPrice = $util.Long.fromValue(object.bestBidPrice)).unsigned = false; - else if (typeof object.bestBidPrice === "string") - message.bestBidPrice = parseInt(object.bestBidPrice, 10); - else if (typeof object.bestBidPrice === "number") - message.bestBidPrice = object.bestBidPrice; - else if (typeof object.bestBidPrice === "object") - message.bestBidPrice = new $util.LongBits(object.bestBidPrice.low >>> 0, object.bestBidPrice.high >>> 0).toNumber(); - if (object.bestAskPrice != null) - if ($util.Long) - (message.bestAskPrice = $util.Long.fromValue(object.bestAskPrice)).unsigned = false; - else if (typeof object.bestAskPrice === "string") - message.bestAskPrice = parseInt(object.bestAskPrice, 10); - else if (typeof object.bestAskPrice === "number") - message.bestAskPrice = object.bestAskPrice; - else if (typeof object.bestAskPrice === "object") - message.bestAskPrice = new $util.LongBits(object.bestAskPrice.low >>> 0, object.bestAskPrice.high >>> 0).toNumber(); - if (object.fundingRate != null) - if ($util.Long) - (message.fundingRate = $util.Long.fromValue(object.fundingRate)).unsigned = false; - else if (typeof object.fundingRate === "string") - message.fundingRate = parseInt(object.fundingRate, 10); - else if (typeof object.fundingRate === "number") - message.fundingRate = object.fundingRate; - else if (typeof object.fundingRate === "object") - message.fundingRate = new $util.LongBits(object.fundingRate.low >>> 0, object.fundingRate.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a FeedData message. Also converts values to other types if specified. - * @function toObject - * @memberof lazer.FeedData - * @static - * @param {lazer.FeedData} message FeedData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FeedData.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.sourceTimestamp != null && message.hasOwnProperty("sourceTimestamp")) { - object.sourceTimestamp = $root.google.protobuf.Timestamp.toObject(message.sourceTimestamp, options); - if (options.oneofs) - object._sourceTimestamp = "sourceTimestamp"; - } - if (message.publisherTimestamp != null && message.hasOwnProperty("publisherTimestamp")) { - object.publisherTimestamp = $root.google.protobuf.Timestamp.toObject(message.publisherTimestamp, options); - if (options.oneofs) - object._publisherTimestamp = "publisherTimestamp"; - } - if (message.price != null && message.hasOwnProperty("price")) { - if (typeof message.price === "number") - object.price = options.longs === String ? String(message.price) : message.price; - else - object.price = options.longs === String ? $util.Long.prototype.toString.call(message.price) : options.longs === Number ? new $util.LongBits(message.price.low >>> 0, message.price.high >>> 0).toNumber() : message.price; - if (options.oneofs) - object._price = "price"; - } - if (message.bestBidPrice != null && message.hasOwnProperty("bestBidPrice")) { - if (typeof message.bestBidPrice === "number") - object.bestBidPrice = options.longs === String ? String(message.bestBidPrice) : message.bestBidPrice; - else - object.bestBidPrice = options.longs === String ? $util.Long.prototype.toString.call(message.bestBidPrice) : options.longs === Number ? new $util.LongBits(message.bestBidPrice.low >>> 0, message.bestBidPrice.high >>> 0).toNumber() : message.bestBidPrice; - if (options.oneofs) - object._bestBidPrice = "bestBidPrice"; - } - if (message.bestAskPrice != null && message.hasOwnProperty("bestAskPrice")) { - if (typeof message.bestAskPrice === "number") - object.bestAskPrice = options.longs === String ? String(message.bestAskPrice) : message.bestAskPrice; - else - object.bestAskPrice = options.longs === String ? $util.Long.prototype.toString.call(message.bestAskPrice) : options.longs === Number ? new $util.LongBits(message.bestAskPrice.low >>> 0, message.bestAskPrice.high >>> 0).toNumber() : message.bestAskPrice; - if (options.oneofs) - object._bestAskPrice = "bestAskPrice"; - } - if (message.fundingRate != null && message.hasOwnProperty("fundingRate")) { - if (typeof message.fundingRate === "number") - object.fundingRate = options.longs === String ? String(message.fundingRate) : message.fundingRate; - else - object.fundingRate = options.longs === String ? $util.Long.prototype.toString.call(message.fundingRate) : options.longs === Number ? new $util.LongBits(message.fundingRate.low >>> 0, message.fundingRate.high >>> 0).toNumber() : message.fundingRate; - if (options.oneofs) - object._fundingRate = "fundingRate"; - } - return object; - }; - - /** - * Converts this FeedData to JSON. - * @function toJSON - * @memberof lazer.FeedData - * @instance - * @returns {Object.} JSON object - */ - FeedData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FeedData - * @function getTypeUrl - * @memberof lazer.FeedData - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FeedData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/lazer.FeedData"; - }; + /** + * Decodes a FeedData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof lazer.FeedData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {lazer.FeedData} FeedData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeedData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - return FeedData; - })(); + /** + * Verifies a FeedData message. + * @function verify + * @memberof lazer.FeedData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeedData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if ( + message.sourceTimestamp != null && + message.hasOwnProperty("sourceTimestamp") + ) { + properties._sourceTimestamp = 1; + { + var error = $root.google.protobuf.Timestamp.verify( + message.sourceTimestamp, + ); + if (error) return "sourceTimestamp." + error; + } + } + if ( + message.publisherTimestamp != null && + message.hasOwnProperty("publisherTimestamp") + ) { + properties._publisherTimestamp = 1; + { + var error = $root.google.protobuf.Timestamp.verify( + message.publisherTimestamp, + ); + if (error) return "publisherTimestamp." + error; + } + } + if (message.price != null && message.hasOwnProperty("price")) { + properties._price = 1; + if ( + !$util.isInteger(message.price) && + !( + message.price && + $util.isInteger(message.price.low) && + $util.isInteger(message.price.high) + ) + ) + return "price: integer|Long expected"; + } + if ( + message.bestBidPrice != null && + message.hasOwnProperty("bestBidPrice") + ) { + properties._bestBidPrice = 1; + if ( + !$util.isInteger(message.bestBidPrice) && + !( + message.bestBidPrice && + $util.isInteger(message.bestBidPrice.low) && + $util.isInteger(message.bestBidPrice.high) + ) + ) + return "bestBidPrice: integer|Long expected"; + } + if ( + message.bestAskPrice != null && + message.hasOwnProperty("bestAskPrice") + ) { + properties._bestAskPrice = 1; + if ( + !$util.isInteger(message.bestAskPrice) && + !( + message.bestAskPrice && + $util.isInteger(message.bestAskPrice.low) && + $util.isInteger(message.bestAskPrice.high) + ) + ) + return "bestAskPrice: integer|Long expected"; + } + if ( + message.fundingRate != null && + message.hasOwnProperty("fundingRate") + ) { + properties._fundingRate = 1; + if ( + !$util.isInteger(message.fundingRate) && + !( + message.fundingRate && + $util.isInteger(message.fundingRate.low) && + $util.isInteger(message.fundingRate.high) + ) + ) + return "fundingRate: integer|Long expected"; + } + return null; + }; + + /** + * Creates a FeedData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof lazer.FeedData + * @static + * @param {Object.} object Plain object + * @returns {lazer.FeedData} FeedData + */ + FeedData.fromObject = function fromObject(object) { + if (object instanceof $root.lazer.FeedData) return object; + var message = new $root.lazer.FeedData(); + if (object.sourceTimestamp != null) { + if (typeof object.sourceTimestamp !== "object") + throw TypeError(".lazer.FeedData.sourceTimestamp: object expected"); + message.sourceTimestamp = $root.google.protobuf.Timestamp.fromObject( + object.sourceTimestamp, + ); + } + if (object.publisherTimestamp != null) { + if (typeof object.publisherTimestamp !== "object") + throw TypeError( + ".lazer.FeedData.publisherTimestamp: object expected", + ); + message.publisherTimestamp = $root.google.protobuf.Timestamp.fromObject( + object.publisherTimestamp, + ); + } + if (object.price != null) + if ($util.Long) + (message.price = $util.Long.fromValue(object.price)).unsigned = false; + else if (typeof object.price === "string") + message.price = parseInt(object.price, 10); + else if (typeof object.price === "number") message.price = object.price; + else if (typeof object.price === "object") + message.price = new $util.LongBits( + object.price.low >>> 0, + object.price.high >>> 0, + ).toNumber(); + if (object.bestBidPrice != null) + if ($util.Long) + (message.bestBidPrice = $util.Long.fromValue( + object.bestBidPrice, + )).unsigned = false; + else if (typeof object.bestBidPrice === "string") + message.bestBidPrice = parseInt(object.bestBidPrice, 10); + else if (typeof object.bestBidPrice === "number") + message.bestBidPrice = object.bestBidPrice; + else if (typeof object.bestBidPrice === "object") + message.bestBidPrice = new $util.LongBits( + object.bestBidPrice.low >>> 0, + object.bestBidPrice.high >>> 0, + ).toNumber(); + if (object.bestAskPrice != null) + if ($util.Long) + (message.bestAskPrice = $util.Long.fromValue( + object.bestAskPrice, + )).unsigned = false; + else if (typeof object.bestAskPrice === "string") + message.bestAskPrice = parseInt(object.bestAskPrice, 10); + else if (typeof object.bestAskPrice === "number") + message.bestAskPrice = object.bestAskPrice; + else if (typeof object.bestAskPrice === "object") + message.bestAskPrice = new $util.LongBits( + object.bestAskPrice.low >>> 0, + object.bestAskPrice.high >>> 0, + ).toNumber(); + if (object.fundingRate != null) + if ($util.Long) + (message.fundingRate = $util.Long.fromValue( + object.fundingRate, + )).unsigned = false; + else if (typeof object.fundingRate === "string") + message.fundingRate = parseInt(object.fundingRate, 10); + else if (typeof object.fundingRate === "number") + message.fundingRate = object.fundingRate; + else if (typeof object.fundingRate === "object") + message.fundingRate = new $util.LongBits( + object.fundingRate.low >>> 0, + object.fundingRate.high >>> 0, + ).toNumber(); + return message; + }; + + /** + * Creates a plain object from a FeedData message. Also converts values to other types if specified. + * @function toObject + * @memberof lazer.FeedData + * @static + * @param {lazer.FeedData} message FeedData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeedData.toObject = function toObject(message, options) { + if (!options) options = {}; + var object = {}; + if ( + message.sourceTimestamp != null && + message.hasOwnProperty("sourceTimestamp") + ) { + object.sourceTimestamp = $root.google.protobuf.Timestamp.toObject( + message.sourceTimestamp, + options, + ); + if (options.oneofs) object._sourceTimestamp = "sourceTimestamp"; + } + if ( + message.publisherTimestamp != null && + message.hasOwnProperty("publisherTimestamp") + ) { + object.publisherTimestamp = $root.google.protobuf.Timestamp.toObject( + message.publisherTimestamp, + options, + ); + if (options.oneofs) object._publisherTimestamp = "publisherTimestamp"; + } + if (message.price != null && message.hasOwnProperty("price")) { + if (typeof message.price === "number") + object.price = + options.longs === String ? String(message.price) : message.price; + else + object.price = + options.longs === String + ? $util.Long.prototype.toString.call(message.price) + : options.longs === Number + ? new $util.LongBits( + message.price.low >>> 0, + message.price.high >>> 0, + ).toNumber() + : message.price; + if (options.oneofs) object._price = "price"; + } + if ( + message.bestBidPrice != null && + message.hasOwnProperty("bestBidPrice") + ) { + if (typeof message.bestBidPrice === "number") + object.bestBidPrice = + options.longs === String + ? String(message.bestBidPrice) + : message.bestBidPrice; + else + object.bestBidPrice = + options.longs === String + ? $util.Long.prototype.toString.call(message.bestBidPrice) + : options.longs === Number + ? new $util.LongBits( + message.bestBidPrice.low >>> 0, + message.bestBidPrice.high >>> 0, + ).toNumber() + : message.bestBidPrice; + if (options.oneofs) object._bestBidPrice = "bestBidPrice"; + } + if ( + message.bestAskPrice != null && + message.hasOwnProperty("bestAskPrice") + ) { + if (typeof message.bestAskPrice === "number") + object.bestAskPrice = + options.longs === String + ? String(message.bestAskPrice) + : message.bestAskPrice; + else + object.bestAskPrice = + options.longs === String + ? $util.Long.prototype.toString.call(message.bestAskPrice) + : options.longs === Number + ? new $util.LongBits( + message.bestAskPrice.low >>> 0, + message.bestAskPrice.high >>> 0, + ).toNumber() + : message.bestAskPrice; + if (options.oneofs) object._bestAskPrice = "bestAskPrice"; + } + if ( + message.fundingRate != null && + message.hasOwnProperty("fundingRate") + ) { + if (typeof message.fundingRate === "number") + object.fundingRate = + options.longs === String + ? String(message.fundingRate) + : message.fundingRate; + else + object.fundingRate = + options.longs === String + ? $util.Long.prototype.toString.call(message.fundingRate) + : options.longs === Number + ? new $util.LongBits( + message.fundingRate.low >>> 0, + message.fundingRate.high >>> 0, + ).toNumber() + : message.fundingRate; + if (options.oneofs) object._fundingRate = "fundingRate"; + } + return object; + }; + + /** + * Converts this FeedData to JSON. + * @function toJSON + * @memberof lazer.FeedData + * @instance + * @returns {Object.} JSON object + */ + FeedData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeedData + * @function getTypeUrl + * @memberof lazer.FeedData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeedData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/lazer.FeedData"; + }; - return lazer; + return FeedData; + })(); + + return lazer; })(); -$root.google = (function() { +$root.google = (function () { + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + google.protobuf = (function () { /** - * Namespace google. - * @exports google + * Namespace protobuf. + * @memberof google * @namespace */ - var google = {}; - - google.protobuf = (function() { - - /** - * Namespace protobuf. - * @memberof google - * @namespace - */ - var protobuf = {}; - - protobuf.Duration = (function() { - - /** - * Properties of a Duration. - * @memberof google.protobuf - * @interface IDuration - * @property {number|Long|null} [seconds] Duration seconds - * @property {number|null} [nanos] Duration nanos - */ - - /** - * Constructs a new Duration. - * @memberof google.protobuf - * @classdesc Represents a Duration. - * @implements IDuration - * @constructor - * @param {google.protobuf.IDuration=} [properties] Properties to set - */ - function Duration(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + var protobuf = {}; + + protobuf.Duration = (function () { + /** + * Properties of a Duration. + * @memberof google.protobuf + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos + */ + + /** + * Constructs a new Duration. + * @memberof google.protobuf + * @classdesc Represents a Duration. + * @implements IDuration + * @constructor + * @param {google.protobuf.IDuration=} [properties] Properties to set + */ + function Duration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.seconds = $util.Long + ? $util.Long.fromBits(0, 0, false) + : 0; + + /** + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; + + /** + * Creates a new Duration instance using the specified properties. + * @function create + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance + */ + Duration.create = function create(properties) { + return new Duration(properties); + }; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if ( + message.seconds != null && + Object.hasOwnProperty.call(message, "seconds") + ) + writer.uint32(/* id 1, wireType 0 =*/ 8).int64(message.seconds); + if ( + message.nanos != null && + Object.hasOwnProperty.call(message, "nanos") + ) + writer.uint32(/* id 2, wireType 0 =*/ 16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, + message = new $root.google.protobuf.Duration(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Duration message. + * @function verify + * @memberof google.protobuf.Duration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Duration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if ( + !$util.isInteger(message.seconds) && + !( + message.seconds && + $util.isInteger(message.seconds.low) && + $util.isInteger(message.seconds.high) + ) + ) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Duration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Duration} Duration + */ + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) return object; + var message = new $root.google.protobuf.Duration(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = + false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits( + object.seconds.low >>> 0, + object.seconds.high >>> 0, + ).toNumber(); + if (object.nanos != null) message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.Duration} message Duration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Duration.toObject = function toObject(message, options) { + if (!options) options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = + options.longs === String + ? long.toString() + : options.longs === Number + ? long.toNumber() + : long; + } else object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = + options.longs === String + ? String(message.seconds) + : message.seconds; + else + object.seconds = + options.longs === String + ? $util.Long.prototype.toString.call(message.seconds) + : options.longs === Number + ? new $util.LongBits( + message.seconds.low >>> 0, + message.seconds.high >>> 0, + ).toNumber() + : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Duration to JSON. + * @function toJSON + * @memberof google.protobuf.Duration + * @instance + * @returns {Object.} JSON object + */ + Duration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Duration + * @function getTypeUrl + * @memberof google.protobuf.Duration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Duration"; + }; + + return Duration; + })(); - /** - * Duration seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Duration nanos. - * @member {number} nanos - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.nanos = 0; - - /** - * Creates a new Duration instance using the specified properties. - * @function create - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration=} [properties] Properties to set - * @returns {google.protobuf.Duration} Duration instance - */ - Duration.create = function create(properties) { - return new Duration(properties); - }; - - /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Duration.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); - return writer; - }; - - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Duration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Duration message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Duration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Duration} Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Duration.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.seconds = reader.int64(); - break; - } - case 2: { - message.nanos = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Duration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Duration} Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Duration.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Duration message. - * @function verify - * @memberof google.protobuf.Duration - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Duration.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; - return null; - }; - - /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Duration - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Duration} Duration - */ - Duration.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Duration) - return object; - var message = new $root.google.protobuf.Duration(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; - return message; - }; - - /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.Duration} message Duration - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Duration.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; - } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; - return object; - }; - - /** - * Converts this Duration to JSON. - * @function toJSON - * @memberof google.protobuf.Duration - * @instance - * @returns {Object.} JSON object - */ - Duration.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Duration - * @function getTypeUrl - * @memberof google.protobuf.Duration - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Duration"; - }; - - return Duration; - })(); - - protobuf.Timestamp = (function() { - - /** - * Properties of a Timestamp. - * @memberof google.protobuf - * @interface ITimestamp - * @property {number|Long|null} [seconds] Timestamp seconds - * @property {number|null} [nanos] Timestamp nanos - */ - - /** - * Constructs a new Timestamp. - * @memberof google.protobuf - * @classdesc Represents a Timestamp. - * @implements ITimestamp - * @constructor - * @param {google.protobuf.ITimestamp=} [properties] Properties to set - */ - function Timestamp(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + protobuf.Timestamp = (function () { + /** + * Properties of a Timestamp. + * @memberof google.protobuf + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos + */ + + /** + * Constructs a new Timestamp. + * @memberof google.protobuf + * @classdesc Represents a Timestamp. + * @implements ITimestamp + * @constructor + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + */ + function Timestamp(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.seconds = $util.Long + ? $util.Long.fromBits(0, 0, false) + : 0; + + /** + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.nanos = 0; + + /** + * Creates a new Timestamp instance using the specified properties. + * @function create + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance + */ + Timestamp.create = function create(properties) { + return new Timestamp(properties); + }; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if ( + message.seconds != null && + Object.hasOwnProperty.call(message, "seconds") + ) + writer.uint32(/* id 1, wireType 0 =*/ 8).int64(message.seconds); + if ( + message.nanos != null && + Object.hasOwnProperty.call(message, "nanos") + ) + writer.uint32(/* id 2, wireType 0 =*/ 16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, + message = new $root.google.protobuf.Timestamp(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Timestamp message. + * @function verify + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Timestamp.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if ( + !$util.isInteger(message.seconds) && + !( + message.seconds && + $util.isInteger(message.seconds.low) && + $util.isInteger(message.seconds.high) + ) + ) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Timestamp} Timestamp + */ + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) return object; + var message = new $root.google.protobuf.Timestamp(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = + false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits( + object.seconds.low >>> 0, + object.seconds.high >>> 0, + ).toNumber(); + if (object.nanos != null) message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.Timestamp} message Timestamp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Timestamp.toObject = function toObject(message, options) { + if (!options) options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = + options.longs === String + ? long.toString() + : options.longs === Number + ? long.toNumber() + : long; + } else object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = + options.longs === String + ? String(message.seconds) + : message.seconds; + else + object.seconds = + options.longs === String + ? $util.Long.prototype.toString.call(message.seconds) + : options.longs === Number + ? new $util.LongBits( + message.seconds.low >>> 0, + message.seconds.high >>> 0, + ).toNumber() + : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Timestamp to JSON. + * @function toJSON + * @memberof google.protobuf.Timestamp + * @instance + * @returns {Object.} JSON object + */ + Timestamp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Timestamp + * @function getTypeUrl + * @memberof google.protobuf.Timestamp + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Timestamp"; + }; - /** - * Timestamp seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Timestamp - * @instance - */ - Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Timestamp nanos. - * @member {number} nanos - * @memberof google.protobuf.Timestamp - * @instance - */ - Timestamp.prototype.nanos = 0; - - /** - * Creates a new Timestamp instance using the specified properties. - * @function create - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp=} [properties] Properties to set - * @returns {google.protobuf.Timestamp} Timestamp instance - */ - Timestamp.create = function create(properties) { - return new Timestamp(properties); - }; - - /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Timestamp.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); - return writer; - }; - - /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Timestamp.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Timestamp message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Timestamp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Timestamp} Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Timestamp.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.seconds = reader.int64(); - break; - } - case 2: { - message.nanos = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Timestamp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Timestamp} Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Timestamp.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Timestamp message. - * @function verify - * @memberof google.protobuf.Timestamp - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Timestamp.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; - return null; - }; - - /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Timestamp - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Timestamp} Timestamp - */ - Timestamp.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Timestamp) - return object; - var message = new $root.google.protobuf.Timestamp(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; - return message; - }; - - /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.Timestamp} message Timestamp - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Timestamp.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; - } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; - return object; - }; - - /** - * Converts this Timestamp to JSON. - * @function toJSON - * @memberof google.protobuf.Timestamp - * @instance - * @returns {Object.} JSON object - */ - Timestamp.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Timestamp - * @function getTypeUrl - * @memberof google.protobuf.Timestamp - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Timestamp"; - }; - - return Timestamp; - })(); - - return protobuf; + return Timestamp; })(); - return google; + return protobuf; + })(); + + return google; })(); module.exports = $root; diff --git a/lazer/state_sdk/js/src/generated/state.d.ts b/lazer/state_sdk/js/src/generated/state.d.ts index 03b8335103..dbd1c13a26 100644 --- a/lazer/state_sdk/js/src/generated/state.d.ts +++ b/lazer/state_sdk/js/src/generated/state.d.ts @@ -2,1126 +2,1231 @@ import * as $protobuf from "protobufjs"; import Long = require("long"); /** Namespace lazer. */ export namespace lazer { + /** Properties of a State. */ + interface IState { + /** State shardId */ + shardId?: number | null; + + /** State lastSequenceNo */ + lastSequenceNo?: number | Long | null; + + /** State lastTimestamp */ + lastTimestamp?: google.protobuf.ITimestamp | null; + + /** State shardName */ + shardName?: string | null; + + /** State minRate */ + minRate?: google.protobuf.IDuration | null; + + /** State feeds */ + feeds?: lazer.IFeed[] | null; + + /** State publishers */ + publishers?: lazer.IPublisher[] | null; + } + + /** Represents a State. */ + class State implements IState { + /** + * Constructs a new State. + * @param [properties] Properties to set + */ + constructor(properties?: lazer.IState); + + /** State shardId. */ + public shardId?: number | null; + + /** State lastSequenceNo. */ + public lastSequenceNo?: number | Long | null; + + /** State lastTimestamp. */ + public lastTimestamp?: google.protobuf.ITimestamp | null; + + /** State shardName. */ + public shardName?: string | null; + + /** State minRate. */ + public minRate?: google.protobuf.IDuration | null; + + /** State feeds. */ + public feeds: lazer.IFeed[]; + + /** State publishers. */ + public publishers: lazer.IPublisher[]; + + /** State _shardId. */ + public _shardId?: "shardId"; + + /** State _lastSequenceNo. */ + public _lastSequenceNo?: "lastSequenceNo"; + + /** State _lastTimestamp. */ + public _lastTimestamp?: "lastTimestamp"; + + /** State _shardName. */ + public _shardName?: "shardName"; + + /** State _minRate. */ + public _minRate?: "minRate"; + + /** + * Creates a new State instance using the specified properties. + * @param [properties] Properties to set + * @returns State instance + */ + public static create(properties?: lazer.IState): lazer.State; + + /** + * Encodes the specified State message. Does not implicitly {@link lazer.State.verify|verify} messages. + * @param message State message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: lazer.IState, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified State message, length delimited. Does not implicitly {@link lazer.State.verify|verify} messages. + * @param message State message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: lazer.IState, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a State message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns State + * @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, + ): lazer.State; + + /** + * Decodes a State message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns State + * @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, + ): lazer.State; + + /** + * Verifies a State 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 State message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns State + */ + public static fromObject(object: { [k: string]: any }): lazer.State; + + /** + * Creates a plain object from a State message. Also converts values to other types if specified. + * @param message State + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: lazer.State, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this State to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for State + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Publisher. */ + interface IPublisher { + /** Publisher publisherId */ + publisherId?: number | null; + + /** Publisher name */ + name?: string | null; + + /** Publisher publicKeys */ + publicKeys?: Uint8Array[] | null; + + /** Publisher isActive */ + isActive?: boolean | null; + } + + /** Represents a Publisher. */ + class Publisher implements IPublisher { + /** + * Constructs a new Publisher. + * @param [properties] Properties to set + */ + constructor(properties?: lazer.IPublisher); + + /** Publisher publisherId. */ + public publisherId?: number | null; + + /** Publisher name. */ + public name?: string | null; + + /** Publisher publicKeys. */ + public publicKeys: Uint8Array[]; + + /** Publisher isActive. */ + public isActive?: boolean | null; + + /** Publisher _publisherId. */ + public _publisherId?: "publisherId"; + + /** Publisher _name. */ + public _name?: "name"; + + /** Publisher _isActive. */ + public _isActive?: "isActive"; + + /** + * Creates a new Publisher instance using the specified properties. + * @param [properties] Properties to set + * @returns Publisher instance + */ + public static create(properties?: lazer.IPublisher): lazer.Publisher; + + /** + * Encodes the specified Publisher message. Does not implicitly {@link lazer.Publisher.verify|verify} messages. + * @param message Publisher message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: lazer.IPublisher, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified Publisher message, length delimited. Does not implicitly {@link lazer.Publisher.verify|verify} messages. + * @param message Publisher message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: lazer.IPublisher, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a Publisher message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Publisher + * @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, + ): lazer.Publisher; + + /** + * Decodes a Publisher message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Publisher + * @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, + ): lazer.Publisher; + + /** + * Verifies a Publisher 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 Publisher message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Publisher + */ + public static fromObject(object: { [k: string]: any }): lazer.Publisher; + + /** + * Creates a plain object from a Publisher message. Also converts values to other types if specified. + * @param message Publisher + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: lazer.Publisher, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Publisher to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Publisher + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** AssetType enum. */ + enum AssetType { + CRYPTO = 0, + FUNDING_RATE = 1, + FX = 2, + COMMODITY = 3, + NAV = 4, + CRYPTO_INDEX = 5, + CRYPTO_REDEMPTION_RATE = 6, + EQUITY = 7, + METAL = 8, + RATES = 9, + } + + /** Properties of a FeedMetadata. */ + interface IFeedMetadata { + /** FeedMetadata priceFeedId */ + priceFeedId?: number | null; + + /** FeedMetadata name */ + name?: string | null; + + /** FeedMetadata symbol */ + symbol?: string | null; + + /** FeedMetadata description */ + description?: string | null; + + /** FeedMetadata assetType */ + assetType?: lazer.AssetType | null; + + /** FeedMetadata exponent */ + exponent?: number | null; + + /** FeedMetadata cmcId */ + cmcId?: number | null; + + /** FeedMetadata fundingRateInterval */ + fundingRateInterval?: google.protobuf.IDuration | null; + + /** FeedMetadata minPublishers */ + minPublishers?: number | null; + + /** FeedMetadata minRate */ + minRate?: google.protobuf.IDuration | null; + + /** FeedMetadata expiryTime */ + expiryTime?: google.protobuf.IDuration | null; - /** Properties of a State. */ - interface IState { + /** FeedMetadata isActivated */ + isActivated?: boolean | null; - /** State shardId */ - shardId?: (number|null); + /** FeedMetadata hermesId */ + hermesId?: string | null; - /** State lastSequenceNo */ - lastSequenceNo?: (number|Long|null); + /** FeedMetadata quoteCurrency */ + quoteCurrency?: string | null; - /** State lastTimestamp */ - lastTimestamp?: (google.protobuf.ITimestamp|null); + /** FeedMetadata marketSchedule */ + marketSchedule?: string | null; + } - /** State shardName */ - shardName?: (string|null); + /** Represents a FeedMetadata. */ + class FeedMetadata implements IFeedMetadata { + /** + * Constructs a new FeedMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: lazer.IFeedMetadata); - /** State minRate */ - minRate?: (google.protobuf.IDuration|null); + /** FeedMetadata priceFeedId. */ + public priceFeedId?: number | null; - /** State feeds */ - feeds?: (lazer.IFeed[]|null); + /** FeedMetadata name. */ + public name?: string | null; - /** State publishers */ - publishers?: (lazer.IPublisher[]|null); - } - - /** Represents a State. */ - class State implements IState { - - /** - * Constructs a new State. - * @param [properties] Properties to set - */ - constructor(properties?: lazer.IState); - - /** State shardId. */ - public shardId?: (number|null); - - /** State lastSequenceNo. */ - public lastSequenceNo?: (number|Long|null); - - /** State lastTimestamp. */ - public lastTimestamp?: (google.protobuf.ITimestamp|null); - - /** State shardName. */ - public shardName?: (string|null); - - /** State minRate. */ - public minRate?: (google.protobuf.IDuration|null); - - /** State feeds. */ - public feeds: lazer.IFeed[]; - - /** State publishers. */ - public publishers: lazer.IPublisher[]; - - /** State _shardId. */ - public _shardId?: "shardId"; - - /** State _lastSequenceNo. */ - public _lastSequenceNo?: "lastSequenceNo"; - - /** State _lastTimestamp. */ - public _lastTimestamp?: "lastTimestamp"; - - /** State _shardName. */ - public _shardName?: "shardName"; - - /** State _minRate. */ - public _minRate?: "minRate"; - - /** - * Creates a new State instance using the specified properties. - * @param [properties] Properties to set - * @returns State instance - */ - public static create(properties?: lazer.IState): lazer.State; - - /** - * Encodes the specified State message. Does not implicitly {@link lazer.State.verify|verify} messages. - * @param message State message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: lazer.IState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified State message, length delimited. Does not implicitly {@link lazer.State.verify|verify} messages. - * @param message State message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: lazer.IState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a State message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns State - * @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): lazer.State; - - /** - * Decodes a State message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns State - * @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)): lazer.State; - - /** - * Verifies a State 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 State message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns State - */ - public static fromObject(object: { [k: string]: any }): lazer.State; - - /** - * Creates a plain object from a State message. Also converts values to other types if specified. - * @param message State - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: lazer.State, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this State to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for State - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Publisher. */ - interface IPublisher { - - /** Publisher publisherId */ - publisherId?: (number|null); - - /** Publisher name */ - name?: (string|null); - - /** Publisher publicKeys */ - publicKeys?: (Uint8Array[]|null); - - /** Publisher isActive */ - isActive?: (boolean|null); - } - - /** Represents a Publisher. */ - class Publisher implements IPublisher { - - /** - * Constructs a new Publisher. - * @param [properties] Properties to set - */ - constructor(properties?: lazer.IPublisher); - - /** Publisher publisherId. */ - public publisherId?: (number|null); - - /** Publisher name. */ - public name?: (string|null); - - /** Publisher publicKeys. */ - public publicKeys: Uint8Array[]; - - /** Publisher isActive. */ - public isActive?: (boolean|null); - - /** Publisher _publisherId. */ - public _publisherId?: "publisherId"; - - /** Publisher _name. */ - public _name?: "name"; - - /** Publisher _isActive. */ - public _isActive?: "isActive"; - - /** - * Creates a new Publisher instance using the specified properties. - * @param [properties] Properties to set - * @returns Publisher instance - */ - public static create(properties?: lazer.IPublisher): lazer.Publisher; - - /** - * Encodes the specified Publisher message. Does not implicitly {@link lazer.Publisher.verify|verify} messages. - * @param message Publisher message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: lazer.IPublisher, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Publisher message, length delimited. Does not implicitly {@link lazer.Publisher.verify|verify} messages. - * @param message Publisher message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: lazer.IPublisher, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Publisher message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Publisher - * @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): lazer.Publisher; - - /** - * Decodes a Publisher message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Publisher - * @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)): lazer.Publisher; - - /** - * Verifies a Publisher 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 Publisher message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Publisher - */ - public static fromObject(object: { [k: string]: any }): lazer.Publisher; - - /** - * Creates a plain object from a Publisher message. Also converts values to other types if specified. - * @param message Publisher - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: lazer.Publisher, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Publisher to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Publisher - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** AssetType enum. */ - enum AssetType { - CRYPTO = 0, - FUNDING_RATE = 1, - FX = 2, - COMMODITY = 3, - NAV = 4, - CRYPTO_INDEX = 5, - CRYPTO_REDEMPTION_RATE = 6, - EQUITY = 7, - METAL = 8, - RATES = 9 - } - - /** Properties of a FeedMetadata. */ - interface IFeedMetadata { - - /** FeedMetadata priceFeedId */ - priceFeedId?: (number|null); - - /** FeedMetadata name */ - name?: (string|null); - - /** FeedMetadata symbol */ - symbol?: (string|null); - - /** FeedMetadata description */ - description?: (string|null); - - /** FeedMetadata assetType */ - assetType?: (lazer.AssetType|null); - - /** FeedMetadata exponent */ - exponent?: (number|null); - - /** FeedMetadata cmcId */ - cmcId?: (number|null); - - /** FeedMetadata fundingRateInterval */ - fundingRateInterval?: (google.protobuf.IDuration|null); - - /** FeedMetadata minPublishers */ - minPublishers?: (number|null); - - /** FeedMetadata minRate */ - minRate?: (google.protobuf.IDuration|null); - - /** FeedMetadata expiryTime */ - expiryTime?: (google.protobuf.IDuration|null); - - /** FeedMetadata isActivated */ - isActivated?: (boolean|null); - - /** FeedMetadata hermesId */ - hermesId?: (string|null); - - /** FeedMetadata quoteCurrency */ - quoteCurrency?: (string|null); - - /** FeedMetadata marketSchedule */ - marketSchedule?: (string|null); - } - - /** Represents a FeedMetadata. */ - class FeedMetadata implements IFeedMetadata { - - /** - * Constructs a new FeedMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: lazer.IFeedMetadata); + /** FeedMetadata symbol. */ + public symbol?: string | null; - /** FeedMetadata priceFeedId. */ - public priceFeedId?: (number|null); + /** FeedMetadata description. */ + public description?: string | null; - /** FeedMetadata name. */ - public name?: (string|null); + /** FeedMetadata assetType. */ + public assetType?: lazer.AssetType | null; - /** FeedMetadata symbol. */ - public symbol?: (string|null); + /** FeedMetadata exponent. */ + public exponent?: number | null; - /** FeedMetadata description. */ - public description?: (string|null); + /** FeedMetadata cmcId. */ + public cmcId?: number | null; - /** FeedMetadata assetType. */ - public assetType?: (lazer.AssetType|null); + /** FeedMetadata fundingRateInterval. */ + public fundingRateInterval?: google.protobuf.IDuration | null; - /** FeedMetadata exponent. */ - public exponent?: (number|null); + /** FeedMetadata minPublishers. */ + public minPublishers?: number | null; - /** FeedMetadata cmcId. */ - public cmcId?: (number|null); + /** FeedMetadata minRate. */ + public minRate?: google.protobuf.IDuration | null; - /** FeedMetadata fundingRateInterval. */ - public fundingRateInterval?: (google.protobuf.IDuration|null); + /** FeedMetadata expiryTime. */ + public expiryTime?: google.protobuf.IDuration | null; - /** FeedMetadata minPublishers. */ - public minPublishers?: (number|null); + /** FeedMetadata isActivated. */ + public isActivated?: boolean | null; - /** FeedMetadata minRate. */ - public minRate?: (google.protobuf.IDuration|null); + /** FeedMetadata hermesId. */ + public hermesId?: string | null; - /** FeedMetadata expiryTime. */ - public expiryTime?: (google.protobuf.IDuration|null); + /** FeedMetadata quoteCurrency. */ + public quoteCurrency?: string | null; - /** FeedMetadata isActivated. */ - public isActivated?: (boolean|null); + /** FeedMetadata marketSchedule. */ + public marketSchedule?: string | null; - /** FeedMetadata hermesId. */ - public hermesId?: (string|null); + /** FeedMetadata _priceFeedId. */ + public _priceFeedId?: "priceFeedId"; - /** FeedMetadata quoteCurrency. */ - public quoteCurrency?: (string|null); + /** FeedMetadata _name. */ + public _name?: "name"; - /** FeedMetadata marketSchedule. */ - public marketSchedule?: (string|null); + /** FeedMetadata _symbol. */ + public _symbol?: "symbol"; - /** FeedMetadata _priceFeedId. */ - public _priceFeedId?: "priceFeedId"; + /** FeedMetadata _description. */ + public _description?: "description"; - /** FeedMetadata _name. */ - public _name?: "name"; - - /** FeedMetadata _symbol. */ - public _symbol?: "symbol"; - - /** FeedMetadata _description. */ - public _description?: "description"; - - /** FeedMetadata _assetType. */ - public _assetType?: "assetType"; - - /** FeedMetadata _exponent. */ - public _exponent?: "exponent"; - - /** FeedMetadata _cmcId. */ - public _cmcId?: "cmcId"; - - /** FeedMetadata _fundingRateInterval. */ - public _fundingRateInterval?: "fundingRateInterval"; - - /** FeedMetadata _minPublishers. */ - public _minPublishers?: "minPublishers"; - - /** FeedMetadata _minRate. */ - public _minRate?: "minRate"; - - /** FeedMetadata _expiryTime. */ - public _expiryTime?: "expiryTime"; - - /** FeedMetadata _isActivated. */ - public _isActivated?: "isActivated"; - - /** FeedMetadata _hermesId. */ - public _hermesId?: "hermesId"; - - /** FeedMetadata _quoteCurrency. */ - public _quoteCurrency?: "quoteCurrency"; - - /** FeedMetadata _marketSchedule. */ - public _marketSchedule?: "marketSchedule"; - - /** - * Creates a new FeedMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns FeedMetadata instance - */ - public static create(properties?: lazer.IFeedMetadata): lazer.FeedMetadata; - - /** - * Encodes the specified FeedMetadata message. Does not implicitly {@link lazer.FeedMetadata.verify|verify} messages. - * @param message FeedMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: lazer.IFeedMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FeedMetadata message, length delimited. Does not implicitly {@link lazer.FeedMetadata.verify|verify} messages. - * @param message FeedMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: lazer.IFeedMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FeedMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FeedMetadata - * @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): lazer.FeedMetadata; - - /** - * Decodes a FeedMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FeedMetadata - * @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)): lazer.FeedMetadata; - - /** - * Verifies a FeedMetadata 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 FeedMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FeedMetadata - */ - public static fromObject(object: { [k: string]: any }): lazer.FeedMetadata; - - /** - * Creates a plain object from a FeedMetadata message. Also converts values to other types if specified. - * @param message FeedMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: lazer.FeedMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FeedMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FeedMetadata - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Feed. */ - interface IFeed { - - /** Feed metadata */ - metadata?: (lazer.IFeedMetadata|null); - - /** Feed pendingActivation */ - pendingActivation?: (google.protobuf.ITimestamp|null); - - /** Feed pendingDeactivation */ - pendingDeactivation?: (google.protobuf.ITimestamp|null); - - /** Feed perPublisher */ - perPublisher?: (lazer.IFeedPublisherState[]|null); - } - - /** Represents a Feed. */ - class Feed implements IFeed { - - /** - * Constructs a new Feed. - * @param [properties] Properties to set - */ - constructor(properties?: lazer.IFeed); - - /** Feed metadata. */ - public metadata?: (lazer.IFeedMetadata|null); - - /** Feed pendingActivation. */ - public pendingActivation?: (google.protobuf.ITimestamp|null); - - /** Feed pendingDeactivation. */ - public pendingDeactivation?: (google.protobuf.ITimestamp|null); - - /** Feed perPublisher. */ - public perPublisher: lazer.IFeedPublisherState[]; - - /** Feed _metadata. */ - public _metadata?: "metadata"; - - /** Feed _pendingActivation. */ - public _pendingActivation?: "pendingActivation"; - - /** Feed _pendingDeactivation. */ - public _pendingDeactivation?: "pendingDeactivation"; - - /** - * Creates a new Feed instance using the specified properties. - * @param [properties] Properties to set - * @returns Feed instance - */ - public static create(properties?: lazer.IFeed): lazer.Feed; - - /** - * Encodes the specified Feed message. Does not implicitly {@link lazer.Feed.verify|verify} messages. - * @param message Feed message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: lazer.IFeed, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Feed message, length delimited. Does not implicitly {@link lazer.Feed.verify|verify} messages. - * @param message Feed message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: lazer.IFeed, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Feed message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Feed - * @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): lazer.Feed; - - /** - * Decodes a Feed message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Feed - * @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)): lazer.Feed; - - /** - * Verifies a Feed 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 Feed message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Feed - */ - public static fromObject(object: { [k: string]: any }): lazer.Feed; - - /** - * Creates a plain object from a Feed message. Also converts values to other types if specified. - * @param message Feed - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: lazer.Feed, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Feed to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Feed - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FeedPublisherState. */ - interface IFeedPublisherState { - - /** FeedPublisherState publisherId */ - publisherId?: (number|null); - - /** FeedPublisherState lastUpdateTimestamp */ - lastUpdateTimestamp?: (google.protobuf.ITimestamp|null); - - /** FeedPublisherState lastPublisherTimestamp */ - lastPublisherTimestamp?: (google.protobuf.ITimestamp|null); + /** FeedMetadata _assetType. */ + public _assetType?: "assetType"; + + /** FeedMetadata _exponent. */ + public _exponent?: "exponent"; + + /** FeedMetadata _cmcId. */ + public _cmcId?: "cmcId"; + + /** FeedMetadata _fundingRateInterval. */ + public _fundingRateInterval?: "fundingRateInterval"; + + /** FeedMetadata _minPublishers. */ + public _minPublishers?: "minPublishers"; + + /** FeedMetadata _minRate. */ + public _minRate?: "minRate"; + + /** FeedMetadata _expiryTime. */ + public _expiryTime?: "expiryTime"; + + /** FeedMetadata _isActivated. */ + public _isActivated?: "isActivated"; + + /** FeedMetadata _hermesId. */ + public _hermesId?: "hermesId"; + + /** FeedMetadata _quoteCurrency. */ + public _quoteCurrency?: "quoteCurrency"; + + /** FeedMetadata _marketSchedule. */ + public _marketSchedule?: "marketSchedule"; + + /** + * Creates a new FeedMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns FeedMetadata instance + */ + public static create(properties?: lazer.IFeedMetadata): lazer.FeedMetadata; + + /** + * Encodes the specified FeedMetadata message. Does not implicitly {@link lazer.FeedMetadata.verify|verify} messages. + * @param message FeedMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: lazer.IFeedMetadata, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified FeedMetadata message, length delimited. Does not implicitly {@link lazer.FeedMetadata.verify|verify} messages. + * @param message FeedMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: lazer.IFeedMetadata, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a FeedMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeedMetadata + * @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, + ): lazer.FeedMetadata; + + /** + * Decodes a FeedMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeedMetadata + * @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, + ): lazer.FeedMetadata; + + /** + * Verifies a FeedMetadata 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 FeedMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeedMetadata + */ + public static fromObject(object: { [k: string]: any }): lazer.FeedMetadata; + + /** + * Creates a plain object from a FeedMetadata message. Also converts values to other types if specified. + * @param message FeedMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: lazer.FeedMetadata, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this FeedMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeedMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Feed. */ + interface IFeed { + /** Feed metadata */ + metadata?: lazer.IFeedMetadata | null; + + /** Feed pendingActivation */ + pendingActivation?: google.protobuf.ITimestamp | null; + + /** Feed pendingDeactivation */ + pendingDeactivation?: google.protobuf.ITimestamp | null; + + /** Feed perPublisher */ + perPublisher?: lazer.IFeedPublisherState[] | null; + } + + /** Represents a Feed. */ + class Feed implements IFeed { + /** + * Constructs a new Feed. + * @param [properties] Properties to set + */ + constructor(properties?: lazer.IFeed); + + /** Feed metadata. */ + public metadata?: lazer.IFeedMetadata | null; + + /** Feed pendingActivation. */ + public pendingActivation?: google.protobuf.ITimestamp | null; + + /** Feed pendingDeactivation. */ + public pendingDeactivation?: google.protobuf.ITimestamp | null; + + /** Feed perPublisher. */ + public perPublisher: lazer.IFeedPublisherState[]; + + /** Feed _metadata. */ + public _metadata?: "metadata"; + + /** Feed _pendingActivation. */ + public _pendingActivation?: "pendingActivation"; + + /** Feed _pendingDeactivation. */ + public _pendingDeactivation?: "pendingDeactivation"; + + /** + * Creates a new Feed instance using the specified properties. + * @param [properties] Properties to set + * @returns Feed instance + */ + public static create(properties?: lazer.IFeed): lazer.Feed; + + /** + * Encodes the specified Feed message. Does not implicitly {@link lazer.Feed.verify|verify} messages. + * @param message Feed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: lazer.IFeed, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified Feed message, length delimited. Does not implicitly {@link lazer.Feed.verify|verify} messages. + * @param message Feed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: lazer.IFeed, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a Feed message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Feed + * @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, + ): lazer.Feed; + + /** + * Decodes a Feed message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Feed + * @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, + ): lazer.Feed; + + /** + * Verifies a Feed 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 Feed message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Feed + */ + public static fromObject(object: { [k: string]: any }): lazer.Feed; + + /** + * Creates a plain object from a Feed message. Also converts values to other types if specified. + * @param message Feed + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: lazer.Feed, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Feed to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Feed + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FeedPublisherState. */ + interface IFeedPublisherState { + /** FeedPublisherState publisherId */ + publisherId?: number | null; + + /** FeedPublisherState lastUpdateTimestamp */ + lastUpdateTimestamp?: google.protobuf.ITimestamp | null; + + /** FeedPublisherState lastPublisherTimestamp */ + lastPublisherTimestamp?: google.protobuf.ITimestamp | null; + + /** FeedPublisherState lastFeedData */ + lastFeedData?: lazer.IFeedData | null; + } + + /** Represents a FeedPublisherState. */ + class FeedPublisherState implements IFeedPublisherState { + /** + * Constructs a new FeedPublisherState. + * @param [properties] Properties to set + */ + constructor(properties?: lazer.IFeedPublisherState); + + /** FeedPublisherState publisherId. */ + public publisherId?: number | null; + + /** FeedPublisherState lastUpdateTimestamp. */ + public lastUpdateTimestamp?: google.protobuf.ITimestamp | null; + + /** FeedPublisherState lastPublisherTimestamp. */ + public lastPublisherTimestamp?: google.protobuf.ITimestamp | null; + + /** FeedPublisherState lastFeedData. */ + public lastFeedData?: lazer.IFeedData | null; + + /** FeedPublisherState _publisherId. */ + public _publisherId?: "publisherId"; + + /** FeedPublisherState _lastUpdateTimestamp. */ + public _lastUpdateTimestamp?: "lastUpdateTimestamp"; + + /** FeedPublisherState _lastPublisherTimestamp. */ + public _lastPublisherTimestamp?: "lastPublisherTimestamp"; + + /** FeedPublisherState _lastFeedData. */ + public _lastFeedData?: "lastFeedData"; + + /** + * Creates a new FeedPublisherState instance using the specified properties. + * @param [properties] Properties to set + * @returns FeedPublisherState instance + */ + public static create( + properties?: lazer.IFeedPublisherState, + ): lazer.FeedPublisherState; + + /** + * Encodes the specified FeedPublisherState message. Does not implicitly {@link lazer.FeedPublisherState.verify|verify} messages. + * @param message FeedPublisherState message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: lazer.IFeedPublisherState, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified FeedPublisherState message, length delimited. Does not implicitly {@link lazer.FeedPublisherState.verify|verify} messages. + * @param message FeedPublisherState message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: lazer.IFeedPublisherState, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a FeedPublisherState message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeedPublisherState + * @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, + ): lazer.FeedPublisherState; + + /** + * Decodes a FeedPublisherState message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeedPublisherState + * @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, + ): lazer.FeedPublisherState; + + /** + * Verifies a FeedPublisherState 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 FeedPublisherState message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeedPublisherState + */ + public static fromObject(object: { + [k: string]: any; + }): lazer.FeedPublisherState; + + /** + * Creates a plain object from a FeedPublisherState message. Also converts values to other types if specified. + * @param message FeedPublisherState + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: lazer.FeedPublisherState, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this FeedPublisherState to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeedPublisherState + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FeedData. */ + interface IFeedData { + /** FeedData sourceTimestamp */ + sourceTimestamp?: google.protobuf.ITimestamp | null; + + /** FeedData publisherTimestamp */ + publisherTimestamp?: google.protobuf.ITimestamp | null; + + /** FeedData price */ + price?: number | Long | null; + + /** FeedData bestBidPrice */ + bestBidPrice?: number | Long | null; + + /** FeedData bestAskPrice */ + bestAskPrice?: number | Long | null; + + /** FeedData fundingRate */ + fundingRate?: number | Long | null; + } + + /** Represents a FeedData. */ + class FeedData implements IFeedData { + /** + * Constructs a new FeedData. + * @param [properties] Properties to set + */ + constructor(properties?: lazer.IFeedData); + + /** FeedData sourceTimestamp. */ + public sourceTimestamp?: google.protobuf.ITimestamp | null; + + /** FeedData publisherTimestamp. */ + public publisherTimestamp?: google.protobuf.ITimestamp | null; + + /** FeedData price. */ + public price?: number | Long | null; + + /** FeedData bestBidPrice. */ + public bestBidPrice?: number | Long | null; + + /** FeedData bestAskPrice. */ + public bestAskPrice?: number | Long | null; + + /** FeedData fundingRate. */ + public fundingRate?: number | Long | null; + + /** FeedData _sourceTimestamp. */ + public _sourceTimestamp?: "sourceTimestamp"; + + /** FeedData _publisherTimestamp. */ + public _publisherTimestamp?: "publisherTimestamp"; + + /** FeedData _price. */ + public _price?: "price"; + + /** FeedData _bestBidPrice. */ + public _bestBidPrice?: "bestBidPrice"; + + /** FeedData _bestAskPrice. */ + public _bestAskPrice?: "bestAskPrice"; + + /** FeedData _fundingRate. */ + public _fundingRate?: "fundingRate"; + + /** + * Creates a new FeedData instance using the specified properties. + * @param [properties] Properties to set + * @returns FeedData instance + */ + public static create(properties?: lazer.IFeedData): lazer.FeedData; + + /** + * Encodes the specified FeedData message. Does not implicitly {@link lazer.FeedData.verify|verify} messages. + * @param message FeedData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: lazer.IFeedData, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified FeedData message, length delimited. Does not implicitly {@link lazer.FeedData.verify|verify} messages. + * @param message FeedData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: lazer.IFeedData, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a FeedData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeedData + * @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, + ): lazer.FeedData; + + /** + * Decodes a FeedData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeedData + * @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, + ): lazer.FeedData; + + /** + * Verifies a FeedData 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 FeedData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeedData + */ + public static fromObject(object: { [k: string]: any }): lazer.FeedData; + + /** + * Creates a plain object from a FeedData message. Also converts values to other types if specified. + * @param message FeedData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: lazer.FeedData, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this FeedData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeedData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } +} - /** FeedPublisherState lastFeedData */ - lastFeedData?: (lazer.IFeedData|null); +/** Namespace google. */ +export namespace google { + /** Namespace protobuf. */ + namespace protobuf { + /** Properties of a Duration. */ + interface IDuration { + /** Duration seconds */ + seconds?: number | Long | null; + + /** Duration nanos */ + nanos?: number | null; } - /** Represents a FeedPublisherState. */ - class FeedPublisherState implements IFeedPublisherState { - - /** - * Constructs a new FeedPublisherState. - * @param [properties] Properties to set - */ - constructor(properties?: lazer.IFeedPublisherState); - - /** FeedPublisherState publisherId. */ - public publisherId?: (number|null); - - /** FeedPublisherState lastUpdateTimestamp. */ - public lastUpdateTimestamp?: (google.protobuf.ITimestamp|null); - - /** FeedPublisherState lastPublisherTimestamp. */ - public lastPublisherTimestamp?: (google.protobuf.ITimestamp|null); - - /** FeedPublisherState lastFeedData. */ - public lastFeedData?: (lazer.IFeedData|null); - - /** FeedPublisherState _publisherId. */ - public _publisherId?: "publisherId"; - - /** FeedPublisherState _lastUpdateTimestamp. */ - public _lastUpdateTimestamp?: "lastUpdateTimestamp"; - - /** FeedPublisherState _lastPublisherTimestamp. */ - public _lastPublisherTimestamp?: "lastPublisherTimestamp"; - - /** FeedPublisherState _lastFeedData. */ - public _lastFeedData?: "lastFeedData"; - - /** - * Creates a new FeedPublisherState instance using the specified properties. - * @param [properties] Properties to set - * @returns FeedPublisherState instance - */ - public static create(properties?: lazer.IFeedPublisherState): lazer.FeedPublisherState; - - /** - * Encodes the specified FeedPublisherState message. Does not implicitly {@link lazer.FeedPublisherState.verify|verify} messages. - * @param message FeedPublisherState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: lazer.IFeedPublisherState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FeedPublisherState message, length delimited. Does not implicitly {@link lazer.FeedPublisherState.verify|verify} messages. - * @param message FeedPublisherState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: lazer.IFeedPublisherState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FeedPublisherState message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FeedPublisherState - * @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): lazer.FeedPublisherState; - - /** - * Decodes a FeedPublisherState message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FeedPublisherState - * @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)): lazer.FeedPublisherState; - - /** - * Verifies a FeedPublisherState 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 FeedPublisherState message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FeedPublisherState - */ - public static fromObject(object: { [k: string]: any }): lazer.FeedPublisherState; - - /** - * Creates a plain object from a FeedPublisherState message. Also converts values to other types if specified. - * @param message FeedPublisherState - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: lazer.FeedPublisherState, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FeedPublisherState to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FeedPublisherState - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** Represents a Duration. */ + class Duration implements IDuration { + /** + * Constructs a new Duration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDuration); + + /** Duration seconds. */ + public seconds: number | Long; + + /** Duration nanos. */ + public nanos: number; + + /** + * Creates a new Duration instance using the specified properties. + * @param [properties] Properties to set + * @returns Duration instance + */ + public static create( + properties?: google.protobuf.IDuration, + ): google.protobuf.Duration; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: google.protobuf.IDuration, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: google.protobuf.IDuration, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Duration + * @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.Duration; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Duration + * @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.Duration; + + /** + * Verifies a Duration 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 Duration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Duration + */ + public static fromObject(object: { + [k: string]: any; + }): google.protobuf.Duration; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @param message Duration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: google.protobuf.Duration, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Duration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Duration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a FeedData. */ - interface IFeedData { - - /** FeedData sourceTimestamp */ - sourceTimestamp?: (google.protobuf.ITimestamp|null); - - /** FeedData publisherTimestamp */ - publisherTimestamp?: (google.protobuf.ITimestamp|null); - - /** FeedData price */ - price?: (number|Long|null); - - /** FeedData bestBidPrice */ - bestBidPrice?: (number|Long|null); + /** Properties of a Timestamp. */ + interface ITimestamp { + /** Timestamp seconds */ + seconds?: number | Long | null; - /** FeedData bestAskPrice */ - bestAskPrice?: (number|Long|null); - - /** FeedData fundingRate */ - fundingRate?: (number|Long|null); - } - - /** Represents a FeedData. */ - class FeedData implements IFeedData { - - /** - * Constructs a new FeedData. - * @param [properties] Properties to set - */ - constructor(properties?: lazer.IFeedData); - - /** FeedData sourceTimestamp. */ - public sourceTimestamp?: (google.protobuf.ITimestamp|null); - - /** FeedData publisherTimestamp. */ - public publisherTimestamp?: (google.protobuf.ITimestamp|null); - - /** FeedData price. */ - public price?: (number|Long|null); - - /** FeedData bestBidPrice. */ - public bestBidPrice?: (number|Long|null); - - /** FeedData bestAskPrice. */ - public bestAskPrice?: (number|Long|null); - - /** FeedData fundingRate. */ - public fundingRate?: (number|Long|null); - - /** FeedData _sourceTimestamp. */ - public _sourceTimestamp?: "sourceTimestamp"; - - /** FeedData _publisherTimestamp. */ - public _publisherTimestamp?: "publisherTimestamp"; - - /** FeedData _price. */ - public _price?: "price"; - - /** FeedData _bestBidPrice. */ - public _bestBidPrice?: "bestBidPrice"; - - /** FeedData _bestAskPrice. */ - public _bestAskPrice?: "bestAskPrice"; - - /** FeedData _fundingRate. */ - public _fundingRate?: "fundingRate"; - - /** - * Creates a new FeedData instance using the specified properties. - * @param [properties] Properties to set - * @returns FeedData instance - */ - public static create(properties?: lazer.IFeedData): lazer.FeedData; - - /** - * Encodes the specified FeedData message. Does not implicitly {@link lazer.FeedData.verify|verify} messages. - * @param message FeedData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: lazer.IFeedData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FeedData message, length delimited. Does not implicitly {@link lazer.FeedData.verify|verify} messages. - * @param message FeedData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: lazer.IFeedData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FeedData message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FeedData - * @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): lazer.FeedData; - - /** - * Decodes a FeedData message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FeedData - * @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)): lazer.FeedData; - - /** - * Verifies a FeedData 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 FeedData message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FeedData - */ - public static fromObject(object: { [k: string]: any }): lazer.FeedData; - - /** - * Creates a plain object from a FeedData message. Also converts values to other types if specified. - * @param message FeedData - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: lazer.FeedData, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FeedData to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FeedData - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** Timestamp nanos */ + nanos?: number | null; } -} - -/** Namespace google. */ -export namespace google { - /** Namespace protobuf. */ - namespace protobuf { - - /** Properties of a Duration. */ - interface IDuration { - - /** Duration seconds */ - seconds?: (number|Long|null); - - /** Duration nanos */ - nanos?: (number|null); - } - - /** Represents a Duration. */ - class Duration implements IDuration { - - /** - * Constructs a new Duration. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDuration); - - /** Duration seconds. */ - public seconds: (number|Long); - - /** Duration nanos. */ - public nanos: number; - - /** - * Creates a new Duration instance using the specified properties. - * @param [properties] Properties to set - * @returns Duration instance - */ - public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; - - /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Duration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Duration - * @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.Duration; - - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Duration - * @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.Duration; - - /** - * Verifies a Duration 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 Duration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Duration - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; - - /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @param message Duration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Duration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Duration - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Timestamp. */ - interface ITimestamp { - - /** Timestamp seconds */ - seconds?: (number|Long|null); - - /** Timestamp nanos */ - nanos?: (number|null); - } - - /** Represents a Timestamp. */ - class Timestamp implements ITimestamp { - - /** - * Constructs a new Timestamp. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ITimestamp); - - /** Timestamp seconds. */ - public seconds: (number|Long); - - /** Timestamp nanos. */ - public nanos: number; - - /** - * Creates a new Timestamp instance using the specified properties. - * @param [properties] Properties to set - * @returns Timestamp instance - */ - public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; - - /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Timestamp message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Timestamp - * @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.Timestamp; - - /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Timestamp - * @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.Timestamp; - - /** - * Verifies a Timestamp 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 Timestamp message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Timestamp - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; - - /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @param message Timestamp - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Timestamp to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Timestamp - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { + /** + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ITimestamp); + + /** Timestamp seconds. */ + public seconds: number | Long; + + /** Timestamp nanos. */ + public nanos: number; + + /** + * Creates a new Timestamp instance using the specified properties. + * @param [properties] Properties to set + * @returns Timestamp instance + */ + public static create( + properties?: google.protobuf.ITimestamp, + ): google.protobuf.Timestamp; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: google.protobuf.ITimestamp, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: google.protobuf.ITimestamp, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Timestamp + * @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.Timestamp; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Timestamp + * @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.Timestamp; + + /** + * Verifies a Timestamp 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 Timestamp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Timestamp + */ + public static fromObject(object: { + [k: string]: any; + }): google.protobuf.Timestamp; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @param message Timestamp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: google.protobuf.Timestamp, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Timestamp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Timestamp + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } + } } diff --git a/lazer/state_sdk/js/src/generated/state.js b/lazer/state_sdk/js/src/generated/state.js index b9017e730a..039c43658e 100644 --- a/lazer/state_sdk/js/src/generated/state.js +++ b/lazer/state_sdk/js/src/generated/state.js @@ -2,3404 +2,3922 @@ 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 lazer = $root.lazer = (() => { +export const lazer = ($root.lazer = (() => { + /** + * Namespace lazer. + * @exports lazer + * @namespace + */ + const lazer = {}; + lazer.State = (function () { /** - * Namespace lazer. - * @exports lazer - * @namespace + * Properties of a State. + * @memberof lazer + * @interface IState + * @property {number|null} [shardId] State shardId + * @property {number|Long|null} [lastSequenceNo] State lastSequenceNo + * @property {google.protobuf.ITimestamp|null} [lastTimestamp] State lastTimestamp + * @property {string|null} [shardName] State shardName + * @property {google.protobuf.IDuration|null} [minRate] State minRate + * @property {Array.|null} [feeds] State feeds + * @property {Array.|null} [publishers] State publishers + */ + + /** + * Constructs a new State. + * @memberof lazer + * @classdesc Represents a State. + * @implements IState + * @constructor + * @param {lazer.IState=} [properties] Properties to set + */ + function State(properties) { + this.feeds = []; + this.publishers = []; + 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]]; + } + + /** + * State shardId. + * @member {number|null|undefined} shardId + * @memberof lazer.State + * @instance + */ + State.prototype.shardId = null; + + /** + * State lastSequenceNo. + * @member {number|Long|null|undefined} lastSequenceNo + * @memberof lazer.State + * @instance + */ + State.prototype.lastSequenceNo = null; + + /** + * State lastTimestamp. + * @member {google.protobuf.ITimestamp|null|undefined} lastTimestamp + * @memberof lazer.State + * @instance + */ + State.prototype.lastTimestamp = null; + + /** + * State shardName. + * @member {string|null|undefined} shardName + * @memberof lazer.State + * @instance + */ + State.prototype.shardName = null; + + /** + * State minRate. + * @member {google.protobuf.IDuration|null|undefined} minRate + * @memberof lazer.State + * @instance + */ + State.prototype.minRate = null; + + /** + * State feeds. + * @member {Array.} feeds + * @memberof lazer.State + * @instance + */ + State.prototype.feeds = $util.emptyArray; + + /** + * State publishers. + * @member {Array.} publishers + * @memberof lazer.State + * @instance + */ + State.prototype.publishers = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * State _shardId. + * @member {"shardId"|undefined} _shardId + * @memberof lazer.State + * @instance + */ + Object.defineProperty(State.prototype, "_shardId", { + get: $util.oneOfGetter(($oneOfFields = ["shardId"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * State _lastSequenceNo. + * @member {"lastSequenceNo"|undefined} _lastSequenceNo + * @memberof lazer.State + * @instance + */ + Object.defineProperty(State.prototype, "_lastSequenceNo", { + get: $util.oneOfGetter(($oneOfFields = ["lastSequenceNo"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * State _lastTimestamp. + * @member {"lastTimestamp"|undefined} _lastTimestamp + * @memberof lazer.State + * @instance + */ + Object.defineProperty(State.prototype, "_lastTimestamp", { + get: $util.oneOfGetter(($oneOfFields = ["lastTimestamp"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * State _shardName. + * @member {"shardName"|undefined} _shardName + * @memberof lazer.State + * @instance + */ + Object.defineProperty(State.prototype, "_shardName", { + get: $util.oneOfGetter(($oneOfFields = ["shardName"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * State _minRate. + * @member {"minRate"|undefined} _minRate + * @memberof lazer.State + * @instance + */ + Object.defineProperty(State.prototype, "_minRate", { + get: $util.oneOfGetter(($oneOfFields = ["minRate"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Creates a new State instance using the specified properties. + * @function create + * @memberof lazer.State + * @static + * @param {lazer.IState=} [properties] Properties to set + * @returns {lazer.State} State instance + */ + State.create = function create(properties) { + return new State(properties); + }; + + /** + * Encodes the specified State message. Does not implicitly {@link lazer.State.verify|verify} messages. + * @function encode + * @memberof lazer.State + * @static + * @param {lazer.IState} message State message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + State.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if ( + message.shardId != null && + Object.hasOwnProperty.call(message, "shardId") + ) + writer.uint32(/* id 1, wireType 0 =*/ 8).uint32(message.shardId); + if ( + message.lastSequenceNo != null && + Object.hasOwnProperty.call(message, "lastSequenceNo") + ) + writer + .uint32(/* id 2, wireType 0 =*/ 16) + .uint64(message.lastSequenceNo); + if ( + message.lastTimestamp != null && + Object.hasOwnProperty.call(message, "lastTimestamp") + ) + $root.google.protobuf.Timestamp.encode( + message.lastTimestamp, + writer.uint32(/* id 3, wireType 2 =*/ 26).fork(), + ).ldelim(); + if ( + message.shardName != null && + Object.hasOwnProperty.call(message, "shardName") + ) + writer.uint32(/* id 4, wireType 2 =*/ 34).string(message.shardName); + if ( + message.minRate != null && + Object.hasOwnProperty.call(message, "minRate") + ) + $root.google.protobuf.Duration.encode( + message.minRate, + writer.uint32(/* id 5, wireType 2 =*/ 42).fork(), + ).ldelim(); + if (message.feeds != null && message.feeds.length) + for (let i = 0; i < message.feeds.length; ++i) + $root.lazer.Feed.encode( + message.feeds[i], + writer.uint32(/* id 7, wireType 2 =*/ 58).fork(), + ).ldelim(); + if (message.publishers != null && message.publishers.length) + for (let i = 0; i < message.publishers.length; ++i) + $root.lazer.Publisher.encode( + message.publishers[i], + writer.uint32(/* id 8, wireType 2 =*/ 66).fork(), + ).ldelim(); + return writer; + }; + + /** + * Encodes the specified State message, length delimited. Does not implicitly {@link lazer.State.verify|verify} messages. + * @function encodeDelimited + * @memberof lazer.State + * @static + * @param {lazer.IState} message State message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + State.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a State message from the specified reader or buffer. + * @function decode + * @memberof lazer.State + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {lazer.State} State + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + State.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.lazer.State(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.shardId = reader.uint32(); + break; + } + case 2: { + message.lastSequenceNo = reader.uint64(); + break; + } + case 3: { + message.lastTimestamp = $root.google.protobuf.Timestamp.decode( + reader, + reader.uint32(), + ); + break; + } + case 4: { + message.shardName = reader.string(); + break; + } + case 5: { + message.minRate = $root.google.protobuf.Duration.decode( + reader, + reader.uint32(), + ); + break; + } + case 7: { + if (!(message.feeds && message.feeds.length)) message.feeds = []; + message.feeds.push( + $root.lazer.Feed.decode(reader, reader.uint32()), + ); + break; + } + case 8: { + if (!(message.publishers && message.publishers.length)) + message.publishers = []; + message.publishers.push( + $root.lazer.Publisher.decode(reader, reader.uint32()), + ); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a State message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof lazer.State + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {lazer.State} State + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + State.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a State message. + * @function verify + * @memberof lazer.State + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + State.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if (message.shardId != null && message.hasOwnProperty("shardId")) { + properties._shardId = 1; + if (!$util.isInteger(message.shardId)) + return "shardId: integer expected"; + } + if ( + message.lastSequenceNo != null && + message.hasOwnProperty("lastSequenceNo") + ) { + properties._lastSequenceNo = 1; + if ( + !$util.isInteger(message.lastSequenceNo) && + !( + message.lastSequenceNo && + $util.isInteger(message.lastSequenceNo.low) && + $util.isInteger(message.lastSequenceNo.high) + ) + ) + return "lastSequenceNo: integer|Long expected"; + } + if ( + message.lastTimestamp != null && + message.hasOwnProperty("lastTimestamp") + ) { + properties._lastTimestamp = 1; + { + let error = $root.google.protobuf.Timestamp.verify( + message.lastTimestamp, + ); + if (error) return "lastTimestamp." + error; + } + } + if (message.shardName != null && message.hasOwnProperty("shardName")) { + properties._shardName = 1; + if (!$util.isString(message.shardName)) + return "shardName: string expected"; + } + if (message.minRate != null && message.hasOwnProperty("minRate")) { + properties._minRate = 1; + { + let error = $root.google.protobuf.Duration.verify(message.minRate); + if (error) return "minRate." + error; + } + } + if (message.feeds != null && message.hasOwnProperty("feeds")) { + if (!Array.isArray(message.feeds)) return "feeds: array expected"; + for (let i = 0; i < message.feeds.length; ++i) { + let error = $root.lazer.Feed.verify(message.feeds[i]); + if (error) return "feeds." + error; + } + } + if (message.publishers != null && message.hasOwnProperty("publishers")) { + if (!Array.isArray(message.publishers)) + return "publishers: array expected"; + for (let i = 0; i < message.publishers.length; ++i) { + let error = $root.lazer.Publisher.verify(message.publishers[i]); + if (error) return "publishers." + error; + } + } + return null; + }; + + /** + * Creates a State message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof lazer.State + * @static + * @param {Object.} object Plain object + * @returns {lazer.State} State + */ + State.fromObject = function fromObject(object) { + if (object instanceof $root.lazer.State) return object; + let message = new $root.lazer.State(); + if (object.shardId != null) message.shardId = object.shardId >>> 0; + if (object.lastSequenceNo != null) + if ($util.Long) + (message.lastSequenceNo = $util.Long.fromValue( + object.lastSequenceNo, + )).unsigned = true; + else if (typeof object.lastSequenceNo === "string") + message.lastSequenceNo = parseInt(object.lastSequenceNo, 10); + else if (typeof object.lastSequenceNo === "number") + message.lastSequenceNo = object.lastSequenceNo; + else if (typeof object.lastSequenceNo === "object") + message.lastSequenceNo = new $util.LongBits( + object.lastSequenceNo.low >>> 0, + object.lastSequenceNo.high >>> 0, + ).toNumber(true); + if (object.lastTimestamp != null) { + if (typeof object.lastTimestamp !== "object") + throw TypeError(".lazer.State.lastTimestamp: object expected"); + message.lastTimestamp = $root.google.protobuf.Timestamp.fromObject( + object.lastTimestamp, + ); + } + if (object.shardName != null) + message.shardName = String(object.shardName); + if (object.minRate != null) { + if (typeof object.minRate !== "object") + throw TypeError(".lazer.State.minRate: object expected"); + message.minRate = $root.google.protobuf.Duration.fromObject( + object.minRate, + ); + } + if (object.feeds) { + if (!Array.isArray(object.feeds)) + throw TypeError(".lazer.State.feeds: array expected"); + message.feeds = []; + for (let i = 0; i < object.feeds.length; ++i) { + if (typeof object.feeds[i] !== "object") + throw TypeError(".lazer.State.feeds: object expected"); + message.feeds[i] = $root.lazer.Feed.fromObject(object.feeds[i]); + } + } + if (object.publishers) { + if (!Array.isArray(object.publishers)) + throw TypeError(".lazer.State.publishers: array expected"); + message.publishers = []; + for (let i = 0; i < object.publishers.length; ++i) { + if (typeof object.publishers[i] !== "object") + throw TypeError(".lazer.State.publishers: object expected"); + message.publishers[i] = $root.lazer.Publisher.fromObject( + object.publishers[i], + ); + } + } + return message; + }; + + /** + * Creates a plain object from a State message. Also converts values to other types if specified. + * @function toObject + * @memberof lazer.State + * @static + * @param {lazer.State} message State + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + State.toObject = function toObject(message, options) { + if (!options) options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.feeds = []; + object.publishers = []; + } + if (message.shardId != null && message.hasOwnProperty("shardId")) { + object.shardId = message.shardId; + if (options.oneofs) object._shardId = "shardId"; + } + if ( + message.lastSequenceNo != null && + message.hasOwnProperty("lastSequenceNo") + ) { + if (typeof message.lastSequenceNo === "number") + object.lastSequenceNo = + options.longs === String + ? String(message.lastSequenceNo) + : message.lastSequenceNo; + else + object.lastSequenceNo = + options.longs === String + ? $util.Long.prototype.toString.call(message.lastSequenceNo) + : options.longs === Number + ? new $util.LongBits( + message.lastSequenceNo.low >>> 0, + message.lastSequenceNo.high >>> 0, + ).toNumber(true) + : message.lastSequenceNo; + if (options.oneofs) object._lastSequenceNo = "lastSequenceNo"; + } + if ( + message.lastTimestamp != null && + message.hasOwnProperty("lastTimestamp") + ) { + object.lastTimestamp = $root.google.protobuf.Timestamp.toObject( + message.lastTimestamp, + options, + ); + if (options.oneofs) object._lastTimestamp = "lastTimestamp"; + } + if (message.shardName != null && message.hasOwnProperty("shardName")) { + object.shardName = message.shardName; + if (options.oneofs) object._shardName = "shardName"; + } + if (message.minRate != null && message.hasOwnProperty("minRate")) { + object.minRate = $root.google.protobuf.Duration.toObject( + message.minRate, + options, + ); + if (options.oneofs) object._minRate = "minRate"; + } + if (message.feeds && message.feeds.length) { + object.feeds = []; + for (let j = 0; j < message.feeds.length; ++j) + object.feeds[j] = $root.lazer.Feed.toObject( + message.feeds[j], + options, + ); + } + if (message.publishers && message.publishers.length) { + object.publishers = []; + for (let j = 0; j < message.publishers.length; ++j) + object.publishers[j] = $root.lazer.Publisher.toObject( + message.publishers[j], + options, + ); + } + return object; + }; + + /** + * Converts this State to JSON. + * @function toJSON + * @memberof lazer.State + * @instance + * @returns {Object.} JSON object + */ + State.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for State + * @function getTypeUrl + * @memberof lazer.State + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + State.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/lazer.State"; + }; + + return State; + })(); + + lazer.Publisher = (function () { + /** + * Properties of a Publisher. + * @memberof lazer + * @interface IPublisher + * @property {number|null} [publisherId] Publisher publisherId + * @property {string|null} [name] Publisher name + * @property {Array.|null} [publicKeys] Publisher publicKeys + * @property {boolean|null} [isActive] Publisher isActive + */ + + /** + * Constructs a new Publisher. + * @memberof lazer + * @classdesc Represents a Publisher. + * @implements IPublisher + * @constructor + * @param {lazer.IPublisher=} [properties] Properties to set + */ + function Publisher(properties) { + this.publicKeys = []; + 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]]; + } + + /** + * Publisher publisherId. + * @member {number|null|undefined} publisherId + * @memberof lazer.Publisher + * @instance + */ + Publisher.prototype.publisherId = null; + + /** + * Publisher name. + * @member {string|null|undefined} name + * @memberof lazer.Publisher + * @instance + */ + Publisher.prototype.name = null; + + /** + * Publisher publicKeys. + * @member {Array.} publicKeys + * @memberof lazer.Publisher + * @instance + */ + Publisher.prototype.publicKeys = $util.emptyArray; + + /** + * Publisher isActive. + * @member {boolean|null|undefined} isActive + * @memberof lazer.Publisher + * @instance + */ + Publisher.prototype.isActive = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * Publisher _publisherId. + * @member {"publisherId"|undefined} _publisherId + * @memberof lazer.Publisher + * @instance + */ + Object.defineProperty(Publisher.prototype, "_publisherId", { + get: $util.oneOfGetter(($oneOfFields = ["publisherId"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Publisher _name. + * @member {"name"|undefined} _name + * @memberof lazer.Publisher + * @instance + */ + Object.defineProperty(Publisher.prototype, "_name", { + get: $util.oneOfGetter(($oneOfFields = ["name"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Publisher _isActive. + * @member {"isActive"|undefined} _isActive + * @memberof lazer.Publisher + * @instance + */ + Object.defineProperty(Publisher.prototype, "_isActive", { + get: $util.oneOfGetter(($oneOfFields = ["isActive"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Creates a new Publisher instance using the specified properties. + * @function create + * @memberof lazer.Publisher + * @static + * @param {lazer.IPublisher=} [properties] Properties to set + * @returns {lazer.Publisher} Publisher instance + */ + Publisher.create = function create(properties) { + return new Publisher(properties); + }; + + /** + * Encodes the specified Publisher message. Does not implicitly {@link lazer.Publisher.verify|verify} messages. + * @function encode + * @memberof lazer.Publisher + * @static + * @param {lazer.IPublisher} message Publisher message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Publisher.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if ( + message.publisherId != null && + Object.hasOwnProperty.call(message, "publisherId") + ) + writer.uint32(/* id 1, wireType 0 =*/ 8).uint32(message.publisherId); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 2, wireType 2 =*/ 18).string(message.name); + if (message.publicKeys != null && message.publicKeys.length) + for (let i = 0; i < message.publicKeys.length; ++i) + writer + .uint32(/* id 3, wireType 2 =*/ 26) + .bytes(message.publicKeys[i]); + if ( + message.isActive != null && + Object.hasOwnProperty.call(message, "isActive") + ) + writer.uint32(/* id 4, wireType 0 =*/ 32).bool(message.isActive); + return writer; + }; + + /** + * Encodes the specified Publisher message, length delimited. Does not implicitly {@link lazer.Publisher.verify|verify} messages. + * @function encodeDelimited + * @memberof lazer.Publisher + * @static + * @param {lazer.IPublisher} message Publisher message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Publisher.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Publisher message from the specified reader or buffer. + * @function decode + * @memberof lazer.Publisher + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {lazer.Publisher} Publisher + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Publisher.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.lazer.Publisher(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.publisherId = reader.uint32(); + break; + } + case 2: { + message.name = reader.string(); + break; + } + case 3: { + if (!(message.publicKeys && message.publicKeys.length)) + message.publicKeys = []; + message.publicKeys.push(reader.bytes()); + break; + } + case 4: { + message.isActive = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Publisher message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof lazer.Publisher + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {lazer.Publisher} Publisher + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Publisher.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Publisher message. + * @function verify + * @memberof lazer.Publisher + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Publisher.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if ( + message.publisherId != null && + message.hasOwnProperty("publisherId") + ) { + properties._publisherId = 1; + if (!$util.isInteger(message.publisherId)) + return "publisherId: integer expected"; + } + if (message.name != null && message.hasOwnProperty("name")) { + properties._name = 1; + if (!$util.isString(message.name)) return "name: string expected"; + } + if (message.publicKeys != null && message.hasOwnProperty("publicKeys")) { + if (!Array.isArray(message.publicKeys)) + return "publicKeys: array expected"; + for (let i = 0; i < message.publicKeys.length; ++i) + if ( + !( + (message.publicKeys[i] && + typeof message.publicKeys[i].length === "number") || + $util.isString(message.publicKeys[i]) + ) + ) + return "publicKeys: buffer[] expected"; + } + if (message.isActive != null && message.hasOwnProperty("isActive")) { + properties._isActive = 1; + if (typeof message.isActive !== "boolean") + return "isActive: boolean expected"; + } + return null; + }; + + /** + * Creates a Publisher message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof lazer.Publisher + * @static + * @param {Object.} object Plain object + * @returns {lazer.Publisher} Publisher + */ + Publisher.fromObject = function fromObject(object) { + if (object instanceof $root.lazer.Publisher) return object; + let message = new $root.lazer.Publisher(); + if (object.publisherId != null) + message.publisherId = object.publisherId >>> 0; + if (object.name != null) message.name = String(object.name); + if (object.publicKeys) { + if (!Array.isArray(object.publicKeys)) + throw TypeError(".lazer.Publisher.publicKeys: array expected"); + message.publicKeys = []; + for (let i = 0; i < object.publicKeys.length; ++i) + if (typeof object.publicKeys[i] === "string") + $util.base64.decode( + object.publicKeys[i], + (message.publicKeys[i] = $util.newBuffer( + $util.base64.length(object.publicKeys[i]), + )), + 0, + ); + else if (object.publicKeys[i].length >= 0) + message.publicKeys[i] = object.publicKeys[i]; + } + if (object.isActive != null) message.isActive = Boolean(object.isActive); + return message; + }; + + /** + * Creates a plain object from a Publisher message. Also converts values to other types if specified. + * @function toObject + * @memberof lazer.Publisher + * @static + * @param {lazer.Publisher} message Publisher + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Publisher.toObject = function toObject(message, options) { + if (!options) options = {}; + let object = {}; + if (options.arrays || options.defaults) object.publicKeys = []; + if ( + message.publisherId != null && + message.hasOwnProperty("publisherId") + ) { + object.publisherId = message.publisherId; + if (options.oneofs) object._publisherId = "publisherId"; + } + if (message.name != null && message.hasOwnProperty("name")) { + object.name = message.name; + if (options.oneofs) object._name = "name"; + } + if (message.publicKeys && message.publicKeys.length) { + object.publicKeys = []; + for (let j = 0; j < message.publicKeys.length; ++j) + object.publicKeys[j] = + options.bytes === String + ? $util.base64.encode( + message.publicKeys[j], + 0, + message.publicKeys[j].length, + ) + : options.bytes === Array + ? Array.prototype.slice.call(message.publicKeys[j]) + : message.publicKeys[j]; + } + if (message.isActive != null && message.hasOwnProperty("isActive")) { + object.isActive = message.isActive; + if (options.oneofs) object._isActive = "isActive"; + } + return object; + }; + + /** + * Converts this Publisher to JSON. + * @function toJSON + * @memberof lazer.Publisher + * @instance + * @returns {Object.} JSON object + */ + Publisher.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Publisher + * @function getTypeUrl + * @memberof lazer.Publisher + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Publisher.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/lazer.Publisher"; + }; + + return Publisher; + })(); + + /** + * AssetType enum. + * @name lazer.AssetType + * @enum {number} + * @property {number} CRYPTO=0 CRYPTO value + * @property {number} FUNDING_RATE=1 FUNDING_RATE value + * @property {number} FX=2 FX value + * @property {number} COMMODITY=3 COMMODITY value + * @property {number} NAV=4 NAV value + * @property {number} CRYPTO_INDEX=5 CRYPTO_INDEX value + * @property {number} CRYPTO_REDEMPTION_RATE=6 CRYPTO_REDEMPTION_RATE value + * @property {number} EQUITY=7 EQUITY value + * @property {number} METAL=8 METAL value + * @property {number} RATES=9 RATES value + */ + lazer.AssetType = (function () { + const valuesById = {}, + values = Object.create(valuesById); + values[(valuesById[0] = "CRYPTO")] = 0; + values[(valuesById[1] = "FUNDING_RATE")] = 1; + values[(valuesById[2] = "FX")] = 2; + values[(valuesById[3] = "COMMODITY")] = 3; + values[(valuesById[4] = "NAV")] = 4; + values[(valuesById[5] = "CRYPTO_INDEX")] = 5; + values[(valuesById[6] = "CRYPTO_REDEMPTION_RATE")] = 6; + values[(valuesById[7] = "EQUITY")] = 7; + values[(valuesById[8] = "METAL")] = 8; + values[(valuesById[9] = "RATES")] = 9; + return values; + })(); + + lazer.FeedMetadata = (function () { + /** + * Properties of a FeedMetadata. + * @memberof lazer + * @interface IFeedMetadata + * @property {number|null} [priceFeedId] FeedMetadata priceFeedId + * @property {string|null} [name] FeedMetadata name + * @property {string|null} [symbol] FeedMetadata symbol + * @property {string|null} [description] FeedMetadata description + * @property {lazer.AssetType|null} [assetType] FeedMetadata assetType + * @property {number|null} [exponent] FeedMetadata exponent + * @property {number|null} [cmcId] FeedMetadata cmcId + * @property {google.protobuf.IDuration|null} [fundingRateInterval] FeedMetadata fundingRateInterval + * @property {number|null} [minPublishers] FeedMetadata minPublishers + * @property {google.protobuf.IDuration|null} [minRate] FeedMetadata minRate + * @property {google.protobuf.IDuration|null} [expiryTime] FeedMetadata expiryTime + * @property {boolean|null} [isActivated] FeedMetadata isActivated + * @property {string|null} [hermesId] FeedMetadata hermesId + * @property {string|null} [quoteCurrency] FeedMetadata quoteCurrency + * @property {string|null} [marketSchedule] FeedMetadata marketSchedule + */ + + /** + * Constructs a new FeedMetadata. + * @memberof lazer + * @classdesc Represents a FeedMetadata. + * @implements IFeedMetadata + * @constructor + * @param {lazer.IFeedMetadata=} [properties] Properties to set + */ + function FeedMetadata(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]]; + } + + /** + * FeedMetadata priceFeedId. + * @member {number|null|undefined} priceFeedId + * @memberof lazer.FeedMetadata + * @instance + */ + FeedMetadata.prototype.priceFeedId = null; + + /** + * FeedMetadata name. + * @member {string|null|undefined} name + * @memberof lazer.FeedMetadata + * @instance + */ + FeedMetadata.prototype.name = null; + + /** + * FeedMetadata symbol. + * @member {string|null|undefined} symbol + * @memberof lazer.FeedMetadata + * @instance + */ + FeedMetadata.prototype.symbol = null; + + /** + * FeedMetadata description. + * @member {string|null|undefined} description + * @memberof lazer.FeedMetadata + * @instance + */ + FeedMetadata.prototype.description = null; + + /** + * FeedMetadata assetType. + * @member {lazer.AssetType|null|undefined} assetType + * @memberof lazer.FeedMetadata + * @instance + */ + FeedMetadata.prototype.assetType = null; + + /** + * FeedMetadata exponent. + * @member {number|null|undefined} exponent + * @memberof lazer.FeedMetadata + * @instance + */ + FeedMetadata.prototype.exponent = null; + + /** + * FeedMetadata cmcId. + * @member {number|null|undefined} cmcId + * @memberof lazer.FeedMetadata + * @instance + */ + FeedMetadata.prototype.cmcId = null; + + /** + * FeedMetadata fundingRateInterval. + * @member {google.protobuf.IDuration|null|undefined} fundingRateInterval + * @memberof lazer.FeedMetadata + * @instance + */ + FeedMetadata.prototype.fundingRateInterval = null; + + /** + * FeedMetadata minPublishers. + * @member {number|null|undefined} minPublishers + * @memberof lazer.FeedMetadata + * @instance + */ + FeedMetadata.prototype.minPublishers = null; + + /** + * FeedMetadata minRate. + * @member {google.protobuf.IDuration|null|undefined} minRate + * @memberof lazer.FeedMetadata + * @instance + */ + FeedMetadata.prototype.minRate = null; + + /** + * FeedMetadata expiryTime. + * @member {google.protobuf.IDuration|null|undefined} expiryTime + * @memberof lazer.FeedMetadata + * @instance + */ + FeedMetadata.prototype.expiryTime = null; + + /** + * FeedMetadata isActivated. + * @member {boolean|null|undefined} isActivated + * @memberof lazer.FeedMetadata + * @instance + */ + FeedMetadata.prototype.isActivated = null; + + /** + * FeedMetadata hermesId. + * @member {string|null|undefined} hermesId + * @memberof lazer.FeedMetadata + * @instance + */ + FeedMetadata.prototype.hermesId = null; + + /** + * FeedMetadata quoteCurrency. + * @member {string|null|undefined} quoteCurrency + * @memberof lazer.FeedMetadata + * @instance + */ + FeedMetadata.prototype.quoteCurrency = null; + + /** + * FeedMetadata marketSchedule. + * @member {string|null|undefined} marketSchedule + * @memberof lazer.FeedMetadata + * @instance + */ + FeedMetadata.prototype.marketSchedule = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * FeedMetadata _priceFeedId. + * @member {"priceFeedId"|undefined} _priceFeedId + * @memberof lazer.FeedMetadata + * @instance + */ + Object.defineProperty(FeedMetadata.prototype, "_priceFeedId", { + get: $util.oneOfGetter(($oneOfFields = ["priceFeedId"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * FeedMetadata _name. + * @member {"name"|undefined} _name + * @memberof lazer.FeedMetadata + * @instance + */ + Object.defineProperty(FeedMetadata.prototype, "_name", { + get: $util.oneOfGetter(($oneOfFields = ["name"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * FeedMetadata _symbol. + * @member {"symbol"|undefined} _symbol + * @memberof lazer.FeedMetadata + * @instance + */ + Object.defineProperty(FeedMetadata.prototype, "_symbol", { + get: $util.oneOfGetter(($oneOfFields = ["symbol"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * FeedMetadata _description. + * @member {"description"|undefined} _description + * @memberof lazer.FeedMetadata + * @instance + */ + Object.defineProperty(FeedMetadata.prototype, "_description", { + get: $util.oneOfGetter(($oneOfFields = ["description"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * FeedMetadata _assetType. + * @member {"assetType"|undefined} _assetType + * @memberof lazer.FeedMetadata + * @instance + */ + Object.defineProperty(FeedMetadata.prototype, "_assetType", { + get: $util.oneOfGetter(($oneOfFields = ["assetType"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * FeedMetadata _exponent. + * @member {"exponent"|undefined} _exponent + * @memberof lazer.FeedMetadata + * @instance + */ + Object.defineProperty(FeedMetadata.prototype, "_exponent", { + get: $util.oneOfGetter(($oneOfFields = ["exponent"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * FeedMetadata _cmcId. + * @member {"cmcId"|undefined} _cmcId + * @memberof lazer.FeedMetadata + * @instance + */ + Object.defineProperty(FeedMetadata.prototype, "_cmcId", { + get: $util.oneOfGetter(($oneOfFields = ["cmcId"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * FeedMetadata _fundingRateInterval. + * @member {"fundingRateInterval"|undefined} _fundingRateInterval + * @memberof lazer.FeedMetadata + * @instance + */ + Object.defineProperty(FeedMetadata.prototype, "_fundingRateInterval", { + get: $util.oneOfGetter(($oneOfFields = ["fundingRateInterval"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * FeedMetadata _minPublishers. + * @member {"minPublishers"|undefined} _minPublishers + * @memberof lazer.FeedMetadata + * @instance + */ + Object.defineProperty(FeedMetadata.prototype, "_minPublishers", { + get: $util.oneOfGetter(($oneOfFields = ["minPublishers"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * FeedMetadata _minRate. + * @member {"minRate"|undefined} _minRate + * @memberof lazer.FeedMetadata + * @instance + */ + Object.defineProperty(FeedMetadata.prototype, "_minRate", { + get: $util.oneOfGetter(($oneOfFields = ["minRate"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * FeedMetadata _expiryTime. + * @member {"expiryTime"|undefined} _expiryTime + * @memberof lazer.FeedMetadata + * @instance + */ + Object.defineProperty(FeedMetadata.prototype, "_expiryTime", { + get: $util.oneOfGetter(($oneOfFields = ["expiryTime"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * FeedMetadata _isActivated. + * @member {"isActivated"|undefined} _isActivated + * @memberof lazer.FeedMetadata + * @instance + */ + Object.defineProperty(FeedMetadata.prototype, "_isActivated", { + get: $util.oneOfGetter(($oneOfFields = ["isActivated"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * FeedMetadata _hermesId. + * @member {"hermesId"|undefined} _hermesId + * @memberof lazer.FeedMetadata + * @instance + */ + Object.defineProperty(FeedMetadata.prototype, "_hermesId", { + get: $util.oneOfGetter(($oneOfFields = ["hermesId"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * FeedMetadata _quoteCurrency. + * @member {"quoteCurrency"|undefined} _quoteCurrency + * @memberof lazer.FeedMetadata + * @instance + */ + Object.defineProperty(FeedMetadata.prototype, "_quoteCurrency", { + get: $util.oneOfGetter(($oneOfFields = ["quoteCurrency"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * FeedMetadata _marketSchedule. + * @member {"marketSchedule"|undefined} _marketSchedule + * @memberof lazer.FeedMetadata + * @instance + */ + Object.defineProperty(FeedMetadata.prototype, "_marketSchedule", { + get: $util.oneOfGetter(($oneOfFields = ["marketSchedule"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Creates a new FeedMetadata instance using the specified properties. + * @function create + * @memberof lazer.FeedMetadata + * @static + * @param {lazer.IFeedMetadata=} [properties] Properties to set + * @returns {lazer.FeedMetadata} FeedMetadata instance + */ + FeedMetadata.create = function create(properties) { + return new FeedMetadata(properties); + }; + + /** + * Encodes the specified FeedMetadata message. Does not implicitly {@link lazer.FeedMetadata.verify|verify} messages. + * @function encode + * @memberof lazer.FeedMetadata + * @static + * @param {lazer.IFeedMetadata} message FeedMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeedMetadata.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if ( + message.priceFeedId != null && + Object.hasOwnProperty.call(message, "priceFeedId") + ) + writer.uint32(/* id 1, wireType 0 =*/ 8).uint32(message.priceFeedId); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 2, wireType 2 =*/ 18).string(message.name); + if ( + message.symbol != null && + Object.hasOwnProperty.call(message, "symbol") + ) + writer.uint32(/* id 3, wireType 2 =*/ 26).string(message.symbol); + if ( + message.description != null && + Object.hasOwnProperty.call(message, "description") + ) + writer.uint32(/* id 4, wireType 2 =*/ 34).string(message.description); + if ( + message.assetType != null && + Object.hasOwnProperty.call(message, "assetType") + ) + writer.uint32(/* id 5, wireType 0 =*/ 40).int32(message.assetType); + if ( + message.exponent != null && + Object.hasOwnProperty.call(message, "exponent") + ) + writer.uint32(/* id 6, wireType 0 =*/ 48).sint32(message.exponent); + if (message.cmcId != null && Object.hasOwnProperty.call(message, "cmcId")) + writer.uint32(/* id 7, wireType 0 =*/ 56).uint32(message.cmcId); + if ( + message.fundingRateInterval != null && + Object.hasOwnProperty.call(message, "fundingRateInterval") + ) + $root.google.protobuf.Duration.encode( + message.fundingRateInterval, + writer.uint32(/* id 8, wireType 2 =*/ 66).fork(), + ).ldelim(); + if ( + message.minPublishers != null && + Object.hasOwnProperty.call(message, "minPublishers") + ) + writer.uint32(/* id 9, wireType 0 =*/ 72).uint32(message.minPublishers); + if ( + message.minRate != null && + Object.hasOwnProperty.call(message, "minRate") + ) + $root.google.protobuf.Duration.encode( + message.minRate, + writer.uint32(/* id 10, wireType 2 =*/ 82).fork(), + ).ldelim(); + if ( + message.expiryTime != null && + Object.hasOwnProperty.call(message, "expiryTime") + ) + $root.google.protobuf.Duration.encode( + message.expiryTime, + writer.uint32(/* id 11, wireType 2 =*/ 90).fork(), + ).ldelim(); + if ( + message.isActivated != null && + Object.hasOwnProperty.call(message, "isActivated") + ) + writer.uint32(/* id 12, wireType 0 =*/ 96).bool(message.isActivated); + if ( + message.hermesId != null && + Object.hasOwnProperty.call(message, "hermesId") + ) + writer.uint32(/* id 13, wireType 2 =*/ 106).string(message.hermesId); + if ( + message.quoteCurrency != null && + Object.hasOwnProperty.call(message, "quoteCurrency") + ) + writer + .uint32(/* id 14, wireType 2 =*/ 114) + .string(message.quoteCurrency); + if ( + message.marketSchedule != null && + Object.hasOwnProperty.call(message, "marketSchedule") + ) + writer + .uint32(/* id 15, wireType 2 =*/ 122) + .string(message.marketSchedule); + return writer; + }; + + /** + * Encodes the specified FeedMetadata message, length delimited. Does not implicitly {@link lazer.FeedMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof lazer.FeedMetadata + * @static + * @param {lazer.IFeedMetadata} message FeedMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeedMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeedMetadata message from the specified reader or buffer. + * @function decode + * @memberof lazer.FeedMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {lazer.FeedMetadata} FeedMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeedMetadata.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.lazer.FeedMetadata(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.priceFeedId = reader.uint32(); + break; + } + case 2: { + message.name = reader.string(); + break; + } + case 3: { + message.symbol = reader.string(); + break; + } + case 4: { + message.description = reader.string(); + break; + } + case 5: { + message.assetType = reader.int32(); + break; + } + case 6: { + message.exponent = reader.sint32(); + break; + } + case 7: { + message.cmcId = reader.uint32(); + break; + } + case 8: { + message.fundingRateInterval = $root.google.protobuf.Duration.decode( + reader, + reader.uint32(), + ); + break; + } + case 9: { + message.minPublishers = reader.uint32(); + break; + } + case 10: { + message.minRate = $root.google.protobuf.Duration.decode( + reader, + reader.uint32(), + ); + break; + } + case 11: { + message.expiryTime = $root.google.protobuf.Duration.decode( + reader, + reader.uint32(), + ); + break; + } + case 12: { + message.isActivated = reader.bool(); + break; + } + case 13: { + message.hermesId = reader.string(); + break; + } + case 14: { + message.quoteCurrency = reader.string(); + break; + } + case 15: { + message.marketSchedule = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeedMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof lazer.FeedMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {lazer.FeedMetadata} FeedMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeedMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeedMetadata message. + * @function verify + * @memberof lazer.FeedMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeedMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if ( + message.priceFeedId != null && + message.hasOwnProperty("priceFeedId") + ) { + properties._priceFeedId = 1; + if (!$util.isInteger(message.priceFeedId)) + return "priceFeedId: integer expected"; + } + if (message.name != null && message.hasOwnProperty("name")) { + properties._name = 1; + if (!$util.isString(message.name)) return "name: string expected"; + } + if (message.symbol != null && message.hasOwnProperty("symbol")) { + properties._symbol = 1; + if (!$util.isString(message.symbol)) return "symbol: string expected"; + } + if ( + message.description != null && + message.hasOwnProperty("description") + ) { + properties._description = 1; + if (!$util.isString(message.description)) + return "description: string expected"; + } + if (message.assetType != null && message.hasOwnProperty("assetType")) { + properties._assetType = 1; + switch (message.assetType) { + default: + return "assetType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + break; + } + } + if (message.exponent != null && message.hasOwnProperty("exponent")) { + properties._exponent = 1; + if (!$util.isInteger(message.exponent)) + return "exponent: integer expected"; + } + if (message.cmcId != null && message.hasOwnProperty("cmcId")) { + properties._cmcId = 1; + if (!$util.isInteger(message.cmcId)) return "cmcId: integer expected"; + } + if ( + message.fundingRateInterval != null && + message.hasOwnProperty("fundingRateInterval") + ) { + properties._fundingRateInterval = 1; + { + let error = $root.google.protobuf.Duration.verify( + message.fundingRateInterval, + ); + if (error) return "fundingRateInterval." + error; + } + } + if ( + message.minPublishers != null && + message.hasOwnProperty("minPublishers") + ) { + properties._minPublishers = 1; + if (!$util.isInteger(message.minPublishers)) + return "minPublishers: integer expected"; + } + if (message.minRate != null && message.hasOwnProperty("minRate")) { + properties._minRate = 1; + { + let error = $root.google.protobuf.Duration.verify(message.minRate); + if (error) return "minRate." + error; + } + } + if (message.expiryTime != null && message.hasOwnProperty("expiryTime")) { + properties._expiryTime = 1; + { + let error = $root.google.protobuf.Duration.verify(message.expiryTime); + if (error) return "expiryTime." + error; + } + } + if ( + message.isActivated != null && + message.hasOwnProperty("isActivated") + ) { + properties._isActivated = 1; + if (typeof message.isActivated !== "boolean") + return "isActivated: boolean expected"; + } + if (message.hermesId != null && message.hasOwnProperty("hermesId")) { + properties._hermesId = 1; + if (!$util.isString(message.hermesId)) + return "hermesId: string expected"; + } + if ( + message.quoteCurrency != null && + message.hasOwnProperty("quoteCurrency") + ) { + properties._quoteCurrency = 1; + if (!$util.isString(message.quoteCurrency)) + return "quoteCurrency: string expected"; + } + if ( + message.marketSchedule != null && + message.hasOwnProperty("marketSchedule") + ) { + properties._marketSchedule = 1; + if (!$util.isString(message.marketSchedule)) + return "marketSchedule: string expected"; + } + return null; + }; + + /** + * Creates a FeedMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof lazer.FeedMetadata + * @static + * @param {Object.} object Plain object + * @returns {lazer.FeedMetadata} FeedMetadata + */ + FeedMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.lazer.FeedMetadata) return object; + let message = new $root.lazer.FeedMetadata(); + if (object.priceFeedId != null) + message.priceFeedId = object.priceFeedId >>> 0; + if (object.name != null) message.name = String(object.name); + if (object.symbol != null) message.symbol = String(object.symbol); + if (object.description != null) + message.description = String(object.description); + switch (object.assetType) { + default: + if (typeof object.assetType === "number") { + message.assetType = object.assetType; + break; + } + break; + case "CRYPTO": + case 0: + message.assetType = 0; + break; + case "FUNDING_RATE": + case 1: + message.assetType = 1; + break; + case "FX": + case 2: + message.assetType = 2; + break; + case "COMMODITY": + case 3: + message.assetType = 3; + break; + case "NAV": + case 4: + message.assetType = 4; + break; + case "CRYPTO_INDEX": + case 5: + message.assetType = 5; + break; + case "CRYPTO_REDEMPTION_RATE": + case 6: + message.assetType = 6; + break; + case "EQUITY": + case 7: + message.assetType = 7; + break; + case "METAL": + case 8: + message.assetType = 8; + break; + case "RATES": + case 9: + message.assetType = 9; + break; + } + if (object.exponent != null) message.exponent = object.exponent | 0; + if (object.cmcId != null) message.cmcId = object.cmcId >>> 0; + if (object.fundingRateInterval != null) { + if (typeof object.fundingRateInterval !== "object") + throw TypeError( + ".lazer.FeedMetadata.fundingRateInterval: object expected", + ); + message.fundingRateInterval = $root.google.protobuf.Duration.fromObject( + object.fundingRateInterval, + ); + } + if (object.minPublishers != null) + message.minPublishers = object.minPublishers >>> 0; + if (object.minRate != null) { + if (typeof object.minRate !== "object") + throw TypeError(".lazer.FeedMetadata.minRate: object expected"); + message.minRate = $root.google.protobuf.Duration.fromObject( + object.minRate, + ); + } + if (object.expiryTime != null) { + if (typeof object.expiryTime !== "object") + throw TypeError(".lazer.FeedMetadata.expiryTime: object expected"); + message.expiryTime = $root.google.protobuf.Duration.fromObject( + object.expiryTime, + ); + } + if (object.isActivated != null) + message.isActivated = Boolean(object.isActivated); + if (object.hermesId != null) message.hermesId = String(object.hermesId); + if (object.quoteCurrency != null) + message.quoteCurrency = String(object.quoteCurrency); + if (object.marketSchedule != null) + message.marketSchedule = String(object.marketSchedule); + return message; + }; + + /** + * Creates a plain object from a FeedMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof lazer.FeedMetadata + * @static + * @param {lazer.FeedMetadata} message FeedMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeedMetadata.toObject = function toObject(message, options) { + if (!options) options = {}; + let object = {}; + if ( + message.priceFeedId != null && + message.hasOwnProperty("priceFeedId") + ) { + object.priceFeedId = message.priceFeedId; + if (options.oneofs) object._priceFeedId = "priceFeedId"; + } + if (message.name != null && message.hasOwnProperty("name")) { + object.name = message.name; + if (options.oneofs) object._name = "name"; + } + if (message.symbol != null && message.hasOwnProperty("symbol")) { + object.symbol = message.symbol; + if (options.oneofs) object._symbol = "symbol"; + } + if ( + message.description != null && + message.hasOwnProperty("description") + ) { + object.description = message.description; + if (options.oneofs) object._description = "description"; + } + if (message.assetType != null && message.hasOwnProperty("assetType")) { + object.assetType = + options.enums === String + ? $root.lazer.AssetType[message.assetType] === undefined + ? message.assetType + : $root.lazer.AssetType[message.assetType] + : message.assetType; + if (options.oneofs) object._assetType = "assetType"; + } + if (message.exponent != null && message.hasOwnProperty("exponent")) { + object.exponent = message.exponent; + if (options.oneofs) object._exponent = "exponent"; + } + if (message.cmcId != null && message.hasOwnProperty("cmcId")) { + object.cmcId = message.cmcId; + if (options.oneofs) object._cmcId = "cmcId"; + } + if ( + message.fundingRateInterval != null && + message.hasOwnProperty("fundingRateInterval") + ) { + object.fundingRateInterval = $root.google.protobuf.Duration.toObject( + message.fundingRateInterval, + options, + ); + if (options.oneofs) object._fundingRateInterval = "fundingRateInterval"; + } + if ( + message.minPublishers != null && + message.hasOwnProperty("minPublishers") + ) { + object.minPublishers = message.minPublishers; + if (options.oneofs) object._minPublishers = "minPublishers"; + } + if (message.minRate != null && message.hasOwnProperty("minRate")) { + object.minRate = $root.google.protobuf.Duration.toObject( + message.minRate, + options, + ); + if (options.oneofs) object._minRate = "minRate"; + } + if (message.expiryTime != null && message.hasOwnProperty("expiryTime")) { + object.expiryTime = $root.google.protobuf.Duration.toObject( + message.expiryTime, + options, + ); + if (options.oneofs) object._expiryTime = "expiryTime"; + } + if ( + message.isActivated != null && + message.hasOwnProperty("isActivated") + ) { + object.isActivated = message.isActivated; + if (options.oneofs) object._isActivated = "isActivated"; + } + if (message.hermesId != null && message.hasOwnProperty("hermesId")) { + object.hermesId = message.hermesId; + if (options.oneofs) object._hermesId = "hermesId"; + } + if ( + message.quoteCurrency != null && + message.hasOwnProperty("quoteCurrency") + ) { + object.quoteCurrency = message.quoteCurrency; + if (options.oneofs) object._quoteCurrency = "quoteCurrency"; + } + if ( + message.marketSchedule != null && + message.hasOwnProperty("marketSchedule") + ) { + object.marketSchedule = message.marketSchedule; + if (options.oneofs) object._marketSchedule = "marketSchedule"; + } + return object; + }; + + /** + * Converts this FeedMetadata to JSON. + * @function toJSON + * @memberof lazer.FeedMetadata + * @instance + * @returns {Object.} JSON object + */ + FeedMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeedMetadata + * @function getTypeUrl + * @memberof lazer.FeedMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeedMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/lazer.FeedMetadata"; + }; + + return FeedMetadata; + })(); + + lazer.Feed = (function () { + /** + * Properties of a Feed. + * @memberof lazer + * @interface IFeed + * @property {lazer.IFeedMetadata|null} [metadata] Feed metadata + * @property {google.protobuf.ITimestamp|null} [pendingActivation] Feed pendingActivation + * @property {google.protobuf.ITimestamp|null} [pendingDeactivation] Feed pendingDeactivation + * @property {Array.|null} [perPublisher] Feed perPublisher + */ + + /** + * Constructs a new Feed. + * @memberof lazer + * @classdesc Represents a Feed. + * @implements IFeed + * @constructor + * @param {lazer.IFeed=} [properties] Properties to set + */ + function Feed(properties) { + this.perPublisher = []; + 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]]; + } + + /** + * Feed metadata. + * @member {lazer.IFeedMetadata|null|undefined} metadata + * @memberof lazer.Feed + * @instance + */ + Feed.prototype.metadata = null; + + /** + * Feed pendingActivation. + * @member {google.protobuf.ITimestamp|null|undefined} pendingActivation + * @memberof lazer.Feed + * @instance + */ + Feed.prototype.pendingActivation = null; + + /** + * Feed pendingDeactivation. + * @member {google.protobuf.ITimestamp|null|undefined} pendingDeactivation + * @memberof lazer.Feed + * @instance + */ + Feed.prototype.pendingDeactivation = null; + + /** + * Feed perPublisher. + * @member {Array.} perPublisher + * @memberof lazer.Feed + * @instance + */ + Feed.prototype.perPublisher = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * Feed _metadata. + * @member {"metadata"|undefined} _metadata + * @memberof lazer.Feed + * @instance + */ + Object.defineProperty(Feed.prototype, "_metadata", { + get: $util.oneOfGetter(($oneOfFields = ["metadata"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Feed _pendingActivation. + * @member {"pendingActivation"|undefined} _pendingActivation + * @memberof lazer.Feed + * @instance + */ + Object.defineProperty(Feed.prototype, "_pendingActivation", { + get: $util.oneOfGetter(($oneOfFields = ["pendingActivation"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Feed _pendingDeactivation. + * @member {"pendingDeactivation"|undefined} _pendingDeactivation + * @memberof lazer.Feed + * @instance + */ + Object.defineProperty(Feed.prototype, "_pendingDeactivation", { + get: $util.oneOfGetter(($oneOfFields = ["pendingDeactivation"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Creates a new Feed instance using the specified properties. + * @function create + * @memberof lazer.Feed + * @static + * @param {lazer.IFeed=} [properties] Properties to set + * @returns {lazer.Feed} Feed instance + */ + Feed.create = function create(properties) { + return new Feed(properties); + }; + + /** + * Encodes the specified Feed message. Does not implicitly {@link lazer.Feed.verify|verify} messages. + * @function encode + * @memberof lazer.Feed + * @static + * @param {lazer.IFeed} message Feed message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Feed.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if ( + message.metadata != null && + Object.hasOwnProperty.call(message, "metadata") + ) + $root.lazer.FeedMetadata.encode( + message.metadata, + writer.uint32(/* id 1, wireType 2 =*/ 10).fork(), + ).ldelim(); + if ( + message.pendingActivation != null && + Object.hasOwnProperty.call(message, "pendingActivation") + ) + $root.google.protobuf.Timestamp.encode( + message.pendingActivation, + writer.uint32(/* id 2, wireType 2 =*/ 18).fork(), + ).ldelim(); + if ( + message.pendingDeactivation != null && + Object.hasOwnProperty.call(message, "pendingDeactivation") + ) + $root.google.protobuf.Timestamp.encode( + message.pendingDeactivation, + writer.uint32(/* id 3, wireType 2 =*/ 26).fork(), + ).ldelim(); + if (message.perPublisher != null && message.perPublisher.length) + for (let i = 0; i < message.perPublisher.length; ++i) + $root.lazer.FeedPublisherState.encode( + message.perPublisher[i], + writer.uint32(/* id 4, wireType 2 =*/ 34).fork(), + ).ldelim(); + return writer; + }; + + /** + * Encodes the specified Feed message, length delimited. Does not implicitly {@link lazer.Feed.verify|verify} messages. + * @function encodeDelimited + * @memberof lazer.Feed + * @static + * @param {lazer.IFeed} message Feed message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Feed.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Feed message from the specified reader or buffer. + * @function decode + * @memberof lazer.Feed + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {lazer.Feed} Feed + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Feed.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.lazer.Feed(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.metadata = $root.lazer.FeedMetadata.decode( + reader, + reader.uint32(), + ); + break; + } + case 2: { + message.pendingActivation = $root.google.protobuf.Timestamp.decode( + reader, + reader.uint32(), + ); + break; + } + case 3: { + message.pendingDeactivation = + $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.perPublisher && message.perPublisher.length)) + message.perPublisher = []; + message.perPublisher.push( + $root.lazer.FeedPublisherState.decode(reader, reader.uint32()), + ); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Feed message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof lazer.Feed + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {lazer.Feed} Feed + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Feed.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Feed message. + * @function verify + * @memberof lazer.Feed + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Feed.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + properties._metadata = 1; + { + let error = $root.lazer.FeedMetadata.verify(message.metadata); + if (error) return "metadata." + error; + } + } + if ( + message.pendingActivation != null && + message.hasOwnProperty("pendingActivation") + ) { + properties._pendingActivation = 1; + { + let error = $root.google.protobuf.Timestamp.verify( + message.pendingActivation, + ); + if (error) return "pendingActivation." + error; + } + } + if ( + message.pendingDeactivation != null && + message.hasOwnProperty("pendingDeactivation") + ) { + properties._pendingDeactivation = 1; + { + let error = $root.google.protobuf.Timestamp.verify( + message.pendingDeactivation, + ); + if (error) return "pendingDeactivation." + error; + } + } + if ( + message.perPublisher != null && + message.hasOwnProperty("perPublisher") + ) { + if (!Array.isArray(message.perPublisher)) + return "perPublisher: array expected"; + for (let i = 0; i < message.perPublisher.length; ++i) { + let error = $root.lazer.FeedPublisherState.verify( + message.perPublisher[i], + ); + if (error) return "perPublisher." + error; + } + } + return null; + }; + + /** + * Creates a Feed message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof lazer.Feed + * @static + * @param {Object.} object Plain object + * @returns {lazer.Feed} Feed + */ + Feed.fromObject = function fromObject(object) { + if (object instanceof $root.lazer.Feed) return object; + let message = new $root.lazer.Feed(); + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".lazer.Feed.metadata: object expected"); + message.metadata = $root.lazer.FeedMetadata.fromObject(object.metadata); + } + if (object.pendingActivation != null) { + if (typeof object.pendingActivation !== "object") + throw TypeError(".lazer.Feed.pendingActivation: object expected"); + message.pendingActivation = $root.google.protobuf.Timestamp.fromObject( + object.pendingActivation, + ); + } + if (object.pendingDeactivation != null) { + if (typeof object.pendingDeactivation !== "object") + throw TypeError(".lazer.Feed.pendingDeactivation: object expected"); + message.pendingDeactivation = + $root.google.protobuf.Timestamp.fromObject( + object.pendingDeactivation, + ); + } + if (object.perPublisher) { + if (!Array.isArray(object.perPublisher)) + throw TypeError(".lazer.Feed.perPublisher: array expected"); + message.perPublisher = []; + for (let i = 0; i < object.perPublisher.length; ++i) { + if (typeof object.perPublisher[i] !== "object") + throw TypeError(".lazer.Feed.perPublisher: object expected"); + message.perPublisher[i] = $root.lazer.FeedPublisherState.fromObject( + object.perPublisher[i], + ); + } + } + return message; + }; + + /** + * Creates a plain object from a Feed message. Also converts values to other types if specified. + * @function toObject + * @memberof lazer.Feed + * @static + * @param {lazer.Feed} message Feed + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Feed.toObject = function toObject(message, options) { + if (!options) options = {}; + let object = {}; + if (options.arrays || options.defaults) object.perPublisher = []; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + object.metadata = $root.lazer.FeedMetadata.toObject( + message.metadata, + options, + ); + if (options.oneofs) object._metadata = "metadata"; + } + if ( + message.pendingActivation != null && + message.hasOwnProperty("pendingActivation") + ) { + object.pendingActivation = $root.google.protobuf.Timestamp.toObject( + message.pendingActivation, + options, + ); + if (options.oneofs) object._pendingActivation = "pendingActivation"; + } + if ( + message.pendingDeactivation != null && + message.hasOwnProperty("pendingDeactivation") + ) { + object.pendingDeactivation = $root.google.protobuf.Timestamp.toObject( + message.pendingDeactivation, + options, + ); + if (options.oneofs) object._pendingDeactivation = "pendingDeactivation"; + } + if (message.perPublisher && message.perPublisher.length) { + object.perPublisher = []; + for (let j = 0; j < message.perPublisher.length; ++j) + object.perPublisher[j] = $root.lazer.FeedPublisherState.toObject( + message.perPublisher[j], + options, + ); + } + return object; + }; + + /** + * Converts this Feed to JSON. + * @function toJSON + * @memberof lazer.Feed + * @instance + * @returns {Object.} JSON object */ - const lazer = {}; - - lazer.State = (function() { - - /** - * Properties of a State. - * @memberof lazer - * @interface IState - * @property {number|null} [shardId] State shardId - * @property {number|Long|null} [lastSequenceNo] State lastSequenceNo - * @property {google.protobuf.ITimestamp|null} [lastTimestamp] State lastTimestamp - * @property {string|null} [shardName] State shardName - * @property {google.protobuf.IDuration|null} [minRate] State minRate - * @property {Array.|null} [feeds] State feeds - * @property {Array.|null} [publishers] State publishers - */ - - /** - * Constructs a new State. - * @memberof lazer - * @classdesc Represents a State. - * @implements IState - * @constructor - * @param {lazer.IState=} [properties] Properties to set - */ - function State(properties) { - this.feeds = []; - this.publishers = []; - 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]]; - } + Feed.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * State shardId. - * @member {number|null|undefined} shardId - * @memberof lazer.State - * @instance - */ - State.prototype.shardId = null; - - /** - * State lastSequenceNo. - * @member {number|Long|null|undefined} lastSequenceNo - * @memberof lazer.State - * @instance - */ - State.prototype.lastSequenceNo = null; - - /** - * State lastTimestamp. - * @member {google.protobuf.ITimestamp|null|undefined} lastTimestamp - * @memberof lazer.State - * @instance - */ - State.prototype.lastTimestamp = null; - - /** - * State shardName. - * @member {string|null|undefined} shardName - * @memberof lazer.State - * @instance - */ - State.prototype.shardName = null; - - /** - * State minRate. - * @member {google.protobuf.IDuration|null|undefined} minRate - * @memberof lazer.State - * @instance - */ - State.prototype.minRate = null; - - /** - * State feeds. - * @member {Array.} feeds - * @memberof lazer.State - * @instance - */ - State.prototype.feeds = $util.emptyArray; - - /** - * State publishers. - * @member {Array.} publishers - * @memberof lazer.State - * @instance - */ - State.prototype.publishers = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - let $oneOfFields; - - /** - * State _shardId. - * @member {"shardId"|undefined} _shardId - * @memberof lazer.State - * @instance - */ - Object.defineProperty(State.prototype, "_shardId", { - get: $util.oneOfGetter($oneOfFields = ["shardId"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * State _lastSequenceNo. - * @member {"lastSequenceNo"|undefined} _lastSequenceNo - * @memberof lazer.State - * @instance - */ - Object.defineProperty(State.prototype, "_lastSequenceNo", { - get: $util.oneOfGetter($oneOfFields = ["lastSequenceNo"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * State _lastTimestamp. - * @member {"lastTimestamp"|undefined} _lastTimestamp - * @memberof lazer.State - * @instance - */ - Object.defineProperty(State.prototype, "_lastTimestamp", { - get: $util.oneOfGetter($oneOfFields = ["lastTimestamp"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * State _shardName. - * @member {"shardName"|undefined} _shardName - * @memberof lazer.State - * @instance - */ - Object.defineProperty(State.prototype, "_shardName", { - get: $util.oneOfGetter($oneOfFields = ["shardName"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * State _minRate. - * @member {"minRate"|undefined} _minRate - * @memberof lazer.State - * @instance - */ - Object.defineProperty(State.prototype, "_minRate", { - get: $util.oneOfGetter($oneOfFields = ["minRate"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new State instance using the specified properties. - * @function create - * @memberof lazer.State - * @static - * @param {lazer.IState=} [properties] Properties to set - * @returns {lazer.State} State instance - */ - State.create = function create(properties) { - return new State(properties); - }; - - /** - * Encodes the specified State message. Does not implicitly {@link lazer.State.verify|verify} messages. - * @function encode - * @memberof lazer.State - * @static - * @param {lazer.IState} message State message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - State.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.shardId != null && Object.hasOwnProperty.call(message, "shardId")) - writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.shardId); - if (message.lastSequenceNo != null && Object.hasOwnProperty.call(message, "lastSequenceNo")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.lastSequenceNo); - if (message.lastTimestamp != null && Object.hasOwnProperty.call(message, "lastTimestamp")) - $root.google.protobuf.Timestamp.encode(message.lastTimestamp, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.shardName != null && Object.hasOwnProperty.call(message, "shardName")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.shardName); - if (message.minRate != null && Object.hasOwnProperty.call(message, "minRate")) - $root.google.protobuf.Duration.encode(message.minRate, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.feeds != null && message.feeds.length) - for (let i = 0; i < message.feeds.length; ++i) - $root.lazer.Feed.encode(message.feeds[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.publishers != null && message.publishers.length) - for (let i = 0; i < message.publishers.length; ++i) - $root.lazer.Publisher.encode(message.publishers[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified State message, length delimited. Does not implicitly {@link lazer.State.verify|verify} messages. - * @function encodeDelimited - * @memberof lazer.State - * @static - * @param {lazer.IState} message State message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - State.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a State message from the specified reader or buffer. - * @function decode - * @memberof lazer.State - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {lazer.State} State - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - State.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.lazer.State(); - while (reader.pos < end) { - let tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.shardId = reader.uint32(); - break; - } - case 2: { - message.lastSequenceNo = reader.uint64(); - break; - } - case 3: { - message.lastTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.shardName = reader.string(); - break; - } - case 5: { - message.minRate = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 7: { - if (!(message.feeds && message.feeds.length)) - message.feeds = []; - message.feeds.push($root.lazer.Feed.decode(reader, reader.uint32())); - break; - } - case 8: { - if (!(message.publishers && message.publishers.length)) - message.publishers = []; - message.publishers.push($root.lazer.Publisher.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a State message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof lazer.State - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {lazer.State} State - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - State.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a State message. - * @function verify - * @memberof lazer.State - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - State.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - let properties = {}; - if (message.shardId != null && message.hasOwnProperty("shardId")) { - properties._shardId = 1; - if (!$util.isInteger(message.shardId)) - return "shardId: integer expected"; - } - if (message.lastSequenceNo != null && message.hasOwnProperty("lastSequenceNo")) { - properties._lastSequenceNo = 1; - if (!$util.isInteger(message.lastSequenceNo) && !(message.lastSequenceNo && $util.isInteger(message.lastSequenceNo.low) && $util.isInteger(message.lastSequenceNo.high))) - return "lastSequenceNo: integer|Long expected"; - } - if (message.lastTimestamp != null && message.hasOwnProperty("lastTimestamp")) { - properties._lastTimestamp = 1; - { - let error = $root.google.protobuf.Timestamp.verify(message.lastTimestamp); - if (error) - return "lastTimestamp." + error; - } - } - if (message.shardName != null && message.hasOwnProperty("shardName")) { - properties._shardName = 1; - if (!$util.isString(message.shardName)) - return "shardName: string expected"; - } - if (message.minRate != null && message.hasOwnProperty("minRate")) { - properties._minRate = 1; - { - let error = $root.google.protobuf.Duration.verify(message.minRate); - if (error) - return "minRate." + error; - } - } - if (message.feeds != null && message.hasOwnProperty("feeds")) { - if (!Array.isArray(message.feeds)) - return "feeds: array expected"; - for (let i = 0; i < message.feeds.length; ++i) { - let error = $root.lazer.Feed.verify(message.feeds[i]); - if (error) - return "feeds." + error; - } - } - if (message.publishers != null && message.hasOwnProperty("publishers")) { - if (!Array.isArray(message.publishers)) - return "publishers: array expected"; - for (let i = 0; i < message.publishers.length; ++i) { - let error = $root.lazer.Publisher.verify(message.publishers[i]); - if (error) - return "publishers." + error; - } - } - return null; - }; - - /** - * Creates a State message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof lazer.State - * @static - * @param {Object.} object Plain object - * @returns {lazer.State} State - */ - State.fromObject = function fromObject(object) { - if (object instanceof $root.lazer.State) - return object; - let message = new $root.lazer.State(); - if (object.shardId != null) - message.shardId = object.shardId >>> 0; - if (object.lastSequenceNo != null) - if ($util.Long) - (message.lastSequenceNo = $util.Long.fromValue(object.lastSequenceNo)).unsigned = true; - else if (typeof object.lastSequenceNo === "string") - message.lastSequenceNo = parseInt(object.lastSequenceNo, 10); - else if (typeof object.lastSequenceNo === "number") - message.lastSequenceNo = object.lastSequenceNo; - else if (typeof object.lastSequenceNo === "object") - message.lastSequenceNo = new $util.LongBits(object.lastSequenceNo.low >>> 0, object.lastSequenceNo.high >>> 0).toNumber(true); - if (object.lastTimestamp != null) { - if (typeof object.lastTimestamp !== "object") - throw TypeError(".lazer.State.lastTimestamp: object expected"); - message.lastTimestamp = $root.google.protobuf.Timestamp.fromObject(object.lastTimestamp); - } - if (object.shardName != null) - message.shardName = String(object.shardName); - if (object.minRate != null) { - if (typeof object.minRate !== "object") - throw TypeError(".lazer.State.minRate: object expected"); - message.minRate = $root.google.protobuf.Duration.fromObject(object.minRate); - } - if (object.feeds) { - if (!Array.isArray(object.feeds)) - throw TypeError(".lazer.State.feeds: array expected"); - message.feeds = []; - for (let i = 0; i < object.feeds.length; ++i) { - if (typeof object.feeds[i] !== "object") - throw TypeError(".lazer.State.feeds: object expected"); - message.feeds[i] = $root.lazer.Feed.fromObject(object.feeds[i]); - } - } - if (object.publishers) { - if (!Array.isArray(object.publishers)) - throw TypeError(".lazer.State.publishers: array expected"); - message.publishers = []; - for (let i = 0; i < object.publishers.length; ++i) { - if (typeof object.publishers[i] !== "object") - throw TypeError(".lazer.State.publishers: object expected"); - message.publishers[i] = $root.lazer.Publisher.fromObject(object.publishers[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a State message. Also converts values to other types if specified. - * @function toObject - * @memberof lazer.State - * @static - * @param {lazer.State} message State - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - State.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) { - object.feeds = []; - object.publishers = []; - } - if (message.shardId != null && message.hasOwnProperty("shardId")) { - object.shardId = message.shardId; - if (options.oneofs) - object._shardId = "shardId"; - } - if (message.lastSequenceNo != null && message.hasOwnProperty("lastSequenceNo")) { - if (typeof message.lastSequenceNo === "number") - object.lastSequenceNo = options.longs === String ? String(message.lastSequenceNo) : message.lastSequenceNo; - else - object.lastSequenceNo = options.longs === String ? $util.Long.prototype.toString.call(message.lastSequenceNo) : options.longs === Number ? new $util.LongBits(message.lastSequenceNo.low >>> 0, message.lastSequenceNo.high >>> 0).toNumber(true) : message.lastSequenceNo; - if (options.oneofs) - object._lastSequenceNo = "lastSequenceNo"; - } - if (message.lastTimestamp != null && message.hasOwnProperty("lastTimestamp")) { - object.lastTimestamp = $root.google.protobuf.Timestamp.toObject(message.lastTimestamp, options); - if (options.oneofs) - object._lastTimestamp = "lastTimestamp"; - } - if (message.shardName != null && message.hasOwnProperty("shardName")) { - object.shardName = message.shardName; - if (options.oneofs) - object._shardName = "shardName"; - } - if (message.minRate != null && message.hasOwnProperty("minRate")) { - object.minRate = $root.google.protobuf.Duration.toObject(message.minRate, options); - if (options.oneofs) - object._minRate = "minRate"; - } - if (message.feeds && message.feeds.length) { - object.feeds = []; - for (let j = 0; j < message.feeds.length; ++j) - object.feeds[j] = $root.lazer.Feed.toObject(message.feeds[j], options); - } - if (message.publishers && message.publishers.length) { - object.publishers = []; - for (let j = 0; j < message.publishers.length; ++j) - object.publishers[j] = $root.lazer.Publisher.toObject(message.publishers[j], options); - } - return object; - }; - - /** - * Converts this State to JSON. - * @function toJSON - * @memberof lazer.State - * @instance - * @returns {Object.} JSON object - */ - State.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for State - * @function getTypeUrl - * @memberof lazer.State - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - State.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/lazer.State"; - }; + /** + * Gets the default type url for Feed + * @function getTypeUrl + * @memberof lazer.Feed + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Feed.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/lazer.Feed"; + }; - return State; - })(); + return Feed; + })(); - lazer.Publisher = (function() { - - /** - * Properties of a Publisher. - * @memberof lazer - * @interface IPublisher - * @property {number|null} [publisherId] Publisher publisherId - * @property {string|null} [name] Publisher name - * @property {Array.|null} [publicKeys] Publisher publicKeys - * @property {boolean|null} [isActive] Publisher isActive - */ - - /** - * Constructs a new Publisher. - * @memberof lazer - * @classdesc Represents a Publisher. - * @implements IPublisher - * @constructor - * @param {lazer.IPublisher=} [properties] Properties to set - */ - function Publisher(properties) { - this.publicKeys = []; - 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]]; - } + lazer.FeedPublisherState = (function () { + /** + * Properties of a FeedPublisherState. + * @memberof lazer + * @interface IFeedPublisherState + * @property {number|null} [publisherId] FeedPublisherState publisherId + * @property {google.protobuf.ITimestamp|null} [lastUpdateTimestamp] FeedPublisherState lastUpdateTimestamp + * @property {google.protobuf.ITimestamp|null} [lastPublisherTimestamp] FeedPublisherState lastPublisherTimestamp + * @property {lazer.IFeedData|null} [lastFeedData] FeedPublisherState lastFeedData + */ - /** - * Publisher publisherId. - * @member {number|null|undefined} publisherId - * @memberof lazer.Publisher - * @instance - */ - Publisher.prototype.publisherId = null; - - /** - * Publisher name. - * @member {string|null|undefined} name - * @memberof lazer.Publisher - * @instance - */ - Publisher.prototype.name = null; - - /** - * Publisher publicKeys. - * @member {Array.} publicKeys - * @memberof lazer.Publisher - * @instance - */ - Publisher.prototype.publicKeys = $util.emptyArray; - - /** - * Publisher isActive. - * @member {boolean|null|undefined} isActive - * @memberof lazer.Publisher - * @instance - */ - Publisher.prototype.isActive = null; - - // OneOf field names bound to virtual getters and setters - let $oneOfFields; - - /** - * Publisher _publisherId. - * @member {"publisherId"|undefined} _publisherId - * @memberof lazer.Publisher - * @instance - */ - Object.defineProperty(Publisher.prototype, "_publisherId", { - get: $util.oneOfGetter($oneOfFields = ["publisherId"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Publisher _name. - * @member {"name"|undefined} _name - * @memberof lazer.Publisher - * @instance - */ - Object.defineProperty(Publisher.prototype, "_name", { - get: $util.oneOfGetter($oneOfFields = ["name"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Publisher _isActive. - * @member {"isActive"|undefined} _isActive - * @memberof lazer.Publisher - * @instance - */ - Object.defineProperty(Publisher.prototype, "_isActive", { - get: $util.oneOfGetter($oneOfFields = ["isActive"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Publisher instance using the specified properties. - * @function create - * @memberof lazer.Publisher - * @static - * @param {lazer.IPublisher=} [properties] Properties to set - * @returns {lazer.Publisher} Publisher instance - */ - Publisher.create = function create(properties) { - return new Publisher(properties); - }; - - /** - * Encodes the specified Publisher message. Does not implicitly {@link lazer.Publisher.verify|verify} messages. - * @function encode - * @memberof lazer.Publisher - * @static - * @param {lazer.IPublisher} message Publisher message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Publisher.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.publisherId != null && Object.hasOwnProperty.call(message, "publisherId")) - writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.publisherId); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); - if (message.publicKeys != null && message.publicKeys.length) - for (let i = 0; i < message.publicKeys.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.publicKeys[i]); - if (message.isActive != null && Object.hasOwnProperty.call(message, "isActive")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.isActive); - return writer; - }; - - /** - * Encodes the specified Publisher message, length delimited. Does not implicitly {@link lazer.Publisher.verify|verify} messages. - * @function encodeDelimited - * @memberof lazer.Publisher - * @static - * @param {lazer.IPublisher} message Publisher message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Publisher.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Publisher message from the specified reader or buffer. - * @function decode - * @memberof lazer.Publisher - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {lazer.Publisher} Publisher - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Publisher.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.lazer.Publisher(); - while (reader.pos < end) { - let tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.publisherId = reader.uint32(); - break; - } - case 2: { - message.name = reader.string(); - break; - } - case 3: { - if (!(message.publicKeys && message.publicKeys.length)) - message.publicKeys = []; - message.publicKeys.push(reader.bytes()); - break; - } - case 4: { - message.isActive = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Publisher message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof lazer.Publisher - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {lazer.Publisher} Publisher - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Publisher.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Publisher message. - * @function verify - * @memberof lazer.Publisher - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Publisher.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - let properties = {}; - if (message.publisherId != null && message.hasOwnProperty("publisherId")) { - properties._publisherId = 1; - if (!$util.isInteger(message.publisherId)) - return "publisherId: integer expected"; - } - if (message.name != null && message.hasOwnProperty("name")) { - properties._name = 1; - if (!$util.isString(message.name)) - return "name: string expected"; - } - if (message.publicKeys != null && message.hasOwnProperty("publicKeys")) { - if (!Array.isArray(message.publicKeys)) - return "publicKeys: array expected"; - for (let i = 0; i < message.publicKeys.length; ++i) - if (!(message.publicKeys[i] && typeof message.publicKeys[i].length === "number" || $util.isString(message.publicKeys[i]))) - return "publicKeys: buffer[] expected"; - } - if (message.isActive != null && message.hasOwnProperty("isActive")) { - properties._isActive = 1; - if (typeof message.isActive !== "boolean") - return "isActive: boolean expected"; - } - return null; - }; - - /** - * Creates a Publisher message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof lazer.Publisher - * @static - * @param {Object.} object Plain object - * @returns {lazer.Publisher} Publisher - */ - Publisher.fromObject = function fromObject(object) { - if (object instanceof $root.lazer.Publisher) - return object; - let message = new $root.lazer.Publisher(); - if (object.publisherId != null) - message.publisherId = object.publisherId >>> 0; - if (object.name != null) - message.name = String(object.name); - if (object.publicKeys) { - if (!Array.isArray(object.publicKeys)) - throw TypeError(".lazer.Publisher.publicKeys: array expected"); - message.publicKeys = []; - for (let i = 0; i < object.publicKeys.length; ++i) - if (typeof object.publicKeys[i] === "string") - $util.base64.decode(object.publicKeys[i], message.publicKeys[i] = $util.newBuffer($util.base64.length(object.publicKeys[i])), 0); - else if (object.publicKeys[i].length >= 0) - message.publicKeys[i] = object.publicKeys[i]; - } - if (object.isActive != null) - message.isActive = Boolean(object.isActive); - return message; - }; - - /** - * Creates a plain object from a Publisher message. Also converts values to other types if specified. - * @function toObject - * @memberof lazer.Publisher - * @static - * @param {lazer.Publisher} message Publisher - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Publisher.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.publicKeys = []; - if (message.publisherId != null && message.hasOwnProperty("publisherId")) { - object.publisherId = message.publisherId; - if (options.oneofs) - object._publisherId = "publisherId"; - } - if (message.name != null && message.hasOwnProperty("name")) { - object.name = message.name; - if (options.oneofs) - object._name = "name"; - } - if (message.publicKeys && message.publicKeys.length) { - object.publicKeys = []; - for (let j = 0; j < message.publicKeys.length; ++j) - object.publicKeys[j] = options.bytes === String ? $util.base64.encode(message.publicKeys[j], 0, message.publicKeys[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.publicKeys[j]) : message.publicKeys[j]; - } - if (message.isActive != null && message.hasOwnProperty("isActive")) { - object.isActive = message.isActive; - if (options.oneofs) - object._isActive = "isActive"; - } - return object; - }; - - /** - * Converts this Publisher to JSON. - * @function toJSON - * @memberof lazer.Publisher - * @instance - * @returns {Object.} JSON object - */ - Publisher.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Publisher - * @function getTypeUrl - * @memberof lazer.Publisher - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Publisher.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/lazer.Publisher"; - }; + /** + * Constructs a new FeedPublisherState. + * @memberof lazer + * @classdesc Represents a FeedPublisherState. + * @implements IFeedPublisherState + * @constructor + * @param {lazer.IFeedPublisherState=} [properties] Properties to set + */ + function FeedPublisherState(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 Publisher; - })(); + /** + * FeedPublisherState publisherId. + * @member {number|null|undefined} publisherId + * @memberof lazer.FeedPublisherState + * @instance + */ + FeedPublisherState.prototype.publisherId = null; /** - * AssetType enum. - * @name lazer.AssetType - * @enum {number} - * @property {number} CRYPTO=0 CRYPTO value - * @property {number} FUNDING_RATE=1 FUNDING_RATE value - * @property {number} FX=2 FX value - * @property {number} COMMODITY=3 COMMODITY value - * @property {number} NAV=4 NAV value - * @property {number} CRYPTO_INDEX=5 CRYPTO_INDEX value - * @property {number} CRYPTO_REDEMPTION_RATE=6 CRYPTO_REDEMPTION_RATE value - * @property {number} EQUITY=7 EQUITY value - * @property {number} METAL=8 METAL value - * @property {number} RATES=9 RATES value - */ - lazer.AssetType = (function() { - const valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CRYPTO"] = 0; - values[valuesById[1] = "FUNDING_RATE"] = 1; - values[valuesById[2] = "FX"] = 2; - values[valuesById[3] = "COMMODITY"] = 3; - values[valuesById[4] = "NAV"] = 4; - values[valuesById[5] = "CRYPTO_INDEX"] = 5; - values[valuesById[6] = "CRYPTO_REDEMPTION_RATE"] = 6; - values[valuesById[7] = "EQUITY"] = 7; - values[valuesById[8] = "METAL"] = 8; - values[valuesById[9] = "RATES"] = 9; - return values; - })(); + * FeedPublisherState lastUpdateTimestamp. + * @member {google.protobuf.ITimestamp|null|undefined} lastUpdateTimestamp + * @memberof lazer.FeedPublisherState + * @instance + */ + FeedPublisherState.prototype.lastUpdateTimestamp = null; - lazer.FeedMetadata = (function() { - - /** - * Properties of a FeedMetadata. - * @memberof lazer - * @interface IFeedMetadata - * @property {number|null} [priceFeedId] FeedMetadata priceFeedId - * @property {string|null} [name] FeedMetadata name - * @property {string|null} [symbol] FeedMetadata symbol - * @property {string|null} [description] FeedMetadata description - * @property {lazer.AssetType|null} [assetType] FeedMetadata assetType - * @property {number|null} [exponent] FeedMetadata exponent - * @property {number|null} [cmcId] FeedMetadata cmcId - * @property {google.protobuf.IDuration|null} [fundingRateInterval] FeedMetadata fundingRateInterval - * @property {number|null} [minPublishers] FeedMetadata minPublishers - * @property {google.protobuf.IDuration|null} [minRate] FeedMetadata minRate - * @property {google.protobuf.IDuration|null} [expiryTime] FeedMetadata expiryTime - * @property {boolean|null} [isActivated] FeedMetadata isActivated - * @property {string|null} [hermesId] FeedMetadata hermesId - * @property {string|null} [quoteCurrency] FeedMetadata quoteCurrency - * @property {string|null} [marketSchedule] FeedMetadata marketSchedule - */ - - /** - * Constructs a new FeedMetadata. - * @memberof lazer - * @classdesc Represents a FeedMetadata. - * @implements IFeedMetadata - * @constructor - * @param {lazer.IFeedMetadata=} [properties] Properties to set - */ - function FeedMetadata(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]]; - } + /** + * FeedPublisherState lastPublisherTimestamp. + * @member {google.protobuf.ITimestamp|null|undefined} lastPublisherTimestamp + * @memberof lazer.FeedPublisherState + * @instance + */ + FeedPublisherState.prototype.lastPublisherTimestamp = null; - /** - * FeedMetadata priceFeedId. - * @member {number|null|undefined} priceFeedId - * @memberof lazer.FeedMetadata - * @instance - */ - FeedMetadata.prototype.priceFeedId = null; - - /** - * FeedMetadata name. - * @member {string|null|undefined} name - * @memberof lazer.FeedMetadata - * @instance - */ - FeedMetadata.prototype.name = null; - - /** - * FeedMetadata symbol. - * @member {string|null|undefined} symbol - * @memberof lazer.FeedMetadata - * @instance - */ - FeedMetadata.prototype.symbol = null; - - /** - * FeedMetadata description. - * @member {string|null|undefined} description - * @memberof lazer.FeedMetadata - * @instance - */ - FeedMetadata.prototype.description = null; - - /** - * FeedMetadata assetType. - * @member {lazer.AssetType|null|undefined} assetType - * @memberof lazer.FeedMetadata - * @instance - */ - FeedMetadata.prototype.assetType = null; - - /** - * FeedMetadata exponent. - * @member {number|null|undefined} exponent - * @memberof lazer.FeedMetadata - * @instance - */ - FeedMetadata.prototype.exponent = null; - - /** - * FeedMetadata cmcId. - * @member {number|null|undefined} cmcId - * @memberof lazer.FeedMetadata - * @instance - */ - FeedMetadata.prototype.cmcId = null; - - /** - * FeedMetadata fundingRateInterval. - * @member {google.protobuf.IDuration|null|undefined} fundingRateInterval - * @memberof lazer.FeedMetadata - * @instance - */ - FeedMetadata.prototype.fundingRateInterval = null; - - /** - * FeedMetadata minPublishers. - * @member {number|null|undefined} minPublishers - * @memberof lazer.FeedMetadata - * @instance - */ - FeedMetadata.prototype.minPublishers = null; - - /** - * FeedMetadata minRate. - * @member {google.protobuf.IDuration|null|undefined} minRate - * @memberof lazer.FeedMetadata - * @instance - */ - FeedMetadata.prototype.minRate = null; - - /** - * FeedMetadata expiryTime. - * @member {google.protobuf.IDuration|null|undefined} expiryTime - * @memberof lazer.FeedMetadata - * @instance - */ - FeedMetadata.prototype.expiryTime = null; - - /** - * FeedMetadata isActivated. - * @member {boolean|null|undefined} isActivated - * @memberof lazer.FeedMetadata - * @instance - */ - FeedMetadata.prototype.isActivated = null; - - /** - * FeedMetadata hermesId. - * @member {string|null|undefined} hermesId - * @memberof lazer.FeedMetadata - * @instance - */ - FeedMetadata.prototype.hermesId = null; - - /** - * FeedMetadata quoteCurrency. - * @member {string|null|undefined} quoteCurrency - * @memberof lazer.FeedMetadata - * @instance - */ - FeedMetadata.prototype.quoteCurrency = null; - - /** - * FeedMetadata marketSchedule. - * @member {string|null|undefined} marketSchedule - * @memberof lazer.FeedMetadata - * @instance - */ - FeedMetadata.prototype.marketSchedule = null; - - // OneOf field names bound to virtual getters and setters - let $oneOfFields; - - /** - * FeedMetadata _priceFeedId. - * @member {"priceFeedId"|undefined} _priceFeedId - * @memberof lazer.FeedMetadata - * @instance - */ - Object.defineProperty(FeedMetadata.prototype, "_priceFeedId", { - get: $util.oneOfGetter($oneOfFields = ["priceFeedId"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * FeedMetadata _name. - * @member {"name"|undefined} _name - * @memberof lazer.FeedMetadata - * @instance - */ - Object.defineProperty(FeedMetadata.prototype, "_name", { - get: $util.oneOfGetter($oneOfFields = ["name"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * FeedMetadata _symbol. - * @member {"symbol"|undefined} _symbol - * @memberof lazer.FeedMetadata - * @instance - */ - Object.defineProperty(FeedMetadata.prototype, "_symbol", { - get: $util.oneOfGetter($oneOfFields = ["symbol"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * FeedMetadata _description. - * @member {"description"|undefined} _description - * @memberof lazer.FeedMetadata - * @instance - */ - Object.defineProperty(FeedMetadata.prototype, "_description", { - get: $util.oneOfGetter($oneOfFields = ["description"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * FeedMetadata _assetType. - * @member {"assetType"|undefined} _assetType - * @memberof lazer.FeedMetadata - * @instance - */ - Object.defineProperty(FeedMetadata.prototype, "_assetType", { - get: $util.oneOfGetter($oneOfFields = ["assetType"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * FeedMetadata _exponent. - * @member {"exponent"|undefined} _exponent - * @memberof lazer.FeedMetadata - * @instance - */ - Object.defineProperty(FeedMetadata.prototype, "_exponent", { - get: $util.oneOfGetter($oneOfFields = ["exponent"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * FeedMetadata _cmcId. - * @member {"cmcId"|undefined} _cmcId - * @memberof lazer.FeedMetadata - * @instance - */ - Object.defineProperty(FeedMetadata.prototype, "_cmcId", { - get: $util.oneOfGetter($oneOfFields = ["cmcId"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * FeedMetadata _fundingRateInterval. - * @member {"fundingRateInterval"|undefined} _fundingRateInterval - * @memberof lazer.FeedMetadata - * @instance - */ - Object.defineProperty(FeedMetadata.prototype, "_fundingRateInterval", { - get: $util.oneOfGetter($oneOfFields = ["fundingRateInterval"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * FeedMetadata _minPublishers. - * @member {"minPublishers"|undefined} _minPublishers - * @memberof lazer.FeedMetadata - * @instance - */ - Object.defineProperty(FeedMetadata.prototype, "_minPublishers", { - get: $util.oneOfGetter($oneOfFields = ["minPublishers"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * FeedMetadata _minRate. - * @member {"minRate"|undefined} _minRate - * @memberof lazer.FeedMetadata - * @instance - */ - Object.defineProperty(FeedMetadata.prototype, "_minRate", { - get: $util.oneOfGetter($oneOfFields = ["minRate"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * FeedMetadata _expiryTime. - * @member {"expiryTime"|undefined} _expiryTime - * @memberof lazer.FeedMetadata - * @instance - */ - Object.defineProperty(FeedMetadata.prototype, "_expiryTime", { - get: $util.oneOfGetter($oneOfFields = ["expiryTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * FeedMetadata _isActivated. - * @member {"isActivated"|undefined} _isActivated - * @memberof lazer.FeedMetadata - * @instance - */ - Object.defineProperty(FeedMetadata.prototype, "_isActivated", { - get: $util.oneOfGetter($oneOfFields = ["isActivated"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * FeedMetadata _hermesId. - * @member {"hermesId"|undefined} _hermesId - * @memberof lazer.FeedMetadata - * @instance - */ - Object.defineProperty(FeedMetadata.prototype, "_hermesId", { - get: $util.oneOfGetter($oneOfFields = ["hermesId"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * FeedMetadata _quoteCurrency. - * @member {"quoteCurrency"|undefined} _quoteCurrency - * @memberof lazer.FeedMetadata - * @instance - */ - Object.defineProperty(FeedMetadata.prototype, "_quoteCurrency", { - get: $util.oneOfGetter($oneOfFields = ["quoteCurrency"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * FeedMetadata _marketSchedule. - * @member {"marketSchedule"|undefined} _marketSchedule - * @memberof lazer.FeedMetadata - * @instance - */ - Object.defineProperty(FeedMetadata.prototype, "_marketSchedule", { - get: $util.oneOfGetter($oneOfFields = ["marketSchedule"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new FeedMetadata instance using the specified properties. - * @function create - * @memberof lazer.FeedMetadata - * @static - * @param {lazer.IFeedMetadata=} [properties] Properties to set - * @returns {lazer.FeedMetadata} FeedMetadata instance - */ - FeedMetadata.create = function create(properties) { - return new FeedMetadata(properties); - }; - - /** - * Encodes the specified FeedMetadata message. Does not implicitly {@link lazer.FeedMetadata.verify|verify} messages. - * @function encode - * @memberof lazer.FeedMetadata - * @static - * @param {lazer.IFeedMetadata} message FeedMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeedMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.priceFeedId != null && Object.hasOwnProperty.call(message, "priceFeedId")) - writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.priceFeedId); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); - if (message.symbol != null && Object.hasOwnProperty.call(message, "symbol")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.symbol); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.description); - if (message.assetType != null && Object.hasOwnProperty.call(message, "assetType")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.assetType); - if (message.exponent != null && Object.hasOwnProperty.call(message, "exponent")) - writer.uint32(/* id 6, wireType 0 =*/48).sint32(message.exponent); - if (message.cmcId != null && Object.hasOwnProperty.call(message, "cmcId")) - writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.cmcId); - if (message.fundingRateInterval != null && Object.hasOwnProperty.call(message, "fundingRateInterval")) - $root.google.protobuf.Duration.encode(message.fundingRateInterval, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.minPublishers != null && Object.hasOwnProperty.call(message, "minPublishers")) - writer.uint32(/* id 9, wireType 0 =*/72).uint32(message.minPublishers); - if (message.minRate != null && Object.hasOwnProperty.call(message, "minRate")) - $root.google.protobuf.Duration.encode(message.minRate, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.expiryTime != null && Object.hasOwnProperty.call(message, "expiryTime")) - $root.google.protobuf.Duration.encode(message.expiryTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.isActivated != null && Object.hasOwnProperty.call(message, "isActivated")) - writer.uint32(/* id 12, wireType 0 =*/96).bool(message.isActivated); - if (message.hermesId != null && Object.hasOwnProperty.call(message, "hermesId")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.hermesId); - if (message.quoteCurrency != null && Object.hasOwnProperty.call(message, "quoteCurrency")) - writer.uint32(/* id 14, wireType 2 =*/114).string(message.quoteCurrency); - if (message.marketSchedule != null && Object.hasOwnProperty.call(message, "marketSchedule")) - writer.uint32(/* id 15, wireType 2 =*/122).string(message.marketSchedule); - return writer; - }; - - /** - * Encodes the specified FeedMetadata message, length delimited. Does not implicitly {@link lazer.FeedMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof lazer.FeedMetadata - * @static - * @param {lazer.IFeedMetadata} message FeedMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeedMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FeedMetadata message from the specified reader or buffer. - * @function decode - * @memberof lazer.FeedMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {lazer.FeedMetadata} FeedMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeedMetadata.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.lazer.FeedMetadata(); - while (reader.pos < end) { - let tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.priceFeedId = reader.uint32(); - break; - } - case 2: { - message.name = reader.string(); - break; - } - case 3: { - message.symbol = reader.string(); - break; - } - case 4: { - message.description = reader.string(); - break; - } - case 5: { - message.assetType = reader.int32(); - break; - } - case 6: { - message.exponent = reader.sint32(); - break; - } - case 7: { - message.cmcId = reader.uint32(); - break; - } - case 8: { - message.fundingRateInterval = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 9: { - message.minPublishers = reader.uint32(); - break; - } - case 10: { - message.minRate = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 11: { - message.expiryTime = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 12: { - message.isActivated = reader.bool(); - break; - } - case 13: { - message.hermesId = reader.string(); - break; - } - case 14: { - message.quoteCurrency = reader.string(); - break; - } - case 15: { - message.marketSchedule = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FeedMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof lazer.FeedMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {lazer.FeedMetadata} FeedMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeedMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FeedMetadata message. - * @function verify - * @memberof lazer.FeedMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FeedMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - let properties = {}; - if (message.priceFeedId != null && message.hasOwnProperty("priceFeedId")) { - properties._priceFeedId = 1; - if (!$util.isInteger(message.priceFeedId)) - return "priceFeedId: integer expected"; - } - if (message.name != null && message.hasOwnProperty("name")) { - properties._name = 1; - if (!$util.isString(message.name)) - return "name: string expected"; - } - if (message.symbol != null && message.hasOwnProperty("symbol")) { - properties._symbol = 1; - if (!$util.isString(message.symbol)) - return "symbol: string expected"; - } - if (message.description != null && message.hasOwnProperty("description")) { - properties._description = 1; - if (!$util.isString(message.description)) - return "description: string expected"; - } - if (message.assetType != null && message.hasOwnProperty("assetType")) { - properties._assetType = 1; - switch (message.assetType) { - default: - return "assetType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - break; - } - } - if (message.exponent != null && message.hasOwnProperty("exponent")) { - properties._exponent = 1; - if (!$util.isInteger(message.exponent)) - return "exponent: integer expected"; - } - if (message.cmcId != null && message.hasOwnProperty("cmcId")) { - properties._cmcId = 1; - if (!$util.isInteger(message.cmcId)) - return "cmcId: integer expected"; - } - if (message.fundingRateInterval != null && message.hasOwnProperty("fundingRateInterval")) { - properties._fundingRateInterval = 1; - { - let error = $root.google.protobuf.Duration.verify(message.fundingRateInterval); - if (error) - return "fundingRateInterval." + error; - } - } - if (message.minPublishers != null && message.hasOwnProperty("minPublishers")) { - properties._minPublishers = 1; - if (!$util.isInteger(message.minPublishers)) - return "minPublishers: integer expected"; - } - if (message.minRate != null && message.hasOwnProperty("minRate")) { - properties._minRate = 1; - { - let error = $root.google.protobuf.Duration.verify(message.minRate); - if (error) - return "minRate." + error; - } - } - if (message.expiryTime != null && message.hasOwnProperty("expiryTime")) { - properties._expiryTime = 1; - { - let error = $root.google.protobuf.Duration.verify(message.expiryTime); - if (error) - return "expiryTime." + error; - } - } - if (message.isActivated != null && message.hasOwnProperty("isActivated")) { - properties._isActivated = 1; - if (typeof message.isActivated !== "boolean") - return "isActivated: boolean expected"; - } - if (message.hermesId != null && message.hasOwnProperty("hermesId")) { - properties._hermesId = 1; - if (!$util.isString(message.hermesId)) - return "hermesId: string expected"; - } - if (message.quoteCurrency != null && message.hasOwnProperty("quoteCurrency")) { - properties._quoteCurrency = 1; - if (!$util.isString(message.quoteCurrency)) - return "quoteCurrency: string expected"; - } - if (message.marketSchedule != null && message.hasOwnProperty("marketSchedule")) { - properties._marketSchedule = 1; - if (!$util.isString(message.marketSchedule)) - return "marketSchedule: string expected"; - } - return null; - }; - - /** - * Creates a FeedMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof lazer.FeedMetadata - * @static - * @param {Object.} object Plain object - * @returns {lazer.FeedMetadata} FeedMetadata - */ - FeedMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.lazer.FeedMetadata) - return object; - let message = new $root.lazer.FeedMetadata(); - if (object.priceFeedId != null) - message.priceFeedId = object.priceFeedId >>> 0; - if (object.name != null) - message.name = String(object.name); - if (object.symbol != null) - message.symbol = String(object.symbol); - if (object.description != null) - message.description = String(object.description); - switch (object.assetType) { - default: - if (typeof object.assetType === "number") { - message.assetType = object.assetType; - break; - } - break; - case "CRYPTO": - case 0: - message.assetType = 0; - break; - case "FUNDING_RATE": - case 1: - message.assetType = 1; - break; - case "FX": - case 2: - message.assetType = 2; - break; - case "COMMODITY": - case 3: - message.assetType = 3; - break; - case "NAV": - case 4: - message.assetType = 4; - break; - case "CRYPTO_INDEX": - case 5: - message.assetType = 5; - break; - case "CRYPTO_REDEMPTION_RATE": - case 6: - message.assetType = 6; - break; - case "EQUITY": - case 7: - message.assetType = 7; - break; - case "METAL": - case 8: - message.assetType = 8; - break; - case "RATES": - case 9: - message.assetType = 9; - break; - } - if (object.exponent != null) - message.exponent = object.exponent | 0; - if (object.cmcId != null) - message.cmcId = object.cmcId >>> 0; - if (object.fundingRateInterval != null) { - if (typeof object.fundingRateInterval !== "object") - throw TypeError(".lazer.FeedMetadata.fundingRateInterval: object expected"); - message.fundingRateInterval = $root.google.protobuf.Duration.fromObject(object.fundingRateInterval); - } - if (object.minPublishers != null) - message.minPublishers = object.minPublishers >>> 0; - if (object.minRate != null) { - if (typeof object.minRate !== "object") - throw TypeError(".lazer.FeedMetadata.minRate: object expected"); - message.minRate = $root.google.protobuf.Duration.fromObject(object.minRate); - } - if (object.expiryTime != null) { - if (typeof object.expiryTime !== "object") - throw TypeError(".lazer.FeedMetadata.expiryTime: object expected"); - message.expiryTime = $root.google.protobuf.Duration.fromObject(object.expiryTime); - } - if (object.isActivated != null) - message.isActivated = Boolean(object.isActivated); - if (object.hermesId != null) - message.hermesId = String(object.hermesId); - if (object.quoteCurrency != null) - message.quoteCurrency = String(object.quoteCurrency); - if (object.marketSchedule != null) - message.marketSchedule = String(object.marketSchedule); - return message; - }; - - /** - * Creates a plain object from a FeedMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof lazer.FeedMetadata - * @static - * @param {lazer.FeedMetadata} message FeedMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FeedMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (message.priceFeedId != null && message.hasOwnProperty("priceFeedId")) { - object.priceFeedId = message.priceFeedId; - if (options.oneofs) - object._priceFeedId = "priceFeedId"; - } - if (message.name != null && message.hasOwnProperty("name")) { - object.name = message.name; - if (options.oneofs) - object._name = "name"; - } - if (message.symbol != null && message.hasOwnProperty("symbol")) { - object.symbol = message.symbol; - if (options.oneofs) - object._symbol = "symbol"; - } - if (message.description != null && message.hasOwnProperty("description")) { - object.description = message.description; - if (options.oneofs) - object._description = "description"; - } - if (message.assetType != null && message.hasOwnProperty("assetType")) { - object.assetType = options.enums === String ? $root.lazer.AssetType[message.assetType] === undefined ? message.assetType : $root.lazer.AssetType[message.assetType] : message.assetType; - if (options.oneofs) - object._assetType = "assetType"; - } - if (message.exponent != null && message.hasOwnProperty("exponent")) { - object.exponent = message.exponent; - if (options.oneofs) - object._exponent = "exponent"; - } - if (message.cmcId != null && message.hasOwnProperty("cmcId")) { - object.cmcId = message.cmcId; - if (options.oneofs) - object._cmcId = "cmcId"; - } - if (message.fundingRateInterval != null && message.hasOwnProperty("fundingRateInterval")) { - object.fundingRateInterval = $root.google.protobuf.Duration.toObject(message.fundingRateInterval, options); - if (options.oneofs) - object._fundingRateInterval = "fundingRateInterval"; - } - if (message.minPublishers != null && message.hasOwnProperty("minPublishers")) { - object.minPublishers = message.minPublishers; - if (options.oneofs) - object._minPublishers = "minPublishers"; - } - if (message.minRate != null && message.hasOwnProperty("minRate")) { - object.minRate = $root.google.protobuf.Duration.toObject(message.minRate, options); - if (options.oneofs) - object._minRate = "minRate"; - } - if (message.expiryTime != null && message.hasOwnProperty("expiryTime")) { - object.expiryTime = $root.google.protobuf.Duration.toObject(message.expiryTime, options); - if (options.oneofs) - object._expiryTime = "expiryTime"; - } - if (message.isActivated != null && message.hasOwnProperty("isActivated")) { - object.isActivated = message.isActivated; - if (options.oneofs) - object._isActivated = "isActivated"; - } - if (message.hermesId != null && message.hasOwnProperty("hermesId")) { - object.hermesId = message.hermesId; - if (options.oneofs) - object._hermesId = "hermesId"; - } - if (message.quoteCurrency != null && message.hasOwnProperty("quoteCurrency")) { - object.quoteCurrency = message.quoteCurrency; - if (options.oneofs) - object._quoteCurrency = "quoteCurrency"; - } - if (message.marketSchedule != null && message.hasOwnProperty("marketSchedule")) { - object.marketSchedule = message.marketSchedule; - if (options.oneofs) - object._marketSchedule = "marketSchedule"; - } - return object; - }; - - /** - * Converts this FeedMetadata to JSON. - * @function toJSON - * @memberof lazer.FeedMetadata - * @instance - * @returns {Object.} JSON object - */ - FeedMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FeedMetadata - * @function getTypeUrl - * @memberof lazer.FeedMetadata - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FeedMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/lazer.FeedMetadata"; - }; + /** + * FeedPublisherState lastFeedData. + * @member {lazer.IFeedData|null|undefined} lastFeedData + * @memberof lazer.FeedPublisherState + * @instance + */ + FeedPublisherState.prototype.lastFeedData = null; - return FeedMetadata; - })(); + // OneOf field names bound to virtual getters and setters + let $oneOfFields; - lazer.Feed = (function() { - - /** - * Properties of a Feed. - * @memberof lazer - * @interface IFeed - * @property {lazer.IFeedMetadata|null} [metadata] Feed metadata - * @property {google.protobuf.ITimestamp|null} [pendingActivation] Feed pendingActivation - * @property {google.protobuf.ITimestamp|null} [pendingDeactivation] Feed pendingDeactivation - * @property {Array.|null} [perPublisher] Feed perPublisher - */ - - /** - * Constructs a new Feed. - * @memberof lazer - * @classdesc Represents a Feed. - * @implements IFeed - * @constructor - * @param {lazer.IFeed=} [properties] Properties to set - */ - function Feed(properties) { - this.perPublisher = []; - 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]]; - } + /** + * FeedPublisherState _publisherId. + * @member {"publisherId"|undefined} _publisherId + * @memberof lazer.FeedPublisherState + * @instance + */ + Object.defineProperty(FeedPublisherState.prototype, "_publisherId", { + get: $util.oneOfGetter(($oneOfFields = ["publisherId"])), + set: $util.oneOfSetter($oneOfFields), + }); - /** - * Feed metadata. - * @member {lazer.IFeedMetadata|null|undefined} metadata - * @memberof lazer.Feed - * @instance - */ - Feed.prototype.metadata = null; - - /** - * Feed pendingActivation. - * @member {google.protobuf.ITimestamp|null|undefined} pendingActivation - * @memberof lazer.Feed - * @instance - */ - Feed.prototype.pendingActivation = null; - - /** - * Feed pendingDeactivation. - * @member {google.protobuf.ITimestamp|null|undefined} pendingDeactivation - * @memberof lazer.Feed - * @instance - */ - Feed.prototype.pendingDeactivation = null; - - /** - * Feed perPublisher. - * @member {Array.} perPublisher - * @memberof lazer.Feed - * @instance - */ - Feed.prototype.perPublisher = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - let $oneOfFields; - - /** - * Feed _metadata. - * @member {"metadata"|undefined} _metadata - * @memberof lazer.Feed - * @instance - */ - Object.defineProperty(Feed.prototype, "_metadata", { - get: $util.oneOfGetter($oneOfFields = ["metadata"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Feed _pendingActivation. - * @member {"pendingActivation"|undefined} _pendingActivation - * @memberof lazer.Feed - * @instance - */ - Object.defineProperty(Feed.prototype, "_pendingActivation", { - get: $util.oneOfGetter($oneOfFields = ["pendingActivation"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Feed _pendingDeactivation. - * @member {"pendingDeactivation"|undefined} _pendingDeactivation - * @memberof lazer.Feed - * @instance - */ - Object.defineProperty(Feed.prototype, "_pendingDeactivation", { - get: $util.oneOfGetter($oneOfFields = ["pendingDeactivation"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Feed instance using the specified properties. - * @function create - * @memberof lazer.Feed - * @static - * @param {lazer.IFeed=} [properties] Properties to set - * @returns {lazer.Feed} Feed instance - */ - Feed.create = function create(properties) { - return new Feed(properties); - }; - - /** - * Encodes the specified Feed message. Does not implicitly {@link lazer.Feed.verify|verify} messages. - * @function encode - * @memberof lazer.Feed - * @static - * @param {lazer.IFeed} message Feed message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Feed.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.lazer.FeedMetadata.encode(message.metadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.pendingActivation != null && Object.hasOwnProperty.call(message, "pendingActivation")) - $root.google.protobuf.Timestamp.encode(message.pendingActivation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.pendingDeactivation != null && Object.hasOwnProperty.call(message, "pendingDeactivation")) - $root.google.protobuf.Timestamp.encode(message.pendingDeactivation, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.perPublisher != null && message.perPublisher.length) - for (let i = 0; i < message.perPublisher.length; ++i) - $root.lazer.FeedPublisherState.encode(message.perPublisher[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Feed message, length delimited. Does not implicitly {@link lazer.Feed.verify|verify} messages. - * @function encodeDelimited - * @memberof lazer.Feed - * @static - * @param {lazer.IFeed} message Feed message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Feed.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Feed message from the specified reader or buffer. - * @function decode - * @memberof lazer.Feed - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {lazer.Feed} Feed - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Feed.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.lazer.Feed(); - while (reader.pos < end) { - let tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.metadata = $root.lazer.FeedMetadata.decode(reader, reader.uint32()); - break; - } - case 2: { - message.pendingActivation = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.pendingDeactivation = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - if (!(message.perPublisher && message.perPublisher.length)) - message.perPublisher = []; - message.perPublisher.push($root.lazer.FeedPublisherState.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Feed message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof lazer.Feed - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {lazer.Feed} Feed - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Feed.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Feed message. - * @function verify - * @memberof lazer.Feed - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Feed.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - let properties = {}; - if (message.metadata != null && message.hasOwnProperty("metadata")) { - properties._metadata = 1; - { - let error = $root.lazer.FeedMetadata.verify(message.metadata); - if (error) - return "metadata." + error; - } - } - if (message.pendingActivation != null && message.hasOwnProperty("pendingActivation")) { - properties._pendingActivation = 1; - { - let error = $root.google.protobuf.Timestamp.verify(message.pendingActivation); - if (error) - return "pendingActivation." + error; - } - } - if (message.pendingDeactivation != null && message.hasOwnProperty("pendingDeactivation")) { - properties._pendingDeactivation = 1; - { - let error = $root.google.protobuf.Timestamp.verify(message.pendingDeactivation); - if (error) - return "pendingDeactivation." + error; - } - } - if (message.perPublisher != null && message.hasOwnProperty("perPublisher")) { - if (!Array.isArray(message.perPublisher)) - return "perPublisher: array expected"; - for (let i = 0; i < message.perPublisher.length; ++i) { - let error = $root.lazer.FeedPublisherState.verify(message.perPublisher[i]); - if (error) - return "perPublisher." + error; - } - } - return null; - }; - - /** - * Creates a Feed message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof lazer.Feed - * @static - * @param {Object.} object Plain object - * @returns {lazer.Feed} Feed - */ - Feed.fromObject = function fromObject(object) { - if (object instanceof $root.lazer.Feed) - return object; - let message = new $root.lazer.Feed(); - if (object.metadata != null) { - if (typeof object.metadata !== "object") - throw TypeError(".lazer.Feed.metadata: object expected"); - message.metadata = $root.lazer.FeedMetadata.fromObject(object.metadata); - } - if (object.pendingActivation != null) { - if (typeof object.pendingActivation !== "object") - throw TypeError(".lazer.Feed.pendingActivation: object expected"); - message.pendingActivation = $root.google.protobuf.Timestamp.fromObject(object.pendingActivation); - } - if (object.pendingDeactivation != null) { - if (typeof object.pendingDeactivation !== "object") - throw TypeError(".lazer.Feed.pendingDeactivation: object expected"); - message.pendingDeactivation = $root.google.protobuf.Timestamp.fromObject(object.pendingDeactivation); - } - if (object.perPublisher) { - if (!Array.isArray(object.perPublisher)) - throw TypeError(".lazer.Feed.perPublisher: array expected"); - message.perPublisher = []; - for (let i = 0; i < object.perPublisher.length; ++i) { - if (typeof object.perPublisher[i] !== "object") - throw TypeError(".lazer.Feed.perPublisher: object expected"); - message.perPublisher[i] = $root.lazer.FeedPublisherState.fromObject(object.perPublisher[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Feed message. Also converts values to other types if specified. - * @function toObject - * @memberof lazer.Feed - * @static - * @param {lazer.Feed} message Feed - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Feed.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.perPublisher = []; - if (message.metadata != null && message.hasOwnProperty("metadata")) { - object.metadata = $root.lazer.FeedMetadata.toObject(message.metadata, options); - if (options.oneofs) - object._metadata = "metadata"; - } - if (message.pendingActivation != null && message.hasOwnProperty("pendingActivation")) { - object.pendingActivation = $root.google.protobuf.Timestamp.toObject(message.pendingActivation, options); - if (options.oneofs) - object._pendingActivation = "pendingActivation"; - } - if (message.pendingDeactivation != null && message.hasOwnProperty("pendingDeactivation")) { - object.pendingDeactivation = $root.google.protobuf.Timestamp.toObject(message.pendingDeactivation, options); - if (options.oneofs) - object._pendingDeactivation = "pendingDeactivation"; - } - if (message.perPublisher && message.perPublisher.length) { - object.perPublisher = []; - for (let j = 0; j < message.perPublisher.length; ++j) - object.perPublisher[j] = $root.lazer.FeedPublisherState.toObject(message.perPublisher[j], options); - } - return object; - }; - - /** - * Converts this Feed to JSON. - * @function toJSON - * @memberof lazer.Feed - * @instance - * @returns {Object.} JSON object - */ - Feed.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Feed - * @function getTypeUrl - * @memberof lazer.Feed - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Feed.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/lazer.Feed"; - }; + /** + * FeedPublisherState _lastUpdateTimestamp. + * @member {"lastUpdateTimestamp"|undefined} _lastUpdateTimestamp + * @memberof lazer.FeedPublisherState + * @instance + */ + Object.defineProperty( + FeedPublisherState.prototype, + "_lastUpdateTimestamp", + { + get: $util.oneOfGetter(($oneOfFields = ["lastUpdateTimestamp"])), + set: $util.oneOfSetter($oneOfFields), + }, + ); - return Feed; - })(); + /** + * FeedPublisherState _lastPublisherTimestamp. + * @member {"lastPublisherTimestamp"|undefined} _lastPublisherTimestamp + * @memberof lazer.FeedPublisherState + * @instance + */ + Object.defineProperty( + FeedPublisherState.prototype, + "_lastPublisherTimestamp", + { + get: $util.oneOfGetter(($oneOfFields = ["lastPublisherTimestamp"])), + set: $util.oneOfSetter($oneOfFields), + }, + ); + + /** + * FeedPublisherState _lastFeedData. + * @member {"lastFeedData"|undefined} _lastFeedData + * @memberof lazer.FeedPublisherState + * @instance + */ + Object.defineProperty(FeedPublisherState.prototype, "_lastFeedData", { + get: $util.oneOfGetter(($oneOfFields = ["lastFeedData"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Creates a new FeedPublisherState instance using the specified properties. + * @function create + * @memberof lazer.FeedPublisherState + * @static + * @param {lazer.IFeedPublisherState=} [properties] Properties to set + * @returns {lazer.FeedPublisherState} FeedPublisherState instance + */ + FeedPublisherState.create = function create(properties) { + return new FeedPublisherState(properties); + }; + + /** + * Encodes the specified FeedPublisherState message. Does not implicitly {@link lazer.FeedPublisherState.verify|verify} messages. + * @function encode + * @memberof lazer.FeedPublisherState + * @static + * @param {lazer.IFeedPublisherState} message FeedPublisherState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeedPublisherState.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if ( + message.publisherId != null && + Object.hasOwnProperty.call(message, "publisherId") + ) + writer.uint32(/* id 1, wireType 0 =*/ 8).uint32(message.publisherId); + if ( + message.lastUpdateTimestamp != null && + Object.hasOwnProperty.call(message, "lastUpdateTimestamp") + ) + $root.google.protobuf.Timestamp.encode( + message.lastUpdateTimestamp, + writer.uint32(/* id 2, wireType 2 =*/ 18).fork(), + ).ldelim(); + if ( + message.lastPublisherTimestamp != null && + Object.hasOwnProperty.call(message, "lastPublisherTimestamp") + ) + $root.google.protobuf.Timestamp.encode( + message.lastPublisherTimestamp, + writer.uint32(/* id 3, wireType 2 =*/ 26).fork(), + ).ldelim(); + if ( + message.lastFeedData != null && + Object.hasOwnProperty.call(message, "lastFeedData") + ) + $root.lazer.FeedData.encode( + message.lastFeedData, + writer.uint32(/* id 4, wireType 2 =*/ 34).fork(), + ).ldelim(); + return writer; + }; - lazer.FeedPublisherState = (function() { - - /** - * Properties of a FeedPublisherState. - * @memberof lazer - * @interface IFeedPublisherState - * @property {number|null} [publisherId] FeedPublisherState publisherId - * @property {google.protobuf.ITimestamp|null} [lastUpdateTimestamp] FeedPublisherState lastUpdateTimestamp - * @property {google.protobuf.ITimestamp|null} [lastPublisherTimestamp] FeedPublisherState lastPublisherTimestamp - * @property {lazer.IFeedData|null} [lastFeedData] FeedPublisherState lastFeedData - */ - - /** - * Constructs a new FeedPublisherState. - * @memberof lazer - * @classdesc Represents a FeedPublisherState. - * @implements IFeedPublisherState - * @constructor - * @param {lazer.IFeedPublisherState=} [properties] Properties to set - */ - function FeedPublisherState(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 FeedPublisherState message, length delimited. Does not implicitly {@link lazer.FeedPublisherState.verify|verify} messages. + * @function encodeDelimited + * @memberof lazer.FeedPublisherState + * @static + * @param {lazer.IFeedPublisherState} message FeedPublisherState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeedPublisherState.encodeDelimited = function encodeDelimited( + message, + writer, + ) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeedPublisherState message from the specified reader or buffer. + * @function decode + * @memberof lazer.FeedPublisherState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {lazer.FeedPublisherState} FeedPublisherState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeedPublisherState.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.lazer.FeedPublisherState(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.publisherId = reader.uint32(); + break; + } + case 2: { + message.lastUpdateTimestamp = + $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.lastPublisherTimestamp = + $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.lastFeedData = $root.lazer.FeedData.decode( + reader, + reader.uint32(), + ); + break; + } + default: + reader.skipType(tag & 7); + break; } + } + return message; + }; - /** - * FeedPublisherState publisherId. - * @member {number|null|undefined} publisherId - * @memberof lazer.FeedPublisherState - * @instance - */ - FeedPublisherState.prototype.publisherId = null; - - /** - * FeedPublisherState lastUpdateTimestamp. - * @member {google.protobuf.ITimestamp|null|undefined} lastUpdateTimestamp - * @memberof lazer.FeedPublisherState - * @instance - */ - FeedPublisherState.prototype.lastUpdateTimestamp = null; - - /** - * FeedPublisherState lastPublisherTimestamp. - * @member {google.protobuf.ITimestamp|null|undefined} lastPublisherTimestamp - * @memberof lazer.FeedPublisherState - * @instance - */ - FeedPublisherState.prototype.lastPublisherTimestamp = null; - - /** - * FeedPublisherState lastFeedData. - * @member {lazer.IFeedData|null|undefined} lastFeedData - * @memberof lazer.FeedPublisherState - * @instance - */ - FeedPublisherState.prototype.lastFeedData = null; - - // OneOf field names bound to virtual getters and setters - let $oneOfFields; - - /** - * FeedPublisherState _publisherId. - * @member {"publisherId"|undefined} _publisherId - * @memberof lazer.FeedPublisherState - * @instance - */ - Object.defineProperty(FeedPublisherState.prototype, "_publisherId", { - get: $util.oneOfGetter($oneOfFields = ["publisherId"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * FeedPublisherState _lastUpdateTimestamp. - * @member {"lastUpdateTimestamp"|undefined} _lastUpdateTimestamp - * @memberof lazer.FeedPublisherState - * @instance - */ - Object.defineProperty(FeedPublisherState.prototype, "_lastUpdateTimestamp", { - get: $util.oneOfGetter($oneOfFields = ["lastUpdateTimestamp"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * FeedPublisherState _lastPublisherTimestamp. - * @member {"lastPublisherTimestamp"|undefined} _lastPublisherTimestamp - * @memberof lazer.FeedPublisherState - * @instance - */ - Object.defineProperty(FeedPublisherState.prototype, "_lastPublisherTimestamp", { - get: $util.oneOfGetter($oneOfFields = ["lastPublisherTimestamp"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * FeedPublisherState _lastFeedData. - * @member {"lastFeedData"|undefined} _lastFeedData - * @memberof lazer.FeedPublisherState - * @instance - */ - Object.defineProperty(FeedPublisherState.prototype, "_lastFeedData", { - get: $util.oneOfGetter($oneOfFields = ["lastFeedData"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new FeedPublisherState instance using the specified properties. - * @function create - * @memberof lazer.FeedPublisherState - * @static - * @param {lazer.IFeedPublisherState=} [properties] Properties to set - * @returns {lazer.FeedPublisherState} FeedPublisherState instance - */ - FeedPublisherState.create = function create(properties) { - return new FeedPublisherState(properties); - }; - - /** - * Encodes the specified FeedPublisherState message. Does not implicitly {@link lazer.FeedPublisherState.verify|verify} messages. - * @function encode - * @memberof lazer.FeedPublisherState - * @static - * @param {lazer.IFeedPublisherState} message FeedPublisherState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeedPublisherState.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.publisherId != null && Object.hasOwnProperty.call(message, "publisherId")) - writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.publisherId); - if (message.lastUpdateTimestamp != null && Object.hasOwnProperty.call(message, "lastUpdateTimestamp")) - $root.google.protobuf.Timestamp.encode(message.lastUpdateTimestamp, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.lastPublisherTimestamp != null && Object.hasOwnProperty.call(message, "lastPublisherTimestamp")) - $root.google.protobuf.Timestamp.encode(message.lastPublisherTimestamp, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.lastFeedData != null && Object.hasOwnProperty.call(message, "lastFeedData")) - $root.lazer.FeedData.encode(message.lastFeedData, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FeedPublisherState message, length delimited. Does not implicitly {@link lazer.FeedPublisherState.verify|verify} messages. - * @function encodeDelimited - * @memberof lazer.FeedPublisherState - * @static - * @param {lazer.IFeedPublisherState} message FeedPublisherState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeedPublisherState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FeedPublisherState message from the specified reader or buffer. - * @function decode - * @memberof lazer.FeedPublisherState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {lazer.FeedPublisherState} FeedPublisherState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeedPublisherState.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.lazer.FeedPublisherState(); - while (reader.pos < end) { - let tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.publisherId = reader.uint32(); - break; - } - case 2: { - message.lastUpdateTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.lastPublisherTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.lastFeedData = $root.lazer.FeedData.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FeedPublisherState message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof lazer.FeedPublisherState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {lazer.FeedPublisherState} FeedPublisherState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeedPublisherState.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FeedPublisherState message. - * @function verify - * @memberof lazer.FeedPublisherState - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FeedPublisherState.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - let properties = {}; - if (message.publisherId != null && message.hasOwnProperty("publisherId")) { - properties._publisherId = 1; - if (!$util.isInteger(message.publisherId)) - return "publisherId: integer expected"; - } - if (message.lastUpdateTimestamp != null && message.hasOwnProperty("lastUpdateTimestamp")) { - properties._lastUpdateTimestamp = 1; - { - let error = $root.google.protobuf.Timestamp.verify(message.lastUpdateTimestamp); - if (error) - return "lastUpdateTimestamp." + error; - } - } - if (message.lastPublisherTimestamp != null && message.hasOwnProperty("lastPublisherTimestamp")) { - properties._lastPublisherTimestamp = 1; - { - let error = $root.google.protobuf.Timestamp.verify(message.lastPublisherTimestamp); - if (error) - return "lastPublisherTimestamp." + error; - } - } - if (message.lastFeedData != null && message.hasOwnProperty("lastFeedData")) { - properties._lastFeedData = 1; - { - let error = $root.lazer.FeedData.verify(message.lastFeedData); - if (error) - return "lastFeedData." + error; - } - } - return null; - }; - - /** - * Creates a FeedPublisherState message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof lazer.FeedPublisherState - * @static - * @param {Object.} object Plain object - * @returns {lazer.FeedPublisherState} FeedPublisherState - */ - FeedPublisherState.fromObject = function fromObject(object) { - if (object instanceof $root.lazer.FeedPublisherState) - return object; - let message = new $root.lazer.FeedPublisherState(); - if (object.publisherId != null) - message.publisherId = object.publisherId >>> 0; - if (object.lastUpdateTimestamp != null) { - if (typeof object.lastUpdateTimestamp !== "object") - throw TypeError(".lazer.FeedPublisherState.lastUpdateTimestamp: object expected"); - message.lastUpdateTimestamp = $root.google.protobuf.Timestamp.fromObject(object.lastUpdateTimestamp); - } - if (object.lastPublisherTimestamp != null) { - if (typeof object.lastPublisherTimestamp !== "object") - throw TypeError(".lazer.FeedPublisherState.lastPublisherTimestamp: object expected"); - message.lastPublisherTimestamp = $root.google.protobuf.Timestamp.fromObject(object.lastPublisherTimestamp); - } - if (object.lastFeedData != null) { - if (typeof object.lastFeedData !== "object") - throw TypeError(".lazer.FeedPublisherState.lastFeedData: object expected"); - message.lastFeedData = $root.lazer.FeedData.fromObject(object.lastFeedData); - } - return message; - }; - - /** - * Creates a plain object from a FeedPublisherState message. Also converts values to other types if specified. - * @function toObject - * @memberof lazer.FeedPublisherState - * @static - * @param {lazer.FeedPublisherState} message FeedPublisherState - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FeedPublisherState.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (message.publisherId != null && message.hasOwnProperty("publisherId")) { - object.publisherId = message.publisherId; - if (options.oneofs) - object._publisherId = "publisherId"; - } - if (message.lastUpdateTimestamp != null && message.hasOwnProperty("lastUpdateTimestamp")) { - object.lastUpdateTimestamp = $root.google.protobuf.Timestamp.toObject(message.lastUpdateTimestamp, options); - if (options.oneofs) - object._lastUpdateTimestamp = "lastUpdateTimestamp"; - } - if (message.lastPublisherTimestamp != null && message.hasOwnProperty("lastPublisherTimestamp")) { - object.lastPublisherTimestamp = $root.google.protobuf.Timestamp.toObject(message.lastPublisherTimestamp, options); - if (options.oneofs) - object._lastPublisherTimestamp = "lastPublisherTimestamp"; - } - if (message.lastFeedData != null && message.hasOwnProperty("lastFeedData")) { - object.lastFeedData = $root.lazer.FeedData.toObject(message.lastFeedData, options); - if (options.oneofs) - object._lastFeedData = "lastFeedData"; - } - return object; - }; - - /** - * Converts this FeedPublisherState to JSON. - * @function toJSON - * @memberof lazer.FeedPublisherState - * @instance - * @returns {Object.} JSON object - */ - FeedPublisherState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FeedPublisherState - * @function getTypeUrl - * @memberof lazer.FeedPublisherState - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FeedPublisherState.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/lazer.FeedPublisherState"; - }; + /** + * Decodes a FeedPublisherState message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof lazer.FeedPublisherState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {lazer.FeedPublisherState} FeedPublisherState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeedPublisherState.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - return FeedPublisherState; - })(); + /** + * Verifies a FeedPublisherState message. + * @function verify + * @memberof lazer.FeedPublisherState + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeedPublisherState.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if ( + message.publisherId != null && + message.hasOwnProperty("publisherId") + ) { + properties._publisherId = 1; + if (!$util.isInteger(message.publisherId)) + return "publisherId: integer expected"; + } + if ( + message.lastUpdateTimestamp != null && + message.hasOwnProperty("lastUpdateTimestamp") + ) { + properties._lastUpdateTimestamp = 1; + { + let error = $root.google.protobuf.Timestamp.verify( + message.lastUpdateTimestamp, + ); + if (error) return "lastUpdateTimestamp." + error; + } + } + if ( + message.lastPublisherTimestamp != null && + message.hasOwnProperty("lastPublisherTimestamp") + ) { + properties._lastPublisherTimestamp = 1; + { + let error = $root.google.protobuf.Timestamp.verify( + message.lastPublisherTimestamp, + ); + if (error) return "lastPublisherTimestamp." + error; + } + } + if ( + message.lastFeedData != null && + message.hasOwnProperty("lastFeedData") + ) { + properties._lastFeedData = 1; + { + let error = $root.lazer.FeedData.verify(message.lastFeedData); + if (error) return "lastFeedData." + error; + } + } + return null; + }; + + /** + * Creates a FeedPublisherState message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof lazer.FeedPublisherState + * @static + * @param {Object.} object Plain object + * @returns {lazer.FeedPublisherState} FeedPublisherState + */ + FeedPublisherState.fromObject = function fromObject(object) { + if (object instanceof $root.lazer.FeedPublisherState) return object; + let message = new $root.lazer.FeedPublisherState(); + if (object.publisherId != null) + message.publisherId = object.publisherId >>> 0; + if (object.lastUpdateTimestamp != null) { + if (typeof object.lastUpdateTimestamp !== "object") + throw TypeError( + ".lazer.FeedPublisherState.lastUpdateTimestamp: object expected", + ); + message.lastUpdateTimestamp = + $root.google.protobuf.Timestamp.fromObject( + object.lastUpdateTimestamp, + ); + } + if (object.lastPublisherTimestamp != null) { + if (typeof object.lastPublisherTimestamp !== "object") + throw TypeError( + ".lazer.FeedPublisherState.lastPublisherTimestamp: object expected", + ); + message.lastPublisherTimestamp = + $root.google.protobuf.Timestamp.fromObject( + object.lastPublisherTimestamp, + ); + } + if (object.lastFeedData != null) { + if (typeof object.lastFeedData !== "object") + throw TypeError( + ".lazer.FeedPublisherState.lastFeedData: object expected", + ); + message.lastFeedData = $root.lazer.FeedData.fromObject( + object.lastFeedData, + ); + } + return message; + }; + + /** + * Creates a plain object from a FeedPublisherState message. Also converts values to other types if specified. + * @function toObject + * @memberof lazer.FeedPublisherState + * @static + * @param {lazer.FeedPublisherState} message FeedPublisherState + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeedPublisherState.toObject = function toObject(message, options) { + if (!options) options = {}; + let object = {}; + if ( + message.publisherId != null && + message.hasOwnProperty("publisherId") + ) { + object.publisherId = message.publisherId; + if (options.oneofs) object._publisherId = "publisherId"; + } + if ( + message.lastUpdateTimestamp != null && + message.hasOwnProperty("lastUpdateTimestamp") + ) { + object.lastUpdateTimestamp = $root.google.protobuf.Timestamp.toObject( + message.lastUpdateTimestamp, + options, + ); + if (options.oneofs) object._lastUpdateTimestamp = "lastUpdateTimestamp"; + } + if ( + message.lastPublisherTimestamp != null && + message.hasOwnProperty("lastPublisherTimestamp") + ) { + object.lastPublisherTimestamp = + $root.google.protobuf.Timestamp.toObject( + message.lastPublisherTimestamp, + options, + ); + if (options.oneofs) + object._lastPublisherTimestamp = "lastPublisherTimestamp"; + } + if ( + message.lastFeedData != null && + message.hasOwnProperty("lastFeedData") + ) { + object.lastFeedData = $root.lazer.FeedData.toObject( + message.lastFeedData, + options, + ); + if (options.oneofs) object._lastFeedData = "lastFeedData"; + } + return object; + }; + + /** + * Converts this FeedPublisherState to JSON. + * @function toJSON + * @memberof lazer.FeedPublisherState + * @instance + * @returns {Object.} JSON object + */ + FeedPublisherState.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeedPublisherState + * @function getTypeUrl + * @memberof lazer.FeedPublisherState + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeedPublisherState.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/lazer.FeedPublisherState"; + }; + + return FeedPublisherState; + })(); + + lazer.FeedData = (function () { + /** + * Properties of a FeedData. + * @memberof lazer + * @interface IFeedData + * @property {google.protobuf.ITimestamp|null} [sourceTimestamp] FeedData sourceTimestamp + * @property {google.protobuf.ITimestamp|null} [publisherTimestamp] FeedData publisherTimestamp + * @property {number|Long|null} [price] FeedData price + * @property {number|Long|null} [bestBidPrice] FeedData bestBidPrice + * @property {number|Long|null} [bestAskPrice] FeedData bestAskPrice + * @property {number|Long|null} [fundingRate] FeedData fundingRate + */ + + /** + * Constructs a new FeedData. + * @memberof lazer + * @classdesc Represents a FeedData. + * @implements IFeedData + * @constructor + * @param {lazer.IFeedData=} [properties] Properties to set + */ + function FeedData(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]]; + } + + /** + * FeedData sourceTimestamp. + * @member {google.protobuf.ITimestamp|null|undefined} sourceTimestamp + * @memberof lazer.FeedData + * @instance + */ + FeedData.prototype.sourceTimestamp = null; + + /** + * FeedData publisherTimestamp. + * @member {google.protobuf.ITimestamp|null|undefined} publisherTimestamp + * @memberof lazer.FeedData + * @instance + */ + FeedData.prototype.publisherTimestamp = null; + + /** + * FeedData price. + * @member {number|Long|null|undefined} price + * @memberof lazer.FeedData + * @instance + */ + FeedData.prototype.price = null; + + /** + * FeedData bestBidPrice. + * @member {number|Long|null|undefined} bestBidPrice + * @memberof lazer.FeedData + * @instance + */ + FeedData.prototype.bestBidPrice = null; + + /** + * FeedData bestAskPrice. + * @member {number|Long|null|undefined} bestAskPrice + * @memberof lazer.FeedData + * @instance + */ + FeedData.prototype.bestAskPrice = null; + + /** + * FeedData fundingRate. + * @member {number|Long|null|undefined} fundingRate + * @memberof lazer.FeedData + * @instance + */ + FeedData.prototype.fundingRate = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * FeedData _sourceTimestamp. + * @member {"sourceTimestamp"|undefined} _sourceTimestamp + * @memberof lazer.FeedData + * @instance + */ + Object.defineProperty(FeedData.prototype, "_sourceTimestamp", { + get: $util.oneOfGetter(($oneOfFields = ["sourceTimestamp"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * FeedData _publisherTimestamp. + * @member {"publisherTimestamp"|undefined} _publisherTimestamp + * @memberof lazer.FeedData + * @instance + */ + Object.defineProperty(FeedData.prototype, "_publisherTimestamp", { + get: $util.oneOfGetter(($oneOfFields = ["publisherTimestamp"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * FeedData _price. + * @member {"price"|undefined} _price + * @memberof lazer.FeedData + * @instance + */ + Object.defineProperty(FeedData.prototype, "_price", { + get: $util.oneOfGetter(($oneOfFields = ["price"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * FeedData _bestBidPrice. + * @member {"bestBidPrice"|undefined} _bestBidPrice + * @memberof lazer.FeedData + * @instance + */ + Object.defineProperty(FeedData.prototype, "_bestBidPrice", { + get: $util.oneOfGetter(($oneOfFields = ["bestBidPrice"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * FeedData _bestAskPrice. + * @member {"bestAskPrice"|undefined} _bestAskPrice + * @memberof lazer.FeedData + * @instance + */ + Object.defineProperty(FeedData.prototype, "_bestAskPrice", { + get: $util.oneOfGetter(($oneOfFields = ["bestAskPrice"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * FeedData _fundingRate. + * @member {"fundingRate"|undefined} _fundingRate + * @memberof lazer.FeedData + * @instance + */ + Object.defineProperty(FeedData.prototype, "_fundingRate", { + get: $util.oneOfGetter(($oneOfFields = ["fundingRate"])), + set: $util.oneOfSetter($oneOfFields), + }); + + /** + * Creates a new FeedData instance using the specified properties. + * @function create + * @memberof lazer.FeedData + * @static + * @param {lazer.IFeedData=} [properties] Properties to set + * @returns {lazer.FeedData} FeedData instance + */ + FeedData.create = function create(properties) { + return new FeedData(properties); + }; + + /** + * Encodes the specified FeedData message. Does not implicitly {@link lazer.FeedData.verify|verify} messages. + * @function encode + * @memberof lazer.FeedData + * @static + * @param {lazer.IFeedData} message FeedData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeedData.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if ( + message.sourceTimestamp != null && + Object.hasOwnProperty.call(message, "sourceTimestamp") + ) + $root.google.protobuf.Timestamp.encode( + message.sourceTimestamp, + writer.uint32(/* id 1, wireType 2 =*/ 10).fork(), + ).ldelim(); + if ( + message.publisherTimestamp != null && + Object.hasOwnProperty.call(message, "publisherTimestamp") + ) + $root.google.protobuf.Timestamp.encode( + message.publisherTimestamp, + writer.uint32(/* id 2, wireType 2 =*/ 18).fork(), + ).ldelim(); + if (message.price != null && Object.hasOwnProperty.call(message, "price")) + writer.uint32(/* id 3, wireType 0 =*/ 24).int64(message.price); + if ( + message.bestBidPrice != null && + Object.hasOwnProperty.call(message, "bestBidPrice") + ) + writer.uint32(/* id 4, wireType 0 =*/ 32).int64(message.bestBidPrice); + if ( + message.bestAskPrice != null && + Object.hasOwnProperty.call(message, "bestAskPrice") + ) + writer.uint32(/* id 5, wireType 0 =*/ 40).int64(message.bestAskPrice); + if ( + message.fundingRate != null && + Object.hasOwnProperty.call(message, "fundingRate") + ) + writer.uint32(/* id 6, wireType 0 =*/ 48).int64(message.fundingRate); + return writer; + }; - lazer.FeedData = (function() { - - /** - * Properties of a FeedData. - * @memberof lazer - * @interface IFeedData - * @property {google.protobuf.ITimestamp|null} [sourceTimestamp] FeedData sourceTimestamp - * @property {google.protobuf.ITimestamp|null} [publisherTimestamp] FeedData publisherTimestamp - * @property {number|Long|null} [price] FeedData price - * @property {number|Long|null} [bestBidPrice] FeedData bestBidPrice - * @property {number|Long|null} [bestAskPrice] FeedData bestAskPrice - * @property {number|Long|null} [fundingRate] FeedData fundingRate - */ - - /** - * Constructs a new FeedData. - * @memberof lazer - * @classdesc Represents a FeedData. - * @implements IFeedData - * @constructor - * @param {lazer.IFeedData=} [properties] Properties to set - */ - function FeedData(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 FeedData message, length delimited. Does not implicitly {@link lazer.FeedData.verify|verify} messages. + * @function encodeDelimited + * @memberof lazer.FeedData + * @static + * @param {lazer.IFeedData} message FeedData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeedData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeedData message from the specified reader or buffer. + * @function decode + * @memberof lazer.FeedData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {lazer.FeedData} FeedData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeedData.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.lazer.FeedData(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.sourceTimestamp = $root.google.protobuf.Timestamp.decode( + reader, + reader.uint32(), + ); + break; + } + case 2: { + message.publisherTimestamp = $root.google.protobuf.Timestamp.decode( + reader, + reader.uint32(), + ); + break; + } + case 3: { + message.price = reader.int64(); + break; + } + case 4: { + message.bestBidPrice = reader.int64(); + break; + } + case 5: { + message.bestAskPrice = reader.int64(); + break; + } + case 6: { + message.fundingRate = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; } + } + return message; + }; - /** - * FeedData sourceTimestamp. - * @member {google.protobuf.ITimestamp|null|undefined} sourceTimestamp - * @memberof lazer.FeedData - * @instance - */ - FeedData.prototype.sourceTimestamp = null; - - /** - * FeedData publisherTimestamp. - * @member {google.protobuf.ITimestamp|null|undefined} publisherTimestamp - * @memberof lazer.FeedData - * @instance - */ - FeedData.prototype.publisherTimestamp = null; - - /** - * FeedData price. - * @member {number|Long|null|undefined} price - * @memberof lazer.FeedData - * @instance - */ - FeedData.prototype.price = null; - - /** - * FeedData bestBidPrice. - * @member {number|Long|null|undefined} bestBidPrice - * @memberof lazer.FeedData - * @instance - */ - FeedData.prototype.bestBidPrice = null; - - /** - * FeedData bestAskPrice. - * @member {number|Long|null|undefined} bestAskPrice - * @memberof lazer.FeedData - * @instance - */ - FeedData.prototype.bestAskPrice = null; - - /** - * FeedData fundingRate. - * @member {number|Long|null|undefined} fundingRate - * @memberof lazer.FeedData - * @instance - */ - FeedData.prototype.fundingRate = null; - - // OneOf field names bound to virtual getters and setters - let $oneOfFields; - - /** - * FeedData _sourceTimestamp. - * @member {"sourceTimestamp"|undefined} _sourceTimestamp - * @memberof lazer.FeedData - * @instance - */ - Object.defineProperty(FeedData.prototype, "_sourceTimestamp", { - get: $util.oneOfGetter($oneOfFields = ["sourceTimestamp"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * FeedData _publisherTimestamp. - * @member {"publisherTimestamp"|undefined} _publisherTimestamp - * @memberof lazer.FeedData - * @instance - */ - Object.defineProperty(FeedData.prototype, "_publisherTimestamp", { - get: $util.oneOfGetter($oneOfFields = ["publisherTimestamp"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * FeedData _price. - * @member {"price"|undefined} _price - * @memberof lazer.FeedData - * @instance - */ - Object.defineProperty(FeedData.prototype, "_price", { - get: $util.oneOfGetter($oneOfFields = ["price"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * FeedData _bestBidPrice. - * @member {"bestBidPrice"|undefined} _bestBidPrice - * @memberof lazer.FeedData - * @instance - */ - Object.defineProperty(FeedData.prototype, "_bestBidPrice", { - get: $util.oneOfGetter($oneOfFields = ["bestBidPrice"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * FeedData _bestAskPrice. - * @member {"bestAskPrice"|undefined} _bestAskPrice - * @memberof lazer.FeedData - * @instance - */ - Object.defineProperty(FeedData.prototype, "_bestAskPrice", { - get: $util.oneOfGetter($oneOfFields = ["bestAskPrice"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * FeedData _fundingRate. - * @member {"fundingRate"|undefined} _fundingRate - * @memberof lazer.FeedData - * @instance - */ - Object.defineProperty(FeedData.prototype, "_fundingRate", { - get: $util.oneOfGetter($oneOfFields = ["fundingRate"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new FeedData instance using the specified properties. - * @function create - * @memberof lazer.FeedData - * @static - * @param {lazer.IFeedData=} [properties] Properties to set - * @returns {lazer.FeedData} FeedData instance - */ - FeedData.create = function create(properties) { - return new FeedData(properties); - }; - - /** - * Encodes the specified FeedData message. Does not implicitly {@link lazer.FeedData.verify|verify} messages. - * @function encode - * @memberof lazer.FeedData - * @static - * @param {lazer.IFeedData} message FeedData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeedData.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.sourceTimestamp != null && Object.hasOwnProperty.call(message, "sourceTimestamp")) - $root.google.protobuf.Timestamp.encode(message.sourceTimestamp, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.publisherTimestamp != null && Object.hasOwnProperty.call(message, "publisherTimestamp")) - $root.google.protobuf.Timestamp.encode(message.publisherTimestamp, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.price != null && Object.hasOwnProperty.call(message, "price")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.price); - if (message.bestBidPrice != null && Object.hasOwnProperty.call(message, "bestBidPrice")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.bestBidPrice); - if (message.bestAskPrice != null && Object.hasOwnProperty.call(message, "bestAskPrice")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.bestAskPrice); - if (message.fundingRate != null && Object.hasOwnProperty.call(message, "fundingRate")) - writer.uint32(/* id 6, wireType 0 =*/48).int64(message.fundingRate); - return writer; - }; - - /** - * Encodes the specified FeedData message, length delimited. Does not implicitly {@link lazer.FeedData.verify|verify} messages. - * @function encodeDelimited - * @memberof lazer.FeedData - * @static - * @param {lazer.IFeedData} message FeedData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeedData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FeedData message from the specified reader or buffer. - * @function decode - * @memberof lazer.FeedData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {lazer.FeedData} FeedData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeedData.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.lazer.FeedData(); - while (reader.pos < end) { - let tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.sourceTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 2: { - message.publisherTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.price = reader.int64(); - break; - } - case 4: { - message.bestBidPrice = reader.int64(); - break; - } - case 5: { - message.bestAskPrice = reader.int64(); - break; - } - case 6: { - message.fundingRate = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FeedData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof lazer.FeedData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {lazer.FeedData} FeedData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeedData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FeedData message. - * @function verify - * @memberof lazer.FeedData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FeedData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - let properties = {}; - if (message.sourceTimestamp != null && message.hasOwnProperty("sourceTimestamp")) { - properties._sourceTimestamp = 1; - { - let error = $root.google.protobuf.Timestamp.verify(message.sourceTimestamp); - if (error) - return "sourceTimestamp." + error; - } - } - if (message.publisherTimestamp != null && message.hasOwnProperty("publisherTimestamp")) { - properties._publisherTimestamp = 1; - { - let error = $root.google.protobuf.Timestamp.verify(message.publisherTimestamp); - if (error) - return "publisherTimestamp." + error; - } - } - if (message.price != null && message.hasOwnProperty("price")) { - properties._price = 1; - if (!$util.isInteger(message.price) && !(message.price && $util.isInteger(message.price.low) && $util.isInteger(message.price.high))) - return "price: integer|Long expected"; - } - if (message.bestBidPrice != null && message.hasOwnProperty("bestBidPrice")) { - properties._bestBidPrice = 1; - if (!$util.isInteger(message.bestBidPrice) && !(message.bestBidPrice && $util.isInteger(message.bestBidPrice.low) && $util.isInteger(message.bestBidPrice.high))) - return "bestBidPrice: integer|Long expected"; - } - if (message.bestAskPrice != null && message.hasOwnProperty("bestAskPrice")) { - properties._bestAskPrice = 1; - if (!$util.isInteger(message.bestAskPrice) && !(message.bestAskPrice && $util.isInteger(message.bestAskPrice.low) && $util.isInteger(message.bestAskPrice.high))) - return "bestAskPrice: integer|Long expected"; - } - if (message.fundingRate != null && message.hasOwnProperty("fundingRate")) { - properties._fundingRate = 1; - if (!$util.isInteger(message.fundingRate) && !(message.fundingRate && $util.isInteger(message.fundingRate.low) && $util.isInteger(message.fundingRate.high))) - return "fundingRate: integer|Long expected"; - } - return null; - }; - - /** - * Creates a FeedData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof lazer.FeedData - * @static - * @param {Object.} object Plain object - * @returns {lazer.FeedData} FeedData - */ - FeedData.fromObject = function fromObject(object) { - if (object instanceof $root.lazer.FeedData) - return object; - let message = new $root.lazer.FeedData(); - if (object.sourceTimestamp != null) { - if (typeof object.sourceTimestamp !== "object") - throw TypeError(".lazer.FeedData.sourceTimestamp: object expected"); - message.sourceTimestamp = $root.google.protobuf.Timestamp.fromObject(object.sourceTimestamp); - } - if (object.publisherTimestamp != null) { - if (typeof object.publisherTimestamp !== "object") - throw TypeError(".lazer.FeedData.publisherTimestamp: object expected"); - message.publisherTimestamp = $root.google.protobuf.Timestamp.fromObject(object.publisherTimestamp); - } - if (object.price != null) - if ($util.Long) - (message.price = $util.Long.fromValue(object.price)).unsigned = false; - else if (typeof object.price === "string") - message.price = parseInt(object.price, 10); - else if (typeof object.price === "number") - message.price = object.price; - else if (typeof object.price === "object") - message.price = new $util.LongBits(object.price.low >>> 0, object.price.high >>> 0).toNumber(); - if (object.bestBidPrice != null) - if ($util.Long) - (message.bestBidPrice = $util.Long.fromValue(object.bestBidPrice)).unsigned = false; - else if (typeof object.bestBidPrice === "string") - message.bestBidPrice = parseInt(object.bestBidPrice, 10); - else if (typeof object.bestBidPrice === "number") - message.bestBidPrice = object.bestBidPrice; - else if (typeof object.bestBidPrice === "object") - message.bestBidPrice = new $util.LongBits(object.bestBidPrice.low >>> 0, object.bestBidPrice.high >>> 0).toNumber(); - if (object.bestAskPrice != null) - if ($util.Long) - (message.bestAskPrice = $util.Long.fromValue(object.bestAskPrice)).unsigned = false; - else if (typeof object.bestAskPrice === "string") - message.bestAskPrice = parseInt(object.bestAskPrice, 10); - else if (typeof object.bestAskPrice === "number") - message.bestAskPrice = object.bestAskPrice; - else if (typeof object.bestAskPrice === "object") - message.bestAskPrice = new $util.LongBits(object.bestAskPrice.low >>> 0, object.bestAskPrice.high >>> 0).toNumber(); - if (object.fundingRate != null) - if ($util.Long) - (message.fundingRate = $util.Long.fromValue(object.fundingRate)).unsigned = false; - else if (typeof object.fundingRate === "string") - message.fundingRate = parseInt(object.fundingRate, 10); - else if (typeof object.fundingRate === "number") - message.fundingRate = object.fundingRate; - else if (typeof object.fundingRate === "object") - message.fundingRate = new $util.LongBits(object.fundingRate.low >>> 0, object.fundingRate.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a FeedData message. Also converts values to other types if specified. - * @function toObject - * @memberof lazer.FeedData - * @static - * @param {lazer.FeedData} message FeedData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FeedData.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (message.sourceTimestamp != null && message.hasOwnProperty("sourceTimestamp")) { - object.sourceTimestamp = $root.google.protobuf.Timestamp.toObject(message.sourceTimestamp, options); - if (options.oneofs) - object._sourceTimestamp = "sourceTimestamp"; - } - if (message.publisherTimestamp != null && message.hasOwnProperty("publisherTimestamp")) { - object.publisherTimestamp = $root.google.protobuf.Timestamp.toObject(message.publisherTimestamp, options); - if (options.oneofs) - object._publisherTimestamp = "publisherTimestamp"; - } - if (message.price != null && message.hasOwnProperty("price")) { - if (typeof message.price === "number") - object.price = options.longs === String ? String(message.price) : message.price; - else - object.price = options.longs === String ? $util.Long.prototype.toString.call(message.price) : options.longs === Number ? new $util.LongBits(message.price.low >>> 0, message.price.high >>> 0).toNumber() : message.price; - if (options.oneofs) - object._price = "price"; - } - if (message.bestBidPrice != null && message.hasOwnProperty("bestBidPrice")) { - if (typeof message.bestBidPrice === "number") - object.bestBidPrice = options.longs === String ? String(message.bestBidPrice) : message.bestBidPrice; - else - object.bestBidPrice = options.longs === String ? $util.Long.prototype.toString.call(message.bestBidPrice) : options.longs === Number ? new $util.LongBits(message.bestBidPrice.low >>> 0, message.bestBidPrice.high >>> 0).toNumber() : message.bestBidPrice; - if (options.oneofs) - object._bestBidPrice = "bestBidPrice"; - } - if (message.bestAskPrice != null && message.hasOwnProperty("bestAskPrice")) { - if (typeof message.bestAskPrice === "number") - object.bestAskPrice = options.longs === String ? String(message.bestAskPrice) : message.bestAskPrice; - else - object.bestAskPrice = options.longs === String ? $util.Long.prototype.toString.call(message.bestAskPrice) : options.longs === Number ? new $util.LongBits(message.bestAskPrice.low >>> 0, message.bestAskPrice.high >>> 0).toNumber() : message.bestAskPrice; - if (options.oneofs) - object._bestAskPrice = "bestAskPrice"; - } - if (message.fundingRate != null && message.hasOwnProperty("fundingRate")) { - if (typeof message.fundingRate === "number") - object.fundingRate = options.longs === String ? String(message.fundingRate) : message.fundingRate; - else - object.fundingRate = options.longs === String ? $util.Long.prototype.toString.call(message.fundingRate) : options.longs === Number ? new $util.LongBits(message.fundingRate.low >>> 0, message.fundingRate.high >>> 0).toNumber() : message.fundingRate; - if (options.oneofs) - object._fundingRate = "fundingRate"; - } - return object; - }; - - /** - * Converts this FeedData to JSON. - * @function toJSON - * @memberof lazer.FeedData - * @instance - * @returns {Object.} JSON object - */ - FeedData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FeedData - * @function getTypeUrl - * @memberof lazer.FeedData - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FeedData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/lazer.FeedData"; - }; + /** + * Decodes a FeedData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof lazer.FeedData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {lazer.FeedData} FeedData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeedData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - return FeedData; - })(); + /** + * Verifies a FeedData message. + * @function verify + * @memberof lazer.FeedData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeedData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if ( + message.sourceTimestamp != null && + message.hasOwnProperty("sourceTimestamp") + ) { + properties._sourceTimestamp = 1; + { + let error = $root.google.protobuf.Timestamp.verify( + message.sourceTimestamp, + ); + if (error) return "sourceTimestamp." + error; + } + } + if ( + message.publisherTimestamp != null && + message.hasOwnProperty("publisherTimestamp") + ) { + properties._publisherTimestamp = 1; + { + let error = $root.google.protobuf.Timestamp.verify( + message.publisherTimestamp, + ); + if (error) return "publisherTimestamp." + error; + } + } + if (message.price != null && message.hasOwnProperty("price")) { + properties._price = 1; + if ( + !$util.isInteger(message.price) && + !( + message.price && + $util.isInteger(message.price.low) && + $util.isInteger(message.price.high) + ) + ) + return "price: integer|Long expected"; + } + if ( + message.bestBidPrice != null && + message.hasOwnProperty("bestBidPrice") + ) { + properties._bestBidPrice = 1; + if ( + !$util.isInteger(message.bestBidPrice) && + !( + message.bestBidPrice && + $util.isInteger(message.bestBidPrice.low) && + $util.isInteger(message.bestBidPrice.high) + ) + ) + return "bestBidPrice: integer|Long expected"; + } + if ( + message.bestAskPrice != null && + message.hasOwnProperty("bestAskPrice") + ) { + properties._bestAskPrice = 1; + if ( + !$util.isInteger(message.bestAskPrice) && + !( + message.bestAskPrice && + $util.isInteger(message.bestAskPrice.low) && + $util.isInteger(message.bestAskPrice.high) + ) + ) + return "bestAskPrice: integer|Long expected"; + } + if ( + message.fundingRate != null && + message.hasOwnProperty("fundingRate") + ) { + properties._fundingRate = 1; + if ( + !$util.isInteger(message.fundingRate) && + !( + message.fundingRate && + $util.isInteger(message.fundingRate.low) && + $util.isInteger(message.fundingRate.high) + ) + ) + return "fundingRate: integer|Long expected"; + } + return null; + }; - return lazer; -})(); + /** + * Creates a FeedData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof lazer.FeedData + * @static + * @param {Object.} object Plain object + * @returns {lazer.FeedData} FeedData + */ + FeedData.fromObject = function fromObject(object) { + if (object instanceof $root.lazer.FeedData) return object; + let message = new $root.lazer.FeedData(); + if (object.sourceTimestamp != null) { + if (typeof object.sourceTimestamp !== "object") + throw TypeError(".lazer.FeedData.sourceTimestamp: object expected"); + message.sourceTimestamp = $root.google.protobuf.Timestamp.fromObject( + object.sourceTimestamp, + ); + } + if (object.publisherTimestamp != null) { + if (typeof object.publisherTimestamp !== "object") + throw TypeError( + ".lazer.FeedData.publisherTimestamp: object expected", + ); + message.publisherTimestamp = $root.google.protobuf.Timestamp.fromObject( + object.publisherTimestamp, + ); + } + if (object.price != null) + if ($util.Long) + (message.price = $util.Long.fromValue(object.price)).unsigned = false; + else if (typeof object.price === "string") + message.price = parseInt(object.price, 10); + else if (typeof object.price === "number") message.price = object.price; + else if (typeof object.price === "object") + message.price = new $util.LongBits( + object.price.low >>> 0, + object.price.high >>> 0, + ).toNumber(); + if (object.bestBidPrice != null) + if ($util.Long) + (message.bestBidPrice = $util.Long.fromValue( + object.bestBidPrice, + )).unsigned = false; + else if (typeof object.bestBidPrice === "string") + message.bestBidPrice = parseInt(object.bestBidPrice, 10); + else if (typeof object.bestBidPrice === "number") + message.bestBidPrice = object.bestBidPrice; + else if (typeof object.bestBidPrice === "object") + message.bestBidPrice = new $util.LongBits( + object.bestBidPrice.low >>> 0, + object.bestBidPrice.high >>> 0, + ).toNumber(); + if (object.bestAskPrice != null) + if ($util.Long) + (message.bestAskPrice = $util.Long.fromValue( + object.bestAskPrice, + )).unsigned = false; + else if (typeof object.bestAskPrice === "string") + message.bestAskPrice = parseInt(object.bestAskPrice, 10); + else if (typeof object.bestAskPrice === "number") + message.bestAskPrice = object.bestAskPrice; + else if (typeof object.bestAskPrice === "object") + message.bestAskPrice = new $util.LongBits( + object.bestAskPrice.low >>> 0, + object.bestAskPrice.high >>> 0, + ).toNumber(); + if (object.fundingRate != null) + if ($util.Long) + (message.fundingRate = $util.Long.fromValue( + object.fundingRate, + )).unsigned = false; + else if (typeof object.fundingRate === "string") + message.fundingRate = parseInt(object.fundingRate, 10); + else if (typeof object.fundingRate === "number") + message.fundingRate = object.fundingRate; + else if (typeof object.fundingRate === "object") + message.fundingRate = new $util.LongBits( + object.fundingRate.low >>> 0, + object.fundingRate.high >>> 0, + ).toNumber(); + return message; + }; + + /** + * Creates a plain object from a FeedData message. Also converts values to other types if specified. + * @function toObject + * @memberof lazer.FeedData + * @static + * @param {lazer.FeedData} message FeedData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeedData.toObject = function toObject(message, options) { + if (!options) options = {}; + let object = {}; + if ( + message.sourceTimestamp != null && + message.hasOwnProperty("sourceTimestamp") + ) { + object.sourceTimestamp = $root.google.protobuf.Timestamp.toObject( + message.sourceTimestamp, + options, + ); + if (options.oneofs) object._sourceTimestamp = "sourceTimestamp"; + } + if ( + message.publisherTimestamp != null && + message.hasOwnProperty("publisherTimestamp") + ) { + object.publisherTimestamp = $root.google.protobuf.Timestamp.toObject( + message.publisherTimestamp, + options, + ); + if (options.oneofs) object._publisherTimestamp = "publisherTimestamp"; + } + if (message.price != null && message.hasOwnProperty("price")) { + if (typeof message.price === "number") + object.price = + options.longs === String ? String(message.price) : message.price; + else + object.price = + options.longs === String + ? $util.Long.prototype.toString.call(message.price) + : options.longs === Number + ? new $util.LongBits( + message.price.low >>> 0, + message.price.high >>> 0, + ).toNumber() + : message.price; + if (options.oneofs) object._price = "price"; + } + if ( + message.bestBidPrice != null && + message.hasOwnProperty("bestBidPrice") + ) { + if (typeof message.bestBidPrice === "number") + object.bestBidPrice = + options.longs === String + ? String(message.bestBidPrice) + : message.bestBidPrice; + else + object.bestBidPrice = + options.longs === String + ? $util.Long.prototype.toString.call(message.bestBidPrice) + : options.longs === Number + ? new $util.LongBits( + message.bestBidPrice.low >>> 0, + message.bestBidPrice.high >>> 0, + ).toNumber() + : message.bestBidPrice; + if (options.oneofs) object._bestBidPrice = "bestBidPrice"; + } + if ( + message.bestAskPrice != null && + message.hasOwnProperty("bestAskPrice") + ) { + if (typeof message.bestAskPrice === "number") + object.bestAskPrice = + options.longs === String + ? String(message.bestAskPrice) + : message.bestAskPrice; + else + object.bestAskPrice = + options.longs === String + ? $util.Long.prototype.toString.call(message.bestAskPrice) + : options.longs === Number + ? new $util.LongBits( + message.bestAskPrice.low >>> 0, + message.bestAskPrice.high >>> 0, + ).toNumber() + : message.bestAskPrice; + if (options.oneofs) object._bestAskPrice = "bestAskPrice"; + } + if ( + message.fundingRate != null && + message.hasOwnProperty("fundingRate") + ) { + if (typeof message.fundingRate === "number") + object.fundingRate = + options.longs === String + ? String(message.fundingRate) + : message.fundingRate; + else + object.fundingRate = + options.longs === String + ? $util.Long.prototype.toString.call(message.fundingRate) + : options.longs === Number + ? new $util.LongBits( + message.fundingRate.low >>> 0, + message.fundingRate.high >>> 0, + ).toNumber() + : message.fundingRate; + if (options.oneofs) object._fundingRate = "fundingRate"; + } + return object; + }; -export const google = $root.google = (() => { + /** + * Converts this FeedData to JSON. + * @function toJSON + * @memberof lazer.FeedData + * @instance + * @returns {Object.} JSON object + */ + FeedData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Namespace google. - * @exports google + * Gets the default type url for FeedData + * @function getTypeUrl + * @memberof lazer.FeedData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeedData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/lazer.FeedData"; + }; + + return FeedData; + })(); + + return lazer; +})()); + +export const google = ($root.google = (() => { + /** + * Namespace google. + * @exports google + * @namespace + */ + const google = {}; + + google.protobuf = (function () { + /** + * Namespace protobuf. + * @memberof google * @namespace */ - const google = {}; - - google.protobuf = (function() { - - /** - * Namespace protobuf. - * @memberof google - * @namespace - */ - const protobuf = {}; - - protobuf.Duration = (function() { - - /** - * Properties of a Duration. - * @memberof google.protobuf - * @interface IDuration - * @property {number|Long|null} [seconds] Duration seconds - * @property {number|null} [nanos] Duration nanos - */ - - /** - * Constructs a new Duration. - * @memberof google.protobuf - * @classdesc Represents a Duration. - * @implements IDuration - * @constructor - * @param {google.protobuf.IDuration=} [properties] Properties to set - */ - function Duration(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]]; + const protobuf = {}; + + protobuf.Duration = (function () { + /** + * Properties of a Duration. + * @memberof google.protobuf + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos + */ + + /** + * Constructs a new Duration. + * @memberof google.protobuf + * @classdesc Represents a Duration. + * @implements IDuration + * @constructor + * @param {google.protobuf.IDuration=} [properties] Properties to set + */ + function Duration(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]]; + } + + /** + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.seconds = $util.Long + ? $util.Long.fromBits(0, 0, false) + : 0; + + /** + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; + + /** + * Creates a new Duration instance using the specified properties. + * @function create + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance + */ + Duration.create = function create(properties) { + return new Duration(properties); + }; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if ( + message.seconds != null && + Object.hasOwnProperty.call(message, "seconds") + ) + writer.uint32(/* id 1, wireType 0 =*/ 8).int64(message.seconds); + if ( + message.nanos != null && + Object.hasOwnProperty.call(message, "nanos") + ) + writer.uint32(/* id 2, wireType 0 =*/ 16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.google.protobuf.Duration(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Duration message. + * @function verify + * @memberof google.protobuf.Duration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Duration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if ( + !$util.isInteger(message.seconds) && + !( + message.seconds && + $util.isInteger(message.seconds.low) && + $util.isInteger(message.seconds.high) + ) + ) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Duration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Duration} Duration + */ + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) return object; + let message = new $root.google.protobuf.Duration(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = + false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits( + object.seconds.low >>> 0, + object.seconds.high >>> 0, + ).toNumber(); + if (object.nanos != null) message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.Duration} message Duration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Duration.toObject = function toObject(message, options) { + if (!options) options = {}; + let object = {}; + if (options.defaults) { + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.seconds = + options.longs === String + ? long.toString() + : options.longs === Number + ? long.toNumber() + : long; + } else object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = + options.longs === String + ? String(message.seconds) + : message.seconds; + else + object.seconds = + options.longs === String + ? $util.Long.prototype.toString.call(message.seconds) + : options.longs === Number + ? new $util.LongBits( + message.seconds.low >>> 0, + message.seconds.high >>> 0, + ).toNumber() + : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Duration to JSON. + * @function toJSON + * @memberof google.protobuf.Duration + * @instance + * @returns {Object.} JSON object + */ + Duration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Duration + * @function getTypeUrl + * @memberof google.protobuf.Duration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Duration"; + }; + + return Duration; + })(); - /** - * Duration seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Duration nanos. - * @member {number} nanos - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.nanos = 0; - - /** - * Creates a new Duration instance using the specified properties. - * @function create - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration=} [properties] Properties to set - * @returns {google.protobuf.Duration} Duration instance - */ - Duration.create = function create(properties) { - return new Duration(properties); - }; - - /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Duration.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); - return writer; - }; - - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Duration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Duration message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Duration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Duration} Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Duration.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); - while (reader.pos < end) { - let tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.seconds = reader.int64(); - break; - } - case 2: { - message.nanos = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Duration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Duration} Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Duration.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Duration message. - * @function verify - * @memberof google.protobuf.Duration - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Duration.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; - return null; - }; - - /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Duration - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Duration} Duration - */ - Duration.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Duration) - return object; - let message = new $root.google.protobuf.Duration(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; - return message; - }; - - /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.Duration} message Duration - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Duration.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - if ($util.Long) { - let long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; - } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; - return object; - }; - - /** - * Converts this Duration to JSON. - * @function toJSON - * @memberof google.protobuf.Duration - * @instance - * @returns {Object.} JSON object - */ - Duration.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Duration - * @function getTypeUrl - * @memberof google.protobuf.Duration - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Duration"; - }; - - return Duration; - })(); - - protobuf.Timestamp = (function() { - - /** - * Properties of a Timestamp. - * @memberof google.protobuf - * @interface ITimestamp - * @property {number|Long|null} [seconds] Timestamp seconds - * @property {number|null} [nanos] Timestamp nanos - */ - - /** - * Constructs a new Timestamp. - * @memberof google.protobuf - * @classdesc Represents a Timestamp. - * @implements ITimestamp - * @constructor - * @param {google.protobuf.ITimestamp=} [properties] Properties to set - */ - function Timestamp(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]]; + protobuf.Timestamp = (function () { + /** + * Properties of a Timestamp. + * @memberof google.protobuf + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos + */ + + /** + * Constructs a new Timestamp. + * @memberof google.protobuf + * @classdesc Represents a Timestamp. + * @implements ITimestamp + * @constructor + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + */ + function Timestamp(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]]; + } + + /** + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.seconds = $util.Long + ? $util.Long.fromBits(0, 0, false) + : 0; + + /** + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.nanos = 0; + + /** + * Creates a new Timestamp instance using the specified properties. + * @function create + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance + */ + Timestamp.create = function create(properties) { + return new Timestamp(properties); + }; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encode = function encode(message, writer) { + if (!writer) writer = $Writer.create(); + if ( + message.seconds != null && + Object.hasOwnProperty.call(message, "seconds") + ) + writer.uint32(/* id 1, wireType 0 =*/ 8).int64(message.seconds); + if ( + message.nanos != null && + Object.hasOwnProperty.call(message, "nanos") + ) + writer.uint32(/* id 2, wireType 0 =*/ 16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, + message = new $root.google.protobuf.Timestamp(); + while (reader.pos < end) { + let tag = reader.uint32(); + if (tag === error) break; + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Timestamp message. + * @function verify + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Timestamp.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if ( + !$util.isInteger(message.seconds) && + !( + message.seconds && + $util.isInteger(message.seconds.low) && + $util.isInteger(message.seconds.high) + ) + ) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Timestamp} Timestamp + */ + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) return object; + let message = new $root.google.protobuf.Timestamp(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = + false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits( + object.seconds.low >>> 0, + object.seconds.high >>> 0, + ).toNumber(); + if (object.nanos != null) message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.Timestamp} message Timestamp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Timestamp.toObject = function toObject(message, options) { + if (!options) options = {}; + let object = {}; + if (options.defaults) { + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.seconds = + options.longs === String + ? long.toString() + : options.longs === Number + ? long.toNumber() + : long; + } else object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = + options.longs === String + ? String(message.seconds) + : message.seconds; + else + object.seconds = + options.longs === String + ? $util.Long.prototype.toString.call(message.seconds) + : options.longs === Number + ? new $util.LongBits( + message.seconds.low >>> 0, + message.seconds.high >>> 0, + ).toNumber() + : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Timestamp to JSON. + * @function toJSON + * @memberof google.protobuf.Timestamp + * @instance + * @returns {Object.} JSON object + */ + Timestamp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Timestamp + * @function getTypeUrl + * @memberof google.protobuf.Timestamp + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Timestamp"; + }; - /** - * Timestamp seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Timestamp - * @instance - */ - Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Timestamp nanos. - * @member {number} nanos - * @memberof google.protobuf.Timestamp - * @instance - */ - Timestamp.prototype.nanos = 0; - - /** - * Creates a new Timestamp instance using the specified properties. - * @function create - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp=} [properties] Properties to set - * @returns {google.protobuf.Timestamp} Timestamp instance - */ - Timestamp.create = function create(properties) { - return new Timestamp(properties); - }; - - /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Timestamp.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); - return writer; - }; - - /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Timestamp.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Timestamp message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Timestamp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Timestamp} Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Timestamp.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); - while (reader.pos < end) { - let tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.seconds = reader.int64(); - break; - } - case 2: { - message.nanos = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Timestamp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Timestamp} Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Timestamp.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Timestamp message. - * @function verify - * @memberof google.protobuf.Timestamp - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Timestamp.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; - return null; - }; - - /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Timestamp - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Timestamp} Timestamp - */ - Timestamp.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Timestamp) - return object; - let message = new $root.google.protobuf.Timestamp(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; - return message; - }; - - /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.Timestamp} message Timestamp - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Timestamp.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - if ($util.Long) { - let long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; - } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; - return object; - }; - - /** - * Converts this Timestamp to JSON. - * @function toJSON - * @memberof google.protobuf.Timestamp - * @instance - * @returns {Object.} JSON object - */ - Timestamp.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Timestamp - * @function getTypeUrl - * @memberof google.protobuf.Timestamp - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Timestamp"; - }; - - return Timestamp; - })(); - - return protobuf; + return Timestamp; })(); - return google; -})(); + return protobuf; + })(); + + return google; +})()); export { $root as default }; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d324d2a4ab..9d5d51bc03 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1990,6 +1990,9 @@ importers: lazer/state_sdk/js: devDependencies: + prettier: + specifier: 'catalog:' + version: 3.5.3 protobufjs-cli: specifier: ^1.1.3 version: 1.1.3(protobufjs@7.5.2) From 056e8113d9fb988f1e8f4b431b292174e2183219 Mon Sep 17 00:00:00 2001 From: Daniel Chew Date: Thu, 29 May 2025 19:56:32 +0900 Subject: [PATCH 19/27] fix: format --- turbo.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/turbo.json b/turbo.json index f0177f4c56..871bcf99d3 100644 --- a/turbo.json +++ b/turbo.json @@ -134,9 +134,7 @@ }, "build:pbts": { "dependsOn": ["//#install:modules", "build:pbjs-esm", "build:pbjs-cjs"], - "inputs": [ - "src/generated/governance_instruction.js" - ], + "inputs": ["src/generated/governance_instruction.js"], "outputs": ["src/generated/governance_instruction.d.ts"] }, "fix": { From 146f4c07c63f74960c00a2361750d805e57d5c59 Mon Sep 17 00:00:00 2001 From: Daniel Chew Date: Thu, 29 May 2025 20:17:51 +0900 Subject: [PATCH 20/27] fix: update .prettierignore to exclude lazer/state_sdk/js --- .prettierignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.prettierignore b/.prettierignore index 22103f4da3..9e4a59ffb4 100644 --- a/.prettierignore +++ b/.prettierignore @@ -38,3 +38,4 @@ target_chains/ton/sdk/js contract_manager lazer/contracts/solana lazer/sdk/js +lazer/state_sdk/js From e454ab82738a27d4d1f9be6d90f9c698ad61e2b7 Mon Sep 17 00:00:00 2001 From: Daniel Chew Date: Thu, 29 May 2025 20:19:40 +0900 Subject: [PATCH 21/27] fix: update .prettierignore to exclude lazer/state_sdk/js --- .../src/generated/governance_instruction.d.ts | 8341 ++++++++--------- 1 file changed, 3872 insertions(+), 4469 deletions(-) diff --git a/lazer/state_sdk/js/src/generated/governance_instruction.d.ts b/lazer/state_sdk/js/src/generated/governance_instruction.d.ts index 144f35e0d0..66c941628b 100644 --- a/lazer/state_sdk/js/src/generated/governance_instruction.d.ts +++ b/lazer/state_sdk/js/src/generated/governance_instruction.d.ts @@ -2,4521 +2,3924 @@ import * as $protobuf from "protobufjs"; import Long = require("long"); /** Namespace pyth_lazer_transaction. */ export namespace pyth_lazer_transaction { - /** Properties of a GovernanceInstruction. */ - interface IGovernanceInstruction { - /** GovernanceInstruction directives */ - directives?: pyth_lazer_transaction.IGovernanceDirective[] | null; - - /** GovernanceInstruction minExecutionTimestamp */ - minExecutionTimestamp?: google.protobuf.ITimestamp | null; - - /** GovernanceInstruction maxExecutionTimestamp */ - maxExecutionTimestamp?: google.protobuf.ITimestamp | null; - - /** GovernanceInstruction governanceSequenceNo */ - governanceSequenceNo?: number | null; - } - - /** Represents a GovernanceInstruction. */ - class GovernanceInstruction implements IGovernanceInstruction { - /** - * Constructs a new GovernanceInstruction. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IGovernanceInstruction); - - /** GovernanceInstruction directives. */ - public directives: pyth_lazer_transaction.IGovernanceDirective[]; - - /** GovernanceInstruction minExecutionTimestamp. */ - public minExecutionTimestamp?: google.protobuf.ITimestamp | null; - - /** GovernanceInstruction maxExecutionTimestamp. */ - public maxExecutionTimestamp?: google.protobuf.ITimestamp | null; - - /** GovernanceInstruction governanceSequenceNo. */ - public governanceSequenceNo?: number | null; - - /** GovernanceInstruction _minExecutionTimestamp. */ - public _minExecutionTimestamp?: "minExecutionTimestamp"; - - /** GovernanceInstruction _maxExecutionTimestamp. */ - public _maxExecutionTimestamp?: "maxExecutionTimestamp"; - - /** GovernanceInstruction _governanceSequenceNo. */ - public _governanceSequenceNo?: "governanceSequenceNo"; - - /** - * Creates a new GovernanceInstruction instance using the specified properties. - * @param [properties] Properties to set - * @returns GovernanceInstruction instance - */ - public static create( - properties?: pyth_lazer_transaction.IGovernanceInstruction, - ): pyth_lazer_transaction.GovernanceInstruction; - - /** - * Encodes the specified GovernanceInstruction message. Does not implicitly {@link pyth_lazer_transaction.GovernanceInstruction.verify|verify} messages. - * @param message GovernanceInstruction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.IGovernanceInstruction, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified GovernanceInstruction message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceInstruction.verify|verify} messages. - * @param message GovernanceInstruction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.IGovernanceInstruction, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a GovernanceInstruction message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GovernanceInstruction - * @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, - ): pyth_lazer_transaction.GovernanceInstruction; - - /** - * Decodes a GovernanceInstruction message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GovernanceInstruction - * @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, - ): pyth_lazer_transaction.GovernanceInstruction; - - /** - * Verifies a GovernanceInstruction 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 GovernanceInstruction message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GovernanceInstruction - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.GovernanceInstruction; - - /** - * Creates a plain object from a GovernanceInstruction message. Also converts values to other types if specified. - * @param message GovernanceInstruction - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.GovernanceInstruction, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this GovernanceInstruction to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GovernanceInstruction - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ShardFilter. */ - interface IShardFilter { - /** ShardFilter allShards */ - allShards?: google.protobuf.IEmpty | null; - - /** ShardFilter shardNames */ - shardNames?: pyth_lazer_transaction.ShardFilter.IShardNames | null; - - /** ShardFilter shardGroups */ - shardGroups?: pyth_lazer_transaction.ShardFilter.IShardGroups | null; - } - - /** Represents a ShardFilter. */ - class ShardFilter implements IShardFilter { - /** - * Constructs a new ShardFilter. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IShardFilter); - - /** ShardFilter allShards. */ - public allShards?: google.protobuf.IEmpty | null; - - /** ShardFilter shardNames. */ - public shardNames?: pyth_lazer_transaction.ShardFilter.IShardNames | null; - - /** ShardFilter shardGroups. */ - public shardGroups?: pyth_lazer_transaction.ShardFilter.IShardGroups | null; - - /** ShardFilter filter. */ - public filter?: "allShards" | "shardNames" | "shardGroups"; - - /** - * Creates a new ShardFilter instance using the specified properties. - * @param [properties] Properties to set - * @returns ShardFilter instance - */ - public static create( - properties?: pyth_lazer_transaction.IShardFilter, - ): pyth_lazer_transaction.ShardFilter; - - /** - * Encodes the specified ShardFilter message. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.verify|verify} messages. - * @param message ShardFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.IShardFilter, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified ShardFilter message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.verify|verify} messages. - * @param message ShardFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.IShardFilter, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a ShardFilter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ShardFilter - * @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, - ): pyth_lazer_transaction.ShardFilter; - - /** - * Decodes a ShardFilter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ShardFilter - * @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, - ): pyth_lazer_transaction.ShardFilter; - - /** - * Verifies a ShardFilter 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 ShardFilter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ShardFilter - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.ShardFilter; - - /** - * Creates a plain object from a ShardFilter message. Also converts values to other types if specified. - * @param message ShardFilter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.ShardFilter, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this ShardFilter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ShardFilter - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ShardFilter { - /** Properties of a ShardNames. */ - interface IShardNames { - /** ShardNames shardNames */ - shardNames?: string[] | null; + + /** Properties of a GovernanceInstruction. */ + interface IGovernanceInstruction { + + /** GovernanceInstruction directives */ + directives?: (pyth_lazer_transaction.IGovernanceDirective[]|null); + + /** GovernanceInstruction minExecutionTimestamp */ + minExecutionTimestamp?: (google.protobuf.ITimestamp|null); + + /** GovernanceInstruction maxExecutionTimestamp */ + maxExecutionTimestamp?: (google.protobuf.ITimestamp|null); + + /** GovernanceInstruction governanceSequenceNo */ + governanceSequenceNo?: (number|null); + } + + /** Represents a GovernanceInstruction. */ + class GovernanceInstruction implements IGovernanceInstruction { + + /** + * Constructs a new GovernanceInstruction. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IGovernanceInstruction); + + /** GovernanceInstruction directives. */ + public directives: pyth_lazer_transaction.IGovernanceDirective[]; + + /** GovernanceInstruction minExecutionTimestamp. */ + public minExecutionTimestamp?: (google.protobuf.ITimestamp|null); + + /** GovernanceInstruction maxExecutionTimestamp. */ + public maxExecutionTimestamp?: (google.protobuf.ITimestamp|null); + + /** GovernanceInstruction governanceSequenceNo. */ + public governanceSequenceNo?: (number|null); + + /** GovernanceInstruction _minExecutionTimestamp. */ + public _minExecutionTimestamp?: "minExecutionTimestamp"; + + /** GovernanceInstruction _maxExecutionTimestamp. */ + public _maxExecutionTimestamp?: "maxExecutionTimestamp"; + + /** GovernanceInstruction _governanceSequenceNo. */ + public _governanceSequenceNo?: "governanceSequenceNo"; + + /** + * Creates a new GovernanceInstruction instance using the specified properties. + * @param [properties] Properties to set + * @returns GovernanceInstruction instance + */ + public static create(properties?: pyth_lazer_transaction.IGovernanceInstruction): pyth_lazer_transaction.GovernanceInstruction; + + /** + * Encodes the specified GovernanceInstruction message. Does not implicitly {@link pyth_lazer_transaction.GovernanceInstruction.verify|verify} messages. + * @param message GovernanceInstruction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IGovernanceInstruction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GovernanceInstruction message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceInstruction.verify|verify} messages. + * @param message GovernanceInstruction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IGovernanceInstruction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GovernanceInstruction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GovernanceInstruction + * @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): pyth_lazer_transaction.GovernanceInstruction; + + /** + * Decodes a GovernanceInstruction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GovernanceInstruction + * @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)): pyth_lazer_transaction.GovernanceInstruction; + + /** + * Verifies a GovernanceInstruction 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 GovernanceInstruction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GovernanceInstruction + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.GovernanceInstruction; + + /** + * Creates a plain object from a GovernanceInstruction message. Also converts values to other types if specified. + * @param message GovernanceInstruction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.GovernanceInstruction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GovernanceInstruction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GovernanceInstruction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ShardFilter. */ + interface IShardFilter { + + /** ShardFilter allShards */ + allShards?: (google.protobuf.IEmpty|null); + + /** ShardFilter shardNames */ + shardNames?: (pyth_lazer_transaction.ShardFilter.IShardNames|null); + + /** ShardFilter shardGroups */ + shardGroups?: (pyth_lazer_transaction.ShardFilter.IShardGroups|null); + } + + /** Represents a ShardFilter. */ + class ShardFilter implements IShardFilter { + + /** + * Constructs a new ShardFilter. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IShardFilter); + + /** ShardFilter allShards. */ + public allShards?: (google.protobuf.IEmpty|null); + + /** ShardFilter shardNames. */ + public shardNames?: (pyth_lazer_transaction.ShardFilter.IShardNames|null); + + /** ShardFilter shardGroups. */ + public shardGroups?: (pyth_lazer_transaction.ShardFilter.IShardGroups|null); + + /** ShardFilter filter. */ + public filter?: ("allShards"|"shardNames"|"shardGroups"); + + /** + * Creates a new ShardFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns ShardFilter instance + */ + public static create(properties?: pyth_lazer_transaction.IShardFilter): pyth_lazer_transaction.ShardFilter; + + /** + * Encodes the specified ShardFilter message. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.verify|verify} messages. + * @param message ShardFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IShardFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ShardFilter message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.verify|verify} messages. + * @param message ShardFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IShardFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ShardFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ShardFilter + * @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): pyth_lazer_transaction.ShardFilter; + + /** + * Decodes a ShardFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ShardFilter + * @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)): pyth_lazer_transaction.ShardFilter; + + /** + * Verifies a ShardFilter 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 ShardFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ShardFilter + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.ShardFilter; + + /** + * Creates a plain object from a ShardFilter message. Also converts values to other types if specified. + * @param message ShardFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.ShardFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ShardFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ShardFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ShardFilter { + + /** Properties of a ShardNames. */ + interface IShardNames { + + /** ShardNames shardNames */ + shardNames?: (string[]|null); + } + + /** Represents a ShardNames. */ + class ShardNames implements IShardNames { + + /** + * Constructs a new ShardNames. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ShardFilter.IShardNames); + + /** ShardNames shardNames. */ + public shardNames: string[]; + + /** + * Creates a new ShardNames instance using the specified properties. + * @param [properties] Properties to set + * @returns ShardNames instance + */ + public static create(properties?: pyth_lazer_transaction.ShardFilter.IShardNames): pyth_lazer_transaction.ShardFilter.ShardNames; + + /** + * Encodes the specified ShardNames message. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardNames.verify|verify} messages. + * @param message ShardNames message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.ShardFilter.IShardNames, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ShardNames message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardNames.verify|verify} messages. + * @param message ShardNames message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.ShardFilter.IShardNames, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ShardNames message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ShardNames + * @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): pyth_lazer_transaction.ShardFilter.ShardNames; + + /** + * Decodes a ShardNames message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ShardNames + * @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)): pyth_lazer_transaction.ShardFilter.ShardNames; + + /** + * Verifies a ShardNames 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 ShardNames message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ShardNames + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.ShardFilter.ShardNames; + + /** + * Creates a plain object from a ShardNames message. Also converts values to other types if specified. + * @param message ShardNames + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.ShardFilter.ShardNames, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ShardNames to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ShardNames + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ShardGroups. */ + interface IShardGroups { + + /** ShardGroups shardGroups */ + shardGroups?: (string[]|null); + } + + /** Represents a ShardGroups. */ + class ShardGroups implements IShardGroups { + + /** + * Constructs a new ShardGroups. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ShardFilter.IShardGroups); + + /** ShardGroups shardGroups. */ + public shardGroups: string[]; + + /** + * Creates a new ShardGroups instance using the specified properties. + * @param [properties] Properties to set + * @returns ShardGroups instance + */ + public static create(properties?: pyth_lazer_transaction.ShardFilter.IShardGroups): pyth_lazer_transaction.ShardFilter.ShardGroups; + + /** + * Encodes the specified ShardGroups message. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardGroups.verify|verify} messages. + * @param message ShardGroups message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.ShardFilter.IShardGroups, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ShardGroups message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardGroups.verify|verify} messages. + * @param message ShardGroups message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.ShardFilter.IShardGroups, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ShardGroups message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ShardGroups + * @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): pyth_lazer_transaction.ShardFilter.ShardGroups; + + /** + * Decodes a ShardGroups message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ShardGroups + * @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)): pyth_lazer_transaction.ShardFilter.ShardGroups; + + /** + * Verifies a ShardGroups 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 ShardGroups message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ShardGroups + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.ShardFilter.ShardGroups; + + /** + * Creates a plain object from a ShardGroups message. Also converts values to other types if specified. + * @param message ShardGroups + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.ShardFilter.ShardGroups, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ShardGroups to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ShardGroups + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a GovernanceDirective. */ + interface IGovernanceDirective { + + /** GovernanceDirective shardFilter */ + shardFilter?: (pyth_lazer_transaction.IShardFilter|null); + + /** GovernanceDirective createShard */ + createShard?: (pyth_lazer_transaction.ICreateShard|null); + + /** GovernanceDirective addGovernanceSource */ + addGovernanceSource?: (pyth_lazer_transaction.IAddGovernanceSource|null); + + /** GovernanceDirective updateGovernanceSource */ + updateGovernanceSource?: (pyth_lazer_transaction.IUpdateGovernanceSource|null); + + /** GovernanceDirective setShardName */ + setShardName?: (pyth_lazer_transaction.ISetShardName|null); + + /** GovernanceDirective setShardGroup */ + setShardGroup?: (pyth_lazer_transaction.ISetShardGroup|null); + + /** GovernanceDirective resetLastSequenceNo */ + resetLastSequenceNo?: (pyth_lazer_transaction.IResetLastSequenceNo|null); + + /** GovernanceDirective addPublisher */ + addPublisher?: (pyth_lazer_transaction.IAddPublisher|null); + + /** GovernanceDirective updatePublisher */ + updatePublisher?: (pyth_lazer_transaction.IUpdatePublisher|null); + + /** GovernanceDirective addFeed */ + addFeed?: (pyth_lazer_transaction.IAddFeed|null); + + /** GovernanceDirective updateFeed */ + updateFeed?: (pyth_lazer_transaction.IUpdateFeed|null); + } + + /** Represents a GovernanceDirective. */ + class GovernanceDirective implements IGovernanceDirective { + + /** + * Constructs a new GovernanceDirective. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IGovernanceDirective); + + /** GovernanceDirective shardFilter. */ + public shardFilter?: (pyth_lazer_transaction.IShardFilter|null); + + /** GovernanceDirective createShard. */ + public createShard?: (pyth_lazer_transaction.ICreateShard|null); + + /** GovernanceDirective addGovernanceSource. */ + public addGovernanceSource?: (pyth_lazer_transaction.IAddGovernanceSource|null); + + /** GovernanceDirective updateGovernanceSource. */ + public updateGovernanceSource?: (pyth_lazer_transaction.IUpdateGovernanceSource|null); + + /** GovernanceDirective setShardName. */ + public setShardName?: (pyth_lazer_transaction.ISetShardName|null); + + /** GovernanceDirective setShardGroup. */ + public setShardGroup?: (pyth_lazer_transaction.ISetShardGroup|null); + + /** GovernanceDirective resetLastSequenceNo. */ + public resetLastSequenceNo?: (pyth_lazer_transaction.IResetLastSequenceNo|null); + + /** GovernanceDirective addPublisher. */ + public addPublisher?: (pyth_lazer_transaction.IAddPublisher|null); + + /** GovernanceDirective updatePublisher. */ + public updatePublisher?: (pyth_lazer_transaction.IUpdatePublisher|null); + + /** GovernanceDirective addFeed. */ + public addFeed?: (pyth_lazer_transaction.IAddFeed|null); + + /** GovernanceDirective updateFeed. */ + public updateFeed?: (pyth_lazer_transaction.IUpdateFeed|null); + + /** GovernanceDirective _shardFilter. */ + public _shardFilter?: "shardFilter"; + + /** GovernanceDirective action. */ + public action?: ("createShard"|"addGovernanceSource"|"updateGovernanceSource"|"setShardName"|"setShardGroup"|"resetLastSequenceNo"|"addPublisher"|"updatePublisher"|"addFeed"|"updateFeed"); + + /** + * Creates a new GovernanceDirective instance using the specified properties. + * @param [properties] Properties to set + * @returns GovernanceDirective instance + */ + public static create(properties?: pyth_lazer_transaction.IGovernanceDirective): pyth_lazer_transaction.GovernanceDirective; + + /** + * Encodes the specified GovernanceDirective message. Does not implicitly {@link pyth_lazer_transaction.GovernanceDirective.verify|verify} messages. + * @param message GovernanceDirective message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IGovernanceDirective, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GovernanceDirective message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceDirective.verify|verify} messages. + * @param message GovernanceDirective message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IGovernanceDirective, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GovernanceDirective message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GovernanceDirective + * @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): pyth_lazer_transaction.GovernanceDirective; + + /** + * Decodes a GovernanceDirective message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GovernanceDirective + * @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)): pyth_lazer_transaction.GovernanceDirective; + + /** + * Verifies a GovernanceDirective 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 GovernanceDirective message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GovernanceDirective + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.GovernanceDirective; + + /** + * Creates a plain object from a GovernanceDirective message. Also converts values to other types if specified. + * @param message GovernanceDirective + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.GovernanceDirective, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GovernanceDirective to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GovernanceDirective + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Permissions. */ + interface IPermissions { + + /** Permissions allActions */ + allActions?: (boolean|null); + + /** Permissions shardActions */ + shardActions?: (pyth_lazer_transaction.Permissions.ShardAction[]|null); + + /** Permissions allUpdateGovernanceSourceActions */ + allUpdateGovernanceSourceActions?: (boolean|null); + + /** Permissions updateGovernanceSourceActions */ + updateGovernanceSourceActions?: (pyth_lazer_transaction.Permissions.UpdateGovernanceSourceAction[]|null); + + /** Permissions allUpdatePublisherAction */ + allUpdatePublisherAction?: (boolean|null); + + /** Permissions updatePublisherActions */ + updatePublisherActions?: (pyth_lazer_transaction.Permissions.UpdatePublisherAction[]|null); + + /** Permissions allUpdateFeedActions */ + allUpdateFeedActions?: (boolean|null); + + /** Permissions updateFeedActions */ + updateFeedActions?: (pyth_lazer_transaction.Permissions.UpdateFeedAction[]|null); + } + + /** Represents a Permissions. */ + class Permissions implements IPermissions { + + /** + * Constructs a new Permissions. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IPermissions); + + /** Permissions allActions. */ + public allActions?: (boolean|null); + + /** Permissions shardActions. */ + public shardActions: pyth_lazer_transaction.Permissions.ShardAction[]; + + /** Permissions allUpdateGovernanceSourceActions. */ + public allUpdateGovernanceSourceActions?: (boolean|null); + + /** Permissions updateGovernanceSourceActions. */ + public updateGovernanceSourceActions: pyth_lazer_transaction.Permissions.UpdateGovernanceSourceAction[]; + + /** Permissions allUpdatePublisherAction. */ + public allUpdatePublisherAction?: (boolean|null); + + /** Permissions updatePublisherActions. */ + public updatePublisherActions: pyth_lazer_transaction.Permissions.UpdatePublisherAction[]; + + /** Permissions allUpdateFeedActions. */ + public allUpdateFeedActions?: (boolean|null); + + /** Permissions updateFeedActions. */ + public updateFeedActions: pyth_lazer_transaction.Permissions.UpdateFeedAction[]; + + /** Permissions _allActions. */ + public _allActions?: "allActions"; + + /** Permissions _allUpdateGovernanceSourceActions. */ + public _allUpdateGovernanceSourceActions?: "allUpdateGovernanceSourceActions"; + + /** Permissions _allUpdatePublisherAction. */ + public _allUpdatePublisherAction?: "allUpdatePublisherAction"; + + /** Permissions _allUpdateFeedActions. */ + public _allUpdateFeedActions?: "allUpdateFeedActions"; + + /** + * Creates a new Permissions instance using the specified properties. + * @param [properties] Properties to set + * @returns Permissions instance + */ + public static create(properties?: pyth_lazer_transaction.IPermissions): pyth_lazer_transaction.Permissions; + + /** + * Encodes the specified Permissions message. Does not implicitly {@link pyth_lazer_transaction.Permissions.verify|verify} messages. + * @param message Permissions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IPermissions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Permissions message, length delimited. Does not implicitly {@link pyth_lazer_transaction.Permissions.verify|verify} messages. + * @param message Permissions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IPermissions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Permissions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Permissions + * @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): pyth_lazer_transaction.Permissions; + + /** + * Decodes a Permissions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Permissions + * @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)): pyth_lazer_transaction.Permissions; + + /** + * Verifies a Permissions 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 Permissions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Permissions + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.Permissions; + + /** + * Creates a plain object from a Permissions message. Also converts values to other types if specified. + * @param message Permissions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.Permissions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Permissions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Permissions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Permissions { + + /** ShardAction enum. */ + enum ShardAction { + SHARD_ACTION_UNSPECIFIED = 0, + CREATE_SHARD = 101, + ADD_GOVERNANCE_SOURCE = 102, + UPDATE_GOVERNANCE_SOURCE = 103, + SET_SHARD_NAME = 104, + SET_SHARD_GROUP = 105, + RESET_LAST_SEQUENCE_NO = 106, + ADD_PUBLISHER = 107, + ADD_FEED = 109 + } + + /** UpdateGovernanceSourceAction enum. */ + enum UpdateGovernanceSourceAction { + UPDATE_GOVERNANCE_SOURCE_ACTION_UNSPECIFIED = 0, + SET_GOVERNANCE_SOURCE_PERMISSIONS = 101, + REMOVE_GOVERNANCE_SOURCE = 199 + } + + /** UpdatePublisherAction enum. */ + enum UpdatePublisherAction { + UPDATE_PUBLISHER_ACTION_UNSPECIFIED = 0, + SET_PUBLISHER_NAME = 101, + ADD_PUBLISHER_PUBLIC_KEYS = 102, + REMOVE_PUBLISHER_PUBLIC_KEYS = 103, + SET_PUBLISHER_PUBLIC_KEYS = 104, + SET_PUBLISHER_ACTIVE = 105, + REMOVE_PUBLISHER = 199 + } + + /** UpdateFeedAction enum. */ + enum UpdateFeedAction { + UPDATE_FEED_ACTION_UNSPECIFIED = 0, + UPDATE_FEED_METADATA = 101, + ACTIVATE_FEED = 102, + DEACTIVATE_FEED = 103, + REMOVE_FEED = 199 + } } - /** Represents a ShardNames. */ - class ShardNames implements IShardNames { - /** - * Constructs a new ShardNames. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.ShardFilter.IShardNames); - - /** ShardNames shardNames. */ - public shardNames: string[]; - - /** - * Creates a new ShardNames instance using the specified properties. - * @param [properties] Properties to set - * @returns ShardNames instance - */ - public static create( - properties?: pyth_lazer_transaction.ShardFilter.IShardNames, - ): pyth_lazer_transaction.ShardFilter.ShardNames; - - /** - * Encodes the specified ShardNames message. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardNames.verify|verify} messages. - * @param message ShardNames message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.ShardFilter.IShardNames, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified ShardNames message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardNames.verify|verify} messages. - * @param message ShardNames message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.ShardFilter.IShardNames, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a ShardNames message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ShardNames - * @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, - ): pyth_lazer_transaction.ShardFilter.ShardNames; - - /** - * Decodes a ShardNames message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ShardNames - * @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, - ): pyth_lazer_transaction.ShardFilter.ShardNames; - - /** - * Verifies a ShardNames 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 ShardNames message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ShardNames - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.ShardFilter.ShardNames; - - /** - * Creates a plain object from a ShardNames message. Also converts values to other types if specified. - * @param message ShardNames - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.ShardFilter.ShardNames, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this ShardNames to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ShardNames - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** Properties of a GovernanceSource. */ + interface IGovernanceSource { + + /** GovernanceSource singleEd25519 */ + singleEd25519?: (pyth_lazer_transaction.GovernanceSource.ISingleEd25519|null); + + /** GovernanceSource wormholeEmitter */ + wormholeEmitter?: (pyth_lazer_transaction.GovernanceSource.IWormholeEmitter|null); } - /** Properties of a ShardGroups. */ - interface IShardGroups { - /** ShardGroups shardGroups */ - shardGroups?: string[] | null; + /** Represents a GovernanceSource. */ + class GovernanceSource implements IGovernanceSource { + + /** + * Constructs a new GovernanceSource. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IGovernanceSource); + + /** GovernanceSource singleEd25519. */ + public singleEd25519?: (pyth_lazer_transaction.GovernanceSource.ISingleEd25519|null); + + /** GovernanceSource wormholeEmitter. */ + public wormholeEmitter?: (pyth_lazer_transaction.GovernanceSource.IWormholeEmitter|null); + + /** GovernanceSource source. */ + public source?: ("singleEd25519"|"wormholeEmitter"); + + /** + * Creates a new GovernanceSource instance using the specified properties. + * @param [properties] Properties to set + * @returns GovernanceSource instance + */ + public static create(properties?: pyth_lazer_transaction.IGovernanceSource): pyth_lazer_transaction.GovernanceSource; + + /** + * Encodes the specified GovernanceSource message. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.verify|verify} messages. + * @param message GovernanceSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IGovernanceSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GovernanceSource message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.verify|verify} messages. + * @param message GovernanceSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IGovernanceSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GovernanceSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GovernanceSource + * @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): pyth_lazer_transaction.GovernanceSource; + + /** + * Decodes a GovernanceSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GovernanceSource + * @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)): pyth_lazer_transaction.GovernanceSource; + + /** + * Verifies a GovernanceSource 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 GovernanceSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GovernanceSource + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.GovernanceSource; + + /** + * Creates a plain object from a GovernanceSource message. Also converts values to other types if specified. + * @param message GovernanceSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.GovernanceSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GovernanceSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GovernanceSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Represents a ShardGroups. */ - class ShardGroups implements IShardGroups { - /** - * Constructs a new ShardGroups. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.ShardFilter.IShardGroups); - - /** ShardGroups shardGroups. */ - public shardGroups: string[]; - - /** - * Creates a new ShardGroups instance using the specified properties. - * @param [properties] Properties to set - * @returns ShardGroups instance - */ - public static create( - properties?: pyth_lazer_transaction.ShardFilter.IShardGroups, - ): pyth_lazer_transaction.ShardFilter.ShardGroups; - - /** - * Encodes the specified ShardGroups message. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardGroups.verify|verify} messages. - * @param message ShardGroups message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.ShardFilter.IShardGroups, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified ShardGroups message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardGroups.verify|verify} messages. - * @param message ShardGroups message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.ShardFilter.IShardGroups, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a ShardGroups message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ShardGroups - * @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, - ): pyth_lazer_transaction.ShardFilter.ShardGroups; - - /** - * Decodes a ShardGroups message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ShardGroups - * @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, - ): pyth_lazer_transaction.ShardFilter.ShardGroups; - - /** - * Verifies a ShardGroups 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 ShardGroups message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ShardGroups - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.ShardFilter.ShardGroups; - - /** - * Creates a plain object from a ShardGroups message. Also converts values to other types if specified. - * @param message ShardGroups - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.ShardFilter.ShardGroups, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this ShardGroups to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ShardGroups - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + namespace GovernanceSource { + + /** Properties of a SingleEd25519. */ + interface ISingleEd25519 { + + /** SingleEd25519 publicKey */ + publicKey?: (Uint8Array|null); + } + + /** Represents a SingleEd25519. */ + class SingleEd25519 implements ISingleEd25519 { + + /** + * Constructs a new SingleEd25519. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.GovernanceSource.ISingleEd25519); + + /** SingleEd25519 publicKey. */ + public publicKey?: (Uint8Array|null); + + /** SingleEd25519 _publicKey. */ + public _publicKey?: "publicKey"; + + /** + * Creates a new SingleEd25519 instance using the specified properties. + * @param [properties] Properties to set + * @returns SingleEd25519 instance + */ + public static create(properties?: pyth_lazer_transaction.GovernanceSource.ISingleEd25519): pyth_lazer_transaction.GovernanceSource.SingleEd25519; + + /** + * Encodes the specified SingleEd25519 message. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.SingleEd25519.verify|verify} messages. + * @param message SingleEd25519 message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.GovernanceSource.ISingleEd25519, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SingleEd25519 message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.SingleEd25519.verify|verify} messages. + * @param message SingleEd25519 message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.GovernanceSource.ISingleEd25519, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SingleEd25519 message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SingleEd25519 + * @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): pyth_lazer_transaction.GovernanceSource.SingleEd25519; + + /** + * Decodes a SingleEd25519 message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SingleEd25519 + * @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)): pyth_lazer_transaction.GovernanceSource.SingleEd25519; + + /** + * Verifies a SingleEd25519 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 SingleEd25519 message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SingleEd25519 + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.GovernanceSource.SingleEd25519; + + /** + * Creates a plain object from a SingleEd25519 message. Also converts values to other types if specified. + * @param message SingleEd25519 + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.GovernanceSource.SingleEd25519, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SingleEd25519 to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SingleEd25519 + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a WormholeEmitter. */ + interface IWormholeEmitter { + + /** WormholeEmitter address */ + address?: (Uint8Array|null); + + /** WormholeEmitter chainId */ + chainId?: (number|null); + } + + /** Represents a WormholeEmitter. */ + class WormholeEmitter implements IWormholeEmitter { + + /** + * Constructs a new WormholeEmitter. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.GovernanceSource.IWormholeEmitter); + + /** WormholeEmitter address. */ + public address?: (Uint8Array|null); + + /** WormholeEmitter chainId. */ + public chainId?: (number|null); + + /** WormholeEmitter _address. */ + public _address?: "address"; + + /** WormholeEmitter _chainId. */ + public _chainId?: "chainId"; + + /** + * Creates a new WormholeEmitter instance using the specified properties. + * @param [properties] Properties to set + * @returns WormholeEmitter instance + */ + public static create(properties?: pyth_lazer_transaction.GovernanceSource.IWormholeEmitter): pyth_lazer_transaction.GovernanceSource.WormholeEmitter; + + /** + * Encodes the specified WormholeEmitter message. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.WormholeEmitter.verify|verify} messages. + * @param message WormholeEmitter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.GovernanceSource.IWormholeEmitter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WormholeEmitter message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.WormholeEmitter.verify|verify} messages. + * @param message WormholeEmitter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.GovernanceSource.IWormholeEmitter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WormholeEmitter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WormholeEmitter + * @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): pyth_lazer_transaction.GovernanceSource.WormholeEmitter; + + /** + * Decodes a WormholeEmitter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WormholeEmitter + * @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)): pyth_lazer_transaction.GovernanceSource.WormholeEmitter; + + /** + * Verifies a WormholeEmitter 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 WormholeEmitter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WormholeEmitter + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.GovernanceSource.WormholeEmitter; + + /** + * Creates a plain object from a WormholeEmitter message. Also converts values to other types if specified. + * @param message WormholeEmitter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.GovernanceSource.WormholeEmitter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WormholeEmitter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WormholeEmitter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } - } - /** Properties of a GovernanceDirective. */ - interface IGovernanceDirective { - /** GovernanceDirective shardFilter */ - shardFilter?: pyth_lazer_transaction.IShardFilter | null; + /** Properties of a CreateShard. */ + interface ICreateShard { - /** GovernanceDirective createShard */ - createShard?: pyth_lazer_transaction.ICreateShard | null; + /** CreateShard shardId */ + shardId?: (number|null); - /** GovernanceDirective addGovernanceSource */ - addGovernanceSource?: pyth_lazer_transaction.IAddGovernanceSource | null; - - /** GovernanceDirective updateGovernanceSource */ - updateGovernanceSource?: pyth_lazer_transaction.IUpdateGovernanceSource | null; - - /** GovernanceDirective setShardName */ - setShardName?: pyth_lazer_transaction.ISetShardName | null; - - /** GovernanceDirective setShardGroup */ - setShardGroup?: pyth_lazer_transaction.ISetShardGroup | null; - - /** GovernanceDirective resetLastSequenceNo */ - resetLastSequenceNo?: pyth_lazer_transaction.IResetLastSequenceNo | null; - - /** GovernanceDirective addPublisher */ - addPublisher?: pyth_lazer_transaction.IAddPublisher | null; - - /** GovernanceDirective updatePublisher */ - updatePublisher?: pyth_lazer_transaction.IUpdatePublisher | null; - - /** GovernanceDirective addFeed */ - addFeed?: pyth_lazer_transaction.IAddFeed | null; - - /** GovernanceDirective updateFeed */ - updateFeed?: pyth_lazer_transaction.IUpdateFeed | null; - } - - /** Represents a GovernanceDirective. */ - class GovernanceDirective implements IGovernanceDirective { - /** - * Constructs a new GovernanceDirective. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IGovernanceDirective); - - /** GovernanceDirective shardFilter. */ - public shardFilter?: pyth_lazer_transaction.IShardFilter | null; - - /** GovernanceDirective createShard. */ - public createShard?: pyth_lazer_transaction.ICreateShard | null; - - /** GovernanceDirective addGovernanceSource. */ - public addGovernanceSource?: pyth_lazer_transaction.IAddGovernanceSource | null; - - /** GovernanceDirective updateGovernanceSource. */ - public updateGovernanceSource?: pyth_lazer_transaction.IUpdateGovernanceSource | null; - - /** GovernanceDirective setShardName. */ - public setShardName?: pyth_lazer_transaction.ISetShardName | null; - - /** GovernanceDirective setShardGroup. */ - public setShardGroup?: pyth_lazer_transaction.ISetShardGroup | null; - - /** GovernanceDirective resetLastSequenceNo. */ - public resetLastSequenceNo?: pyth_lazer_transaction.IResetLastSequenceNo | null; - - /** GovernanceDirective addPublisher. */ - public addPublisher?: pyth_lazer_transaction.IAddPublisher | null; - - /** GovernanceDirective updatePublisher. */ - public updatePublisher?: pyth_lazer_transaction.IUpdatePublisher | null; - - /** GovernanceDirective addFeed. */ - public addFeed?: pyth_lazer_transaction.IAddFeed | null; - - /** GovernanceDirective updateFeed. */ - public updateFeed?: pyth_lazer_transaction.IUpdateFeed | null; - - /** GovernanceDirective _shardFilter. */ - public _shardFilter?: "shardFilter"; - - /** GovernanceDirective action. */ - public action?: - | "createShard" - | "addGovernanceSource" - | "updateGovernanceSource" - | "setShardName" - | "setShardGroup" - | "resetLastSequenceNo" - | "addPublisher" - | "updatePublisher" - | "addFeed" - | "updateFeed"; - - /** - * Creates a new GovernanceDirective instance using the specified properties. - * @param [properties] Properties to set - * @returns GovernanceDirective instance - */ - public static create( - properties?: pyth_lazer_transaction.IGovernanceDirective, - ): pyth_lazer_transaction.GovernanceDirective; - - /** - * Encodes the specified GovernanceDirective message. Does not implicitly {@link pyth_lazer_transaction.GovernanceDirective.verify|verify} messages. - * @param message GovernanceDirective message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.IGovernanceDirective, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified GovernanceDirective message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceDirective.verify|verify} messages. - * @param message GovernanceDirective message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.IGovernanceDirective, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a GovernanceDirective message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GovernanceDirective - * @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, - ): pyth_lazer_transaction.GovernanceDirective; - - /** - * Decodes a GovernanceDirective message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GovernanceDirective - * @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, - ): pyth_lazer_transaction.GovernanceDirective; - - /** - * Verifies a GovernanceDirective 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 GovernanceDirective message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GovernanceDirective - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.GovernanceDirective; - - /** - * Creates a plain object from a GovernanceDirective message. Also converts values to other types if specified. - * @param message GovernanceDirective - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.GovernanceDirective, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this GovernanceDirective to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GovernanceDirective - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Permissions. */ - interface IPermissions { - /** Permissions allActions */ - allActions?: boolean | null; - - /** Permissions shardActions */ - shardActions?: pyth_lazer_transaction.Permissions.ShardAction[] | null; - - /** Permissions allUpdateGovernanceSourceActions */ - allUpdateGovernanceSourceActions?: boolean | null; - - /** Permissions updateGovernanceSourceActions */ - updateGovernanceSourceActions?: - | pyth_lazer_transaction.Permissions.UpdateGovernanceSourceAction[] - | null; - - /** Permissions allUpdatePublisherAction */ - allUpdatePublisherAction?: boolean | null; - - /** Permissions updatePublisherActions */ - updatePublisherActions?: - | pyth_lazer_transaction.Permissions.UpdatePublisherAction[] - | null; - - /** Permissions allUpdateFeedActions */ - allUpdateFeedActions?: boolean | null; - - /** Permissions updateFeedActions */ - updateFeedActions?: - | pyth_lazer_transaction.Permissions.UpdateFeedAction[] - | null; - } - - /** Represents a Permissions. */ - class Permissions implements IPermissions { - /** - * Constructs a new Permissions. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IPermissions); - - /** Permissions allActions. */ - public allActions?: boolean | null; - - /** Permissions shardActions. */ - public shardActions: pyth_lazer_transaction.Permissions.ShardAction[]; - - /** Permissions allUpdateGovernanceSourceActions. */ - public allUpdateGovernanceSourceActions?: boolean | null; - - /** Permissions updateGovernanceSourceActions. */ - public updateGovernanceSourceActions: pyth_lazer_transaction.Permissions.UpdateGovernanceSourceAction[]; - - /** Permissions allUpdatePublisherAction. */ - public allUpdatePublisherAction?: boolean | null; - - /** Permissions updatePublisherActions. */ - public updatePublisherActions: pyth_lazer_transaction.Permissions.UpdatePublisherAction[]; - - /** Permissions allUpdateFeedActions. */ - public allUpdateFeedActions?: boolean | null; - - /** Permissions updateFeedActions. */ - public updateFeedActions: pyth_lazer_transaction.Permissions.UpdateFeedAction[]; - - /** Permissions _allActions. */ - public _allActions?: "allActions"; - - /** Permissions _allUpdateGovernanceSourceActions. */ - public _allUpdateGovernanceSourceActions?: "allUpdateGovernanceSourceActions"; - - /** Permissions _allUpdatePublisherAction. */ - public _allUpdatePublisherAction?: "allUpdatePublisherAction"; - - /** Permissions _allUpdateFeedActions. */ - public _allUpdateFeedActions?: "allUpdateFeedActions"; - - /** - * Creates a new Permissions instance using the specified properties. - * @param [properties] Properties to set - * @returns Permissions instance - */ - public static create( - properties?: pyth_lazer_transaction.IPermissions, - ): pyth_lazer_transaction.Permissions; - - /** - * Encodes the specified Permissions message. Does not implicitly {@link pyth_lazer_transaction.Permissions.verify|verify} messages. - * @param message Permissions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.IPermissions, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified Permissions message, length delimited. Does not implicitly {@link pyth_lazer_transaction.Permissions.verify|verify} messages. - * @param message Permissions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.IPermissions, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a Permissions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Permissions - * @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, - ): pyth_lazer_transaction.Permissions; - - /** - * Decodes a Permissions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Permissions - * @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, - ): pyth_lazer_transaction.Permissions; - - /** - * Verifies a Permissions 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 Permissions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Permissions - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.Permissions; - - /** - * Creates a plain object from a Permissions message. Also converts values to other types if specified. - * @param message Permissions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.Permissions, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this Permissions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Permissions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Permissions { - /** ShardAction enum. */ - enum ShardAction { - SHARD_ACTION_UNSPECIFIED = 0, - CREATE_SHARD = 101, - ADD_GOVERNANCE_SOURCE = 102, - UPDATE_GOVERNANCE_SOURCE = 103, - SET_SHARD_NAME = 104, - SET_SHARD_GROUP = 105, - RESET_LAST_SEQUENCE_NO = 106, - ADD_PUBLISHER = 107, - ADD_FEED = 109, + /** CreateShard shardGroup */ + shardGroup?: (string|null); + + /** CreateShard minRate */ + minRate?: (google.protobuf.IDuration|null); } - /** UpdateGovernanceSourceAction enum. */ - enum UpdateGovernanceSourceAction { - UPDATE_GOVERNANCE_SOURCE_ACTION_UNSPECIFIED = 0, - SET_GOVERNANCE_SOURCE_PERMISSIONS = 101, - REMOVE_GOVERNANCE_SOURCE = 199, + /** Represents a CreateShard. */ + class CreateShard implements ICreateShard { + + /** + * Constructs a new CreateShard. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ICreateShard); + + /** CreateShard shardId. */ + public shardId?: (number|null); + + /** CreateShard shardGroup. */ + public shardGroup?: (string|null); + + /** CreateShard minRate. */ + public minRate?: (google.protobuf.IDuration|null); + + /** CreateShard _shardId. */ + public _shardId?: "shardId"; + + /** CreateShard _shardGroup. */ + public _shardGroup?: "shardGroup"; + + /** CreateShard _minRate. */ + public _minRate?: "minRate"; + + /** + * Creates a new CreateShard instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateShard instance + */ + public static create(properties?: pyth_lazer_transaction.ICreateShard): pyth_lazer_transaction.CreateShard; + + /** + * Encodes the specified CreateShard message. Does not implicitly {@link pyth_lazer_transaction.CreateShard.verify|verify} messages. + * @param message CreateShard message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.ICreateShard, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateShard message, length delimited. Does not implicitly {@link pyth_lazer_transaction.CreateShard.verify|verify} messages. + * @param message CreateShard message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.ICreateShard, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateShard message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateShard + * @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): pyth_lazer_transaction.CreateShard; + + /** + * Decodes a CreateShard message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateShard + * @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)): pyth_lazer_transaction.CreateShard; + + /** + * Verifies a CreateShard 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 CreateShard message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateShard + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.CreateShard; + + /** + * Creates a plain object from a CreateShard message. Also converts values to other types if specified. + * @param message CreateShard + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.CreateShard, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateShard to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateShard + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** UpdatePublisherAction enum. */ - enum UpdatePublisherAction { - UPDATE_PUBLISHER_ACTION_UNSPECIFIED = 0, - SET_PUBLISHER_NAME = 101, - ADD_PUBLISHER_PUBLIC_KEYS = 102, - REMOVE_PUBLISHER_PUBLIC_KEYS = 103, - SET_PUBLISHER_PUBLIC_KEYS = 104, - SET_PUBLISHER_ACTIVE = 105, - REMOVE_PUBLISHER = 199, + /** Properties of an AddGovernanceSource. */ + interface IAddGovernanceSource { + + /** AddGovernanceSource newSource */ + newSource?: (pyth_lazer_transaction.IGovernanceSource|null); + + /** AddGovernanceSource permissions */ + permissions?: (pyth_lazer_transaction.IPermissions|null); } - /** UpdateFeedAction enum. */ - enum UpdateFeedAction { - UPDATE_FEED_ACTION_UNSPECIFIED = 0, - UPDATE_FEED_METADATA = 101, - ACTIVATE_FEED = 102, - DEACTIVATE_FEED = 103, - REMOVE_FEED = 199, + /** Represents an AddGovernanceSource. */ + class AddGovernanceSource implements IAddGovernanceSource { + + /** + * Constructs a new AddGovernanceSource. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IAddGovernanceSource); + + /** AddGovernanceSource newSource. */ + public newSource?: (pyth_lazer_transaction.IGovernanceSource|null); + + /** AddGovernanceSource permissions. */ + public permissions?: (pyth_lazer_transaction.IPermissions|null); + + /** AddGovernanceSource _newSource. */ + public _newSource?: "newSource"; + + /** AddGovernanceSource _permissions. */ + public _permissions?: "permissions"; + + /** + * Creates a new AddGovernanceSource instance using the specified properties. + * @param [properties] Properties to set + * @returns AddGovernanceSource instance + */ + public static create(properties?: pyth_lazer_transaction.IAddGovernanceSource): pyth_lazer_transaction.AddGovernanceSource; + + /** + * Encodes the specified AddGovernanceSource message. Does not implicitly {@link pyth_lazer_transaction.AddGovernanceSource.verify|verify} messages. + * @param message AddGovernanceSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IAddGovernanceSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AddGovernanceSource message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddGovernanceSource.verify|verify} messages. + * @param message AddGovernanceSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IAddGovernanceSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AddGovernanceSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AddGovernanceSource + * @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): pyth_lazer_transaction.AddGovernanceSource; + + /** + * Decodes an AddGovernanceSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AddGovernanceSource + * @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)): pyth_lazer_transaction.AddGovernanceSource; + + /** + * Verifies an AddGovernanceSource 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 AddGovernanceSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AddGovernanceSource + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.AddGovernanceSource; + + /** + * Creates a plain object from an AddGovernanceSource message. Also converts values to other types if specified. + * @param message AddGovernanceSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.AddGovernanceSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AddGovernanceSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AddGovernanceSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - } - - /** Properties of a GovernanceSource. */ - interface IGovernanceSource { - /** GovernanceSource singleEd25519 */ - singleEd25519?: pyth_lazer_transaction.GovernanceSource.ISingleEd25519 | null; - - /** GovernanceSource wormholeEmitter */ - wormholeEmitter?: pyth_lazer_transaction.GovernanceSource.IWormholeEmitter | null; - } - - /** Represents a GovernanceSource. */ - class GovernanceSource implements IGovernanceSource { - /** - * Constructs a new GovernanceSource. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IGovernanceSource); - - /** GovernanceSource singleEd25519. */ - public singleEd25519?: pyth_lazer_transaction.GovernanceSource.ISingleEd25519 | null; - - /** GovernanceSource wormholeEmitter. */ - public wormholeEmitter?: pyth_lazer_transaction.GovernanceSource.IWormholeEmitter | null; - - /** GovernanceSource source. */ - public source?: "singleEd25519" | "wormholeEmitter"; - - /** - * Creates a new GovernanceSource instance using the specified properties. - * @param [properties] Properties to set - * @returns GovernanceSource instance - */ - public static create( - properties?: pyth_lazer_transaction.IGovernanceSource, - ): pyth_lazer_transaction.GovernanceSource; - - /** - * Encodes the specified GovernanceSource message. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.verify|verify} messages. - * @param message GovernanceSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.IGovernanceSource, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified GovernanceSource message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.verify|verify} messages. - * @param message GovernanceSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.IGovernanceSource, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a GovernanceSource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GovernanceSource - * @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, - ): pyth_lazer_transaction.GovernanceSource; - - /** - * Decodes a GovernanceSource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GovernanceSource - * @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, - ): pyth_lazer_transaction.GovernanceSource; - - /** - * Verifies a GovernanceSource 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 GovernanceSource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GovernanceSource - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.GovernanceSource; - - /** - * Creates a plain object from a GovernanceSource message. Also converts values to other types if specified. - * @param message GovernanceSource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.GovernanceSource, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this GovernanceSource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GovernanceSource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace GovernanceSource { - /** Properties of a SingleEd25519. */ - interface ISingleEd25519 { - /** SingleEd25519 publicKey */ - publicKey?: Uint8Array | null; + + /** Properties of an UpdateGovernanceSource. */ + interface IUpdateGovernanceSource { + + /** UpdateGovernanceSource source */ + source?: (pyth_lazer_transaction.IGovernanceSource|null); + + /** UpdateGovernanceSource setGovernanceSourcePermissions */ + setGovernanceSourcePermissions?: (pyth_lazer_transaction.ISetGovernanceSourcePermissions|null); + + /** UpdateGovernanceSource removeGovernanceSource */ + removeGovernanceSource?: (google.protobuf.IEmpty|null); } - /** Represents a SingleEd25519. */ - class SingleEd25519 implements ISingleEd25519 { - /** - * Constructs a new SingleEd25519. - * @param [properties] Properties to set - */ - constructor( - properties?: pyth_lazer_transaction.GovernanceSource.ISingleEd25519, - ); - - /** SingleEd25519 publicKey. */ - public publicKey?: Uint8Array | null; - - /** SingleEd25519 _publicKey. */ - public _publicKey?: "publicKey"; - - /** - * Creates a new SingleEd25519 instance using the specified properties. - * @param [properties] Properties to set - * @returns SingleEd25519 instance - */ - public static create( - properties?: pyth_lazer_transaction.GovernanceSource.ISingleEd25519, - ): pyth_lazer_transaction.GovernanceSource.SingleEd25519; - - /** - * Encodes the specified SingleEd25519 message. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.SingleEd25519.verify|verify} messages. - * @param message SingleEd25519 message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.GovernanceSource.ISingleEd25519, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified SingleEd25519 message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.SingleEd25519.verify|verify} messages. - * @param message SingleEd25519 message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.GovernanceSource.ISingleEd25519, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a SingleEd25519 message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SingleEd25519 - * @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, - ): pyth_lazer_transaction.GovernanceSource.SingleEd25519; - - /** - * Decodes a SingleEd25519 message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SingleEd25519 - * @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, - ): pyth_lazer_transaction.GovernanceSource.SingleEd25519; - - /** - * Verifies a SingleEd25519 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 SingleEd25519 message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SingleEd25519 - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.GovernanceSource.SingleEd25519; - - /** - * Creates a plain object from a SingleEd25519 message. Also converts values to other types if specified. - * @param message SingleEd25519 - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.GovernanceSource.SingleEd25519, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this SingleEd25519 to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SingleEd25519 - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** Represents an UpdateGovernanceSource. */ + class UpdateGovernanceSource implements IUpdateGovernanceSource { + + /** + * Constructs a new UpdateGovernanceSource. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IUpdateGovernanceSource); + + /** UpdateGovernanceSource source. */ + public source?: (pyth_lazer_transaction.IGovernanceSource|null); + + /** UpdateGovernanceSource setGovernanceSourcePermissions. */ + public setGovernanceSourcePermissions?: (pyth_lazer_transaction.ISetGovernanceSourcePermissions|null); + + /** UpdateGovernanceSource removeGovernanceSource. */ + public removeGovernanceSource?: (google.protobuf.IEmpty|null); + + /** UpdateGovernanceSource _source. */ + public _source?: "source"; + + /** UpdateGovernanceSource action. */ + public action?: ("setGovernanceSourcePermissions"|"removeGovernanceSource"); + + /** + * Creates a new UpdateGovernanceSource instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateGovernanceSource instance + */ + public static create(properties?: pyth_lazer_transaction.IUpdateGovernanceSource): pyth_lazer_transaction.UpdateGovernanceSource; + + /** + * Encodes the specified UpdateGovernanceSource message. Does not implicitly {@link pyth_lazer_transaction.UpdateGovernanceSource.verify|verify} messages. + * @param message UpdateGovernanceSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IUpdateGovernanceSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateGovernanceSource message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdateGovernanceSource.verify|verify} messages. + * @param message UpdateGovernanceSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IUpdateGovernanceSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateGovernanceSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateGovernanceSource + * @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): pyth_lazer_transaction.UpdateGovernanceSource; + + /** + * Decodes an UpdateGovernanceSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateGovernanceSource + * @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)): pyth_lazer_transaction.UpdateGovernanceSource; + + /** + * Verifies an UpdateGovernanceSource 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 UpdateGovernanceSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateGovernanceSource + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.UpdateGovernanceSource; + + /** + * Creates a plain object from an UpdateGovernanceSource message. Also converts values to other types if specified. + * @param message UpdateGovernanceSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.UpdateGovernanceSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateGovernanceSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateGovernanceSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a WormholeEmitter. */ - interface IWormholeEmitter { - /** WormholeEmitter address */ - address?: Uint8Array | null; + /** Properties of a SetGovernanceSourcePermissions. */ + interface ISetGovernanceSourcePermissions { - /** WormholeEmitter chainId */ - chainId?: number | null; + /** SetGovernanceSourcePermissions permissions */ + permissions?: (pyth_lazer_transaction.IPermissions|null); } - /** Represents a WormholeEmitter. */ - class WormholeEmitter implements IWormholeEmitter { - /** - * Constructs a new WormholeEmitter. - * @param [properties] Properties to set - */ - constructor( - properties?: pyth_lazer_transaction.GovernanceSource.IWormholeEmitter, - ); - - /** WormholeEmitter address. */ - public address?: Uint8Array | null; - - /** WormholeEmitter chainId. */ - public chainId?: number | null; - - /** WormholeEmitter _address. */ - public _address?: "address"; - - /** WormholeEmitter _chainId. */ - public _chainId?: "chainId"; - - /** - * Creates a new WormholeEmitter instance using the specified properties. - * @param [properties] Properties to set - * @returns WormholeEmitter instance - */ - public static create( - properties?: pyth_lazer_transaction.GovernanceSource.IWormholeEmitter, - ): pyth_lazer_transaction.GovernanceSource.WormholeEmitter; - - /** - * Encodes the specified WormholeEmitter message. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.WormholeEmitter.verify|verify} messages. - * @param message WormholeEmitter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.GovernanceSource.IWormholeEmitter, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified WormholeEmitter message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.WormholeEmitter.verify|verify} messages. - * @param message WormholeEmitter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.GovernanceSource.IWormholeEmitter, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a WormholeEmitter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WormholeEmitter - * @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, - ): pyth_lazer_transaction.GovernanceSource.WormholeEmitter; - - /** - * Decodes a WormholeEmitter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WormholeEmitter - * @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, - ): pyth_lazer_transaction.GovernanceSource.WormholeEmitter; - - /** - * Verifies a WormholeEmitter 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 WormholeEmitter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WormholeEmitter - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.GovernanceSource.WormholeEmitter; - - /** - * Creates a plain object from a WormholeEmitter message. Also converts values to other types if specified. - * @param message WormholeEmitter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.GovernanceSource.WormholeEmitter, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this WormholeEmitter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WormholeEmitter - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** Represents a SetGovernanceSourcePermissions. */ + class SetGovernanceSourcePermissions implements ISetGovernanceSourcePermissions { + + /** + * Constructs a new SetGovernanceSourcePermissions. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ISetGovernanceSourcePermissions); + + /** SetGovernanceSourcePermissions permissions. */ + public permissions?: (pyth_lazer_transaction.IPermissions|null); + + /** SetGovernanceSourcePermissions _permissions. */ + public _permissions?: "permissions"; + + /** + * Creates a new SetGovernanceSourcePermissions instance using the specified properties. + * @param [properties] Properties to set + * @returns SetGovernanceSourcePermissions instance + */ + public static create(properties?: pyth_lazer_transaction.ISetGovernanceSourcePermissions): pyth_lazer_transaction.SetGovernanceSourcePermissions; + + /** + * Encodes the specified SetGovernanceSourcePermissions message. Does not implicitly {@link pyth_lazer_transaction.SetGovernanceSourcePermissions.verify|verify} messages. + * @param message SetGovernanceSourcePermissions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.ISetGovernanceSourcePermissions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetGovernanceSourcePermissions message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetGovernanceSourcePermissions.verify|verify} messages. + * @param message SetGovernanceSourcePermissions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.ISetGovernanceSourcePermissions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetGovernanceSourcePermissions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetGovernanceSourcePermissions + * @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): pyth_lazer_transaction.SetGovernanceSourcePermissions; + + /** + * Decodes a SetGovernanceSourcePermissions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetGovernanceSourcePermissions + * @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)): pyth_lazer_transaction.SetGovernanceSourcePermissions; + + /** + * Verifies a SetGovernanceSourcePermissions 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 SetGovernanceSourcePermissions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetGovernanceSourcePermissions + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.SetGovernanceSourcePermissions; + + /** + * Creates a plain object from a SetGovernanceSourcePermissions message. Also converts values to other types if specified. + * @param message SetGovernanceSourcePermissions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.SetGovernanceSourcePermissions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetGovernanceSourcePermissions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetGovernanceSourcePermissions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - } - - /** Properties of a CreateShard. */ - interface ICreateShard { - /** CreateShard shardId */ - shardId?: number | null; - - /** CreateShard shardGroup */ - shardGroup?: string | null; - - /** CreateShard minRate */ - minRate?: google.protobuf.IDuration | null; - } - - /** Represents a CreateShard. */ - class CreateShard implements ICreateShard { - /** - * Constructs a new CreateShard. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.ICreateShard); - - /** CreateShard shardId. */ - public shardId?: number | null; - - /** CreateShard shardGroup. */ - public shardGroup?: string | null; - - /** CreateShard minRate. */ - public minRate?: google.protobuf.IDuration | null; - - /** CreateShard _shardId. */ - public _shardId?: "shardId"; - - /** CreateShard _shardGroup. */ - public _shardGroup?: "shardGroup"; - - /** CreateShard _minRate. */ - public _minRate?: "minRate"; - - /** - * Creates a new CreateShard instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateShard instance - */ - public static create( - properties?: pyth_lazer_transaction.ICreateShard, - ): pyth_lazer_transaction.CreateShard; - - /** - * Encodes the specified CreateShard message. Does not implicitly {@link pyth_lazer_transaction.CreateShard.verify|verify} messages. - * @param message CreateShard message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.ICreateShard, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified CreateShard message, length delimited. Does not implicitly {@link pyth_lazer_transaction.CreateShard.verify|verify} messages. - * @param message CreateShard message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.ICreateShard, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a CreateShard message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateShard - * @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, - ): pyth_lazer_transaction.CreateShard; - - /** - * Decodes a CreateShard message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateShard - * @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, - ): pyth_lazer_transaction.CreateShard; - - /** - * Verifies a CreateShard 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 CreateShard message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateShard - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.CreateShard; - - /** - * Creates a plain object from a CreateShard message. Also converts values to other types if specified. - * @param message CreateShard - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.CreateShard, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this CreateShard to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateShard - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AddGovernanceSource. */ - interface IAddGovernanceSource { - /** AddGovernanceSource newSource */ - newSource?: pyth_lazer_transaction.IGovernanceSource | null; - - /** AddGovernanceSource permissions */ - permissions?: pyth_lazer_transaction.IPermissions | null; - } - - /** Represents an AddGovernanceSource. */ - class AddGovernanceSource implements IAddGovernanceSource { - /** - * Constructs a new AddGovernanceSource. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IAddGovernanceSource); - - /** AddGovernanceSource newSource. */ - public newSource?: pyth_lazer_transaction.IGovernanceSource | null; - - /** AddGovernanceSource permissions. */ - public permissions?: pyth_lazer_transaction.IPermissions | null; - - /** AddGovernanceSource _newSource. */ - public _newSource?: "newSource"; - - /** AddGovernanceSource _permissions. */ - public _permissions?: "permissions"; - - /** - * Creates a new AddGovernanceSource instance using the specified properties. - * @param [properties] Properties to set - * @returns AddGovernanceSource instance - */ - public static create( - properties?: pyth_lazer_transaction.IAddGovernanceSource, - ): pyth_lazer_transaction.AddGovernanceSource; - - /** - * Encodes the specified AddGovernanceSource message. Does not implicitly {@link pyth_lazer_transaction.AddGovernanceSource.verify|verify} messages. - * @param message AddGovernanceSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.IAddGovernanceSource, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified AddGovernanceSource message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddGovernanceSource.verify|verify} messages. - * @param message AddGovernanceSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.IAddGovernanceSource, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes an AddGovernanceSource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AddGovernanceSource - * @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, - ): pyth_lazer_transaction.AddGovernanceSource; - - /** - * Decodes an AddGovernanceSource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AddGovernanceSource - * @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, - ): pyth_lazer_transaction.AddGovernanceSource; - - /** - * Verifies an AddGovernanceSource 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 AddGovernanceSource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AddGovernanceSource - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.AddGovernanceSource; - - /** - * Creates a plain object from an AddGovernanceSource message. Also converts values to other types if specified. - * @param message AddGovernanceSource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.AddGovernanceSource, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this AddGovernanceSource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AddGovernanceSource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateGovernanceSource. */ - interface IUpdateGovernanceSource { - /** UpdateGovernanceSource source */ - source?: pyth_lazer_transaction.IGovernanceSource | null; - - /** UpdateGovernanceSource setGovernanceSourcePermissions */ - setGovernanceSourcePermissions?: pyth_lazer_transaction.ISetGovernanceSourcePermissions | null; - - /** UpdateGovernanceSource removeGovernanceSource */ - removeGovernanceSource?: google.protobuf.IEmpty | null; - } - - /** Represents an UpdateGovernanceSource. */ - class UpdateGovernanceSource implements IUpdateGovernanceSource { - /** - * Constructs a new UpdateGovernanceSource. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IUpdateGovernanceSource); - - /** UpdateGovernanceSource source. */ - public source?: pyth_lazer_transaction.IGovernanceSource | null; - - /** UpdateGovernanceSource setGovernanceSourcePermissions. */ - public setGovernanceSourcePermissions?: pyth_lazer_transaction.ISetGovernanceSourcePermissions | null; - - /** UpdateGovernanceSource removeGovernanceSource. */ - public removeGovernanceSource?: google.protobuf.IEmpty | null; - - /** UpdateGovernanceSource _source. */ - public _source?: "source"; - - /** UpdateGovernanceSource action. */ - public action?: "setGovernanceSourcePermissions" | "removeGovernanceSource"; - - /** - * Creates a new UpdateGovernanceSource instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateGovernanceSource instance - */ - public static create( - properties?: pyth_lazer_transaction.IUpdateGovernanceSource, - ): pyth_lazer_transaction.UpdateGovernanceSource; - - /** - * Encodes the specified UpdateGovernanceSource message. Does not implicitly {@link pyth_lazer_transaction.UpdateGovernanceSource.verify|verify} messages. - * @param message UpdateGovernanceSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.IUpdateGovernanceSource, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified UpdateGovernanceSource message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdateGovernanceSource.verify|verify} messages. - * @param message UpdateGovernanceSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.IUpdateGovernanceSource, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes an UpdateGovernanceSource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateGovernanceSource - * @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, - ): pyth_lazer_transaction.UpdateGovernanceSource; - - /** - * Decodes an UpdateGovernanceSource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateGovernanceSource - * @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, - ): pyth_lazer_transaction.UpdateGovernanceSource; - - /** - * Verifies an UpdateGovernanceSource 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 UpdateGovernanceSource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateGovernanceSource - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.UpdateGovernanceSource; - - /** - * Creates a plain object from an UpdateGovernanceSource message. Also converts values to other types if specified. - * @param message UpdateGovernanceSource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.UpdateGovernanceSource, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this UpdateGovernanceSource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateGovernanceSource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetGovernanceSourcePermissions. */ - interface ISetGovernanceSourcePermissions { - /** SetGovernanceSourcePermissions permissions */ - permissions?: pyth_lazer_transaction.IPermissions | null; - } - - /** Represents a SetGovernanceSourcePermissions. */ - class SetGovernanceSourcePermissions - implements ISetGovernanceSourcePermissions - { - /** - * Constructs a new SetGovernanceSourcePermissions. - * @param [properties] Properties to set - */ - constructor( - properties?: pyth_lazer_transaction.ISetGovernanceSourcePermissions, - ); - - /** SetGovernanceSourcePermissions permissions. */ - public permissions?: pyth_lazer_transaction.IPermissions | null; - - /** SetGovernanceSourcePermissions _permissions. */ - public _permissions?: "permissions"; - - /** - * Creates a new SetGovernanceSourcePermissions instance using the specified properties. - * @param [properties] Properties to set - * @returns SetGovernanceSourcePermissions instance - */ - public static create( - properties?: pyth_lazer_transaction.ISetGovernanceSourcePermissions, - ): pyth_lazer_transaction.SetGovernanceSourcePermissions; - - /** - * Encodes the specified SetGovernanceSourcePermissions message. Does not implicitly {@link pyth_lazer_transaction.SetGovernanceSourcePermissions.verify|verify} messages. - * @param message SetGovernanceSourcePermissions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.ISetGovernanceSourcePermissions, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified SetGovernanceSourcePermissions message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetGovernanceSourcePermissions.verify|verify} messages. - * @param message SetGovernanceSourcePermissions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.ISetGovernanceSourcePermissions, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a SetGovernanceSourcePermissions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetGovernanceSourcePermissions - * @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, - ): pyth_lazer_transaction.SetGovernanceSourcePermissions; - - /** - * Decodes a SetGovernanceSourcePermissions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetGovernanceSourcePermissions - * @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, - ): pyth_lazer_transaction.SetGovernanceSourcePermissions; - - /** - * Verifies a SetGovernanceSourcePermissions 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 SetGovernanceSourcePermissions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetGovernanceSourcePermissions - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.SetGovernanceSourcePermissions; - - /** - * Creates a plain object from a SetGovernanceSourcePermissions message. Also converts values to other types if specified. - * @param message SetGovernanceSourcePermissions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.SetGovernanceSourcePermissions, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this SetGovernanceSourcePermissions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetGovernanceSourcePermissions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetShardName. */ - interface ISetShardName { - /** SetShardName shardName */ - shardName?: string | null; - } - - /** Represents a SetShardName. */ - class SetShardName implements ISetShardName { - /** - * Constructs a new SetShardName. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.ISetShardName); - - /** SetShardName shardName. */ - public shardName?: string | null; - - /** SetShardName _shardName. */ - public _shardName?: "shardName"; - - /** - * Creates a new SetShardName instance using the specified properties. - * @param [properties] Properties to set - * @returns SetShardName instance - */ - public static create( - properties?: pyth_lazer_transaction.ISetShardName, - ): pyth_lazer_transaction.SetShardName; - - /** - * Encodes the specified SetShardName message. Does not implicitly {@link pyth_lazer_transaction.SetShardName.verify|verify} messages. - * @param message SetShardName message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.ISetShardName, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified SetShardName message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetShardName.verify|verify} messages. - * @param message SetShardName message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.ISetShardName, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a SetShardName message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetShardName - * @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, - ): pyth_lazer_transaction.SetShardName; - - /** - * Decodes a SetShardName message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetShardName - * @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, - ): pyth_lazer_transaction.SetShardName; - - /** - * Verifies a SetShardName 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 SetShardName message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetShardName - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.SetShardName; - - /** - * Creates a plain object from a SetShardName message. Also converts values to other types if specified. - * @param message SetShardName - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.SetShardName, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this SetShardName to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetShardName - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetShardGroup. */ - interface ISetShardGroup { - /** SetShardGroup shardGroup */ - shardGroup?: string | null; - } - - /** Represents a SetShardGroup. */ - class SetShardGroup implements ISetShardGroup { - /** - * Constructs a new SetShardGroup. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.ISetShardGroup); - - /** SetShardGroup shardGroup. */ - public shardGroup?: string | null; - - /** SetShardGroup _shardGroup. */ - public _shardGroup?: "shardGroup"; - - /** - * Creates a new SetShardGroup instance using the specified properties. - * @param [properties] Properties to set - * @returns SetShardGroup instance - */ - public static create( - properties?: pyth_lazer_transaction.ISetShardGroup, - ): pyth_lazer_transaction.SetShardGroup; - - /** - * Encodes the specified SetShardGroup message. Does not implicitly {@link pyth_lazer_transaction.SetShardGroup.verify|verify} messages. - * @param message SetShardGroup message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.ISetShardGroup, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified SetShardGroup message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetShardGroup.verify|verify} messages. - * @param message SetShardGroup message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.ISetShardGroup, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a SetShardGroup message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetShardGroup - * @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, - ): pyth_lazer_transaction.SetShardGroup; - - /** - * Decodes a SetShardGroup message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetShardGroup - * @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, - ): pyth_lazer_transaction.SetShardGroup; - - /** - * Verifies a SetShardGroup 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 SetShardGroup message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetShardGroup - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.SetShardGroup; - - /** - * Creates a plain object from a SetShardGroup message. Also converts values to other types if specified. - * @param message SetShardGroup - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.SetShardGroup, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this SetShardGroup to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetShardGroup - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ResetLastSequenceNo. */ - interface IResetLastSequenceNo { - /** ResetLastSequenceNo lastSequenceNo */ - lastSequenceNo?: number | Long | null; - } - - /** Represents a ResetLastSequenceNo. */ - class ResetLastSequenceNo implements IResetLastSequenceNo { - /** - * Constructs a new ResetLastSequenceNo. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IResetLastSequenceNo); - - /** ResetLastSequenceNo lastSequenceNo. */ - public lastSequenceNo?: number | Long | null; - - /** ResetLastSequenceNo _lastSequenceNo. */ - public _lastSequenceNo?: "lastSequenceNo"; - - /** - * Creates a new ResetLastSequenceNo instance using the specified properties. - * @param [properties] Properties to set - * @returns ResetLastSequenceNo instance - */ - public static create( - properties?: pyth_lazer_transaction.IResetLastSequenceNo, - ): pyth_lazer_transaction.ResetLastSequenceNo; - - /** - * Encodes the specified ResetLastSequenceNo message. Does not implicitly {@link pyth_lazer_transaction.ResetLastSequenceNo.verify|verify} messages. - * @param message ResetLastSequenceNo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.IResetLastSequenceNo, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified ResetLastSequenceNo message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ResetLastSequenceNo.verify|verify} messages. - * @param message ResetLastSequenceNo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.IResetLastSequenceNo, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a ResetLastSequenceNo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResetLastSequenceNo - * @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, - ): pyth_lazer_transaction.ResetLastSequenceNo; - - /** - * Decodes a ResetLastSequenceNo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResetLastSequenceNo - * @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, - ): pyth_lazer_transaction.ResetLastSequenceNo; - - /** - * Verifies a ResetLastSequenceNo 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 ResetLastSequenceNo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResetLastSequenceNo - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.ResetLastSequenceNo; - - /** - * Creates a plain object from a ResetLastSequenceNo message. Also converts values to other types if specified. - * @param message ResetLastSequenceNo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.ResetLastSequenceNo, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this ResetLastSequenceNo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResetLastSequenceNo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AddPublisher. */ - interface IAddPublisher { - /** AddPublisher publisherId */ - publisherId?: number | null; - - /** AddPublisher name */ - name?: string | null; - - /** AddPublisher publicKeys */ - publicKeys?: Uint8Array[] | null; - - /** AddPublisher isActive */ - isActive?: boolean | null; - } - - /** Represents an AddPublisher. */ - class AddPublisher implements IAddPublisher { - /** - * Constructs a new AddPublisher. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IAddPublisher); - - /** AddPublisher publisherId. */ - public publisherId?: number | null; - - /** AddPublisher name. */ - public name?: string | null; - - /** AddPublisher publicKeys. */ - public publicKeys: Uint8Array[]; - - /** AddPublisher isActive. */ - public isActive?: boolean | null; - - /** AddPublisher _publisherId. */ - public _publisherId?: "publisherId"; - - /** AddPublisher _name. */ - public _name?: "name"; - - /** AddPublisher _isActive. */ - public _isActive?: "isActive"; - - /** - * Creates a new AddPublisher instance using the specified properties. - * @param [properties] Properties to set - * @returns AddPublisher instance - */ - public static create( - properties?: pyth_lazer_transaction.IAddPublisher, - ): pyth_lazer_transaction.AddPublisher; - - /** - * Encodes the specified AddPublisher message. Does not implicitly {@link pyth_lazer_transaction.AddPublisher.verify|verify} messages. - * @param message AddPublisher message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.IAddPublisher, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified AddPublisher message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddPublisher.verify|verify} messages. - * @param message AddPublisher message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.IAddPublisher, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes an AddPublisher message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AddPublisher - * @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, - ): pyth_lazer_transaction.AddPublisher; - - /** - * Decodes an AddPublisher message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AddPublisher - * @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, - ): pyth_lazer_transaction.AddPublisher; - - /** - * Verifies an AddPublisher 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 AddPublisher message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AddPublisher - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.AddPublisher; - - /** - * Creates a plain object from an AddPublisher message. Also converts values to other types if specified. - * @param message AddPublisher - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.AddPublisher, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this AddPublisher to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AddPublisher - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdatePublisher. */ - interface IUpdatePublisher { - /** UpdatePublisher publisherId */ - publisherId?: number | null; - - /** UpdatePublisher setPublisherName */ - setPublisherName?: pyth_lazer_transaction.ISetPublisherName | null; - - /** UpdatePublisher addPublisherPublicKeys */ - addPublisherPublicKeys?: pyth_lazer_transaction.IAddPublisherPublicKeys | null; - - /** UpdatePublisher removePublisherPublicKeys */ - removePublisherPublicKeys?: pyth_lazer_transaction.IRemovePublisherPublicKeys | null; - - /** UpdatePublisher setPublisherPublicKeys */ - setPublisherPublicKeys?: pyth_lazer_transaction.ISetPublisherPublicKeys | null; - - /** UpdatePublisher setPublisherActive */ - setPublisherActive?: pyth_lazer_transaction.ISetPublisherActive | null; - - /** UpdatePublisher removePublisher */ - removePublisher?: google.protobuf.IEmpty | null; - } - - /** Represents an UpdatePublisher. */ - class UpdatePublisher implements IUpdatePublisher { - /** - * Constructs a new UpdatePublisher. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IUpdatePublisher); - - /** UpdatePublisher publisherId. */ - public publisherId?: number | null; - - /** UpdatePublisher setPublisherName. */ - public setPublisherName?: pyth_lazer_transaction.ISetPublisherName | null; - - /** UpdatePublisher addPublisherPublicKeys. */ - public addPublisherPublicKeys?: pyth_lazer_transaction.IAddPublisherPublicKeys | null; - - /** UpdatePublisher removePublisherPublicKeys. */ - public removePublisherPublicKeys?: pyth_lazer_transaction.IRemovePublisherPublicKeys | null; - - /** UpdatePublisher setPublisherPublicKeys. */ - public setPublisherPublicKeys?: pyth_lazer_transaction.ISetPublisherPublicKeys | null; - - /** UpdatePublisher setPublisherActive. */ - public setPublisherActive?: pyth_lazer_transaction.ISetPublisherActive | null; - - /** UpdatePublisher removePublisher. */ - public removePublisher?: google.protobuf.IEmpty | null; - - /** UpdatePublisher _publisherId. */ - public _publisherId?: "publisherId"; - - /** UpdatePublisher action. */ - public action?: - | "setPublisherName" - | "addPublisherPublicKeys" - | "removePublisherPublicKeys" - | "setPublisherPublicKeys" - | "setPublisherActive" - | "removePublisher"; - - /** - * Creates a new UpdatePublisher instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdatePublisher instance - */ - public static create( - properties?: pyth_lazer_transaction.IUpdatePublisher, - ): pyth_lazer_transaction.UpdatePublisher; - - /** - * Encodes the specified UpdatePublisher message. Does not implicitly {@link pyth_lazer_transaction.UpdatePublisher.verify|verify} messages. - * @param message UpdatePublisher message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.IUpdatePublisher, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified UpdatePublisher message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdatePublisher.verify|verify} messages. - * @param message UpdatePublisher message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.IUpdatePublisher, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes an UpdatePublisher message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdatePublisher - * @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, - ): pyth_lazer_transaction.UpdatePublisher; - - /** - * Decodes an UpdatePublisher message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdatePublisher - * @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, - ): pyth_lazer_transaction.UpdatePublisher; - - /** - * Verifies an UpdatePublisher 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 UpdatePublisher message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdatePublisher - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.UpdatePublisher; - - /** - * Creates a plain object from an UpdatePublisher message. Also converts values to other types if specified. - * @param message UpdatePublisher - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.UpdatePublisher, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this UpdatePublisher to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdatePublisher - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetPublisherName. */ - interface ISetPublisherName { - /** SetPublisherName name */ - name?: string | null; - } - - /** Represents a SetPublisherName. */ - class SetPublisherName implements ISetPublisherName { - /** - * Constructs a new SetPublisherName. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.ISetPublisherName); - - /** SetPublisherName name. */ - public name?: string | null; - - /** SetPublisherName _name. */ - public _name?: "name"; - - /** - * Creates a new SetPublisherName instance using the specified properties. - * @param [properties] Properties to set - * @returns SetPublisherName instance - */ - public static create( - properties?: pyth_lazer_transaction.ISetPublisherName, - ): pyth_lazer_transaction.SetPublisherName; - - /** - * Encodes the specified SetPublisherName message. Does not implicitly {@link pyth_lazer_transaction.SetPublisherName.verify|verify} messages. - * @param message SetPublisherName message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.ISetPublisherName, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified SetPublisherName message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetPublisherName.verify|verify} messages. - * @param message SetPublisherName message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.ISetPublisherName, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a SetPublisherName message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetPublisherName - * @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, - ): pyth_lazer_transaction.SetPublisherName; - - /** - * Decodes a SetPublisherName message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetPublisherName - * @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, - ): pyth_lazer_transaction.SetPublisherName; - - /** - * Verifies a SetPublisherName 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 SetPublisherName message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetPublisherName - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.SetPublisherName; - - /** - * Creates a plain object from a SetPublisherName message. Also converts values to other types if specified. - * @param message SetPublisherName - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.SetPublisherName, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this SetPublisherName to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetPublisherName - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AddPublisherPublicKeys. */ - interface IAddPublisherPublicKeys { - /** AddPublisherPublicKeys publicKeys */ - publicKeys?: Uint8Array[] | null; - } - - /** Represents an AddPublisherPublicKeys. */ - class AddPublisherPublicKeys implements IAddPublisherPublicKeys { - /** - * Constructs a new AddPublisherPublicKeys. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IAddPublisherPublicKeys); - - /** AddPublisherPublicKeys publicKeys. */ - public publicKeys: Uint8Array[]; - - /** - * Creates a new AddPublisherPublicKeys instance using the specified properties. - * @param [properties] Properties to set - * @returns AddPublisherPublicKeys instance - */ - public static create( - properties?: pyth_lazer_transaction.IAddPublisherPublicKeys, - ): pyth_lazer_transaction.AddPublisherPublicKeys; - - /** - * Encodes the specified AddPublisherPublicKeys message. Does not implicitly {@link pyth_lazer_transaction.AddPublisherPublicKeys.verify|verify} messages. - * @param message AddPublisherPublicKeys message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.IAddPublisherPublicKeys, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified AddPublisherPublicKeys message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddPublisherPublicKeys.verify|verify} messages. - * @param message AddPublisherPublicKeys message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.IAddPublisherPublicKeys, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes an AddPublisherPublicKeys message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AddPublisherPublicKeys - * @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, - ): pyth_lazer_transaction.AddPublisherPublicKeys; - - /** - * Decodes an AddPublisherPublicKeys message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AddPublisherPublicKeys - * @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, - ): pyth_lazer_transaction.AddPublisherPublicKeys; - - /** - * Verifies an AddPublisherPublicKeys 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 AddPublisherPublicKeys message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AddPublisherPublicKeys - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.AddPublisherPublicKeys; - - /** - * Creates a plain object from an AddPublisherPublicKeys message. Also converts values to other types if specified. - * @param message AddPublisherPublicKeys - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.AddPublisherPublicKeys, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this AddPublisherPublicKeys to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AddPublisherPublicKeys - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RemovePublisherPublicKeys. */ - interface IRemovePublisherPublicKeys { - /** RemovePublisherPublicKeys publicKeys */ - publicKeys?: Uint8Array[] | null; - } - - /** Represents a RemovePublisherPublicKeys. */ - class RemovePublisherPublicKeys implements IRemovePublisherPublicKeys { - /** - * Constructs a new RemovePublisherPublicKeys. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IRemovePublisherPublicKeys); - - /** RemovePublisherPublicKeys publicKeys. */ - public publicKeys: Uint8Array[]; - - /** - * Creates a new RemovePublisherPublicKeys instance using the specified properties. - * @param [properties] Properties to set - * @returns RemovePublisherPublicKeys instance - */ - public static create( - properties?: pyth_lazer_transaction.IRemovePublisherPublicKeys, - ): pyth_lazer_transaction.RemovePublisherPublicKeys; - - /** - * Encodes the specified RemovePublisherPublicKeys message. Does not implicitly {@link pyth_lazer_transaction.RemovePublisherPublicKeys.verify|verify} messages. - * @param message RemovePublisherPublicKeys message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.IRemovePublisherPublicKeys, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified RemovePublisherPublicKeys message, length delimited. Does not implicitly {@link pyth_lazer_transaction.RemovePublisherPublicKeys.verify|verify} messages. - * @param message RemovePublisherPublicKeys message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.IRemovePublisherPublicKeys, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a RemovePublisherPublicKeys message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RemovePublisherPublicKeys - * @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, - ): pyth_lazer_transaction.RemovePublisherPublicKeys; - - /** - * Decodes a RemovePublisherPublicKeys message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RemovePublisherPublicKeys - * @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, - ): pyth_lazer_transaction.RemovePublisherPublicKeys; - - /** - * Verifies a RemovePublisherPublicKeys 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 RemovePublisherPublicKeys message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RemovePublisherPublicKeys - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.RemovePublisherPublicKeys; - - /** - * Creates a plain object from a RemovePublisherPublicKeys message. Also converts values to other types if specified. - * @param message RemovePublisherPublicKeys - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.RemovePublisherPublicKeys, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this RemovePublisherPublicKeys to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RemovePublisherPublicKeys - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetPublisherPublicKeys. */ - interface ISetPublisherPublicKeys { - /** SetPublisherPublicKeys publicKeys */ - publicKeys?: Uint8Array[] | null; - } - - /** Represents a SetPublisherPublicKeys. */ - class SetPublisherPublicKeys implements ISetPublisherPublicKeys { - /** - * Constructs a new SetPublisherPublicKeys. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.ISetPublisherPublicKeys); - - /** SetPublisherPublicKeys publicKeys. */ - public publicKeys: Uint8Array[]; - - /** - * Creates a new SetPublisherPublicKeys instance using the specified properties. - * @param [properties] Properties to set - * @returns SetPublisherPublicKeys instance - */ - public static create( - properties?: pyth_lazer_transaction.ISetPublisherPublicKeys, - ): pyth_lazer_transaction.SetPublisherPublicKeys; - - /** - * Encodes the specified SetPublisherPublicKeys message. Does not implicitly {@link pyth_lazer_transaction.SetPublisherPublicKeys.verify|verify} messages. - * @param message SetPublisherPublicKeys message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.ISetPublisherPublicKeys, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified SetPublisherPublicKeys message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetPublisherPublicKeys.verify|verify} messages. - * @param message SetPublisherPublicKeys message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.ISetPublisherPublicKeys, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a SetPublisherPublicKeys message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetPublisherPublicKeys - * @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, - ): pyth_lazer_transaction.SetPublisherPublicKeys; - - /** - * Decodes a SetPublisherPublicKeys message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetPublisherPublicKeys - * @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, - ): pyth_lazer_transaction.SetPublisherPublicKeys; - - /** - * Verifies a SetPublisherPublicKeys 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 SetPublisherPublicKeys message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetPublisherPublicKeys - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.SetPublisherPublicKeys; - - /** - * Creates a plain object from a SetPublisherPublicKeys message. Also converts values to other types if specified. - * @param message SetPublisherPublicKeys - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.SetPublisherPublicKeys, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this SetPublisherPublicKeys to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetPublisherPublicKeys - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetPublisherActive. */ - interface ISetPublisherActive { - /** SetPublisherActive isActive */ - isActive?: boolean | null; - } - - /** Represents a SetPublisherActive. */ - class SetPublisherActive implements ISetPublisherActive { - /** - * Constructs a new SetPublisherActive. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.ISetPublisherActive); - - /** SetPublisherActive isActive. */ - public isActive?: boolean | null; - - /** SetPublisherActive _isActive. */ - public _isActive?: "isActive"; - - /** - * Creates a new SetPublisherActive instance using the specified properties. - * @param [properties] Properties to set - * @returns SetPublisherActive instance - */ - public static create( - properties?: pyth_lazer_transaction.ISetPublisherActive, - ): pyth_lazer_transaction.SetPublisherActive; - - /** - * Encodes the specified SetPublisherActive message. Does not implicitly {@link pyth_lazer_transaction.SetPublisherActive.verify|verify} messages. - * @param message SetPublisherActive message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.ISetPublisherActive, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified SetPublisherActive message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetPublisherActive.verify|verify} messages. - * @param message SetPublisherActive message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.ISetPublisherActive, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a SetPublisherActive message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetPublisherActive - * @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, - ): pyth_lazer_transaction.SetPublisherActive; - - /** - * Decodes a SetPublisherActive message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetPublisherActive - * @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, - ): pyth_lazer_transaction.SetPublisherActive; - - /** - * Verifies a SetPublisherActive 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 SetPublisherActive message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetPublisherActive - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.SetPublisherActive; - - /** - * Creates a plain object from a SetPublisherActive message. Also converts values to other types if specified. - * @param message SetPublisherActive - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.SetPublisherActive, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this SetPublisherActive to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetPublisherActive - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AddFeed. */ - interface IAddFeed { - /** AddFeed feedId */ - feedId?: number | null; - - /** AddFeed metadata */ - metadata?: pyth_lazer_transaction.DynamicValue.IMap | null; - - /** AddFeed permissionedPublishers */ - permissionedPublishers?: number[] | null; - } - - /** Represents an AddFeed. */ - class AddFeed implements IAddFeed { - /** - * Constructs a new AddFeed. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IAddFeed); - - /** AddFeed feedId. */ - public feedId?: number | null; - - /** AddFeed metadata. */ - public metadata?: pyth_lazer_transaction.DynamicValue.IMap | null; - - /** AddFeed permissionedPublishers. */ - public permissionedPublishers: number[]; - - /** AddFeed _feedId. */ - public _feedId?: "feedId"; - - /** AddFeed _metadata. */ - public _metadata?: "metadata"; - - /** - * Creates a new AddFeed instance using the specified properties. - * @param [properties] Properties to set - * @returns AddFeed instance - */ - public static create( - properties?: pyth_lazer_transaction.IAddFeed, - ): pyth_lazer_transaction.AddFeed; - - /** - * Encodes the specified AddFeed message. Does not implicitly {@link pyth_lazer_transaction.AddFeed.verify|verify} messages. - * @param message AddFeed message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.IAddFeed, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified AddFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddFeed.verify|verify} messages. - * @param message AddFeed message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.IAddFeed, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes an AddFeed message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AddFeed - * @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, - ): pyth_lazer_transaction.AddFeed; - - /** - * Decodes an AddFeed message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AddFeed - * @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, - ): pyth_lazer_transaction.AddFeed; - - /** - * Verifies an AddFeed 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 AddFeed message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AddFeed - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.AddFeed; - - /** - * Creates a plain object from an AddFeed message. Also converts values to other types if specified. - * @param message AddFeed - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.AddFeed, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this AddFeed to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AddFeed - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateFeed. */ - interface IUpdateFeed { - /** UpdateFeed feedId */ - feedId?: number | null; - - /** UpdateFeed updateFeedMetadata */ - updateFeedMetadata?: pyth_lazer_transaction.IUpdateFeedMetadata | null; - - /** UpdateFeed activateFeed */ - activateFeed?: pyth_lazer_transaction.IActivateFeed | null; - - /** UpdateFeed deactivateFeed */ - deactivateFeed?: pyth_lazer_transaction.IDeactivateFeed | null; - - /** UpdateFeed removeFeed */ - removeFeed?: google.protobuf.IEmpty | null; - } - - /** Represents an UpdateFeed. */ - class UpdateFeed implements IUpdateFeed { - /** - * Constructs a new UpdateFeed. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IUpdateFeed); - - /** UpdateFeed feedId. */ - public feedId?: number | null; - - /** UpdateFeed updateFeedMetadata. */ - public updateFeedMetadata?: pyth_lazer_transaction.IUpdateFeedMetadata | null; - - /** UpdateFeed activateFeed. */ - public activateFeed?: pyth_lazer_transaction.IActivateFeed | null; - - /** UpdateFeed deactivateFeed. */ - public deactivateFeed?: pyth_lazer_transaction.IDeactivateFeed | null; - - /** UpdateFeed removeFeed. */ - public removeFeed?: google.protobuf.IEmpty | null; - - /** UpdateFeed _feedId. */ - public _feedId?: "feedId"; - - /** UpdateFeed action. */ - public action?: - | "updateFeedMetadata" - | "activateFeed" - | "deactivateFeed" - | "removeFeed"; - - /** - * Creates a new UpdateFeed instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateFeed instance - */ - public static create( - properties?: pyth_lazer_transaction.IUpdateFeed, - ): pyth_lazer_transaction.UpdateFeed; - - /** - * Encodes the specified UpdateFeed message. Does not implicitly {@link pyth_lazer_transaction.UpdateFeed.verify|verify} messages. - * @param message UpdateFeed message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.IUpdateFeed, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified UpdateFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdateFeed.verify|verify} messages. - * @param message UpdateFeed message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.IUpdateFeed, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes an UpdateFeed message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateFeed - * @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, - ): pyth_lazer_transaction.UpdateFeed; - - /** - * Decodes an UpdateFeed message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateFeed - * @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, - ): pyth_lazer_transaction.UpdateFeed; - - /** - * Verifies an UpdateFeed 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 UpdateFeed message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateFeed - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.UpdateFeed; - - /** - * Creates a plain object from an UpdateFeed message. Also converts values to other types if specified. - * @param message UpdateFeed - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.UpdateFeed, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this UpdateFeed to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateFeed - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateFeedMetadata. */ - interface IUpdateFeedMetadata { - /** UpdateFeedMetadata name */ - name?: string | null; - - /** UpdateFeedMetadata value */ - value?: pyth_lazer_transaction.IDynamicValue | null; - } - - /** Represents an UpdateFeedMetadata. */ - class UpdateFeedMetadata implements IUpdateFeedMetadata { - /** - * Constructs a new UpdateFeedMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IUpdateFeedMetadata); - - /** UpdateFeedMetadata name. */ - public name?: string | null; - - /** UpdateFeedMetadata value. */ - public value?: pyth_lazer_transaction.IDynamicValue | null; - - /** UpdateFeedMetadata _name. */ - public _name?: "name"; - - /** UpdateFeedMetadata _value. */ - public _value?: "value"; - - /** - * Creates a new UpdateFeedMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateFeedMetadata instance - */ - public static create( - properties?: pyth_lazer_transaction.IUpdateFeedMetadata, - ): pyth_lazer_transaction.UpdateFeedMetadata; - - /** - * Encodes the specified UpdateFeedMetadata message. Does not implicitly {@link pyth_lazer_transaction.UpdateFeedMetadata.verify|verify} messages. - * @param message UpdateFeedMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.IUpdateFeedMetadata, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified UpdateFeedMetadata message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdateFeedMetadata.verify|verify} messages. - * @param message UpdateFeedMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.IUpdateFeedMetadata, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes an UpdateFeedMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateFeedMetadata - * @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, - ): pyth_lazer_transaction.UpdateFeedMetadata; - - /** - * Decodes an UpdateFeedMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateFeedMetadata - * @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, - ): pyth_lazer_transaction.UpdateFeedMetadata; - - /** - * Verifies an UpdateFeedMetadata 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 UpdateFeedMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateFeedMetadata - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.UpdateFeedMetadata; - - /** - * Creates a plain object from an UpdateFeedMetadata message. Also converts values to other types if specified. - * @param message UpdateFeedMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.UpdateFeedMetadata, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this UpdateFeedMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateFeedMetadata - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ActivateFeed. */ - interface IActivateFeed { - /** ActivateFeed activationTimestamp */ - activationTimestamp?: google.protobuf.ITimestamp | null; - } - - /** Represents an ActivateFeed. */ - class ActivateFeed implements IActivateFeed { - /** - * Constructs a new ActivateFeed. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IActivateFeed); - - /** ActivateFeed activationTimestamp. */ - public activationTimestamp?: google.protobuf.ITimestamp | null; - - /** ActivateFeed _activationTimestamp. */ - public _activationTimestamp?: "activationTimestamp"; - - /** - * Creates a new ActivateFeed instance using the specified properties. - * @param [properties] Properties to set - * @returns ActivateFeed instance - */ - public static create( - properties?: pyth_lazer_transaction.IActivateFeed, - ): pyth_lazer_transaction.ActivateFeed; - - /** - * Encodes the specified ActivateFeed message. Does not implicitly {@link pyth_lazer_transaction.ActivateFeed.verify|verify} messages. - * @param message ActivateFeed message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.IActivateFeed, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified ActivateFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ActivateFeed.verify|verify} messages. - * @param message ActivateFeed message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.IActivateFeed, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes an ActivateFeed message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ActivateFeed - * @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, - ): pyth_lazer_transaction.ActivateFeed; - - /** - * Decodes an ActivateFeed message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ActivateFeed - * @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, - ): pyth_lazer_transaction.ActivateFeed; - - /** - * Verifies an ActivateFeed 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 ActivateFeed message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ActivateFeed - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.ActivateFeed; - - /** - * Creates a plain object from an ActivateFeed message. Also converts values to other types if specified. - * @param message ActivateFeed - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.ActivateFeed, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this ActivateFeed to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ActivateFeed - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeactivateFeed. */ - interface IDeactivateFeed { - /** DeactivateFeed deactivationTimestamp */ - deactivationTimestamp?: google.protobuf.ITimestamp | null; - } - - /** Represents a DeactivateFeed. */ - class DeactivateFeed implements IDeactivateFeed { - /** - * Constructs a new DeactivateFeed. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IDeactivateFeed); - - /** DeactivateFeed deactivationTimestamp. */ - public deactivationTimestamp?: google.protobuf.ITimestamp | null; - - /** DeactivateFeed _deactivationTimestamp. */ - public _deactivationTimestamp?: "deactivationTimestamp"; - - /** - * Creates a new DeactivateFeed instance using the specified properties. - * @param [properties] Properties to set - * @returns DeactivateFeed instance - */ - public static create( - properties?: pyth_lazer_transaction.IDeactivateFeed, - ): pyth_lazer_transaction.DeactivateFeed; - - /** - * Encodes the specified DeactivateFeed message. Does not implicitly {@link pyth_lazer_transaction.DeactivateFeed.verify|verify} messages. - * @param message DeactivateFeed message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.IDeactivateFeed, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified DeactivateFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DeactivateFeed.verify|verify} messages. - * @param message DeactivateFeed message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.IDeactivateFeed, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a DeactivateFeed message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeactivateFeed - * @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, - ): pyth_lazer_transaction.DeactivateFeed; - - /** - * Decodes a DeactivateFeed message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeactivateFeed - * @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, - ): pyth_lazer_transaction.DeactivateFeed; - - /** - * Verifies a DeactivateFeed 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 DeactivateFeed message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeactivateFeed - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.DeactivateFeed; - - /** - * Creates a plain object from a DeactivateFeed message. Also converts values to other types if specified. - * @param message DeactivateFeed - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.DeactivateFeed, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this DeactivateFeed to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeactivateFeed - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DynamicValue. */ - interface IDynamicValue { - /** DynamicValue stringValue */ - stringValue?: string | null; - - /** DynamicValue doubleValue */ - doubleValue?: number | null; - - /** DynamicValue uintValue */ - uintValue?: number | Long | null; - - /** DynamicValue intValue */ - intValue?: number | Long | null; - - /** DynamicValue boolValue */ - boolValue?: boolean | null; - - /** DynamicValue bytesValue */ - bytesValue?: Uint8Array | null; - - /** DynamicValue durationValue */ - durationValue?: google.protobuf.IDuration | null; - - /** DynamicValue timestampValue */ - timestampValue?: google.protobuf.ITimestamp | null; - - /** DynamicValue list */ - list?: pyth_lazer_transaction.DynamicValue.IList | null; - - /** DynamicValue map */ - map?: pyth_lazer_transaction.DynamicValue.IMap | null; - } - - /** Represents a DynamicValue. */ - class DynamicValue implements IDynamicValue { - /** - * Constructs a new DynamicValue. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IDynamicValue); - - /** DynamicValue stringValue. */ - public stringValue?: string | null; - - /** DynamicValue doubleValue. */ - public doubleValue?: number | null; - - /** DynamicValue uintValue. */ - public uintValue?: number | Long | null; - - /** DynamicValue intValue. */ - public intValue?: number | Long | null; - - /** DynamicValue boolValue. */ - public boolValue?: boolean | null; - - /** DynamicValue bytesValue. */ - public bytesValue?: Uint8Array | null; - - /** DynamicValue durationValue. */ - public durationValue?: google.protobuf.IDuration | null; - - /** DynamicValue timestampValue. */ - public timestampValue?: google.protobuf.ITimestamp | null; - - /** DynamicValue list. */ - public list?: pyth_lazer_transaction.DynamicValue.IList | null; - - /** DynamicValue map. */ - public map?: pyth_lazer_transaction.DynamicValue.IMap | null; - - /** DynamicValue value. */ - public value?: - | "stringValue" - | "doubleValue" - | "uintValue" - | "intValue" - | "boolValue" - | "bytesValue" - | "durationValue" - | "timestampValue" - | "list" - | "map"; - - /** - * Creates a new DynamicValue instance using the specified properties. - * @param [properties] Properties to set - * @returns DynamicValue instance - */ - public static create( - properties?: pyth_lazer_transaction.IDynamicValue, - ): pyth_lazer_transaction.DynamicValue; - - /** - * Encodes the specified DynamicValue message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.verify|verify} messages. - * @param message DynamicValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.IDynamicValue, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified DynamicValue message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.verify|verify} messages. - * @param message DynamicValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.IDynamicValue, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a DynamicValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DynamicValue - * @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, - ): pyth_lazer_transaction.DynamicValue; - - /** - * Decodes a DynamicValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DynamicValue - * @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, - ): pyth_lazer_transaction.DynamicValue; - - /** - * Verifies a DynamicValue 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 DynamicValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DynamicValue - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.DynamicValue; - - /** - * Creates a plain object from a DynamicValue message. Also converts values to other types if specified. - * @param message DynamicValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.DynamicValue, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this DynamicValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DynamicValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DynamicValue { - /** Properties of a List. */ - interface IList { - /** List items */ - items?: pyth_lazer_transaction.IDynamicValue[] | null; + + /** Properties of a SetShardName. */ + interface ISetShardName { + + /** SetShardName shardName */ + shardName?: (string|null); } - /** Represents a List. */ - class List implements IList { - /** - * Constructs a new List. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.DynamicValue.IList); - - /** List items. */ - public items: pyth_lazer_transaction.IDynamicValue[]; - - /** - * Creates a new List instance using the specified properties. - * @param [properties] Properties to set - * @returns List instance - */ - public static create( - properties?: pyth_lazer_transaction.DynamicValue.IList, - ): pyth_lazer_transaction.DynamicValue.List; - - /** - * Encodes the specified List message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.List.verify|verify} messages. - * @param message List message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.DynamicValue.IList, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified List message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.List.verify|verify} messages. - * @param message List message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.DynamicValue.IList, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a List message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns List - * @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, - ): pyth_lazer_transaction.DynamicValue.List; - - /** - * Decodes a List message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns List - * @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, - ): pyth_lazer_transaction.DynamicValue.List; - - /** - * Verifies a List 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 List message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns List - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.DynamicValue.List; - - /** - * Creates a plain object from a List message. Also converts values to other types if specified. - * @param message List - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.DynamicValue.List, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this List to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for List - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** Represents a SetShardName. */ + class SetShardName implements ISetShardName { + + /** + * Constructs a new SetShardName. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ISetShardName); + + /** SetShardName shardName. */ + public shardName?: (string|null); + + /** SetShardName _shardName. */ + public _shardName?: "shardName"; + + /** + * Creates a new SetShardName instance using the specified properties. + * @param [properties] Properties to set + * @returns SetShardName instance + */ + public static create(properties?: pyth_lazer_transaction.ISetShardName): pyth_lazer_transaction.SetShardName; + + /** + * Encodes the specified SetShardName message. Does not implicitly {@link pyth_lazer_transaction.SetShardName.verify|verify} messages. + * @param message SetShardName message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.ISetShardName, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetShardName message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetShardName.verify|verify} messages. + * @param message SetShardName message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.ISetShardName, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetShardName message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetShardName + * @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): pyth_lazer_transaction.SetShardName; + + /** + * Decodes a SetShardName message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetShardName + * @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)): pyth_lazer_transaction.SetShardName; + + /** + * Verifies a SetShardName 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 SetShardName message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetShardName + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.SetShardName; + + /** + * Creates a plain object from a SetShardName message. Also converts values to other types if specified. + * @param message SetShardName + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.SetShardName, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetShardName to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetShardName + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a MapItem. */ - interface IMapItem { - /** MapItem key */ - key?: string | null; + /** Properties of a SetShardGroup. */ + interface ISetShardGroup { - /** MapItem value */ - value?: pyth_lazer_transaction.IDynamicValue | null; + /** SetShardGroup shardGroup */ + shardGroup?: (string|null); } - /** Represents a MapItem. */ - class MapItem implements IMapItem { - /** - * Constructs a new MapItem. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.DynamicValue.IMapItem); - - /** MapItem key. */ - public key?: string | null; - - /** MapItem value. */ - public value?: pyth_lazer_transaction.IDynamicValue | null; - - /** MapItem _key. */ - public _key?: "key"; - - /** MapItem _value. */ - public _value?: "value"; - - /** - * Creates a new MapItem instance using the specified properties. - * @param [properties] Properties to set - * @returns MapItem instance - */ - public static create( - properties?: pyth_lazer_transaction.DynamicValue.IMapItem, - ): pyth_lazer_transaction.DynamicValue.MapItem; - - /** - * Encodes the specified MapItem message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.MapItem.verify|verify} messages. - * @param message MapItem message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.DynamicValue.IMapItem, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified MapItem message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.MapItem.verify|verify} messages. - * @param message MapItem message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.DynamicValue.IMapItem, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a MapItem message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MapItem - * @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, - ): pyth_lazer_transaction.DynamicValue.MapItem; - - /** - * Decodes a MapItem message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MapItem - * @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, - ): pyth_lazer_transaction.DynamicValue.MapItem; - - /** - * Verifies a MapItem 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 MapItem message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MapItem - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.DynamicValue.MapItem; - - /** - * Creates a plain object from a MapItem message. Also converts values to other types if specified. - * @param message MapItem - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.DynamicValue.MapItem, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this MapItem to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MapItem - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** Represents a SetShardGroup. */ + class SetShardGroup implements ISetShardGroup { + + /** + * Constructs a new SetShardGroup. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ISetShardGroup); + + /** SetShardGroup shardGroup. */ + public shardGroup?: (string|null); + + /** SetShardGroup _shardGroup. */ + public _shardGroup?: "shardGroup"; + + /** + * Creates a new SetShardGroup instance using the specified properties. + * @param [properties] Properties to set + * @returns SetShardGroup instance + */ + public static create(properties?: pyth_lazer_transaction.ISetShardGroup): pyth_lazer_transaction.SetShardGroup; + + /** + * Encodes the specified SetShardGroup message. Does not implicitly {@link pyth_lazer_transaction.SetShardGroup.verify|verify} messages. + * @param message SetShardGroup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.ISetShardGroup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetShardGroup message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetShardGroup.verify|verify} messages. + * @param message SetShardGroup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.ISetShardGroup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetShardGroup message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetShardGroup + * @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): pyth_lazer_transaction.SetShardGroup; + + /** + * Decodes a SetShardGroup message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetShardGroup + * @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)): pyth_lazer_transaction.SetShardGroup; + + /** + * Verifies a SetShardGroup 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 SetShardGroup message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetShardGroup + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.SetShardGroup; + + /** + * Creates a plain object from a SetShardGroup message. Also converts values to other types if specified. + * @param message SetShardGroup + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.SetShardGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetShardGroup to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetShardGroup + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Map. */ - interface IMap { - /** Map items */ - items?: pyth_lazer_transaction.DynamicValue.IMapItem[] | null; + /** Properties of a ResetLastSequenceNo. */ + interface IResetLastSequenceNo { + + /** ResetLastSequenceNo lastSequenceNo */ + lastSequenceNo?: (number|Long|null); } - /** Represents a Map. */ - class Map implements IMap { - /** - * Constructs a new Map. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.DynamicValue.IMap); - - /** Map items. */ - public items: pyth_lazer_transaction.DynamicValue.IMapItem[]; - - /** - * Creates a new Map instance using the specified properties. - * @param [properties] Properties to set - * @returns Map instance - */ - public static create( - properties?: pyth_lazer_transaction.DynamicValue.IMap, - ): pyth_lazer_transaction.DynamicValue.Map; - - /** - * Encodes the specified Map message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.Map.verify|verify} messages. - * @param message Map message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: pyth_lazer_transaction.DynamicValue.IMap, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified Map message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.Map.verify|verify} messages. - * @param message Map message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: pyth_lazer_transaction.DynamicValue.IMap, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a Map message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Map - * @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, - ): pyth_lazer_transaction.DynamicValue.Map; - - /** - * Decodes a Map message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Map - * @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, - ): pyth_lazer_transaction.DynamicValue.Map; - - /** - * Verifies a Map 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 Map message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Map - */ - public static fromObject(object: { - [k: string]: any; - }): pyth_lazer_transaction.DynamicValue.Map; - - /** - * Creates a plain object from a Map message. Also converts values to other types if specified. - * @param message Map - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: pyth_lazer_transaction.DynamicValue.Map, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this Map to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Map - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** Represents a ResetLastSequenceNo. */ + class ResetLastSequenceNo implements IResetLastSequenceNo { + + /** + * Constructs a new ResetLastSequenceNo. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IResetLastSequenceNo); + + /** ResetLastSequenceNo lastSequenceNo. */ + public lastSequenceNo?: (number|Long|null); + + /** ResetLastSequenceNo _lastSequenceNo. */ + public _lastSequenceNo?: "lastSequenceNo"; + + /** + * Creates a new ResetLastSequenceNo instance using the specified properties. + * @param [properties] Properties to set + * @returns ResetLastSequenceNo instance + */ + public static create(properties?: pyth_lazer_transaction.IResetLastSequenceNo): pyth_lazer_transaction.ResetLastSequenceNo; + + /** + * Encodes the specified ResetLastSequenceNo message. Does not implicitly {@link pyth_lazer_transaction.ResetLastSequenceNo.verify|verify} messages. + * @param message ResetLastSequenceNo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IResetLastSequenceNo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResetLastSequenceNo message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ResetLastSequenceNo.verify|verify} messages. + * @param message ResetLastSequenceNo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IResetLastSequenceNo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResetLastSequenceNo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResetLastSequenceNo + * @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): pyth_lazer_transaction.ResetLastSequenceNo; + + /** + * Decodes a ResetLastSequenceNo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResetLastSequenceNo + * @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)): pyth_lazer_transaction.ResetLastSequenceNo; + + /** + * Verifies a ResetLastSequenceNo 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 ResetLastSequenceNo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResetLastSequenceNo + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.ResetLastSequenceNo; + + /** + * Creates a plain object from a ResetLastSequenceNo message. Also converts values to other types if specified. + * @param message ResetLastSequenceNo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.ResetLastSequenceNo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResetLastSequenceNo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResetLastSequenceNo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - } -} -/** Namespace google. */ -export namespace google { - /** Namespace protobuf. */ - namespace protobuf { - /** Properties of a Timestamp. */ - interface ITimestamp { - /** Timestamp seconds */ - seconds?: number | Long | null; - - /** Timestamp nanos */ - nanos?: number | null; + /** Properties of an AddPublisher. */ + interface IAddPublisher { + + /** AddPublisher publisherId */ + publisherId?: (number|null); + + /** AddPublisher name */ + name?: (string|null); + + /** AddPublisher publicKeys */ + publicKeys?: (Uint8Array[]|null); + + /** AddPublisher isActive */ + isActive?: (boolean|null); } - /** Represents a Timestamp. */ - class Timestamp implements ITimestamp { - /** - * Constructs a new Timestamp. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ITimestamp); - - /** Timestamp seconds. */ - public seconds: number | Long; - - /** Timestamp nanos. */ - public nanos: number; - - /** - * Creates a new Timestamp instance using the specified properties. - * @param [properties] Properties to set - * @returns Timestamp instance - */ - public static create( - properties?: google.protobuf.ITimestamp, - ): google.protobuf.Timestamp; - - /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: google.protobuf.ITimestamp, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: google.protobuf.ITimestamp, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a Timestamp message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Timestamp - * @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.Timestamp; - - /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Timestamp - * @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.Timestamp; - - /** - * Verifies a Timestamp 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 Timestamp message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Timestamp - */ - public static fromObject(object: { - [k: string]: any; - }): google.protobuf.Timestamp; - - /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @param message Timestamp - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: google.protobuf.Timestamp, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this Timestamp to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Timestamp - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** Represents an AddPublisher. */ + class AddPublisher implements IAddPublisher { + + /** + * Constructs a new AddPublisher. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IAddPublisher); + + /** AddPublisher publisherId. */ + public publisherId?: (number|null); + + /** AddPublisher name. */ + public name?: (string|null); + + /** AddPublisher publicKeys. */ + public publicKeys: Uint8Array[]; + + /** AddPublisher isActive. */ + public isActive?: (boolean|null); + + /** AddPublisher _publisherId. */ + public _publisherId?: "publisherId"; + + /** AddPublisher _name. */ + public _name?: "name"; + + /** AddPublisher _isActive. */ + public _isActive?: "isActive"; + + /** + * Creates a new AddPublisher instance using the specified properties. + * @param [properties] Properties to set + * @returns AddPublisher instance + */ + public static create(properties?: pyth_lazer_transaction.IAddPublisher): pyth_lazer_transaction.AddPublisher; + + /** + * Encodes the specified AddPublisher message. Does not implicitly {@link pyth_lazer_transaction.AddPublisher.verify|verify} messages. + * @param message AddPublisher message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IAddPublisher, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AddPublisher message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddPublisher.verify|verify} messages. + * @param message AddPublisher message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IAddPublisher, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AddPublisher message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AddPublisher + * @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): pyth_lazer_transaction.AddPublisher; + + /** + * Decodes an AddPublisher message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AddPublisher + * @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)): pyth_lazer_transaction.AddPublisher; + + /** + * Verifies an AddPublisher 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 AddPublisher message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AddPublisher + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.AddPublisher; + + /** + * Creates a plain object from an AddPublisher message. Also converts values to other types if specified. + * @param message AddPublisher + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.AddPublisher, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AddPublisher to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AddPublisher + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Duration. */ - interface IDuration { - /** Duration seconds */ - seconds?: number | Long | null; + /** Properties of an UpdatePublisher. */ + interface IUpdatePublisher { + + /** UpdatePublisher publisherId */ + publisherId?: (number|null); - /** Duration nanos */ - nanos?: number | null; + /** UpdatePublisher setPublisherName */ + setPublisherName?: (pyth_lazer_transaction.ISetPublisherName|null); + + /** UpdatePublisher addPublisherPublicKeys */ + addPublisherPublicKeys?: (pyth_lazer_transaction.IAddPublisherPublicKeys|null); + + /** UpdatePublisher removePublisherPublicKeys */ + removePublisherPublicKeys?: (pyth_lazer_transaction.IRemovePublisherPublicKeys|null); + + /** UpdatePublisher setPublisherPublicKeys */ + setPublisherPublicKeys?: (pyth_lazer_transaction.ISetPublisherPublicKeys|null); + + /** UpdatePublisher setPublisherActive */ + setPublisherActive?: (pyth_lazer_transaction.ISetPublisherActive|null); + + /** UpdatePublisher removePublisher */ + removePublisher?: (google.protobuf.IEmpty|null); } - /** Represents a Duration. */ - class Duration implements IDuration { - /** - * Constructs a new Duration. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDuration); - - /** Duration seconds. */ - public seconds: number | Long; - - /** Duration nanos. */ - public nanos: number; - - /** - * Creates a new Duration instance using the specified properties. - * @param [properties] Properties to set - * @returns Duration instance - */ - public static create( - properties?: google.protobuf.IDuration, - ): google.protobuf.Duration; - - /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: google.protobuf.IDuration, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: google.protobuf.IDuration, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a Duration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Duration - * @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.Duration; - - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Duration - * @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.Duration; - - /** - * Verifies a Duration 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 Duration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Duration - */ - public static fromObject(object: { - [k: string]: any; - }): google.protobuf.Duration; - - /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @param message Duration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: google.protobuf.Duration, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this Duration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Duration - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** Represents an UpdatePublisher. */ + class UpdatePublisher implements IUpdatePublisher { + + /** + * Constructs a new UpdatePublisher. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IUpdatePublisher); + + /** UpdatePublisher publisherId. */ + public publisherId?: (number|null); + + /** UpdatePublisher setPublisherName. */ + public setPublisherName?: (pyth_lazer_transaction.ISetPublisherName|null); + + /** UpdatePublisher addPublisherPublicKeys. */ + public addPublisherPublicKeys?: (pyth_lazer_transaction.IAddPublisherPublicKeys|null); + + /** UpdatePublisher removePublisherPublicKeys. */ + public removePublisherPublicKeys?: (pyth_lazer_transaction.IRemovePublisherPublicKeys|null); + + /** UpdatePublisher setPublisherPublicKeys. */ + public setPublisherPublicKeys?: (pyth_lazer_transaction.ISetPublisherPublicKeys|null); + + /** UpdatePublisher setPublisherActive. */ + public setPublisherActive?: (pyth_lazer_transaction.ISetPublisherActive|null); + + /** UpdatePublisher removePublisher. */ + public removePublisher?: (google.protobuf.IEmpty|null); + + /** UpdatePublisher _publisherId. */ + public _publisherId?: "publisherId"; + + /** UpdatePublisher action. */ + public action?: ("setPublisherName"|"addPublisherPublicKeys"|"removePublisherPublicKeys"|"setPublisherPublicKeys"|"setPublisherActive"|"removePublisher"); + + /** + * Creates a new UpdatePublisher instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdatePublisher instance + */ + public static create(properties?: pyth_lazer_transaction.IUpdatePublisher): pyth_lazer_transaction.UpdatePublisher; + + /** + * Encodes the specified UpdatePublisher message. Does not implicitly {@link pyth_lazer_transaction.UpdatePublisher.verify|verify} messages. + * @param message UpdatePublisher message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IUpdatePublisher, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdatePublisher message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdatePublisher.verify|verify} messages. + * @param message UpdatePublisher message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IUpdatePublisher, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdatePublisher message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdatePublisher + * @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): pyth_lazer_transaction.UpdatePublisher; + + /** + * Decodes an UpdatePublisher message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdatePublisher + * @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)): pyth_lazer_transaction.UpdatePublisher; + + /** + * Verifies an UpdatePublisher 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 UpdatePublisher message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdatePublisher + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.UpdatePublisher; + + /** + * Creates a plain object from an UpdatePublisher message. Also converts values to other types if specified. + * @param message UpdatePublisher + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.UpdatePublisher, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdatePublisher to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdatePublisher + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** 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 }; - - /** - * Gets the default type url for Empty - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** Properties of a SetPublisherName. */ + interface ISetPublisherName { + + /** SetPublisherName name */ + name?: (string|null); + } + + /** Represents a SetPublisherName. */ + class SetPublisherName implements ISetPublisherName { + + /** + * Constructs a new SetPublisherName. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ISetPublisherName); + + /** SetPublisherName name. */ + public name?: (string|null); + + /** SetPublisherName _name. */ + public _name?: "name"; + + /** + * Creates a new SetPublisherName instance using the specified properties. + * @param [properties] Properties to set + * @returns SetPublisherName instance + */ + public static create(properties?: pyth_lazer_transaction.ISetPublisherName): pyth_lazer_transaction.SetPublisherName; + + /** + * Encodes the specified SetPublisherName message. Does not implicitly {@link pyth_lazer_transaction.SetPublisherName.verify|verify} messages. + * @param message SetPublisherName message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.ISetPublisherName, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetPublisherName message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetPublisherName.verify|verify} messages. + * @param message SetPublisherName message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.ISetPublisherName, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetPublisherName message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetPublisherName + * @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): pyth_lazer_transaction.SetPublisherName; + + /** + * Decodes a SetPublisherName message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetPublisherName + * @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)): pyth_lazer_transaction.SetPublisherName; + + /** + * Verifies a SetPublisherName 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 SetPublisherName message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetPublisherName + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.SetPublisherName; + + /** + * Creates a plain object from a SetPublisherName message. Also converts values to other types if specified. + * @param message SetPublisherName + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.SetPublisherName, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetPublisherName to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetPublisherName + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AddPublisherPublicKeys. */ + interface IAddPublisherPublicKeys { + + /** AddPublisherPublicKeys publicKeys */ + publicKeys?: (Uint8Array[]|null); + } + + /** Represents an AddPublisherPublicKeys. */ + class AddPublisherPublicKeys implements IAddPublisherPublicKeys { + + /** + * Constructs a new AddPublisherPublicKeys. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IAddPublisherPublicKeys); + + /** AddPublisherPublicKeys publicKeys. */ + public publicKeys: Uint8Array[]; + + /** + * Creates a new AddPublisherPublicKeys instance using the specified properties. + * @param [properties] Properties to set + * @returns AddPublisherPublicKeys instance + */ + public static create(properties?: pyth_lazer_transaction.IAddPublisherPublicKeys): pyth_lazer_transaction.AddPublisherPublicKeys; + + /** + * Encodes the specified AddPublisherPublicKeys message. Does not implicitly {@link pyth_lazer_transaction.AddPublisherPublicKeys.verify|verify} messages. + * @param message AddPublisherPublicKeys message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IAddPublisherPublicKeys, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AddPublisherPublicKeys message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddPublisherPublicKeys.verify|verify} messages. + * @param message AddPublisherPublicKeys message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IAddPublisherPublicKeys, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AddPublisherPublicKeys message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AddPublisherPublicKeys + * @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): pyth_lazer_transaction.AddPublisherPublicKeys; + + /** + * Decodes an AddPublisherPublicKeys message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AddPublisherPublicKeys + * @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)): pyth_lazer_transaction.AddPublisherPublicKeys; + + /** + * Verifies an AddPublisherPublicKeys 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 AddPublisherPublicKeys message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AddPublisherPublicKeys + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.AddPublisherPublicKeys; + + /** + * Creates a plain object from an AddPublisherPublicKeys message. Also converts values to other types if specified. + * @param message AddPublisherPublicKeys + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.AddPublisherPublicKeys, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AddPublisherPublicKeys to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AddPublisherPublicKeys + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RemovePublisherPublicKeys. */ + interface IRemovePublisherPublicKeys { + + /** RemovePublisherPublicKeys publicKeys */ + publicKeys?: (Uint8Array[]|null); + } + + /** Represents a RemovePublisherPublicKeys. */ + class RemovePublisherPublicKeys implements IRemovePublisherPublicKeys { + + /** + * Constructs a new RemovePublisherPublicKeys. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IRemovePublisherPublicKeys); + + /** RemovePublisherPublicKeys publicKeys. */ + public publicKeys: Uint8Array[]; + + /** + * Creates a new RemovePublisherPublicKeys instance using the specified properties. + * @param [properties] Properties to set + * @returns RemovePublisherPublicKeys instance + */ + public static create(properties?: pyth_lazer_transaction.IRemovePublisherPublicKeys): pyth_lazer_transaction.RemovePublisherPublicKeys; + + /** + * Encodes the specified RemovePublisherPublicKeys message. Does not implicitly {@link pyth_lazer_transaction.RemovePublisherPublicKeys.verify|verify} messages. + * @param message RemovePublisherPublicKeys message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IRemovePublisherPublicKeys, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RemovePublisherPublicKeys message, length delimited. Does not implicitly {@link pyth_lazer_transaction.RemovePublisherPublicKeys.verify|verify} messages. + * @param message RemovePublisherPublicKeys message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IRemovePublisherPublicKeys, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RemovePublisherPublicKeys message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RemovePublisherPublicKeys + * @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): pyth_lazer_transaction.RemovePublisherPublicKeys; + + /** + * Decodes a RemovePublisherPublicKeys message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RemovePublisherPublicKeys + * @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)): pyth_lazer_transaction.RemovePublisherPublicKeys; + + /** + * Verifies a RemovePublisherPublicKeys 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 RemovePublisherPublicKeys message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RemovePublisherPublicKeys + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.RemovePublisherPublicKeys; + + /** + * Creates a plain object from a RemovePublisherPublicKeys message. Also converts values to other types if specified. + * @param message RemovePublisherPublicKeys + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.RemovePublisherPublicKeys, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RemovePublisherPublicKeys to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RemovePublisherPublicKeys + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetPublisherPublicKeys. */ + interface ISetPublisherPublicKeys { + + /** SetPublisherPublicKeys publicKeys */ + publicKeys?: (Uint8Array[]|null); + } + + /** Represents a SetPublisherPublicKeys. */ + class SetPublisherPublicKeys implements ISetPublisherPublicKeys { + + /** + * Constructs a new SetPublisherPublicKeys. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ISetPublisherPublicKeys); + + /** SetPublisherPublicKeys publicKeys. */ + public publicKeys: Uint8Array[]; + + /** + * Creates a new SetPublisherPublicKeys instance using the specified properties. + * @param [properties] Properties to set + * @returns SetPublisherPublicKeys instance + */ + public static create(properties?: pyth_lazer_transaction.ISetPublisherPublicKeys): pyth_lazer_transaction.SetPublisherPublicKeys; + + /** + * Encodes the specified SetPublisherPublicKeys message. Does not implicitly {@link pyth_lazer_transaction.SetPublisherPublicKeys.verify|verify} messages. + * @param message SetPublisherPublicKeys message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.ISetPublisherPublicKeys, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetPublisherPublicKeys message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetPublisherPublicKeys.verify|verify} messages. + * @param message SetPublisherPublicKeys message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.ISetPublisherPublicKeys, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetPublisherPublicKeys message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetPublisherPublicKeys + * @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): pyth_lazer_transaction.SetPublisherPublicKeys; + + /** + * Decodes a SetPublisherPublicKeys message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetPublisherPublicKeys + * @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)): pyth_lazer_transaction.SetPublisherPublicKeys; + + /** + * Verifies a SetPublisherPublicKeys 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 SetPublisherPublicKeys message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetPublisherPublicKeys + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.SetPublisherPublicKeys; + + /** + * Creates a plain object from a SetPublisherPublicKeys message. Also converts values to other types if specified. + * @param message SetPublisherPublicKeys + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.SetPublisherPublicKeys, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetPublisherPublicKeys to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetPublisherPublicKeys + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetPublisherActive. */ + interface ISetPublisherActive { + + /** SetPublisherActive isActive */ + isActive?: (boolean|null); + } + + /** Represents a SetPublisherActive. */ + class SetPublisherActive implements ISetPublisherActive { + + /** + * Constructs a new SetPublisherActive. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ISetPublisherActive); + + /** SetPublisherActive isActive. */ + public isActive?: (boolean|null); + + /** SetPublisherActive _isActive. */ + public _isActive?: "isActive"; + + /** + * Creates a new SetPublisherActive instance using the specified properties. + * @param [properties] Properties to set + * @returns SetPublisherActive instance + */ + public static create(properties?: pyth_lazer_transaction.ISetPublisherActive): pyth_lazer_transaction.SetPublisherActive; + + /** + * Encodes the specified SetPublisherActive message. Does not implicitly {@link pyth_lazer_transaction.SetPublisherActive.verify|verify} messages. + * @param message SetPublisherActive message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.ISetPublisherActive, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetPublisherActive message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetPublisherActive.verify|verify} messages. + * @param message SetPublisherActive message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.ISetPublisherActive, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetPublisherActive message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetPublisherActive + * @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): pyth_lazer_transaction.SetPublisherActive; + + /** + * Decodes a SetPublisherActive message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetPublisherActive + * @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)): pyth_lazer_transaction.SetPublisherActive; + + /** + * Verifies a SetPublisherActive 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 SetPublisherActive message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetPublisherActive + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.SetPublisherActive; + + /** + * Creates a plain object from a SetPublisherActive message. Also converts values to other types if specified. + * @param message SetPublisherActive + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.SetPublisherActive, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetPublisherActive to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetPublisherActive + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AddFeed. */ + interface IAddFeed { + + /** AddFeed feedId */ + feedId?: (number|null); + + /** AddFeed metadata */ + metadata?: (pyth_lazer_transaction.DynamicValue.IMap|null); + + /** AddFeed permissionedPublishers */ + permissionedPublishers?: (number[]|null); + } + + /** Represents an AddFeed. */ + class AddFeed implements IAddFeed { + + /** + * Constructs a new AddFeed. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IAddFeed); + + /** AddFeed feedId. */ + public feedId?: (number|null); + + /** AddFeed metadata. */ + public metadata?: (pyth_lazer_transaction.DynamicValue.IMap|null); + + /** AddFeed permissionedPublishers. */ + public permissionedPublishers: number[]; + + /** AddFeed _feedId. */ + public _feedId?: "feedId"; + + /** AddFeed _metadata. */ + public _metadata?: "metadata"; + + /** + * Creates a new AddFeed instance using the specified properties. + * @param [properties] Properties to set + * @returns AddFeed instance + */ + public static create(properties?: pyth_lazer_transaction.IAddFeed): pyth_lazer_transaction.AddFeed; + + /** + * Encodes the specified AddFeed message. Does not implicitly {@link pyth_lazer_transaction.AddFeed.verify|verify} messages. + * @param message AddFeed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IAddFeed, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AddFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddFeed.verify|verify} messages. + * @param message AddFeed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IAddFeed, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AddFeed message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AddFeed + * @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): pyth_lazer_transaction.AddFeed; + + /** + * Decodes an AddFeed message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AddFeed + * @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)): pyth_lazer_transaction.AddFeed; + + /** + * Verifies an AddFeed 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 AddFeed message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AddFeed + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.AddFeed; + + /** + * Creates a plain object from an AddFeed message. Also converts values to other types if specified. + * @param message AddFeed + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.AddFeed, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AddFeed to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AddFeed + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateFeed. */ + interface IUpdateFeed { + + /** UpdateFeed feedId */ + feedId?: (number|null); + + /** UpdateFeed updateFeedMetadata */ + updateFeedMetadata?: (pyth_lazer_transaction.IUpdateFeedMetadata|null); + + /** UpdateFeed activateFeed */ + activateFeed?: (pyth_lazer_transaction.IActivateFeed|null); + + /** UpdateFeed deactivateFeed */ + deactivateFeed?: (pyth_lazer_transaction.IDeactivateFeed|null); + + /** UpdateFeed removeFeed */ + removeFeed?: (google.protobuf.IEmpty|null); + } + + /** Represents an UpdateFeed. */ + class UpdateFeed implements IUpdateFeed { + + /** + * Constructs a new UpdateFeed. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IUpdateFeed); + + /** UpdateFeed feedId. */ + public feedId?: (number|null); + + /** UpdateFeed updateFeedMetadata. */ + public updateFeedMetadata?: (pyth_lazer_transaction.IUpdateFeedMetadata|null); + + /** UpdateFeed activateFeed. */ + public activateFeed?: (pyth_lazer_transaction.IActivateFeed|null); + + /** UpdateFeed deactivateFeed. */ + public deactivateFeed?: (pyth_lazer_transaction.IDeactivateFeed|null); + + /** UpdateFeed removeFeed. */ + public removeFeed?: (google.protobuf.IEmpty|null); + + /** UpdateFeed _feedId. */ + public _feedId?: "feedId"; + + /** UpdateFeed action. */ + public action?: ("updateFeedMetadata"|"activateFeed"|"deactivateFeed"|"removeFeed"); + + /** + * Creates a new UpdateFeed instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateFeed instance + */ + public static create(properties?: pyth_lazer_transaction.IUpdateFeed): pyth_lazer_transaction.UpdateFeed; + + /** + * Encodes the specified UpdateFeed message. Does not implicitly {@link pyth_lazer_transaction.UpdateFeed.verify|verify} messages. + * @param message UpdateFeed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IUpdateFeed, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdateFeed.verify|verify} messages. + * @param message UpdateFeed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IUpdateFeed, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateFeed message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateFeed + * @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): pyth_lazer_transaction.UpdateFeed; + + /** + * Decodes an UpdateFeed message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateFeed + * @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)): pyth_lazer_transaction.UpdateFeed; + + /** + * Verifies an UpdateFeed 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 UpdateFeed message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateFeed + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.UpdateFeed; + + /** + * Creates a plain object from an UpdateFeed message. Also converts values to other types if specified. + * @param message UpdateFeed + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.UpdateFeed, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateFeed to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateFeed + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateFeedMetadata. */ + interface IUpdateFeedMetadata { + + /** UpdateFeedMetadata name */ + name?: (string|null); + + /** UpdateFeedMetadata value */ + value?: (pyth_lazer_transaction.IDynamicValue|null); + } + + /** Represents an UpdateFeedMetadata. */ + class UpdateFeedMetadata implements IUpdateFeedMetadata { + + /** + * Constructs a new UpdateFeedMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IUpdateFeedMetadata); + + /** UpdateFeedMetadata name. */ + public name?: (string|null); + + /** UpdateFeedMetadata value. */ + public value?: (pyth_lazer_transaction.IDynamicValue|null); + + /** UpdateFeedMetadata _name. */ + public _name?: "name"; + + /** UpdateFeedMetadata _value. */ + public _value?: "value"; + + /** + * Creates a new UpdateFeedMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateFeedMetadata instance + */ + public static create(properties?: pyth_lazer_transaction.IUpdateFeedMetadata): pyth_lazer_transaction.UpdateFeedMetadata; + + /** + * Encodes the specified UpdateFeedMetadata message. Does not implicitly {@link pyth_lazer_transaction.UpdateFeedMetadata.verify|verify} messages. + * @param message UpdateFeedMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IUpdateFeedMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateFeedMetadata message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdateFeedMetadata.verify|verify} messages. + * @param message UpdateFeedMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IUpdateFeedMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateFeedMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateFeedMetadata + * @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): pyth_lazer_transaction.UpdateFeedMetadata; + + /** + * Decodes an UpdateFeedMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateFeedMetadata + * @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)): pyth_lazer_transaction.UpdateFeedMetadata; + + /** + * Verifies an UpdateFeedMetadata 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 UpdateFeedMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateFeedMetadata + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.UpdateFeedMetadata; + + /** + * Creates a plain object from an UpdateFeedMetadata message. Also converts values to other types if specified. + * @param message UpdateFeedMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.UpdateFeedMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateFeedMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateFeedMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ActivateFeed. */ + interface IActivateFeed { + + /** ActivateFeed activationTimestamp */ + activationTimestamp?: (google.protobuf.ITimestamp|null); + } + + /** Represents an ActivateFeed. */ + class ActivateFeed implements IActivateFeed { + + /** + * Constructs a new ActivateFeed. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IActivateFeed); + + /** ActivateFeed activationTimestamp. */ + public activationTimestamp?: (google.protobuf.ITimestamp|null); + + /** ActivateFeed _activationTimestamp. */ + public _activationTimestamp?: "activationTimestamp"; + + /** + * Creates a new ActivateFeed instance using the specified properties. + * @param [properties] Properties to set + * @returns ActivateFeed instance + */ + public static create(properties?: pyth_lazer_transaction.IActivateFeed): pyth_lazer_transaction.ActivateFeed; + + /** + * Encodes the specified ActivateFeed message. Does not implicitly {@link pyth_lazer_transaction.ActivateFeed.verify|verify} messages. + * @param message ActivateFeed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IActivateFeed, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ActivateFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ActivateFeed.verify|verify} messages. + * @param message ActivateFeed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IActivateFeed, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ActivateFeed message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ActivateFeed + * @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): pyth_lazer_transaction.ActivateFeed; + + /** + * Decodes an ActivateFeed message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ActivateFeed + * @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)): pyth_lazer_transaction.ActivateFeed; + + /** + * Verifies an ActivateFeed 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 ActivateFeed message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ActivateFeed + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.ActivateFeed; + + /** + * Creates a plain object from an ActivateFeed message. Also converts values to other types if specified. + * @param message ActivateFeed + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.ActivateFeed, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ActivateFeed to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ActivateFeed + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeactivateFeed. */ + interface IDeactivateFeed { + + /** DeactivateFeed deactivationTimestamp */ + deactivationTimestamp?: (google.protobuf.ITimestamp|null); + } + + /** Represents a DeactivateFeed. */ + class DeactivateFeed implements IDeactivateFeed { + + /** + * Constructs a new DeactivateFeed. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IDeactivateFeed); + + /** DeactivateFeed deactivationTimestamp. */ + public deactivationTimestamp?: (google.protobuf.ITimestamp|null); + + /** DeactivateFeed _deactivationTimestamp. */ + public _deactivationTimestamp?: "deactivationTimestamp"; + + /** + * Creates a new DeactivateFeed instance using the specified properties. + * @param [properties] Properties to set + * @returns DeactivateFeed instance + */ + public static create(properties?: pyth_lazer_transaction.IDeactivateFeed): pyth_lazer_transaction.DeactivateFeed; + + /** + * Encodes the specified DeactivateFeed message. Does not implicitly {@link pyth_lazer_transaction.DeactivateFeed.verify|verify} messages. + * @param message DeactivateFeed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IDeactivateFeed, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeactivateFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DeactivateFeed.verify|verify} messages. + * @param message DeactivateFeed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IDeactivateFeed, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeactivateFeed message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeactivateFeed + * @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): pyth_lazer_transaction.DeactivateFeed; + + /** + * Decodes a DeactivateFeed message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeactivateFeed + * @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)): pyth_lazer_transaction.DeactivateFeed; + + /** + * Verifies a DeactivateFeed 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 DeactivateFeed message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeactivateFeed + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.DeactivateFeed; + + /** + * Creates a plain object from a DeactivateFeed message. Also converts values to other types if specified. + * @param message DeactivateFeed + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.DeactivateFeed, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeactivateFeed to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeactivateFeed + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DynamicValue. */ + interface IDynamicValue { + + /** DynamicValue stringValue */ + stringValue?: (string|null); + + /** DynamicValue doubleValue */ + doubleValue?: (number|null); + + /** DynamicValue uintValue */ + uintValue?: (number|Long|null); + + /** DynamicValue intValue */ + intValue?: (number|Long|null); + + /** DynamicValue boolValue */ + boolValue?: (boolean|null); + + /** DynamicValue bytesValue */ + bytesValue?: (Uint8Array|null); + + /** DynamicValue durationValue */ + durationValue?: (google.protobuf.IDuration|null); + + /** DynamicValue timestampValue */ + timestampValue?: (google.protobuf.ITimestamp|null); + + /** DynamicValue list */ + list?: (pyth_lazer_transaction.DynamicValue.IList|null); + + /** DynamicValue map */ + map?: (pyth_lazer_transaction.DynamicValue.IMap|null); + } + + /** Represents a DynamicValue. */ + class DynamicValue implements IDynamicValue { + + /** + * Constructs a new DynamicValue. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IDynamicValue); + + /** DynamicValue stringValue. */ + public stringValue?: (string|null); + + /** DynamicValue doubleValue. */ + public doubleValue?: (number|null); + + /** DynamicValue uintValue. */ + public uintValue?: (number|Long|null); + + /** DynamicValue intValue. */ + public intValue?: (number|Long|null); + + /** DynamicValue boolValue. */ + public boolValue?: (boolean|null); + + /** DynamicValue bytesValue. */ + public bytesValue?: (Uint8Array|null); + + /** DynamicValue durationValue. */ + public durationValue?: (google.protobuf.IDuration|null); + + /** DynamicValue timestampValue. */ + public timestampValue?: (google.protobuf.ITimestamp|null); + + /** DynamicValue list. */ + public list?: (pyth_lazer_transaction.DynamicValue.IList|null); + + /** DynamicValue map. */ + public map?: (pyth_lazer_transaction.DynamicValue.IMap|null); + + /** DynamicValue value. */ + public value?: ("stringValue"|"doubleValue"|"uintValue"|"intValue"|"boolValue"|"bytesValue"|"durationValue"|"timestampValue"|"list"|"map"); + + /** + * Creates a new DynamicValue instance using the specified properties. + * @param [properties] Properties to set + * @returns DynamicValue instance + */ + public static create(properties?: pyth_lazer_transaction.IDynamicValue): pyth_lazer_transaction.DynamicValue; + + /** + * Encodes the specified DynamicValue message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.verify|verify} messages. + * @param message DynamicValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.IDynamicValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DynamicValue message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.verify|verify} messages. + * @param message DynamicValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.IDynamicValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DynamicValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DynamicValue + * @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): pyth_lazer_transaction.DynamicValue; + + /** + * Decodes a DynamicValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DynamicValue + * @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)): pyth_lazer_transaction.DynamicValue; + + /** + * Verifies a DynamicValue 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 DynamicValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DynamicValue + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.DynamicValue; + + /** + * Creates a plain object from a DynamicValue message. Also converts values to other types if specified. + * @param message DynamicValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.DynamicValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DynamicValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DynamicValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DynamicValue { + + /** Properties of a List. */ + interface IList { + + /** List items */ + items?: (pyth_lazer_transaction.IDynamicValue[]|null); + } + + /** Represents a List. */ + class List implements IList { + + /** + * Constructs a new List. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.DynamicValue.IList); + + /** List items. */ + public items: pyth_lazer_transaction.IDynamicValue[]; + + /** + * Creates a new List instance using the specified properties. + * @param [properties] Properties to set + * @returns List instance + */ + public static create(properties?: pyth_lazer_transaction.DynamicValue.IList): pyth_lazer_transaction.DynamicValue.List; + + /** + * Encodes the specified List message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.List.verify|verify} messages. + * @param message List message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.DynamicValue.IList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified List message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.List.verify|verify} messages. + * @param message List message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.DynamicValue.IList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a List message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns List + * @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): pyth_lazer_transaction.DynamicValue.List; + + /** + * Decodes a List message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns List + * @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)): pyth_lazer_transaction.DynamicValue.List; + + /** + * Verifies a List 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 List message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns List + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.DynamicValue.List; + + /** + * Creates a plain object from a List message. Also converts values to other types if specified. + * @param message List + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.DynamicValue.List, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this List to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for List + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MapItem. */ + interface IMapItem { + + /** MapItem key */ + key?: (string|null); + + /** MapItem value */ + value?: (pyth_lazer_transaction.IDynamicValue|null); + } + + /** Represents a MapItem. */ + class MapItem implements IMapItem { + + /** + * Constructs a new MapItem. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.DynamicValue.IMapItem); + + /** MapItem key. */ + public key?: (string|null); + + /** MapItem value. */ + public value?: (pyth_lazer_transaction.IDynamicValue|null); + + /** MapItem _key. */ + public _key?: "key"; + + /** MapItem _value. */ + public _value?: "value"; + + /** + * Creates a new MapItem instance using the specified properties. + * @param [properties] Properties to set + * @returns MapItem instance + */ + public static create(properties?: pyth_lazer_transaction.DynamicValue.IMapItem): pyth_lazer_transaction.DynamicValue.MapItem; + + /** + * Encodes the specified MapItem message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.MapItem.verify|verify} messages. + * @param message MapItem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.DynamicValue.IMapItem, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MapItem message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.MapItem.verify|verify} messages. + * @param message MapItem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.DynamicValue.IMapItem, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MapItem message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MapItem + * @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): pyth_lazer_transaction.DynamicValue.MapItem; + + /** + * Decodes a MapItem message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MapItem + * @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)): pyth_lazer_transaction.DynamicValue.MapItem; + + /** + * Verifies a MapItem 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 MapItem message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MapItem + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.DynamicValue.MapItem; + + /** + * Creates a plain object from a MapItem message. Also converts values to other types if specified. + * @param message MapItem + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.DynamicValue.MapItem, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MapItem to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MapItem + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Map. */ + interface IMap { + + /** Map items */ + items?: (pyth_lazer_transaction.DynamicValue.IMapItem[]|null); + } + + /** Represents a Map. */ + class Map implements IMap { + + /** + * Constructs a new Map. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.DynamicValue.IMap); + + /** Map items. */ + public items: pyth_lazer_transaction.DynamicValue.IMapItem[]; + + /** + * Creates a new Map instance using the specified properties. + * @param [properties] Properties to set + * @returns Map instance + */ + public static create(properties?: pyth_lazer_transaction.DynamicValue.IMap): pyth_lazer_transaction.DynamicValue.Map; + + /** + * Encodes the specified Map message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.Map.verify|verify} messages. + * @param message Map message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: pyth_lazer_transaction.DynamicValue.IMap, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Map message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.Map.verify|verify} messages. + * @param message Map message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: pyth_lazer_transaction.DynamicValue.IMap, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Map message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Map + * @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): pyth_lazer_transaction.DynamicValue.Map; + + /** + * Decodes a Map message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Map + * @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)): pyth_lazer_transaction.DynamicValue.Map; + + /** + * Verifies a Map 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 Map message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Map + */ + public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.DynamicValue.Map; + + /** + * Creates a plain object from a Map message. Also converts values to other types if specified. + * @param message Map + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: pyth_lazer_transaction.DynamicValue.Map, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Map to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Map + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } +} + +/** Namespace google. */ +export namespace google { + + /** Namespace protobuf. */ + namespace protobuf { + + /** Properties of a Timestamp. */ + interface ITimestamp { + + /** Timestamp seconds */ + seconds?: (number|Long|null); + + /** Timestamp nanos */ + nanos?: (number|null); + } + + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { + + /** + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ITimestamp); + + /** Timestamp seconds. */ + public seconds: (number|Long); + + /** Timestamp nanos. */ + public nanos: number; + + /** + * Creates a new Timestamp instance using the specified properties. + * @param [properties] Properties to set + * @returns Timestamp instance + */ + public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Timestamp + * @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.Timestamp; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Timestamp + * @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.Timestamp; + + /** + * Verifies a Timestamp 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 Timestamp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Timestamp + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @param message Timestamp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Timestamp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Timestamp + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Duration. */ + interface IDuration { + + /** Duration seconds */ + seconds?: (number|Long|null); + + /** Duration nanos */ + nanos?: (number|null); + } + + /** Represents a Duration. */ + class Duration implements IDuration { + + /** + * Constructs a new Duration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDuration); + + /** Duration seconds. */ + public seconds: (number|Long); + + /** Duration nanos. */ + public nanos: number; + + /** + * Creates a new Duration instance using the specified properties. + * @param [properties] Properties to set + * @returns Duration instance + */ + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Duration + * @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.Duration; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Duration + * @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.Duration; + + /** + * Verifies a Duration 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 Duration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Duration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @param message Duration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Duration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Duration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** 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 }; + + /** + * Gets the default type url for Empty + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } - } } From 555df188abc4ba152d096aec2560eb0d88a4aac5 Mon Sep 17 00:00:00 2001 From: Daniel Chew Date: Thu, 29 May 2025 21:48:00 +0900 Subject: [PATCH 22/27] fix: format --- .../src/generated/governance_instruction.d.ts | 8341 +++++++++-------- 1 file changed, 4469 insertions(+), 3872 deletions(-) diff --git a/lazer/state_sdk/js/src/generated/governance_instruction.d.ts b/lazer/state_sdk/js/src/generated/governance_instruction.d.ts index 66c941628b..144f35e0d0 100644 --- a/lazer/state_sdk/js/src/generated/governance_instruction.d.ts +++ b/lazer/state_sdk/js/src/generated/governance_instruction.d.ts @@ -2,3924 +2,4521 @@ import * as $protobuf from "protobufjs"; import Long = require("long"); /** Namespace pyth_lazer_transaction. */ export namespace pyth_lazer_transaction { - - /** Properties of a GovernanceInstruction. */ - interface IGovernanceInstruction { - - /** GovernanceInstruction directives */ - directives?: (pyth_lazer_transaction.IGovernanceDirective[]|null); - - /** GovernanceInstruction minExecutionTimestamp */ - minExecutionTimestamp?: (google.protobuf.ITimestamp|null); - - /** GovernanceInstruction maxExecutionTimestamp */ - maxExecutionTimestamp?: (google.protobuf.ITimestamp|null); - - /** GovernanceInstruction governanceSequenceNo */ - governanceSequenceNo?: (number|null); - } - - /** Represents a GovernanceInstruction. */ - class GovernanceInstruction implements IGovernanceInstruction { - - /** - * Constructs a new GovernanceInstruction. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IGovernanceInstruction); - - /** GovernanceInstruction directives. */ - public directives: pyth_lazer_transaction.IGovernanceDirective[]; - - /** GovernanceInstruction minExecutionTimestamp. */ - public minExecutionTimestamp?: (google.protobuf.ITimestamp|null); - - /** GovernanceInstruction maxExecutionTimestamp. */ - public maxExecutionTimestamp?: (google.protobuf.ITimestamp|null); - - /** GovernanceInstruction governanceSequenceNo. */ - public governanceSequenceNo?: (number|null); - - /** GovernanceInstruction _minExecutionTimestamp. */ - public _minExecutionTimestamp?: "minExecutionTimestamp"; - - /** GovernanceInstruction _maxExecutionTimestamp. */ - public _maxExecutionTimestamp?: "maxExecutionTimestamp"; - - /** GovernanceInstruction _governanceSequenceNo. */ - public _governanceSequenceNo?: "governanceSequenceNo"; - - /** - * Creates a new GovernanceInstruction instance using the specified properties. - * @param [properties] Properties to set - * @returns GovernanceInstruction instance - */ - public static create(properties?: pyth_lazer_transaction.IGovernanceInstruction): pyth_lazer_transaction.GovernanceInstruction; - - /** - * Encodes the specified GovernanceInstruction message. Does not implicitly {@link pyth_lazer_transaction.GovernanceInstruction.verify|verify} messages. - * @param message GovernanceInstruction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IGovernanceInstruction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GovernanceInstruction message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceInstruction.verify|verify} messages. - * @param message GovernanceInstruction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IGovernanceInstruction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GovernanceInstruction message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GovernanceInstruction - * @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): pyth_lazer_transaction.GovernanceInstruction; - - /** - * Decodes a GovernanceInstruction message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GovernanceInstruction - * @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)): pyth_lazer_transaction.GovernanceInstruction; - - /** - * Verifies a GovernanceInstruction 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 GovernanceInstruction message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GovernanceInstruction - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.GovernanceInstruction; - - /** - * Creates a plain object from a GovernanceInstruction message. Also converts values to other types if specified. - * @param message GovernanceInstruction - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.GovernanceInstruction, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GovernanceInstruction to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GovernanceInstruction - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ShardFilter. */ - interface IShardFilter { - - /** ShardFilter allShards */ - allShards?: (google.protobuf.IEmpty|null); - - /** ShardFilter shardNames */ - shardNames?: (pyth_lazer_transaction.ShardFilter.IShardNames|null); - - /** ShardFilter shardGroups */ - shardGroups?: (pyth_lazer_transaction.ShardFilter.IShardGroups|null); - } - - /** Represents a ShardFilter. */ - class ShardFilter implements IShardFilter { - - /** - * Constructs a new ShardFilter. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IShardFilter); - - /** ShardFilter allShards. */ - public allShards?: (google.protobuf.IEmpty|null); - - /** ShardFilter shardNames. */ - public shardNames?: (pyth_lazer_transaction.ShardFilter.IShardNames|null); - - /** ShardFilter shardGroups. */ - public shardGroups?: (pyth_lazer_transaction.ShardFilter.IShardGroups|null); - - /** ShardFilter filter. */ - public filter?: ("allShards"|"shardNames"|"shardGroups"); - - /** - * Creates a new ShardFilter instance using the specified properties. - * @param [properties] Properties to set - * @returns ShardFilter instance - */ - public static create(properties?: pyth_lazer_transaction.IShardFilter): pyth_lazer_transaction.ShardFilter; - - /** - * Encodes the specified ShardFilter message. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.verify|verify} messages. - * @param message ShardFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IShardFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ShardFilter message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.verify|verify} messages. - * @param message ShardFilter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IShardFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ShardFilter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ShardFilter - * @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): pyth_lazer_transaction.ShardFilter; - - /** - * Decodes a ShardFilter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ShardFilter - * @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)): pyth_lazer_transaction.ShardFilter; - - /** - * Verifies a ShardFilter 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 ShardFilter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ShardFilter - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.ShardFilter; - - /** - * Creates a plain object from a ShardFilter message. Also converts values to other types if specified. - * @param message ShardFilter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.ShardFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ShardFilter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ShardFilter - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ShardFilter { - - /** Properties of a ShardNames. */ - interface IShardNames { - - /** ShardNames shardNames */ - shardNames?: (string[]|null); - } - - /** Represents a ShardNames. */ - class ShardNames implements IShardNames { - - /** - * Constructs a new ShardNames. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.ShardFilter.IShardNames); - - /** ShardNames shardNames. */ - public shardNames: string[]; - - /** - * Creates a new ShardNames instance using the specified properties. - * @param [properties] Properties to set - * @returns ShardNames instance - */ - public static create(properties?: pyth_lazer_transaction.ShardFilter.IShardNames): pyth_lazer_transaction.ShardFilter.ShardNames; - - /** - * Encodes the specified ShardNames message. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardNames.verify|verify} messages. - * @param message ShardNames message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.ShardFilter.IShardNames, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ShardNames message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardNames.verify|verify} messages. - * @param message ShardNames message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.ShardFilter.IShardNames, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ShardNames message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ShardNames - * @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): pyth_lazer_transaction.ShardFilter.ShardNames; - - /** - * Decodes a ShardNames message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ShardNames - * @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)): pyth_lazer_transaction.ShardFilter.ShardNames; - - /** - * Verifies a ShardNames 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 ShardNames message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ShardNames - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.ShardFilter.ShardNames; - - /** - * Creates a plain object from a ShardNames message. Also converts values to other types if specified. - * @param message ShardNames - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.ShardFilter.ShardNames, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ShardNames to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ShardNames - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ShardGroups. */ - interface IShardGroups { - - /** ShardGroups shardGroups */ - shardGroups?: (string[]|null); - } - - /** Represents a ShardGroups. */ - class ShardGroups implements IShardGroups { - - /** - * Constructs a new ShardGroups. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.ShardFilter.IShardGroups); - - /** ShardGroups shardGroups. */ - public shardGroups: string[]; - - /** - * Creates a new ShardGroups instance using the specified properties. - * @param [properties] Properties to set - * @returns ShardGroups instance - */ - public static create(properties?: pyth_lazer_transaction.ShardFilter.IShardGroups): pyth_lazer_transaction.ShardFilter.ShardGroups; - - /** - * Encodes the specified ShardGroups message. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardGroups.verify|verify} messages. - * @param message ShardGroups message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.ShardFilter.IShardGroups, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ShardGroups message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardGroups.verify|verify} messages. - * @param message ShardGroups message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.ShardFilter.IShardGroups, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ShardGroups message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ShardGroups - * @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): pyth_lazer_transaction.ShardFilter.ShardGroups; - - /** - * Decodes a ShardGroups message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ShardGroups - * @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)): pyth_lazer_transaction.ShardFilter.ShardGroups; - - /** - * Verifies a ShardGroups 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 ShardGroups message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ShardGroups - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.ShardFilter.ShardGroups; - - /** - * Creates a plain object from a ShardGroups message. Also converts values to other types if specified. - * @param message ShardGroups - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.ShardFilter.ShardGroups, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ShardGroups to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ShardGroups - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a GovernanceDirective. */ - interface IGovernanceDirective { - - /** GovernanceDirective shardFilter */ - shardFilter?: (pyth_lazer_transaction.IShardFilter|null); - - /** GovernanceDirective createShard */ - createShard?: (pyth_lazer_transaction.ICreateShard|null); - - /** GovernanceDirective addGovernanceSource */ - addGovernanceSource?: (pyth_lazer_transaction.IAddGovernanceSource|null); - - /** GovernanceDirective updateGovernanceSource */ - updateGovernanceSource?: (pyth_lazer_transaction.IUpdateGovernanceSource|null); - - /** GovernanceDirective setShardName */ - setShardName?: (pyth_lazer_transaction.ISetShardName|null); - - /** GovernanceDirective setShardGroup */ - setShardGroup?: (pyth_lazer_transaction.ISetShardGroup|null); - - /** GovernanceDirective resetLastSequenceNo */ - resetLastSequenceNo?: (pyth_lazer_transaction.IResetLastSequenceNo|null); - - /** GovernanceDirective addPublisher */ - addPublisher?: (pyth_lazer_transaction.IAddPublisher|null); - - /** GovernanceDirective updatePublisher */ - updatePublisher?: (pyth_lazer_transaction.IUpdatePublisher|null); - - /** GovernanceDirective addFeed */ - addFeed?: (pyth_lazer_transaction.IAddFeed|null); - - /** GovernanceDirective updateFeed */ - updateFeed?: (pyth_lazer_transaction.IUpdateFeed|null); - } - - /** Represents a GovernanceDirective. */ - class GovernanceDirective implements IGovernanceDirective { - - /** - * Constructs a new GovernanceDirective. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IGovernanceDirective); - - /** GovernanceDirective shardFilter. */ - public shardFilter?: (pyth_lazer_transaction.IShardFilter|null); - - /** GovernanceDirective createShard. */ - public createShard?: (pyth_lazer_transaction.ICreateShard|null); - - /** GovernanceDirective addGovernanceSource. */ - public addGovernanceSource?: (pyth_lazer_transaction.IAddGovernanceSource|null); - - /** GovernanceDirective updateGovernanceSource. */ - public updateGovernanceSource?: (pyth_lazer_transaction.IUpdateGovernanceSource|null); - - /** GovernanceDirective setShardName. */ - public setShardName?: (pyth_lazer_transaction.ISetShardName|null); - - /** GovernanceDirective setShardGroup. */ - public setShardGroup?: (pyth_lazer_transaction.ISetShardGroup|null); - - /** GovernanceDirective resetLastSequenceNo. */ - public resetLastSequenceNo?: (pyth_lazer_transaction.IResetLastSequenceNo|null); - - /** GovernanceDirective addPublisher. */ - public addPublisher?: (pyth_lazer_transaction.IAddPublisher|null); - - /** GovernanceDirective updatePublisher. */ - public updatePublisher?: (pyth_lazer_transaction.IUpdatePublisher|null); - - /** GovernanceDirective addFeed. */ - public addFeed?: (pyth_lazer_transaction.IAddFeed|null); - - /** GovernanceDirective updateFeed. */ - public updateFeed?: (pyth_lazer_transaction.IUpdateFeed|null); - - /** GovernanceDirective _shardFilter. */ - public _shardFilter?: "shardFilter"; - - /** GovernanceDirective action. */ - public action?: ("createShard"|"addGovernanceSource"|"updateGovernanceSource"|"setShardName"|"setShardGroup"|"resetLastSequenceNo"|"addPublisher"|"updatePublisher"|"addFeed"|"updateFeed"); - - /** - * Creates a new GovernanceDirective instance using the specified properties. - * @param [properties] Properties to set - * @returns GovernanceDirective instance - */ - public static create(properties?: pyth_lazer_transaction.IGovernanceDirective): pyth_lazer_transaction.GovernanceDirective; - - /** - * Encodes the specified GovernanceDirective message. Does not implicitly {@link pyth_lazer_transaction.GovernanceDirective.verify|verify} messages. - * @param message GovernanceDirective message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IGovernanceDirective, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GovernanceDirective message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceDirective.verify|verify} messages. - * @param message GovernanceDirective message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IGovernanceDirective, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GovernanceDirective message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GovernanceDirective - * @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): pyth_lazer_transaction.GovernanceDirective; - - /** - * Decodes a GovernanceDirective message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GovernanceDirective - * @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)): pyth_lazer_transaction.GovernanceDirective; - - /** - * Verifies a GovernanceDirective 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 GovernanceDirective message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GovernanceDirective - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.GovernanceDirective; - - /** - * Creates a plain object from a GovernanceDirective message. Also converts values to other types if specified. - * @param message GovernanceDirective - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.GovernanceDirective, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GovernanceDirective to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GovernanceDirective - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Permissions. */ - interface IPermissions { - - /** Permissions allActions */ - allActions?: (boolean|null); - - /** Permissions shardActions */ - shardActions?: (pyth_lazer_transaction.Permissions.ShardAction[]|null); - - /** Permissions allUpdateGovernanceSourceActions */ - allUpdateGovernanceSourceActions?: (boolean|null); - - /** Permissions updateGovernanceSourceActions */ - updateGovernanceSourceActions?: (pyth_lazer_transaction.Permissions.UpdateGovernanceSourceAction[]|null); - - /** Permissions allUpdatePublisherAction */ - allUpdatePublisherAction?: (boolean|null); - - /** Permissions updatePublisherActions */ - updatePublisherActions?: (pyth_lazer_transaction.Permissions.UpdatePublisherAction[]|null); - - /** Permissions allUpdateFeedActions */ - allUpdateFeedActions?: (boolean|null); - - /** Permissions updateFeedActions */ - updateFeedActions?: (pyth_lazer_transaction.Permissions.UpdateFeedAction[]|null); - } - - /** Represents a Permissions. */ - class Permissions implements IPermissions { - - /** - * Constructs a new Permissions. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IPermissions); - - /** Permissions allActions. */ - public allActions?: (boolean|null); - - /** Permissions shardActions. */ - public shardActions: pyth_lazer_transaction.Permissions.ShardAction[]; - - /** Permissions allUpdateGovernanceSourceActions. */ - public allUpdateGovernanceSourceActions?: (boolean|null); - - /** Permissions updateGovernanceSourceActions. */ - public updateGovernanceSourceActions: pyth_lazer_transaction.Permissions.UpdateGovernanceSourceAction[]; - - /** Permissions allUpdatePublisherAction. */ - public allUpdatePublisherAction?: (boolean|null); - - /** Permissions updatePublisherActions. */ - public updatePublisherActions: pyth_lazer_transaction.Permissions.UpdatePublisherAction[]; - - /** Permissions allUpdateFeedActions. */ - public allUpdateFeedActions?: (boolean|null); - - /** Permissions updateFeedActions. */ - public updateFeedActions: pyth_lazer_transaction.Permissions.UpdateFeedAction[]; - - /** Permissions _allActions. */ - public _allActions?: "allActions"; - - /** Permissions _allUpdateGovernanceSourceActions. */ - public _allUpdateGovernanceSourceActions?: "allUpdateGovernanceSourceActions"; - - /** Permissions _allUpdatePublisherAction. */ - public _allUpdatePublisherAction?: "allUpdatePublisherAction"; - - /** Permissions _allUpdateFeedActions. */ - public _allUpdateFeedActions?: "allUpdateFeedActions"; - - /** - * Creates a new Permissions instance using the specified properties. - * @param [properties] Properties to set - * @returns Permissions instance - */ - public static create(properties?: pyth_lazer_transaction.IPermissions): pyth_lazer_transaction.Permissions; - - /** - * Encodes the specified Permissions message. Does not implicitly {@link pyth_lazer_transaction.Permissions.verify|verify} messages. - * @param message Permissions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IPermissions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Permissions message, length delimited. Does not implicitly {@link pyth_lazer_transaction.Permissions.verify|verify} messages. - * @param message Permissions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IPermissions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Permissions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Permissions - * @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): pyth_lazer_transaction.Permissions; - - /** - * Decodes a Permissions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Permissions - * @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)): pyth_lazer_transaction.Permissions; - - /** - * Verifies a Permissions 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 Permissions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Permissions - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.Permissions; - - /** - * Creates a plain object from a Permissions message. Also converts values to other types if specified. - * @param message Permissions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.Permissions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Permissions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Permissions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Permissions { - - /** ShardAction enum. */ - enum ShardAction { - SHARD_ACTION_UNSPECIFIED = 0, - CREATE_SHARD = 101, - ADD_GOVERNANCE_SOURCE = 102, - UPDATE_GOVERNANCE_SOURCE = 103, - SET_SHARD_NAME = 104, - SET_SHARD_GROUP = 105, - RESET_LAST_SEQUENCE_NO = 106, - ADD_PUBLISHER = 107, - ADD_FEED = 109 - } - - /** UpdateGovernanceSourceAction enum. */ - enum UpdateGovernanceSourceAction { - UPDATE_GOVERNANCE_SOURCE_ACTION_UNSPECIFIED = 0, - SET_GOVERNANCE_SOURCE_PERMISSIONS = 101, - REMOVE_GOVERNANCE_SOURCE = 199 - } - - /** UpdatePublisherAction enum. */ - enum UpdatePublisherAction { - UPDATE_PUBLISHER_ACTION_UNSPECIFIED = 0, - SET_PUBLISHER_NAME = 101, - ADD_PUBLISHER_PUBLIC_KEYS = 102, - REMOVE_PUBLISHER_PUBLIC_KEYS = 103, - SET_PUBLISHER_PUBLIC_KEYS = 104, - SET_PUBLISHER_ACTIVE = 105, - REMOVE_PUBLISHER = 199 - } - - /** UpdateFeedAction enum. */ - enum UpdateFeedAction { - UPDATE_FEED_ACTION_UNSPECIFIED = 0, - UPDATE_FEED_METADATA = 101, - ACTIVATE_FEED = 102, - DEACTIVATE_FEED = 103, - REMOVE_FEED = 199 - } + /** Properties of a GovernanceInstruction. */ + interface IGovernanceInstruction { + /** GovernanceInstruction directives */ + directives?: pyth_lazer_transaction.IGovernanceDirective[] | null; + + /** GovernanceInstruction minExecutionTimestamp */ + minExecutionTimestamp?: google.protobuf.ITimestamp | null; + + /** GovernanceInstruction maxExecutionTimestamp */ + maxExecutionTimestamp?: google.protobuf.ITimestamp | null; + + /** GovernanceInstruction governanceSequenceNo */ + governanceSequenceNo?: number | null; + } + + /** Represents a GovernanceInstruction. */ + class GovernanceInstruction implements IGovernanceInstruction { + /** + * Constructs a new GovernanceInstruction. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IGovernanceInstruction); + + /** GovernanceInstruction directives. */ + public directives: pyth_lazer_transaction.IGovernanceDirective[]; + + /** GovernanceInstruction minExecutionTimestamp. */ + public minExecutionTimestamp?: google.protobuf.ITimestamp | null; + + /** GovernanceInstruction maxExecutionTimestamp. */ + public maxExecutionTimestamp?: google.protobuf.ITimestamp | null; + + /** GovernanceInstruction governanceSequenceNo. */ + public governanceSequenceNo?: number | null; + + /** GovernanceInstruction _minExecutionTimestamp. */ + public _minExecutionTimestamp?: "minExecutionTimestamp"; + + /** GovernanceInstruction _maxExecutionTimestamp. */ + public _maxExecutionTimestamp?: "maxExecutionTimestamp"; + + /** GovernanceInstruction _governanceSequenceNo. */ + public _governanceSequenceNo?: "governanceSequenceNo"; + + /** + * Creates a new GovernanceInstruction instance using the specified properties. + * @param [properties] Properties to set + * @returns GovernanceInstruction instance + */ + public static create( + properties?: pyth_lazer_transaction.IGovernanceInstruction, + ): pyth_lazer_transaction.GovernanceInstruction; + + /** + * Encodes the specified GovernanceInstruction message. Does not implicitly {@link pyth_lazer_transaction.GovernanceInstruction.verify|verify} messages. + * @param message GovernanceInstruction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IGovernanceInstruction, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified GovernanceInstruction message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceInstruction.verify|verify} messages. + * @param message GovernanceInstruction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IGovernanceInstruction, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a GovernanceInstruction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GovernanceInstruction + * @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, + ): pyth_lazer_transaction.GovernanceInstruction; + + /** + * Decodes a GovernanceInstruction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GovernanceInstruction + * @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, + ): pyth_lazer_transaction.GovernanceInstruction; + + /** + * Verifies a GovernanceInstruction 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 GovernanceInstruction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GovernanceInstruction + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.GovernanceInstruction; + + /** + * Creates a plain object from a GovernanceInstruction message. Also converts values to other types if specified. + * @param message GovernanceInstruction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.GovernanceInstruction, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this GovernanceInstruction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GovernanceInstruction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ShardFilter. */ + interface IShardFilter { + /** ShardFilter allShards */ + allShards?: google.protobuf.IEmpty | null; + + /** ShardFilter shardNames */ + shardNames?: pyth_lazer_transaction.ShardFilter.IShardNames | null; + + /** ShardFilter shardGroups */ + shardGroups?: pyth_lazer_transaction.ShardFilter.IShardGroups | null; + } + + /** Represents a ShardFilter. */ + class ShardFilter implements IShardFilter { + /** + * Constructs a new ShardFilter. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IShardFilter); + + /** ShardFilter allShards. */ + public allShards?: google.protobuf.IEmpty | null; + + /** ShardFilter shardNames. */ + public shardNames?: pyth_lazer_transaction.ShardFilter.IShardNames | null; + + /** ShardFilter shardGroups. */ + public shardGroups?: pyth_lazer_transaction.ShardFilter.IShardGroups | null; + + /** ShardFilter filter. */ + public filter?: "allShards" | "shardNames" | "shardGroups"; + + /** + * Creates a new ShardFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns ShardFilter instance + */ + public static create( + properties?: pyth_lazer_transaction.IShardFilter, + ): pyth_lazer_transaction.ShardFilter; + + /** + * Encodes the specified ShardFilter message. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.verify|verify} messages. + * @param message ShardFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IShardFilter, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified ShardFilter message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.verify|verify} messages. + * @param message ShardFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IShardFilter, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ShardFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ShardFilter + * @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, + ): pyth_lazer_transaction.ShardFilter; + + /** + * Decodes a ShardFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ShardFilter + * @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, + ): pyth_lazer_transaction.ShardFilter; + + /** + * Verifies a ShardFilter 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 ShardFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ShardFilter + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.ShardFilter; + + /** + * Creates a plain object from a ShardFilter message. Also converts values to other types if specified. + * @param message ShardFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.ShardFilter, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this ShardFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ShardFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ShardFilter { + /** Properties of a ShardNames. */ + interface IShardNames { + /** ShardNames shardNames */ + shardNames?: string[] | null; } - /** Properties of a GovernanceSource. */ - interface IGovernanceSource { - - /** GovernanceSource singleEd25519 */ - singleEd25519?: (pyth_lazer_transaction.GovernanceSource.ISingleEd25519|null); - - /** GovernanceSource wormholeEmitter */ - wormholeEmitter?: (pyth_lazer_transaction.GovernanceSource.IWormholeEmitter|null); + /** Represents a ShardNames. */ + class ShardNames implements IShardNames { + /** + * Constructs a new ShardNames. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ShardFilter.IShardNames); + + /** ShardNames shardNames. */ + public shardNames: string[]; + + /** + * Creates a new ShardNames instance using the specified properties. + * @param [properties] Properties to set + * @returns ShardNames instance + */ + public static create( + properties?: pyth_lazer_transaction.ShardFilter.IShardNames, + ): pyth_lazer_transaction.ShardFilter.ShardNames; + + /** + * Encodes the specified ShardNames message. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardNames.verify|verify} messages. + * @param message ShardNames message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.ShardFilter.IShardNames, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified ShardNames message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardNames.verify|verify} messages. + * @param message ShardNames message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.ShardFilter.IShardNames, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ShardNames message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ShardNames + * @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, + ): pyth_lazer_transaction.ShardFilter.ShardNames; + + /** + * Decodes a ShardNames message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ShardNames + * @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, + ): pyth_lazer_transaction.ShardFilter.ShardNames; + + /** + * Verifies a ShardNames 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 ShardNames message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ShardNames + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.ShardFilter.ShardNames; + + /** + * Creates a plain object from a ShardNames message. Also converts values to other types if specified. + * @param message ShardNames + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.ShardFilter.ShardNames, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this ShardNames to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ShardNames + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Represents a GovernanceSource. */ - class GovernanceSource implements IGovernanceSource { - - /** - * Constructs a new GovernanceSource. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IGovernanceSource); - - /** GovernanceSource singleEd25519. */ - public singleEd25519?: (pyth_lazer_transaction.GovernanceSource.ISingleEd25519|null); - - /** GovernanceSource wormholeEmitter. */ - public wormholeEmitter?: (pyth_lazer_transaction.GovernanceSource.IWormholeEmitter|null); - - /** GovernanceSource source. */ - public source?: ("singleEd25519"|"wormholeEmitter"); - - /** - * Creates a new GovernanceSource instance using the specified properties. - * @param [properties] Properties to set - * @returns GovernanceSource instance - */ - public static create(properties?: pyth_lazer_transaction.IGovernanceSource): pyth_lazer_transaction.GovernanceSource; - - /** - * Encodes the specified GovernanceSource message. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.verify|verify} messages. - * @param message GovernanceSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IGovernanceSource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GovernanceSource message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.verify|verify} messages. - * @param message GovernanceSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IGovernanceSource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GovernanceSource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GovernanceSource - * @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): pyth_lazer_transaction.GovernanceSource; - - /** - * Decodes a GovernanceSource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GovernanceSource - * @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)): pyth_lazer_transaction.GovernanceSource; - - /** - * Verifies a GovernanceSource 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 GovernanceSource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GovernanceSource - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.GovernanceSource; - - /** - * Creates a plain object from a GovernanceSource message. Also converts values to other types if specified. - * @param message GovernanceSource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.GovernanceSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GovernanceSource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GovernanceSource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** Properties of a ShardGroups. */ + interface IShardGroups { + /** ShardGroups shardGroups */ + shardGroups?: string[] | null; } - namespace GovernanceSource { - - /** Properties of a SingleEd25519. */ - interface ISingleEd25519 { - - /** SingleEd25519 publicKey */ - publicKey?: (Uint8Array|null); - } - - /** Represents a SingleEd25519. */ - class SingleEd25519 implements ISingleEd25519 { - - /** - * Constructs a new SingleEd25519. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.GovernanceSource.ISingleEd25519); - - /** SingleEd25519 publicKey. */ - public publicKey?: (Uint8Array|null); - - /** SingleEd25519 _publicKey. */ - public _publicKey?: "publicKey"; - - /** - * Creates a new SingleEd25519 instance using the specified properties. - * @param [properties] Properties to set - * @returns SingleEd25519 instance - */ - public static create(properties?: pyth_lazer_transaction.GovernanceSource.ISingleEd25519): pyth_lazer_transaction.GovernanceSource.SingleEd25519; - - /** - * Encodes the specified SingleEd25519 message. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.SingleEd25519.verify|verify} messages. - * @param message SingleEd25519 message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.GovernanceSource.ISingleEd25519, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SingleEd25519 message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.SingleEd25519.verify|verify} messages. - * @param message SingleEd25519 message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.GovernanceSource.ISingleEd25519, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SingleEd25519 message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SingleEd25519 - * @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): pyth_lazer_transaction.GovernanceSource.SingleEd25519; - - /** - * Decodes a SingleEd25519 message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SingleEd25519 - * @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)): pyth_lazer_transaction.GovernanceSource.SingleEd25519; - - /** - * Verifies a SingleEd25519 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 SingleEd25519 message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SingleEd25519 - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.GovernanceSource.SingleEd25519; - - /** - * Creates a plain object from a SingleEd25519 message. Also converts values to other types if specified. - * @param message SingleEd25519 - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.GovernanceSource.SingleEd25519, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SingleEd25519 to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SingleEd25519 - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WormholeEmitter. */ - interface IWormholeEmitter { - - /** WormholeEmitter address */ - address?: (Uint8Array|null); - - /** WormholeEmitter chainId */ - chainId?: (number|null); - } - - /** Represents a WormholeEmitter. */ - class WormholeEmitter implements IWormholeEmitter { - - /** - * Constructs a new WormholeEmitter. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.GovernanceSource.IWormholeEmitter); - - /** WormholeEmitter address. */ - public address?: (Uint8Array|null); - - /** WormholeEmitter chainId. */ - public chainId?: (number|null); - - /** WormholeEmitter _address. */ - public _address?: "address"; - - /** WormholeEmitter _chainId. */ - public _chainId?: "chainId"; - - /** - * Creates a new WormholeEmitter instance using the specified properties. - * @param [properties] Properties to set - * @returns WormholeEmitter instance - */ - public static create(properties?: pyth_lazer_transaction.GovernanceSource.IWormholeEmitter): pyth_lazer_transaction.GovernanceSource.WormholeEmitter; - - /** - * Encodes the specified WormholeEmitter message. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.WormholeEmitter.verify|verify} messages. - * @param message WormholeEmitter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.GovernanceSource.IWormholeEmitter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WormholeEmitter message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.WormholeEmitter.verify|verify} messages. - * @param message WormholeEmitter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.GovernanceSource.IWormholeEmitter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WormholeEmitter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WormholeEmitter - * @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): pyth_lazer_transaction.GovernanceSource.WormholeEmitter; - - /** - * Decodes a WormholeEmitter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WormholeEmitter - * @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)): pyth_lazer_transaction.GovernanceSource.WormholeEmitter; - - /** - * Verifies a WormholeEmitter 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 WormholeEmitter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WormholeEmitter - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.GovernanceSource.WormholeEmitter; - - /** - * Creates a plain object from a WormholeEmitter message. Also converts values to other types if specified. - * @param message WormholeEmitter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.GovernanceSource.WormholeEmitter, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WormholeEmitter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WormholeEmitter - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** Represents a ShardGroups. */ + class ShardGroups implements IShardGroups { + /** + * Constructs a new ShardGroups. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ShardFilter.IShardGroups); + + /** ShardGroups shardGroups. */ + public shardGroups: string[]; + + /** + * Creates a new ShardGroups instance using the specified properties. + * @param [properties] Properties to set + * @returns ShardGroups instance + */ + public static create( + properties?: pyth_lazer_transaction.ShardFilter.IShardGroups, + ): pyth_lazer_transaction.ShardFilter.ShardGroups; + + /** + * Encodes the specified ShardGroups message. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardGroups.verify|verify} messages. + * @param message ShardGroups message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.ShardFilter.IShardGroups, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified ShardGroups message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ShardFilter.ShardGroups.verify|verify} messages. + * @param message ShardGroups message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.ShardFilter.IShardGroups, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ShardGroups message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ShardGroups + * @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, + ): pyth_lazer_transaction.ShardFilter.ShardGroups; + + /** + * Decodes a ShardGroups message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ShardGroups + * @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, + ): pyth_lazer_transaction.ShardFilter.ShardGroups; + + /** + * Verifies a ShardGroups 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 ShardGroups message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ShardGroups + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.ShardFilter.ShardGroups; + + /** + * Creates a plain object from a ShardGroups message. Also converts values to other types if specified. + * @param message ShardGroups + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.ShardFilter.ShardGroups, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this ShardGroups to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ShardGroups + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } + } - /** Properties of a CreateShard. */ - interface ICreateShard { + /** Properties of a GovernanceDirective. */ + interface IGovernanceDirective { + /** GovernanceDirective shardFilter */ + shardFilter?: pyth_lazer_transaction.IShardFilter | null; - /** CreateShard shardId */ - shardId?: (number|null); + /** GovernanceDirective createShard */ + createShard?: pyth_lazer_transaction.ICreateShard | null; - /** CreateShard shardGroup */ - shardGroup?: (string|null); - - /** CreateShard minRate */ - minRate?: (google.protobuf.IDuration|null); + /** GovernanceDirective addGovernanceSource */ + addGovernanceSource?: pyth_lazer_transaction.IAddGovernanceSource | null; + + /** GovernanceDirective updateGovernanceSource */ + updateGovernanceSource?: pyth_lazer_transaction.IUpdateGovernanceSource | null; + + /** GovernanceDirective setShardName */ + setShardName?: pyth_lazer_transaction.ISetShardName | null; + + /** GovernanceDirective setShardGroup */ + setShardGroup?: pyth_lazer_transaction.ISetShardGroup | null; + + /** GovernanceDirective resetLastSequenceNo */ + resetLastSequenceNo?: pyth_lazer_transaction.IResetLastSequenceNo | null; + + /** GovernanceDirective addPublisher */ + addPublisher?: pyth_lazer_transaction.IAddPublisher | null; + + /** GovernanceDirective updatePublisher */ + updatePublisher?: pyth_lazer_transaction.IUpdatePublisher | null; + + /** GovernanceDirective addFeed */ + addFeed?: pyth_lazer_transaction.IAddFeed | null; + + /** GovernanceDirective updateFeed */ + updateFeed?: pyth_lazer_transaction.IUpdateFeed | null; + } + + /** Represents a GovernanceDirective. */ + class GovernanceDirective implements IGovernanceDirective { + /** + * Constructs a new GovernanceDirective. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IGovernanceDirective); + + /** GovernanceDirective shardFilter. */ + public shardFilter?: pyth_lazer_transaction.IShardFilter | null; + + /** GovernanceDirective createShard. */ + public createShard?: pyth_lazer_transaction.ICreateShard | null; + + /** GovernanceDirective addGovernanceSource. */ + public addGovernanceSource?: pyth_lazer_transaction.IAddGovernanceSource | null; + + /** GovernanceDirective updateGovernanceSource. */ + public updateGovernanceSource?: pyth_lazer_transaction.IUpdateGovernanceSource | null; + + /** GovernanceDirective setShardName. */ + public setShardName?: pyth_lazer_transaction.ISetShardName | null; + + /** GovernanceDirective setShardGroup. */ + public setShardGroup?: pyth_lazer_transaction.ISetShardGroup | null; + + /** GovernanceDirective resetLastSequenceNo. */ + public resetLastSequenceNo?: pyth_lazer_transaction.IResetLastSequenceNo | null; + + /** GovernanceDirective addPublisher. */ + public addPublisher?: pyth_lazer_transaction.IAddPublisher | null; + + /** GovernanceDirective updatePublisher. */ + public updatePublisher?: pyth_lazer_transaction.IUpdatePublisher | null; + + /** GovernanceDirective addFeed. */ + public addFeed?: pyth_lazer_transaction.IAddFeed | null; + + /** GovernanceDirective updateFeed. */ + public updateFeed?: pyth_lazer_transaction.IUpdateFeed | null; + + /** GovernanceDirective _shardFilter. */ + public _shardFilter?: "shardFilter"; + + /** GovernanceDirective action. */ + public action?: + | "createShard" + | "addGovernanceSource" + | "updateGovernanceSource" + | "setShardName" + | "setShardGroup" + | "resetLastSequenceNo" + | "addPublisher" + | "updatePublisher" + | "addFeed" + | "updateFeed"; + + /** + * Creates a new GovernanceDirective instance using the specified properties. + * @param [properties] Properties to set + * @returns GovernanceDirective instance + */ + public static create( + properties?: pyth_lazer_transaction.IGovernanceDirective, + ): pyth_lazer_transaction.GovernanceDirective; + + /** + * Encodes the specified GovernanceDirective message. Does not implicitly {@link pyth_lazer_transaction.GovernanceDirective.verify|verify} messages. + * @param message GovernanceDirective message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IGovernanceDirective, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified GovernanceDirective message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceDirective.verify|verify} messages. + * @param message GovernanceDirective message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IGovernanceDirective, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a GovernanceDirective message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GovernanceDirective + * @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, + ): pyth_lazer_transaction.GovernanceDirective; + + /** + * Decodes a GovernanceDirective message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GovernanceDirective + * @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, + ): pyth_lazer_transaction.GovernanceDirective; + + /** + * Verifies a GovernanceDirective 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 GovernanceDirective message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GovernanceDirective + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.GovernanceDirective; + + /** + * Creates a plain object from a GovernanceDirective message. Also converts values to other types if specified. + * @param message GovernanceDirective + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.GovernanceDirective, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this GovernanceDirective to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GovernanceDirective + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Permissions. */ + interface IPermissions { + /** Permissions allActions */ + allActions?: boolean | null; + + /** Permissions shardActions */ + shardActions?: pyth_lazer_transaction.Permissions.ShardAction[] | null; + + /** Permissions allUpdateGovernanceSourceActions */ + allUpdateGovernanceSourceActions?: boolean | null; + + /** Permissions updateGovernanceSourceActions */ + updateGovernanceSourceActions?: + | pyth_lazer_transaction.Permissions.UpdateGovernanceSourceAction[] + | null; + + /** Permissions allUpdatePublisherAction */ + allUpdatePublisherAction?: boolean | null; + + /** Permissions updatePublisherActions */ + updatePublisherActions?: + | pyth_lazer_transaction.Permissions.UpdatePublisherAction[] + | null; + + /** Permissions allUpdateFeedActions */ + allUpdateFeedActions?: boolean | null; + + /** Permissions updateFeedActions */ + updateFeedActions?: + | pyth_lazer_transaction.Permissions.UpdateFeedAction[] + | null; + } + + /** Represents a Permissions. */ + class Permissions implements IPermissions { + /** + * Constructs a new Permissions. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IPermissions); + + /** Permissions allActions. */ + public allActions?: boolean | null; + + /** Permissions shardActions. */ + public shardActions: pyth_lazer_transaction.Permissions.ShardAction[]; + + /** Permissions allUpdateGovernanceSourceActions. */ + public allUpdateGovernanceSourceActions?: boolean | null; + + /** Permissions updateGovernanceSourceActions. */ + public updateGovernanceSourceActions: pyth_lazer_transaction.Permissions.UpdateGovernanceSourceAction[]; + + /** Permissions allUpdatePublisherAction. */ + public allUpdatePublisherAction?: boolean | null; + + /** Permissions updatePublisherActions. */ + public updatePublisherActions: pyth_lazer_transaction.Permissions.UpdatePublisherAction[]; + + /** Permissions allUpdateFeedActions. */ + public allUpdateFeedActions?: boolean | null; + + /** Permissions updateFeedActions. */ + public updateFeedActions: pyth_lazer_transaction.Permissions.UpdateFeedAction[]; + + /** Permissions _allActions. */ + public _allActions?: "allActions"; + + /** Permissions _allUpdateGovernanceSourceActions. */ + public _allUpdateGovernanceSourceActions?: "allUpdateGovernanceSourceActions"; + + /** Permissions _allUpdatePublisherAction. */ + public _allUpdatePublisherAction?: "allUpdatePublisherAction"; + + /** Permissions _allUpdateFeedActions. */ + public _allUpdateFeedActions?: "allUpdateFeedActions"; + + /** + * Creates a new Permissions instance using the specified properties. + * @param [properties] Properties to set + * @returns Permissions instance + */ + public static create( + properties?: pyth_lazer_transaction.IPermissions, + ): pyth_lazer_transaction.Permissions; + + /** + * Encodes the specified Permissions message. Does not implicitly {@link pyth_lazer_transaction.Permissions.verify|verify} messages. + * @param message Permissions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IPermissions, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified Permissions message, length delimited. Does not implicitly {@link pyth_lazer_transaction.Permissions.verify|verify} messages. + * @param message Permissions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IPermissions, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a Permissions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Permissions + * @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, + ): pyth_lazer_transaction.Permissions; + + /** + * Decodes a Permissions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Permissions + * @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, + ): pyth_lazer_transaction.Permissions; + + /** + * Verifies a Permissions 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 Permissions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Permissions + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.Permissions; + + /** + * Creates a plain object from a Permissions message. Also converts values to other types if specified. + * @param message Permissions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.Permissions, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Permissions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Permissions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Permissions { + /** ShardAction enum. */ + enum ShardAction { + SHARD_ACTION_UNSPECIFIED = 0, + CREATE_SHARD = 101, + ADD_GOVERNANCE_SOURCE = 102, + UPDATE_GOVERNANCE_SOURCE = 103, + SET_SHARD_NAME = 104, + SET_SHARD_GROUP = 105, + RESET_LAST_SEQUENCE_NO = 106, + ADD_PUBLISHER = 107, + ADD_FEED = 109, } - /** Represents a CreateShard. */ - class CreateShard implements ICreateShard { - - /** - * Constructs a new CreateShard. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.ICreateShard); - - /** CreateShard shardId. */ - public shardId?: (number|null); - - /** CreateShard shardGroup. */ - public shardGroup?: (string|null); - - /** CreateShard minRate. */ - public minRate?: (google.protobuf.IDuration|null); - - /** CreateShard _shardId. */ - public _shardId?: "shardId"; - - /** CreateShard _shardGroup. */ - public _shardGroup?: "shardGroup"; - - /** CreateShard _minRate. */ - public _minRate?: "minRate"; - - /** - * Creates a new CreateShard instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateShard instance - */ - public static create(properties?: pyth_lazer_transaction.ICreateShard): pyth_lazer_transaction.CreateShard; - - /** - * Encodes the specified CreateShard message. Does not implicitly {@link pyth_lazer_transaction.CreateShard.verify|verify} messages. - * @param message CreateShard message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.ICreateShard, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateShard message, length delimited. Does not implicitly {@link pyth_lazer_transaction.CreateShard.verify|verify} messages. - * @param message CreateShard message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.ICreateShard, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateShard message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateShard - * @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): pyth_lazer_transaction.CreateShard; - - /** - * Decodes a CreateShard message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateShard - * @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)): pyth_lazer_transaction.CreateShard; - - /** - * Verifies a CreateShard 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 CreateShard message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateShard - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.CreateShard; - - /** - * Creates a plain object from a CreateShard message. Also converts values to other types if specified. - * @param message CreateShard - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.CreateShard, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateShard to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateShard - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** UpdateGovernanceSourceAction enum. */ + enum UpdateGovernanceSourceAction { + UPDATE_GOVERNANCE_SOURCE_ACTION_UNSPECIFIED = 0, + SET_GOVERNANCE_SOURCE_PERMISSIONS = 101, + REMOVE_GOVERNANCE_SOURCE = 199, } - /** Properties of an AddGovernanceSource. */ - interface IAddGovernanceSource { - - /** AddGovernanceSource newSource */ - newSource?: (pyth_lazer_transaction.IGovernanceSource|null); - - /** AddGovernanceSource permissions */ - permissions?: (pyth_lazer_transaction.IPermissions|null); + /** UpdatePublisherAction enum. */ + enum UpdatePublisherAction { + UPDATE_PUBLISHER_ACTION_UNSPECIFIED = 0, + SET_PUBLISHER_NAME = 101, + ADD_PUBLISHER_PUBLIC_KEYS = 102, + REMOVE_PUBLISHER_PUBLIC_KEYS = 103, + SET_PUBLISHER_PUBLIC_KEYS = 104, + SET_PUBLISHER_ACTIVE = 105, + REMOVE_PUBLISHER = 199, } - /** Represents an AddGovernanceSource. */ - class AddGovernanceSource implements IAddGovernanceSource { - - /** - * Constructs a new AddGovernanceSource. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IAddGovernanceSource); - - /** AddGovernanceSource newSource. */ - public newSource?: (pyth_lazer_transaction.IGovernanceSource|null); - - /** AddGovernanceSource permissions. */ - public permissions?: (pyth_lazer_transaction.IPermissions|null); - - /** AddGovernanceSource _newSource. */ - public _newSource?: "newSource"; - - /** AddGovernanceSource _permissions. */ - public _permissions?: "permissions"; - - /** - * Creates a new AddGovernanceSource instance using the specified properties. - * @param [properties] Properties to set - * @returns AddGovernanceSource instance - */ - public static create(properties?: pyth_lazer_transaction.IAddGovernanceSource): pyth_lazer_transaction.AddGovernanceSource; - - /** - * Encodes the specified AddGovernanceSource message. Does not implicitly {@link pyth_lazer_transaction.AddGovernanceSource.verify|verify} messages. - * @param message AddGovernanceSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IAddGovernanceSource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AddGovernanceSource message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddGovernanceSource.verify|verify} messages. - * @param message AddGovernanceSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IAddGovernanceSource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AddGovernanceSource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AddGovernanceSource - * @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): pyth_lazer_transaction.AddGovernanceSource; - - /** - * Decodes an AddGovernanceSource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AddGovernanceSource - * @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)): pyth_lazer_transaction.AddGovernanceSource; - - /** - * Verifies an AddGovernanceSource 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 AddGovernanceSource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AddGovernanceSource - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.AddGovernanceSource; - - /** - * Creates a plain object from an AddGovernanceSource message. Also converts values to other types if specified. - * @param message AddGovernanceSource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.AddGovernanceSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AddGovernanceSource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AddGovernanceSource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** UpdateFeedAction enum. */ + enum UpdateFeedAction { + UPDATE_FEED_ACTION_UNSPECIFIED = 0, + UPDATE_FEED_METADATA = 101, + ACTIVATE_FEED = 102, + DEACTIVATE_FEED = 103, + REMOVE_FEED = 199, } - - /** Properties of an UpdateGovernanceSource. */ - interface IUpdateGovernanceSource { - - /** UpdateGovernanceSource source */ - source?: (pyth_lazer_transaction.IGovernanceSource|null); - - /** UpdateGovernanceSource setGovernanceSourcePermissions */ - setGovernanceSourcePermissions?: (pyth_lazer_transaction.ISetGovernanceSourcePermissions|null); - - /** UpdateGovernanceSource removeGovernanceSource */ - removeGovernanceSource?: (google.protobuf.IEmpty|null); + } + + /** Properties of a GovernanceSource. */ + interface IGovernanceSource { + /** GovernanceSource singleEd25519 */ + singleEd25519?: pyth_lazer_transaction.GovernanceSource.ISingleEd25519 | null; + + /** GovernanceSource wormholeEmitter */ + wormholeEmitter?: pyth_lazer_transaction.GovernanceSource.IWormholeEmitter | null; + } + + /** Represents a GovernanceSource. */ + class GovernanceSource implements IGovernanceSource { + /** + * Constructs a new GovernanceSource. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IGovernanceSource); + + /** GovernanceSource singleEd25519. */ + public singleEd25519?: pyth_lazer_transaction.GovernanceSource.ISingleEd25519 | null; + + /** GovernanceSource wormholeEmitter. */ + public wormholeEmitter?: pyth_lazer_transaction.GovernanceSource.IWormholeEmitter | null; + + /** GovernanceSource source. */ + public source?: "singleEd25519" | "wormholeEmitter"; + + /** + * Creates a new GovernanceSource instance using the specified properties. + * @param [properties] Properties to set + * @returns GovernanceSource instance + */ + public static create( + properties?: pyth_lazer_transaction.IGovernanceSource, + ): pyth_lazer_transaction.GovernanceSource; + + /** + * Encodes the specified GovernanceSource message. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.verify|verify} messages. + * @param message GovernanceSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IGovernanceSource, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified GovernanceSource message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.verify|verify} messages. + * @param message GovernanceSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IGovernanceSource, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a GovernanceSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GovernanceSource + * @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, + ): pyth_lazer_transaction.GovernanceSource; + + /** + * Decodes a GovernanceSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GovernanceSource + * @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, + ): pyth_lazer_transaction.GovernanceSource; + + /** + * Verifies a GovernanceSource 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 GovernanceSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GovernanceSource + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.GovernanceSource; + + /** + * Creates a plain object from a GovernanceSource message. Also converts values to other types if specified. + * @param message GovernanceSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.GovernanceSource, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this GovernanceSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GovernanceSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GovernanceSource { + /** Properties of a SingleEd25519. */ + interface ISingleEd25519 { + /** SingleEd25519 publicKey */ + publicKey?: Uint8Array | null; } - /** Represents an UpdateGovernanceSource. */ - class UpdateGovernanceSource implements IUpdateGovernanceSource { - - /** - * Constructs a new UpdateGovernanceSource. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IUpdateGovernanceSource); - - /** UpdateGovernanceSource source. */ - public source?: (pyth_lazer_transaction.IGovernanceSource|null); - - /** UpdateGovernanceSource setGovernanceSourcePermissions. */ - public setGovernanceSourcePermissions?: (pyth_lazer_transaction.ISetGovernanceSourcePermissions|null); - - /** UpdateGovernanceSource removeGovernanceSource. */ - public removeGovernanceSource?: (google.protobuf.IEmpty|null); - - /** UpdateGovernanceSource _source. */ - public _source?: "source"; - - /** UpdateGovernanceSource action. */ - public action?: ("setGovernanceSourcePermissions"|"removeGovernanceSource"); - - /** - * Creates a new UpdateGovernanceSource instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateGovernanceSource instance - */ - public static create(properties?: pyth_lazer_transaction.IUpdateGovernanceSource): pyth_lazer_transaction.UpdateGovernanceSource; - - /** - * Encodes the specified UpdateGovernanceSource message. Does not implicitly {@link pyth_lazer_transaction.UpdateGovernanceSource.verify|verify} messages. - * @param message UpdateGovernanceSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IUpdateGovernanceSource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateGovernanceSource message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdateGovernanceSource.verify|verify} messages. - * @param message UpdateGovernanceSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IUpdateGovernanceSource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateGovernanceSource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateGovernanceSource - * @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): pyth_lazer_transaction.UpdateGovernanceSource; - - /** - * Decodes an UpdateGovernanceSource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateGovernanceSource - * @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)): pyth_lazer_transaction.UpdateGovernanceSource; - - /** - * Verifies an UpdateGovernanceSource 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 UpdateGovernanceSource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateGovernanceSource - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.UpdateGovernanceSource; - - /** - * Creates a plain object from an UpdateGovernanceSource message. Also converts values to other types if specified. - * @param message UpdateGovernanceSource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.UpdateGovernanceSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateGovernanceSource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateGovernanceSource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** Represents a SingleEd25519. */ + class SingleEd25519 implements ISingleEd25519 { + /** + * Constructs a new SingleEd25519. + * @param [properties] Properties to set + */ + constructor( + properties?: pyth_lazer_transaction.GovernanceSource.ISingleEd25519, + ); + + /** SingleEd25519 publicKey. */ + public publicKey?: Uint8Array | null; + + /** SingleEd25519 _publicKey. */ + public _publicKey?: "publicKey"; + + /** + * Creates a new SingleEd25519 instance using the specified properties. + * @param [properties] Properties to set + * @returns SingleEd25519 instance + */ + public static create( + properties?: pyth_lazer_transaction.GovernanceSource.ISingleEd25519, + ): pyth_lazer_transaction.GovernanceSource.SingleEd25519; + + /** + * Encodes the specified SingleEd25519 message. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.SingleEd25519.verify|verify} messages. + * @param message SingleEd25519 message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.GovernanceSource.ISingleEd25519, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified SingleEd25519 message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.SingleEd25519.verify|verify} messages. + * @param message SingleEd25519 message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.GovernanceSource.ISingleEd25519, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a SingleEd25519 message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SingleEd25519 + * @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, + ): pyth_lazer_transaction.GovernanceSource.SingleEd25519; + + /** + * Decodes a SingleEd25519 message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SingleEd25519 + * @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, + ): pyth_lazer_transaction.GovernanceSource.SingleEd25519; + + /** + * Verifies a SingleEd25519 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 SingleEd25519 message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SingleEd25519 + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.GovernanceSource.SingleEd25519; + + /** + * Creates a plain object from a SingleEd25519 message. Also converts values to other types if specified. + * @param message SingleEd25519 + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.GovernanceSource.SingleEd25519, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this SingleEd25519 to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SingleEd25519 + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SetGovernanceSourcePermissions. */ - interface ISetGovernanceSourcePermissions { + /** Properties of a WormholeEmitter. */ + interface IWormholeEmitter { + /** WormholeEmitter address */ + address?: Uint8Array | null; - /** SetGovernanceSourcePermissions permissions */ - permissions?: (pyth_lazer_transaction.IPermissions|null); + /** WormholeEmitter chainId */ + chainId?: number | null; } - /** Represents a SetGovernanceSourcePermissions. */ - class SetGovernanceSourcePermissions implements ISetGovernanceSourcePermissions { - - /** - * Constructs a new SetGovernanceSourcePermissions. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.ISetGovernanceSourcePermissions); - - /** SetGovernanceSourcePermissions permissions. */ - public permissions?: (pyth_lazer_transaction.IPermissions|null); - - /** SetGovernanceSourcePermissions _permissions. */ - public _permissions?: "permissions"; - - /** - * Creates a new SetGovernanceSourcePermissions instance using the specified properties. - * @param [properties] Properties to set - * @returns SetGovernanceSourcePermissions instance - */ - public static create(properties?: pyth_lazer_transaction.ISetGovernanceSourcePermissions): pyth_lazer_transaction.SetGovernanceSourcePermissions; - - /** - * Encodes the specified SetGovernanceSourcePermissions message. Does not implicitly {@link pyth_lazer_transaction.SetGovernanceSourcePermissions.verify|verify} messages. - * @param message SetGovernanceSourcePermissions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.ISetGovernanceSourcePermissions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetGovernanceSourcePermissions message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetGovernanceSourcePermissions.verify|verify} messages. - * @param message SetGovernanceSourcePermissions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.ISetGovernanceSourcePermissions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetGovernanceSourcePermissions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetGovernanceSourcePermissions - * @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): pyth_lazer_transaction.SetGovernanceSourcePermissions; - - /** - * Decodes a SetGovernanceSourcePermissions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetGovernanceSourcePermissions - * @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)): pyth_lazer_transaction.SetGovernanceSourcePermissions; - - /** - * Verifies a SetGovernanceSourcePermissions 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 SetGovernanceSourcePermissions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetGovernanceSourcePermissions - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.SetGovernanceSourcePermissions; - - /** - * Creates a plain object from a SetGovernanceSourcePermissions message. Also converts values to other types if specified. - * @param message SetGovernanceSourcePermissions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.SetGovernanceSourcePermissions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetGovernanceSourcePermissions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetGovernanceSourcePermissions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** Represents a WormholeEmitter. */ + class WormholeEmitter implements IWormholeEmitter { + /** + * Constructs a new WormholeEmitter. + * @param [properties] Properties to set + */ + constructor( + properties?: pyth_lazer_transaction.GovernanceSource.IWormholeEmitter, + ); + + /** WormholeEmitter address. */ + public address?: Uint8Array | null; + + /** WormholeEmitter chainId. */ + public chainId?: number | null; + + /** WormholeEmitter _address. */ + public _address?: "address"; + + /** WormholeEmitter _chainId. */ + public _chainId?: "chainId"; + + /** + * Creates a new WormholeEmitter instance using the specified properties. + * @param [properties] Properties to set + * @returns WormholeEmitter instance + */ + public static create( + properties?: pyth_lazer_transaction.GovernanceSource.IWormholeEmitter, + ): pyth_lazer_transaction.GovernanceSource.WormholeEmitter; + + /** + * Encodes the specified WormholeEmitter message. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.WormholeEmitter.verify|verify} messages. + * @param message WormholeEmitter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.GovernanceSource.IWormholeEmitter, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified WormholeEmitter message, length delimited. Does not implicitly {@link pyth_lazer_transaction.GovernanceSource.WormholeEmitter.verify|verify} messages. + * @param message WormholeEmitter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.GovernanceSource.IWormholeEmitter, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a WormholeEmitter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WormholeEmitter + * @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, + ): pyth_lazer_transaction.GovernanceSource.WormholeEmitter; + + /** + * Decodes a WormholeEmitter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WormholeEmitter + * @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, + ): pyth_lazer_transaction.GovernanceSource.WormholeEmitter; + + /** + * Verifies a WormholeEmitter 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 WormholeEmitter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WormholeEmitter + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.GovernanceSource.WormholeEmitter; + + /** + * Creates a plain object from a WormholeEmitter message. Also converts values to other types if specified. + * @param message WormholeEmitter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.GovernanceSource.WormholeEmitter, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this WormholeEmitter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WormholeEmitter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - - /** Properties of a SetShardName. */ - interface ISetShardName { - - /** SetShardName shardName */ - shardName?: (string|null); + } + + /** Properties of a CreateShard. */ + interface ICreateShard { + /** CreateShard shardId */ + shardId?: number | null; + + /** CreateShard shardGroup */ + shardGroup?: string | null; + + /** CreateShard minRate */ + minRate?: google.protobuf.IDuration | null; + } + + /** Represents a CreateShard. */ + class CreateShard implements ICreateShard { + /** + * Constructs a new CreateShard. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ICreateShard); + + /** CreateShard shardId. */ + public shardId?: number | null; + + /** CreateShard shardGroup. */ + public shardGroup?: string | null; + + /** CreateShard minRate. */ + public minRate?: google.protobuf.IDuration | null; + + /** CreateShard _shardId. */ + public _shardId?: "shardId"; + + /** CreateShard _shardGroup. */ + public _shardGroup?: "shardGroup"; + + /** CreateShard _minRate. */ + public _minRate?: "minRate"; + + /** + * Creates a new CreateShard instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateShard instance + */ + public static create( + properties?: pyth_lazer_transaction.ICreateShard, + ): pyth_lazer_transaction.CreateShard; + + /** + * Encodes the specified CreateShard message. Does not implicitly {@link pyth_lazer_transaction.CreateShard.verify|verify} messages. + * @param message CreateShard message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.ICreateShard, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified CreateShard message, length delimited. Does not implicitly {@link pyth_lazer_transaction.CreateShard.verify|verify} messages. + * @param message CreateShard message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.ICreateShard, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a CreateShard message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateShard + * @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, + ): pyth_lazer_transaction.CreateShard; + + /** + * Decodes a CreateShard message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateShard + * @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, + ): pyth_lazer_transaction.CreateShard; + + /** + * Verifies a CreateShard 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 CreateShard message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateShard + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.CreateShard; + + /** + * Creates a plain object from a CreateShard message. Also converts values to other types if specified. + * @param message CreateShard + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.CreateShard, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this CreateShard to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateShard + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AddGovernanceSource. */ + interface IAddGovernanceSource { + /** AddGovernanceSource newSource */ + newSource?: pyth_lazer_transaction.IGovernanceSource | null; + + /** AddGovernanceSource permissions */ + permissions?: pyth_lazer_transaction.IPermissions | null; + } + + /** Represents an AddGovernanceSource. */ + class AddGovernanceSource implements IAddGovernanceSource { + /** + * Constructs a new AddGovernanceSource. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IAddGovernanceSource); + + /** AddGovernanceSource newSource. */ + public newSource?: pyth_lazer_transaction.IGovernanceSource | null; + + /** AddGovernanceSource permissions. */ + public permissions?: pyth_lazer_transaction.IPermissions | null; + + /** AddGovernanceSource _newSource. */ + public _newSource?: "newSource"; + + /** AddGovernanceSource _permissions. */ + public _permissions?: "permissions"; + + /** + * Creates a new AddGovernanceSource instance using the specified properties. + * @param [properties] Properties to set + * @returns AddGovernanceSource instance + */ + public static create( + properties?: pyth_lazer_transaction.IAddGovernanceSource, + ): pyth_lazer_transaction.AddGovernanceSource; + + /** + * Encodes the specified AddGovernanceSource message. Does not implicitly {@link pyth_lazer_transaction.AddGovernanceSource.verify|verify} messages. + * @param message AddGovernanceSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IAddGovernanceSource, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified AddGovernanceSource message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddGovernanceSource.verify|verify} messages. + * @param message AddGovernanceSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IAddGovernanceSource, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes an AddGovernanceSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AddGovernanceSource + * @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, + ): pyth_lazer_transaction.AddGovernanceSource; + + /** + * Decodes an AddGovernanceSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AddGovernanceSource + * @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, + ): pyth_lazer_transaction.AddGovernanceSource; + + /** + * Verifies an AddGovernanceSource 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 AddGovernanceSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AddGovernanceSource + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.AddGovernanceSource; + + /** + * Creates a plain object from an AddGovernanceSource message. Also converts values to other types if specified. + * @param message AddGovernanceSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.AddGovernanceSource, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this AddGovernanceSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AddGovernanceSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateGovernanceSource. */ + interface IUpdateGovernanceSource { + /** UpdateGovernanceSource source */ + source?: pyth_lazer_transaction.IGovernanceSource | null; + + /** UpdateGovernanceSource setGovernanceSourcePermissions */ + setGovernanceSourcePermissions?: pyth_lazer_transaction.ISetGovernanceSourcePermissions | null; + + /** UpdateGovernanceSource removeGovernanceSource */ + removeGovernanceSource?: google.protobuf.IEmpty | null; + } + + /** Represents an UpdateGovernanceSource. */ + class UpdateGovernanceSource implements IUpdateGovernanceSource { + /** + * Constructs a new UpdateGovernanceSource. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IUpdateGovernanceSource); + + /** UpdateGovernanceSource source. */ + public source?: pyth_lazer_transaction.IGovernanceSource | null; + + /** UpdateGovernanceSource setGovernanceSourcePermissions. */ + public setGovernanceSourcePermissions?: pyth_lazer_transaction.ISetGovernanceSourcePermissions | null; + + /** UpdateGovernanceSource removeGovernanceSource. */ + public removeGovernanceSource?: google.protobuf.IEmpty | null; + + /** UpdateGovernanceSource _source. */ + public _source?: "source"; + + /** UpdateGovernanceSource action. */ + public action?: "setGovernanceSourcePermissions" | "removeGovernanceSource"; + + /** + * Creates a new UpdateGovernanceSource instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateGovernanceSource instance + */ + public static create( + properties?: pyth_lazer_transaction.IUpdateGovernanceSource, + ): pyth_lazer_transaction.UpdateGovernanceSource; + + /** + * Encodes the specified UpdateGovernanceSource message. Does not implicitly {@link pyth_lazer_transaction.UpdateGovernanceSource.verify|verify} messages. + * @param message UpdateGovernanceSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IUpdateGovernanceSource, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified UpdateGovernanceSource message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdateGovernanceSource.verify|verify} messages. + * @param message UpdateGovernanceSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IUpdateGovernanceSource, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes an UpdateGovernanceSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateGovernanceSource + * @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, + ): pyth_lazer_transaction.UpdateGovernanceSource; + + /** + * Decodes an UpdateGovernanceSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateGovernanceSource + * @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, + ): pyth_lazer_transaction.UpdateGovernanceSource; + + /** + * Verifies an UpdateGovernanceSource 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 UpdateGovernanceSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateGovernanceSource + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.UpdateGovernanceSource; + + /** + * Creates a plain object from an UpdateGovernanceSource message. Also converts values to other types if specified. + * @param message UpdateGovernanceSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.UpdateGovernanceSource, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this UpdateGovernanceSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateGovernanceSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetGovernanceSourcePermissions. */ + interface ISetGovernanceSourcePermissions { + /** SetGovernanceSourcePermissions permissions */ + permissions?: pyth_lazer_transaction.IPermissions | null; + } + + /** Represents a SetGovernanceSourcePermissions. */ + class SetGovernanceSourcePermissions + implements ISetGovernanceSourcePermissions + { + /** + * Constructs a new SetGovernanceSourcePermissions. + * @param [properties] Properties to set + */ + constructor( + properties?: pyth_lazer_transaction.ISetGovernanceSourcePermissions, + ); + + /** SetGovernanceSourcePermissions permissions. */ + public permissions?: pyth_lazer_transaction.IPermissions | null; + + /** SetGovernanceSourcePermissions _permissions. */ + public _permissions?: "permissions"; + + /** + * Creates a new SetGovernanceSourcePermissions instance using the specified properties. + * @param [properties] Properties to set + * @returns SetGovernanceSourcePermissions instance + */ + public static create( + properties?: pyth_lazer_transaction.ISetGovernanceSourcePermissions, + ): pyth_lazer_transaction.SetGovernanceSourcePermissions; + + /** + * Encodes the specified SetGovernanceSourcePermissions message. Does not implicitly {@link pyth_lazer_transaction.SetGovernanceSourcePermissions.verify|verify} messages. + * @param message SetGovernanceSourcePermissions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.ISetGovernanceSourcePermissions, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified SetGovernanceSourcePermissions message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetGovernanceSourcePermissions.verify|verify} messages. + * @param message SetGovernanceSourcePermissions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.ISetGovernanceSourcePermissions, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a SetGovernanceSourcePermissions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetGovernanceSourcePermissions + * @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, + ): pyth_lazer_transaction.SetGovernanceSourcePermissions; + + /** + * Decodes a SetGovernanceSourcePermissions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetGovernanceSourcePermissions + * @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, + ): pyth_lazer_transaction.SetGovernanceSourcePermissions; + + /** + * Verifies a SetGovernanceSourcePermissions 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 SetGovernanceSourcePermissions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetGovernanceSourcePermissions + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.SetGovernanceSourcePermissions; + + /** + * Creates a plain object from a SetGovernanceSourcePermissions message. Also converts values to other types if specified. + * @param message SetGovernanceSourcePermissions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.SetGovernanceSourcePermissions, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this SetGovernanceSourcePermissions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetGovernanceSourcePermissions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetShardName. */ + interface ISetShardName { + /** SetShardName shardName */ + shardName?: string | null; + } + + /** Represents a SetShardName. */ + class SetShardName implements ISetShardName { + /** + * Constructs a new SetShardName. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ISetShardName); + + /** SetShardName shardName. */ + public shardName?: string | null; + + /** SetShardName _shardName. */ + public _shardName?: "shardName"; + + /** + * Creates a new SetShardName instance using the specified properties. + * @param [properties] Properties to set + * @returns SetShardName instance + */ + public static create( + properties?: pyth_lazer_transaction.ISetShardName, + ): pyth_lazer_transaction.SetShardName; + + /** + * Encodes the specified SetShardName message. Does not implicitly {@link pyth_lazer_transaction.SetShardName.verify|verify} messages. + * @param message SetShardName message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.ISetShardName, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified SetShardName message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetShardName.verify|verify} messages. + * @param message SetShardName message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.ISetShardName, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a SetShardName message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetShardName + * @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, + ): pyth_lazer_transaction.SetShardName; + + /** + * Decodes a SetShardName message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetShardName + * @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, + ): pyth_lazer_transaction.SetShardName; + + /** + * Verifies a SetShardName 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 SetShardName message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetShardName + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.SetShardName; + + /** + * Creates a plain object from a SetShardName message. Also converts values to other types if specified. + * @param message SetShardName + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.SetShardName, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this SetShardName to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetShardName + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetShardGroup. */ + interface ISetShardGroup { + /** SetShardGroup shardGroup */ + shardGroup?: string | null; + } + + /** Represents a SetShardGroup. */ + class SetShardGroup implements ISetShardGroup { + /** + * Constructs a new SetShardGroup. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ISetShardGroup); + + /** SetShardGroup shardGroup. */ + public shardGroup?: string | null; + + /** SetShardGroup _shardGroup. */ + public _shardGroup?: "shardGroup"; + + /** + * Creates a new SetShardGroup instance using the specified properties. + * @param [properties] Properties to set + * @returns SetShardGroup instance + */ + public static create( + properties?: pyth_lazer_transaction.ISetShardGroup, + ): pyth_lazer_transaction.SetShardGroup; + + /** + * Encodes the specified SetShardGroup message. Does not implicitly {@link pyth_lazer_transaction.SetShardGroup.verify|verify} messages. + * @param message SetShardGroup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.ISetShardGroup, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified SetShardGroup message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetShardGroup.verify|verify} messages. + * @param message SetShardGroup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.ISetShardGroup, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a SetShardGroup message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetShardGroup + * @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, + ): pyth_lazer_transaction.SetShardGroup; + + /** + * Decodes a SetShardGroup message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetShardGroup + * @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, + ): pyth_lazer_transaction.SetShardGroup; + + /** + * Verifies a SetShardGroup 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 SetShardGroup message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetShardGroup + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.SetShardGroup; + + /** + * Creates a plain object from a SetShardGroup message. Also converts values to other types if specified. + * @param message SetShardGroup + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.SetShardGroup, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this SetShardGroup to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetShardGroup + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ResetLastSequenceNo. */ + interface IResetLastSequenceNo { + /** ResetLastSequenceNo lastSequenceNo */ + lastSequenceNo?: number | Long | null; + } + + /** Represents a ResetLastSequenceNo. */ + class ResetLastSequenceNo implements IResetLastSequenceNo { + /** + * Constructs a new ResetLastSequenceNo. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IResetLastSequenceNo); + + /** ResetLastSequenceNo lastSequenceNo. */ + public lastSequenceNo?: number | Long | null; + + /** ResetLastSequenceNo _lastSequenceNo. */ + public _lastSequenceNo?: "lastSequenceNo"; + + /** + * Creates a new ResetLastSequenceNo instance using the specified properties. + * @param [properties] Properties to set + * @returns ResetLastSequenceNo instance + */ + public static create( + properties?: pyth_lazer_transaction.IResetLastSequenceNo, + ): pyth_lazer_transaction.ResetLastSequenceNo; + + /** + * Encodes the specified ResetLastSequenceNo message. Does not implicitly {@link pyth_lazer_transaction.ResetLastSequenceNo.verify|verify} messages. + * @param message ResetLastSequenceNo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IResetLastSequenceNo, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified ResetLastSequenceNo message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ResetLastSequenceNo.verify|verify} messages. + * @param message ResetLastSequenceNo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IResetLastSequenceNo, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ResetLastSequenceNo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResetLastSequenceNo + * @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, + ): pyth_lazer_transaction.ResetLastSequenceNo; + + /** + * Decodes a ResetLastSequenceNo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResetLastSequenceNo + * @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, + ): pyth_lazer_transaction.ResetLastSequenceNo; + + /** + * Verifies a ResetLastSequenceNo 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 ResetLastSequenceNo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResetLastSequenceNo + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.ResetLastSequenceNo; + + /** + * Creates a plain object from a ResetLastSequenceNo message. Also converts values to other types if specified. + * @param message ResetLastSequenceNo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.ResetLastSequenceNo, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this ResetLastSequenceNo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResetLastSequenceNo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AddPublisher. */ + interface IAddPublisher { + /** AddPublisher publisherId */ + publisherId?: number | null; + + /** AddPublisher name */ + name?: string | null; + + /** AddPublisher publicKeys */ + publicKeys?: Uint8Array[] | null; + + /** AddPublisher isActive */ + isActive?: boolean | null; + } + + /** Represents an AddPublisher. */ + class AddPublisher implements IAddPublisher { + /** + * Constructs a new AddPublisher. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IAddPublisher); + + /** AddPublisher publisherId. */ + public publisherId?: number | null; + + /** AddPublisher name. */ + public name?: string | null; + + /** AddPublisher publicKeys. */ + public publicKeys: Uint8Array[]; + + /** AddPublisher isActive. */ + public isActive?: boolean | null; + + /** AddPublisher _publisherId. */ + public _publisherId?: "publisherId"; + + /** AddPublisher _name. */ + public _name?: "name"; + + /** AddPublisher _isActive. */ + public _isActive?: "isActive"; + + /** + * Creates a new AddPublisher instance using the specified properties. + * @param [properties] Properties to set + * @returns AddPublisher instance + */ + public static create( + properties?: pyth_lazer_transaction.IAddPublisher, + ): pyth_lazer_transaction.AddPublisher; + + /** + * Encodes the specified AddPublisher message. Does not implicitly {@link pyth_lazer_transaction.AddPublisher.verify|verify} messages. + * @param message AddPublisher message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IAddPublisher, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified AddPublisher message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddPublisher.verify|verify} messages. + * @param message AddPublisher message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IAddPublisher, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes an AddPublisher message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AddPublisher + * @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, + ): pyth_lazer_transaction.AddPublisher; + + /** + * Decodes an AddPublisher message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AddPublisher + * @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, + ): pyth_lazer_transaction.AddPublisher; + + /** + * Verifies an AddPublisher 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 AddPublisher message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AddPublisher + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.AddPublisher; + + /** + * Creates a plain object from an AddPublisher message. Also converts values to other types if specified. + * @param message AddPublisher + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.AddPublisher, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this AddPublisher to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AddPublisher + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdatePublisher. */ + interface IUpdatePublisher { + /** UpdatePublisher publisherId */ + publisherId?: number | null; + + /** UpdatePublisher setPublisherName */ + setPublisherName?: pyth_lazer_transaction.ISetPublisherName | null; + + /** UpdatePublisher addPublisherPublicKeys */ + addPublisherPublicKeys?: pyth_lazer_transaction.IAddPublisherPublicKeys | null; + + /** UpdatePublisher removePublisherPublicKeys */ + removePublisherPublicKeys?: pyth_lazer_transaction.IRemovePublisherPublicKeys | null; + + /** UpdatePublisher setPublisherPublicKeys */ + setPublisherPublicKeys?: pyth_lazer_transaction.ISetPublisherPublicKeys | null; + + /** UpdatePublisher setPublisherActive */ + setPublisherActive?: pyth_lazer_transaction.ISetPublisherActive | null; + + /** UpdatePublisher removePublisher */ + removePublisher?: google.protobuf.IEmpty | null; + } + + /** Represents an UpdatePublisher. */ + class UpdatePublisher implements IUpdatePublisher { + /** + * Constructs a new UpdatePublisher. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IUpdatePublisher); + + /** UpdatePublisher publisherId. */ + public publisherId?: number | null; + + /** UpdatePublisher setPublisherName. */ + public setPublisherName?: pyth_lazer_transaction.ISetPublisherName | null; + + /** UpdatePublisher addPublisherPublicKeys. */ + public addPublisherPublicKeys?: pyth_lazer_transaction.IAddPublisherPublicKeys | null; + + /** UpdatePublisher removePublisherPublicKeys. */ + public removePublisherPublicKeys?: pyth_lazer_transaction.IRemovePublisherPublicKeys | null; + + /** UpdatePublisher setPublisherPublicKeys. */ + public setPublisherPublicKeys?: pyth_lazer_transaction.ISetPublisherPublicKeys | null; + + /** UpdatePublisher setPublisherActive. */ + public setPublisherActive?: pyth_lazer_transaction.ISetPublisherActive | null; + + /** UpdatePublisher removePublisher. */ + public removePublisher?: google.protobuf.IEmpty | null; + + /** UpdatePublisher _publisherId. */ + public _publisherId?: "publisherId"; + + /** UpdatePublisher action. */ + public action?: + | "setPublisherName" + | "addPublisherPublicKeys" + | "removePublisherPublicKeys" + | "setPublisherPublicKeys" + | "setPublisherActive" + | "removePublisher"; + + /** + * Creates a new UpdatePublisher instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdatePublisher instance + */ + public static create( + properties?: pyth_lazer_transaction.IUpdatePublisher, + ): pyth_lazer_transaction.UpdatePublisher; + + /** + * Encodes the specified UpdatePublisher message. Does not implicitly {@link pyth_lazer_transaction.UpdatePublisher.verify|verify} messages. + * @param message UpdatePublisher message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IUpdatePublisher, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified UpdatePublisher message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdatePublisher.verify|verify} messages. + * @param message UpdatePublisher message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IUpdatePublisher, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes an UpdatePublisher message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdatePublisher + * @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, + ): pyth_lazer_transaction.UpdatePublisher; + + /** + * Decodes an UpdatePublisher message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdatePublisher + * @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, + ): pyth_lazer_transaction.UpdatePublisher; + + /** + * Verifies an UpdatePublisher 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 UpdatePublisher message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdatePublisher + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.UpdatePublisher; + + /** + * Creates a plain object from an UpdatePublisher message. Also converts values to other types if specified. + * @param message UpdatePublisher + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.UpdatePublisher, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this UpdatePublisher to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdatePublisher + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetPublisherName. */ + interface ISetPublisherName { + /** SetPublisherName name */ + name?: string | null; + } + + /** Represents a SetPublisherName. */ + class SetPublisherName implements ISetPublisherName { + /** + * Constructs a new SetPublisherName. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ISetPublisherName); + + /** SetPublisherName name. */ + public name?: string | null; + + /** SetPublisherName _name. */ + public _name?: "name"; + + /** + * Creates a new SetPublisherName instance using the specified properties. + * @param [properties] Properties to set + * @returns SetPublisherName instance + */ + public static create( + properties?: pyth_lazer_transaction.ISetPublisherName, + ): pyth_lazer_transaction.SetPublisherName; + + /** + * Encodes the specified SetPublisherName message. Does not implicitly {@link pyth_lazer_transaction.SetPublisherName.verify|verify} messages. + * @param message SetPublisherName message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.ISetPublisherName, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified SetPublisherName message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetPublisherName.verify|verify} messages. + * @param message SetPublisherName message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.ISetPublisherName, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a SetPublisherName message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetPublisherName + * @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, + ): pyth_lazer_transaction.SetPublisherName; + + /** + * Decodes a SetPublisherName message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetPublisherName + * @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, + ): pyth_lazer_transaction.SetPublisherName; + + /** + * Verifies a SetPublisherName 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 SetPublisherName message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetPublisherName + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.SetPublisherName; + + /** + * Creates a plain object from a SetPublisherName message. Also converts values to other types if specified. + * @param message SetPublisherName + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.SetPublisherName, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this SetPublisherName to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetPublisherName + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AddPublisherPublicKeys. */ + interface IAddPublisherPublicKeys { + /** AddPublisherPublicKeys publicKeys */ + publicKeys?: Uint8Array[] | null; + } + + /** Represents an AddPublisherPublicKeys. */ + class AddPublisherPublicKeys implements IAddPublisherPublicKeys { + /** + * Constructs a new AddPublisherPublicKeys. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IAddPublisherPublicKeys); + + /** AddPublisherPublicKeys publicKeys. */ + public publicKeys: Uint8Array[]; + + /** + * Creates a new AddPublisherPublicKeys instance using the specified properties. + * @param [properties] Properties to set + * @returns AddPublisherPublicKeys instance + */ + public static create( + properties?: pyth_lazer_transaction.IAddPublisherPublicKeys, + ): pyth_lazer_transaction.AddPublisherPublicKeys; + + /** + * Encodes the specified AddPublisherPublicKeys message. Does not implicitly {@link pyth_lazer_transaction.AddPublisherPublicKeys.verify|verify} messages. + * @param message AddPublisherPublicKeys message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IAddPublisherPublicKeys, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified AddPublisherPublicKeys message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddPublisherPublicKeys.verify|verify} messages. + * @param message AddPublisherPublicKeys message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IAddPublisherPublicKeys, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes an AddPublisherPublicKeys message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AddPublisherPublicKeys + * @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, + ): pyth_lazer_transaction.AddPublisherPublicKeys; + + /** + * Decodes an AddPublisherPublicKeys message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AddPublisherPublicKeys + * @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, + ): pyth_lazer_transaction.AddPublisherPublicKeys; + + /** + * Verifies an AddPublisherPublicKeys 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 AddPublisherPublicKeys message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AddPublisherPublicKeys + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.AddPublisherPublicKeys; + + /** + * Creates a plain object from an AddPublisherPublicKeys message. Also converts values to other types if specified. + * @param message AddPublisherPublicKeys + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.AddPublisherPublicKeys, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this AddPublisherPublicKeys to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AddPublisherPublicKeys + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RemovePublisherPublicKeys. */ + interface IRemovePublisherPublicKeys { + /** RemovePublisherPublicKeys publicKeys */ + publicKeys?: Uint8Array[] | null; + } + + /** Represents a RemovePublisherPublicKeys. */ + class RemovePublisherPublicKeys implements IRemovePublisherPublicKeys { + /** + * Constructs a new RemovePublisherPublicKeys. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IRemovePublisherPublicKeys); + + /** RemovePublisherPublicKeys publicKeys. */ + public publicKeys: Uint8Array[]; + + /** + * Creates a new RemovePublisherPublicKeys instance using the specified properties. + * @param [properties] Properties to set + * @returns RemovePublisherPublicKeys instance + */ + public static create( + properties?: pyth_lazer_transaction.IRemovePublisherPublicKeys, + ): pyth_lazer_transaction.RemovePublisherPublicKeys; + + /** + * Encodes the specified RemovePublisherPublicKeys message. Does not implicitly {@link pyth_lazer_transaction.RemovePublisherPublicKeys.verify|verify} messages. + * @param message RemovePublisherPublicKeys message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IRemovePublisherPublicKeys, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified RemovePublisherPublicKeys message, length delimited. Does not implicitly {@link pyth_lazer_transaction.RemovePublisherPublicKeys.verify|verify} messages. + * @param message RemovePublisherPublicKeys message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IRemovePublisherPublicKeys, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a RemovePublisherPublicKeys message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RemovePublisherPublicKeys + * @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, + ): pyth_lazer_transaction.RemovePublisherPublicKeys; + + /** + * Decodes a RemovePublisherPublicKeys message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RemovePublisherPublicKeys + * @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, + ): pyth_lazer_transaction.RemovePublisherPublicKeys; + + /** + * Verifies a RemovePublisherPublicKeys 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 RemovePublisherPublicKeys message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RemovePublisherPublicKeys + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.RemovePublisherPublicKeys; + + /** + * Creates a plain object from a RemovePublisherPublicKeys message. Also converts values to other types if specified. + * @param message RemovePublisherPublicKeys + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.RemovePublisherPublicKeys, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this RemovePublisherPublicKeys to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RemovePublisherPublicKeys + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetPublisherPublicKeys. */ + interface ISetPublisherPublicKeys { + /** SetPublisherPublicKeys publicKeys */ + publicKeys?: Uint8Array[] | null; + } + + /** Represents a SetPublisherPublicKeys. */ + class SetPublisherPublicKeys implements ISetPublisherPublicKeys { + /** + * Constructs a new SetPublisherPublicKeys. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ISetPublisherPublicKeys); + + /** SetPublisherPublicKeys publicKeys. */ + public publicKeys: Uint8Array[]; + + /** + * Creates a new SetPublisherPublicKeys instance using the specified properties. + * @param [properties] Properties to set + * @returns SetPublisherPublicKeys instance + */ + public static create( + properties?: pyth_lazer_transaction.ISetPublisherPublicKeys, + ): pyth_lazer_transaction.SetPublisherPublicKeys; + + /** + * Encodes the specified SetPublisherPublicKeys message. Does not implicitly {@link pyth_lazer_transaction.SetPublisherPublicKeys.verify|verify} messages. + * @param message SetPublisherPublicKeys message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.ISetPublisherPublicKeys, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified SetPublisherPublicKeys message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetPublisherPublicKeys.verify|verify} messages. + * @param message SetPublisherPublicKeys message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.ISetPublisherPublicKeys, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a SetPublisherPublicKeys message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetPublisherPublicKeys + * @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, + ): pyth_lazer_transaction.SetPublisherPublicKeys; + + /** + * Decodes a SetPublisherPublicKeys message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetPublisherPublicKeys + * @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, + ): pyth_lazer_transaction.SetPublisherPublicKeys; + + /** + * Verifies a SetPublisherPublicKeys 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 SetPublisherPublicKeys message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetPublisherPublicKeys + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.SetPublisherPublicKeys; + + /** + * Creates a plain object from a SetPublisherPublicKeys message. Also converts values to other types if specified. + * @param message SetPublisherPublicKeys + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.SetPublisherPublicKeys, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this SetPublisherPublicKeys to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetPublisherPublicKeys + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetPublisherActive. */ + interface ISetPublisherActive { + /** SetPublisherActive isActive */ + isActive?: boolean | null; + } + + /** Represents a SetPublisherActive. */ + class SetPublisherActive implements ISetPublisherActive { + /** + * Constructs a new SetPublisherActive. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.ISetPublisherActive); + + /** SetPublisherActive isActive. */ + public isActive?: boolean | null; + + /** SetPublisherActive _isActive. */ + public _isActive?: "isActive"; + + /** + * Creates a new SetPublisherActive instance using the specified properties. + * @param [properties] Properties to set + * @returns SetPublisherActive instance + */ + public static create( + properties?: pyth_lazer_transaction.ISetPublisherActive, + ): pyth_lazer_transaction.SetPublisherActive; + + /** + * Encodes the specified SetPublisherActive message. Does not implicitly {@link pyth_lazer_transaction.SetPublisherActive.verify|verify} messages. + * @param message SetPublisherActive message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.ISetPublisherActive, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified SetPublisherActive message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetPublisherActive.verify|verify} messages. + * @param message SetPublisherActive message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.ISetPublisherActive, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a SetPublisherActive message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetPublisherActive + * @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, + ): pyth_lazer_transaction.SetPublisherActive; + + /** + * Decodes a SetPublisherActive message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetPublisherActive + * @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, + ): pyth_lazer_transaction.SetPublisherActive; + + /** + * Verifies a SetPublisherActive 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 SetPublisherActive message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetPublisherActive + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.SetPublisherActive; + + /** + * Creates a plain object from a SetPublisherActive message. Also converts values to other types if specified. + * @param message SetPublisherActive + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.SetPublisherActive, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this SetPublisherActive to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetPublisherActive + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AddFeed. */ + interface IAddFeed { + /** AddFeed feedId */ + feedId?: number | null; + + /** AddFeed metadata */ + metadata?: pyth_lazer_transaction.DynamicValue.IMap | null; + + /** AddFeed permissionedPublishers */ + permissionedPublishers?: number[] | null; + } + + /** Represents an AddFeed. */ + class AddFeed implements IAddFeed { + /** + * Constructs a new AddFeed. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IAddFeed); + + /** AddFeed feedId. */ + public feedId?: number | null; + + /** AddFeed metadata. */ + public metadata?: pyth_lazer_transaction.DynamicValue.IMap | null; + + /** AddFeed permissionedPublishers. */ + public permissionedPublishers: number[]; + + /** AddFeed _feedId. */ + public _feedId?: "feedId"; + + /** AddFeed _metadata. */ + public _metadata?: "metadata"; + + /** + * Creates a new AddFeed instance using the specified properties. + * @param [properties] Properties to set + * @returns AddFeed instance + */ + public static create( + properties?: pyth_lazer_transaction.IAddFeed, + ): pyth_lazer_transaction.AddFeed; + + /** + * Encodes the specified AddFeed message. Does not implicitly {@link pyth_lazer_transaction.AddFeed.verify|verify} messages. + * @param message AddFeed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IAddFeed, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified AddFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddFeed.verify|verify} messages. + * @param message AddFeed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IAddFeed, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes an AddFeed message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AddFeed + * @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, + ): pyth_lazer_transaction.AddFeed; + + /** + * Decodes an AddFeed message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AddFeed + * @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, + ): pyth_lazer_transaction.AddFeed; + + /** + * Verifies an AddFeed 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 AddFeed message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AddFeed + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.AddFeed; + + /** + * Creates a plain object from an AddFeed message. Also converts values to other types if specified. + * @param message AddFeed + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.AddFeed, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this AddFeed to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AddFeed + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateFeed. */ + interface IUpdateFeed { + /** UpdateFeed feedId */ + feedId?: number | null; + + /** UpdateFeed updateFeedMetadata */ + updateFeedMetadata?: pyth_lazer_transaction.IUpdateFeedMetadata | null; + + /** UpdateFeed activateFeed */ + activateFeed?: pyth_lazer_transaction.IActivateFeed | null; + + /** UpdateFeed deactivateFeed */ + deactivateFeed?: pyth_lazer_transaction.IDeactivateFeed | null; + + /** UpdateFeed removeFeed */ + removeFeed?: google.protobuf.IEmpty | null; + } + + /** Represents an UpdateFeed. */ + class UpdateFeed implements IUpdateFeed { + /** + * Constructs a new UpdateFeed. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IUpdateFeed); + + /** UpdateFeed feedId. */ + public feedId?: number | null; + + /** UpdateFeed updateFeedMetadata. */ + public updateFeedMetadata?: pyth_lazer_transaction.IUpdateFeedMetadata | null; + + /** UpdateFeed activateFeed. */ + public activateFeed?: pyth_lazer_transaction.IActivateFeed | null; + + /** UpdateFeed deactivateFeed. */ + public deactivateFeed?: pyth_lazer_transaction.IDeactivateFeed | null; + + /** UpdateFeed removeFeed. */ + public removeFeed?: google.protobuf.IEmpty | null; + + /** UpdateFeed _feedId. */ + public _feedId?: "feedId"; + + /** UpdateFeed action. */ + public action?: + | "updateFeedMetadata" + | "activateFeed" + | "deactivateFeed" + | "removeFeed"; + + /** + * Creates a new UpdateFeed instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateFeed instance + */ + public static create( + properties?: pyth_lazer_transaction.IUpdateFeed, + ): pyth_lazer_transaction.UpdateFeed; + + /** + * Encodes the specified UpdateFeed message. Does not implicitly {@link pyth_lazer_transaction.UpdateFeed.verify|verify} messages. + * @param message UpdateFeed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IUpdateFeed, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified UpdateFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdateFeed.verify|verify} messages. + * @param message UpdateFeed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IUpdateFeed, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes an UpdateFeed message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateFeed + * @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, + ): pyth_lazer_transaction.UpdateFeed; + + /** + * Decodes an UpdateFeed message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateFeed + * @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, + ): pyth_lazer_transaction.UpdateFeed; + + /** + * Verifies an UpdateFeed 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 UpdateFeed message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateFeed + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.UpdateFeed; + + /** + * Creates a plain object from an UpdateFeed message. Also converts values to other types if specified. + * @param message UpdateFeed + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.UpdateFeed, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this UpdateFeed to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateFeed + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateFeedMetadata. */ + interface IUpdateFeedMetadata { + /** UpdateFeedMetadata name */ + name?: string | null; + + /** UpdateFeedMetadata value */ + value?: pyth_lazer_transaction.IDynamicValue | null; + } + + /** Represents an UpdateFeedMetadata. */ + class UpdateFeedMetadata implements IUpdateFeedMetadata { + /** + * Constructs a new UpdateFeedMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IUpdateFeedMetadata); + + /** UpdateFeedMetadata name. */ + public name?: string | null; + + /** UpdateFeedMetadata value. */ + public value?: pyth_lazer_transaction.IDynamicValue | null; + + /** UpdateFeedMetadata _name. */ + public _name?: "name"; + + /** UpdateFeedMetadata _value. */ + public _value?: "value"; + + /** + * Creates a new UpdateFeedMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateFeedMetadata instance + */ + public static create( + properties?: pyth_lazer_transaction.IUpdateFeedMetadata, + ): pyth_lazer_transaction.UpdateFeedMetadata; + + /** + * Encodes the specified UpdateFeedMetadata message. Does not implicitly {@link pyth_lazer_transaction.UpdateFeedMetadata.verify|verify} messages. + * @param message UpdateFeedMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IUpdateFeedMetadata, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified UpdateFeedMetadata message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdateFeedMetadata.verify|verify} messages. + * @param message UpdateFeedMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IUpdateFeedMetadata, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes an UpdateFeedMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateFeedMetadata + * @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, + ): pyth_lazer_transaction.UpdateFeedMetadata; + + /** + * Decodes an UpdateFeedMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateFeedMetadata + * @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, + ): pyth_lazer_transaction.UpdateFeedMetadata; + + /** + * Verifies an UpdateFeedMetadata 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 UpdateFeedMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateFeedMetadata + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.UpdateFeedMetadata; + + /** + * Creates a plain object from an UpdateFeedMetadata message. Also converts values to other types if specified. + * @param message UpdateFeedMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.UpdateFeedMetadata, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this UpdateFeedMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateFeedMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ActivateFeed. */ + interface IActivateFeed { + /** ActivateFeed activationTimestamp */ + activationTimestamp?: google.protobuf.ITimestamp | null; + } + + /** Represents an ActivateFeed. */ + class ActivateFeed implements IActivateFeed { + /** + * Constructs a new ActivateFeed. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IActivateFeed); + + /** ActivateFeed activationTimestamp. */ + public activationTimestamp?: google.protobuf.ITimestamp | null; + + /** ActivateFeed _activationTimestamp. */ + public _activationTimestamp?: "activationTimestamp"; + + /** + * Creates a new ActivateFeed instance using the specified properties. + * @param [properties] Properties to set + * @returns ActivateFeed instance + */ + public static create( + properties?: pyth_lazer_transaction.IActivateFeed, + ): pyth_lazer_transaction.ActivateFeed; + + /** + * Encodes the specified ActivateFeed message. Does not implicitly {@link pyth_lazer_transaction.ActivateFeed.verify|verify} messages. + * @param message ActivateFeed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IActivateFeed, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified ActivateFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ActivateFeed.verify|verify} messages. + * @param message ActivateFeed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IActivateFeed, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes an ActivateFeed message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ActivateFeed + * @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, + ): pyth_lazer_transaction.ActivateFeed; + + /** + * Decodes an ActivateFeed message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ActivateFeed + * @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, + ): pyth_lazer_transaction.ActivateFeed; + + /** + * Verifies an ActivateFeed 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 ActivateFeed message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ActivateFeed + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.ActivateFeed; + + /** + * Creates a plain object from an ActivateFeed message. Also converts values to other types if specified. + * @param message ActivateFeed + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.ActivateFeed, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this ActivateFeed to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ActivateFeed + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeactivateFeed. */ + interface IDeactivateFeed { + /** DeactivateFeed deactivationTimestamp */ + deactivationTimestamp?: google.protobuf.ITimestamp | null; + } + + /** Represents a DeactivateFeed. */ + class DeactivateFeed implements IDeactivateFeed { + /** + * Constructs a new DeactivateFeed. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IDeactivateFeed); + + /** DeactivateFeed deactivationTimestamp. */ + public deactivationTimestamp?: google.protobuf.ITimestamp | null; + + /** DeactivateFeed _deactivationTimestamp. */ + public _deactivationTimestamp?: "deactivationTimestamp"; + + /** + * Creates a new DeactivateFeed instance using the specified properties. + * @param [properties] Properties to set + * @returns DeactivateFeed instance + */ + public static create( + properties?: pyth_lazer_transaction.IDeactivateFeed, + ): pyth_lazer_transaction.DeactivateFeed; + + /** + * Encodes the specified DeactivateFeed message. Does not implicitly {@link pyth_lazer_transaction.DeactivateFeed.verify|verify} messages. + * @param message DeactivateFeed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IDeactivateFeed, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified DeactivateFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DeactivateFeed.verify|verify} messages. + * @param message DeactivateFeed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IDeactivateFeed, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a DeactivateFeed message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeactivateFeed + * @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, + ): pyth_lazer_transaction.DeactivateFeed; + + /** + * Decodes a DeactivateFeed message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeactivateFeed + * @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, + ): pyth_lazer_transaction.DeactivateFeed; + + /** + * Verifies a DeactivateFeed 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 DeactivateFeed message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeactivateFeed + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.DeactivateFeed; + + /** + * Creates a plain object from a DeactivateFeed message. Also converts values to other types if specified. + * @param message DeactivateFeed + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.DeactivateFeed, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this DeactivateFeed to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeactivateFeed + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DynamicValue. */ + interface IDynamicValue { + /** DynamicValue stringValue */ + stringValue?: string | null; + + /** DynamicValue doubleValue */ + doubleValue?: number | null; + + /** DynamicValue uintValue */ + uintValue?: number | Long | null; + + /** DynamicValue intValue */ + intValue?: number | Long | null; + + /** DynamicValue boolValue */ + boolValue?: boolean | null; + + /** DynamicValue bytesValue */ + bytesValue?: Uint8Array | null; + + /** DynamicValue durationValue */ + durationValue?: google.protobuf.IDuration | null; + + /** DynamicValue timestampValue */ + timestampValue?: google.protobuf.ITimestamp | null; + + /** DynamicValue list */ + list?: pyth_lazer_transaction.DynamicValue.IList | null; + + /** DynamicValue map */ + map?: pyth_lazer_transaction.DynamicValue.IMap | null; + } + + /** Represents a DynamicValue. */ + class DynamicValue implements IDynamicValue { + /** + * Constructs a new DynamicValue. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.IDynamicValue); + + /** DynamicValue stringValue. */ + public stringValue?: string | null; + + /** DynamicValue doubleValue. */ + public doubleValue?: number | null; + + /** DynamicValue uintValue. */ + public uintValue?: number | Long | null; + + /** DynamicValue intValue. */ + public intValue?: number | Long | null; + + /** DynamicValue boolValue. */ + public boolValue?: boolean | null; + + /** DynamicValue bytesValue. */ + public bytesValue?: Uint8Array | null; + + /** DynamicValue durationValue. */ + public durationValue?: google.protobuf.IDuration | null; + + /** DynamicValue timestampValue. */ + public timestampValue?: google.protobuf.ITimestamp | null; + + /** DynamicValue list. */ + public list?: pyth_lazer_transaction.DynamicValue.IList | null; + + /** DynamicValue map. */ + public map?: pyth_lazer_transaction.DynamicValue.IMap | null; + + /** DynamicValue value. */ + public value?: + | "stringValue" + | "doubleValue" + | "uintValue" + | "intValue" + | "boolValue" + | "bytesValue" + | "durationValue" + | "timestampValue" + | "list" + | "map"; + + /** + * Creates a new DynamicValue instance using the specified properties. + * @param [properties] Properties to set + * @returns DynamicValue instance + */ + public static create( + properties?: pyth_lazer_transaction.IDynamicValue, + ): pyth_lazer_transaction.DynamicValue; + + /** + * Encodes the specified DynamicValue message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.verify|verify} messages. + * @param message DynamicValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.IDynamicValue, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified DynamicValue message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.verify|verify} messages. + * @param message DynamicValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.IDynamicValue, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a DynamicValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DynamicValue + * @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, + ): pyth_lazer_transaction.DynamicValue; + + /** + * Decodes a DynamicValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DynamicValue + * @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, + ): pyth_lazer_transaction.DynamicValue; + + /** + * Verifies a DynamicValue 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 DynamicValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DynamicValue + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.DynamicValue; + + /** + * Creates a plain object from a DynamicValue message. Also converts values to other types if specified. + * @param message DynamicValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.DynamicValue, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this DynamicValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DynamicValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DynamicValue { + /** Properties of a List. */ + interface IList { + /** List items */ + items?: pyth_lazer_transaction.IDynamicValue[] | null; } - /** Represents a SetShardName. */ - class SetShardName implements ISetShardName { - - /** - * Constructs a new SetShardName. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.ISetShardName); - - /** SetShardName shardName. */ - public shardName?: (string|null); - - /** SetShardName _shardName. */ - public _shardName?: "shardName"; - - /** - * Creates a new SetShardName instance using the specified properties. - * @param [properties] Properties to set - * @returns SetShardName instance - */ - public static create(properties?: pyth_lazer_transaction.ISetShardName): pyth_lazer_transaction.SetShardName; - - /** - * Encodes the specified SetShardName message. Does not implicitly {@link pyth_lazer_transaction.SetShardName.verify|verify} messages. - * @param message SetShardName message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.ISetShardName, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetShardName message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetShardName.verify|verify} messages. - * @param message SetShardName message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.ISetShardName, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetShardName message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetShardName - * @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): pyth_lazer_transaction.SetShardName; - - /** - * Decodes a SetShardName message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetShardName - * @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)): pyth_lazer_transaction.SetShardName; - - /** - * Verifies a SetShardName 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 SetShardName message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetShardName - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.SetShardName; - - /** - * Creates a plain object from a SetShardName message. Also converts values to other types if specified. - * @param message SetShardName - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.SetShardName, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetShardName to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetShardName - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** Represents a List. */ + class List implements IList { + /** + * Constructs a new List. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.DynamicValue.IList); + + /** List items. */ + public items: pyth_lazer_transaction.IDynamicValue[]; + + /** + * Creates a new List instance using the specified properties. + * @param [properties] Properties to set + * @returns List instance + */ + public static create( + properties?: pyth_lazer_transaction.DynamicValue.IList, + ): pyth_lazer_transaction.DynamicValue.List; + + /** + * Encodes the specified List message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.List.verify|verify} messages. + * @param message List message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.DynamicValue.IList, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified List message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.List.verify|verify} messages. + * @param message List message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.DynamicValue.IList, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a List message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns List + * @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, + ): pyth_lazer_transaction.DynamicValue.List; + + /** + * Decodes a List message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns List + * @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, + ): pyth_lazer_transaction.DynamicValue.List; + + /** + * Verifies a List 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 List message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns List + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.DynamicValue.List; + + /** + * Creates a plain object from a List message. Also converts values to other types if specified. + * @param message List + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.DynamicValue.List, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this List to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for List + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SetShardGroup. */ - interface ISetShardGroup { + /** Properties of a MapItem. */ + interface IMapItem { + /** MapItem key */ + key?: string | null; - /** SetShardGroup shardGroup */ - shardGroup?: (string|null); + /** MapItem value */ + value?: pyth_lazer_transaction.IDynamicValue | null; } - /** Represents a SetShardGroup. */ - class SetShardGroup implements ISetShardGroup { - - /** - * Constructs a new SetShardGroup. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.ISetShardGroup); - - /** SetShardGroup shardGroup. */ - public shardGroup?: (string|null); - - /** SetShardGroup _shardGroup. */ - public _shardGroup?: "shardGroup"; - - /** - * Creates a new SetShardGroup instance using the specified properties. - * @param [properties] Properties to set - * @returns SetShardGroup instance - */ - public static create(properties?: pyth_lazer_transaction.ISetShardGroup): pyth_lazer_transaction.SetShardGroup; - - /** - * Encodes the specified SetShardGroup message. Does not implicitly {@link pyth_lazer_transaction.SetShardGroup.verify|verify} messages. - * @param message SetShardGroup message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.ISetShardGroup, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetShardGroup message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetShardGroup.verify|verify} messages. - * @param message SetShardGroup message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.ISetShardGroup, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetShardGroup message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetShardGroup - * @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): pyth_lazer_transaction.SetShardGroup; - - /** - * Decodes a SetShardGroup message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetShardGroup - * @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)): pyth_lazer_transaction.SetShardGroup; - - /** - * Verifies a SetShardGroup 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 SetShardGroup message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetShardGroup - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.SetShardGroup; - - /** - * Creates a plain object from a SetShardGroup message. Also converts values to other types if specified. - * @param message SetShardGroup - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.SetShardGroup, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetShardGroup to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetShardGroup - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** Represents a MapItem. */ + class MapItem implements IMapItem { + /** + * Constructs a new MapItem. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.DynamicValue.IMapItem); + + /** MapItem key. */ + public key?: string | null; + + /** MapItem value. */ + public value?: pyth_lazer_transaction.IDynamicValue | null; + + /** MapItem _key. */ + public _key?: "key"; + + /** MapItem _value. */ + public _value?: "value"; + + /** + * Creates a new MapItem instance using the specified properties. + * @param [properties] Properties to set + * @returns MapItem instance + */ + public static create( + properties?: pyth_lazer_transaction.DynamicValue.IMapItem, + ): pyth_lazer_transaction.DynamicValue.MapItem; + + /** + * Encodes the specified MapItem message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.MapItem.verify|verify} messages. + * @param message MapItem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.DynamicValue.IMapItem, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified MapItem message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.MapItem.verify|verify} messages. + * @param message MapItem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.DynamicValue.IMapItem, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a MapItem message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MapItem + * @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, + ): pyth_lazer_transaction.DynamicValue.MapItem; + + /** + * Decodes a MapItem message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MapItem + * @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, + ): pyth_lazer_transaction.DynamicValue.MapItem; + + /** + * Verifies a MapItem 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 MapItem message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MapItem + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.DynamicValue.MapItem; + + /** + * Creates a plain object from a MapItem message. Also converts values to other types if specified. + * @param message MapItem + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.DynamicValue.MapItem, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this MapItem to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MapItem + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ResetLastSequenceNo. */ - interface IResetLastSequenceNo { - - /** ResetLastSequenceNo lastSequenceNo */ - lastSequenceNo?: (number|Long|null); - } - - /** Represents a ResetLastSequenceNo. */ - class ResetLastSequenceNo implements IResetLastSequenceNo { - - /** - * Constructs a new ResetLastSequenceNo. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IResetLastSequenceNo); - - /** ResetLastSequenceNo lastSequenceNo. */ - public lastSequenceNo?: (number|Long|null); - - /** ResetLastSequenceNo _lastSequenceNo. */ - public _lastSequenceNo?: "lastSequenceNo"; - - /** - * Creates a new ResetLastSequenceNo instance using the specified properties. - * @param [properties] Properties to set - * @returns ResetLastSequenceNo instance - */ - public static create(properties?: pyth_lazer_transaction.IResetLastSequenceNo): pyth_lazer_transaction.ResetLastSequenceNo; - - /** - * Encodes the specified ResetLastSequenceNo message. Does not implicitly {@link pyth_lazer_transaction.ResetLastSequenceNo.verify|verify} messages. - * @param message ResetLastSequenceNo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IResetLastSequenceNo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResetLastSequenceNo message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ResetLastSequenceNo.verify|verify} messages. - * @param message ResetLastSequenceNo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IResetLastSequenceNo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResetLastSequenceNo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResetLastSequenceNo - * @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): pyth_lazer_transaction.ResetLastSequenceNo; - - /** - * Decodes a ResetLastSequenceNo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResetLastSequenceNo - * @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)): pyth_lazer_transaction.ResetLastSequenceNo; - - /** - * Verifies a ResetLastSequenceNo 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 ResetLastSequenceNo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResetLastSequenceNo - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.ResetLastSequenceNo; - - /** - * Creates a plain object from a ResetLastSequenceNo message. Also converts values to other types if specified. - * @param message ResetLastSequenceNo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.ResetLastSequenceNo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResetLastSequenceNo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResetLastSequenceNo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AddPublisher. */ - interface IAddPublisher { - - /** AddPublisher publisherId */ - publisherId?: (number|null); - - /** AddPublisher name */ - name?: (string|null); - - /** AddPublisher publicKeys */ - publicKeys?: (Uint8Array[]|null); - - /** AddPublisher isActive */ - isActive?: (boolean|null); + /** Properties of a Map. */ + interface IMap { + /** Map items */ + items?: pyth_lazer_transaction.DynamicValue.IMapItem[] | null; } - /** Represents an AddPublisher. */ - class AddPublisher implements IAddPublisher { - - /** - * Constructs a new AddPublisher. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IAddPublisher); - - /** AddPublisher publisherId. */ - public publisherId?: (number|null); - - /** AddPublisher name. */ - public name?: (string|null); - - /** AddPublisher publicKeys. */ - public publicKeys: Uint8Array[]; - - /** AddPublisher isActive. */ - public isActive?: (boolean|null); - - /** AddPublisher _publisherId. */ - public _publisherId?: "publisherId"; - - /** AddPublisher _name. */ - public _name?: "name"; - - /** AddPublisher _isActive. */ - public _isActive?: "isActive"; - - /** - * Creates a new AddPublisher instance using the specified properties. - * @param [properties] Properties to set - * @returns AddPublisher instance - */ - public static create(properties?: pyth_lazer_transaction.IAddPublisher): pyth_lazer_transaction.AddPublisher; - - /** - * Encodes the specified AddPublisher message. Does not implicitly {@link pyth_lazer_transaction.AddPublisher.verify|verify} messages. - * @param message AddPublisher message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IAddPublisher, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AddPublisher message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddPublisher.verify|verify} messages. - * @param message AddPublisher message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IAddPublisher, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AddPublisher message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AddPublisher - * @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): pyth_lazer_transaction.AddPublisher; - - /** - * Decodes an AddPublisher message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AddPublisher - * @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)): pyth_lazer_transaction.AddPublisher; - - /** - * Verifies an AddPublisher 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 AddPublisher message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AddPublisher - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.AddPublisher; - - /** - * Creates a plain object from an AddPublisher message. Also converts values to other types if specified. - * @param message AddPublisher - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.AddPublisher, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AddPublisher to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AddPublisher - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdatePublisher. */ - interface IUpdatePublisher { - - /** UpdatePublisher publisherId */ - publisherId?: (number|null); - - /** UpdatePublisher setPublisherName */ - setPublisherName?: (pyth_lazer_transaction.ISetPublisherName|null); - - /** UpdatePublisher addPublisherPublicKeys */ - addPublisherPublicKeys?: (pyth_lazer_transaction.IAddPublisherPublicKeys|null); - - /** UpdatePublisher removePublisherPublicKeys */ - removePublisherPublicKeys?: (pyth_lazer_transaction.IRemovePublisherPublicKeys|null); - - /** UpdatePublisher setPublisherPublicKeys */ - setPublisherPublicKeys?: (pyth_lazer_transaction.ISetPublisherPublicKeys|null); - - /** UpdatePublisher setPublisherActive */ - setPublisherActive?: (pyth_lazer_transaction.ISetPublisherActive|null); - - /** UpdatePublisher removePublisher */ - removePublisher?: (google.protobuf.IEmpty|null); + /** Represents a Map. */ + class Map implements IMap { + /** + * Constructs a new Map. + * @param [properties] Properties to set + */ + constructor(properties?: pyth_lazer_transaction.DynamicValue.IMap); + + /** Map items. */ + public items: pyth_lazer_transaction.DynamicValue.IMapItem[]; + + /** + * Creates a new Map instance using the specified properties. + * @param [properties] Properties to set + * @returns Map instance + */ + public static create( + properties?: pyth_lazer_transaction.DynamicValue.IMap, + ): pyth_lazer_transaction.DynamicValue.Map; + + /** + * Encodes the specified Map message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.Map.verify|verify} messages. + * @param message Map message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: pyth_lazer_transaction.DynamicValue.IMap, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified Map message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.Map.verify|verify} messages. + * @param message Map message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: pyth_lazer_transaction.DynamicValue.IMap, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a Map message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Map + * @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, + ): pyth_lazer_transaction.DynamicValue.Map; + + /** + * Decodes a Map message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Map + * @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, + ): pyth_lazer_transaction.DynamicValue.Map; + + /** + * Verifies a Map 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 Map message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Map + */ + public static fromObject(object: { + [k: string]: any; + }): pyth_lazer_transaction.DynamicValue.Map; + + /** + * Creates a plain object from a Map message. Also converts values to other types if specified. + * @param message Map + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: pyth_lazer_transaction.DynamicValue.Map, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Map to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Map + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } + } +} - /** Represents an UpdatePublisher. */ - class UpdatePublisher implements IUpdatePublisher { - - /** - * Constructs a new UpdatePublisher. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IUpdatePublisher); - - /** UpdatePublisher publisherId. */ - public publisherId?: (number|null); - - /** UpdatePublisher setPublisherName. */ - public setPublisherName?: (pyth_lazer_transaction.ISetPublisherName|null); - - /** UpdatePublisher addPublisherPublicKeys. */ - public addPublisherPublicKeys?: (pyth_lazer_transaction.IAddPublisherPublicKeys|null); - - /** UpdatePublisher removePublisherPublicKeys. */ - public removePublisherPublicKeys?: (pyth_lazer_transaction.IRemovePublisherPublicKeys|null); - - /** UpdatePublisher setPublisherPublicKeys. */ - public setPublisherPublicKeys?: (pyth_lazer_transaction.ISetPublisherPublicKeys|null); - - /** UpdatePublisher setPublisherActive. */ - public setPublisherActive?: (pyth_lazer_transaction.ISetPublisherActive|null); - - /** UpdatePublisher removePublisher. */ - public removePublisher?: (google.protobuf.IEmpty|null); - - /** UpdatePublisher _publisherId. */ - public _publisherId?: "publisherId"; - - /** UpdatePublisher action. */ - public action?: ("setPublisherName"|"addPublisherPublicKeys"|"removePublisherPublicKeys"|"setPublisherPublicKeys"|"setPublisherActive"|"removePublisher"); - - /** - * Creates a new UpdatePublisher instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdatePublisher instance - */ - public static create(properties?: pyth_lazer_transaction.IUpdatePublisher): pyth_lazer_transaction.UpdatePublisher; - - /** - * Encodes the specified UpdatePublisher message. Does not implicitly {@link pyth_lazer_transaction.UpdatePublisher.verify|verify} messages. - * @param message UpdatePublisher message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IUpdatePublisher, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdatePublisher message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdatePublisher.verify|verify} messages. - * @param message UpdatePublisher message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IUpdatePublisher, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdatePublisher message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdatePublisher - * @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): pyth_lazer_transaction.UpdatePublisher; - - /** - * Decodes an UpdatePublisher message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdatePublisher - * @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)): pyth_lazer_transaction.UpdatePublisher; - - /** - * Verifies an UpdatePublisher 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 UpdatePublisher message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdatePublisher - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.UpdatePublisher; - - /** - * Creates a plain object from an UpdatePublisher message. Also converts values to other types if specified. - * @param message UpdatePublisher - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.UpdatePublisher, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdatePublisher to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdatePublisher - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetPublisherName. */ - interface ISetPublisherName { - - /** SetPublisherName name */ - name?: (string|null); - } - - /** Represents a SetPublisherName. */ - class SetPublisherName implements ISetPublisherName { - - /** - * Constructs a new SetPublisherName. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.ISetPublisherName); - - /** SetPublisherName name. */ - public name?: (string|null); - - /** SetPublisherName _name. */ - public _name?: "name"; - - /** - * Creates a new SetPublisherName instance using the specified properties. - * @param [properties] Properties to set - * @returns SetPublisherName instance - */ - public static create(properties?: pyth_lazer_transaction.ISetPublisherName): pyth_lazer_transaction.SetPublisherName; - - /** - * Encodes the specified SetPublisherName message. Does not implicitly {@link pyth_lazer_transaction.SetPublisherName.verify|verify} messages. - * @param message SetPublisherName message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.ISetPublisherName, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetPublisherName message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetPublisherName.verify|verify} messages. - * @param message SetPublisherName message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.ISetPublisherName, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetPublisherName message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetPublisherName - * @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): pyth_lazer_transaction.SetPublisherName; - - /** - * Decodes a SetPublisherName message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetPublisherName - * @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)): pyth_lazer_transaction.SetPublisherName; - - /** - * Verifies a SetPublisherName 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 SetPublisherName message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetPublisherName - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.SetPublisherName; - - /** - * Creates a plain object from a SetPublisherName message. Also converts values to other types if specified. - * @param message SetPublisherName - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.SetPublisherName, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetPublisherName to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetPublisherName - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AddPublisherPublicKeys. */ - interface IAddPublisherPublicKeys { - - /** AddPublisherPublicKeys publicKeys */ - publicKeys?: (Uint8Array[]|null); - } - - /** Represents an AddPublisherPublicKeys. */ - class AddPublisherPublicKeys implements IAddPublisherPublicKeys { - - /** - * Constructs a new AddPublisherPublicKeys. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IAddPublisherPublicKeys); - - /** AddPublisherPublicKeys publicKeys. */ - public publicKeys: Uint8Array[]; - - /** - * Creates a new AddPublisherPublicKeys instance using the specified properties. - * @param [properties] Properties to set - * @returns AddPublisherPublicKeys instance - */ - public static create(properties?: pyth_lazer_transaction.IAddPublisherPublicKeys): pyth_lazer_transaction.AddPublisherPublicKeys; - - /** - * Encodes the specified AddPublisherPublicKeys message. Does not implicitly {@link pyth_lazer_transaction.AddPublisherPublicKeys.verify|verify} messages. - * @param message AddPublisherPublicKeys message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IAddPublisherPublicKeys, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AddPublisherPublicKeys message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddPublisherPublicKeys.verify|verify} messages. - * @param message AddPublisherPublicKeys message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IAddPublisherPublicKeys, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AddPublisherPublicKeys message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AddPublisherPublicKeys - * @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): pyth_lazer_transaction.AddPublisherPublicKeys; - - /** - * Decodes an AddPublisherPublicKeys message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AddPublisherPublicKeys - * @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)): pyth_lazer_transaction.AddPublisherPublicKeys; - - /** - * Verifies an AddPublisherPublicKeys 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 AddPublisherPublicKeys message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AddPublisherPublicKeys - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.AddPublisherPublicKeys; - - /** - * Creates a plain object from an AddPublisherPublicKeys message. Also converts values to other types if specified. - * @param message AddPublisherPublicKeys - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.AddPublisherPublicKeys, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AddPublisherPublicKeys to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AddPublisherPublicKeys - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RemovePublisherPublicKeys. */ - interface IRemovePublisherPublicKeys { - - /** RemovePublisherPublicKeys publicKeys */ - publicKeys?: (Uint8Array[]|null); - } - - /** Represents a RemovePublisherPublicKeys. */ - class RemovePublisherPublicKeys implements IRemovePublisherPublicKeys { - - /** - * Constructs a new RemovePublisherPublicKeys. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IRemovePublisherPublicKeys); - - /** RemovePublisherPublicKeys publicKeys. */ - public publicKeys: Uint8Array[]; - - /** - * Creates a new RemovePublisherPublicKeys instance using the specified properties. - * @param [properties] Properties to set - * @returns RemovePublisherPublicKeys instance - */ - public static create(properties?: pyth_lazer_transaction.IRemovePublisherPublicKeys): pyth_lazer_transaction.RemovePublisherPublicKeys; - - /** - * Encodes the specified RemovePublisherPublicKeys message. Does not implicitly {@link pyth_lazer_transaction.RemovePublisherPublicKeys.verify|verify} messages. - * @param message RemovePublisherPublicKeys message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IRemovePublisherPublicKeys, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RemovePublisherPublicKeys message, length delimited. Does not implicitly {@link pyth_lazer_transaction.RemovePublisherPublicKeys.verify|verify} messages. - * @param message RemovePublisherPublicKeys message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IRemovePublisherPublicKeys, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RemovePublisherPublicKeys message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RemovePublisherPublicKeys - * @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): pyth_lazer_transaction.RemovePublisherPublicKeys; - - /** - * Decodes a RemovePublisherPublicKeys message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RemovePublisherPublicKeys - * @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)): pyth_lazer_transaction.RemovePublisherPublicKeys; - - /** - * Verifies a RemovePublisherPublicKeys 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 RemovePublisherPublicKeys message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RemovePublisherPublicKeys - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.RemovePublisherPublicKeys; - - /** - * Creates a plain object from a RemovePublisherPublicKeys message. Also converts values to other types if specified. - * @param message RemovePublisherPublicKeys - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.RemovePublisherPublicKeys, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RemovePublisherPublicKeys to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RemovePublisherPublicKeys - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetPublisherPublicKeys. */ - interface ISetPublisherPublicKeys { - - /** SetPublisherPublicKeys publicKeys */ - publicKeys?: (Uint8Array[]|null); - } - - /** Represents a SetPublisherPublicKeys. */ - class SetPublisherPublicKeys implements ISetPublisherPublicKeys { - - /** - * Constructs a new SetPublisherPublicKeys. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.ISetPublisherPublicKeys); - - /** SetPublisherPublicKeys publicKeys. */ - public publicKeys: Uint8Array[]; - - /** - * Creates a new SetPublisherPublicKeys instance using the specified properties. - * @param [properties] Properties to set - * @returns SetPublisherPublicKeys instance - */ - public static create(properties?: pyth_lazer_transaction.ISetPublisherPublicKeys): pyth_lazer_transaction.SetPublisherPublicKeys; - - /** - * Encodes the specified SetPublisherPublicKeys message. Does not implicitly {@link pyth_lazer_transaction.SetPublisherPublicKeys.verify|verify} messages. - * @param message SetPublisherPublicKeys message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.ISetPublisherPublicKeys, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetPublisherPublicKeys message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetPublisherPublicKeys.verify|verify} messages. - * @param message SetPublisherPublicKeys message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.ISetPublisherPublicKeys, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetPublisherPublicKeys message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetPublisherPublicKeys - * @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): pyth_lazer_transaction.SetPublisherPublicKeys; - - /** - * Decodes a SetPublisherPublicKeys message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetPublisherPublicKeys - * @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)): pyth_lazer_transaction.SetPublisherPublicKeys; - - /** - * Verifies a SetPublisherPublicKeys 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 SetPublisherPublicKeys message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetPublisherPublicKeys - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.SetPublisherPublicKeys; - - /** - * Creates a plain object from a SetPublisherPublicKeys message. Also converts values to other types if specified. - * @param message SetPublisherPublicKeys - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.SetPublisherPublicKeys, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetPublisherPublicKeys to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetPublisherPublicKeys - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetPublisherActive. */ - interface ISetPublisherActive { - - /** SetPublisherActive isActive */ - isActive?: (boolean|null); - } - - /** Represents a SetPublisherActive. */ - class SetPublisherActive implements ISetPublisherActive { - - /** - * Constructs a new SetPublisherActive. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.ISetPublisherActive); - - /** SetPublisherActive isActive. */ - public isActive?: (boolean|null); - - /** SetPublisherActive _isActive. */ - public _isActive?: "isActive"; - - /** - * Creates a new SetPublisherActive instance using the specified properties. - * @param [properties] Properties to set - * @returns SetPublisherActive instance - */ - public static create(properties?: pyth_lazer_transaction.ISetPublisherActive): pyth_lazer_transaction.SetPublisherActive; - - /** - * Encodes the specified SetPublisherActive message. Does not implicitly {@link pyth_lazer_transaction.SetPublisherActive.verify|verify} messages. - * @param message SetPublisherActive message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.ISetPublisherActive, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetPublisherActive message, length delimited. Does not implicitly {@link pyth_lazer_transaction.SetPublisherActive.verify|verify} messages. - * @param message SetPublisherActive message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.ISetPublisherActive, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetPublisherActive message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetPublisherActive - * @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): pyth_lazer_transaction.SetPublisherActive; - - /** - * Decodes a SetPublisherActive message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetPublisherActive - * @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)): pyth_lazer_transaction.SetPublisherActive; - - /** - * Verifies a SetPublisherActive 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 SetPublisherActive message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetPublisherActive - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.SetPublisherActive; - - /** - * Creates a plain object from a SetPublisherActive message. Also converts values to other types if specified. - * @param message SetPublisherActive - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.SetPublisherActive, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetPublisherActive to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetPublisherActive - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AddFeed. */ - interface IAddFeed { - - /** AddFeed feedId */ - feedId?: (number|null); - - /** AddFeed metadata */ - metadata?: (pyth_lazer_transaction.DynamicValue.IMap|null); - - /** AddFeed permissionedPublishers */ - permissionedPublishers?: (number[]|null); - } - - /** Represents an AddFeed. */ - class AddFeed implements IAddFeed { - - /** - * Constructs a new AddFeed. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IAddFeed); - - /** AddFeed feedId. */ - public feedId?: (number|null); - - /** AddFeed metadata. */ - public metadata?: (pyth_lazer_transaction.DynamicValue.IMap|null); - - /** AddFeed permissionedPublishers. */ - public permissionedPublishers: number[]; - - /** AddFeed _feedId. */ - public _feedId?: "feedId"; - - /** AddFeed _metadata. */ - public _metadata?: "metadata"; - - /** - * Creates a new AddFeed instance using the specified properties. - * @param [properties] Properties to set - * @returns AddFeed instance - */ - public static create(properties?: pyth_lazer_transaction.IAddFeed): pyth_lazer_transaction.AddFeed; - - /** - * Encodes the specified AddFeed message. Does not implicitly {@link pyth_lazer_transaction.AddFeed.verify|verify} messages. - * @param message AddFeed message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IAddFeed, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AddFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.AddFeed.verify|verify} messages. - * @param message AddFeed message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IAddFeed, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AddFeed message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AddFeed - * @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): pyth_lazer_transaction.AddFeed; - - /** - * Decodes an AddFeed message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AddFeed - * @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)): pyth_lazer_transaction.AddFeed; - - /** - * Verifies an AddFeed 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 AddFeed message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AddFeed - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.AddFeed; - - /** - * Creates a plain object from an AddFeed message. Also converts values to other types if specified. - * @param message AddFeed - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.AddFeed, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AddFeed to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AddFeed - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateFeed. */ - interface IUpdateFeed { - - /** UpdateFeed feedId */ - feedId?: (number|null); - - /** UpdateFeed updateFeedMetadata */ - updateFeedMetadata?: (pyth_lazer_transaction.IUpdateFeedMetadata|null); - - /** UpdateFeed activateFeed */ - activateFeed?: (pyth_lazer_transaction.IActivateFeed|null); - - /** UpdateFeed deactivateFeed */ - deactivateFeed?: (pyth_lazer_transaction.IDeactivateFeed|null); - - /** UpdateFeed removeFeed */ - removeFeed?: (google.protobuf.IEmpty|null); - } - - /** Represents an UpdateFeed. */ - class UpdateFeed implements IUpdateFeed { - - /** - * Constructs a new UpdateFeed. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IUpdateFeed); - - /** UpdateFeed feedId. */ - public feedId?: (number|null); - - /** UpdateFeed updateFeedMetadata. */ - public updateFeedMetadata?: (pyth_lazer_transaction.IUpdateFeedMetadata|null); - - /** UpdateFeed activateFeed. */ - public activateFeed?: (pyth_lazer_transaction.IActivateFeed|null); - - /** UpdateFeed deactivateFeed. */ - public deactivateFeed?: (pyth_lazer_transaction.IDeactivateFeed|null); - - /** UpdateFeed removeFeed. */ - public removeFeed?: (google.protobuf.IEmpty|null); - - /** UpdateFeed _feedId. */ - public _feedId?: "feedId"; - - /** UpdateFeed action. */ - public action?: ("updateFeedMetadata"|"activateFeed"|"deactivateFeed"|"removeFeed"); - - /** - * Creates a new UpdateFeed instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateFeed instance - */ - public static create(properties?: pyth_lazer_transaction.IUpdateFeed): pyth_lazer_transaction.UpdateFeed; - - /** - * Encodes the specified UpdateFeed message. Does not implicitly {@link pyth_lazer_transaction.UpdateFeed.verify|verify} messages. - * @param message UpdateFeed message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IUpdateFeed, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdateFeed.verify|verify} messages. - * @param message UpdateFeed message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IUpdateFeed, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateFeed message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateFeed - * @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): pyth_lazer_transaction.UpdateFeed; - - /** - * Decodes an UpdateFeed message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateFeed - * @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)): pyth_lazer_transaction.UpdateFeed; - - /** - * Verifies an UpdateFeed 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 UpdateFeed message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateFeed - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.UpdateFeed; - - /** - * Creates a plain object from an UpdateFeed message. Also converts values to other types if specified. - * @param message UpdateFeed - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.UpdateFeed, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateFeed to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateFeed - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateFeedMetadata. */ - interface IUpdateFeedMetadata { - - /** UpdateFeedMetadata name */ - name?: (string|null); - - /** UpdateFeedMetadata value */ - value?: (pyth_lazer_transaction.IDynamicValue|null); - } - - /** Represents an UpdateFeedMetadata. */ - class UpdateFeedMetadata implements IUpdateFeedMetadata { - - /** - * Constructs a new UpdateFeedMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IUpdateFeedMetadata); - - /** UpdateFeedMetadata name. */ - public name?: (string|null); - - /** UpdateFeedMetadata value. */ - public value?: (pyth_lazer_transaction.IDynamicValue|null); - - /** UpdateFeedMetadata _name. */ - public _name?: "name"; - - /** UpdateFeedMetadata _value. */ - public _value?: "value"; - - /** - * Creates a new UpdateFeedMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateFeedMetadata instance - */ - public static create(properties?: pyth_lazer_transaction.IUpdateFeedMetadata): pyth_lazer_transaction.UpdateFeedMetadata; - - /** - * Encodes the specified UpdateFeedMetadata message. Does not implicitly {@link pyth_lazer_transaction.UpdateFeedMetadata.verify|verify} messages. - * @param message UpdateFeedMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IUpdateFeedMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateFeedMetadata message, length delimited. Does not implicitly {@link pyth_lazer_transaction.UpdateFeedMetadata.verify|verify} messages. - * @param message UpdateFeedMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IUpdateFeedMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateFeedMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateFeedMetadata - * @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): pyth_lazer_transaction.UpdateFeedMetadata; - - /** - * Decodes an UpdateFeedMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateFeedMetadata - * @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)): pyth_lazer_transaction.UpdateFeedMetadata; - - /** - * Verifies an UpdateFeedMetadata 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 UpdateFeedMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateFeedMetadata - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.UpdateFeedMetadata; - - /** - * Creates a plain object from an UpdateFeedMetadata message. Also converts values to other types if specified. - * @param message UpdateFeedMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.UpdateFeedMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateFeedMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateFeedMetadata - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ActivateFeed. */ - interface IActivateFeed { - - /** ActivateFeed activationTimestamp */ - activationTimestamp?: (google.protobuf.ITimestamp|null); - } - - /** Represents an ActivateFeed. */ - class ActivateFeed implements IActivateFeed { - - /** - * Constructs a new ActivateFeed. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IActivateFeed); - - /** ActivateFeed activationTimestamp. */ - public activationTimestamp?: (google.protobuf.ITimestamp|null); - - /** ActivateFeed _activationTimestamp. */ - public _activationTimestamp?: "activationTimestamp"; - - /** - * Creates a new ActivateFeed instance using the specified properties. - * @param [properties] Properties to set - * @returns ActivateFeed instance - */ - public static create(properties?: pyth_lazer_transaction.IActivateFeed): pyth_lazer_transaction.ActivateFeed; - - /** - * Encodes the specified ActivateFeed message. Does not implicitly {@link pyth_lazer_transaction.ActivateFeed.verify|verify} messages. - * @param message ActivateFeed message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IActivateFeed, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ActivateFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.ActivateFeed.verify|verify} messages. - * @param message ActivateFeed message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IActivateFeed, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ActivateFeed message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ActivateFeed - * @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): pyth_lazer_transaction.ActivateFeed; - - /** - * Decodes an ActivateFeed message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ActivateFeed - * @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)): pyth_lazer_transaction.ActivateFeed; - - /** - * Verifies an ActivateFeed 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 ActivateFeed message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ActivateFeed - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.ActivateFeed; - - /** - * Creates a plain object from an ActivateFeed message. Also converts values to other types if specified. - * @param message ActivateFeed - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.ActivateFeed, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ActivateFeed to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ActivateFeed - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeactivateFeed. */ - interface IDeactivateFeed { - - /** DeactivateFeed deactivationTimestamp */ - deactivationTimestamp?: (google.protobuf.ITimestamp|null); +/** Namespace google. */ +export namespace google { + /** Namespace protobuf. */ + namespace protobuf { + /** Properties of a Timestamp. */ + interface ITimestamp { + /** Timestamp seconds */ + seconds?: number | Long | null; + + /** Timestamp nanos */ + nanos?: number | null; } - /** Represents a DeactivateFeed. */ - class DeactivateFeed implements IDeactivateFeed { - - /** - * Constructs a new DeactivateFeed. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IDeactivateFeed); - - /** DeactivateFeed deactivationTimestamp. */ - public deactivationTimestamp?: (google.protobuf.ITimestamp|null); - - /** DeactivateFeed _deactivationTimestamp. */ - public _deactivationTimestamp?: "deactivationTimestamp"; - - /** - * Creates a new DeactivateFeed instance using the specified properties. - * @param [properties] Properties to set - * @returns DeactivateFeed instance - */ - public static create(properties?: pyth_lazer_transaction.IDeactivateFeed): pyth_lazer_transaction.DeactivateFeed; - - /** - * Encodes the specified DeactivateFeed message. Does not implicitly {@link pyth_lazer_transaction.DeactivateFeed.verify|verify} messages. - * @param message DeactivateFeed message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IDeactivateFeed, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeactivateFeed message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DeactivateFeed.verify|verify} messages. - * @param message DeactivateFeed message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IDeactivateFeed, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeactivateFeed message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeactivateFeed - * @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): pyth_lazer_transaction.DeactivateFeed; - - /** - * Decodes a DeactivateFeed message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeactivateFeed - * @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)): pyth_lazer_transaction.DeactivateFeed; - - /** - * Verifies a DeactivateFeed 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 DeactivateFeed message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeactivateFeed - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.DeactivateFeed; - - /** - * Creates a plain object from a DeactivateFeed message. Also converts values to other types if specified. - * @param message DeactivateFeed - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.DeactivateFeed, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeactivateFeed to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeactivateFeed - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { + /** + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ITimestamp); + + /** Timestamp seconds. */ + public seconds: number | Long; + + /** Timestamp nanos. */ + public nanos: number; + + /** + * Creates a new Timestamp instance using the specified properties. + * @param [properties] Properties to set + * @returns Timestamp instance + */ + public static create( + properties?: google.protobuf.ITimestamp, + ): google.protobuf.Timestamp; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: google.protobuf.ITimestamp, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: google.protobuf.ITimestamp, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Timestamp + * @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.Timestamp; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Timestamp + * @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.Timestamp; + + /** + * Verifies a Timestamp 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 Timestamp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Timestamp + */ + public static fromObject(object: { + [k: string]: any; + }): google.protobuf.Timestamp; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @param message Timestamp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: google.protobuf.Timestamp, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Timestamp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Timestamp + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DynamicValue. */ - interface IDynamicValue { - - /** DynamicValue stringValue */ - stringValue?: (string|null); - - /** DynamicValue doubleValue */ - doubleValue?: (number|null); - - /** DynamicValue uintValue */ - uintValue?: (number|Long|null); - - /** DynamicValue intValue */ - intValue?: (number|Long|null); - - /** DynamicValue boolValue */ - boolValue?: (boolean|null); - - /** DynamicValue bytesValue */ - bytesValue?: (Uint8Array|null); + /** Properties of a Duration. */ + interface IDuration { + /** Duration seconds */ + seconds?: number | Long | null; - /** DynamicValue durationValue */ - durationValue?: (google.protobuf.IDuration|null); - - /** DynamicValue timestampValue */ - timestampValue?: (google.protobuf.ITimestamp|null); - - /** DynamicValue list */ - list?: (pyth_lazer_transaction.DynamicValue.IList|null); - - /** DynamicValue map */ - map?: (pyth_lazer_transaction.DynamicValue.IMap|null); - } - - /** Represents a DynamicValue. */ - class DynamicValue implements IDynamicValue { - - /** - * Constructs a new DynamicValue. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.IDynamicValue); - - /** DynamicValue stringValue. */ - public stringValue?: (string|null); - - /** DynamicValue doubleValue. */ - public doubleValue?: (number|null); - - /** DynamicValue uintValue. */ - public uintValue?: (number|Long|null); - - /** DynamicValue intValue. */ - public intValue?: (number|Long|null); - - /** DynamicValue boolValue. */ - public boolValue?: (boolean|null); - - /** DynamicValue bytesValue. */ - public bytesValue?: (Uint8Array|null); - - /** DynamicValue durationValue. */ - public durationValue?: (google.protobuf.IDuration|null); - - /** DynamicValue timestampValue. */ - public timestampValue?: (google.protobuf.ITimestamp|null); - - /** DynamicValue list. */ - public list?: (pyth_lazer_transaction.DynamicValue.IList|null); - - /** DynamicValue map. */ - public map?: (pyth_lazer_transaction.DynamicValue.IMap|null); - - /** DynamicValue value. */ - public value?: ("stringValue"|"doubleValue"|"uintValue"|"intValue"|"boolValue"|"bytesValue"|"durationValue"|"timestampValue"|"list"|"map"); - - /** - * Creates a new DynamicValue instance using the specified properties. - * @param [properties] Properties to set - * @returns DynamicValue instance - */ - public static create(properties?: pyth_lazer_transaction.IDynamicValue): pyth_lazer_transaction.DynamicValue; - - /** - * Encodes the specified DynamicValue message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.verify|verify} messages. - * @param message DynamicValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.IDynamicValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DynamicValue message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.verify|verify} messages. - * @param message DynamicValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.IDynamicValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DynamicValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DynamicValue - * @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): pyth_lazer_transaction.DynamicValue; - - /** - * Decodes a DynamicValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DynamicValue - * @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)): pyth_lazer_transaction.DynamicValue; - - /** - * Verifies a DynamicValue 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 DynamicValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DynamicValue - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.DynamicValue; - - /** - * Creates a plain object from a DynamicValue message. Also converts values to other types if specified. - * @param message DynamicValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.DynamicValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DynamicValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DynamicValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + /** Duration nanos */ + nanos?: number | null; } - namespace DynamicValue { - - /** Properties of a List. */ - interface IList { - - /** List items */ - items?: (pyth_lazer_transaction.IDynamicValue[]|null); - } - - /** Represents a List. */ - class List implements IList { - - /** - * Constructs a new List. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.DynamicValue.IList); - - /** List items. */ - public items: pyth_lazer_transaction.IDynamicValue[]; - - /** - * Creates a new List instance using the specified properties. - * @param [properties] Properties to set - * @returns List instance - */ - public static create(properties?: pyth_lazer_transaction.DynamicValue.IList): pyth_lazer_transaction.DynamicValue.List; - - /** - * Encodes the specified List message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.List.verify|verify} messages. - * @param message List message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.DynamicValue.IList, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified List message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.List.verify|verify} messages. - * @param message List message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.DynamicValue.IList, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a List message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns List - * @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): pyth_lazer_transaction.DynamicValue.List; - - /** - * Decodes a List message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns List - * @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)): pyth_lazer_transaction.DynamicValue.List; - - /** - * Verifies a List 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 List message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns List - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.DynamicValue.List; - - /** - * Creates a plain object from a List message. Also converts values to other types if specified. - * @param message List - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.DynamicValue.List, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this List to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for List - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MapItem. */ - interface IMapItem { - - /** MapItem key */ - key?: (string|null); - - /** MapItem value */ - value?: (pyth_lazer_transaction.IDynamicValue|null); - } - - /** Represents a MapItem. */ - class MapItem implements IMapItem { - - /** - * Constructs a new MapItem. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.DynamicValue.IMapItem); - - /** MapItem key. */ - public key?: (string|null); - - /** MapItem value. */ - public value?: (pyth_lazer_transaction.IDynamicValue|null); - - /** MapItem _key. */ - public _key?: "key"; - - /** MapItem _value. */ - public _value?: "value"; - - /** - * Creates a new MapItem instance using the specified properties. - * @param [properties] Properties to set - * @returns MapItem instance - */ - public static create(properties?: pyth_lazer_transaction.DynamicValue.IMapItem): pyth_lazer_transaction.DynamicValue.MapItem; - - /** - * Encodes the specified MapItem message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.MapItem.verify|verify} messages. - * @param message MapItem message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.DynamicValue.IMapItem, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MapItem message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.MapItem.verify|verify} messages. - * @param message MapItem message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.DynamicValue.IMapItem, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MapItem message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MapItem - * @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): pyth_lazer_transaction.DynamicValue.MapItem; - - /** - * Decodes a MapItem message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MapItem - * @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)): pyth_lazer_transaction.DynamicValue.MapItem; - - /** - * Verifies a MapItem 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 MapItem message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MapItem - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.DynamicValue.MapItem; - - /** - * Creates a plain object from a MapItem message. Also converts values to other types if specified. - * @param message MapItem - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.DynamicValue.MapItem, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MapItem to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MapItem - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Map. */ - interface IMap { - - /** Map items */ - items?: (pyth_lazer_transaction.DynamicValue.IMapItem[]|null); - } - - /** Represents a Map. */ - class Map implements IMap { - - /** - * Constructs a new Map. - * @param [properties] Properties to set - */ - constructor(properties?: pyth_lazer_transaction.DynamicValue.IMap); - - /** Map items. */ - public items: pyth_lazer_transaction.DynamicValue.IMapItem[]; - - /** - * Creates a new Map instance using the specified properties. - * @param [properties] Properties to set - * @returns Map instance - */ - public static create(properties?: pyth_lazer_transaction.DynamicValue.IMap): pyth_lazer_transaction.DynamicValue.Map; - - /** - * Encodes the specified Map message. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.Map.verify|verify} messages. - * @param message Map message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: pyth_lazer_transaction.DynamicValue.IMap, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Map message, length delimited. Does not implicitly {@link pyth_lazer_transaction.DynamicValue.Map.verify|verify} messages. - * @param message Map message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: pyth_lazer_transaction.DynamicValue.IMap, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Map message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Map - * @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): pyth_lazer_transaction.DynamicValue.Map; - - /** - * Decodes a Map message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Map - * @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)): pyth_lazer_transaction.DynamicValue.Map; - - /** - * Verifies a Map 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 Map message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Map - */ - public static fromObject(object: { [k: string]: any }): pyth_lazer_transaction.DynamicValue.Map; - - /** - * Creates a plain object from a Map message. Also converts values to other types if specified. - * @param message Map - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: pyth_lazer_transaction.DynamicValue.Map, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Map to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Map - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** Represents a Duration. */ + class Duration implements IDuration { + /** + * Constructs a new Duration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDuration); + + /** Duration seconds. */ + public seconds: number | Long; + + /** Duration nanos. */ + public nanos: number; + + /** + * Creates a new Duration instance using the specified properties. + * @param [properties] Properties to set + * @returns Duration instance + */ + public static create( + properties?: google.protobuf.IDuration, + ): google.protobuf.Duration; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: google.protobuf.IDuration, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: google.protobuf.IDuration, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Duration + * @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.Duration; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Duration + * @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.Duration; + + /** + * Verifies a Duration 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 Duration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Duration + */ + public static fromObject(object: { + [k: string]: any; + }): google.protobuf.Duration; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @param message Duration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: google.protobuf.Duration, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Duration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Duration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } -} - -/** Namespace google. */ -export namespace google { - /** Namespace protobuf. */ - namespace protobuf { - - /** Properties of a Timestamp. */ - interface ITimestamp { - - /** Timestamp seconds */ - seconds?: (number|Long|null); - - /** Timestamp nanos */ - nanos?: (number|null); - } - - /** Represents a Timestamp. */ - class Timestamp implements ITimestamp { - - /** - * Constructs a new Timestamp. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ITimestamp); - - /** Timestamp seconds. */ - public seconds: (number|Long); - - /** Timestamp nanos. */ - public nanos: number; - - /** - * Creates a new Timestamp instance using the specified properties. - * @param [properties] Properties to set - * @returns Timestamp instance - */ - public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; - - /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Timestamp message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Timestamp - * @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.Timestamp; - - /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Timestamp - * @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.Timestamp; - - /** - * Verifies a Timestamp 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 Timestamp message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Timestamp - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; - - /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @param message Timestamp - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Timestamp to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Timestamp - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Duration. */ - interface IDuration { - - /** Duration seconds */ - seconds?: (number|Long|null); - - /** Duration nanos */ - nanos?: (number|null); - } - - /** Represents a Duration. */ - class Duration implements IDuration { - - /** - * Constructs a new Duration. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDuration); - - /** Duration seconds. */ - public seconds: (number|Long); - - /** Duration nanos. */ - public nanos: number; - - /** - * Creates a new Duration instance using the specified properties. - * @param [properties] Properties to set - * @returns Duration instance - */ - public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; - - /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Duration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Duration - * @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.Duration; - - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Duration - * @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.Duration; - - /** - * Verifies a Duration 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 Duration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Duration - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; - - /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @param message Duration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Duration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Duration - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** 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 }; - - /** - * Gets the default type url for Empty - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** 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 }; + + /** + * Gets the default type url for Empty + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } + } } From c3bd411a05a2e5c8c074834b1b8248eee94b8ba8 Mon Sep 17 00:00:00 2001 From: Daniel Chew Date: Thu, 5 Jun 2025 15:01:31 +0900 Subject: [PATCH 23/27] fix: update validation types and improve Lazer configuration handling --- .../src/programs/core/core_functions.ts | 4 +- .../src/programs/lazer/lazer_functions.ts | 316 +++++++++++++----- .../xc_admin_common/src/programs/types.ts | 62 +++- .../components/programs/PythCore.tsx | 2 +- .../components/programs/PythLazer.tsx | 55 +-- 5 files changed, 326 insertions(+), 113 deletions(-) diff --git a/governance/xc_admin/packages/xc_admin_common/src/programs/core/core_functions.ts b/governance/xc_admin/packages/xc_admin_common/src/programs/core/core_functions.ts index 9bb5ae4148..a12df65529 100644 --- a/governance/xc_admin/packages/xc_admin_common/src/programs/core/core_functions.ts +++ b/governance/xc_admin/packages/xc_admin_common/src/programs/core/core_functions.ts @@ -32,7 +32,7 @@ import { DownloadableProduct, PriceRawConfig, RawConfig, - ValidationResult, + CoreValidationResult, } from "../types"; import { Program } from "@coral-xyz/anchor"; import { PythOracle } from "@pythnetwork/client/lib/anchor"; @@ -309,7 +309,7 @@ export function validateUploadedConfig( existingConfig: Record, uploadedConfig: Record, cluster: PythCluster, -): ValidationResult { +): CoreValidationResult { try { const existingSymbols = new Set(Object.keys(existingConfig)); const changes: Record< diff --git a/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/lazer_functions.ts b/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/lazer_functions.ts index d50cccb8d6..999ceca14b 100644 --- a/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/lazer_functions.ts +++ b/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/lazer_functions.ts @@ -2,10 +2,17 @@ import { PublicKey, TransactionInstruction } from "@solana/web3.js"; import { PythCluster } from "@pythnetwork/client"; import { ValidationResult, + LazerValidationResult, ProgramType, LazerConfig, LazerState, LazerFeedMetadata, + LazerFeed, + LazerPublisher, + ShardChange, + FeedChange, + PublisherChange, + LazerConfigChanges, } from "../types"; import { pyth_lazer_transaction } from "@pythnetwork/pyth-lazer-state-sdk/governance"; @@ -19,17 +26,22 @@ import { pyth_lazer_transaction } from "@pythnetwork/pyth-lazer-state-sdk/govern export function convertLazerFeedMetadataToMap( metadata: LazerFeedMetadata, ): pyth_lazer_transaction.DynamicValue.IMap { - // Use protobufjs fromObject to handle the conversion automatically - const mapData = { - items: Object.entries(metadata) - .filter(([_, value]) => value !== undefined) - .map(([key, value]) => ({ - key, - value, - })), - }; + // Convert each metadata field to a DynamicValue + const items = Object.entries(metadata) + .filter(([_, value]) => value !== undefined) + .map(([key, value]) => ({ + key, + value: { + // Wrap the value in the appropriate DynamicValue type + stringValue: typeof value === "string" ? value : undefined, + intValue: typeof value === "number" ? value : undefined, + boolValue: typeof value === "boolean" ? value : undefined, + }, + })); - return pyth_lazer_transaction.DynamicValue.Map.fromObject(mapData); + return pyth_lazer_transaction.DynamicValue.Map.fromObject({ + items, + }); } /** @@ -47,9 +59,6 @@ export type LazerConfigParams = { */ export interface LazerInstructionAccounts { fundingAccount: PublicKey; - // Lazer-specific properties - lazerProgramClient?: any; // Replace with proper type when available - cluster: PythCluster; additionalAccounts?: Record; } @@ -182,7 +191,7 @@ export function validateUploadedConfig( existingConfig: LazerState, uploadedConfig: LazerState, cluster: PythCluster, -): ValidationResult { +): LazerValidationResult { try { // Basic type validation if (typeof uploadedConfig !== "object" || uploadedConfig === null) { @@ -208,7 +217,7 @@ export function validateUploadedConfig( } // Calculate changes between existing and uploaded config - const changes: Record = {}; + const changes: LazerConfigChanges = {}; // Compare shard metadata if ( @@ -326,103 +335,244 @@ export function validateUploadedConfig( } } +/** + * Type guard to check if a change is a feed change + */ +function isFeedChange(key: string, change: any): change is FeedChange { + return key.startsWith("feed_"); +} + +/** + * Type guard to check if a change is a publisher change + */ +function isPublisherChange( + key: string, + change: any, +): change is PublisherChange { + return key.startsWith("publisher_"); +} + +/** + * Type guard to check if a change is a shard change + */ +function isShardChange(key: string, change: any): change is ShardChange { + return key === "shard"; +} + /** * Generate the necessary instructions to apply configuration changes * * @param changes Configuration changes to apply - * @param cluster The Pyth cluster where the changes will be applied * @param accounts Additional context needed for generating instructions * @returns Promise resolving to an array of TransactionInstructions */ export async function generateInstructions( - changes: Record< - string, - { - prev?: Partial; - new?: Partial; - } - >, - cluster: PythCluster, + changes: LazerConfigChanges, accounts: LazerInstructionAccounts, ): Promise { // This function converts configuration changes into Lazer governance instructions // using the new governance payload functions that properly encode protobuf messages. - const instructions: TransactionInstruction[] = []; - console.log("changes", changes); // Process each change and create corresponding governance instructions for (const [changeKey, change] of Object.entries(changes)) { let governanceBuffer: Buffer | null = null; - if (changeKey.startsWith("feed_")) { + if (isFeedChange(changeKey, change)) { const feedId = parseInt(changeKey.replace("feed_", "")); if (!change.prev && change.new) { - const feedMetadata = change.new.feeds?.[0]?.metadata; - console.log("feedMetadata", feedMetadata); - if (feedMetadata) { - const addFeedMessage = pyth_lazer_transaction.AddFeed.create({ + // Adding a new feed + const feedMetadata = change.new.metadata; + + const addFeedMessage = pyth_lazer_transaction.AddFeed.create({ + feedId: feedId, + metadata: convertLazerFeedMetadataToMap(feedMetadata), + permissionedPublishers: [], + }); + const encoded = + pyth_lazer_transaction.AddFeed.encode(addFeedMessage).finish(); + governanceBuffer = Buffer.from(encoded); + } else if (change.prev && change.new) { + // Updating an existing feed + const prevFeed = change.prev; + const newFeed = change.new; + + // Check if metadata changed + if ( + JSON.stringify(prevFeed.metadata) !== JSON.stringify(newFeed.metadata) + ) { + const updateFeedMessage = pyth_lazer_transaction.UpdateFeed.create({ feedId: feedId, - metadata: convertLazerFeedMetadataToMap(feedMetadata), - permissionedPublishers: [], + updateFeedMetadata: { + name: "metadata", + value: { + map: convertLazerFeedMetadataToMap(newFeed.metadata), + }, + }, }); const encoded = - pyth_lazer_transaction.AddFeed.encode(addFeedMessage).finish(); + pyth_lazer_transaction.UpdateFeed.encode( + updateFeedMessage, + ).finish(); governanceBuffer = Buffer.from(encoded); } - } - // if (!change.prev && change.new) { - // const feedMetadata = change.new.feeds?.[0]?.metadata; - // // Add new feed - // const feed = change.new; - // const addFeedMessage: AddFeed = - // { - // price_feed_id: feedId, - // metadata: feed.metadata, - // permissioned_publishers: [], - // }; - // const encoded = encodeAddFeed(addFeedMessage); - // governanceBuffer = Buffer.from(encoded); - // } else if (change.prev && change.new) { - // // Update existing feed - // const feed = change.new as any; - // governanceBuffer = encodeUpdateFeed({ - // priceFeedId: feedId, - // action: { - // type: "updateFeedMetadata", - // name: "metadata", - // value: feed.metadata - // }, - // governanceSource: accounts.fundingAccount, - // }); - // } - } else if (changeKey.startsWith("publisher_")) { + // Check if pendingActivation changed + if (prevFeed.pendingActivation !== newFeed.pendingActivation) { + // If pendingActivation is being set or changed, create an activation instruction + if (newFeed.pendingActivation) { + const updateFeedMessage = pyth_lazer_transaction.UpdateFeed.create({ + feedId: feedId, + activateFeed: { + activationTimestamp: { + seconds: Math.floor( + new Date(newFeed.pendingActivation).getTime() / 1000, + ), + nanos: 0, + }, + }, + }); + const encoded = + pyth_lazer_transaction.UpdateFeed.encode( + updateFeedMessage, + ).finish(); + governanceBuffer = Buffer.from(encoded); + } else { + // Deactivate feed + const updateFeedMessage = pyth_lazer_transaction.UpdateFeed.create({ + feedId: feedId, + deactivateFeed: { + deactivationTimestamp: { + seconds: Math.floor(Date.now() / 1000), + nanos: 0, + }, + }, + }); + const encoded = + pyth_lazer_transaction.UpdateFeed.encode( + updateFeedMessage, + ).finish(); + governanceBuffer = Buffer.from(encoded); + } + } + } else if (change.prev && !change.new) { + // Removing a feed + const updateFeedMessage = pyth_lazer_transaction.UpdateFeed.create({ + feedId: feedId, + removeFeed: {}, + }); + const encoded = + pyth_lazer_transaction.UpdateFeed.encode(updateFeedMessage).finish(); + governanceBuffer = Buffer.from(encoded); + } + } else if (isPublisherChange(changeKey, change)) { const publisherId = parseInt(changeKey.replace("publisher_", "")); - // if (!change.prev && change.new) { - // // Add new publisher - // const publisher = change.new as any; - // governanceBuffer = encodeAddPublisher({ - // publisherId: publisherId, - // name: publisher.name, - // publicKeys: publisher.publicKeys || [], - // isActive: publisher.isActive || false, - // governanceSource: accounts.fundingAccount, - // }); - // } else if (change.prev && change.new) { - // // Update existing publisher - // const publisher = change.new as any; - // governanceBuffer = encodeUpdatePublisher({ - // publisherId: publisherId, - // action: { - // type: "setPublisherActive", - // isActive: publisher.isActive - // }, - // governanceSource: accounts.fundingAccount, - // }); - // } + if (!change.prev && change.new) { + // Adding a new publisher + const newPublisher = change.new; + + const addPublisherMessage = pyth_lazer_transaction.AddPublisher.create({ + publisherId: publisherId, + name: newPublisher.name, + publicKeys: newPublisher.publicKeys.map((key) => + Buffer.from(key, "base64"), + ), + isActive: newPublisher.isActive, + }); + const encoded = + pyth_lazer_transaction.AddPublisher.encode( + addPublisherMessage, + ).finish(); + governanceBuffer = Buffer.from(encoded); + } else if (change.prev && change.new) { + // Updating an existing publisher + const prevPublisher = change.prev; + const newPublisher = change.new; + + // Check if name changed + if (prevPublisher.name !== newPublisher.name) { + const updatePublisherMessage = + pyth_lazer_transaction.UpdatePublisher.create({ + publisherId: publisherId, + setPublisherName: { + name: newPublisher.name, + }, + }); + const encoded = pyth_lazer_transaction.UpdatePublisher.encode( + updatePublisherMessage, + ).finish(); + governanceBuffer = Buffer.from(encoded); + } + + // Check if public keys changed + if ( + JSON.stringify(prevPublisher.publicKeys) !== + JSON.stringify(newPublisher.publicKeys) + ) { + const updatePublisherMessage = + pyth_lazer_transaction.UpdatePublisher.create({ + publisherId: publisherId, + setPublisherPublicKeys: { + publicKeys: newPublisher.publicKeys.map((key) => + Buffer.from(key, "base64"), + ), + }, + }); + const encoded = pyth_lazer_transaction.UpdatePublisher.encode( + updatePublisherMessage, + ).finish(); + governanceBuffer = Buffer.from(encoded); + } + + // Check if active status changed + if (prevPublisher.isActive !== newPublisher.isActive) { + const updatePublisherMessage = + pyth_lazer_transaction.UpdatePublisher.create({ + publisherId: publisherId, + setPublisherActive: { + isActive: newPublisher.isActive, + }, + }); + const encoded = pyth_lazer_transaction.UpdatePublisher.encode( + updatePublisherMessage, + ).finish(); + governanceBuffer = Buffer.from(encoded); + } + } else if (change.prev && !change.new) { + // Removing a publisher + const prevPublisher = change.prev; + + const updatePublisherMessage = + pyth_lazer_transaction.UpdatePublisher.create({ + publisherId: publisherId, + removePublisher: {}, + }); + const encoded = pyth_lazer_transaction.UpdatePublisher.encode( + updatePublisherMessage, + ).finish(); + governanceBuffer = Buffer.from(encoded); + } + } else if (isShardChange(changeKey, change)) { + // Updating shard configuration + if (change.new) { + const newShard = change.new; + const prevShard = change.prev; + + // Check if shard name changed + if (!prevShard || prevShard.shardName !== newShard.shardName) { + const setShardNameMessage = + pyth_lazer_transaction.SetShardName.create({ + shardName: newShard.shardName, + }); + const encoded = + pyth_lazer_transaction.SetShardName.encode( + setShardNameMessage, + ).finish(); + governanceBuffer = Buffer.from(encoded); + } + } } // Create Solana transaction instruction if we have a governance buffer diff --git a/governance/xc_admin/packages/xc_admin_common/src/programs/types.ts b/governance/xc_admin/packages/xc_admin_common/src/programs/types.ts index 45fc5db2ee..eb3049f58f 100644 --- a/governance/xc_admin/packages/xc_admin_common/src/programs/types.ts +++ b/governance/xc_admin/packages/xc_admin_common/src/programs/types.ts @@ -2,6 +2,8 @@ import { PublicKey } from "@solana/web3.js"; import { PermissionData, Product } from "@pythnetwork/client"; import { LazerInstructionAccounts } from "./lazer/lazer_functions"; import { CoreInstructionAccounts } from "./core/core_functions"; +import { pyth_lazer_transaction } from "@pythnetwork/pyth-lazer-state-sdk/governance"; +import { lazer } from "@pythnetwork/pyth-lazer-state-sdk/state"; /** * Represents the different Pyth programs supported by the application. */ @@ -112,14 +114,68 @@ export type InstructionAccountsTypeMap = { }; /** - * Result of validating an uploaded configuration + * Types for different kinds of configuration changes */ -export interface ValidationResult { +export type ShardChange = { + prev?: { + shardId: number; + shardName: string; + minRate: string; + }; + new?: { + shardId: number; + shardName: string; + minRate: string; + }; +}; + +export type FeedChange = { + prev?: LazerFeed; + new?: LazerFeed; +}; + +export type PublisherChange = { + prev?: LazerPublisher; + new?: LazerPublisher; +}; + +/** + * Union type for all possible Lazer configuration changes + */ +export type LazerConfigChanges = Record< + string, + FeedChange | PublisherChange | ShardChange +>; + +/** + * Core-specific validation result + */ +export interface CoreValidationResult { + isValid: boolean; + error?: string; + changes?: Record< + string, + { + prev?: Partial; + new?: Partial; + } + >; +} + +/** + * Lazer-specific validation result + */ +export interface LazerValidationResult { isValid: boolean; error?: string; - changes?: any; + changes?: LazerConfigChanges; } +/** + * Union type for validation results + */ +export type ValidationResult = CoreValidationResult | LazerValidationResult; + /** * Lazer feed metadata type */ diff --git a/governance/xc_admin/packages/xc_admin_frontend/components/programs/PythCore.tsx b/governance/xc_admin/packages/xc_admin_frontend/components/programs/PythCore.tsx index cd499f6463..aa5bf1d008 100644 --- a/governance/xc_admin/packages/xc_admin_frontend/components/programs/PythCore.tsx +++ b/governance/xc_admin/packages/xc_admin_frontend/components/programs/PythCore.tsx @@ -57,7 +57,7 @@ interface PublisherChanges { interface ProductChanges { prev?: Partial - new: Partial + new?: Partial } interface MetadataChangesRowsProps { diff --git a/governance/xc_admin/packages/xc_admin_frontend/components/programs/PythLazer.tsx b/governance/xc_admin/packages/xc_admin_frontend/components/programs/PythLazer.tsx index c6a6098b4d..929934ded5 100644 --- a/governance/xc_admin/packages/xc_admin_frontend/components/programs/PythLazer.tsx +++ b/governance/xc_admin/packages/xc_admin_frontend/components/programs/PythLazer.tsx @@ -10,11 +10,14 @@ import toast from 'react-hot-toast' import Loadbar from '../loaders/Loadbar' import Spinner from '../common/Spinner' import { - LazerState, LazerFeed, LazerPublisher, + LazerConfigChanges, } from '@pythnetwork/xc-admin-common/src/programs/types' import { capitalizeFirstLetter } from '../../utils/capitalizeFirstLetter' +import { generateInstructions } from '@pythnetwork/xc-admin-common/lib/programs/lazer/lazer_functions' +import { useMultisigContext } from '../../contexts/MultisigContext' +import { PublicKey } from '@solana/web3.js' interface PythLazerProps { proposerServerUrl: string @@ -58,13 +61,7 @@ interface PublisherChangesRowsProps { } interface ModalContentProps { - changes: Record< - string, - { - prev?: Partial - new?: Partial - } - > + changes: LazerConfigChanges onSendProposal: () => void isSendProposalButtonLoading: boolean } @@ -366,13 +363,11 @@ const PythLazer = ({ const { dataIsLoading, lazerState } = usePythContext() const { cluster } = useContext(ClusterContext) - const [dataChanges, setDataChanges] = - useState< - Record; new?: Partial }> - >() + const [dataChanges, setDataChanges] = useState() const [isModalOpen, setIsModalOpen] = useState(false) const [isSendProposalButtonLoading, setIsSendProposalButtonLoading] = useState(false) + const { isLoading: isMultisigLoading } = useMultisigContext() const openModal = () => { setIsModalOpen(true) @@ -443,19 +438,31 @@ const PythLazer = ({ const handleSendProposalButtonClick = async () => { setIsSendProposalButtonLoading(true) - try { - // In a real implementation, this would send the proposal to the server - await new Promise((resolve) => setTimeout(resolve, 2000)) // Mock delay - - // Close the modal and show success notification - setIsModalOpen(false) - toast.success('Proposal sent successfully!') - } catch (error) { - if (error instanceof Error) { - toast.error(capitalizeFirstLetter(error.message)) + if (dataChanges && !isMultisigLoading) { + try { + // Generate the instructions for the proposal + const instructions = await generateInstructions( + dataChanges as LazerConfigChanges, + { + fundingAccount: new PublicKey(1), + } + ) + + console.log('Generated instructions:', instructions) + + // In a real implementation, this would send the proposal to the server + await new Promise((resolve) => setTimeout(resolve, 2000)) // Mock delay + + // Close the modal and show success notification + setIsModalOpen(false) + toast.success('Proposal sent successfully!') + } catch (error) { + if (error instanceof Error) { + toast.error(capitalizeFirstLetter(error.message)) + } + } finally { + setIsSendProposalButtonLoading(false) } - } finally { - setIsSendProposalButtonLoading(false) } } From 273c4fae51661476c88883d4d077f01a8b34eff3 Mon Sep 17 00:00:00 2001 From: Daniel Chew Date: Thu, 5 Jun 2025 15:16:13 +0900 Subject: [PATCH 24/27] fix: update download filename for Lazer configuration export --- .../xc_admin_frontend/components/programs/PythLazer.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/governance/xc_admin/packages/xc_admin_frontend/components/programs/PythLazer.tsx b/governance/xc_admin/packages/xc_admin_frontend/components/programs/PythLazer.tsx index 929934ded5..421bdea755 100644 --- a/governance/xc_admin/packages/xc_admin_frontend/components/programs/PythLazer.tsx +++ b/governance/xc_admin/packages/xc_admin_frontend/components/programs/PythLazer.tsx @@ -385,7 +385,7 @@ const PythLazer = ({ encodeURIComponent(JSON.stringify(lazerState, null, 2)) const downloadAnchor = document.createElement('a') downloadAnchor.setAttribute('href', dataStr) - downloadAnchor.setAttribute('download', `lazer_config_${cluster}.json`) + downloadAnchor.setAttribute('download', `lazer_config.json`) document.body.appendChild(downloadAnchor) // required for firefox downloadAnchor.click() downloadAnchor.remove() From 1e8558d6820de5c8d46dcafdefa87ab7085f58d5 Mon Sep 17 00:00:00 2001 From: Daniel Chew Date: Thu, 12 Jun 2025 13:43:17 +0900 Subject: [PATCH 25/27] feat: add lazer support to xc-admin-common --- .../packages/xc_admin_common/src/chains.ts | 4 + .../src/governance_payload/LazerExecute.ts | 126 +++++++++++++ .../PythGovernanceAction.ts | 27 ++- .../src/governance_payload/index.ts | 4 + .../src/programs/lazer/lazer_functions.ts | 173 +++++++++++------- .../components/programs/PythLazer.tsx | 20 +- 6 files changed, 280 insertions(+), 74 deletions(-) create mode 100644 governance/xc_admin/packages/xc_admin_common/src/governance_payload/LazerExecute.ts diff --git a/governance/xc_admin/packages/xc_admin_common/src/chains.ts b/governance/xc_admin/packages/xc_admin_common/src/chains.ts index 4cd044ee43..9263f4b3f8 100644 --- a/governance/xc_admin/packages/xc_admin_common/src/chains.ts +++ b/governance/xc_admin/packages/xc_admin_common/src/chains.ts @@ -245,6 +245,10 @@ export const RECEIVER_CHAINS = { worldchain_testnet: 50123, mezo_testnet: 50124, hemi_testnet: 50125, + + // Lazer + lazer_production: 10000, + lazer_staging: 10001, }; // If there is any overlapping value the receiver chain will replace the wormhole diff --git a/governance/xc_admin/packages/xc_admin_common/src/governance_payload/LazerExecute.ts b/governance/xc_admin/packages/xc_admin_common/src/governance_payload/LazerExecute.ts new file mode 100644 index 0000000000..523451b164 --- /dev/null +++ b/governance/xc_admin/packages/xc_admin_common/src/governance_payload/LazerExecute.ts @@ -0,0 +1,126 @@ +import { PythGovernanceActionImpl } from "./PythGovernanceAction"; +import * as BufferLayout from "@solana/buffer-layout"; +import { ChainName } from "../chains"; +import { pyth_lazer_transaction } from "@pythnetwork/pyth-lazer-state-sdk/governance"; + +/** Executes a Lazer governance instruction with the specified directives */ +export class LazerExecute extends PythGovernanceActionImpl { + static layout: BufferLayout.Structure< + Readonly<{ + governanceInstruction: Uint8Array; + }> + > = BufferLayout.struct([ + BufferLayout.blob(new BufferLayout.GreedyCount(), "governanceInstruction"), + ]); + + constructor( + targetChainId: ChainName, + readonly directives: pyth_lazer_transaction.IGovernanceDirective[], + readonly minExecutionTimestamp?: Date, + readonly maxExecutionTimestamp?: Date, + readonly governanceSequenceNo?: number, + ) { + super(targetChainId, "LazerExecute"); + } + + static decode(data: Buffer): LazerExecute | undefined { + const decoded = PythGovernanceActionImpl.decodeWithPayload( + data, + "LazerExecute", + this.layout, + ); + if (!decoded) return undefined; + + try { + // Decode the protobuf GovernanceInstruction + const governanceInstruction = + pyth_lazer_transaction.GovernanceInstruction.decode( + decoded[1].governanceInstruction, + ); + + return new LazerExecute( + decoded[0].targetChainId, + governanceInstruction.directives || [], + governanceInstruction.minExecutionTimestamp + ? new Date( + governanceInstruction.minExecutionTimestamp.seconds * 1000 + + (governanceInstruction.minExecutionTimestamp.nanos || 0) / + 1000000, + ) + : undefined, + governanceInstruction.maxExecutionTimestamp + ? new Date( + governanceInstruction.maxExecutionTimestamp.seconds * 1000 + + (governanceInstruction.maxExecutionTimestamp.nanos || 0) / + 1000000, + ) + : undefined, + governanceInstruction.governanceSequenceNo || undefined, + ); + } catch (error) { + console.error("Failed to decode Lazer governance instruction:", error); + return undefined; + } + } + + encode(): Buffer { + try { + // Create the GovernanceInstruction protobuf message + const governanceInstruction = + pyth_lazer_transaction.GovernanceInstruction.create({ + directives: this.directives, + minExecutionTimestamp: this.minExecutionTimestamp + ? { + seconds: Math.floor( + this.minExecutionTimestamp.getTime() / 1000, + ), + nanos: (this.minExecutionTimestamp.getTime() % 1000) * 1000000, + } + : undefined, + maxExecutionTimestamp: this.maxExecutionTimestamp + ? { + seconds: Math.floor( + this.maxExecutionTimestamp.getTime() / 1000, + ), + nanos: (this.maxExecutionTimestamp.getTime() % 1000) * 1000000, + } + : undefined, + governanceSequenceNo: this.governanceSequenceNo, + }); + + // Validate the message before encoding + const error = pyth_lazer_transaction.GovernanceInstruction.verify( + governanceInstruction, + ); + if (error) { + throw new Error(`GovernanceInstruction validation failed: ${error}`); + } + + // Encode the protobuf message to bytes + const encodedInstruction = + pyth_lazer_transaction.GovernanceInstruction.encode( + governanceInstruction, + ).finish(); + + // Create a layout with the known instruction length for encoding + const layout_with_known_span: BufferLayout.Structure< + Readonly<{ + governanceInstruction: Uint8Array; + }> + > = BufferLayout.struct([ + BufferLayout.blob(encodedInstruction.length, "governanceInstruction"), + ]); + + return super.encodeWithPayload(layout_with_known_span, { + governanceInstruction: encodedInstruction, + }); + } catch (error) { + console.error("LazerExecute encoding error:", error); + console.error("Directives:", JSON.stringify(this.directives, null, 2)); + console.error("minExecutionTimestamp:", this.minExecutionTimestamp); + console.error("maxExecutionTimestamp:", this.maxExecutionTimestamp); + console.error("governanceSequenceNo:", this.governanceSequenceNo); + throw error; + } + } +} diff --git a/governance/xc_admin/packages/xc_admin_common/src/governance_payload/PythGovernanceAction.ts b/governance/xc_admin/packages/xc_admin_common/src/governance_payload/PythGovernanceAction.ts index f461791204..e636be98b4 100644 --- a/governance/xc_admin/packages/xc_admin_common/src/governance_payload/PythGovernanceAction.ts +++ b/governance/xc_admin/packages/xc_admin_common/src/governance_payload/PythGovernanceAction.ts @@ -24,6 +24,10 @@ export const EvmExecutorAction = { Execute: 0, } as const; +export const LazerExecutorAction = { + LazerExecute: 0, +} as const; + /** Helper to get the ActionName from a (moduleId, actionId) tuple*/ export function toActionName( deserialized: Readonly<{ moduleId: number; actionId: number }>, @@ -58,6 +62,11 @@ export function toActionName( deserialized.actionId == 0 ) { return "Execute"; + } else if ( + deserialized.moduleId == MODULE_LAZER_EXECUTOR && + deserialized.actionId == 0 + ) { + return "LazerExecute"; } return undefined; } @@ -65,7 +74,8 @@ export function toActionName( export declare type ActionName = | keyof typeof ExecutorAction | keyof typeof TargetAction - | keyof typeof EvmExecutorAction; + | keyof typeof EvmExecutorAction + | keyof typeof LazerExecutorAction; /** Governance header that should be in every Pyth crosschain governance message*/ export class PythGovernanceHeader { @@ -131,10 +141,15 @@ export class PythGovernanceHeader { } else if (this.action in TargetAction) { module = MODULE_TARGET; action = TargetAction[this.action as keyof typeof TargetAction]; - } else { + } else if (this.action in EvmExecutorAction) { module = MODULE_EVM_EXECUTOR; action = EvmExecutorAction[this.action as keyof typeof EvmExecutorAction]; + } else { + module = MODULE_LAZER_EXECUTOR; + action = + LazerExecutorAction[this.action as keyof typeof LazerExecutorAction]; } + if (toChainId(this.targetChainId) === undefined) throw new Error(`Invalid chain id ${this.targetChainId}`); const span = PythGovernanceHeader.layout.encode( @@ -154,7 +169,13 @@ export const MAGIC_NUMBER = 0x4d475450; export const MODULE_EXECUTOR = 0; export const MODULE_TARGET = 1; export const MODULE_EVM_EXECUTOR = 2; -export const MODULES = [MODULE_EXECUTOR, MODULE_TARGET, MODULE_EVM_EXECUTOR]; +export const MODULE_LAZER_EXECUTOR = 3; +export const MODULES = [ + MODULE_EXECUTOR, + MODULE_TARGET, + MODULE_EVM_EXECUTOR, + MODULE_LAZER_EXECUTOR, +]; export interface PythGovernanceAction { readonly targetChainId: ChainName; diff --git a/governance/xc_admin/packages/xc_admin_common/src/governance_payload/index.ts b/governance/xc_admin/packages/xc_admin_common/src/governance_payload/index.ts index 2919ec93e1..115297d8de 100644 --- a/governance/xc_admin/packages/xc_admin_common/src/governance_payload/index.ts +++ b/governance/xc_admin/packages/xc_admin_common/src/governance_payload/index.ts @@ -22,6 +22,7 @@ import { import { EvmExecute } from "./ExecuteAction"; import { SetTransactionFee } from "./SetTransactionFee"; import { WithdrawFee } from "./WithdrawFee"; +import { LazerExecute } from "./LazerExecute"; /** Decode a governance payload */ export function decodeGovernancePayload( @@ -75,6 +76,8 @@ export function decodeGovernancePayload( } case "Execute": return EvmExecute.decode(data); + case "LazerExecute": + return LazerExecute.decode(data); case "SetTransactionFee": return SetTransactionFee.decode(data); case "WithdrawFee": @@ -96,3 +99,4 @@ export * from "./SetTransactionFee"; export * from "./SetWormholeAddress"; export * from "./ExecuteAction"; export * from "./WithdrawFee"; +export * from "./LazerExecute"; diff --git a/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/lazer_functions.ts b/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/lazer_functions.ts index 999ceca14b..b518632135 100644 --- a/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/lazer_functions.ts +++ b/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/lazer_functions.ts @@ -15,6 +15,7 @@ import { LazerConfigChanges, } from "../types"; import { pyth_lazer_transaction } from "@pythnetwork/pyth-lazer-state-sdk/governance"; +import { ChainName, LazerExecute } from "../.."; /** * Converts LazerFeedMetadata to protobuf IMap format using protobufjs fromObject @@ -369,15 +370,15 @@ function isShardChange(key: string, change: any): change is ShardChange { export async function generateInstructions( changes: LazerConfigChanges, accounts: LazerInstructionAccounts, + targetChainId: ChainName, ): Promise { // This function converts configuration changes into Lazer governance instructions // using the new governance payload functions that properly encode protobuf messages. const instructions: TransactionInstruction[] = []; + const directives: pyth_lazer_transaction.IGovernanceDirective[] = []; - // Process each change and create corresponding governance instructions + // Process each change and create corresponding governance directives for (const [changeKey, change] of Object.entries(changes)) { - let governanceBuffer: Buffer | null = null; - if (isFeedChange(changeKey, change)) { const feedId = parseInt(changeKey.replace("feed_", "")); @@ -390,9 +391,13 @@ export async function generateInstructions( metadata: convertLazerFeedMetadataToMap(feedMetadata), permissionedPublishers: [], }); - const encoded = - pyth_lazer_transaction.AddFeed.encode(addFeedMessage).finish(); - governanceBuffer = Buffer.from(encoded); + + directives.push({ + shardFilter: { + allShards: {}, + }, + addFeed: addFeedMessage, + }); } else if (change.prev && change.new) { // Updating an existing feed const prevFeed = change.prev; @@ -411,11 +416,13 @@ export async function generateInstructions( }, }, }); - const encoded = - pyth_lazer_transaction.UpdateFeed.encode( - updateFeedMessage, - ).finish(); - governanceBuffer = Buffer.from(encoded); + + directives.push({ + shardFilter: { + allShards: {}, + }, + updateFeed: updateFeedMessage, + }); } // Check if pendingActivation changed @@ -433,11 +440,13 @@ export async function generateInstructions( }, }, }); - const encoded = - pyth_lazer_transaction.UpdateFeed.encode( - updateFeedMessage, - ).finish(); - governanceBuffer = Buffer.from(encoded); + + directives.push({ + shardFilter: { + allShards: {}, + }, + updateFeed: updateFeedMessage, + }); } else { // Deactivate feed const updateFeedMessage = pyth_lazer_transaction.UpdateFeed.create({ @@ -449,11 +458,13 @@ export async function generateInstructions( }, }, }); - const encoded = - pyth_lazer_transaction.UpdateFeed.encode( - updateFeedMessage, - ).finish(); - governanceBuffer = Buffer.from(encoded); + + directives.push({ + shardFilter: { + allShards: {}, + }, + updateFeed: updateFeedMessage, + }); } } } else if (change.prev && !change.new) { @@ -462,9 +473,13 @@ export async function generateInstructions( feedId: feedId, removeFeed: {}, }); - const encoded = - pyth_lazer_transaction.UpdateFeed.encode(updateFeedMessage).finish(); - governanceBuffer = Buffer.from(encoded); + + directives.push({ + shardFilter: { + allShards: {}, + }, + updateFeed: updateFeedMessage, + }); } } else if (isPublisherChange(changeKey, change)) { const publisherId = parseInt(changeKey.replace("publisher_", "")); @@ -481,11 +496,13 @@ export async function generateInstructions( ), isActive: newPublisher.isActive, }); - const encoded = - pyth_lazer_transaction.AddPublisher.encode( - addPublisherMessage, - ).finish(); - governanceBuffer = Buffer.from(encoded); + + directives.push({ + shardFilter: { + allShards: {}, + }, + addPublisher: addPublisherMessage, + }); } else if (change.prev && change.new) { // Updating an existing publisher const prevPublisher = change.prev; @@ -500,10 +517,13 @@ export async function generateInstructions( name: newPublisher.name, }, }); - const encoded = pyth_lazer_transaction.UpdatePublisher.encode( - updatePublisherMessage, - ).finish(); - governanceBuffer = Buffer.from(encoded); + + directives.push({ + shardFilter: { + allShards: {}, + }, + updatePublisher: updatePublisherMessage, + }); } // Check if public keys changed @@ -520,10 +540,13 @@ export async function generateInstructions( ), }, }); - const encoded = pyth_lazer_transaction.UpdatePublisher.encode( - updatePublisherMessage, - ).finish(); - governanceBuffer = Buffer.from(encoded); + + directives.push({ + shardFilter: { + allShards: {}, + }, + updatePublisher: updatePublisherMessage, + }); } // Check if active status changed @@ -535,24 +558,28 @@ export async function generateInstructions( isActive: newPublisher.isActive, }, }); - const encoded = pyth_lazer_transaction.UpdatePublisher.encode( - updatePublisherMessage, - ).finish(); - governanceBuffer = Buffer.from(encoded); + + directives.push({ + shardFilter: { + allShards: {}, + }, + updatePublisher: updatePublisherMessage, + }); } } else if (change.prev && !change.new) { // Removing a publisher - const prevPublisher = change.prev; - const updatePublisherMessage = pyth_lazer_transaction.UpdatePublisher.create({ publisherId: publisherId, removePublisher: {}, }); - const encoded = pyth_lazer_transaction.UpdatePublisher.encode( - updatePublisherMessage, - ).finish(); - governanceBuffer = Buffer.from(encoded); + + directives.push({ + shardFilter: { + allShards: {}, + }, + updatePublisher: updatePublisherMessage, + }); } } else if (isShardChange(changeKey, change)) { // Updating shard configuration @@ -566,31 +593,43 @@ export async function generateInstructions( pyth_lazer_transaction.SetShardName.create({ shardName: newShard.shardName, }); - const encoded = - pyth_lazer_transaction.SetShardName.encode( - setShardNameMessage, - ).finish(); - governanceBuffer = Buffer.from(encoded); + + directives.push({ + shardFilter: { + allShards: {}, + }, + setShardName: setShardNameMessage, + }); } } } + } - // Create Solana transaction instruction if we have a governance buffer - if (governanceBuffer) { - const instruction = new TransactionInstruction({ - keys: [ - { - pubkey: accounts.fundingAccount, - isSigner: true, - isWritable: true, - }, - ], - programId: LAZER_PROGRAM_ID, - data: governanceBuffer, - }); + // Create a single LazerExecute instruction with all directives if we have any + if (directives.length > 0) { + const lazerExecute = new LazerExecute( + targetChainId, + directives, + undefined, // minExecutionTimestamp + undefined, // maxExecutionTimestamp + undefined, // governanceSequenceNo + ); - instructions.push(instruction); - } + const governanceBuffer = lazerExecute.encode(); + + const instruction = new TransactionInstruction({ + keys: [ + { + pubkey: accounts.fundingAccount, + isSigner: true, + isWritable: true, + }, + ], + programId: LAZER_PROGRAM_ID, + data: governanceBuffer, + }); + + instructions.push(instruction); } return instructions; diff --git a/governance/xc_admin/packages/xc_admin_frontend/components/programs/PythLazer.tsx b/governance/xc_admin/packages/xc_admin_frontend/components/programs/PythLazer.tsx index 421bdea755..cef87c59cd 100644 --- a/governance/xc_admin/packages/xc_admin_frontend/components/programs/PythLazer.tsx +++ b/governance/xc_admin/packages/xc_admin_frontend/components/programs/PythLazer.tsx @@ -5,6 +5,10 @@ import Modal from '../common/Modal' import { validateUploadedConfig, ProgramType, + mapKey, + PRICE_FEED_MULTISIG, + getMultisigCluster, + isRemoteCluster, } from '@pythnetwork/xc-admin-common' import toast from 'react-hot-toast' import Loadbar from '../loaders/Loadbar' @@ -17,7 +21,6 @@ import { import { capitalizeFirstLetter } from '../../utils/capitalizeFirstLetter' import { generateInstructions } from '@pythnetwork/xc-admin-common/lib/programs/lazer/lazer_functions' import { useMultisigContext } from '../../contexts/MultisigContext' -import { PublicKey } from '@solana/web3.js' interface PythLazerProps { proposerServerUrl: string @@ -367,7 +370,8 @@ const PythLazer = ({ const [isModalOpen, setIsModalOpen] = useState(false) const [isSendProposalButtonLoading, setIsSendProposalButtonLoading] = useState(false) - const { isLoading: isMultisigLoading } = useMultisigContext() + const { isLoading: isMultisigLoading, readOnlySquads } = useMultisigContext() + const isRemote: boolean = isRemoteCluster(cluster) const openModal = () => { setIsModalOpen(true) @@ -440,12 +444,20 @@ const PythLazer = ({ setIsSendProposalButtonLoading(true) if (dataChanges && !isMultisigLoading) { try { + const multisigAuthority = readOnlySquads.getAuthorityPDA( + PRICE_FEED_MULTISIG[getMultisigCluster(cluster)], + 1 + ) + const fundingAccount = isRemote + ? mapKey(multisigAuthority) + : multisigAuthority // Generate the instructions for the proposal const instructions = await generateInstructions( dataChanges as LazerConfigChanges, { - fundingAccount: new PublicKey(1), - } + fundingAccount, + }, + 'lazer_production' ) console.log('Generated instructions:', instructions) From 5f2ba2e76159ebfb22e4c33b618e125b6921d62a Mon Sep 17 00:00:00 2001 From: Daniel Chew Date: Thu, 12 Jun 2025 13:50:47 +0900 Subject: [PATCH 26/27] feat: add Lazer environment switch and context management --- .../components/LazerEnvSwitch.tsx | 96 +++++++++++++++++++ .../components/programs/PythLazer.tsx | 14 ++- .../contexts/ClusterContext.tsx | 4 +- .../contexts/LazerEnvContext.tsx | 33 +++++++ .../packages/xc_admin_frontend/pages/_app.tsx | 39 ++++---- 5 files changed, 163 insertions(+), 23 deletions(-) create mode 100644 governance/xc_admin/packages/xc_admin_frontend/components/LazerEnvSwitch.tsx create mode 100644 governance/xc_admin/packages/xc_admin_frontend/contexts/LazerEnvContext.tsx diff --git a/governance/xc_admin/packages/xc_admin_frontend/components/LazerEnvSwitch.tsx b/governance/xc_admin/packages/xc_admin_frontend/components/LazerEnvSwitch.tsx new file mode 100644 index 0000000000..ab95cd0afb --- /dev/null +++ b/governance/xc_admin/packages/xc_admin_frontend/components/LazerEnvSwitch.tsx @@ -0,0 +1,96 @@ +import { Menu, Transition } from '@headlessui/react' +import { useRouter } from 'next/router' +import { Fragment, useCallback, useContext, useEffect } from 'react' +import { + LazerEnvContext, + DEFAULT_LAZER_ENV, + LazerEnv, +} from '../contexts/LazerEnvContext' +import Arrow from '@images/icons/down.inline.svg' + +const LazerEnvSwitch = ({ light }: { light?: boolean | null }) => { + const router = useRouter() + + const { lazerEnv, setLazerEnv } = useContext(LazerEnvContext) + const handleChange = useCallback( + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (event: any) => { + if (event.target.value) { + router.query.lazerEnv = event.target.value + setLazerEnv(event.target.value) + router.push( + { + pathname: router.pathname, + query: router.query, + }, + undefined, + { scroll: false } + ) + } + }, + [setLazerEnv, router] + ) + + useEffect(() => { + router?.query?.lazerEnv + ? setLazerEnv(router.query.lazerEnv as LazerEnv) + : setLazerEnv(DEFAULT_LAZER_ENV) + }, [setLazerEnv, router]) + + const environments = [ + { + value: 'production', + name: 'production', + }, + { + value: 'staging', + name: 'staging', + }, + ] + + return ( + + {({ open }) => ( + <> + + {lazerEnv} + + + + + {environments.map((env) => ( + + + + ))} + + + + )} + + ) +} + +export default LazerEnvSwitch diff --git a/governance/xc_admin/packages/xc_admin_frontend/components/programs/PythLazer.tsx b/governance/xc_admin/packages/xc_admin_frontend/components/programs/PythLazer.tsx index cef87c59cd..aa0f33b31a 100644 --- a/governance/xc_admin/packages/xc_admin_frontend/components/programs/PythLazer.tsx +++ b/governance/xc_admin/packages/xc_admin_frontend/components/programs/PythLazer.tsx @@ -1,6 +1,8 @@ import React, { useState, useContext } from 'react' import { usePythContext } from '../../contexts/PythContext' import { ClusterContext } from '../../contexts/ClusterContext' +import { LazerEnvContext } from '../../contexts/LazerEnvContext' +import LazerEnvSwitch from '../LazerEnvSwitch' import Modal from '../common/Modal' import { validateUploadedConfig, @@ -365,13 +367,14 @@ const PythLazer = ({ }: PythLazerProps) => { const { dataIsLoading, lazerState } = usePythContext() const { cluster } = useContext(ClusterContext) + const { lazerEnv } = useContext(LazerEnvContext) + const { isLoading: isMultisigLoading, readOnlySquads } = useMultisigContext() + const isRemote: boolean = isRemoteCluster(cluster) const [dataChanges, setDataChanges] = useState() const [isModalOpen, setIsModalOpen] = useState(false) const [isSendProposalButtonLoading, setIsSendProposalButtonLoading] = useState(false) - const { isLoading: isMultisigLoading, readOnlySquads } = useMultisigContext() - const isRemote: boolean = isRemoteCluster(cluster) const openModal = () => { setIsModalOpen(true) @@ -389,7 +392,7 @@ const PythLazer = ({ encodeURIComponent(JSON.stringify(lazerState, null, 2)) const downloadAnchor = document.createElement('a') downloadAnchor.setAttribute('href', dataStr) - downloadAnchor.setAttribute('download', `lazer_config.json`) + downloadAnchor.setAttribute('download', `lazer_config_${lazerEnv}.json`) document.body.appendChild(downloadAnchor) // required for firefox downloadAnchor.click() downloadAnchor.remove() @@ -457,7 +460,7 @@ const PythLazer = ({ { fundingAccount, }, - 'lazer_production' + `lazer_${lazerEnv}` // Use the selected lazer environment ) console.log('Generated instructions:', instructions) @@ -492,6 +495,9 @@ const PythLazer = ({ /> } /> +
+ +
{dataIsLoading || !lazerState ? (
diff --git a/governance/xc_admin/packages/xc_admin_frontend/contexts/ClusterContext.tsx b/governance/xc_admin/packages/xc_admin_frontend/contexts/ClusterContext.tsx index 9948439381..8105e1655e 100644 --- a/governance/xc_admin/packages/xc_admin_frontend/contexts/ClusterContext.tsx +++ b/governance/xc_admin/packages/xc_admin_frontend/contexts/ClusterContext.tsx @@ -8,7 +8,9 @@ export const ClusterContext = createContext<{ setCluster: (_cluster: PythCluster) => void }>({ cluster: DEFAULT_CLUSTER, - setCluster: () => {}, + setCluster: () => { + // Default no-op function + }, }) export const ClusterProvider = ({ children }: { children: ReactNode }) => { diff --git a/governance/xc_admin/packages/xc_admin_frontend/contexts/LazerEnvContext.tsx b/governance/xc_admin/packages/xc_admin_frontend/contexts/LazerEnvContext.tsx new file mode 100644 index 0000000000..5a73796fe4 --- /dev/null +++ b/governance/xc_admin/packages/xc_admin_frontend/contexts/LazerEnvContext.tsx @@ -0,0 +1,33 @@ +import React, { createContext, useState, ReactNode } from 'react' + +export type LazerEnv = 'production' | 'staging' + +export const DEFAULT_LAZER_ENV: LazerEnv = 'production' + +interface LazerEnvContextType { + lazerEnv: LazerEnv + setLazerEnv: (env: LazerEnv) => void +} + +export const LazerEnvContext = createContext({ + lazerEnv: DEFAULT_LAZER_ENV, + setLazerEnv: () => { + // Default no-op function + }, +}) + +interface LazerEnvProviderProps { + children: ReactNode +} + +export const LazerEnvProvider: React.FC = ({ + children, +}) => { + const [lazerEnv, setLazerEnv] = useState(DEFAULT_LAZER_ENV) + + return ( + + {children} + + ) +} diff --git a/governance/xc_admin/packages/xc_admin_frontend/pages/_app.tsx b/governance/xc_admin/packages/xc_admin_frontend/pages/_app.tsx index 6951ffde06..67b290495a 100644 --- a/governance/xc_admin/packages/xc_admin_frontend/pages/_app.tsx +++ b/governance/xc_admin/packages/xc_admin_frontend/pages/_app.tsx @@ -24,6 +24,7 @@ import { ProgramProvider } from '../contexts/ProgramContext' import SEO from '../next-seo.config' import '../styles/globals.css' import { NuqsAdapter } from 'nuqs/adapters/next/pages' +import { LazerEnvProvider } from '../contexts/LazerEnvContext' const walletConnectConfig: WalletConnectWalletAdapterConfig = { network: WalletAdapterNetwork.Mainnet, @@ -69,25 +70,27 @@ function MyApp({ Component, pageProps }: AppProps) { - - - + + + + + + + - - - - - + + From b2be32c976773846bfe1da7df33a7e9eb532bad5 Mon Sep 17 00:00:00 2001 From: Daniel Chew Date: Thu, 12 Jun 2025 14:53:27 +0900 Subject: [PATCH 27/27] fix: improve error handling and logging in proposer server; refactor LazerExecute instruction creation --- .../packages/proposer_server/src/index.ts | 2 + .../src/programs/lazer/lazer_functions.ts | 13 +++-- .../components/programs/PythLazer.tsx | 22 +++++---- lazer/state_sdk/js/package.json | 4 +- pnpm-lock.yaml | 48 ++++++++++--------- 5 files changed, 50 insertions(+), 39 deletions(-) diff --git a/governance/xc_admin/packages/proposer_server/src/index.ts b/governance/xc_admin/packages/proposer_server/src/index.ts index b6c88f9027..23d8484d6b 100644 --- a/governance/xc_admin/packages/proposer_server/src/index.ts +++ b/governance/xc_admin/packages/proposer_server/src/index.ts @@ -90,8 +90,10 @@ app.post("/api/propose", async (req: Request, res: Response) => { res.status(200).json({ proposalPubkey: proposalPubkey }); } catch (error) { if (error instanceof Error) { + console.error(error); res.status(500).json(error.message); } else { + console.error(error); res.status(500).json("An unknown error occurred"); } } diff --git a/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/lazer_functions.ts b/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/lazer_functions.ts index b518632135..a3f255020b 100644 --- a/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/lazer_functions.ts +++ b/governance/xc_admin/packages/xc_admin_common/src/programs/lazer/lazer_functions.ts @@ -1,21 +1,18 @@ import { PublicKey, TransactionInstruction } from "@solana/web3.js"; import { PythCluster } from "@pythnetwork/client"; import { - ValidationResult, LazerValidationResult, ProgramType, LazerConfig, LazerState, LazerFeedMetadata, - LazerFeed, - LazerPublisher, ShardChange, FeedChange, PublisherChange, LazerConfigChanges, } from "../types"; import { pyth_lazer_transaction } from "@pythnetwork/pyth-lazer-state-sdk/governance"; -import { ChainName, LazerExecute } from "../.."; +import { ChainName, LazerExecute, WORMHOLE_ADDRESS } from "../.."; /** * Converts LazerFeedMetadata to protobuf IMap format using protobufjs fromObject @@ -605,11 +602,13 @@ export async function generateInstructions( } } - // Create a single LazerExecute instruction with all directives if we have any - if (directives.length > 0) { + // Create one LazerExecute instruction per directive + for (let i = 0; i < directives.length; i++) { + const directive = directives[i]; + const lazerExecute = new LazerExecute( targetChainId, - directives, + [directive], // Single directive per instruction undefined, // minExecutionTimestamp undefined, // maxExecutionTimestamp undefined, // governanceSequenceNo diff --git a/governance/xc_admin/packages/xc_admin_frontend/components/programs/PythLazer.tsx b/governance/xc_admin/packages/xc_admin_frontend/components/programs/PythLazer.tsx index aa0f33b31a..c177b66f1b 100644 --- a/governance/xc_admin/packages/xc_admin_frontend/components/programs/PythLazer.tsx +++ b/governance/xc_admin/packages/xc_admin_frontend/components/programs/PythLazer.tsx @@ -23,6 +23,7 @@ import { import { capitalizeFirstLetter } from '../../utils/capitalizeFirstLetter' import { generateInstructions } from '@pythnetwork/xc-admin-common/lib/programs/lazer/lazer_functions' import { useMultisigContext } from '../../contexts/MultisigContext' +import axios from 'axios' interface PythLazerProps { proposerServerUrl: string @@ -363,7 +364,7 @@ const ModalContent: React.FC = ({ } const PythLazer = ({ - proposerServerUrl: _proposerServerUrl, + proposerServerUrl: proposerServerUrl, }: PythLazerProps) => { const { dataIsLoading, lazerState } = usePythContext() const { cluster } = useContext(ClusterContext) @@ -465,17 +466,20 @@ const PythLazer = ({ console.log('Generated instructions:', instructions) - // In a real implementation, this would send the proposal to the server - await new Promise((resolve) => setTimeout(resolve, 2000)) // Mock delay - - // Close the modal and show success notification - setIsModalOpen(false) - toast.success('Proposal sent successfully!') + const response = await axios.post(proposerServerUrl + '/api/propose', { + instructions, + cluster, + }) + const { proposalPubkey } = response.data + toast.success(`Proposal sent! 🚀 Proposal Pubkey: ${proposalPubkey}`) + setIsSendProposalButtonLoading(false) + closeModal() } catch (error) { - if (error instanceof Error) { + if (axios.isAxiosError(error) && error.response) { + toast.error(capitalizeFirstLetter(error.response.data)) + } else if (error instanceof Error) { toast.error(capitalizeFirstLetter(error.message)) } - } finally { setIsSendProposalButtonLoading(false) } } diff --git a/lazer/state_sdk/js/package.json b/lazer/state_sdk/js/package.json index d83514a010..2dc97b385e 100644 --- a/lazer/state_sdk/js/package.json +++ b/lazer/state_sdk/js/package.json @@ -40,5 +40,7 @@ "oracle" ], "license": "Apache-2.0", - "dependencies": {} + "dependencies": { + "protobufjs": "^7.5.3" + } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9d5d51bc03..6cb69681c4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1989,13 +1989,17 @@ importers: version: 5.8.2 lazer/state_sdk/js: + dependencies: + protobufjs: + specifier: ^7.5.3 + version: 7.5.3 devDependencies: prettier: specifier: 'catalog:' version: 3.5.3 protobufjs-cli: specifier: ^1.1.3 - version: 1.1.3(protobufjs@7.5.2) + version: 1.1.3(protobufjs@7.5.3) packages/component-library: dependencies: @@ -19315,8 +19319,8 @@ packages: resolution: {integrity: sha512-mRUWCc3KUU4w1jU8sGxICXH/gNS94DvI1gxqDvBzhj1JpcsimQkYiOJfwsPUykUI5ZaspFbSgmBLER8IrQ3tqw==} engines: {node: '>=12.0.0'} - protobufjs@7.5.2: - resolution: {integrity: sha512-f2ls6rpO6G153Cy+o2XQ+Y0sARLOZ17+OGVLHrc3VUKcLHYKEKWbkSujdBWQXM7gKn5NTfp0XnRPZn1MIu8n9w==} + protobufjs@7.5.3: + resolution: {integrity: sha512-sildjKwVqOI2kmFDiXQ6aEB0fjYTafpEvIBs8tOR8qI4spuL9OPROLVu2qZqi/xgCfsHIwVqlaF8JBjWFHnKbw==} engines: {node: '>=12.0.0'} proxy-addr@2.0.7: @@ -25295,7 +25299,7 @@ snapshots: '@certusone/wormhole-sdk-proto-web@0.0.6(google-protobuf@3.21.4)': dependencies: '@improbable-eng/grpc-web': 0.15.0(google-protobuf@3.21.4) - protobufjs: 7.5.2 + protobufjs: 7.5.3 rxjs: 7.8.2 transitivePeerDependencies: - google-protobuf @@ -25303,7 +25307,7 @@ snapshots: '@certusone/wormhole-sdk-proto-web@0.0.7(google-protobuf@3.21.4)': dependencies: '@improbable-eng/grpc-web': 0.15.0(google-protobuf@3.21.4) - protobufjs: 7.5.2 + protobufjs: 7.5.3 rxjs: 7.8.2 transitivePeerDependencies: - google-protobuf @@ -27830,7 +27834,7 @@ snapshots: dependencies: lodash.camelcase: 4.3.0 long: 5.3.1 - protobufjs: 7.5.2 + protobufjs: 7.5.3 yargs: 17.7.2 '@hapi/hoek@9.3.0': {} @@ -28042,14 +28046,14 @@ snapshots: dependencies: '@injectivelabs/grpc-web': 0.0.1(google-protobuf@3.21.4) google-protobuf: 3.21.4 - protobufjs: 7.5.2 + protobufjs: 7.5.3 rxjs: 7.8.2 '@injectivelabs/core-proto-ts@0.0.14': dependencies: '@injectivelabs/grpc-web': 0.0.1(google-protobuf@3.21.4) google-protobuf: 3.21.4 - protobufjs: 7.5.2 + protobufjs: 7.5.3 rxjs: 7.8.2 optional: true @@ -28057,21 +28061,21 @@ snapshots: dependencies: '@injectivelabs/grpc-web': 0.0.1(google-protobuf@3.21.4) google-protobuf: 3.21.4 - protobufjs: 7.5.2 + protobufjs: 7.5.3 rxjs: 7.8.2 '@injectivelabs/core-proto-ts@1.14.3': dependencies: '@injectivelabs/grpc-web': 0.0.1(google-protobuf@3.21.4) google-protobuf: 3.21.4 - protobufjs: 7.5.2 + protobufjs: 7.5.3 rxjs: 7.8.2 '@injectivelabs/dmm-proto-ts@1.0.19': dependencies: '@injectivelabs/grpc-web': 0.0.1(google-protobuf@3.21.4) google-protobuf: 3.21.4 - protobufjs: 7.5.2 + protobufjs: 7.5.3 rxjs: 7.8.2 '@injectivelabs/exceptions@1.14.47': @@ -28095,7 +28099,7 @@ snapshots: dependencies: '@injectivelabs/grpc-web': 0.0.1(google-protobuf@3.21.4) google-protobuf: 3.21.4 - protobufjs: 7.5.2 + protobufjs: 7.5.3 rxjs: 7.8.2 optional: true @@ -28103,28 +28107,28 @@ snapshots: dependencies: '@injectivelabs/grpc-web': 0.0.1(google-protobuf@3.21.4) google-protobuf: 3.21.4 - protobufjs: 7.5.2 + protobufjs: 7.5.3 rxjs: 7.8.2 '@injectivelabs/indexer-proto-ts@1.13.9': dependencies: '@injectivelabs/grpc-web': 0.0.1(google-protobuf@3.21.4) google-protobuf: 3.21.4 - protobufjs: 7.5.2 + protobufjs: 7.5.3 rxjs: 7.8.2 '@injectivelabs/mito-proto-ts@1.0.62': dependencies: '@injectivelabs/grpc-web': 0.0.1(google-protobuf@3.21.4) google-protobuf: 3.21.4 - protobufjs: 7.5.2 + protobufjs: 7.5.3 rxjs: 7.8.2 '@injectivelabs/mito-proto-ts@1.0.9': dependencies: '@injectivelabs/grpc-web': 0.0.1(google-protobuf@3.21.4) google-protobuf: 3.21.4 - protobufjs: 7.5.2 + protobufjs: 7.5.3 rxjs: 7.8.2 optional: true @@ -28132,7 +28136,7 @@ snapshots: dependencies: '@injectivelabs/grpc-web': 0.0.1(google-protobuf@3.21.4) google-protobuf: 3.21.4 - protobufjs: 7.5.2 + protobufjs: 7.5.3 rxjs: 7.8.2 '@injectivelabs/networks@1.10.12': @@ -28154,7 +28158,7 @@ snapshots: dependencies: '@injectivelabs/grpc-web': 0.0.1(google-protobuf@3.21.4) google-protobuf: 3.21.4 - protobufjs: 7.5.2 + protobufjs: 7.5.3 rxjs: 7.8.2 '@injectivelabs/sdk-ts@1.10.72(@types/react@19.1.0)(bufferutil@4.0.9)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(utf-8-validate@5.0.10)': @@ -41685,7 +41689,7 @@ snapshots: '@grpc/grpc-js': 1.13.2 '@grpc/proto-loader': 0.7.13 docker-modem: 5.0.6 - protobufjs: 7.5.2 + protobufjs: 7.5.3 tar-fs: 2.1.2 uuid: 10.0.0 transitivePeerDependencies: @@ -49506,7 +49510,7 @@ snapshots: property-information@7.0.0: {} - protobufjs-cli@1.1.3(protobufjs@7.5.2): + protobufjs-cli@1.1.3(protobufjs@7.5.3): dependencies: chalk: 4.1.2 escodegen: 1.14.3 @@ -49515,7 +49519,7 @@ snapshots: glob: 8.1.0 jsdoc: 4.0.4 minimist: 1.2.8 - protobufjs: 7.5.2 + protobufjs: 7.5.3 semver: 7.7.1 tmp: 0.2.3 uglify-js: 3.19.3 @@ -49551,7 +49555,7 @@ snapshots: '@types/node': 18.19.86 long: 5.3.1 - protobufjs@7.5.2: + protobufjs@7.5.3: dependencies: '@protobufjs/aspromise': 1.1.2 '@protobufjs/base64': 1.1.2