npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@donexis/sdk

v1.0.0

Published

Donexis SDK - Multi-chain donation infrastructure

Downloads

11

Readme

Donexis SDK

Multi-chain donation infrastructure SDK for accepting cryptocurrency donations on EVM and Solana blockchains.

npm version License

Features

  • 🌐 Multi-Chain Support - EVM (Ethereum, Base) and Solana
  • Real-Time Updates - WebSocket notifications for instant donation alerts
  • 🎨 Custom Overlays - Built-in OBS overlay system for streamers
  • 🔒 Type-Safe - Full TypeScript support with comprehensive types
  • 💎 Token Benefits - Reduced fees with $DNX token holdings
  • 📦 Production Ready - Battle-tested infrastructure

Installation

npm install @donexis/sdk

Quick Start

import { DonexisClient } from '@donexis/sdk';

// Initialize the client
const client = new DonexisClient({
  apiKey: 'your-api-key',
  environment: 'testnet' // or 'mainnet'
});

// Create a donation session
const session = await client.createSession({
  projectId: 'your-project-id',
  recipientAddress: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb',
  chainId: 11155111, // Sepolia
  metadata: {
    streamTitle: 'My Stream',
    streamerName: 'YourName'
  }
});

console.log('Donation URL:', client.getDonationUrl(session.sessionId));

// Subscribe to real-time donation updates
client.subscribeToSession(session.sessionId);

client.on('donation', (donation) => {
  console.log('New donation received!', donation);
});

client.on('connected', () => {
  console.log('WebSocket connected');
});

Supported Chains

| Chain | Network | Chain ID | Status | |-------|---------|----------|--------| | Ethereum | Sepolia | 11155111 | ✅ Live | | Base | Mainnet | 8453 | ✅ Live | | Solana | Devnet | - | ✅ Live |

API Reference

DonexisClient

Constructor

new DonexisClient(config: DonexisConfig)

Config Options:

  • apiKey (string, required) - Your API key from the dashboard
  • environment ('testnet' | 'mainnet', required) - Network environment
  • baseUrl (string, optional) - Custom API URL
  • wsUrl (string, optional) - Custom WebSocket URL
  • customRpcUrls (object, optional) - Custom RPC endpoints

Methods

createSession(params)

Create a new donation session.

const session = await client.createSession({
  projectId: 'project-id',
  recipientAddress: '0x...',
  chainId: 11155111,
  metadata: {
    streamTitle: 'My Stream',
    streamerName: 'YourName'
  }
});
getSession(sessionId)

Retrieve session details.

const session = await client.getSession('session-id');
getDonations(sessionId)

Get all donations for a session.

const donations = await client.getDonations('session-id');
subscribeToSession(sessionId)

Subscribe to real-time donation updates via WebSocket.

client.subscribeToSession('session-id');

client.on('donation', (donation) => {
  console.log('New donation:', donation);
});
unsubscribe()

Disconnect from WebSocket.

client.unsubscribe();
linkWallet(walletAddress)

Link a wallet to your API key for token benefits.

await client.linkWallet('0x...');
getDonationUrl(sessionId)

Get the donation page URL for a session.

const url = client.getDonationUrl('session-id');

Events

The client extends EventEmitter and emits the following events:

  • donation - New donation received
  • connected - WebSocket connected
  • disconnected - WebSocket disconnected
  • error - Error occurred
client.on('donation', (data) => {
  console.log('Donation:', data);
});

client.on('error', (error) => {
  console.error('Error:', error);
});

EVM Provider

For direct blockchain interactions:

import { EVMProvider } from '@donexis/sdk';

const provider = new EVMProvider({
  sepolia: 'https://eth-sepolia.g.alchemy.com/v2/YOUR-KEY',
  base: 'https://mainnet.base.org'
});

// Get donation contract address
const contractAddress = provider.getContractAddress(11155111);

// Verify a donation on-chain
const isValid = await provider.verifyDonation(
  11155111,
  'tx-hash',
  'recipient-address',
  'amount'
);

Solana Provider

import { SolanaProvider } from '@donexis/sdk';

const provider = new SolanaProvider({
  solana: 'https://api.devnet.solana.com'
});

// Get program ID
const programId = provider.getProgramId();

// Verify a Solana donation
const isValid = await provider.verifyDonation(
  'signature',
  'recipient-pubkey',
  'amount'
);

Token Benefits

Hold $DNX tokens to unlock benefits:

| Token Balance | Platform Fee | Benefits | |---------------|--------------|----------| | 0 - 49,999 | 2% | Standard features | | 50,000+ | 0% | No fees + Premium overlays |

Link your wallet to activate:

await client.linkWallet('your-wallet-address');

Examples

Streamer Integration

import { DonexisClient } from '@donexis/sdk';

const client = new DonexisClient({
  apiKey: process.env.DONEXIS_API_KEY!,
  environment: 'mainnet'
});

// Create session for stream
const session = await client.createSession({
  projectId: 'my-stream',
  recipientAddress: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb',
  chainId: 8453, // Base
  metadata: {
    streamTitle: 'Epic Gaming Stream',
    streamerName: 'ProGamer123'
  }
});

// Show donation URL in stream description
console.log('Donate at:', client.getDonationUrl(session.sessionId));

// Listen for donations
client.subscribeToSession(session.sessionId);

client.on('donation', (donation) => {
  // Trigger OBS alert
  showDonationAlert(donation);
  
  // Thank donor
  console.log(`Thanks ${donation.metadata?.message || 'Anonymous'}!`);
});

Next.js Integration

// app/api/donations/route.ts
import { DonexisClient } from '@donexis/sdk';

const client = new DonexisClient({
  apiKey: process.env.DONEXIS_API_KEY!,
  environment: 'mainnet'
});

export async function POST(req: Request) {
  const { recipientAddress, chainId } = await req.json();
  
  const session = await client.createSession({
    projectId: 'my-project',
    recipientAddress,
    chainId
  });
  
  return Response.json({
    sessionId: session.sessionId,
    donationUrl: client.getDonationUrl(session.sessionId)
  });
}

Error Handling

try {
  const session = await client.createSession({
    projectId: 'my-project',
    recipientAddress: '0x...',
    chainId: 11155111
  });
} catch (error) {
  if (error.response?.status === 429) {
    console.error('Rate limit exceeded');
  } else if (error.response?.status === 401) {
    console.error('Invalid API key');
  } else {
    console.error('Error:', error.message);
  }
}

Rate Limits

| Tier | Requests/Minute | |------|-----------------| | Free | 100 | | Premium | 1,000 | | Enterprise | Custom |

Check your current limits:

const limits = await client.getRateLimitInfo();
console.log('Remaining:', limits.remaining);

TypeScript Support

Full TypeScript support with comprehensive type definitions:

import type {
  DonexisConfig,
  Session,
  Donation,
  CreateSessionParams,
  DonationEventData
} from '@donexis/sdk';

Contributing

Donexis SDK is open-source! Contributions are welcome.

License

Apache 2.0 - See LICENSE file for details.

Links

Support


Built with ❤️ by the Donexis team