While it would be possible to create a Flow wallet as a browser plugin, we specifically created
@onflow/fcl so that web-based dapps don’t have to depend on browser
@onflow/fcl is able to connect browser-based dapps to a wallet service, or a wallet installed on your phone
or running on your local computer without introducing the security risks that can come from installing
a browser plugin.
@onflow/fcl also eliminates the need for dapp developers to write code to integrate their user's preferred wallet into
their application. Instead,
@onflow/fcl uses a secure discovery protocol that wallets can implement to connect
@onflow/fcl. The end result is dapps using
@onflow/fcl automatically integrate all compatible wallets without their developers
needing to write any custom code!
native desktop dapps and mobile dapps can connect to the same wallet software as browser dapps.
npm i -S @onflow/fcl @onflow/types
@onflow/fcl: Flow App Quickstart
Please note, that some code provided - e.g.
Object.fromEntries - will require Node version
v12.0.0 or higher.
@onflow/fcl-- A high level dapp framework built on top an opinionated use of the sdk.
@onflow/sdk-- Tools that enable developers to build, resolve, send and decode interactions with the Flow blockchain.
@onflow/types-- Type casting interaction params to cadence compatible values.
send-- Send interactions to the Flow blockchain get responses back.
@onflow/protobuf-- Dependency of send. Provides transport between the browser and the Flow blockchain.
interaction-- A data structure that can be built, resolved and sent to the Flow blockchain.
response-- A data structure that represents a response from the Flow blockchain. If the interaction returns something, it can be decoded without something like an ABI.
encode-- Transactions needs signatures, this module knows how to create the values that get signed.
@onflow/dev-wallet-- A local fcl wallet provider for local development and testing.