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. Visit the official documentation for installation instructions, configuration options, and live examples.
The package leverages lucid for transaction building and off-chain code to interact with smart contracts. For more information on that, visit the lucid documentation.
Minimal Example
import "use-cardano/styles/use-cardano.css"
import { useCardano, CardanoProvider, CardanoWalletSelector, CardanoToaster } from "use-cardano"
const Content = () => {
const { account } = useCardano()
return (
<>
<CardanoWalletSelector />
<div>Connected Address: {account.address}</div>
</>
)
}
const App = () => (
<CardanoProvider options={options}>
<Content />
<CardanoToaster />
</CardanoProvider>
)
Contributing / Development
See the contributing doc for instructions on how to contribute to the development of the library.
LICENSE
MIT, see LICENSE for more information.