ghost-portal/packages/apps-electron/src/preload.ts
Tarik Gul 384049fb6b
2025 (#11172)
* 2025

* update ci scripts to add access to scripts
2025-01-03 03:59:53 +02:00

18 lines
753 B
TypeScript

// Copyright 2017-2025 @polkadot/apps authors & contributors
// SPDX-License-Identifier: Apache-2.0
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore Warned on by nodenext resolution (while package does build in bundler mode)
import type { KeyringJson } from '@polkadot/ui-keyring/types';
import { contextBridge, ipcRenderer } from 'electron';
contextBridge.exposeInMainWorld('ElectronMain', {
accountStore: {
all: () => ipcRenderer.invoke('account-store-all'),
get: (key: string) => ipcRenderer.invoke('account-store-get', key),
remove: (key: string) => ipcRenderer.invoke('account-store-remove', key),
set: (key: string, value: KeyringJson) => ipcRenderer.invoke('account-store-set', key, value)
}
});