Static Cardano donation page that:
- Detects browser wallets exposing the CIP-30 API
- Connects the selected wallet
- Lets the user choose
MainnetorPreprod - Builds a real Conway treasury donation transaction
- Lets the wallet sign and submit it
- Deploys as a plain static site to GitHub Pages
Edit src/config.ts:
defaultNetwork: initial network shown in the UIdonationAmountAda: default amount shown in the formprojectName: used in the UIkoios.Mainnet.urlandkoios.Preprod.url: provider endpointskoios.*.bearerToken: optional Koios token if you need browser CORS support
npm install
npm run devThen open http://localhost:5173.
Note:
npm run devmay fail with Lucid's current browser dependency graph because some transitive packages mix CommonJS and ESM in ways that Vite dev mode does not always normalize correctly.- Use the stable local test path below if that happens.
npm run test:localThis builds the production bundle first and then serves it with Vite preview.
npm run build- Push this project to a GitHub repository.
- In GitHub, open
Settings -> Pages. - Set
SourcetoGitHub Actions. - Push to
main. - GitHub Actions will build
dist/and publish the site.
- This page builds a treasury donation tx body field, not a normal payment to a treasury recipient address.
- Treasury donation transactions must be submitted in the same epoch they are built.
- The page still needs a chain data provider in the browser for protocol parameters and current treasury value.
- Koios public access may not be sufficient for browser-hosted production use because of CORS and rate limits. If needed, use a Koios token or put a thin backend/proxy in front of the provider.
- The production bundle is the reliable way to test this project locally right now.