Skip to content

Commit b4201f5

Browse files
authored
Merge pull request #54 from ar-io/PE-8666-402
Pe 8666 402
2 parents 482e380 + b9e33aa commit b4201f5

File tree

7 files changed

+765
-18
lines changed

7 files changed

+765
-18
lines changed

content/build/run-a-gateway/manage/environment-variables.mdx

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,40 @@ The main AR.IO Gateway service that handles data retrieval, indexing, and servin
255255
| `LMDB_DATA_PATH` | string | `./data/lmdb` | Path to LMDB data |
256256
| `PARQUET_DATA_PATH` | string | `./data/parquet` | Path to Parquet data |
257257

258+
### Rate Limiter
259+
260+
| Variable | Type | Default | Description |
261+
| ----------------------------------------- | ------- | --------- | ----------------------------------- |
262+
| `ENABLE_RATE_LIMITER` | boolean | `false` | Enable rate limiting system |
263+
| `RATE_LIMITER_TYPE` | string | `memory` | Rate limiter type (memory or redis) |
264+
| `RATE_LIMITER_REDIS_ENDPOINT` | string | - | Redis endpoint for rate limiter |
265+
| `RATE_LIMITER_IP_TOKENS_PER_BUCKET` | number | `100000` | IP bucket token capacity |
266+
| `RATE_LIMITER_IP_REFILL_PER_SEC` | number | `20` | IP bucket refill rate per second |
267+
| `RATE_LIMITER_RESOURCE_TOKENS_PER_BUCKET` | number | `1000000` | Resource bucket token capacity |
268+
| `RATE_LIMITER_RESOURCE_REFILL_PER_SEC` | number | `100` | Resource bucket refill rate |
269+
| `RATE_LIMITER_IPS_AND_CIDRS_ALLOWLIST` | string | - | Comma-separated IP/CIDR allowlist |
270+
| `RATE_LIMITER_ARNS_ALLOWLIST` | string | - | Comma-separated ArNS allowlist |
271+
272+
### x402 Payment Protocol
273+
274+
| Variable | Type | Default | Description |
275+
| -------------------------------------- | ------- | -------------- | ------------------------------------------ |
276+
| `ENABLE_X_402_USDC_DATA_EGRESS` | boolean | `false` | Enable x402 USDC payments |
277+
| `X_402_USDC_NETWORK` | string | - | Base network (base-sepolia or base) |
278+
| `X_402_USDC_WALLET_ADDRESS` | string | - | USDC wallet address for receiving payments |
279+
| `X_402_USDC_FACILITATOR_URL` | string | - | Payment facilitator URL |
280+
| `X_402_USDC_PER_BYTE_PRICE` | number | `0.0000000001` | Price per byte in USDC |
281+
| `X_402_USDC_DATA_EGRESS_MIN_PRICE` | number | `0.001` | Minimum payment amount |
282+
| `X_402_USDC_DATA_EGRESS_MAX_PRICE` | number | `1.00` | Maximum payment amount |
283+
| `X_402_RATE_LIMIT_CAPACITY_MULTIPLIER` | number | `10` | Paid token capacity multiplier |
284+
| `X_402_APP_NAME` | string | - | Application name for paywall |
285+
| `X_402_APP_LOGO` | string | - | Application logo URL for paywall |
286+
| `X_402_CDP_CLIENT_KEY` | string | - | **PUBLIC**: CDP client key for Onramp (optional testnet, required mainnet) |
287+
| `CDP_API_KEY_ID` | string | - | **SECRET**: CDP API key ID for Onramp (optional testnet, required mainnet) |
288+
| `CDP_API_KEY_SECRET` | string | - | **SECRET**: CDP API secret for Onramp (use CDP_API_KEY_SECRET_FILE instead) |
289+
| `CDP_API_KEY_SECRET_FILE` | string | - | **SECRET**: Path to CDP secret file for Onramp (takes precedence, recommended) |
290+
| `CHUNK_GET_BASE64_SIZE_BYTES` | number | `368640` | Fixed size for chunk pricing |
291+
258292
## Observer Service
259293

260294
### Basic Configuration

content/build/run-a-gateway/manage/index.mdx

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,17 @@ title: "Manage your Gateway"
33
description: "Comprehensive guides for advanced AR.IO Gateway operations including monitoring, optimization, content moderation, and specialized configurations"
44
---
55

6-
import { Database, RotateCcw, TrendingUp, Zap, Globe, Shield, Settings, Wrench } from "lucide-react";
6+
import {
7+
Database,
8+
RotateCcw,
9+
TrendingUp,
10+
Zap,
11+
Globe,
12+
Shield,
13+
Settings,
14+
Wrench,
15+
CreditCard,
16+
} from "lucide-react";
717

818
Master the advanced features and configurations of your AR.IO Gateway. These comprehensive guides cover everything from performance optimization to content moderation, helping you run a professional-grade gateway infrastructure.
919

@@ -39,8 +49,17 @@ Master the advanced features and configurations of your AR.IO Gateway. These com
3949
Configure advanced filters to efficiently process and index only the data you need, optimizing performance and resource usage.
4050
</Card>
4151

42-
<Card title="Setting Apex Domain Content" href="/build/run-a-gateway/manage/setting-apex-domain" icon={<Globe className="w-6 h-6" />}>
43-
Customize your gateway's root domain to serve custom content, project information, or documentation instead of default network info.
52+
<Card
53+
title="Setting Apex Domain Content"
54+
href="/build/run-a-gateway/manage/setting-apex-domain"
55+
icon={<Globe className="w-6 h-6" />}
56+
>
57+
Customize your gateway's root domain to serve custom content, project
58+
information, or documentation instead of default network info.
59+
</Card>
60+
61+
<Card title="x402 Payment Setup" href="/build/run-a-gateway/manage/x402-setup" icon={<CreditCard className="w-6 h-6" />}>
62+
Configure x402 payment protocol to monetize data egress with frictionless cryptocurrency payments and premium access tiers.
4463
</Card>
4564
</Cards>
4665

@@ -82,4 +101,3 @@ Master the advanced features and configurations of your AR.IO Gateway. These com
82101
failed epoch guidance, and frequently asked questions.
83102
</Card>
84103
</Cards>
85-

content/build/run-a-gateway/manage/meta.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@
44
"pages": [
55
"upgrading-a-gateway",
66
"ssl-certs",
7+
"environment-variables",
78
"filters",
89
"content-moderation",
910
"index-snapshots",
1011
"setting-apex-domain",
11-
"troubleshooting",
12-
"environmental-variables"
12+
"x402-setup",
13+
"troubleshooting"
1314
]
1415
}

0 commit comments

Comments
 (0)