mirror of
https://github.com/hanzoai/bootnode.git
synced 2026-10-25 02:31:30 +00:00
Deploy the web3 console as lux.cloud (Lux brand). Convert from SSR (output: standalone) to static export so it serves as static assets on Cloudflare Pages with no edge/Node runtime. - next.config.ts: output "export" + images.unoptimized; drop headers()/ redirects() (unsupported in export) — moved to public/_headers and public/_redirects for Pages. - app/layout.tsx: bake brand from NEXT_PUBLIC_BRAND/BRAND; remove force-dynamic + headers() host detection (client still auto-detects brand from window.location.hostname via lib/brand.ts). - app/api/health, app/llms.txt: mark route handlers force-static. - Remove app/dashboard/api/keys route handler (backend proxy unsupported in export; the dashboard talks to brand.apiUrl directly). - nodes/[id]: split into a server page.tsx (generateStaticParams) + client node-detail-client.tsx so the dynamic segment is export-compatible. - unified-navigation.tsx: fix API Keys link to the real /dashboard/api-keys page (was pointing at the removed route handler). - lib/brand.ts: point lux IAM clientId at the real Casdoor app "lux-cloud" (clientId lux-app-client-id does not exist in IAM). Built with NEXT_PUBLIC_BRAND=lux, IAM lux.id / client lux-cloud; deployed to CF Pages project lux-cloud, custom domain lux.cloud. Co-authored-by: Hanzo Dev <[email protected]>
60 lines
2.0 KiB
TypeScript
60 lines
2.0 KiB
TypeScript
import { getBrand } from "@/lib/brand"
|
|
|
|
export const dynamic = "force-static"
|
|
|
|
export async function GET() {
|
|
const brand = getBrand()
|
|
const apiDomain = brand.name === "Hanzo" ? "api.hanzo.ai" : `api.${brand.domain}`
|
|
const docsDomain = brand.name === "Hanzo" ? "web3.hanzo.ai" : brand.domain
|
|
|
|
const content = `# ${brand.name}
|
|
## ${brand.tagline}
|
|
|
|
> ${brand.description}
|
|
|
|
## Products
|
|
- Node: Multi-chain RPC with 99.999% uptime across 100+ chains
|
|
- Data: Token, NFT, and Transfer APIs
|
|
- Wallets: ERC-4337 Smart Wallets with Account Abstraction
|
|
- Webhooks: Real-time onchain event notifications
|
|
- Gas Manager: Gas sponsorship and paymaster policies
|
|
- Bundler: ERC-4337 bundler for UserOperations
|
|
- Rollups: Launch custom rollups
|
|
|
|
## API Base URL
|
|
https://${apiDomain}/v1
|
|
|
|
## Authentication
|
|
X-API-Key: <your-api-key>
|
|
|
|
## Endpoints
|
|
- POST /v1/rpc/{chain}/{network} - JSON-RPC proxy
|
|
- GET /v1/tokens/{chain}/balances/{address} - Token balances
|
|
- GET /v1/tokens/{chain}/metadata/{contract} - Token metadata
|
|
- GET /v1/nfts/{chain}/metadata/{contract}/{token_id} - NFT metadata
|
|
- GET /v1/nfts/{chain}/collection/{contract} - NFT collection info
|
|
- GET /v1/nfts/{chain}/owned/{address} - NFTs owned by address
|
|
- POST /v1/wallets/create - Create smart wallet
|
|
- GET /v1/wallets/{address} - Get wallet details
|
|
- GET /v1/wallets - List wallets
|
|
- POST /v1/webhooks - Create webhook
|
|
- GET /v1/webhooks - List webhooks
|
|
- PATCH /v1/webhooks/{id} - Update webhook
|
|
- DELETE /v1/webhooks/{id} - Delete webhook
|
|
- GET /v1/gas/{chain}/prices - Gas prices
|
|
- POST /v1/gas/policies - Create gas policy
|
|
- POST /v1/gas/sponsor - Sponsor a UserOperation
|
|
- POST /v1/bundler/{chain}/{network} - Bundler RPC
|
|
- WS /v1/ws/{chain}/{network} - WebSocket subscriptions
|
|
|
|
## Supported Chains
|
|
Ethereum, Solana, Base, Arbitrum, Polygon, Optimism, Avalanche, BNB Smart Chain, Lux Network, and 90+ more.
|
|
|
|
## Documentation
|
|
https://${docsDomain}/docs
|
|
`
|
|
return new Response(content, {
|
|
headers: { "Content-Type": "text/plain; charset=utf-8" },
|
|
})
|
|
}
|