// See the Electron documentation for details on how to use preload scripts: // https://www.electronjs.org/docs/latest/tutorial/process-model#preload-scripts import { contextBridge, ipcRenderer } from 'electron' contextBridge.exposeInMainWorld('walletApi', { createKeystore: (seed: string, password: string) => ipcRenderer.invoke('wallet:createKeystore', seed, password), saveKeystoreAs: (seed: string, password: string) => ipcRenderer.invoke('wallet:saveKeystoreAs', seed, password), decryptKeystore: (filePath: string, password: string) => ipcRenderer.invoke('wallet:decryptKeystore', filePath, password), checkKeystore: () => ipcRenderer.invoke('wallet:checkKeystore'), generateKeysFromSeed: (seedPhrase: string[]) => ipcRenderer.invoke('wallet:generateKeysFromSeed', seedPhrase), buildTransactionWithPrimitiveProof: (args: any) => ipcRenderer.invoke('wallet:buildTransactionWithPrimitiveProof', args), })