use-cardano
use-cardano is a react context, hook, and set of components that makes interacting with the Cardano blockchain easy. It allows you to build web3 applications, connect wallets and performing tasks such as signing transactions and interacting with smart contracts.
Documentation
Visit the documentation site for installation instructions, configuration options, and live examples.
Contributing / Development
This repository contains the source code for use-cardano, a react hook that makes interacting with the Cardano blockchain easy.
Feel free to contribute in any capacity, either by opening an issue, creating a pull request or by giving feedback.
Are you new to Open Source development, or the Cardano dApps eco system? I know it can be daunting, but do not be afraid to reach out in an issue. Any and all contributions are welcome.
Running the project in development mode
We highly recommend pnpm over yarn and npm since it handles local project linking, as well as being very performant.
git clone git@github.com:GGAlanSmithee/use-cardano.git
npm i -g pnpm
cd example && pnpm i && cd ..
- Installs example dependencies
pnpm link ./example/node_modules/react ./example/node_modules/lucid-cardano
- Links the libraries peer dependencies
pnpm i
- Installs library dependencies
pnpm dev
- Runs the library in watch mode, and launches the example app
Reverse Proxy
When running the project locally, the examples site will be served on http://localhost:4200
.
Some wallet providers (gerowallet) will not inject itself in the CIP-0030 web bridge if the page is not served over https. To get around this, the site is also served over a reverse proxy using localtunnel. The proxied site will launch automatically in your default browser, and you will be informed that it's being proxied and prompted to continue.
Example app
There is an example app in the /example
folder. It is a simple Next.js app that serves both as a testbed and as a reference. Changes to both the use-cardano
package as well as the example app will be hot-reloaded during development.