@onflow/kit
v0.0.1-kit.5
Published
React library for interacting with the Flow blockchain
Downloads
308
Maintainers
Keywords
Readme
@onflow/kit
Alpha – This library is currently in alpha and subject to change.
A React library that provides hooks for interacting with the Flow blockchain. It helps you authenticate users, run Cadence scripts and transactions, listen to events, and manage network configuration directly from your components.
🔧 Installation
npm install @onflow/kit
🧩 Quick Setup
Before using any hooks, wrap your app in the FlowProvider
:
import { FlowProvider } from "@onflow/kit"
import flowJson from "../flow.json"
<FlowProvider
config={{
accessNodeUrl: "https://access-mainnet.onflow.org",
flowNetwork: "mainnet",
appDetailTitle: "My On Chain App",
appDetailIcon: "https://example.com/icon.png",
appDetailDescription: "A decentralized app on Flow",
appDetailUrl: "https://myonchainapp.com",
}}
flowJson={flowJson}
>
<App />
</FlowProvider>
🪝 Available Hooks
useCurrentFlowUser
useFlowAccount
useFlowBlock
useFlowConfig
useFlowEvents
useFlowQuery
useFlowMutate
useFlowTransaction
📚 Full Documentation
Looking for full API docs, examples, and usage tips?