
Research
/Security News
npm Author Qix Compromised via Phishing Email in Major Supply Chain Attack
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.
@nomyx/decentranet
Advanced tools
A library for managing multi-context objects in distributed applications
A powerful library for building decentralized applications that can run seamlessly across browser, server, and peer environments.
npm install @nomyx/decentranet
or
yarn add @nomyx/decentranet
Here's a simple example to get you started with a decentralized chat application:
import { DecentralizedApp, Component, GunDataProvider } from '@nomyx/decentranet';
class ChatComponent extends Component<{ messages: string[] }, {}> {
constructor(contexts: string[], dataProvider: GunDataProvider) {
super(contexts, dataProvider, { messages: [] }, {});
}
render(): string {
return `
<div>
${this.state.messages.map(msg => `<p>${msg}</p>`).join('')}
</div>
<input id="messageInput" type="text">
<button onclick="sendMessage()">Send</button>
`;
}
sendMessage(message: string) {
this.setState({ messages: [...this.state.messages, message] });
}
}
const app = new DecentralizedApp(new GunDataProvider());
app.initialize().then(() => {
const chatComponent = new ChatComponent(['browser'], app.gunDataProvider);
chatComponent.mount(document.getElementById('app')!);
app.start();
});
For more detailed information about using @nomyx/decentranet, please refer to our comprehensive guide.
Detailed API documentation can be found here.
Check out our examples directory for more complex usage scenarios and best practices.
We welcome contributions! Please see our Contributing Guide for more details.
@nomyx/decentranet is MIT licensed.
If you encounter any issues or have questions, please file an issue on our GitHub issue tracker.
@nomyx/decentranet is built on top of several amazing open-source projects, including GunDB, WebRTC, and many others. We're grateful for their contributions to the open-source community.
Happy decentralized app building!
FAQs
A library for managing multi-context objects in distributed applications
We found that @nomyx/decentranet demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers 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
/Security News
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.
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.