Skip to content

maikershq/maikers-mainframe-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Mainframe SDK

TypeScript SDK for Mainframe protocol - Powering the agentic economy

npm version npm downloads GitHub Stars TypeScript License

Tests Code Coverage Bundle Size Discord Twitter Follow

Mainframe SDK powers the agentic economy by transforming any verified Solana NFT collection into intelligent AI agents. Create Agent-NFTs that participate in autonomous economic activities with zero-knowledge security, 10K+ operations/minute performance, and built-in revenue sharing.

What is Mainframe SDK?

The Mainframe SDK enables developers to create AI agents from verified NFT collections on Solana. Unlike other solutions that require custom integrations, Mainframe leverages Solana's native Collection.verified = true requirement - creating a permissionless yet secure system where any verified collection can participate in the agentic economy.

Built on Mainframe v1.0.0 program (mnfm211AwTDA8fGvPezYs3jjxAXgoucHGuTMUbjFssE) with FrameClaw framework integration.

Perfect for DeFi trading bots, NFT collection management, gaming agents, social media automation, and any application requiring intelligent blockchain interactions.

Features

  • πŸ”’ Zero-Knowledge Security - Client-side XChaCha20 encryption, protocol never sees private data
  • ⚑ Production Performance - 10K+ ops/min throughput, <100ms cached responses
  • πŸ’° Revenue Sharing - Built-in affiliate program with up to 50% commission
  • πŸ› οΈ Developer Experience - TypeScript-first with comprehensive tooling and testing
  • πŸ”Œ Framework Ready - Anchor, Wallet Adapter, and React integrations included

Installation

npm install @maikers/mainframe-sdk

Quick Start

import { createMainnetSDK } from "@maikers/mainframe-sdk";

// Initialize SDK (protocolWallet deprecated - fetched from on-chain config)
const sdk = createMainnetSDK({ 
  storage: { arweave: { gateway: 'https://arweave.net' } }
});
await sdk.initialize("Phantom");

// Create AI agent from verified NFT (0.05 SOL fee*)
const result = await sdk.createAgent(nftMint, {
  name: "Trading Assistant",
  description: "DeFi trading bot", 
  framework: "FrameClaw",
  capabilities: [{ type: "defi", plugins: ["jupiter-swap"] }]
});
// *Fee varies: Genesis collection (FREE), Partner collections (25-75% off)

Complete Examples β†’ | Full Documentation β†’

Revenue Sharing

Earn commission on every agent activation through the tier-based affiliate system:

// Create agent with affiliate revenue
const result = await sdk.createAgent(nftMint, agentConfig, {
  affiliate: 'YOUR_WALLET_ADDRESS',
  referrer: 'OPTIONAL_REFERRER_ADDRESS'  // For 5% referrer bonus
});

// Track earnings
sdk.events.onAffiliatePaid((event) => {
  console.log(`Earned: ${event.affiliateAmount} lamports`);
});

Affiliate Tiers & Commission Rates

Tier Sales Required Commission Rate
πŸ₯‰ Bronze 0-99 15%
πŸ₯ˆ Silver 100-499 20%
πŸ₯‡ Gold 500-1,999 30%
πŸ’Ž Platinum 2,000-9,999 40%
πŸ’ŽπŸ’Ž Diamond 10,000+ 50%

Features:

  • βœ… Permissionless participation - no registration required
  • βœ… Auto-initialize on first commission
  • βœ… Tier progression based on lifetime sales
  • βœ… Single-level referrals (earn 5% from your referrals' commissions)
  • βœ… Custom bonuses for promotions (set by protocol authority)
  • βœ… Instant on-chain payouts

Affiliate Program Details β†’

Framework Integration

React/Next.js

import { QuickStartIntegrations } from "@maikers/mainframe-sdk";
const sdk = QuickStartIntegrations.walletAdapter(wallet.adapter, connection);

Anchor

import { QuickStartIntegrations } from "@maikers/mainframe-sdk";  
const sdk = QuickStartIntegrations.anchor(provider);

Integration Examples β†’ | API Reference β†’

Documentation

Guide Description
Quick Start Get up and running in minutes
API Reference Complete method documentation
Security Model Architecture and best practices
Integration Examples Framework-specific patterns
Performance Guide Optimization strategies
Release Management Versioning and publishing guide
Troubleshooting Common issues and solutions

Development

git clone https://github.com/MaikersHQ/maikers-mainframe-sdk
cd maikers-mainframe-sdk
pnpm install && pnpm run build

Contributing Guide β†’ | Development Setup β†’ | Release Process β†’

Resources

License

Apache 2.0 - see LICENSE


Built by maikers - creators of realities

Sponsor this project

Packages

 
 
 

Contributors