
Security News
PHP Foundation Says Chainguard Broke Security Embargo Ahead of Emergency Patches
The PHP Foundation says Chainguard broke a security embargo ahead of critical RCE patches, as leaks disrupted the coordinated release.
@sudobility/wildduck_client
Advanced tools
Affected versions:
React and React Native compatible client library for WildDuck email API with TypeScript support
TypeScript client library for the WildDuck email API with React and React Native support.
npm install @sudobility/wildduck_client
This library requires the following peer dependencies:
npm install react @tanstack/react-query @sudobility/di @sudobility/types axios
import { useWildduckAuth } from '@sudobility/wildduck_client';
function LoginComponent() {
const networkClient = useNetworkClient();
const config = { endpoint: 'https://api.wildduck.example.com' };
const { authenticate, isAuthenticated } = useWildduckAuth(
networkClient,
config
);
// Authenticate with crypto signature (SIWE)
const handleCryptoLogin = async () => {
await authenticate({
username: 'user@example.com',
signature: '0x...',
message: 'Sign-in with Ethereum message',
nonce: 'random-nonce',
signer: '0xWalletAddress'
});
};
// Or authenticate with password
const handlePasswordLogin = async () => {
await authenticate({
username: 'user@example.com',
password: 'your-password'
});
};
return (
<div>
{isAuthenticated ? (
<p>Logged in!</p>
) : (
<>
<button onClick={handleCryptoLogin}>Login with Wallet</button>
<button onClick={handlePasswordLogin}>Login with Password</button>
</>
)}
</div>
);
}
import { useWildduckGetMessages } from '@sudobility/wildduck_client';
function MessageList({ userAuth, mailboxId }) {
const networkClient = useNetworkClient();
const config = { endpoint: 'https://api.wildduck.example.com' };
const { getMessages } = useWildduckGetMessages(networkClient, config);
const [messages, setMessages] = useState([]);
useEffect(() => {
async function fetchMessages() {
const result = await getMessages(userAuth, mailboxId, {
limit: 50,
unseen: true, // Only unread messages
order: 'desc'
});
setMessages(result.results);
}
fetchMessages();
}, [mailboxId]);
return (
<div>
{messages.map(msg => (
<div key={msg.id}>
<h3>{msg.subject}</h3>
<p>From: {msg.from.address}</p>
<span>{msg.unseen ? '🔵 Unread' : '✓ Read'}</span>
</div>
))}
</div>
);
}
import { useWildduckSendMessage } from '@sudobility/wildduck_client';
function ComposeEmail({ userAuth }) {
const networkClient = useNetworkClient();
const config = { endpoint: 'https://api.wildduck.example.com' };
const { sendMessage } = useWildduckSendMessage(networkClient, config);
const handleSend = async () => {
await sendMessage(userAuth, {
to: [{ name: 'John Doe', address: 'john@example.com' }],
subject: 'Hello from WildDuck Client',
text: 'This is a test message',
html: '<p>This is a <strong>test</strong> message</p>'
});
};
return <button onClick={handleSend}>Send Email</button>;
}
Currently implements ~15% of the WildDuck API endpoints (see docs/GAP_ANALYSIS.md for details):
| Category | Status | Coverage |
|---|---|---|
| Authentication | ✅ Complete | 100% |
| Users | ⚠️ Partial | ~12% |
| Mailboxes | ✅ Mostly Complete | 80% |
| Messages | ⚠️ Partial | ~31% |
| Addresses | ✅ Mostly Complete | 64% |
| Filters | ✅ Complete | 100% |
| Autoreply | ⚠️ Partial | ~67% |
| Health | ✅ Complete | 100% |
| Settings | ✅ Mostly Complete | 67% |
See docs/GAP_ANALYSIS.md for a comprehensive breakdown of missing endpoints and implementation priorities.
useWildduckGetMessages - List messages in a mailboxuseWildduckGetMessage - Get a single messageuseWildduckUpdateMessage - Update message properties (mark as read, move, flag)useWildduckDeleteMessage - Delete a messageuseWildduckSearchMessages - Search messages across mailboxesuseWildduckGetMessageSource - Get raw RFC822 message sourceuseWildduckGetMessageAttachment - Download message attachmentuseWildduckForwardMessage - Forward a messageuseWildduckSendMessage - Send a new emailuseWildduckUploadMessage - Upload raw message to mailboxuseWildduckSubmitDraft - Submit a draft for deliveryuseWildduckGetMailboxes - List all mailboxesuseWildduckGetMailbox - Get specific mailbox infouseWildduckCreateMailbox - Create new mailbox/folderuseWildduckUpdateMailbox - Update mailbox propertiesuseWildduckDeleteMailbox - Delete a mailboxuseWildduckGetUser - Get user informationuseWildduckCreateUser - Create new user (admin)useWildduckUpdateUser - Update user settingsuseWildduckDeleteUser - Delete user accountuseWildduckGetAddresses - List user's email addressesuseWildduckGetAutoreply - Get autoreply settingsuseWildduckUpdateAutoreply - Update autoreply (vacation mode)useWildduckDeleteAutoreply - Delete autoreplyuseWildduckHealth - Server health checkuseWildduckSettings - Settings managementFor detailed documentation on all hooks, see docs/HOOKS_DOCUMENTATION.md.
Since v2.3.0, all hooks support optional WebSocket connections for real-time updates.
import { WebSocketProvider } from '@sudobility/wildduck_client';
function App() {
return (
<WebSocketProvider
enabled={true}
config={{ url: 'ws://your-server.com/ws' }}
>
<YourApp />
</WebSocketProvider>
);
}
// Enable WebSocket in any hook
const { mailboxes } = useWildduckMailboxes(
networkClient,
config,
wildduckUserAuth,
false,
{ enableWebSocket: true } // ← Enable real-time updates
);
# Install dependencies
npm install
# Run type checking
npm run typecheck
# Run linting
npm run lint
# Run unit tests
npm test
# Run integration tests (requires WildDuck server)
WILDDUCK_ENDPOINT=http://localhost:8080 npm run test:integration
# Build the library
npm run build
npm run build # Build for production
npm run build:watch # Build in watch mode
npm run clean # Clean build artifacts
npm run test # Run tests in watch mode
npm run test:run # Run tests once
npm run test:coverage # Run tests with coverage
npm run test:integration # Run integration tests
npm run lint # Run ESLint
npm run lint:fix # Fix linting issues
npm run format # Format code with Prettier
npm run typecheck # Run TypeScript type checking
npm run check-all # Run all checks (lint + typecheck + test)
npm run test:run
Integration tests require a live WildDuck server running in crypto mode:
# Set required environment variables
export WILDDUCK_ENDPOINT=http://localhost:8080
export WILDDUCK_EMAIL_DOMAIN=example.com # Optional
# Run integration tests
npm run test:integration
For more details, see docs/INTEGRATION_TESTS.md.
wildduck_client/
├── src/
│ ├── network/ # API client and HTTP layer
│ ├── hooks/ # React hooks for data fetching
│ │ ├── messages/ # Message-related hooks
│ │ ├── mailboxes/ # Mailbox-related hooks
│ │ ├── addresses/ # Address-related hooks
│ │ ├── autoreply/ # Autoreply-related hooks
│ │ └── users/ # User-related hooks
│ ├── types/ # TypeScript type definitions
│ ├── utils/ # Utility functions
│ └── __tests__/ # Test files
│ └── integration/ # Integration tests
├── dist/ # Compiled output
└── docs/ # Documentation files
git checkout -b feature/my-featurenpm run check-allgit commit -m "Add my feature"git push origin feature/my-featureThis project maintains high code quality standards:
The library is automatically published to NPM when you push to the main branch:
npm version patch|minor|majorgit push origin main --tagsFor more details, see docs/DEPLOYMENT.md.
MIT
See GitHub Releases for version history and release notes.
FAQs
React and React Native compatible client library for WildDuck email API with TypeScript support
The npm package @sudobility/wildduck_client receives a total of 390 weekly downloads. As such, @sudobility/wildduck_client popularity was classified as not popular.
We found that @sudobility/wildduck_client 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.

Security News
The PHP Foundation says Chainguard broke a security embargo ahead of critical RCE patches, as leaks disrupted the coordinated release.

Security News
PHP releases emergency patches for two critical RCE vulnerabilities as agencies urge organizations to take unpatched sites offline.

Threat Research
/Security News
A supply chain attack compromised LiteLLM 1.107.0 on PyPI and Docker, spreading malware that steals cloud credentials, developer secrets, and AI provider keys.