
Research
Shai-Hulud Descends to Hades: Miasma Worm Campaign Spreads with New PyPI Wave
Socket found 37 malicious PyPI wheels that abuse Python startup hooks to launch a Bun-powered credential stealer tied to Mini Shai-Hulud/Miasma.
talak-web3
Advanced tools
Production-grade Web3 backend toolkit for server-side SIWE authentication, resilient RPC routing, and account abstraction.
talak-web3 is a unified SDK that provides the infrastructure layer for production Web3 applications. It solves common backend challenges in decentralized app development:
npm install @dagimabebe/talak-web3@1.0.9
npm install talak-web3@1.0.9
Requirements: Node.js >= 20.12.0
import { talakWeb3, MainnetPreset } from 'talak-web3';
const app = talakWeb3({
...MainnetPreset,
auth: {
domain: 'yourdapp.com',
secret: process.env.JWT_SECRET,
},
});
await app.init();
const nonce = await app.auth.createNonce('0x...');
const result = await app.rpc.request('eth_blockNumber');
import { TalakWeb3Provider, useAccount, useChain } from 'talak-web3/react';
function App() {
return (
<TalakWeb3Provider>
<YourComponent />
</TalakWeb3Provider>
);
}
function YourComponent() {
const { address, isConnected } = useAccount();
const { chain } = useChain();
if (!isConnected) return <ConnectWallet />;
return <div>Connected: {address}</div>;
}
import { talakWeb3, MainnetPreset, PolygonPreset } from 'talak-web3';
import { MultiChainRouter } from 'talak-web3/multichain';
const app = talakWeb3({
chains: [MainnetPreset, PolygonPreset],
auth: {
domain: 'yourdapp.com',
secret: process.env.JWT_SECRET,
},
});
const router = new MultiChainRouter(app.context);
const ethBlock = await router.request(1, 'eth_blockNumber');
const polygonBlock = await router.request(137, 'eth_blockNumber');
talakWeb3() returns a new instance on each call (no global singleton state).
__resetTalakWeb3() is retained for backwards compatibility and is a no-op.
The SDK implements a secure SIWE authentication flow with short-lived JWTs and rotating refresh tokens:
import { talakWeb3 } from 'talak-web3';
const app = talakWeb3({ auth: { domain: 'yourdapp.com', secret: process.env.JWT_SECRET }});
const nonce = await app.auth.createNonce(address);
const { accessToken, refreshToken } = await app.auth.loginWithSiwe(signedMessage, signature);
const payload = await app.auth.verifySession(accessToken);
const { accessToken: newAccess, refreshToken: newRefresh } = await app.auth.refresh(refreshToken);
await app.auth.revokeSession(accessToken, refreshToken);
For production deployments, configure Redis-backed stores for atomic operations:
import { talakWeb3 } from 'talak-web3';
import { RedisNonceStore, RedisRefreshStore, RedisRevocationStore } from '@talak-web3/auth/stores';
import Redis from 'ioredis';
const redis = new Redis(process.env.REDIS_URL);
const app = talakWeb3({
auth: {
domain: 'yourdapp.com',
secret: process.env.JWT_SECRET,
nonceStore: new RedisNonceStore(redis),
refreshStore: new RedisRefreshStore(redis),
revocationStore: new RedisRevocationStore(redis),
accessTtlSeconds: 900,
refreshTtlSeconds: 604800,
},
rpc: {
providers: [
{ url: process.env.RPC_URL_PRIMARY, priority: 1 },
{ url: process.env.RPC_URL_BACKUP, priority: 2 },
],
},
});
import {
talakWeb3,
__resetTalakWeb3,
TalakWeb3Client,
InMemoryTokenStorage,
CookieTokenStorage,
MainnetPreset,
PolygonPreset,
ConfigManager,
MultiChainRouter,
estimateEip1559Fees,
} from 'talak-web3';
import type {
TalakWeb3Instance,
TalakWeb3Context,
TalakWeb3Plugin,
TalakWeb3BaseConfig,
TokenStorage,
NonceResponse,
LoginResponse,
RefreshResponse,
VerifyResponse,
} from 'talak-web3';
import { MultiChainRouter } from 'talak-web3/multichain';
import {
TalakWeb3Provider,
useTalakWeb3,
useAccount,
useChain,
} from 'talak-web3/react';
The talak-web3 monorepo includes scoped packages for modular usage:
| Package | Description | Install |
|---|---|---|
@talak-web3/core | Core orchestrator and singleton factory | npm install @talak-web3/core |
@talak-web3/auth | SIWE authentication and session management | npm install @talak-web3/auth |
@talak-web3/rpc | RPC provider routing and failover | npm install @talak-web3/rpc |
@talak-web3/client | HTTP client with token management | npm install @talak-web3/client |
@talak-web3/hooks | React hooks and context providers | npm install @talak-web3/hooks |
@talak-web3/config | Configuration presets and validation | npm install @talak-web3/config |
@talak-web3/tx | Account abstraction and gasless transactions | npm install @talak-web3/tx |
@talak-web3/types | Shared TypeScript types | npm install @talak-web3/types |
@talak-web3/errors | Standardized error classes | npm install @talak-web3/errors |
@talak-web3/rate-limit | Rate limiting (memory and Redis) | npm install @talak-web3/rate-limit |
@talak-web3/cli | CLI scaffolding tools | npm install -g @talak-web3/cli |
All security-critical operations follow a fail-closed posture:
503 Service UnavailabletalakWeb3(config)Creates or returns the singleton application instance.
Parameters:
config — Configuration object or preset (see MainnetPreset, PolygonPreset)Returns:
TalakWeb3Instance — Application instance with auth, rpc, context, and other capabilitiesExample:
const app = talakWeb3({
auth: {
domain: 'yourdapp.com',
secret: process.env.JWT_SECRET,
},
rpc: {
providers: [
{ url: 'https://eth.llamarpc.com', priority: 1 },
{ url: 'https://rpc.ankr.com/eth', priority: 2 },
],
},
});
app.authAuthentication and session management interface.
Methods:
createNonce(address: string) — Generate a nonce for SIWE authenticationloginWithSiwe(message: string, signature: string) — Verify SIWE message and issue tokensverifySession(accessToken: string) — Validate JWT and return session payloadrefresh(refreshToken: string) — Rotate refresh token and issue new access tokenrevokeSession(accessToken: string, refreshToken: string) — Revoke both tokensvalidateJwt(token: string) — Quick validation check (returns boolean)app.rpcRPC provider with automatic failover.
Methods:
request(method: string, params?: any[]) — Send JSON-RPC requeststop() — Stop health checksstart(intervalMs?: number) — Start/resume health checks| Variable | Required | Description |
|---|---|---|
JWT_SECRET | Yes (production) | Secret key for JWT signing (min 32 characters) |
REDIS_URL | Yes (production) | Redis connection string for session storage |
NODE_ENV | No | Environment (development or production) |
LOG_FORMAT | No | Set to json for structured logging |
SIWE_DOMAIN | No | SIWE domain override (defaults to auth.domain) |
See the apps/ directory for complete example applications:
We welcome contributions! Please see our Contributing Guide for details.
git clone https://github.com/dagimabebe/talak-web3.git
cd talak-web3
pnpm install
pnpm build
pnpm test
pnpm test:coverage
pnpm lint
pnpm typecheck
MIT © Dagim Abebe
FAQs
A comprehensive Web3 SDK for blockchain development
We found that talak-web3 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
Socket found 37 malicious PyPI wheels that abuse Python startup hooks to launch a Bun-powered credential stealer tied to Mini Shai-Hulud/Miasma.

Security News
RubyGems and Bundler 4.0.13 introduced an opt-in cooldown feature that delays newly published gems during dependency resolution.

Security News
pnpm 11.5 now recognizes npm staged publish approvals in release metadata, preventing those releases from being mistaken for lower-trust package publishes.