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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://solana-unchained.gitbook.io/whitepaper/technical-specifications/developer-and-integration-architecture.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
