API Reference
Complete API documentation for ExePay packages.
Packages
@exe-pay/core
Core SDK for payments on Solana. Includes transaction building, wallet management, and payment processing.
View Documentation →@exe-pay/privacy
Privacy features: Stealth addresses, payment proofs, integrated addresses, subaddresses, view keys, enhanced scanning with view tags, and RPC privacy.
View Documentation →@exe-pay/react-hooks
React hooks for easy integration into React applications. Includes wallet management and payment hooks.
View Documentation →@exe-pay/utils
Utility functions for address validation, amount formatting, and transaction helpers.
View Documentation →Quick Example
import { ExePayClient } from '@exe-pay/core';
import { useExePay } from '@exe-pay/react-hooks';
import { Connection } from '@solana/web3.js';
// Initialize client
const connection = new Connection('https://api.mainnet-beta.solana.com');
const client = new ExePayClient(connection);
// Send a payment
const result = await client.sendPayment({
recipient: 'RECIPIENT_WALLET_ADDRESS',
amount: 1000000, // lamports
privacyLevel: 'public',
token: undefined // SOL
});
// In React components
function PaymentButton() {
const { sendPayment, loading } = useExePay();
const handlePay = async () => {
await sendPayment({
recipient: 'ADDRESS',
amount: 1000000
});
};
return <button onClick={handlePay} disabled={loading}>Send Payment</button>;
}Core Concepts
ExePayClient
The main client for interacting with ExePay. Handles connection management, transaction building, and privacy features.
Privacy Features (Mainnet Ready)
- Stealth Addresses - Monero-inspired one-time addresses using X25519 ECDH + Keccak-256
- Payment Proofs - Cryptographic proofs for disputes and audits (ECDH-based)
- Integrated Addresses - Payment IDs for invoice tracking
- Subaddresses - Multiple identities from one wallet (BIP32-like derivation)
- View Keys - Read-only keys for compliance and auditing (SHA-256 derived from Ed25519)
- View Tags - 99% faster payment detection with one-byte tags
- RPC Privacy - IP hiding via endpoint rotation
Future: Zero-Knowledge Proofs
Coming soon: Groth16 zk-SNARKs for hidden amounts, range proofs, and balance verification. Currently in development with security audits planned before mainnet deployment.
Token Support
ExePay supports SOL and SPL tokens including USDC, USDT, BONK, and JUP. Pass the token mint address to send tokens instead of SOL.
TypeScript Support
All ExePay packages are written in TypeScript and include full type definitions. Your IDE will provide autocomplete and type checking out of the box.
import type { PaymentParams, PaymentResult } from '@exe-pay/core';
const params: PaymentParams = {
recipient: 'ADDRESS',
amount: 1000000,
privacyLevel: 'public'
};
const result: PaymentResult = await client.sendPayment(params);Error Handling
ExePay throws descriptive errors that you can catch and handle:
try {
await client.sendPayment(params);
} catch (error) {
if (error.message.includes('Insufficient funds')) {
// Handle insufficient funds
} else if (error.message.includes('Invalid address')) {
// Handle invalid address
} else {
// Handle other errors
}
}Need More Help?
Check out our examples for more code samples, or visit our GitHub repository for the full source code.
