Configure FCL
Configure Blocto wallet to your Flow dApp
Installation
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 FCL 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
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/api/flow/authn"
)
.put("discovery.wallet.method", "HTTP/POST")
.put("app.detail.id", YOUR_DAPP_ID)
Last updated
Was this helpful?