use-cardano
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

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.

Package Sidebar

Install

npm i use-cardano

Weekly Downloads

177

Version

1.1.0

License

MIT

Unpacked Size

1.73 MB

Total Files

87

Last publish

Collaborators

  • alansmithee