forked from stake-house/wagyu-key-gen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
renderer.d.ts
59 lines (50 loc) · 1.74 KB
/
renderer.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// renderer.d.ts
/**
* This file contains the typescript type hinting for the preload.ts API.
*/
import {
OpenDialogOptions,
OpenDialogReturnValue
} from "electron";
import {
FileOptions,
FileResult
} from "tmp";
import {
PathLike,
Stats,
Dirent
} from "fs"
import {
ChildProcess
} from "child_process"
export interface IElectronAPI {
clipboardWriteText: (ext: string, type?: "selection" | "clipboard" | undefined) => void,
invokeShowOpenDialog: (options: OpenDialogOptions) => Promise<OpenDialogReturnValue>
ipcRendererSendClose: () => void,
shellShowItemInFolder: (fullPath: string) => void,
}
export interface IEth2DepositAPI {
createMnemonic: (language: string) => Promise<string>,
generateBLSChange: (folder: string, chain: string, mnemonic: string, index: number, indices: string, withdrawal_credentials: string, execution_address: string) => Promise<void>,
generateKeys: (mnemonic: string, index: number, count: number, network: string,
password: string, eth1_withdrawal_address: string, folder: string) => Promise<void>,
validateBLSCredentials: (chain: string, mnemonic: string, index: number, withdrawal_credentials: string) => Promise<void>,
validateMnemonic: (mnemonic: string) => Promise<void>,
}
export interface IBashUtilsAPI {
doesDirectoryExist: (directory: string) => Promise<boolean>,
findFirstFile: (directory: string, startsWith: string) => Promise<string>
isDirectoryWritable: (directory: string) => Promise<boolean>,
}
export interface IWeb3UtilsAPI {
isAddress: (address: string, chainId?: number | undefined) => Promise<boolean>
}
declare global {
interface Window {
electronAPI: IElectronAPI,
eth2Deposit: IEth2DepositAPI,
bashUtils: IBashUtilsAPI,
web3Utils: IWeb3UtilsAPI
}
}