import type { MDSResponse } from '../../types.js'; import type { BalanceParams, CheckAddressParams, CoinCheckParams, CoinExportParams, CoinImportParams, CoinTrackParams, ConsolidateParams, ConvertParams, HashTestParams, HistoryParams, PrintTreeParams, QuitParams, SeedRandomParams, StatusParams, TokenCreateParams, TokenValidateParams, TraceParams } from './params.js'; import type { BalanceReturnType, Block, CheckAddress, CoinCheck, CoinExportResponse, CoinImport, Convert, GetAddress, HashTest, HistoryResponse, NewAddress, PrintMmrResponse, PrintTree, Quit, SeedRandom, Status, TokenCreate, TokenValidate, Trace } from './response.js'; import type { Transaction } from '../send/response.js'; import type { Prettify } from '../../helpers.js'; /** * Balance function types */ export type BalanceCallback = (data: BalanceReturnType) => void; export type BalanceFunc = (...args: T extends undefined ? [BalanceCallback?] : T extends BalanceParams ? [T, BalanceCallback?] : [{ params: BalanceParams; }, BalanceCallback?]) => Promise>; /** * Block function types */ export type BlockCallback = (data: MDSResponse) => void; export type BlockFunc = (callback?: BlockCallback) => Promise>; /** * CheckAddress function types */ export type CheckAddressCallback = (data: MDSResponse) => void; export type CheckAddressFunc = (args: { params: CheckAddressParams; }, callback?: CheckAddressCallback) => Promise>; /** * CoinCheck function types */ export type CoinCheckCallback = (data: MDSResponse) => void; export type CoinCheckFunc = (args: { params: CoinCheckParams; }, callback?: CoinCheckCallback) => Promise>; /** * GetAddress function types */ export type GetAddressCallback = (data: MDSResponse) => void; export type GetAddressFunc = (callback?: GetAddressCallback) => Promise>; /** * HashTest function types */ export type HashTestCallback = (data: MDSResponse) => void; type HashTestFuncParams = T extends undefined ? [HashTestCallback?] : [{ params: HashTestParams; }, HashTestCallback?]; export type HashTestFunc = (...args: HashTestFuncParams) => Promise>; /** * CoinTrack function types */ export type CoinTrackCallback = (data: MDSResponse) => void; export type CoinTrackFunc = (args: { params: CoinTrackParams; }, callback?: CoinTrackCallback) => Promise>; /** * NewAddress function types */ export type NewAddressCallback = (data: MDSResponse) => void; export type NewAddressFunc = (callback?: NewAddressCallback) => Promise>; /** * Consolidate function types */ export type ConsolidateCallback = (data: MDSResponse) => void; export type ConsolidateFunc = (args: { params: ConsolidateParams; }, callback?: ConsolidateCallback) => Promise>; /** * TokenValidate function types */ export type TokenValidateCallback = (data: MDSResponse) => void; export type TokenValidateFunc = (args: { params: TokenValidateParams; }, callback?: TokenValidateCallback) => Promise>; /** * TokenCreate function types */ export type TokenCreateCallback = (data: MDSResponse) => void; export type TokenCreateFunc = (args: { params: TokenCreateParams; }, callback?: TokenCreateCallback) => Promise>; /** * Trace function types */ export type TraceCallback = (data: MDSResponse) => void; export type TraceFunc = (args: { params: TraceParams; }, callback?: TraceCallback) => Promise>; /** * Status function types */ type StatusFuncParams = T extends undefined ? [StatusCallback?] : [{ params: StatusParams; }, StatusCallback?]; export type StatusCallback = (data: MDSResponse) => void; export type StatusFunc = (...args: StatusFuncParams) => Promise>; /** * SeedRandom function types */ export type SeedRandomCallback = (data: MDSResponse) => void; export type SeedRandomFunc = (args: { params: SeedRandomParams; }, callback?: SeedRandomCallback) => Promise>; /** * Quit function types */ export type QuitCallback = (data: Prettify) => void; type QuitFuncParams = T extends undefined ? [QuitCallback?] : [{ params: QuitParams; }, QuitCallback?]; export type QuitFunc = (...args: T extends undefined ? [QuitCallback?] : QuitFuncParams) => Promise>; /** * PrintTree function types */ export type PrintTreeCallback = (data: MDSResponse) => void; type PrintTreeFuncParams = T extends undefined ? [PrintTreeCallback?] : [{ params: PrintTreeParams; }, PrintTreeCallback?]; export type PrintTreeFunc = (...args: T extends undefined ? [PrintTreeCallback?] : PrintTreeFuncParams) => Promise>; /** * PrintMmr function types */ export type PrintMmrCallback = (data: MDSResponse) => void; export type PrintMmrFunc = (callback?: PrintMmrCallback) => Promise>; /** * History function types */ export type HistoryCallback = (data: MDSResponse) => void; type HistoryFuncParams = T extends undefined ? [HistoryCallback?] : [{ params: HistoryParams; }, HistoryCallback?]; export type HistoryFunc = (...args: T extends undefined ? [HistoryCallback?] : HistoryFuncParams) => Promise>; /** * CoinExport function types */ export type CoinExportCallback = (data: MDSResponse) => void; export type CoinExportFunc = (args: { params: CoinExportParams; }, callback?: CoinExportCallback) => Promise>; /** * CoinImport function types */ export type CoinImportCallback = (data: MDSResponse) => void; export type CoinImportFunc = (args: { params: CoinImportParams; }, callback?: CoinImportCallback) => Promise>; /** * Convert function types */ export type ConvertCallback = (data: MDSResponse) => void; export type ConvertFunc = (args: { params: ConvertParams; }, callback?: ConvertCallback) => Promise>; export {}; //# sourceMappingURL=functions.d.ts.map