UNPKG

@etherna/sdk-js

Version:

Etherna SDKs for operations on the network

46 lines 1.95 kB
import type { BatchId, GatewayBatch, PostageBatch } from "../clients"; export declare enum BatchUpdateType { Create = 1, Topup = 2, Dilute = 4 } export type UpdatingBatch = { id: BatchId; depth: number; amount: string; flag: BatchUpdateType; }; export type BatchesState = { updatingBatches: UpdatingBatch[]; addBatchUpdate(batch: PostageBatch | GatewayBatch | UpdatingBatch, type: BatchUpdateType): void; removeBatchUpdate(batchId: BatchId): void; }; export declare const batchesStore: Omit<Omit<Omit<import("zustand/vanilla").StoreApi<BatchesState>, "setState"> & { setState<A extends string | { type: string; }>(partial: BatchesState | Partial<BatchesState> | ((state: BatchesState) => BatchesState | Partial<BatchesState>), replace?: boolean | undefined, action?: A | undefined): void; }, "persist"> & { persist: { setOptions: (options: Partial<import("zustand/middleware").PersistOptions<BatchesState, unknown>>) => void; clearStorage: () => void; rehydrate: () => void | Promise<void>; hasHydrated: () => boolean; onHydrate: (fn: (state: BatchesState) => void) => () => void; onFinishHydration: (fn: (state: BatchesState) => void) => () => void; getOptions: () => Partial<import("zustand/middleware").PersistOptions<BatchesState, unknown>>; }; }, "setState"> & { setState(nextStateOrUpdater: BatchesState | Partial<BatchesState> | ((state: { updatingBatches: { id: BatchId; depth: number; amount: string; flag: BatchUpdateType; }[]; addBatchUpdate: (batch: PostageBatch | GatewayBatch | UpdatingBatch, type: BatchUpdateType) => void; removeBatchUpdate: (batchId: BatchId) => void; }) => void), shouldReplace?: boolean | undefined, action?: string | { type: string; } | undefined): void; }; //# sourceMappingURL=batches.d.ts.map