Configure FCL

Configure Blocto wallet to your Flow dApp

Installation

circle-info

FCL is under heavy developments and the versions are not always backward compatible. We recommend that you use @blocto/fcl@^1.4.0 for now.

circle-info

For why to use @blocto/fcl instead of @onflow/fcl, check out this Github PRarrow-up-right for further information.

npm install @blocto/fcl@^1.4.0

Configure Flow Networks & Blocto wallet URL

Blocto wallet provides two ways to communicate with FCL, according to your needs, choose one of them to configure your dApp. Visit How to Configure FCLarrow-up-right to get further configuration settings.

Using front channel

import * as fcl from "@blocto/fcl";

fcl
  .config()
  // connect to Flow mainnet
  .put("accessNode.api", "https://rest-mainnet.onflow.org")
  // use Blocto wallet
  .put(
    "discovery.wallet",
    `https://wallet-v2.blocto.app/${YOUR_DAPP_ID}/flow/authn`
  )

Using back channel

circle-info

Visit Register App ID to learn how to register App ID

Last updated

Was this helpful?