Skip to content

Repository files navigation

Treasury Onepager

Static Cardano donation page that:

  1. Detects browser wallets exposing the CIP-30 API
  2. Connects the selected wallet
  3. Lets the user choose Mainnet or Preprod
  4. Builds a real Conway treasury donation transaction
  5. Lets the wallet sign and submit it
  6. Deploys as a plain static site to GitHub Pages

Configure

Edit src/config.ts:

  • defaultNetwork: initial network shown in the UI
  • donationAmountAda: default amount shown in the form
  • projectName: used in the UI
  • koios.Mainnet.url and koios.Preprod.url: provider endpoints
  • koios.*.bearerToken: optional Koios token if you need browser CORS support

Run locally

npm install
npm run dev

Then open http://localhost:5173.

Note:

  • npm run dev may 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.

Stable local test

npm run test:local

This builds the production bundle first and then serves it with Vite preview.

Build

npm run build

Deploy to GitHub Pages

  1. Push this project to a GitHub repository.
  2. In GitHub, open Settings -> Pages.
  3. Set Source to GitHub Actions.
  4. Push to main.
  5. GitHub Actions will build dist/ and publish the site.

Notes

  • 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.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages