Enable cross-chain payments from Ethereum, Polygon, BNB Chain → Solana, Sonic, Eclipse. One SDK, all networks, zero hassle.
import { SVMPay } from 'svm-pay'
// Accept USDC from Ethereum → Solana
const payment = await SVMPay.crossChain({
from: { network: 'ethereum', token: 'USDC' },
to: { network: 'solana', address: 'DezX...' },
amount: 100
})
console.log('Payment completed:', payment.hash)
import { AssemblyBPFSDK, BPFTemplates, SVMNetwork } from 'svm-pay/assembly-bpf'
// Low-level BPF program development
const sdk = new AssemblyBPFSDK({ network: SVMNetwork.SOLANA })
// Create payment processor using template
const { metadata, instructions } = BPFTemplates.createPaymentProcessor({
networks: [SVMNetwork.SOLANA, SVMNetwork.SONIC]
})
// Compile to optimized BPF bytecode
const result = await sdk.compile(instructions, metadata)
console.log('✅ BPF Program compiled:', result.bytecode.length, 'bytes')
Join thousands of developers building the future of cross-chain payments
Supported networks and growing
A complete toolkit for accepting payments across any blockchain with enterprise-grade reliability
Cross-chain transactions complete in under 5 minutes with optimized bridge routing.
Built on proven bridge infrastructure with comprehensive security audits and monitoring.
TypeScript-native SDK with comprehensive docs, examples, and stellar developer experience.
Support for 10+ networks including Ethereum, Polygon, BNB Chain, Solana, and more.
Automatically routes through Wormhole, Allbridge, and other bridges for optimal rates.
Native support for USDC, USDT, WETH, WBTC and other major tokens across all networks.
Low-level BPF program development with Assembly abstractions for advanced use cases.
From simple e-commerce to complex DeFi protocols, SVM-Pay adapts to your needs
Accept payments from any network, receive on your preferred chain
Recurring payments across different blockchains seamlessly
Bridge assets for yield farming, lending, and other DeFi activities
In-game purchases and rewards across multiple gaming ecosystems
Join thousands of developers building the future of payments. Get up and running in minutes.
Built on proven infrastructure with support for major networks, bridges, and tokens
User initiates payment
Secure cross-chain transfer
Funds received
Learn how to build efficient, low-level BPF programs for SVM networks with step-by-step tutorials
Create your first BPF program with Assembly-BPF SDK
// Your first Assembly-BPF program
import { AssemblyBPFSDK, examples } from 'svm-pay/assembly-bpf'
const createHelloWorld = async () => {
// Use the built-in example
const { sdk, compilationResult, metadata } = await examples.createHelloWorld()
console.log('✅ Hello World compiled successfully')
console.log('📜 Assembly:')
console.log(compilationResult.assembly)
// Output:
// 0000: ldi r1, 1745172467 ; Debug: Hello from SVM-Pay Assembly-BPF SDK!
// 0001: call 1 ; Log debug message
// 0002: ldi r0, 0 ; Return success
// 0003: exit r0 ; Exit program
}
createHelloWorld()
Build a payment processor with fee handling
// Payment processor with fees
import {
AssemblyBPFSDK,
BPFTemplates,
SVMNetwork,
BPFProgramConfig
} from 'svm-pay/assembly-bpf'
const createPaymentProcessor = async () => {
// Configure SDK
const config: BPFProgramConfig = {
network: SVMNetwork.SOLANA,
debug: true
}
const sdk = new AssemblyBPFSDK(config)
// Create payment processor template
const { metadata, instructions } = BPFTemplates.createPaymentProcessor({
networks: [SVMNetwork.SOLANA, SVMNetwork.SONIC],
feeRate: 0.01, // 1% fee
maxAmount: 1000000 // Max 1M tokens
})
// Compile the program
const result = await sdk.compile(instructions, metadata)
if (result.success) {
console.log('✅ Payment processor compiled successfully')
console.log(`📊 Instructions: ${instructions.length}`)
console.log(`💾 Bytecode size: ${result.bytecode?.length} bytes`)
console.log(`⚡ Estimated compute units: ${result.computeUnits}`)
}
return result
}
Implement cross-chain asset bridging with validation
// Cross-chain bridge implementation
import {
AssemblyBPFSDK,
BPFTemplates,
BPFProgramBuilder,
BPFHelpers,
SVMNetwork
} from 'svm-pay/assembly-bpf'
const createCrossChainBridge = async () => {
const sdk = new AssemblyBPFSDK({
network: SVMNetwork.SOLANA,
debug: true
})
// Create bridge template
const { metadata, instructions } = BPFTemplates.createCrossChainBridge({
supportedNetworks: [
SVMNetwork.SOLANA,
SVMNetwork.SONIC,
SVMNetwork.ECLIPSE,
SVMNetwork.SOON
],
bridgeFee: 0.005, // 0.5% bridge fee
minAmount: 1000, // Minimum 1000 tokens
maxAmount: 10000000 // Maximum 10M tokens
})
// Build custom program with additional validation
const builder = sdk.createProgram(metadata)
builder
.addInstructions(BPFHelpers.createDebugLog('Starting bridge operation'))
.addValidator() // Add validation layer
.addInstructions(instructions) // Add bridge logic
.addInstructions(BPFHelpers.createDebugLog('Bridge operation completed'))
// Compile with optimizations
const result = await builder.compile({
optimize: true,
targetNetwork: SVMNetwork.SOLANA
})
console.log('🌉 Cross-chain bridge compiled:')
console.log(`📊 Instructions: ${result.instructionCount}`)
console.log(`💾 Bytecode: ${result.bytecode?.length} bytes`)
console.log(`⚡ Compute units: ${result.computeUnits}`)
return result
}
Advanced memory management and syscall handling
// Advanced memory management
import {
AssemblyBPFSDK,
BPFMemoryManager,
BPFSyscallHelper,
BPFInstruction,
BPFRegister,
SVMNetwork
} from 'svm-pay/assembly-bpf'
const createAdvancedProgram = async () => {
const sdk = new AssemblyBPFSDK({ network: SVMNetwork.SOLANA })
// Create custom memory structures
const paymentStruct = BPFMemoryManager.createStruct([
{ name: 'amount', type: 'u64', offset: 0 },
{ name: 'recipient', type: 'pubkey', offset: 8 },
{ name: 'fee', type: 'u64', offset: 40 },
{ name: 'timestamp', type: 'u64', offset: 48 }
])
// Allocate stack space
const stackPtr = BPFMemoryManager.allocateStack(128)
// Create syscall helper
const syscalls = new BPFSyscallHelper(SVMNetwork.SOLANA)
// Build program with custom instructions
const instructions = [
// Load payment amount
{
opcode: BPFInstruction.LOAD_IMM,
dst: BPFRegister.R1,
immediate: 1000000, // 1M tokens
comment: 'Load payment amount'
},
// Validate amount using syscall
syscalls.validateAmount(BPFRegister.R1),
// Store to memory structure
{
opcode: BPFInstruction.STORE_MEM,
dst: BPFRegister.R10,
src: BPFRegister.R1,
offset: paymentStruct.fields.amount.offset,
comment: 'Store amount to payment struct'
},
// Get current timestamp
syscalls.getCurrentTimestamp(BPFRegister.R2),
// Store timestamp
{
opcode: BPFInstruction.STORE_MEM,
dst: BPFRegister.R10,
src: BPFRegister.R2,
offset: paymentStruct.fields.timestamp.offset,
comment: 'Store timestamp'
},
// Process payment
syscalls.processPayment(stackPtr),
// Return success
{
opcode: BPFInstruction.LOAD_IMM,
dst: BPFRegister.R0,
immediate: 0,
comment: 'Return success'
},
{
opcode: BPFInstruction.EXIT,
src: BPFRegister.R0,
comment: 'Exit program'
}
]
const metadata = {
name: 'advanced-payment-processor',
version: '1.0.0',
description: 'Advanced payment processor with custom memory management',
networks: [SVMNetwork.SOLANA],
computeUnits: 1000
}
const result = await sdk.compile(instructions, metadata)
console.log('🔧 Advanced program compiled:', result.success)
return result
}
Everything you need to integrate cross-chain payments: comprehensive docs, live examples, and developer tools
npm install svm-pay
Add SVM-Pay to your project with npm, yarn, or pnpm
import { SVMPay } from 'svm-pay'
Import the main library with full TypeScript support
await SVMPay.crossChain({ ... })
Start accepting cross-chain payments immediately
Accept USDC from Ethereum to Solana
TypeScriptimport { SVMPay, EVMNetwork, SVMNetwork } from 'svm-pay'
const payment = await SVMPay.crossChain({
from: {
network: EVMNetwork.ETHEREUM,
token: 'USDC'
},
to: {
network: SVMNetwork.SOLANA,
address: 'DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263'
},
amount: 100
})
console.log('Payment hash:', payment.hash)
Building a payment form with React
Reactimport { useSVMPay } from 'svm-pay/react'
function PaymentForm() {
const { executePayment, loading, error } = useSVMPay()
const handlePayment = async () => {
await executePayment({
from: { network: 'polygon', token: 'USDC' },
to: { network: 'solana', address: walletAddress },
amount: 50
})
}
return (
<button onClick={handlePayment} disabled={loading}>
{loading ? 'Processing...' : 'Pay with Polygon'}
</button>
)
}
Custom bridge selection and monitoring
TypeScriptimport { CrossChainPaymentManager } from 'svm-pay'
const manager = new CrossChainPaymentManager({
bridges: ['wormhole', 'allbridge'],
monitoring: true,
fallback: true
})
const payment = await manager.executePayment({
sourceNetwork: EVMNetwork.BNB_CHAIN,
destinationNetwork: SVMNetwork.SONIC,
amount: '1000',
token: '0x...',
recipient: 'wallet_address',
bridgePreference: 'fastest'
})
// Monitor payment status
payment.on('status', (status) => {
console.log('Payment status:', status)
})
Join the cross-chain payment revolution. Install SVM-Pay and start building the future of money transfer.