Finnie Wallet
Integrate your dApp with Finnie wallet
useFinnie
To integrate with Finnie use the useFinnie hook and import it is as easy as:
import { useFinnie } from "components/finnie";useFinnie hook exports many variables and helpers to integrate with Finnie.
const {
state: { connectFinnie, disconnectFinnie, walletAddress, walletBalance, isFinnieConnected, isLoading, isError }
} = useFinnie();connectFinnie a function to call to try to connect to Finnie. e.g:
<button onClick={connectFinnie}>Connect to finnie</button>When connectFinnie succeed you'll have:
Your Finnie address in
walletAddressBoth your KOII and Arweave balance in
walletBalanceisFinnieConnected set to
true
When connectFinnie fail you'll have:
isErrorset tofalseisFinnieConnectedset tofalse
When you're still in the process of connecting to Finnie you'll have isLoading set to true
e.g:
Calling disconnectFinnie will disconnect the connection to Finnie.
Finnie Wallet API
When you're connected to Finnie, you can interact with any Finnie exposed API. e.g: The sendKoiiTip function inside api/finnie.ts used to send KOII from your wallet to another address.
Last updated
