Configure FCL
Configure Blocto wallet to your Flow dApp
Installation
npm install @blocto/fcl@^1.4.0yarn add @blocto/fcl@^1.4.0pnpm install @blocto/fcl@^1.4.0Configure Flow Networks & Blocto wallet URL
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",
});Last updated
Was this helpful?