🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis
Socket
Book a DemoInstallSign in
Socket

@wishcore/wish-sdk

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wishcore/wish-sdk

Wish API for node. Used for building Wish Apps.

latest
Source
npmnpm
Version
0.4.0-beta-21
Version published
Weekly downloads
145
-71.79%
Maintainers
1
Weekly downloads
 
Created
Source

Wish SDK

Node.js SDK for building peer-to-peer applications on the Wish protocol.

Features:

  • Cryptographic identity-based P2P networking
  • Protocol-based service discovery
  • End-to-end encrypted communication

Install

npm install @wishcore/wish-sdk

Quick Start

const { App, WishCoreRunner } = require('@wishcore/wish-sdk');

// Start wish-core (bundles pre-built binaries for macOS/Linux)
await WishCoreRunner.start({ appPort: 9094 });

const app = new App({
    name: 'MyApp',
    corePort: 9094,
    protocols: ['chat']
});

app.on('ready', async () => {
    // Create or get identity
    const identities = await app.request('identity.list', []);
    const identity = identities[0] || await app.request('identity.create', ['Alice']);
    console.log('Ready as:', identity.alias);
});

app.on('online', async (peer) => {
    // Send message to peer
    await app.request('services.send', [peer, Buffer.from('Hello!')]);
});

app.on('frame', async (peer, data) => {
    // Receive message from peer
    const identity = await app.request('identity.get', [peer.ruid]);
    console.log(`${identity.alias}: ${data.toString()}`);
});

Common API Methods

  • identity.create(alias) - Create new identity
  • identity.list() - List identities
  • identity.get(uid) - Get identity details
  • services.send(peer, buffer) - Send data to peer

Events

  • ready - Connected to wish-core
  • online(peer) - Peer came online
  • offline(peer) - Peer went offline
  • frame(peer, data) - Received data from peer

Keywords

wish

FAQs

Package last updated on 24 Nov 2025

Did you know?

Socket

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.

Install

Related posts