diff --git a/typescript/site/app/api/x402/session-token/route.ts b/typescript/site/app/api/x402/session-token/route.ts new file mode 100644 index 0000000000..3d9293fc20 --- /dev/null +++ b/typescript/site/app/api/x402/session-token/route.ts @@ -0,0 +1 @@ +export { POST } from "x402-next"; diff --git a/typescript/site/app/ecosystem/partners-data/1shot-api/metadata.json b/typescript/site/app/ecosystem/partners-data/1shot-api/metadata.json new file mode 100644 index 0000000000..3154fec407 --- /dev/null +++ b/typescript/site/app/ecosystem/partners-data/1shot-api/metadata.json @@ -0,0 +1,7 @@ +{ + "name": "1Shot API", + "category": "Ecosystem Infrastructure & Tooling", + "logoUrl": "/logos/1shot-api.png", + "description": "A general purpose fascilitator to monetize any n8n workflow with your favorite ERC-20 token.", + "websiteUrl": "https://docs.1shotapi.com/automation/n8n.html#monetize-n8n-workflows-with-x402" +} \ No newline at end of file diff --git a/typescript/site/app/ecosystem/partners-data/aurracloud/metadata.json b/typescript/site/app/ecosystem/partners-data/aurracloud/metadata.json new file mode 100644 index 0000000000..44336d46af --- /dev/null +++ b/typescript/site/app/ecosystem/partners-data/aurracloud/metadata.json @@ -0,0 +1,7 @@ +{ + "name": "AurraCloud", + "category": "Services/Endpoints", + "logoUrl": "/logos/aurracloud.png", + "description": "AI agents hosting and Tooling Platform, with MCP, smartWallets, OpenAI API compatibility and X402 support.", + "websiteUrl": "https://aurracloud.com/x402" +} diff --git a/typescript/site/app/ecosystem/partners-data/bonsai/metadata.json b/typescript/site/app/ecosystem/partners-data/bonsai/metadata.json new file mode 100644 index 0000000000..3ea67f93af --- /dev/null +++ b/typescript/site/app/ecosystem/partners-data/bonsai/metadata.json @@ -0,0 +1,7 @@ +{ + "name": "Bonsai", + "description": "Create, remix, and trade evolving media. Use our API to generate AI content using smart media protocol (SMP) templates.", + "logoUrl": "/logos/bonsai.png", + "websiteUrl": "https://onbonsai.gitbook.io/docs/smart-media/content-generation-api", + "category": "Services/Endpoints" +} \ No newline at end of file diff --git a/typescript/site/app/ecosystem/partners-data/firecrawl/metadata.json b/typescript/site/app/ecosystem/partners-data/firecrawl/metadata.json new file mode 100644 index 0000000000..23bcef92f8 --- /dev/null +++ b/typescript/site/app/ecosystem/partners-data/firecrawl/metadata.json @@ -0,0 +1,7 @@ +{ + "name": "Firecrawl", + "description": "Firecrawl is a web scraping API that allows you to turn websites into LLM-ready data.", + "logoUrl": "/logos/firecrawl.png", + "websiteUrl": "https://firecrawl.dev", + "category": "Services/Endpoints" +} \ No newline at end of file diff --git a/typescript/site/app/ecosystem/partners-data/questflow/metadata.json b/typescript/site/app/ecosystem/partners-data/questflow/metadata.json new file mode 100644 index 0000000000..610de3c71a --- /dev/null +++ b/typescript/site/app/ecosystem/partners-data/questflow/metadata.json @@ -0,0 +1,7 @@ +{ + "name": "Questflow", + "category": "Services/Endpoints", + "logoUrl": "/logos/questflow.png", + "description": "The orchestration layer for the multi-agent economy. Orchestrate multiple AI agents to research, take action and earn rewards on-chain, autonomously.", + "websiteUrl": "https://questflow.ai?utm_source=x402_website&utm_medium=ecosystem" +} \ No newline at end of file diff --git a/typescript/site/app/ecosystem/partners-data/tip-md/metadata.json b/typescript/site/app/ecosystem/partners-data/tip-md/metadata.json new file mode 100644 index 0000000000..1e339f669f --- /dev/null +++ b/typescript/site/app/ecosystem/partners-data/tip-md/metadata.json @@ -0,0 +1,7 @@ +{ + "name": "tip.md", + "description": "A crypto tipping service that enables AI assistants to help users send cryptocurrency tips to content creators directly from their chat interface. USDC tips via MCP are powered by x402. The MCP service allows for checking wallet types and preparing cryptocurrency tips for users/agents to complete.", + "logoUrl": "/logos/tipdotmd.png", + "websiteUrl": "https://www.tip.md/documentation?tab=mcp-server", + "category": "Services/Endpoints" +} \ No newline at end of file diff --git a/typescript/site/app/ecosystem/partners-data/x402-rs-facilitator/metadata.json b/typescript/site/app/ecosystem/partners-data/x402-rs-facilitator/metadata.json new file mode 100644 index 0000000000..61736a02d8 --- /dev/null +++ b/typescript/site/app/ecosystem/partners-data/x402-rs-facilitator/metadata.json @@ -0,0 +1,7 @@ +{ + "name": "x402.rs Facilitator", + "category": "Ecosystem Infrastructure & Tooling", + "logoUrl": "/logos/x402-rs.svg", + "description": "Independent, open-source facilitator in Rust. Easy to self-host, extend to new networks, or use via our hosted instance.", + "websiteUrl": "https://facilitator.x402.rs" +} diff --git a/typescript/site/app/facilitator/discovery/resources/route.ts b/typescript/site/app/facilitator/discovery/resources/route.ts new file mode 100644 index 0000000000..9afe6c057c --- /dev/null +++ b/typescript/site/app/facilitator/discovery/resources/route.ts @@ -0,0 +1,48 @@ +import { NextRequest, NextResponse } from "next/server"; +import { + ListDiscoveryResourcesRequest, + ListDiscoveryResourcesResponse, + ListDiscoveryResourcesResponseSchema, +} from "x402/types"; + +/** + * This route is used to discover the available services on the facilitator. + * It returns a list of services that are available on the facilitator. + * + * @param request - The request object + * @returns A list of services that are available on the facilitator + */ +export async function GET(request: NextRequest) { + try { + // TODO: Implement actual discovery logic + + // Parse query parameters + const { searchParams } = new URL(request.url); + const { offset, limit } = Object.fromEntries( + searchParams.entries(), + ) as ListDiscoveryResourcesRequest; + + // TODO: Search by type, resource, fetching page size and page token + + // For now, return mock data + const mockListDiscoveryResourcesResponse: ListDiscoveryResourcesResponse = { + x402Version: 1, + items: [], + pagination: { + limit, + offset, + total: 0, + }, + }; + + // Validate response with schema + const validatedResponse = ListDiscoveryResourcesResponseSchema.parse( + mockListDiscoveryResourcesResponse, + ); + + return NextResponse.json(validatedResponse); + } catch (error) { + console.error("Error in discover/list:", error); + return NextResponse.json({ error: "Internal server error" }, { status: 500 }); + } +} diff --git a/typescript/site/app/layout.tsx b/typescript/site/app/layout.tsx index 26396a893a..8ae0d50ade 100644 --- a/typescript/site/app/layout.tsx +++ b/typescript/site/app/layout.tsx @@ -25,18 +25,10 @@ export default function RootLayout({ return (
- - - + diff --git a/typescript/site/app/page.tsx b/typescript/site/app/page.tsx index c5d441a692..ae8ae92ee1 100644 --- a/typescript/site/app/page.tsx +++ b/typescript/site/app/page.tsx @@ -1,4 +1,5 @@ import Link from 'next/link'; +import Image from 'next/image'; import { BoltIcon, CloudIcon, @@ -15,7 +16,6 @@ import { import { FeatureItem } from './components/FeatureItem'; import GithubIcon from './assets/github.svg'; import DiscordIcon from './assets/discord.svg'; -import WordmarkCondensed from './assets/x402_wordmark_dark.svg'; import { Section } from './components/Section'; import { BackgroundVideo } from './components/BackgroundVideo'; import NavBar from './components/NavBar'; @@ -92,24 +92,37 @@ export default function Home() { {/* Hero Section */}An open protocol for internet-native payments