UNPKG

@energyweb/node-red-contrib-green-proof-worker

Version:
41 lines (40 loc) 1.64 kB
import * as z from 'zod'; import type { RuntimeApi } from '../api'; import { Vote } from '../types'; declare const InputMessage: z.ZodObject<{ payload: z.ZodObject<{ voting: z.ZodArray<z.ZodObject<{ votingId: z.ZodString; vote: z.ZodString; }, z.core.$strip>>; }, z.core.$loose>; }, z.core.$loose>; declare const Config: z.ZodObject<{ indexerUrl: z.ZodURL; workerAddress: z.ZodString; noHashing: z.ZodBoolean; }, z.core.$strip>; /** Based on https://github.com/energywebfoundation/node-red-contrib-energywebx/blob/master/submit-solution.js */ export declare const VotingMarketplace: (api: RuntimeApi) => { new (rawConfig: any): { config: Promise<z.infer<typeof Config>>; onInput(message: z.infer<typeof InputMessage>): Promise<void>; sendResult(payload: Vote): Promise<void>; api: RuntimeApi; nodeConfig: unknown; messageZod: z.ZodObject<{ payload: z.ZodObject<{ voting: z.ZodArray<z.ZodObject<{ votingId: z.ZodString; vote: z.ZodString; }, z.core.$strip>>; }, z.core.$loose>; }, z.core.$loose>; getBaseUrls(): Promise<z.core.output<typeof import("../node").BaseUrlsConfig>>; getNodeEnvConfig(): import("../node").NodeEnvConfig; sendBuilder(inputMessage: import("../types").NodeMessage<any>): import("../node").SendBuilder; onDestroy?(): void | Promise<void>; handleMaybePromise<T>(maybePromiseCb: () => (T | Promise<T>), done: (err?: Error) => void): void; }; }; export {};