import { Hono } from "hono"
import { createMiddleware } from "@faremeter/middleware/hono"
import { xSolanaSettlement } from "@faremeter/info/solana"
const app = new Hono()
const paymentWall = await createMiddleware({
facilitatorURL: "https://facilitator.corbits.dev",
accepts: [
xSolanaSettlement({
network: "devnet",
payTo: "7xKXwxRPMo2sUAT5...",
asset: "USDC",
amount: "10000",
}),
],
})
app.get("/protected", paymentWall, (c) => {
return c.json({ data: "paid content" })
})
app.get("/free", (c) => {
return c.json({ data: "free content" })
})
export { app }