Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions apps/web/next.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
import type { NextConfig } from "next";
const nextConfig: NextConfig = {
async headers() {
return [
{ source: "/.well-known/:path*", headers: [{ key: "Access-Control-Allow-Origin", value: "*" }] },
{
source: "/.well-known/wallet-app.json",
headers: [{ key: "Content-Type", value: "application/json; charset=utf-8" }],
},
{ source: "/wallet-app/:path*", headers: [{ key: "Access-Control-Allow-Origin", value: "*" }] },
];
},
reactStrictMode: true,
reactCompiler: true,
typedRoutes: true,
Expand Down
30 changes: 30 additions & 0 deletions apps/web/public/.well-known/wallet-app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"name": "XCP.io",
"short_name": "XCP.io",
"description": "Explore Counterparty assets, addresses, blocks, and transactions.",
"start_url": "/",
"scope": "/",
"display": "standalone",
"background_color": "#09090b",
"categories": ["utility", "counterparty"],
"icons": [
{
"src": "/wallet-app/icon.png",
"sizes": "1024x1024",
"type": "image/png",
"purpose": "any"
}
],
"wallet": {
"version": "1",
"subtitle": "Counterparty Explorer",
"heroImageUrl": "/wallet-app/banner.png",
"splashImageUrl": "/wallet-app/splash.png",
"chains": {
"optional": ["bip122:000000000019d6689c085ae165831e93"]
},
"capabilities": {
"optional": []
}
}
}
9 changes: 9 additions & 0 deletions apps/web/public/_headers
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,12 @@
# per-load revalidation the default (max-age=0, must-revalidate) forces.
/_next/static/*
Cache-Control: public, max-age=31536000, immutable

/.well-known/*
Access-Control-Allow-Origin: *

/.well-known/wallet-app.json
Content-Type: application/json; charset=utf-8

/wallet-app/*
Access-Control-Allow-Origin: *
Binary file added apps/web/public/wallet-app/banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/web/public/wallet-app/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/web/public/wallet-app/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions docs/casatookan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Casa Tookan app

The app manifest is served at `/.well-known/wallet-app.json`. The PNGs under `/wallet-app/` provide its icon, banner and splash. Paths are root-relative so they resolve outside `/.well-known/`.

The manifest makes this site discoverable when a user saves it in Casa Tookan. It does not register the site in a curated directory or enable new signing methods. Bitcoin support is optional because browsing needs no wallet. The splash uses Casa Tookan's automatic readiness timeout.

This change adds browsing metadata only. Existing connection and signing flows are unchanged.

## Deployment check

- Fetch the manifest without cookies and confirm JSON, HTTP 200 and `Access-Control-Allow-Origin: *`.
- Fetch a missing `/.well-known/` path and a missing `/wallet-app/` image: each must return 404 with CORS, not the homepage.
- Fetch all three images: 1024×1024 opaque icon, 1200×630 banner, 200×200 splash.
- Open the site in the native Casa Tookan browser, save it and reopen its app card. Check the title, artwork and splash dismissal.

Headers are configured in both Next (SSR/404) and Cloudflare Static Assets (public files). Production framing and CSP policies are unchanged; the development iframe bridge is not installed.

Format: https://docs.casatookan.com/apps.html
Loading