
Research
Supply Chain Attack on Axios Pulls Malicious Dependency from npm
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.
@somniaforge/sdk
Advanced tools
SomniaForge SDK - Zero-config TypeScript toolkit for building real-time games on Somnia Network
A TypeScript SDK for building real-time, fully on-chain games on Somnia Network
Zero-config setup • Sub-second transactions • Real-time WebSocket events
⚠️ This SDK is currently in beta development phase.
We appreciate early adopters and contributors helping us build the future of real-time Somnia Network gaming!
npm install @somniaforge/sdk
# or
yarn add @somniaforge/sdk
# or
pnpm add @somniaforge/sdk
import { SomniaForgeSDK } from '@somniaforge/sdk'
// Initialize the SDK
const sdk = new SomniaForgeSDK()
// Connect wallet and initialize
const connection = await sdk.initialize()
console.log('Connected to Somnia Network:', connection)
// Create a game session
const sessionId = await sdk.gameSession.createSession({
maxPlayers: 4,
entryFee: parseEther('0.01'),
moveTimeLimit: 300 // 5 minutes
})
// Set up real-time event listeners
sdk.gameSession.setEventCallbacks({
onPlayerJoined: (event) => {
console.log('Player joined:', event.player)
},
onSessionStarted: (event) => {
console.log('Game started:', event.sessionId)
}
})
import {
SomniaButton,
GameCard,
PlayerProfile,
WalletConnectButton
} from '@somniaforge/sdk'
function GameApp() {
return (
<div>
<WalletConnectButton onConnect={handleConnect} />
<PlayerProfile address="0x..." />
<GameCard
title="Rock Paper Scissors"
players={2}
maxPlayers={2}
status="waiting"
/>
<SomniaButton variant="primary" onClick={createGame}>
Create Game
</SomniaButton>
</div>
)
}
The SDK is pre-configured for Somnia Network testnet:
| Property | Value |
|---|---|
| Network | Somnia Testnet |
| Chain ID | 50312 (0xc488) |
| RPC URL | https://dream-rpc.somnia.network |
| WebSocket | wss://dream-rpc.somnia.network/ws |
| Explorer | https://shannon-explorer.somnia.network |
| Currency | STT (Somnia Test Token) |
import { SomniaForgeSDK, parseEther } from '@somniaforge/sdk'
const sdk = new SomniaForgeSDK()
await sdk.initialize()
// Create game session
const sessionId = await sdk.gameSession.createSession({
maxPlayers: 2,
entryFee: parseEther('0.001'),
moveTimeLimit: 60
})
// Player joins and submits move
await sdk.gameSession.joinSession(sessionId)
const moveHash = sdk.gameSession.createMoveHash('rock', 'mysecret')
await sdk.gameSession.submitMove(sessionId, moveHash)
// Reveal phase
await sdk.gameSession.revealMove(sessionId, 'rock', 'mysecret')
| Format | Size | Gzipped | Performance |
|---|---|---|---|
| ESM | ~74KB | 9.4KB | Optimized |
| CJS | ~40KB | 7.1KB | Legacy Support |
| Target | <100KB | <15KB | ✅ Achieved |
MIT License - see LICENSE file for details.
Built with ❤️ for the Somnia Network gaming ecosystem
FAQs
SomniaForge SDK - Zero-config TypeScript toolkit for building real-time games on Somnia Network
We found that @somniaforge/sdk demonstrated a healthy version release cadence and project activity because the last version was released less than 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
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.

Security News
TeamPCP is partnering with ransomware group Vect to turn open source supply chain attacks on tools like Trivy and LiteLLM into large-scale ransomware operations.