
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
electron-typed-ipc
Advanced tools
- no runtime cost (just typescript enhancements) - keeps the same API as Electron - separates events from commands to avoid confusions - events are things that happened (IPC) - commands are async functions you can invoke (RPC)
npm i electron-typed-ipc --save
type Events = {
configUpdated: (newConfig?: Config, oldConfig?: Config) => void;
};
type Commands = {
fetchConfig: () => Config;
updateConfig: (newConfig: Partial<Config>) => void;
};
ipcMain
and ipcRenderer
const typedIpcMain = ipcMain as TypedIpcMain<Events, Commands>;
const typesIpcRenderer = ipcRenderer as TypedIpcRenderer<Events, Commands>;
// renderer.js
const config = await typedIpcRenderer.invoke('fetchConfig');
// main.js
typedIpcMain.handle('fetchConfig', () => {
return { a: 1, b: 'text' };
});
// renderer.js
typedIpcRenderer.on('configUpdated', (_, newConfig, oldConfig) => {
console.log(newConfig, oldConfig);
});
// main.ts
webContents
.getAllWebContents()
.forEach((renderer: TypedWebContents<Events>) => {
renderer.send('configUpdated', newConfig, oldConfig);
});
FAQs
- no runtime cost (just typescript enhancements) - keeps the same API as Electron - separates events from commands to avoid confusions - events are things that happened (IPC) - commands are async functions you can invoke (RPC)
We found that electron-typed-ipc demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.