> For the complete documentation index, see [llms.txt](https://solana-unchained.gitbook.io/whitepaper/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://solana-unchained.gitbook.io/whitepaper/technical-specifications/developer-and-integration-architecture.md).

# Developer & Integration Architecture

1\. **Future SDK Overview**

The Unchained SDK (planned for Phase 4) will expose:

// Connect wallet

const wallet = await UnchainedSDK.connect();

&#x20;

// Execute swap via Jupiter routing

const swap = await wallet.swap({

&#x20; from: 'SOL',

&#x20; to: 'UCHN',

&#x20; amount: 1.0,

&#x20; slippage: 0.5 // percent

});

&#x20;

// Access AI Tool Hub

const insight = await wallet.ai.query({

&#x20; type: 'trade\_analysis',

&#x20; asset: 'SOL/USDC'

});

&#x20;

// Commerce purchase

const purchase = await wallet.commerce.buy({

&#x20; product: 'esim\_1gb',

&#x20; currency: 'UCHN'

});

2\. **Commerce Protocol Integration (Third-Party Apps)**

Third-party applications can integrate the Commerce Protocol to accept $UCHN payments:

1. Register as a merchant via on-chain instruction
2. Generate a payment request (amount, token, memo)
3. User's wallet signs and submits the payment transaction
4. Merchant receives settlement (stablecoin or $UCHN) after fee deduction
5. Webhook callback notifies merchant's backend of confirmed payment

{% hint style="info" %}
No KYC required from either party, settlement is purely on-chain.
{% endhint %}

3. **AI Tool Hub "Token-Gating Logic"**

Request received → Check wallet balance

&#x20;       ↓

Balance < free tier threshold → Return limited response

&#x20;       ↓

Balance ≥ pro tier threshold → Deduct access fee from wallet

&#x20;       ↓

Full AI response delivered

&#x20;       ↓

Fee routed: X% burned, Y% to treasury

Access tiers and fee amounts are stored in an on-chain config account, updatable by governance multisig.
