
Research
/Security News
737 Chrome VPN Extensions Linked to Brand Impersonation and Browser Traffic Redirection
The campaign amassed more than 75,000 installs by targeting Russian-speaking users seeking access to blocked services.
@asterpay-io/solana
Advanced tools
AsterPay Solana integration - USDC payments on Solana for AI agents and DePIN
Solana USDC payments for AI agents and DePIN infrastructure
@asterpay/solana provides USDC payment capabilities on Solana:
npm install @asterpay/solana
# or
yarn add @asterpay/solana
import { SolanaWallet, SolanaPaymentClient } from '@asterpay/solana';
// Create wallet
const wallet = new SolanaWallet({
privateKey: process.env.SOLANA_PRIVATE_KEY!,
network: 'mainnet-beta'
});
// Create payment client
const client = new SolanaPaymentClient(wallet);
// Send USDC
const result = await client.sendUSDC({
recipient: 'RecipientPublicKey...',
amount: 10.00,
memo: 'Payment for API access'
});
console.log(`TX: ${result.signature}`);
console.log(`Explorer: ${result.explorerUrl}`);
import { SolanaWallet, DePINPayoutClient } from '@asterpay/solana';
const wallet = new SolanaWallet({
privateKey: process.env.SOLANA_KEY!,
network: 'mainnet-beta'
});
const payout = new DePINPayoutClient(wallet);
// Pay multiple node operators
const operators = [
{ address: 'operator1...', amount: 5.50, id: 'node-001' },
{ address: 'operator2...', amount: 3.25, id: 'node-002' },
{ address: 'operator3...', amount: 8.00, id: 'node-003' },
// ... up to thousands of recipients
];
const result = await payout.batchPayout(operators, {
concurrency: 10, // Parallel transactions
retryFailed: true, // Retry failures
maxRetries: 3 // Max retry attempts
});
console.log(`Paid: ${result.successful}/${result.total}`);
console.log(`Total: $${result.totalPaid}`);
console.log(payout.generatePayoutReport(result));
const wallet = new SolanaWallet({
privateKey: process.env.SOLANA_KEY!,
network: 'mainnet-beta'
});
const balance = await wallet.getBalance();
console.log(`SOL: ${balance.sol}`);
console.log(`USDC: ${balance.usdc}`);
| Network | Use Case | USDC Address |
|---|---|---|
mainnet-beta | Production | EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v |
devnet | Development | 4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU |
testnet | Testing | 4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU |
// Daily rewards distribution
const rewards = await fetchDailyRewards(); // Your reward calculation
const payout = new DePINPayoutClient(wallet);
const result = await payout.batchPayout(rewards, {
concurrency: 20, // Higher concurrency for speed
});
// Generate report for records
const report = payout.generatePayoutReport(result);
await savePayoutReport(report);
// Pay rewards at end of epoch
async function processEpochRewards(epochNumber: number) {
const operators = await getEpochRewards(epochNumber);
// Validate before payout
const { valid, invalid } = await payout.validateRecipients(operators);
if (invalid.length > 0) {
console.warn(`${invalid.length} invalid recipients skipped`);
}
// Process valid recipients
const result = await payout.batchPayout(valid);
return {
epoch: epochNumber,
...result
};
}
| Operation | Est. Fee (SOL) | Est. Fee (USD) |
|---|---|---|
| Single transfer | 0.000005 | $0.0005 |
| With token account creation | 0.002 | $0.20 |
| Batch (1000 recipients) | ~1.0 | ~$100 |
SolanaWalletnew SolanaWallet({
privateKey: string | Uint8Array, // Base58 or byte array
network?: 'mainnet-beta' | 'devnet' | 'testnet',
rpcUrl?: string, // Custom RPC endpoint
name?: string // Wallet identifier
})
SolanaPaymentClientconst client = new SolanaPaymentClient(wallet);
await client.sendUSDC({
recipient: string, // Recipient address
amount: number, // Amount in USD
memo?: string, // Optional memo
priorityFee?: number // Priority fee (micro-lamports)
});
DePINPayoutClientconst payout = new DePINPayoutClient(wallet);
await payout.batchPayout(recipients, {
concurrency?: number, // Parallel transactions (default: 5)
retryFailed?: boolean, // Retry failures (default: true)
maxRetries?: number, // Max retries (default: 3)
retryDelay?: number, // Delay between retries (ms)
createTokenAccounts?: boolean // Create accounts if missing
});
MIT License - see LICENSE
FAQs
AsterPay Solana integration - USDC payments on Solana for AI agents and DePIN
We found that @asterpay-io/solana 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
/Security News
The campaign amassed more than 75,000 installs by targeting Russian-speaking users seeking access to blocked services.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.