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

# Integrations Overview

> External services and protocols integrated with zkTerm

## Overview

zkTerm integrates with multiple external services and protocols to provide a complete privacy-first experience.

## Active Integrations

| Integration       | Purpose                                          | Status  |
| ----------------- | ------------------------------------------------ | ------- |
| **Starknet**      | L2 blockchain for zkID proofs and STRK transfers | Live    |
| **Pinata**        | IPFS pinning service for zkStorage               | Live    |
| **Crust Network** | Decentralized storage layer                      | Planned |
| **x402**          | Internal payment system for zkStorage and zkAI   | Planned |

## Starknet

Starknet is a Layer 2 scaling solution using STARK proofs. zkTerm uses Starknet for:

1. **zkID Proof Registry** - Cairo smart contract stores zkID verification proofs on-chain
2. **STRK Transfers** - Native token transfers within zkTerm
3. **Cross-Chain Bridge** - ETH/SOL to Starknet bridging via StarkGate

[View Starknet Integration](/integrations/starknet)

## Pinata

Pinata provides IPFS pinning services for zkStorage:

1. **File Uploads** - Encrypted files stored on IPFS via Pinata API
2. **Gateway Access** - Fast downloads via Pinata gateway
3. **Metadata Storage** - File metadata stored alongside encrypted data

[View Pinata Integration](/integrations/pinata)

## Crust Network

Crust Network provides decentralized storage guarantees on top of IPFS:

1. **Storage Incentives** - Economic layer for permanent file storage
2. **Multi-Replica** - Files replicated across multiple nodes
3. **On-Chain Proofs** - Storage proofs verified on Polkadot

[View Crust Integration](/integrations/crust)

## x402

x402 is zkTerm's internal payment system for resource-consuming features:

1. **zkStorage Payments** - Pay for IPFS storage and Pinata pinning costs
2. **zkAI Credits** - Pay for AI assistant token usage
3. **Crypto Payments** - ZKTR token and other supported cryptocurrencies

[View x402 Integration](/integrations/x402)

## Integration Architecture

```
┌──────────────────────────────────────────────────────────┐
│                   INTEGRATION LAYER                       │
├──────────┬──────────┬──────────┬─────────────────────────┤
│ Starknet │  Pinata  │  Crust   │          x402           │
│  (zkID)  │(zkStorage)│(zkStorage)│   (zkStorage + zkAI)  │
└──────────┴──────────┴──────────┴─────────────────────────┘
```

## Environment Variables

Each integration requires specific environment variables:

| Integration | Required Variables                         |
| ----------- | ------------------------------------------ |
| Starknet    | `STARKNET_RPC_URL`, `STARKNET_PRIVATE_KEY` |
| Pinata      | `PINATA_JWT`                               |
| Crust       | `CRUST_API_KEY` (planned)                  |
| x402        | Wallet-based (no API key needed)           |
