Verxio Protocol SDK
On-chain loyalty infrastructure for creating and managing loyalty programs on Solana and SVM.
Quick Start
Get started with the Verxio Protocol SDK in just a few lines of code.
pnpm add @verxioprotocol/core import { initializeVerxio, createLoyaltyProgram } from '@verxioprotocol/core' import { createUmi } from '@metaplex-foundation/umi-bundle-defaults' import { publicKey, keypairIdentity } from '@metaplex-foundation/umi' // Initialize the SDK const umi = createUmi('https://api.devnet.solana.com') // Add Irys uploader for metadata/image uploads (Optional) umi.use(irysUploader()) const context = initializeVerxio(umi, publicKey('PROGRAM_AUTHORITY')) context.umi.use(keypairIdentity('FEE_PAYER')) // Create your first loyalty program const result = await createLoyaltyProgram(context, { loyaltyProgramName: "Coffee Brew Rewards", metadataUri: "https://arweave.net/...", programAuthority: context.programAuthority, metadata: { organizationName: "Coffee Brew", // Required brandColor: "#FF5733", // Optional }, tiers: [ { name: "Bronze", xpRequired: 500, rewards: ["2% cashback"] }, { name: "Silver", xpRequired: 1000, rewards: ["5% cashback"] }, { name: "Gold", xpRequired: 2000, rewards: ["10% cashback"] }, ], pointsPerAction: { purchase: 100, review: 50, referral: 200, }, }) console.log('Loyalty Program Created:', result.collection.publicKey)
Two Approaches to Using Verxio Protocol
Verxio Protocol provides two complementary approaches for different use cases:
🚀 Direct Functions
Traditional functions that execute transactions immediately - perfect for simple, single-operation use cases.
âš¡ Instruction Functions
Instruction-based functions that return TransactionBuilder objects for advanced transaction composition, batching, and custom fee handling.
Core Features
🎯 Core Loyalty System
Create loyalty programs with custom tiers, issue NFT passes, track XP progression, and manage points with automatic tier updates.
Learn more →🎫 Voucher Management
Complete voucher lifecycle management with collections, validation, redemption, and analytics. Support for multiple voucher types.
Learn more →💬 Communication & Messaging
Direct messaging between programs and pass holders, program-wide broadcasts with targeted delivery, and read status tracking.
Learn more →⚡ Advanced Transaction Composition
Instruction-based functions for advanced transaction batching, custom fee handling, and gas optimization with built-in protocol fees.
Learn more →SDK Functions
Complete reference of all available functions in the Verxio Protocol SDK.
Core Loyalty Functions
Voucher Management
Next Steps
Ready to build?
Start by creating your first loyalty program or explore our interactive documentation to test all SDK functions.