Page cover

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:

  1. Your Finnie address in walletAddress

  2. Both your KOII and Arweave balance in walletBalance

  3. isFinnieConnected set to true

When connectFinnie fail you'll have:

  1. isError set to false

  2. isFinnieConnected set to false

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