Getting Started
Initialize FCL and add Blocto as a wallet provider
Last updated
Was this helpful?
Initialize FCL and add Blocto as a wallet provider
Last updated
Was this helpful?
Was this helpful?
using Flow.FCL;
using Flow.FCL.Config
using Blocto.SDK.Flow;
var config = new Config();
config.Put("discovery.wallet", "https://flow-wallet-dev.blocto.app/api/flow/authn")
.Put("accessNode.api", "https://rest-testnet.onflow.org/v1")
.Put("flow.network", "testnet");
var walletProvider = BloctoWalletProvider.CreateBloctoWalletProvider(
initialFun: GetWallet => {
var walletProvider = GetWallet.Invoke(
gameObject,
new FlowUnityWebRequest(gameObject, config.Get("accessNode.api")),
new ResolveUtility());
return walletProvider;
},
env: {"testnet" or "mainnet"},
bloctoAppIdentifier:Guid.Parse("d0c4c565-db60-4848-99c8-2bdfc6bd3576"));
var fcl = FlowClientLibrary.CreateClientLibrary(
initialFun: GetFCL => {
var fcl = GetFCL.Invoke(gameObject, _walletProvider, new ResolveUtility());
return fcl;
},
config: config);