> ## Documentation Index
> Fetch the complete documentation index at: https://docs.maikers.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Mainframe SDK

> TypeScript SDK for Mainframe protocol - Powering the agentic economy

## Welcome to Mainframe SDK

**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.

<CardGroup cols={2}>
  <Card title="Quick Start" icon="rocket" href="/sdk/quickstart">
    Get up and running with the Mainframe SDK in minutes
  </Card>

  <Card title="API Reference" icon="code" href="/sdk/api-reference">
    Complete API documentation and method references
  </Card>

  <Card title="Examples" icon="lightbulb" href="/sdk/examples">
    Real-world examples and use cases
  </Card>

  <Card title="Revenue Sharing" icon="money-bill" href="/mainframe/overview">
    Learn about the affiliate commission system
  </Card>
</CardGroup>

## Key Features

<AccordionGroup>
  <Accordion title="🔒 Zero-Knowledge Security">
    **Client-Side Encryption**

    * Client-side XChaCha20 encryption
    * Protocol never sees private data
    * Secure key management
  </Accordion>

  <Accordion title="Production Performance">
    **High Throughput**

    * 10,000+ operations/minute throughput
    * \<100ms cached responses
    * Optimized for high-frequency trading and interaction
  </Accordion>

  <Accordion title="Revenue Sharing">
    **Built-in Affiliate System**

    * Earn 15-50% commission on agent activations
    * Tier-based progression (Bronze to Diamond)
    * Instant on-chain payouts
  </Accordion>

  <Accordion title="🔌 Framework Ready">
    **Seamless Integration**

    * First-class support for **FrameClaw**
    * Anchor and Wallet Adapter integrations included
    * React hooks and components
  </Accordion>
</AccordionGroup>

## Installation

<CodeGroup>
  ```bash npm theme={null}
  npm install @maikers/mainframe-sdk
  ```

  ```bash pnpm theme={null}
  pnpm add @maikers/mainframe-sdk
  ```

  ```bash yarn theme={null}
  yarn add @maikers/mainframe-sdk
  ```
</CodeGroup>

## Quick Start

```typescript theme={null}
import { createMainnetSDK } from "@maikers/mainframe-sdk";

// Initialize SDK
const sdk = createMainnetSDK({
  storage: { arweave: { gateway: "https://arweave.net" } },
});

await sdk.initialize("Phantom");

// Create AI agent from verified NFT
const result = await sdk.createAgent(nftMint, {
  name: "Trading Assistant",
  description: "DeFi trading bot",
  framework: "FrameClaw",
  capabilities: [{ type: "defi", plugins: ["jupiter-swap"] }],
});
```

## Revenue Sharing

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

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

## Framework Integration

**React/Next.js**

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

**Anchor**

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

## Getting Help

<CardGroup cols={2}>
  <Card title="GitHub Issues" icon="github">
    Report bugs or request features on our [GitHub
    repository](https://github.com/maikershq/maikers-mainframe-sdk)
  </Card>

  <Card title="Discord Community" icon="discord">
    Join our [Discord server](https://discord.gg/maikers) for community support
  </Card>

  <Card title="Email Support" icon="envelope">
    Contact our team at [enterprise@maikers.com](mailto:enterprise@maikers.com)
  </Card>
</CardGroup>
