{"id":13746774,"url":"https://github.com/onflow/fcl-js","last_synced_at":"2026-04-02T01:29:57.431Z","repository":{"id":37236676,"uuid":"257314632","full_name":"onflow/fcl-js","owner":"onflow","description":"FCL (Flow Client Library) — Build TypeScript and JavaScript apps for Flow blockchain.","archived":false,"fork":false,"pushed_at":"2026-03-27T19:56:43.000Z","size":60976,"stargazers_count":333,"open_issues_count":178,"forks_count":133,"subscribers_count":46,"default_branch":"master","last_synced_at":"2026-03-31T19:06:28.912Z","etag":null,"topics":["blockchain","cadence","dapp","js","onflow","smart-contracts","typescript","web3"],"latest_commit_sha":null,"homepage":"https://onflow.org","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/onflow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-04-20T14:56:08.000Z","updated_at":"2026-03-31T15:40:32.000Z","dependencies_parsed_at":"2024-04-30T20:49:40.486Z","dependency_job_id":"cb2a43c8-efc2-4fcf-ae98-24e77c62517b","html_url":"https://github.com/onflow/fcl-js","commit_stats":{"total_commits":2012,"total_committers":82,"mean_commits":"24.536585365853657","dds":0.588469184890656,"last_synced_commit":"796fe5b5acf1c0e2d237f32bd42ec8a4c93b59a8"},"previous_names":["onflow/flow-js-sdk"],"tags_count":918,"template":false,"template_full_name":null,"purl":"pkg:github/onflow/fcl-js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onflow%2Ffcl-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onflow%2Ffcl-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onflow%2Ffcl-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onflow%2Ffcl-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/onflow","download_url":"https://codeload.github.com/onflow/fcl-js/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onflow%2Ffcl-js/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31293908,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T01:05:07.454Z","status":"ssl_error","status_checked_at":"2026-04-02T00:56:46.496Z","response_time":53,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blockchain","cadence","dapp","js","onflow","smart-contracts","typescript","web3"],"created_at":"2024-08-03T06:01:01.077Z","updated_at":"2026-04-02T01:29:57.423Z","avatar_url":"https://github.com/onflow.png","language":"TypeScript","funding_links":[],"categories":["Others"],"sub_categories":[],"readme":"[![FLOW-JS-SDK Continuous Integration](https://github.com/onflow/flow-js-sdk/actions/workflows/integrate.yml/badge.svg)](https://github.com/onflow/flow-js-sdk/actions/workflows/integrate.yml)\n[![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lerna.js.org/)\n\n\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cp align=\"center\"\u003e\n  \u003ch1 align=\"center\"\u003e FCL JS\u003c/h1\u003e\n  \u003cp align=\"center\"\u003e\n    \u003ci\u003eConnect your dapp to users, their wallets and Flow.\u003c/i\u003e\n    \u003cbr /\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"https://developers.flow.com/tutorials/flow-app-quickstart\"\u003eQuickstart\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/onflow/fcl-js/issues\"\u003eReport Bug\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/onflow/fcl-js/blob/master/CONTRIBUTING.md\"\u003eContribute\u003c/a\u003e\n\n  \u003c/p\u003e\n\u003c/p\u003e\n\n## 🌟 What is FCL?\n\nThe **Flow Client Library (FCL) JS** is a package designed to facilitate interactions between dapps, wallets, and the Flow blockchain. It provides a standardized way for applications to connect with users and their wallets, **eliminating the need for custom integrations**.\n\n### 🔑 Key Features:\n- 🔌 **Universal Wallet Support** – Works seamlessly with all FCL-compatible wallets, making authentication simple.\n- 🔐 **Secure Authentication** – Standardized authentication flow ensures a smooth user experience.\n- ⚡ **Blockchain Interactions** – Enables querying, mutating, and interacting with smart contracts on Flow.\n- 🛠️ **Full-Featured Utilities** – Offers built-in functions to streamline blockchain development.\n- 🌍 **Flexible Environment** – Can run in both browser and server environments, though wallet interactions are browser-only.\n\nFCL was created to make building Flow-connected applications **easy, secure, and scalable** by defining **standardized communication patterns** between wallets, applications, and users.\n\nFor iOS, we also offer [FCL Swift](https://github.com/Outblock/fcl-swift).\n\n---\n## Getting Started\n\n### Requirements\n-  Node version `v12.0.0 or higher`.\n\n### Installation\n\nTo use the FCL JS in your application, install using **yarn** or **npm**\n\n```shell\nnpm i -S @onflow/fcl\n```\n\n```shell\nyarn add @onflow/fcl\n```\n#### Importing\n\n**ES6**\n```js\nimport * as fcl from \"@onflow/fcl\";\n```\n**Node.js**\n```js\nconst fcl = require(\"@onflow/fcl\");\n```\n---\n## FCL for Dapps\n#### Wallet Interactions\n\n- *Wallet Discovery* and *Sign-up/Login*: Onboard users with ease. Never worry about supporting multiple wallets. \nAuthenticate users with any [FCL compatible wallet](#current-wallet-providers).\n```js\n// in the browser\nimport * as fcl from \"@onflow/fcl\"\n\nfcl.config({\n  \"discovery.wallet\": \"https://fcl-discovery.onflow.org/testnet/authn\", // Endpoint set to Testnet\n})\n\nfcl.authenticate()\n```\n![FCL Default Discovery UI](docs/images/discovery.png)\n\n\u003e **Note**: A [Dapper Wallet](https://meetdapper.com/developers) developer account is required. To enable Dapper Wallet inside FCL, you need to [follow this guide](https://docs.meetdapper.com/get-started).\n\n- *Interact with smart contracts*: Authorize transactions via the user's chosen wallet \n- *Prove ownership of a wallet address*: Signing and verifying user signed data\n\n[Learn more about wallet interactions \u003e](https://developers.flow.com/tooling/fcl-js/api#wallet-interactions)\n\n#### Blockchain Interactions\n- *Query the chain*: Send arbitrary Cadence scripts to the chain and receive back decoded values\n```js\nimport * as fcl from \"@onflow/fcl\";\n\nconst result = await fcl.query({\n  cadence: `\n    access(all) fun main(a: Int, b: Int, addr: Address): Int {\n      log(addr)\n      return a + b\n    }\n  `,\n  args: (arg, t) =\u003e [\n    arg(7, t.Int), // a: Int\n    arg(6, t.Int), // b: Int\n    arg(\"0xba1132bc08f82fe2\", t.Address), // addr: Address\n  ],\n});\nconsole.log(result); // 13\n```\n- *Mutate the chain*: Send arbitrary transactions with your own signatures or via a user's wallet to perform state changes on chain.\n```js\nimport * as fcl from \"@onflow/fcl\";\n// in the browser, FCL will automatically connect to the user's wallet to request signatures to run the transaction\nconst txId = await fcl.mutate({\n  cadence: `\n    import Profile from 0xba1132bc08f82fe2\n    \n    transaction(name: String) {\n      prepare(account: AuthAccount) {\n        account.borrow\u003c\u0026{Profile.Owner}\u003e(from: Profile.privatePath)!.setName(name)\n      }\n    }\n  `,\n  args: (arg, t) =\u003e [arg(\"myName\", t.String)],\n});\n```\n\n[Learn more about on-chain interactions \u003e](https://developers.flow.com/tooling/fcl-js/api#on-chain-interactions)\n\n#### Utilities\n- Get account details from any Flow address\n- Get the latest block\n- Transaction status polling\n- Event polling\n- Custom authorization functions\n\n[Learn more about utilities \u003e](https://developers.flow.com/tooling/fcl-js/api#pre-built-interactions)\n\n## Typescript Support\n\nFCL JS supports TypeScript. If you need to import specific types, you can do so via the [@onflow/typedefs](./packages/typedefs/README.md) package.\n\n```typescript\nimport {CurrentUser} from \"@onflow/typedefs\"\n\nconst newUser: CurrentUser = { \n  addr: null,\n  cid: null,\n  expiresAt: null,\n  f_type: 'User',\n  f_vsn: '1.0.0',\n  loggedIn: null,\n  services: []\n}\n```\n\nFor all type definitions available, see [this file](./packages/typedefs/src/index.ts)\n\n## Next Steps\n\n- See the [Flow App Quick Start](https://developers.flow.com/build/getting-started/fcl-quickstart).\n- See the full [API Reference](https://developers.flow.com/tools/clients/fcl-js/api) for all FCL functionality.\n- Learn Flow's smart contract language to build any script or transactions: [Cadence](https://cadence-lang.org).\n- Explore all of Flow [docs and tools](https://developers.flow.com).\n\n## Development \u0026 Testing\n\n### Internal Demo App\n\nA lightweight demo application is available for testing FCL and Kit packages during development:\n\n```bash\n# Build all packages\nnpm run build\n\n# Start the demo\nnpm run demo\n```\n\nThe demo provides:\n\n- **Hot Reload**: Instant feedback for code changes\n- **Focused Testing**: Clean interface for testing authentication, queries, and transactions\n- **Debug Tools**: Real-time inspection of FCL state and responses\n- **Lightweight**: Vite-based setup for fast iteration\n- **Workspace Integration**: Proper Lerna workspace setup with automatic symlinks\n\nSee [`packages/demo/README.md`](./packages/demo/README.md) for detailed usage instructions.\n\n---\n## FCL for Wallet Providers\nWallet providers on Flow have the flexibility to build their user interactions and UI through a variety of ways:\n- Front channel communication via Iframe, pop-up, tab, or extension\n- Back channel communication via HTTP\n\nFCL is agnostic to the communication channel and be configured to create both custodial and non-custodial wallets. This enables users to interact with wallet providers without needing to download an app or extension.\n\nThe communication channels involve responding to a set of pre-defined FCL messages to deliver the requested information to the dapp.  Implementing a FCL compatible wallet on Flow is as simple as filling in the responses with the appropriate data when FCL requests them. If using any of the front-channel communication methods, FCL also provides a set of [wallet utilities](https://github.com/onflow/fcl-js/blob/master/packages/fcl-core/src/wallet-utils/index.js) to simplify this process.\n\n\n### Current Wallet Providers\n- [Flow Wallet](https://wallet.flow.com/)\n- [NuFi Wallet](https://nu.fi/)\n- [Blocto](https://blocto.portto.io/en/)\n- [Ledger](https://ledger.com) (limited transaction support)\n- [Dapper Wallet](https://www.meetdapper.com/) (beta access - general availability coming soon)\n\n### Wallet Discovery\nIt can be difficult to get users to discover new wallets on a chain. To solve this, we created a [wallet discovery service](https://github.com/onflow/fcl-discovery) that can be configured and accessed through FCL to display all available Flow wallet providers to the user. This means:\n- Dapps can display and support all FCL compatible wallets that launch on Flow without needing to change any code\n- Users don't need to sign up for new wallets - they can carry over their existing one to any dapp that uses FCL for authentication and authorization.\n\nThe discovery feature can be used via API allowing you to customize your own UI or you can use the default UI without any additional configuration.\n\n\u003e Note: To get your wallet added to the discovery service, make a PR in [fcl-discovery](https://github.com/onflow/fcl-discovery).\n\n### Building a FCL compatible wallet\n\n- Read the [wallet guide](https://github.com/onflow/fcl-js/blob/master/packages/fcl-core/src/wallet-provider-spec/draft-v4.md) to understand the implementation details.\n- Review the architecture of the [FCL dev wallet](https://github.com/onflow/fcl-dev-wallet) for an overview.\n- If building a non-custodial wallet, see the [Account API](https://github.com/onflow/flow-account-api) and the [FLIP](https://github.com/onflow/flow/pull/727) on derivation paths and key generation.\n\n---\n\n## 🛠 Want to Use the Flow SDK Directly?\n\nIf you prefer to interact with Flow at a **lower level** without using FCL, you can use the [Flow JavaScript SDK](packages/sdk/readme.md) directly. The SDK provides raw access to Flow's API for sending transactions, executing scripts, and managing accounts.\n\nFCL is built **on top of the Flow SDK**, making it easier to handle authentication, wallet interactions, and dapp connectivity. Choose the approach that best fits your use case.\n\n## Support\n\n- Notice a problem or want to request a feature? [Add an issue](https://github.com/onflow/fcl-js/issues).\n- Join the Flow community on [Discord](https://discord.gg/flow) to keep up to date and to talk to the team.\n- Read the [Contributing Guide](./CONTRIBUTING.md) to learn how to contribute to the project.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonflow%2Ffcl-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fonflow%2Ffcl-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonflow%2Ffcl-js/lists"}