Blocto
About porttoBlog
  • 📣Introduction
  • Blocto Environment
  • Give Feedback
  • BLOCTO SDK
    • Overview
    • JavaScript SDK
      • Flow
        • Tutorial
        • Configure FCL
        • Authenticate / Unauthenticate
        • Send Transaction
        • Account Proof
        • Flow Networks
        • Verified Transaction
        • Migration Guide
  • Blocto App
    • Deep Linking
    • Token Listing
    • NFT Listing (on Flow)
  • Technical Documents
    • Key Management
  • BloctoSwap
    • Token Listing
  • Support
    • Contact Us
    • Web Wallet v1 Sunset Notice and Migration Guide
  • Community
    • Discord
    • Twitter
    • Facebook
Powered by GitBook
On this page
  • Installation
  • Configure Flow Networks & Blocto wallet URL

Was this helpful?

  1. BLOCTO SDK
  2. JavaScript SDK
  3. Flow

Configure FCL

Configure Blocto wallet to your Flow dApp

PreviousTutorialNextAuthenticate / Unauthenticate

Last updated 27 days ago

Was this helpful?

Installation

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.

For why to use @blocto/fcl instead of @onflow/fcl, check out this for further information.

npm install @blocto/fcl@^1.4.0
yarn add @blocto/fcl@^1.4.0
pnpm 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 to get further configuration settings.

Using front channel

import * as fcl from "@blocto/fcl";
  
fcl.config({
  "accessNode.api": "https://rest-mainnet.onflow.org", // connect to Flow mainnet
  "discovery.wallet": `https://wallet-v2.blocto.app/-/flow/authn` // use Blocto mainnet wallet
});
import * as fcl from "@blocto/fcl";

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

Using back channel

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

fcl.config({
  "accessNode.api": "https://rest-mainnet.onflow.org", // connect to Flow mainnet
  "discovery.wallet": "https://wallet-v2.blocto.app/api/flow/authn", // use Blocto mainnet wallet
  "discovery.wallet.method": "HTTP/POST",
});
import * as fcl from "@blocto/fcl";
  
fcl.config({
  "accessNode.api": "https://rest-testnet.onflow.org", // connect to Flow testnet
  "discovery.wallet": "https://wallet-v2-dev.blocto.app/api/flow/authn", // use Blocto testnet wallet
  "discovery.wallet.method": "HTTP/POST",
});
Github PR
How to Configure FCL