@energyweb/node-red-contrib-green-proof-worker
Version:
## Peer dependencies
108 lines (107 loc) • 2.57 kB
TypeScript
import * as z from 'zod';
export type NodeMessage<T> = {
payload?: T;
topic?: string;
_msgid?: string;
};
export declare const Vote: z.ZodObject<{
votingId: z.ZodString;
vote: z.ZodString;
}, "strip", z.ZodTypeAny, {
votingId: string;
vote: string;
}, {
votingId: string;
vote: string;
}>;
export type Vote = z.infer<typeof Vote>;
export declare const VOTE_APPROVE = "approve";
export declare const VOTE_REJECT = "reject";
export declare const TxChange: z.ZodObject<{
prevOwner: z.ZodNullable<z.ZodString>;
owner: z.ZodString;
volume: z.ZodNumber;
unitId: z.ZodString;
}, "strip", z.ZodTypeAny, {
prevOwner: string | null;
owner: string;
volume: number;
unitId: string;
}, {
prevOwner: string | null;
owner: string;
volume: number;
unitId: string;
}>;
export declare const TxLog: z.ZodObject<{
rootUnitId: z.ZodString;
changes: z.ZodArray<z.ZodObject<{
prevOwner: z.ZodNullable<z.ZodString>;
owner: z.ZodString;
volume: z.ZodNumber;
unitId: z.ZodString;
}, "strip", z.ZodTypeAny, {
prevOwner: string | null;
owner: string;
volume: number;
unitId: string;
}, {
prevOwner: string | null;
owner: string;
volume: number;
unitId: string;
}>, "many">;
}, "strip", z.ZodTypeAny, {
rootUnitId: string;
changes: {
prevOwner: string | null;
owner: string;
volume: number;
unitId: string;
}[];
}, {
rootUnitId: string;
changes: {
prevOwner: string | null;
owner: string;
volume: number;
unitId: string;
}[];
}>;
export declare const LedgerEntry: z.ZodObject<{
accountId: z.ZodString;
rootUnitId: z.ZodString;
volume: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
volume: number;
rootUnitId: string;
accountId: string;
}, {
volume: number;
rootUnitId: string;
accountId: string;
}>;
export type TxChange = z.infer<typeof TxChange>;
export type TxLog = z.infer<typeof TxLog>;
export type LedgerTable = {
account_id: string;
root_unit_id: string;
volume: number;
};
export type ProcessedTable = {
unit_id: string;
root_unit_id: string;
owner: string;
prev_owner: string | null;
volume: number;
created_at: number;
};
export type AckedMessageTable = {
messageId: string;
created_at: number;
};
export type SqliteDatabase = {
ledger: LedgerTable;
processed: ProcessedTable;
acked_message: AckedMessageTable;
};