2025-10-29 19:55:44 +07:00
|
|
|
// See the Electron documentation for details on how to use preload scripts:
|
|
|
|
|
// https://www.electronjs.org/docs/latest/tutorial/process-model#preload-scripts
|
2025-10-31 01:22:35 +07:00
|
|
|
import { contextBridge, ipcRenderer } from 'electron'
|
|
|
|
|
|
|
|
|
|
contextBridge.exposeInMainWorld('walletApi', {
|
|
|
|
|
createKeystore: (seed: string, password: string) =>
|
|
|
|
|
ipcRenderer.invoke('wallet:createKeystore', seed, password),
|
2025-11-05 04:14:37 +07:00
|
|
|
saveKeystoreAs: (seed: string, password: string) =>
|
|
|
|
|
ipcRenderer.invoke('wallet:saveKeystoreAs', seed, password),
|
2025-10-31 01:22:35 +07:00
|
|
|
decryptKeystore: (filePath: string, password: string) =>
|
|
|
|
|
ipcRenderer.invoke('wallet:decryptKeystore', filePath, password),
|
2025-10-31 21:56:47 +07:00
|
|
|
checkKeystore: () => ipcRenderer.invoke('wallet:checkKeystore'),
|
2025-10-31 01:22:35 +07:00
|
|
|
})
|