Showing preview only (5,603K chars total). Download the full file or copy to clipboard to get everything.
Repository: onflow/flow-js-sdk
Branch: master
Commit: 5e44c67ea09d
Files: 1103
Total size: 5.1 MB
Directory structure:
gitextract_j_zi96gh/
├── .changeset/
│ ├── README.md
│ └── config.json
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug_report.yml
│ │ └── feature_request.yml
│ ├── scripts/
│ │ └── prevent-major-bumps.js
│ └── workflows/
│ ├── add-pitches-to-project.yml
│ ├── changeset-check.yml
│ ├── code-analysis.yml
│ ├── dependancy-review.yml
│ ├── integrate.yml
│ ├── promote-playground.yml
│ └── release.yml
├── .gitignore
├── .prettierignore
├── .prettierrc
├── AGENTS.md
├── CHANGELOG.md
├── CITATION.cff
├── CODEOWNERS
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── Makefile
├── NOTICE
├── README.md
├── SECURITY.md
├── docs/
│ ├── flow-docs.json
│ ├── index.md
│ ├── index.mdx
│ ├── reference/
│ │ ├── api.md
│ │ ├── authentication.mdx
│ │ ├── configure-fcl.mdx
│ │ ├── discovery.mdx
│ │ ├── installation.mdx
│ │ ├── interaction-templates.mdx
│ │ ├── proving-authentication.mdx
│ │ ├── scripts.mdx
│ │ ├── sdk-guidelines.mdx
│ │ ├── transactions.mdx
│ │ ├── user-signatures.mdx
│ │ └── wallet-connect.mdx
│ └── tutorials/
│ └── flow-app-quickstart.mdx
├── docs-generator/
│ ├── README.md
│ ├── generate-all-docs.js
│ ├── generate-docs.js
│ ├── generators/
│ │ ├── generate-function-page.js
│ │ ├── generate-namespace-page.js
│ │ ├── generate-package-page.js
│ │ ├── generate-root-page.js
│ │ ├── generate-types-page.js
│ │ ├── index.js
│ │ └── utils/
│ │ ├── extract-utils.js
│ │ ├── generate-page.js
│ │ ├── index.js
│ │ └── parse-config-custom-data.js
│ ├── templates/
│ │ ├── function.hbs
│ │ ├── namespace.hbs
│ │ ├── package.hbs
│ │ ├── root.hbs
│ │ └── types.hbs
│ └── utils/
│ ├── export-extractor.js
│ ├── file-utils.js
│ ├── function-extractor.js
│ ├── index.js
│ ├── jsdoc-parser.js
│ ├── namespace-utils.js
│ ├── type-utils.js
│ └── typescript-formatter.js
├── jest.config.js
├── lerna.json
├── package.json
├── packages/
│ ├── config/
│ │ ├── .babelrc
│ │ ├── .browserslistrc
│ │ ├── .eslintrc.json
│ │ ├── .npmignore
│ │ ├── CHANGELOG.md
│ │ ├── README.md
│ │ ├── package.json
│ │ ├── src/
│ │ │ ├── config.test.ts
│ │ │ ├── config.ts
│ │ │ └── utils/
│ │ │ ├── utils.test.ts
│ │ │ └── utils.ts
│ │ └── tsconfig.json
│ ├── demo/
│ │ ├── .gitignore
│ │ ├── CHANGELOG.md
│ │ ├── DEPLOY.md
│ │ ├── README.md
│ │ ├── emulator.key
│ │ ├── eslint.config.ts
│ │ ├── index.html
│ │ ├── package.json
│ │ ├── postcss.config.js
│ │ ├── public/
│ │ │ ├── robots.txt
│ │ │ └── sitemap.xml
│ │ ├── src/
│ │ │ ├── app.css
│ │ │ ├── app.tsx
│ │ │ ├── components/
│ │ │ │ ├── advanced-cards/
│ │ │ │ │ ├── dark-mode-card.tsx
│ │ │ │ │ └── theming-card.tsx
│ │ │ │ ├── component-cards/
│ │ │ │ │ ├── connect-card.tsx
│ │ │ │ │ ├── demo-nft-card.tsx
│ │ │ │ │ ├── profile-card.tsx
│ │ │ │ │ ├── scheduled-transaction-list-demo.tsx
│ │ │ │ │ ├── transaction-button-card.tsx
│ │ │ │ │ ├── transaction-dialog-card.tsx
│ │ │ │ │ └── transaction-link-card.tsx
│ │ │ │ ├── content-section.tsx
│ │ │ │ ├── content-sidebar.tsx
│ │ │ │ ├── flow-provider-wrapper.tsx
│ │ │ │ ├── footer.tsx
│ │ │ │ ├── header.tsx
│ │ │ │ ├── hook-cards/
│ │ │ │ │ ├── use-cross-vm-bridge-nft-from-evm-card.tsx
│ │ │ │ │ ├── use-cross-vm-bridge-nft-to-evm-card.tsx
│ │ │ │ │ ├── use-cross-vm-bridge-token-from-evm-card.tsx
│ │ │ │ │ ├── use-cross-vm-bridge-token-to-evm-card.tsx
│ │ │ │ │ ├── use-flow-account-card.tsx
│ │ │ │ │ ├── use-flow-block-card.tsx
│ │ │ │ │ ├── use-flow-chain-id-card.tsx
│ │ │ │ │ ├── use-flow-config-card.tsx
│ │ │ │ │ ├── use-flow-current-user-card.tsx
│ │ │ │ │ ├── use-flow-events-card.tsx
│ │ │ │ │ ├── use-flow-mutate-card.tsx
│ │ │ │ │ ├── use-flow-nft-metadata-card.tsx
│ │ │ │ │ ├── use-flow-query-card.tsx
│ │ │ │ │ ├── use-flow-query-raw-card.tsx
│ │ │ │ │ ├── use-flow-revertible-random-card.tsx
│ │ │ │ │ ├── use-flow-scheduled-transaction-card.tsx
│ │ │ │ │ └── use-flow-transaction-status-card.tsx
│ │ │ │ ├── setup-cards/
│ │ │ │ │ └── installation-card.tsx
│ │ │ │ ├── starter-banner.tsx
│ │ │ │ └── ui/
│ │ │ │ ├── code-editor.tsx
│ │ │ │ ├── code-viewer.tsx
│ │ │ │ ├── demo-card.tsx
│ │ │ │ ├── error-boundary.tsx
│ │ │ │ ├── inline-code.tsx
│ │ │ │ ├── json-viewer.tsx
│ │ │ │ ├── loading-spinner.tsx
│ │ │ │ ├── plus-grid.tsx
│ │ │ │ ├── props-viewer.tsx
│ │ │ │ └── results-section.tsx
│ │ │ ├── constants.ts
│ │ │ ├── main.tsx
│ │ │ ├── utils/
│ │ │ │ └── chain-helpers.ts
│ │ │ ├── utils.ts
│ │ │ └── vite-env.d.ts
│ │ ├── tailwind.config.js
│ │ ├── tsconfig.app.json
│ │ ├── tsconfig.json
│ │ ├── tsconfig.node.json
│ │ └── vite.config.ts
│ ├── fcl/
│ │ ├── .babelrc
│ │ ├── .browserslistrc
│ │ ├── .eslintrc.json
│ │ ├── .npmignore
│ │ ├── CHANGELOG.md
│ │ ├── README.md
│ │ ├── TRANSITIONS.md
│ │ ├── docs/
│ │ │ └── extra.md
│ │ ├── docs-generator.config.js
│ │ ├── package.json
│ │ ├── src/
│ │ │ ├── VERSION.ts
│ │ │ ├── client.ts
│ │ │ ├── discovery/
│ │ │ │ ├── exec-discovery.ts
│ │ │ │ ├── exec-hook.ts
│ │ │ │ └── rpc/
│ │ │ │ ├── client.ts
│ │ │ │ ├── handlers/
│ │ │ │ │ ├── exec-service.ts
│ │ │ │ │ └── request-wc-qr.ts
│ │ │ │ └── requests.ts
│ │ │ ├── fcl.ts
│ │ │ └── utils/
│ │ │ ├── async.ts
│ │ │ ├── walletconnect/
│ │ │ │ └── loader.ts
│ │ │ └── web/
│ │ │ ├── __tests__/
│ │ │ │ └── default-config.test.js
│ │ │ ├── coreStrategies.js
│ │ │ ├── default-config.js
│ │ │ ├── exec-local.js
│ │ │ ├── index.js
│ │ │ ├── render-frame.js
│ │ │ ├── render-pop.js
│ │ │ ├── render-tab.js
│ │ │ ├── storage.ts
│ │ │ └── strategies/
│ │ │ ├── ext-rpc.js
│ │ │ ├── iframe-rpc.js
│ │ │ ├── pop-rpc.js
│ │ │ ├── tab-rpc.js
│ │ │ └── utils/
│ │ │ ├── extension.js
│ │ │ ├── frame.js
│ │ │ ├── pop.js
│ │ │ └── tab.js
│ │ └── tsconfig.json
│ ├── fcl-bundle/
│ │ ├── .babelrc
│ │ ├── .browserslistrc
│ │ ├── .npmignore
│ │ ├── CHANGELOG.md
│ │ ├── README.md
│ │ ├── package.json
│ │ └── src/
│ │ ├── build/
│ │ │ ├── build-watch.js
│ │ │ ├── build.js
│ │ │ ├── get-input-options.js
│ │ │ ├── get-output-options.js
│ │ │ └── watcher-pool.js
│ │ ├── cli.js
│ │ ├── get-package-json.js
│ │ ├── package-config.js
│ │ ├── plugins/
│ │ │ ├── banner.js
│ │ │ └── preserve-dynamic-imports.js
│ │ ├── program.js
│ │ └── util.js
│ ├── fcl-core/
│ │ ├── .babelrc
│ │ ├── .browserslistrc
│ │ ├── .eslintrc.json
│ │ ├── .gitignore
│ │ ├── .npmignore
│ │ ├── CHANGELOG.md
│ │ ├── README.md
│ │ ├── TRANSITIONS.md
│ │ ├── WARNINGS.md
│ │ ├── assets/
│ │ │ └── service-method-diagrams/
│ │ │ ├── http-post.excalidraw
│ │ │ ├── iframe-rpc.excalidraw
│ │ │ ├── pop-rpc.excalidraw
│ │ │ └── tab-rpc.excalidraw
│ │ ├── docs/
│ │ │ └── extra.md
│ │ ├── docs-generator.config.js
│ │ ├── package.json
│ │ ├── src/
│ │ │ ├── VERSION.ts
│ │ │ ├── app-utils/
│ │ │ │ ├── __tests__/
│ │ │ │ │ └── verify-user-sig.test.ts
│ │ │ │ ├── index.ts
│ │ │ │ └── verify-signatures.ts
│ │ │ ├── client.ts
│ │ │ ├── context/
│ │ │ │ ├── global.ts
│ │ │ │ └── index.ts
│ │ │ ├── current-user/
│ │ │ │ ├── build-user.ts
│ │ │ │ ├── exec-service/
│ │ │ │ │ ├── index.ts
│ │ │ │ │ ├── plugins.ts
│ │ │ │ │ ├── strategies/
│ │ │ │ │ │ ├── http-post.ts
│ │ │ │ │ │ └── utils/
│ │ │ │ │ │ ├── buildMessageHandler.ts
│ │ │ │ │ │ ├── fetch-service.ts
│ │ │ │ │ │ ├── poll.ts
│ │ │ │ │ │ └── service-endpoint.ts
│ │ │ │ │ └── wc-check.ts
│ │ │ │ ├── fetch-services.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── merge-services.ts
│ │ │ │ ├── service-of-type.test.ts
│ │ │ │ ├── service-of-type.ts
│ │ │ │ └── url-from-service.ts
│ │ │ ├── default-config.ts
│ │ │ ├── discovery/
│ │ │ │ ├── index.ts
│ │ │ │ ├── services/
│ │ │ │ │ └── authn.ts
│ │ │ │ ├── services.test.ts
│ │ │ │ ├── services.ts
│ │ │ │ └── utils.ts
│ │ │ ├── document/
│ │ │ │ ├── document.test.ts
│ │ │ │ └── document.ts
│ │ │ ├── events/
│ │ │ │ ├── index.test.ts
│ │ │ │ ├── index.ts
│ │ │ │ └── legacy-events.ts
│ │ │ ├── exec/
│ │ │ │ ├── args.ts
│ │ │ │ ├── mutate.md
│ │ │ │ ├── mutate.ts
│ │ │ │ ├── query-raw.ts
│ │ │ │ ├── query.md
│ │ │ │ ├── query.ts
│ │ │ │ ├── utils/
│ │ │ │ │ ├── normalize-args.ts
│ │ │ │ │ ├── pre.ts
│ │ │ │ │ ├── prep-template-opts.test.ts
│ │ │ │ │ └── prep-template-opts.ts
│ │ │ │ └── verify.ts
│ │ │ ├── fcl-core.ts
│ │ │ ├── fcl.test.ts
│ │ │ ├── interaction-template-utils/
│ │ │ │ ├── derive-cadence-by-network/
│ │ │ │ │ ├── derive-cadence-by-network-1.0.0.ts
│ │ │ │ │ ├── derive-cadence-by-network-1.1.0.ts
│ │ │ │ │ ├── derive-cadence-by-network.test.ts
│ │ │ │ │ └── derive-cadence-by-network.ts
│ │ │ │ ├── generate-dependency-pin/
│ │ │ │ │ ├── generate-dependency-pin-1.0.0.ts
│ │ │ │ │ ├── generate-dependency-pin-1.1.0.ts
│ │ │ │ │ ├── generate-dependency-pin.test.ts
│ │ │ │ │ └── generate-dependency-pin.ts
│ │ │ │ ├── generate-template-id/
│ │ │ │ │ ├── generate-template-id-1.0.0.ts
│ │ │ │ │ ├── generate-template-id-1.1.0.test.ts
│ │ │ │ │ ├── generate-template-id-1.1.0.ts
│ │ │ │ │ └── generate-template-id.ts
│ │ │ │ ├── get-interaction-template-audits.ts
│ │ │ │ ├── get-template-argument-message.test.ts
│ │ │ │ ├── get-template-argument-message.ts
│ │ │ │ ├── get-template-message.test.ts
│ │ │ │ ├── get-template-message.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── interaction-template.ts
│ │ │ │ ├── utils/
│ │ │ │ │ ├── find-imports.test.ts
│ │ │ │ │ ├── find-imports.ts
│ │ │ │ │ ├── generate-import.ts
│ │ │ │ │ ├── hash.ts
│ │ │ │ │ ├── replace-string-imports.test.ts
│ │ │ │ │ └── replace-string-imports.ts
│ │ │ │ ├── verify-dependency-pin-same-at-block.test.ts
│ │ │ │ └── verify-dependency-pin-same-at-block.ts
│ │ │ ├── normalizers/
│ │ │ │ └── service/
│ │ │ │ ├── __vsn.ts
│ │ │ │ ├── account-proof.ts
│ │ │ │ ├── authn-refresh.ts
│ │ │ │ ├── authn.ts
│ │ │ │ ├── authz.ts
│ │ │ │ ├── back-channel-rpc.ts
│ │ │ │ ├── composite-signature.ts
│ │ │ │ ├── frame.ts
│ │ │ │ ├── local-view.ts
│ │ │ │ ├── open-id.ts
│ │ │ │ ├── polling-response.ts
│ │ │ │ ├── pre-authz.ts
│ │ │ │ ├── service.ts
│ │ │ │ └── user-signature.ts
│ │ │ ├── serialize/
│ │ │ │ └── index.ts
│ │ │ ├── test-utils/
│ │ │ │ ├── index.ts
│ │ │ │ └── mock-context.ts
│ │ │ ├── transaction/
│ │ │ │ ├── constants.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── legacy-polling.js
│ │ │ │ ├── legacy-polling.test.js
│ │ │ │ ├── transaction-error.test.ts
│ │ │ │ ├── transaction-error.ts
│ │ │ │ ├── transaction.test.ts
│ │ │ │ ├── transaction.ts
│ │ │ │ ├── types.ts
│ │ │ │ └── utils.ts
│ │ │ ├── utils/
│ │ │ │ ├── chain-id/
│ │ │ │ │ ├── chain-id-watcher.test.ts
│ │ │ │ │ ├── chain-id-watcher.ts
│ │ │ │ │ ├── fetch-chain-id.ts
│ │ │ │ │ ├── get-chain-id.test.ts
│ │ │ │ │ └── get-chain-id.ts
│ │ │ │ ├── constants.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── is-react-native.ts
│ │ │ │ ├── is.ts
│ │ │ │ ├── storage.ts
│ │ │ │ └── url.ts
│ │ │ ├── wallet-provider-spec/
│ │ │ │ ├── README.md
│ │ │ │ ├── assets/
│ │ │ │ │ ├── fcl-ars-auth-v1.excalidraw
│ │ │ │ │ ├── fcl-ars-auth-v2.excalidraw
│ │ │ │ │ ├── fcl-ars-auth-v3.1.excalidraw
│ │ │ │ │ ├── fcl-ars-auth-v3.2.excalidraw
│ │ │ │ │ └── fcl-ars-auth-v3.excalidraw
│ │ │ │ ├── authorization-function.md
│ │ │ │ ├── custodial.md
│ │ │ │ ├── draft-v2.md
│ │ │ │ ├── draft-v3.md
│ │ │ │ ├── draft-v4.md
│ │ │ │ ├── draft.md
│ │ │ │ ├── non-custodial.md
│ │ │ │ ├── provable-authn.md
│ │ │ │ ├── user-signature.md
│ │ │ │ └── wallet-discover.md
│ │ │ └── wallet-utils/
│ │ │ ├── CompositeSignature.ts
│ │ │ ├── encode-account-proof.test.ts
│ │ │ ├── encode-account-proof.ts
│ │ │ ├── index.ts
│ │ │ ├── inject-ext-service.ts
│ │ │ ├── on-message-from-fcl.ts
│ │ │ ├── send-msg-to-fcl.ts
│ │ │ └── wallet-utils.test.ts
│ │ └── tsconfig.json
│ ├── fcl-ethereum-provider/
│ │ ├── .babelrc
│ │ ├── .browserslistrc
│ │ ├── .eslintrc.json
│ │ ├── .npmignore
│ │ ├── CHANGELOG.md
│ │ ├── README.md
│ │ ├── package.json
│ │ ├── src/
│ │ │ ├── __mocks__/
│ │ │ │ └── fcl.ts
│ │ │ ├── accounts/
│ │ │ │ ├── account-manager.test.ts
│ │ │ │ ├── account-manager.ts
│ │ │ │ └── sign-message.test.ts
│ │ │ ├── cadence.ts
│ │ │ ├── constants.ts
│ │ │ ├── create-provider.ts
│ │ │ ├── events/
│ │ │ │ ├── event-dispatcher.test.ts
│ │ │ │ └── event-dispatcher.ts
│ │ │ ├── gateway/
│ │ │ │ ├── gateway.test.ts
│ │ │ │ └── gateway.ts
│ │ │ ├── hash-utils.test.ts
│ │ │ ├── hash-utils.ts
│ │ │ ├── index.ts
│ │ │ ├── network/
│ │ │ │ ├── network-manager.test.ts
│ │ │ │ └── network-manager.ts
│ │ │ ├── notifications.ts
│ │ │ ├── provider.test.ts
│ │ │ ├── provider.ts
│ │ │ ├── rpc/
│ │ │ │ ├── handlers/
│ │ │ │ │ ├── eth-accounts.test.ts
│ │ │ │ │ ├── eth-accounts.ts
│ │ │ │ │ ├── eth-chain-id.test.ts
│ │ │ │ │ ├── eth-chain-id.ts
│ │ │ │ │ ├── eth-send-transaction.test.ts
│ │ │ │ │ ├── eth-send-transaction.ts
│ │ │ │ │ ├── eth-signtypeddata.ts
│ │ │ │ │ └── personal-sign.ts
│ │ │ │ ├── rpc-processor.test.ts
│ │ │ │ ├── rpc-processor.ts
│ │ │ │ └── types.ts
│ │ │ ├── types/
│ │ │ │ ├── account.ts
│ │ │ │ ├── eth.ts
│ │ │ │ ├── events.ts
│ │ │ │ └── provider.ts
│ │ │ ├── util/
│ │ │ │ ├── chain.ts
│ │ │ │ ├── errors.ts
│ │ │ │ ├── eth.ts
│ │ │ │ ├── observable.ts
│ │ │ │ └── transaction.ts
│ │ │ └── wc-provider.ts
│ │ └── tsconfig.json
│ ├── fcl-rainbowkit-adapter/
│ │ ├── .babelrc
│ │ ├── .browserslistrc
│ │ ├── .eslintrc.json
│ │ ├── .npmignore
│ │ ├── CHANGELOG.md
│ │ ├── README.md
│ │ ├── package.json
│ │ ├── src/
│ │ │ ├── create-connector.ts
│ │ │ ├── fcl-rainbowkit-adapter.test.ts
│ │ │ ├── get-wc-connector.ts
│ │ │ ├── index.ts
│ │ │ ├── use-is-cadence-wallet-connected.ts
│ │ │ └── wallets/
│ │ │ ├── flow-wallet.ts
│ │ │ └── wc-wallet.ts
│ │ └── tsconfig.json
│ ├── fcl-react-native/
│ │ ├── .babelrc
│ │ ├── .browserslistrc
│ │ ├── .eslintrc.json
│ │ ├── .gitignore
│ │ ├── .npmignore
│ │ ├── CHANGELOG.md
│ │ ├── README.md
│ │ ├── docs/
│ │ │ └── extra.md
│ │ ├── docs-generator.config.js
│ │ ├── package.json
│ │ ├── src/
│ │ │ ├── VERSION.ts
│ │ │ ├── client.ts
│ │ │ ├── fcl-react-native.ts
│ │ │ ├── utils/
│ │ │ │ └── react-native/
│ │ │ │ ├── ConnectModal.js
│ │ │ │ ├── ConnectModalProvider.js
│ │ │ │ ├── ServiceDiscovery.js
│ │ │ │ ├── __tests__/
│ │ │ │ │ └── default-config.test.js
│ │ │ │ ├── constants.js
│ │ │ │ ├── coreStrategies.js
│ │ │ │ ├── default-config.js
│ │ │ │ ├── exec-local.js
│ │ │ │ ├── index.js
│ │ │ │ ├── render-browser.js
│ │ │ │ ├── render-deeplink.js
│ │ │ │ ├── storage.ts
│ │ │ │ └── strategies/
│ │ │ │ ├── deeplink-rpc.js
│ │ │ │ ├── discovery-rn.js
│ │ │ │ └── utils/
│ │ │ │ ├── browser.js
│ │ │ │ └── service-endpoint.js
│ │ │ └── walletconnect/
│ │ │ ├── client.ts
│ │ │ ├── constants.ts
│ │ │ ├── index.ts
│ │ │ ├── loader.ts
│ │ │ ├── service.ts
│ │ │ └── session.ts
│ │ └── tsconfig.json
│ ├── fcl-wagmi-adapter/
│ │ ├── .babelrc
│ │ ├── .browserslistrc
│ │ ├── .eslintrc.json
│ │ ├── .npmignore
│ │ ├── CHANGELOG.md
│ │ ├── README.md
│ │ ├── package.json
│ │ ├── src/
│ │ │ ├── fcl-connector.ts
│ │ │ ├── fcl-wagmi-adapter.test.ts
│ │ │ ├── index.ts
│ │ │ └── wc-connector.ts
│ │ └── tsconfig.json
│ ├── fcl-wc/
│ │ ├── .babelrc
│ │ ├── .browserslistrc
│ │ ├── .eslintrc.json
│ │ ├── .npmignore
│ │ ├── CHANGELOG.md
│ │ ├── README.md
│ │ ├── jest.config.js
│ │ ├── jest.setup.ts
│ │ ├── package.json
│ │ ├── postcss.config.js
│ │ ├── src/
│ │ │ ├── constants.ts
│ │ │ ├── fcl-wc.test.ts
│ │ │ ├── fcl-wc.ts
│ │ │ ├── index.ts
│ │ │ ├── mocks/
│ │ │ │ └── file-mock.ts
│ │ │ ├── service.ts
│ │ │ ├── session.ts
│ │ │ ├── store.ts
│ │ │ ├── types/
│ │ │ │ ├── declarations.d.ts
│ │ │ │ └── types.ts
│ │ │ ├── ui/
│ │ │ │ ├── components/
│ │ │ │ │ └── Notification.tsx
│ │ │ │ ├── notifications.tsx
│ │ │ │ └── styles.css
│ │ │ └── utils.ts
│ │ ├── tailwind.config.js
│ │ └── tsconfig.json
│ ├── protobuf/
│ │ ├── .babelrc
│ │ ├── .browserslistrc
│ │ ├── .npmignore
│ │ ├── CHANGELOG.md
│ │ ├── README.md
│ │ ├── package.json
│ │ ├── src/
│ │ │ ├── generated/
│ │ │ │ └── flow/
│ │ │ │ ├── access/
│ │ │ │ │ ├── access_pb.d.ts
│ │ │ │ │ ├── access_pb.js
│ │ │ │ │ ├── access_pb_service.d.ts
│ │ │ │ │ └── access_pb_service.js
│ │ │ │ ├── entities/
│ │ │ │ │ ├── account_pb.d.ts
│ │ │ │ │ ├── account_pb.js
│ │ │ │ │ ├── account_pb_service.d.ts
│ │ │ │ │ ├── account_pb_service.js
│ │ │ │ │ ├── block_execution_data_pb.d.ts
│ │ │ │ │ ├── block_execution_data_pb.js
│ │ │ │ │ ├── block_execution_data_pb_service.d.ts
│ │ │ │ │ ├── block_execution_data_pb_service.js
│ │ │ │ │ ├── block_header_pb.d.ts
│ │ │ │ │ ├── block_header_pb.js
│ │ │ │ │ ├── block_header_pb_service.d.ts
│ │ │ │ │ ├── block_header_pb_service.js
│ │ │ │ │ ├── block_pb.d.ts
│ │ │ │ │ ├── block_pb.js
│ │ │ │ │ ├── block_pb_service.d.ts
│ │ │ │ │ ├── block_pb_service.js
│ │ │ │ │ ├── block_seal_pb.d.ts
│ │ │ │ │ ├── block_seal_pb.js
│ │ │ │ │ ├── block_seal_pb_service.d.ts
│ │ │ │ │ ├── block_seal_pb_service.js
│ │ │ │ │ ├── collection_pb.d.ts
│ │ │ │ │ ├── collection_pb.js
│ │ │ │ │ ├── collection_pb_service.d.ts
│ │ │ │ │ ├── collection_pb_service.js
│ │ │ │ │ ├── event_pb.d.ts
│ │ │ │ │ ├── event_pb.js
│ │ │ │ │ ├── event_pb_service.d.ts
│ │ │ │ │ ├── event_pb_service.js
│ │ │ │ │ ├── execution_result_pb.d.ts
│ │ │ │ │ ├── execution_result_pb.js
│ │ │ │ │ ├── execution_result_pb_service.d.ts
│ │ │ │ │ ├── execution_result_pb_service.js
│ │ │ │ │ ├── metadata_pb.d.ts
│ │ │ │ │ ├── metadata_pb.js
│ │ │ │ │ ├── metadata_pb_service.d.ts
│ │ │ │ │ ├── metadata_pb_service.js
│ │ │ │ │ ├── node_version_info_pb.d.ts
│ │ │ │ │ ├── node_version_info_pb.js
│ │ │ │ │ ├── node_version_info_pb_service.d.ts
│ │ │ │ │ ├── node_version_info_pb_service.js
│ │ │ │ │ ├── register_pb.d.ts
│ │ │ │ │ ├── register_pb.js
│ │ │ │ │ ├── register_pb_service.d.ts
│ │ │ │ │ ├── register_pb_service.js
│ │ │ │ │ ├── transaction_pb.d.ts
│ │ │ │ │ ├── transaction_pb.js
│ │ │ │ │ ├── transaction_pb_service.d.ts
│ │ │ │ │ └── transaction_pb_service.js
│ │ │ │ ├── execution/
│ │ │ │ │ ├── execution_pb.d.ts
│ │ │ │ │ ├── execution_pb.js
│ │ │ │ │ ├── execution_pb_service.d.ts
│ │ │ │ │ └── execution_pb_service.js
│ │ │ │ └── executiondata/
│ │ │ │ ├── executiondata_pb.d.ts
│ │ │ │ ├── executiondata_pb.js
│ │ │ │ ├── executiondata_pb_service.d.ts
│ │ │ │ └── executiondata_pb_service.js
│ │ │ ├── index.js
│ │ │ ├── index.test.js
│ │ │ └── proto/
│ │ │ └── flow/
│ │ │ ├── access/
│ │ │ │ └── access.proto
│ │ │ ├── entities/
│ │ │ │ ├── account.proto
│ │ │ │ ├── block.proto
│ │ │ │ ├── block_execution_data.proto
│ │ │ │ ├── block_header.proto
│ │ │ │ ├── block_seal.proto
│ │ │ │ ├── collection.proto
│ │ │ │ ├── event.proto
│ │ │ │ ├── execution_result.proto
│ │ │ │ ├── metadata.proto
│ │ │ │ ├── node_version_info.proto
│ │ │ │ ├── register.proto
│ │ │ │ └── transaction.proto
│ │ │ ├── execution/
│ │ │ │ └── execution.proto
│ │ │ ├── executiondata/
│ │ │ │ └── executiondata.proto
│ │ │ └── legacy/
│ │ │ ├── access/
│ │ │ │ └── access.proto
│ │ │ ├── entities/
│ │ │ │ ├── account.proto
│ │ │ │ ├── block.proto
│ │ │ │ ├── block_header.proto
│ │ │ │ ├── block_seal.proto
│ │ │ │ ├── collection.proto
│ │ │ │ ├── event.proto
│ │ │ │ └── transaction.proto
│ │ │ └── execution/
│ │ │ └── execution.proto
│ │ └── webpack.config.js
│ ├── react-core/
│ │ ├── .npmignore
│ │ ├── CHANGELOG.md
│ │ ├── README.md
│ │ ├── babel.config.js
│ │ ├── jest.config.js
│ │ ├── package.json
│ │ ├── src/
│ │ │ ├── __mocks__/
│ │ │ │ ├── TestProvider.tsx
│ │ │ │ ├── flow-client.ts
│ │ │ │ ├── tx.ts
│ │ │ │ └── user.ts
│ │ │ ├── constants.ts
│ │ │ ├── core/
│ │ │ │ ├── context.ts
│ │ │ │ ├── index.ts
│ │ │ │ └── types.ts
│ │ │ ├── hooks/
│ │ │ │ ├── index.ts
│ │ │ │ ├── useCrossVmBatchTransaction.test.ts
│ │ │ │ ├── useCrossVmBatchTransaction.ts
│ │ │ │ ├── useCrossVmBridgeNftFromEvm.test.ts
│ │ │ │ ├── useCrossVmBridgeNftFromEvm.ts
│ │ │ │ ├── useCrossVmBridgeNftToEvm.test.ts
│ │ │ │ ├── useCrossVmBridgeNftToEvm.ts
│ │ │ │ ├── useCrossVmBridgeTokenFromEvm.test.ts
│ │ │ │ ├── useCrossVmBridgeTokenFromEvm.ts
│ │ │ │ ├── useCrossVmBridgeTokenToEvm.test.ts
│ │ │ │ ├── useCrossVmBridgeTokenToEvm.ts
│ │ │ │ ├── useCrossVmSpendNft.test.ts
│ │ │ │ ├── useCrossVmSpendNft.ts
│ │ │ │ ├── useCrossVmSpendToken.test.ts
│ │ │ │ ├── useCrossVmSpendToken.ts
│ │ │ │ ├── useCrossVmTokenBalance.test.ts
│ │ │ │ ├── useCrossVmTokenBalance.ts
│ │ │ │ ├── useCrossVmTransactionStatus.test.ts
│ │ │ │ ├── useCrossVmTransactionStatus.ts
│ │ │ │ ├── useFlowAccount.test.ts
│ │ │ │ ├── useFlowAccount.ts
│ │ │ │ ├── useFlowAuthz.test.ts
│ │ │ │ ├── useFlowAuthz.ts
│ │ │ │ ├── useFlowBlock.test.ts
│ │ │ │ ├── useFlowBlock.ts
│ │ │ │ ├── useFlowChainId.test.ts
│ │ │ │ ├── useFlowChainId.ts
│ │ │ │ ├── useFlowClient.ts
│ │ │ │ ├── useFlowConfig.ts
│ │ │ │ ├── useFlowCurrentUser.test.ts
│ │ │ │ ├── useFlowCurrentUser.ts
│ │ │ │ ├── useFlowEvents.test.ts
│ │ │ │ ├── useFlowEvents.ts
│ │ │ │ ├── useFlowMutate.test.ts
│ │ │ │ ├── useFlowMutate.ts
│ │ │ │ ├── useFlowNftMetadata.test.ts
│ │ │ │ ├── useFlowNftMetadata.ts
│ │ │ │ ├── useFlowQuery.test.ts
│ │ │ │ ├── useFlowQuery.ts
│ │ │ │ ├── useFlowQueryRaw.test.ts
│ │ │ │ ├── useFlowQueryRaw.ts
│ │ │ │ ├── useFlowRevertibleRandom.test.tsx
│ │ │ │ ├── useFlowRevertibleRandom.ts
│ │ │ │ ├── useFlowScheduledTransaction.test.ts
│ │ │ │ ├── useFlowScheduledTransaction.ts
│ │ │ │ ├── useFlowScheduledTransactionCancel.test.ts
│ │ │ │ ├── useFlowScheduledTransactionCancel.ts
│ │ │ │ ├── useFlowScheduledTransactionList.test.ts
│ │ │ │ ├── useFlowScheduledTransactionList.ts
│ │ │ │ ├── useFlowScheduledTransactionSetup.test.ts
│ │ │ │ ├── useFlowScheduledTransactionSetup.ts
│ │ │ │ ├── useFlowTransaction.test.ts
│ │ │ │ ├── useFlowTransaction.ts
│ │ │ │ ├── useFlowTransactionStatus.test.ts
│ │ │ │ └── useFlowTransactionStatus.ts
│ │ │ ├── index.ts
│ │ │ ├── jest-setup.ts
│ │ │ ├── provider/
│ │ │ │ ├── FlowQueryClient.tsx
│ │ │ │ ├── GlobalTransactionProvider.tsx
│ │ │ │ └── index.ts
│ │ │ └── utils/
│ │ │ ├── address.ts
│ │ │ ├── deepEqual.ts
│ │ │ ├── flowscan.ts
│ │ │ └── index.ts
│ │ └── tsconfig.json
│ ├── react-native-sdk/
│ │ ├── .babelrc
│ │ ├── CHANGELOG.md
│ │ ├── README.md
│ │ ├── jest.config.js
│ │ ├── package.json
│ │ ├── src/
│ │ │ ├── __mocks__/
│ │ │ │ └── noop.ts
│ │ │ ├── components/
│ │ │ │ ├── Connect.tsx
│ │ │ │ ├── Profile.tsx
│ │ │ │ └── index.ts
│ │ │ ├── icons/
│ │ │ │ ├── CheckIcon.tsx
│ │ │ │ ├── CopyIcon.tsx
│ │ │ │ ├── ExternalLinkIcon.tsx
│ │ │ │ ├── LogOutIcon.tsx
│ │ │ │ ├── UserIcon.tsx
│ │ │ │ └── index.ts
│ │ │ ├── index.ts
│ │ │ ├── provider/
│ │ │ │ ├── FlowProvider.tsx
│ │ │ │ └── index.ts
│ │ │ └── styles/
│ │ │ ├── colors.ts
│ │ │ ├── dimensions.ts
│ │ │ └── index.ts
│ │ └── tsconfig.json
│ ├── react-sdk/
│ │ ├── .babelrc
│ │ ├── .browserslistrc
│ │ ├── .npmignore
│ │ ├── CHANGELOG.md
│ │ ├── README.md
│ │ ├── jest.config.js
│ │ ├── package.json
│ │ ├── postcss.config.js
│ │ ├── src/
│ │ │ ├── __mocks__/
│ │ │ │ ├── fcl.ts
│ │ │ │ ├── flow-client.ts
│ │ │ │ ├── noop.ts
│ │ │ │ ├── tx.ts
│ │ │ │ └── user.ts
│ │ │ ├── components/
│ │ │ │ ├── Connect.tsx
│ │ │ │ ├── NftCard.tsx
│ │ │ │ ├── Profile.tsx
│ │ │ │ ├── ScheduledTransactionList.tsx
│ │ │ │ ├── TransactionButton.tsx
│ │ │ │ ├── TransactionDialog.tsx
│ │ │ │ ├── TransactionLink.tsx
│ │ │ │ ├── index.ts
│ │ │ │ └── internal/
│ │ │ │ ├── Button.tsx
│ │ │ │ ├── Dialog.tsx
│ │ │ │ └── StyleWrapper.tsx
│ │ │ ├── core/
│ │ │ │ └── theme.tsx
│ │ │ ├── css.d.ts
│ │ │ ├── icons/
│ │ │ │ ├── AlertCircleIcon.tsx
│ │ │ │ ├── CircleCheckIcon.tsx
│ │ │ │ ├── CircleUserRoundIcon.tsx
│ │ │ │ ├── CopyIcon.tsx
│ │ │ │ ├── DownIcon.tsx
│ │ │ │ ├── ExternalLink.tsx
│ │ │ │ ├── FlowIcon.tsx
│ │ │ │ ├── ImageIcon.tsx
│ │ │ │ ├── LoaderCircleIcon.tsx
│ │ │ │ ├── LogOutIcon.tsx
│ │ │ │ ├── MoreVerticalIcon.tsx
│ │ │ │ ├── TrashIcon.tsx
│ │ │ │ ├── UserIcon.tsx
│ │ │ │ └── XIcon.tsx
│ │ │ ├── index.ts
│ │ │ ├── jest-setup.ts
│ │ │ ├── mocks/
│ │ │ │ └── file-mock.ts
│ │ │ ├── provider/
│ │ │ │ ├── DarkModeProvider.tsx
│ │ │ │ ├── FlowProvider.tsx
│ │ │ │ └── index.ts
│ │ │ └── styles/
│ │ │ └── tailwind.css
│ │ ├── tailwind.config.js
│ │ └── tsconfig.json
│ ├── rlp/
│ │ ├── .babelrc
│ │ ├── .browserslistrc
│ │ ├── .eslintrc.json
│ │ ├── .npmignore
│ │ ├── CHANGELOG.md
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── package.json
│ │ ├── src/
│ │ │ ├── index.test.ts
│ │ │ └── index.ts
│ │ └── tsconfig.json
│ ├── sdk/
│ │ ├── .babelrc
│ │ ├── .browserslistrc
│ │ ├── .eslintrc.json
│ │ ├── .npmignore
│ │ ├── CHANGELOG.md
│ │ ├── TRANSITIONS.md
│ │ ├── docs/
│ │ │ └── extra.md
│ │ ├── docs-generator.config.js
│ │ ├── package.json
│ │ ├── readme.md
│ │ ├── src/
│ │ │ ├── VERSION.ts
│ │ │ ├── account/
│ │ │ │ ├── account.test.ts
│ │ │ │ └── account.ts
│ │ │ ├── block/
│ │ │ │ ├── block.test.ts
│ │ │ │ └── block.ts
│ │ │ ├── build/
│ │ │ │ ├── build-arguments.test.ts
│ │ │ │ ├── build-arguments.ts
│ │ │ │ ├── build-at-block-height.test.ts
│ │ │ │ ├── build-at-block-height.ts
│ │ │ │ ├── build-at-block-id.test.ts
│ │ │ │ ├── build-at-block-id.ts
│ │ │ │ ├── build-at-latest-block.test.ts
│ │ │ │ ├── build-at-latest-block.ts
│ │ │ │ ├── build-authorizations.test.ts
│ │ │ │ ├── build-authorizations.ts
│ │ │ │ ├── build-get-account.test.ts
│ │ │ │ ├── build-get-account.ts
│ │ │ │ ├── build-get-block-header.test.ts
│ │ │ │ ├── build-get-block-header.ts
│ │ │ │ ├── build-get-block.test.ts
│ │ │ │ ├── build-get-block.ts
│ │ │ │ ├── build-get-collection.test.ts
│ │ │ │ ├── build-get-collection.ts
│ │ │ │ ├── build-get-events-at-block-height-range.test.ts
│ │ │ │ ├── build-get-events-at-block-height-range.ts
│ │ │ │ ├── build-get-events-at-block-ids.test.ts
│ │ │ │ ├── build-get-events-at-block-ids.ts
│ │ │ │ ├── build-get-events.test.ts
│ │ │ │ ├── build-get-events.ts
│ │ │ │ ├── build-get-latest-block.test.ts
│ │ │ │ ├── build-get-latest-block.ts
│ │ │ │ ├── build-get-network-parameters.test.ts
│ │ │ │ ├── build-get-network-parameters.ts
│ │ │ │ ├── build-get-node-version-info.test.ts
│ │ │ │ ├── build-get-node-version-info.ts
│ │ │ │ ├── build-get-transaction-status.test.ts
│ │ │ │ ├── build-get-transaction-status.ts
│ │ │ │ ├── build-get-transaction.test.ts
│ │ │ │ ├── build-get-transaction.ts
│ │ │ │ ├── build-invariant.js
│ │ │ │ ├── build-invariant.test.js
│ │ │ │ ├── build-limit.test.ts
│ │ │ │ ├── build-limit.ts
│ │ │ │ ├── build-payer.test.ts
│ │ │ │ ├── build-payer.ts
│ │ │ │ ├── build-ping.test.ts
│ │ │ │ ├── build-ping.ts
│ │ │ │ ├── build-proposer.test.ts
│ │ │ │ ├── build-proposer.ts
│ │ │ │ ├── build-ref.test.ts
│ │ │ │ ├── build-ref.ts
│ │ │ │ ├── build-script.test.ts
│ │ │ │ ├── build-script.ts
│ │ │ │ ├── build-subscribe-events.test.ts
│ │ │ │ ├── build-subscribe-events.ts
│ │ │ │ ├── build-transaction.test.ts
│ │ │ │ ├── build-transaction.ts
│ │ │ │ ├── build-validator.test.ts
│ │ │ │ ├── build-validator.ts
│ │ │ │ ├── build-voucher-intercept.test.ts
│ │ │ │ ├── build-voucher-intercept.ts
│ │ │ │ ├── build.test.ts
│ │ │ │ └── build.ts
│ │ │ ├── constants.ts
│ │ │ ├── context/
│ │ │ │ ├── context.ts
│ │ │ │ ├── get-global-transport.test.ts
│ │ │ │ ├── get-global-transport.ts
│ │ │ │ └── global.ts
│ │ │ ├── contract.test.ts
│ │ │ ├── decode/
│ │ │ │ ├── README.md
│ │ │ │ ├── decode-stream.test.ts
│ │ │ │ ├── decode-stream.ts
│ │ │ │ ├── decode.test.js
│ │ │ │ ├── decode.ts
│ │ │ │ └── sdk-decode.ts
│ │ │ ├── encode/
│ │ │ │ ├── README.md
│ │ │ │ ├── encode.test.ts
│ │ │ │ └── encode.ts
│ │ │ ├── interaction/
│ │ │ │ ├── interaction.test.ts
│ │ │ │ └── interaction.ts
│ │ │ ├── node-version-info/
│ │ │ │ └── node-version-info.ts
│ │ │ ├── resolve/
│ │ │ │ ├── __snapshots__/
│ │ │ │ │ └── resolve-signatures.test.ts.snap
│ │ │ │ ├── __tests__/
│ │ │ │ │ └── resolve-accounts.test.js
│ │ │ │ ├── resolve-accounts.test.js
│ │ │ │ ├── resolve-accounts.ts
│ │ │ │ ├── resolve-arguments.test.ts
│ │ │ │ ├── resolve-arguments.ts
│ │ │ │ ├── resolve-cadence.test.ts
│ │ │ │ ├── resolve-cadence.ts
│ │ │ │ ├── resolve-compute-limit.test.ts
│ │ │ │ ├── resolve-compute-limit.ts
│ │ │ │ ├── resolve-final-normalization.test.ts
│ │ │ │ ├── resolve-final-normalization.ts
│ │ │ │ ├── resolve-proposer-sequence-number.test.ts
│ │ │ │ ├── resolve-proposer-sequence-number.ts
│ │ │ │ ├── resolve-ref-block-id.test.ts
│ │ │ │ ├── resolve-ref-block-id.ts
│ │ │ │ ├── resolve-signatures.test.ts
│ │ │ │ ├── resolve-signatures.ts
│ │ │ │ ├── resolve-validators.test.ts
│ │ │ │ ├── resolve-validators.ts
│ │ │ │ ├── resolve-voucher-intercept.test.ts
│ │ │ │ ├── resolve-voucher-intercept.ts
│ │ │ │ ├── resolve.ts
│ │ │ │ └── voucher.ts
│ │ │ ├── response/
│ │ │ │ ├── README.md
│ │ │ │ ├── __snapshots__/
│ │ │ │ │ └── response.test.ts.snap
│ │ │ │ ├── response.test.ts
│ │ │ │ └── response.ts
│ │ │ ├── sdk-client.ts
│ │ │ ├── sdk.test.js
│ │ │ ├── sdk.ts
│ │ │ ├── test-utils/
│ │ │ │ ├── authz-fn.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── mock-send.js
│ │ │ │ └── run.ts
│ │ │ ├── transport/
│ │ │ │ ├── index.ts
│ │ │ │ ├── send/
│ │ │ │ │ ├── send.test.ts
│ │ │ │ │ └── send.ts
│ │ │ │ └── subscribe/
│ │ │ │ ├── errors.ts
│ │ │ │ ├── subscribe-raw.test.ts
│ │ │ │ ├── subscribe-raw.ts
│ │ │ │ ├── subscribe.test.ts
│ │ │ │ ├── subscribe.ts
│ │ │ │ └── types.ts
│ │ │ └── wallet-utils/
│ │ │ ├── encode-signable.test.ts
│ │ │ ├── encode-signable.ts
│ │ │ ├── index.ts
│ │ │ ├── validate-tx.test.ts
│ │ │ └── validate-tx.ts
│ │ └── tsconfig.json
│ ├── transport-grpc/
│ │ ├── .babelrc
│ │ ├── .browserslistrc
│ │ ├── .npmignore
│ │ ├── CHANGELOG.md
│ │ ├── README.md
│ │ ├── package.json
│ │ ├── src/
│ │ │ ├── sdk-send-grpc.js
│ │ │ ├── send-execute-script.js
│ │ │ ├── send-execute-script.test.js
│ │ │ ├── send-get-account.js
│ │ │ ├── send-get-account.test.js
│ │ │ ├── send-get-block-header.js
│ │ │ ├── send-get-block-header.test.js
│ │ │ ├── send-get-block.js
│ │ │ ├── send-get-block.test.js
│ │ │ ├── send-get-collection.js
│ │ │ ├── send-get-collection.test.js
│ │ │ ├── send-get-events.js
│ │ │ ├── send-get-events.test.js
│ │ │ ├── send-get-network-parameters.js
│ │ │ ├── send-get-network-parameters.test.js
│ │ │ ├── send-get-node-version-info.js
│ │ │ ├── send-get-node-version-info.test.js
│ │ │ ├── send-get-transaction-status.js
│ │ │ ├── send-get-transaction-status.test.js
│ │ │ ├── send-get-transaction.js
│ │ │ ├── send-get-transaction.test.js
│ │ │ ├── send-grpc.js
│ │ │ ├── send-ping.js
│ │ │ ├── send-ping.test.js
│ │ │ ├── send-transaction.js
│ │ │ ├── send-transaction.test.js
│ │ │ └── unary.js
│ │ └── tsconfig.json
│ ├── transport-http/
│ │ ├── .babelrc
│ │ ├── .browserslistrc
│ │ ├── .npmignore
│ │ ├── CHANGELOG.md
│ │ ├── README.md
│ │ ├── package.json
│ │ ├── src/
│ │ │ ├── index.ts
│ │ │ ├── send/
│ │ │ │ ├── connect-subscribe-events.test.ts
│ │ │ │ ├── connect-subscribe-events.ts
│ │ │ │ ├── connect-ws.test.ts
│ │ │ │ ├── connect-ws.ts
│ │ │ │ ├── http-request.js
│ │ │ │ ├── http-request.test.js
│ │ │ │ ├── send-execute-script.js
│ │ │ │ ├── send-execute-script.test.js
│ │ │ │ ├── send-get-account.js
│ │ │ │ ├── send-get-account.test.js
│ │ │ │ ├── send-get-block-header.js
│ │ │ │ ├── send-get-block-header.test.js
│ │ │ │ ├── send-get-block.js
│ │ │ │ ├── send-get-block.test.js
│ │ │ │ ├── send-get-collection.js
│ │ │ │ ├── send-get-collection.test.js
│ │ │ │ ├── send-get-events.js
│ │ │ │ ├── send-get-events.test.js
│ │ │ │ ├── send-get-network-parameters.js
│ │ │ │ ├── send-get-network-parameters.test.js
│ │ │ │ ├── send-get-node-version-info.test.ts
│ │ │ │ ├── send-get-node-version-info.ts
│ │ │ │ ├── send-get-transaction-status.js
│ │ │ │ ├── send-get-transaction-status.test.js
│ │ │ │ ├── send-get-transaction.js
│ │ │ │ ├── send-get-transaction.test.js
│ │ │ │ ├── send-http.ts
│ │ │ │ ├── send-ping.test.ts
│ │ │ │ ├── send-ping.ts
│ │ │ │ ├── send-transaction.js
│ │ │ │ ├── send-transaction.test.js
│ │ │ │ └── utils.js
│ │ │ ├── subscribe/
│ │ │ │ ├── handlers/
│ │ │ │ │ ├── account-statuses.test.ts
│ │ │ │ │ ├── account-statuses.ts
│ │ │ │ │ ├── block-digests.ts
│ │ │ │ │ ├── block-headers.ts
│ │ │ │ │ ├── blocks.ts
│ │ │ │ │ ├── events.test.ts
│ │ │ │ │ ├── events.ts
│ │ │ │ │ ├── transaction-statuses.ts
│ │ │ │ │ └── types.ts
│ │ │ │ ├── models.ts
│ │ │ │ ├── subscribe.test.ts
│ │ │ │ ├── subscribe.ts
│ │ │ │ ├── subscription-manager.test.ts
│ │ │ │ ├── subscription-manager.ts
│ │ │ │ └── websocket.ts
│ │ │ ├── transport.ts
│ │ │ └── utils/
│ │ │ ├── combine-urls.test.ts
│ │ │ └── combine-urls.ts
│ │ └── tsconfig.json
│ ├── typedefs/
│ │ ├── .babelrc
│ │ ├── .eslintrc.json
│ │ ├── .npmignore
│ │ ├── CHANGELOG.md
│ │ ├── README.md
│ │ ├── package.json
│ │ ├── src/
│ │ │ ├── fvm-errors.ts
│ │ │ ├── index.test.js
│ │ │ ├── index.ts
│ │ │ ├── interaction.ts
│ │ │ ├── subscriptions.ts
│ │ │ └── transport.ts
│ │ └── tsconfig.json
│ ├── types/
│ │ ├── .babelrc
│ │ ├── .browserslistrc
│ │ ├── .eslintrc.json
│ │ ├── .npmignore
│ │ ├── CHANGELOG.md
│ │ ├── README.md
│ │ ├── WARNINGS.md
│ │ ├── package.json
│ │ ├── src/
│ │ │ ├── types.test.ts
│ │ │ └── types.ts
│ │ └── tsconfig.json
│ ├── util-actor/
│ │ ├── .babelrc
│ │ ├── .browserslistrc
│ │ ├── .eslintrc.json
│ │ ├── .npmignore
│ │ ├── CHANGELOG.md
│ │ ├── README.md
│ │ ├── package.json
│ │ ├── src/
│ │ │ ├── index.test.ts
│ │ │ ├── index.ts
│ │ │ └── mailbox/
│ │ │ ├── README.md
│ │ │ ├── index.test.ts
│ │ │ └── index.ts
│ │ └── tsconfig.json
│ ├── util-address/
│ │ ├── .babelrc
│ │ ├── .browserslistrc
│ │ ├── .eslintrc.json
│ │ ├── .npmignore
│ │ ├── CHANGELOG.md
│ │ ├── README.md
│ │ ├── package.json
│ │ ├── src/
│ │ │ ├── index.test.ts
│ │ │ └── index.ts
│ │ └── tsconfig.json
│ ├── util-encode-key/
│ │ ├── .babelrc
│ │ ├── .browserslistrc
│ │ ├── .eslintrc.json
│ │ ├── .npmignore
│ │ ├── CHANGELOG.md
│ │ ├── README.md
│ │ ├── package.json
│ │ ├── src/
│ │ │ ├── __snapshots__/
│ │ │ │ └── index.test.ts.snap
│ │ │ ├── index.test.ts
│ │ │ └── index.ts
│ │ └── tsconfig.json
│ ├── util-invariant/
│ │ ├── .babelrc
│ │ ├── .browserslistrc
│ │ ├── .eslintrc.json
│ │ ├── .npmignore
│ │ ├── CHANGELOG.md
│ │ ├── README.md
│ │ ├── package.json
│ │ ├── src/
│ │ │ ├── index.test.ts
│ │ │ └── index.ts
│ │ └── tsconfig.json
│ ├── util-logger/
│ │ ├── .babelrc
│ │ ├── .browserslistrc
│ │ ├── .eslintrc.json
│ │ ├── .npmignore
│ │ ├── CHANGELOG.md
│ │ ├── README.md
│ │ ├── package.json
│ │ ├── src/
│ │ │ ├── util-logger.test.ts
│ │ │ └── util-logger.ts
│ │ └── tsconfig.json
│ ├── util-rpc/
│ │ ├── .babelrc
│ │ ├── .browserslistrc
│ │ ├── .eslintrc.json
│ │ ├── .npmignore
│ │ ├── CHANGELOG.md
│ │ ├── README.md
│ │ ├── package.json
│ │ ├── src/
│ │ │ ├── index.ts
│ │ │ ├── messages.ts
│ │ │ ├── rpc-client.test.ts
│ │ │ ├── rpc-client.ts
│ │ │ └── rpc-error.ts
│ │ └── tsconfig.json
│ ├── util-semver/
│ │ ├── .babelrc
│ │ ├── CHANGELOG.md
│ │ ├── package.json
│ │ ├── src/
│ │ │ ├── compare-identifiers.js
│ │ │ ├── compare.js
│ │ │ ├── compare.test.js
│ │ │ └── index.ts
│ │ └── tsconfig.json
│ ├── util-template/
│ │ ├── .babelrc
│ │ ├── .browserslistrc
│ │ ├── .eslintrc.json
│ │ ├── .npmignore
│ │ ├── CHANGELOG.md
│ │ ├── README.md
│ │ ├── package.json
│ │ ├── src/
│ │ │ ├── __snapshots__/
│ │ │ │ └── template.test.ts.snap
│ │ │ ├── template.test.ts
│ │ │ └── template.ts
│ │ └── tsconfig.json
│ └── util-uid/
│ ├── .babelrc
│ ├── .browserslistrc
│ ├── .eslintrc.json
│ ├── .npmignore
│ ├── CHANGELOG.md
│ ├── README.md
│ ├── package.json
│ ├── src/
│ │ ├── util-uid.test.ts
│ │ └── util-uid.ts
│ └── tsconfig.json
└── tsconfig.json
================================================
FILE CONTENTS
================================================
================================================
FILE: .changeset/README.md
================================================
# Changesets
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
================================================
FILE: .changeset/config.json
================================================
{
"$schema": "https://unpkg.com/@changesets/config@1.7.0/schema.json",
"changelog": ["@changesets/changelog-github", {"repo": "onflow/fcl-js"}],
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "master",
"updateInternalDependencies": "patch",
"ignore": ["@onflow/transport-grpc"]
}
================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.yml
================================================
name: Reporting a Problem/Bug
description: Reporting a Problem/Bug
title: "[BUG] <title>"
labels: [Bug, Needs Triage]
body:
- type: markdown
attributes:
value: Please fill out the template below to the best of your ability and include a label indicating which tool/service you were working with when you encountered the problem.
- type: textarea
attributes:
label: Current Behavior
description: A concise description of what you're experiencing.
validations:
required: true
- type: textarea
attributes:
label: Expected Behavior
description: A concise description of what you expected to happen.
validations:
required: true
- type: textarea
attributes:
label: Steps To Reproduce
description: Steps to reproduce the behavior.
placeholder: |
1. In this environment...
2. With this config...
3. Run '...'
4. See error...
validations:
required: true
- type: textarea
attributes:
label: Environment
description: |
examples:
- **OS**: Ubuntu 20.04
- **Node**: 13.14.0
- **npm**: 7.6.3
value: |
- OS:
- Node:
- npm:
render: markdown
validations:
required: true
- type: textarea
attributes:
label: What are you currently working on that this is blocking?
validations:
required: false
================================================
FILE: .github/ISSUE_TEMPLATE/feature_request.yml
================================================
name: Requesting a Feature or Improvement
description: For feature requests. Please search for existing issues first. Also see CONTRIBUTING.
title: "[FEATURE] <title>"
labels: [Feature, Needs Triage]
body:
- type: markdown
attributes:
value: Please fill out the template below to the best of your ability and include a label indicating which tool/service you were working with when you encountered the problem.
- type: textarea
attributes:
label: Issue to be solved
description: Please present a concise description of the problem to be addressed by this feature request. Please be clear what parts of the problem are considered to be in-scope and out-of-scope.
validations:
required: true
- type: textarea
attributes:
label: Suggest A Solution
description: |
A concise description of your preferred solution. Things to address include:
* Details of the technical implementation
* Tradeoffs made in design decisions
* Caveats and considerations for the future
If there are multiple solutions, please present each one separately. Save comparisons for the very end.)
validations:
required: false
- type: textarea
attributes:
label: What are you currently working on that this is blocking?
validations:
required: false
================================================
FILE: .github/scripts/prevent-major-bumps.js
================================================
/**
* DO NOT REMOVE ME UNLESS YOU KNOW WHAT YOU'RE DOING!!
*/
const {execSync} = require("child_process")
const fs = require("fs")
// Fetch the latest changes from the main branch
execSync("git fetch origin master")
const packageJsons = execSync("git ls-files 'packages/*/package.json'")
.toString()
.split("\n")
.filter(Boolean)
// Assert that the package.json files exist
if (packageJsons.length === 0) {
console.error("Error: No package.json files found.")
process.exit(1) // Fail the CI
}
for (const packageJson of packageJsons) {
// Get the current version from package.json
const newPackageJson = JSON.parse(fs.readFileSync(packageJson, "utf8"))
const newPackageName = newPackageJson.name
const newVersion = newPackageJson.version
// Get the version from the main branch (or latest release)
let prevPackageJson
try {
prevPackageJson = JSON.parse(
execSync(`git show origin/master:${packageJson}`).toString()
)
} catch (error) {
console.info("Skipping new package", newPackageName)
continue
}
const prevPackageName = prevPackageJson.name
const prevVersion = prevPackageJson.version
// Assert that the package names match
if (newPackageName !== prevPackageName) {
console.error(
`Error: Package name mismatch for ${newPackageName} (${prevPackageName} -> ${newPackageName}).`
)
process.exit(1) // Fail the CI
}
// Extract major, minor, and patch numbers
const newMajor = parseInt(newVersion.split(".")[0])
const prevMajor = parseInt(prevVersion.split(".")[0])
// Check if it's a major version bump
if (newMajor > prevMajor) {
console.error(
`Error: Major version bump detected for ${newPackageName} (${prevVersion} -> ${newVersion}).`
)
process.exit(1) // Fail the CI
}
console.log(
`Version bump allowed for ${newPackageName}: ${prevVersion} -> ${newVersion}`
)
}
process.exit(0) // Allow the CI to pass
================================================
FILE: .github/workflows/add-pitches-to-project.yml
================================================
name: Adds all issues to the project board.
on:
issues:
types:
- opened
jobs:
add-to-project:
name: Add issue to project
runs-on: ubuntu-latest
steps:
- uses: actions/add-to-project@v0.4.1
with:
project-url: https://github.com/orgs/onflow/projects/85
github-token: ${{ secrets.GH_ACTION_FOR_PROJECTS }}
================================================
FILE: .github/workflows/changeset-check.yml
================================================
# Changeset Enforcement Action
#
# This workflow ensures that when developers make changes to package code,
# they include a "changeset" file that describes what changed and how it
# should affect the version number (major/minor/patch).
#
# Changesets are used by the @changesets/cli tool to automatically:
# - Generate changelogs
# - Determine version bumps
# - Coordinate releases across multiple packages in this monorepo
#
# The check can be bypassed by adding the "skip-changeset" label to a PR
# (useful for docs-only changes, CI fixes, etc. that don't need version bumps)
name: Changeset Check
on:
pull_request:
jobs:
changeset-check:
name: Check for Changeset
runs-on: ubuntu-latest
# Skip draft PRs - only run on PRs ready for review
if: github.event.pull_request.draft == false
steps:
- name: Checkout
uses: actions/checkout@v4
with:
# Need full history to compare against base branch
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "18"
cache: "npm"
- name: Install dependencies
run: npm ci
# Check if PR has the skip-changeset label to bypass this check
- name: Check for opt-out label
id: check-labels
uses: actions/github-script@v7
with:
script: |
const labels = context.payload.pull_request.labels.map(label => label.name);
const hasOptOut = labels.includes('skip-changeset');
core.setOutput('skip-changeset', hasOptOut);
if (hasOptOut) {
core.info('Changeset check skipped due to skip-changeset label');
}
# Use changesets CLI to check if changeset is needed for this PR
- name: Check changeset status
id: changeset-check
if: steps.check-labels.outputs.skip-changeset != 'true'
run: |
# First check what packages have changed
echo "Checking for package changes..."
CHANGED_FILES=$(git diff --name-only origin/${{ github.base_ref }}...HEAD)
PACKAGE_CHANGES=$(echo "$CHANGED_FILES" | grep -E "(packages/.*/src/|packages/.*/package\.json)" || true)
if [ -z "$PACKAGE_CHANGES" ]; then
echo "status=no-changes" >> $GITHUB_OUTPUT
echo "ℹ️ No package changes detected, changeset not required"
exit 0
fi
echo "📦 Package changes detected:"
echo "$PACKAGE_CHANGES"
# Now check changeset status - capture both output and exit code
echo "Checking changeset status..."
set +e # Don't exit on error
npx changeset status --since=origin/${{ github.base_ref }} --verbose > changeset-output.txt 2>&1
EXIT_CODE=$?
set -e # Re-enable exit on error
echo "Changeset status output:"
cat changeset-output.txt
if [ $EXIT_CODE -eq 0 ]; then
echo "status=valid" >> $GITHUB_OUTPUT
echo "✅ Changeset requirements satisfied"
else
echo "status=missing" >> $GITHUB_OUTPUT
echo "❌ Missing changeset for package changes"
fi
# Clean up old changeset comments to avoid PR pollution
- name: Clean up old comments
uses: actions/github-script@v7
with:
script: |
// Find and delete old changeset comments from this bot
const comments = await github.rest.issues.listComments({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
});
const botComments = comments.data.filter(comment =>
comment.user.type === 'Bot' &&
comment.body.includes('📦 Changeset Required')
);
for (const comment of botComments) {
await github.rest.issues.deleteComment({
owner: context.repo.owner,
repo: context.repo.repo,
comment_id: comment.id,
});
console.log(`Deleted old changeset comment: ${comment.id}`);
}
# Add a helpful comment when changeset is missing
- name: Comment on PR - Missing Changeset
if: |
steps.check-labels.outputs.skip-changeset != 'true' &&
steps.changeset-check.outputs.status == 'missing'
uses: actions/github-script@v7
with:
script: |
const comment = `## 📦 Changeset Required
This PR appears to modify package code but doesn't include a changeset.
A changeset helps track version changes and generate release notes.
### To add a changeset:
\`\`\`bash
npm run changeset
\`\`\`
### To skip this check (if no version bump is needed):
Add the \`skip-changeset\` label to this PR`;
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: comment
});
# Determine final status and fail the check if needed
- name: Set final status
id: final-status
run: |
if [ "${{ steps.check-labels.outputs.skip-changeset }}" = "true" ]; then
echo "status=skipped" >> $GITHUB_OUTPUT
echo "✅ Changeset check skipped (skip-changeset label detected)"
elif [ "${{ steps.changeset-check.outputs.status }}" = "no-changes" ]; then
echo "status=not-required" >> $GITHUB_OUTPUT
echo "✅ Changeset not required (no package changes)"
elif [ "${{ steps.changeset-check.outputs.status }}" = "valid" ]; then
echo "status=success" >> $GITHUB_OUTPUT
echo "✅ Changeset requirements satisfied"
else
echo "status=missing" >> $GITHUB_OUTPUT
echo "❌ Missing required changeset"
exit 1
fi
# Create a summary for the GitHub Actions UI
- name: Summary
run: |
case "${{ steps.final-status.outputs.status }}" in
"skipped")
echo "### ✅ Changeset Check: Skipped" >> $GITHUB_STEP_SUMMARY
echo "The changeset requirement was bypassed using the skip-changeset label." >> $GITHUB_STEP_SUMMARY
;;
"not-required")
echo "### ✅ Changeset Check: Not Required" >> $GITHUB_STEP_SUMMARY
echo "No package changes detected, so no changeset is needed." >> $GITHUB_STEP_SUMMARY
;;
"success")
echo "### ✅ Changeset Check: Passed" >> $GITHUB_STEP_SUMMARY
echo "Changeset requirements satisfied for this PR." >> $GITHUB_STEP_SUMMARY
;;
"missing")
echo "### ❌ Changeset Check: Failed" >> $GITHUB_STEP_SUMMARY
echo "Package changes detected but no valid changeset found." >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "**To fix:** Run \`npm run changeset\` or add the \`skip-changeset\` label if no version bump is needed." >> $GITHUB_STEP_SUMMARY
;;
esac
================================================
FILE: .github/workflows/code-analysis.yml
================================================
# This workflow is used to run CodeQL analysis on the codebase.
# If a code scanning alert is found, it will fail the PR,
# and prompt the user to fix the issue in a comment.
name: "CodeQL Analysis"
on:
push:
branches:
- master
pull_request:
branches:
- master
schedule:
- cron: "0 0 * * *"
jobs:
analyze-code:
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
pull-requests: write
strategy:
matrix:
languages: [javascript-typescript]
fail-fast: false
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.languages }}
queries: security-extended
- name: Autobuild
uses: github/codeql-action/autobuild@v3
- name: Analyze
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{ matrix.languages}}"
================================================
FILE: .github/workflows/dependancy-review.yml
================================================
# Dependency Review Action
# PRs introducing NEW known-vulnerable packages will be blocked from merging.
# This will output a GHAS comment in the PR with the details of the vulnerabilities.
# and will also provide a comment on what to do next.
# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement
name: "Dependency review"
on:
pull_request:
branches: ["master"]
permissions:
contents: read
pull-requests: write # Required for PR comments
jobs:
dependency-review:
runs-on: ubuntu-latest
outputs:
vulnerable-changes: ${{ steps.review.outputs.vulnerable-changes }}
steps:
- name: "Checkout repository"
uses: actions/checkout@v4
- name: "Dependency Review"
id: review
uses: actions/dependency-review-action@v4
with:
comment-summary-in-pr: always
fail-on-severity: moderate
#allow-ghsas: GHSA-q34m-jh98-gwm2,GHSA-f9vj-2wh5-fj8j EXAMPLE of how to whitelist!
dependency-review-failure-info:
needs: dependency-review
if: failure()
runs-on: ubuntu-latest
steps:
- name: Add PR Comment
uses: actions/github-script@v7
env:
VULN_OUTPUT: ${{ needs.dependency-review.outputs.vulnerable-changes }}
with:
script: |
try {
const vulnData = JSON.parse(process.env.VULN_OUTPUT || '[]');
let details = '';
for (const pkg of vulnData) {
details += `\n📦 **${pkg.name}@${pkg.version}**\n`;
}
const comment = `⚠️ **Security Dependency Review Failed** ⚠️
This pull request introduces dependencies with security vulnerabilities of moderate severity or higher.
### Vulnerable Dependencies:${details}
### What to do next?
1. Review the vulnerability details in the Dependency Review Comment above, specifically the "Vulnerabilities" section
2. Click on the links in the "Vulnerability" section to see the details of the vulnerability
3. If multiple versions of the same package are vulnerable, please update to the common latest non-vulnerable version
4. If you are unsure about the vulnerability, please contact the security engineer
5. If the vulnerability cannot be avoided (can't upgrade, or need to keep), contact #security on slack to **get it added to the allowlist**
\nSecurity Engineering contact: #security on slack`;
await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: comment
});
} catch (error) {
console.error('Error processing vulnerability data:', error);
throw error;
}
================================================
FILE: .github/workflows/integrate.yml
================================================
name: FLOW-JS-SDK Continuous Integration
on:
pull_request:
jobs:
test_pull_request:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v1
with:
node-version: 18.x
# This step is VERY important. Changesets has a bug where peer dependencies will cause major version bumps
# This script will prevent that from happening. You must manually edit any changesets PRs which have this issue
# to correct the version bump.
#
# If you wish to allow a major version bump, you will have to override this check, but be VERY careful with it.
#
# See:
# https://github.com/changesets/changesets/pull/1132
# https://github.com/changesets/changesets/issues/1011
# https://github.com/changesets/changesets/issues/960
# https://github.com/changesets/changesets/issues/822
#- name: Prevent Major Version Bumps
# run: node ./.github/scripts/prevent-major-bumps.js
- run: make ci
================================================
FILE: .github/workflows/promote-playground.yml
================================================
name: Promote playground on release
on:
# Automatically trigger after Release workflow completes on master
workflow_run:
workflows: ["Release"]
types:
- completed
branches:
- master
# Optional: Allow manual triggering (will auto-detect latest tag)
workflow_dispatch:
branches:
- master
permissions:
contents: write
concurrency:
group: promote-playground
cancel-in-progress: false
jobs:
promote:
runs-on: ubuntu-latest
# Only run if Release workflow succeeded (or if manually triggered)
# Note: workflow_run already filters for master branch, so we only need to check success
if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout with full history
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Move playground branch to tag
run: |
echo "Setting up git configuration..."
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
echo "Fetching tags..."
git fetch --tags
# Check if this is a manual trigger (skip time check for manual runs)
if [ "${{ github.event_name }}" != "workflow_dispatch" ]; then
echo "Checking if a new tag was created recently..."
# Get the latest stable tag first (excluding alpha/beta/rc)
LATEST_STABLE_TAG=$(git tag -l "@onflow/react-sdk@*" --sort=-version:refname | grep -v -E '(alpha|beta|rc)' | head -n 1)
# Get the timestamp of that specific stable tag
LATEST_TAG_TIME=$(git log -1 --format='%ct' "$LATEST_STABLE_TAG")
CURRENT_TIME=$(date +%s)
TIME_DIFF=$((CURRENT_TIME - LATEST_TAG_TIME))
if [ $TIME_DIFF -gt 3600 ]; then
echo "No new @onflow/react-sdk tag created within the last hour"
exit 0
fi
echo "New tag detected within the last hour, proceeding with promotion"
else
echo "Manual trigger detected, skipping time check"
fi
# Get the latest stable @onflow/react-sdk tag (excluding alpha/beta/rc versions)
TAG=$(git tag -l "@onflow/react-sdk@*" --sort=-version:refname | grep -v -E '(alpha|beta|rc)' | head -n 1)
if [ -z "$TAG" ]; then
echo "Error: No @onflow/react-sdk tag found"
exit 1
fi
echo "Found latest tag: $TAG"
git show --no-patch --pretty=fuller "$TAG"
# Create/update branch at the tag commit and push
echo "Updating playground branch to point to $TAG..."
git branch -f playground "$TAG"
git push --force-with-lease origin playground
echo "Successfully updated playground branch to $TAG"
================================================
FILE: .github/workflows/release.yml
================================================
name: Release
on:
push:
branches:
- master
pull_request:
types: [closed]
branches:
- master
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
# Job 1: Create/update Version PR (on push to master)
version:
if: github.event_name == 'push'
name: Create Version PR
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
- name: Install Dependencies
run: npm i
- name: Create Release Pull Request
uses: changesets/action@v1
with:
title: "Version Packages"
commit: "Version Packages"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Job 2: Publish to npm (when Version PR is merged)
publish:
if: github.event_name == 'pull_request' && github.event.pull_request.merged == true && startsWith(github.event.pull_request.title, 'Version Packages')
name: Publish to npm
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
registry-url: "https://registry.npmjs.org"
- name: Upgrade npm for OIDC support
run: npm install -g npm@latest
- name: Install Dependencies
run: npm i
- name: Build packages
run: npm run build
- name: Publish to npm
uses: changesets/action@v1
with:
publish: npx changeset publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Clear tokens to allow OIDC authentication
# https://github.com/orgs/community/discussions/176761
# https://github.com/changesets/changesets/issues/1152
NODE_AUTH_TOKEN: ""
NPM_TOKEN: ""
================================================
FILE: .gitignore
================================================
# folders
node_modules/
dist/
.parcel-cache/
flowdb/
.exrc
.DS_Store
# file types
dev-wallet/db/*.db
todo.md
**/debug.log
*.log
.vscode/*
# type declarations
packages/*/types/
# generated documentation
/docs-generator/output/*
================================================
FILE: .prettierignore
================================================
README.md
*.md
*.mdx
packages/protobuf/src/generated/
**/*.hbs
================================================
FILE: .prettierrc
================================================
{
"semi": false,
"trailingComma": "es5",
"bracketSpacing": false,
"arrowParens": "avoid",
"plugins": ["prettier-plugin-tailwindcss", "prettier-plugin-classnames"]
}
================================================
FILE: AGENTS.md
================================================
# AGENTS.md
Guidance for AI coding agents (Claude Code, Codex, Cursor, Copilot, and others) working in
this repository. Loaded into agent context automatically — keep edits concise.
## Overview
`fcl-js` is the TypeScript/JavaScript **Flow Client Library** monorepo: the reference client
for connecting browser and server apps to the Flow blockchain and FCL-compatible wallets
(`README.md`). It is a **Lerna monorepo with independent package versioning** (`lerna.json`:
`"version": "independent"`) using **npm workspaces** (`package.json`:
`"workspaces": ["./packages/*"]`), with releases driven by **Changesets** from the `master`
branch (`.changeset/config.json`, `.github/workflows/release.yml`). The flagship package is
`@onflow/fcl` (`packages/fcl/`); `@onflow/sdk` (`packages/sdk/`) is the lower-level Flow
Access API client FCL is built on.
## Build and Test Commands
This repo uses **npm + Lerna**, not pnpm or yarn. There is no `pnpm-workspace.yaml`; the
committed lockfile is `package-lock.json`.
Root scripts (`package.json`):
- `npm i` — install workspace dependencies (CONTRIBUTING.md). `make install` runs `npm ci`.
- `npm run build` — `lerna run build` across all packages.
- `npm test` — runs `jest` with `projects: ["<rootDir>/packages/*"]` (`jest.config.js`).
- `npm start` — `npm run build && lerna run start --parallel` (per-package watch mode).
- `npm run prettier:check` / `npm run prettier` — check/write formatting.
- `npm run generate-all-docs` — `node docs-generator/generate-all-docs.js`; scans packages
that declare a `generate-docs` script and invokes each one.
- `npm run demo` — runs emulator + dev-wallet + Vite in `packages/demo` (requires `flow` CLI).
- `npm run demo:testnet` — same demo app pointed at testnet.
- `npm run changeset` / `npm run release` — changeset CLI / `build && changeset publish`.
Makefile wrappers (`Makefile`):
- `make all` → `clean install build test`.
- `make ci` → `clean install build`, then `npm run test -- --ci` and `npm run prettier:check`.
This is exactly what `.github/workflows/integrate.yml` runs on every PR.
- `make clean` — deletes `node_modules/`, `dist/`, `types/` inside every `packages/*`.
- `make publish` — runs `npm publish` in every package (not typical; CI uses Changesets).
Per-package scripts are uniform (see `packages/fcl/package.json`, `packages/sdk/package.json`,
etc.): `test` → `jest`, `build` → `fcl-bundle` (often preceded by `eslint .`), `start` →
`fcl-bundle --watch`, `build:types` → `tsc` (where present). The bundler is the in-tree
`@onflow/fcl-bundle` package (`packages/fcl-bundle/`, wraps Rollup). To work on one package,
`cd packages/<name> && npm test` (or `npm run test:watch` where declared).
CI uses **Node 18** for PRs (`integrate.yml`) and **Node 22** for releases (`release.yml`).
No `engines` field is declared in any package.json.
## Architecture
Everything ships from `packages/*`. Verified packages (29):
**Flagship / entry points**
- `fcl/` — `@onflow/fcl`, the browser-first high-level client (wallet discovery, authn,
`query`, `mutate`, transactions, signatures).
- `fcl-core/` — `@onflow/fcl-core`, platform-agnostic core that `fcl` and `fcl-react-native`
build on. Houses `wallet-provider-spec/` and `wallet-utils/`.
- `fcl-react-native/` — `@onflow/fcl-react-native`, React Native variant of FCL.
- `sdk/` — `@onflow/sdk`, low-level Flow Access API client (builders, interactions, encode/
decode, resolvers). FCL wraps this.
**React kits**
- `react-core/` — `@onflow/react-core`, platform-agnostic React hooks (TanStack Query-based).
- `react-sdk/` — `@onflow/react-sdk`, web React bindings built on `react-core` + `fcl`.
- `react-native-sdk/` — `@onflow/react-native-sdk`, RN bindings built on `react-core` +
`fcl-react-native`.
**EVM / cross-VM**
- `fcl-ethereum-provider/` — EIP-1193 Ethereum provider backed by an FCL wallet.
- `fcl-wagmi-adapter/` — Wagmi connector built on `fcl-ethereum-provider`.
- `fcl-rainbowkit-adapter/` — RainbowKit adapter built on `fcl-wagmi-adapter`.
**Wallet connectivity**
- `fcl-wc/` — `@onflow/fcl-wc`, WalletConnect v2 adapter for FCL.
**Transports / encoding / types**
- `transport-http/` — HTTP transport against the Flow Access API (used by `sdk`).
- `transport-grpc/` — gRPC-Web transport. **Ignored by Changesets**
(`.changeset/config.json` `"ignore": ["@onflow/transport-grpc"]`) — do not add changesets
for it.
- `protobuf/` — `@onflow/protobuf`, generated gRPC protobuf bindings (built via webpack,
not `fcl-bundle`).
- `rlp/` — RLP encoder port (MPL-2.0; every other package is Apache-2.0).
- `types/` — Cadence value type codecs (`t.Int`, `t.Address`, …).
- `typedefs/` — `@onflow/typedefs`, public TypeScript definitions (see README § TypeScript).
**Shared utilities** (`util-*`)
- `util-actor`, `util-address`, `util-encode-key`, `util-invariant`, `util-logger`,
`util-rpc`, `util-semver`, `util-template`, `util-uid`.
**Config + tooling + dev**
- `config/` — `@onflow/config`, FCL's config store (e.g. `fcl.config({...})`).
- `fcl-bundle/` — the internal Rollup-based bundler every publishable package uses.
- `demo/` — `@onflow/demo` (private), Vite app for manual testing against emulator/testnet/
mainnet. See `packages/demo/README.md`.
## Conventions and Gotchas
- **Do not switch package managers.** The repo is npm + Lerna + Changesets. Switching to
pnpm/yarn breaks lockfile and CI.
- **Do not add a top-level integration test.** `jest.config.js` aggregates
`packages/*` Jest projects; tests live inside each package next to source (`*.test.ts`).
- **Write a changeset for any package-facing change.** Run `npx changeset` per
CONTRIBUTING.md. The baseBranch is `master`, not `main`.
- **`@onflow/transport-grpc` is Changeset-ignored** — do not create a changeset entry
targeting it (`.changeset/config.json`).
- **Never edit `packages/protobuf/src/generated/`** — regenerate via the package's
`generate` script (`protoc ...`). This path is also in `.prettierignore`.
- **Versions are independent.** Lerna `"version": "independent"`; bumping `@onflow/fcl` does
not bump siblings. Cross-package imports use pinned versions — update them explicitly
when changing a shared util's API.
- **Builds run lint.** Most packages define `"build": "npm run lint && fcl-bundle"`; a lint
error will fail `npm run build` and therefore `make ci`.
- **`@onflow/fcl-bundle` is in-tree.** When debugging build output, edit
`packages/fcl-bundle/` rather than searching for it in `node_modules`.
- **Commit message format** (CONTRIBUTING.md): `TOPIC -- [package-name] description`.
Topics: `PKG` (package change, needs changelog), `DOC`, `OPS`, `VSN`.
- **Prettier config**: `semi: false`, `bracketSpacing: false`, `arrowParens: "avoid"`
(`.prettierrc`). CI runs `prettier --check .` as part of `make ci`.
- **Wallet provider spec** lives in the repo at
`packages/fcl-core/src/wallet-provider-spec/` (active draft: `draft-v4.md`). Link here
rather than duplicating spec text.
- **`@onflow/sdk` vs `@onflow/fcl`**: SDK is low-level (Access API only, no wallet).
FCL depends on SDK. Don't reimplement SDK primitives inside `fcl` or `fcl-core`.
## Files Not to Modify
- `packages/protobuf/src/generated/` — generated from `.proto` (also in `.prettierignore`).
- `package-lock.json` — regenerate via `npm i`, don't hand-edit.
- `packages/*/CHANGELOG.md` — managed by Changesets.
- `packages/*/dist/`, `packages/*/types/` — build output (cleaned by `make clean`).
================================================
FILE: CHANGELOG.md
================================================
# Changelog
Release notes and version history for fcl-js are tracked via GitHub Releases:
- https://github.com/onflow/fcl-js/releases
For user-facing changes per version, see the Releases page.
================================================
FILE: CITATION.cff
================================================
cff-version: 1.2.0
message: "If you use fcl-js in your research or reference it, please cite it as below."
title: "fcl-js: Flow Client Library for JavaScript and TypeScript"
authors:
- name: "Flow Foundation"
website: "https://flow.com"
repository-code: "https://github.com/onflow/fcl-js"
url: "https://flow.com"
license: Apache-2.0
type: software
keywords:
- flow
- flow-network
- fcl
- flow-client-library
- typescript
- javascript
- sdk
- wallet-authentication
- dapp
- cadence
================================================
FILE: CODEOWNERS
================================================
* @onflow/fcl
================================================
FILE: CODE_OF_CONDUCT.md
================================================
# Contributor Covenant Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
## Our Standards
Examples of behavior that contributes to a positive environment for our
community include:
- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
- Focusing on what is best not just for us as individuals, but for the
overall community
Examples of unacceptable behavior include:
- The use of sexualized language or imagery, and sexual attention or
advances of any kind
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email
address, without their explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting
## Enforcement Responsibilities
Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.
Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.
## Scope
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at <community@onflow.org>.
All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
## Enforcement Guidelines
Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:
### 1. Correction
**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.
### 2. Warning
**Community Impact**: A violation through a single incident or series
of actions.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.
### 3. Temporary Ban
**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.
### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within
the community.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.
================================================
FILE: CONTRIBUTING.md
================================================
# Contributing to FCL and the Flow JS SDK
The following is a set of guidelines for contributing to FCL and the Flow JS SDK
These are mostly guidelines, not rules.
Use your best judgment, and feel free to propose changes to this document in a pull request.
## Table Of Contents
[Getting Started](#project-overview)
[How Can I Contribute?](#how-can-i-contribute)
- [Reporting Bugs](#reporting-bugs)
- [Suggesting Enhancements](#suggesting-enhancements)
- [Your First Code Contribution](#your-first-code-contribution)
- [Pull Requests](#pull-requests)
- [Building the Repo](#building-the-repo)
- [Release Process](#release-process)
[Styleguides](#styleguides)
- [Git Commit Messages](#git-commit-messages)
- [JavaScript Styleguide](#javascript-styleguide)
[Additional Notes](#additional-notes)
## How Can I Contribute?
### Reporting Bugs
#### Before Submitting A Bug Report
- **Search existing issues** to see if the problem has already been reported.
If it has **and the issue is still open**, add a comment to the existing issue instead of opening a new one.
#### How Do I Submit A (Good) Bug Report?
Explain the problem and include additional details to help maintainers reproduce the problem:
- **Use a clear and descriptive title** for the issue to identify the problem.
- **Describe the exact steps which reproduce the problem** in as many details as possible.
When listing steps, **don't just say what you did, but explain how you did it**.
- **Provide specific examples to demonstrate the steps**.
Include links to files or GitHub projects, or copy/pasteable snippets, which you use in those examples.
If you're providing snippets in the issue,
use [Markdown code blocks](https://help.github.com/articles/markdown-basics/#multiple-lines).
- **Describe the behavior you observed after following the steps** and point out what exactly is the problem with that behavior.
- **Explain which behavior you expected to see instead and why.**
- **Include error messages and stack traces** which show the output / crash and clearly demonstrate the problem.
Provide more context by answering these questions:
- **Can you reliably reproduce the issue?** If not, provide details about how often the problem happens
and under which conditions it normally happens.
Include details about your configuration and environment:
- **What is the version of the Cadence you're using**?
- **What's the name and version of the Operating System you're using**?
### Suggesting Enhancements
#### Before Submitting An Enhancement Suggestion
- **Perform a cursory search** to see if the enhancement has already been suggested.
If it has, add a comment to the existing issue instead of opening a new one.
#### How Do I Submit A (Good) Enhancement Suggestion?
Enhancement suggestions are tracked as [GitHub issues](https://guides.github.com/features/issues/).
Create an issue and provide the following information:
- **Use a clear and descriptive title** for the issue to identify the suggestion.
- **Provide a step-by-step description of the suggested enhancement** in as many details as possible.
- **Provide specific examples to demonstrate the steps**.
Include copy/pasteable snippets which you use in those examples,
as [Markdown code blocks](https://help.github.com/articles/markdown-basics/#multiple-lines).
- **Describe the current behavior** and **explain which behavior you expected to see instead** and why.
- **Explain why this enhancement would be useful** to Cadence users.
### Your First Code Contribution
Unsure where to begin contributing to Cadence?
You can start by looking through these `good-first-issue` and `help-wanted` issues:
- [Good first issues][https://github.com/onflow/cadence/labels/good%20first%20issue]:
issues which should only require a few lines of code, and a test or two.
- [Help wanted issues][https://github.com/onflow/cadence/labels/help%20wanted]:
issues which should be a bit more involved than `good-first-issue` issues.
Both issue lists are sorted by total number of comments.
While not perfect, number of comments is a reasonable proxy for impact a given change will have.
### Pull Requests
The process described here has several goals:
- Maintain code quality
- Fix problems that are important to users
- Engage the community in working toward the best possible Developer/User Experience
- Enable a sustainable system for the Cadence's maintainers to review contributions
Please follow the [styleguides](#styleguides) to have your contribution considered by the maintainers.
Reviewer(s) may ask you to complete additional design work, tests,
or other changes before your pull request can be ultimately accepted.
### Building the Repo
```shell
npm i
npm run build
```
### Release Process
Packages stable versions releases are controlled by [changesets](https://github.com/changesets/changesets) from the `master` branch
#### Creating a changeset
Changesets are used to track changes to the packages in the repository. They are used to generate changelogs and determine the next version of the package.
To create a changeset, run:
```
npx changeset
```
#### Prerelease(alpha)
In order to create an `alpha` (pre-)release
- create a branch with `release-<VERSION>` as a branch name
- run:
```
npm run changeset pre enter alpha
npm run changeset version
npm run changeset publish
```
*NOTE: you need to have an npm account and be a member of [OnFlow organization](https://www.npmjs.com/org/onflow)*
`changeset` commands should preferably be run from the `release` branch and not from feature branches in order to avoid merge conflicts with other feature branches
when the release is ready to be published as stable run from the release branch
```
npm run changeset pre exit
```
and merge `release-<VERSION>` branch to `master`
## Styleguides
### Git Commit Messages
- Use the present tense ("Add feature" not "Added feature")
- Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
- Limit the first line to 72 characters or less
- Reference issues and pull requests liberally after the first line
- Start commits with a 3 character topic
- Topics:
- PKG -- Modified a package (Requires a Changelog Entry)
- DOC -- Modified a some form of documentation
- OPS -- Modified repository tooling/scripts
- VSN -- Changed a version number
- Scope commits to individual packages and include package name in commit message
Format: TOPIC -- [package-name] what is change
Examples:
- OPS -- [root] tests only run once now for ci master branch
- PKG -- [decode] fix issue with using regex for type matching
- DOC -- [root] update readme with emulator instructions
- VSN -- [interaction] 0.0.3 -> 0.0.4
- VSN -- [fcl] 1.5.3 -> 2.0.0 breaking change
- VSN -- [sdk] @onflow/send 0.0.5 -> 0.0.6
### JavaScript Styleguide
Use Prettier with the setting in the root `.prettierrc` file
## Additional Notes
Thank you for your interest in contributing to the FCL and Flow JS SDK
================================================
FILE: LICENSE
================================================
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2019-2021 Dapper Labs, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
================================================
FILE: Makefile
================================================
PACKAGES := ls -d1 packages/*
RUN := xargs -n1 -t
EXEC := $(PACKAGES) | $(RUN)
.PHONY: default
default:
$(info Available Make Commands)
@awk -F: '/^[A-z\-_]+\:/ {print " - make " $$1}' Makefile | sort
.PHONY: all
all: clean install build test
$(info TSK all)
.PHONY: doctor
doctor: clean install build test
$(info TSK: doctor)
.PHONY: clean
clean:
$(info TSK clean)
$(info delete packages/*/node_modules)
$(EXEC) sh -c 'rm -rf $$0/node_modules'
$(info delete packages/*/dist)
$(EXEC) sh -c 'rm -rf $$0/dist'
$(info delete packages/*/types)
$(EXEC) sh -c 'rm -rf $$0/types'
.PHONY: install
install:
$(info TSK: install)
sh -c 'npm ci || exit 255'
.PHONY: build
build:
$(info TSK: build)
sh -c 'npm run build || exit 255'
.PHONY: test
test:
$(info TSK: test)
sh -c 'npm run test || exit 255'
.PHONY: publish
publish:
$(info TSK: publish)
$(info run "npm publish" in packages/*)
$(EXEC) sh -c 'npm publish $$0'
.PHONY: ci
ci: clean install build
$(info TSK: ci)
sh -c 'npm run test -- --ci || exit 255'
sh -c 'npm run prettier:check || exit 255'
================================================
FILE: NOTICE
================================================
Flow
Copyright 2019-2020 Dapper Labs, Inc.
This product includes software developed at Dapper Labs, Inc. (https://www.dapperlabs.com/).
================================================
FILE: README.md
================================================
# fcl-js — Flow Client Library for JavaScript and TypeScript
[](./LICENSE)
[](https://github.com/onflow/fcl-js/releases)
[](https://discord.gg/flow)
[](https://flow.com)
[](https://www.npmjs.com/package/@onflow/fcl)
[](https://github.com/onflow/flow-js-sdk/actions/workflows/integrate.yml)
[](https://lerna.js.org/)
<p align="center">
<i>Connect your dapp to users, their wallets and Flow.</i>
<br />
<br />
<a href="https://developers.flow.com/tutorials/flow-app-quickstart">Quickstart</a>
·
<a href="https://github.com/onflow/fcl-js/issues">Report Bug</a>
·
<a href="https://github.com/onflow/fcl-js/blob/master/CONTRIBUTING.md">Contribute</a>
</p>
## TL;DR
- **What:** FCL (Flow Client Library) in TypeScript and JavaScript. Connect Flow dApps to wallets, send transactions, and read on-chain data from the browser.
- **Who it's for:** JavaScript and TypeScript developers building dApps, wallets, and tools on Flow.
- **Why use it:** Standardized wallet discovery and authentication, Cadence script and transaction execution, and a flexible runtime that works in browser and server environments.
- **Status:** see [Releases](https://github.com/onflow/fcl-js/releases) for the latest version.
- **License:** Apache-2.0.
- **Related repos:** [onflow/flow-go-sdk](https://github.com/onflow/flow-go-sdk) · [onflow/fcl-discovery](https://github.com/onflow/fcl-discovery) · [onflow/fcl-dev-wallet](https://github.com/onflow/fcl-dev-wallet)
- The reference JavaScript/TypeScript client library for the Flow network, open-sourced since 2020.
## 🌟 What is FCL?
The **Flow Client Library (FCL) JS** is a package designed to facilitate interactions between dapps, wallets, and the Flow network. It provides a standardized way for applications to connect with users and their wallets, **eliminating the need for custom integrations**.
### 🔑 Key Features:
- 🔌 **Universal Wallet Support** – Works seamlessly with all FCL-compatible wallets, making authentication simple.
- 🔐 **Secure Authentication** – Standardized authentication flow ensures a smooth user experience.
- ⚡ **Blockchain Interactions** – Enables querying, mutating, and interacting with smart contracts on Flow.
- 🛠️ **Full-Featured Utilities** – Offers built-in functions to streamline blockchain development.
- 🌍 **Flexible Environment** – Can run in both browser and server environments, though wallet interactions are browser-only.
FCL was created to make building Flow-connected applications **easy, secure, and scalable** by defining **standardized communication patterns** between wallets, applications, and users.
For iOS, we also offer [FCL Swift](https://github.com/Outblock/fcl-swift).
---
## Getting Started
### Requirements
- Node version `v12.0.0 or higher`.
### Installation
To use the FCL JS in your application, install using **yarn** or **npm**
```shell
npm i -S @onflow/fcl
```
```shell
yarn add @onflow/fcl
```
#### Importing
**ES6**
```js
import * as fcl from "@onflow/fcl";
```
**Node.js**
```js
const fcl = require("@onflow/fcl");
```
---
## FCL for Dapps
#### Wallet Interactions
- *Wallet Discovery* and *Sign-up/Login*: Onboard users with ease. Never worry about supporting multiple wallets.
Authenticate users with any [FCL compatible wallet](#current-wallet-providers).
```js
// in the browser
import * as fcl from "@onflow/fcl"
fcl.config({
"discovery.wallet": "https://fcl-discovery.onflow.org/testnet/authn", // Endpoint set to Testnet
})
fcl.authenticate()
```

> **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).
- *Interact with smart contracts*: Authorize transactions via the user's chosen wallet
- *Prove ownership of a wallet address*: Signing and verifying user signed data
[Learn more about wallet interactions >](https://developers.flow.com/tooling/fcl-js/api#wallet-interactions)
#### Blockchain Interactions
- *Query the chain*: Send arbitrary Cadence scripts to the chain and receive back decoded values
```js
import * as fcl from "@onflow/fcl";
const result = await fcl.query({
cadence: `
access(all) fun main(a: Int, b: Int, addr: Address): Int {
log(addr)
return a + b
}
`,
args: (arg, t) => [
arg(7, t.Int), // a: Int
arg(6, t.Int), // b: Int
arg("0xba1132bc08f82fe2", t.Address), // addr: Address
],
});
console.log(result); // 13
```
- *Mutate the chain*: Send arbitrary transactions with your own signatures or via a user's wallet to perform state changes on chain.
> **Note:** The Cadence snippet below uses pre-1.0 syntax (`AuthAccount`, `account.borrow`, private paths). Cadence 1.0 replaced these with `auth(...) &Account`, `account.storage.borrow`, and storage-only paths. This example has not yet been updated — refer to the [Cadence migration guide](https://cadence-lang.org/docs/cadence-migration-guide) when writing new transactions.
```js
import * as fcl from "@onflow/fcl";
// in the browser, FCL will automatically connect to the user's wallet to request signatures to run the transaction
const txId = await fcl.mutate({
cadence: `
import Profile from 0xba1132bc08f82fe2
transaction(name: String) {
prepare(account: AuthAccount) {
account.borrow<&{Profile.Owner}>(from: Profile.privatePath)!.setName(name)
}
}
`,
args: (arg, t) => [arg("myName", t.String)],
});
```
[Learn more about on-chain interactions >](https://developers.flow.com/tooling/fcl-js/api#on-chain-interactions)
#### Utilities
- Get account details from any Flow address
- Get the latest block
- Transaction status polling
- Event polling
- Custom authorization functions
[Learn more about utilities >](https://developers.flow.com/tooling/fcl-js/api#pre-built-interactions)
## Typescript Support
FCL JS supports TypeScript. If you need to import specific types, you can do so via the [@onflow/typedefs](./packages/typedefs/README.md) package.
```typescript
import {CurrentUser} from "@onflow/typedefs"
const newUser: CurrentUser = {
addr: null,
cid: null,
expiresAt: null,
f_type: 'User',
f_vsn: '1.0.0',
loggedIn: null,
services: []
}
```
For all type definitions available, see [this file](./packages/typedefs/src/index.ts)
## Next Steps
- See the [Flow App Quick Start](https://developers.flow.com/build/getting-started/fcl-quickstart).
- See the full [API Reference](https://developers.flow.com/tools/clients/fcl-js/api) for all FCL functionality.
- Learn Cadence — the smart contract language for Flow — to build scripts and transactions: [Cadence](https://cadence-lang.org).
- Explore all of Flow [docs and tools](https://developers.flow.com).
## Development & Testing
### Internal Demo App
A lightweight demo application is available for testing FCL and Kit packages during development:
```bash
# Build all packages
npm run build
# Start the demo
npm run demo
```
The demo provides:
- **Hot Reload**: Instant feedback for code changes
- **Focused Testing**: Clean interface for testing authentication, queries, and transactions
- **Debug Tools**: Real-time inspection of FCL state and responses
- **Lightweight**: Vite-based setup for fast iteration
- **Workspace Integration**: Proper Lerna workspace setup with automatic symlinks
See [`packages/demo/README.md`](./packages/demo/README.md) for detailed usage instructions.
---
## FCL for Wallet Providers
Wallet providers on Flow have the flexibility to build their user interactions and UI through a variety of ways:
- Front channel communication via Iframe, pop-up, tab, or extension
- Back channel communication via HTTP
FCL 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.
The 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.
### Current Wallet Providers
- [Flow Wallet](https://wallet.flow.com/)
- [NuFi Wallet](https://nu.fi/)
- [Blocto](https://blocto.portto.io/en/)
- [Ledger](https://ledger.com) (limited transaction support)
- [Dapper Wallet](https://www.meetdapper.com/) (beta access - general availability coming soon)
### Wallet Discovery
It 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:
- Dapps can display and support all FCL compatible wallets that launch on Flow without needing to change any code
- 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.
The 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.
> Note: To get your wallet added to the discovery service, make a PR in [fcl-discovery](https://github.com/onflow/fcl-discovery).
### Building a FCL compatible wallet
- 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.
- Review the architecture of the [FCL dev wallet](https://github.com/onflow/fcl-dev-wallet) for an overview.
- 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.
---
## 🛠 Want to Use the Flow SDK Directly?
If 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 the Flow Access API for sending transactions, executing scripts, and managing accounts.
FCL 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.
## Support
- Notice a problem or want to request a feature? [Add an issue](https://github.com/onflow/fcl-js/issues).
- Join the Flow community on [Discord](https://discord.gg/flow) to keep up to date and to talk to the team.
- Read the [Contributing Guide](./CONTRIBUTING.md) to learn how to contribute to the project.
## FAQ
**What is FCL?**
FCL (Flow Client Library) is a JavaScript and TypeScript package that standardizes how dApps connect to wallets and interact with the Flow network. It handles wallet discovery, authentication, transaction signing, and Cadence script execution.
**How is FCL different from the Flow JavaScript SDK?**
FCL is built on top of the Flow JavaScript SDK (`@onflow/sdk`). FCL adds wallet interactions, discovery, and higher-level helpers. If you prefer to interact with Flow at a lower level without wallet integrations, you can use the SDK directly.
**Which environments does FCL run in?**
FCL can run in both browser and server environments. Wallet interactions are browser-only; server-side usage is supported for queries, transactions signed with custom authorizers, and account utilities.
**Does FCL support TypeScript?**
Yes. Types are available in the [`@onflow/typedefs`](./packages/typedefs) package and exported from the main FCL packages.
**What wallets does FCL support?**
FCL works with any FCL-compatible wallet, including Flow Wallet, NuFi, Blocto, Ledger, and Dapper Wallet. Discovery is provided via the [wallet discovery service](https://github.com/onflow/fcl-discovery).
**Can I use FCL with Flow EVM?**
Yes. The repo includes adapters for [RainbowKit](./packages/fcl-rainbowkit-adapter) and [Wagmi](./packages/fcl-wagmi-adapter), plus an [EIP-1193 Ethereum provider](./packages/fcl-ethereum-provider) backed by FCL.
**Where do I report bugs or request features?**
Open an issue at [github.com/onflow/fcl-js/issues](https://github.com/onflow/fcl-js/issues) or start a conversation on the [Flow Forum](https://forum.flow.com).
## About Flow
This repo is part of the [Flow network](https://flow.com), a Layer 1 blockchain built for consumer applications, AI Agents, and DeFi at scale.
- Developer docs: https://developers.flow.com
- Cadence language: https://cadence-lang.org
- Community: [Flow Discord](https://discord.gg/flow) · [Flow Forum](https://forum.flow.com)
- Governance: [Flow Improvement Proposals](https://github.com/onflow/flips)
================================================
FILE: SECURITY.md
================================================
# Responsible Disclosure Policy
Flow was built from the ground up with security in mind. Our code, infrastructure, and development methodology helps us keep our users safe.
We really appreciate the community's help. Responsible disclosure of vulnerabilities helps to maintain the security and privacy of everyone.
If you care about making a difference, please follow the guidelines below.
# **Guidelines For Responsible Disclosure**
We ask that all researchers adhere to these guidelines [here](https://flow.com/flow-responsible-disclosure).
================================================
FILE: docs/flow-docs.json
================================================
{
"$schema": "https://developers.flow.com/schemas/flow-docs.json",
"displayName": "Flow Client Library (JS)",
"headers": {
"": {
"icon": "fcl-js",
"title": "Flow Client Library",
"description": "The Flow Client Library (FCL) JS is a package used to interact with user wallets and the Flow blockchain enabling dapps to support all FCL-compatible wallets and users without any custom integrations to the dapp code",
"headerCards": [
{
"title": "Installation",
"tags": ["setup", "guide"],
"description": "Set up your local environment and install the necessary dependencies to start using FCL",
"href": "/tools/fcl-js#getting-started"
},
{
"title": "Flow App Quickstart",
"tags": ["tutorial", "dapp"],
"description": "A tutorial that will allow you to start building with web3 on the Flow blockchain and FCL",
"href": "/tools/fcl-js/tutorials/flow-app-quickstart"
},
{
"title": "Wallet Discovery",
"tags": ["wallets", "reference"],
"description": "Learn more about integrating Flow compatible wallets with your dapp",
"href": "/tools/fcl-js/reference/discovery"
}
]
}
},
"sidebars": {
"": [
{
"title": "Flow Client Library JS",
"items": [
{
"title": "Introduction",
"href": ""
}
]
},
{
"title": "Tutorials",
"items": [
{
"title": "Flow App Quickstart",
"href": "tutorials/flow-app-quickstart"
}
]
},
{
"title": "Reference",
"items": [
{
"title": "API",
"href": "reference/api"
},
{
"title": "Authentication",
"href": "reference/authentication"
},
{
"title": "Configuring FCL",
"href": "reference/configure-fcl"
},
{
"title": "Discovery",
"href": "reference/discovery"
},
{
"title": "Interaction Templates",
"href": "reference/interaction-templates"
},
{
"title": "Proving Authentication",
"href": "reference/proving-authentication"
},
{
"title": "Scripts",
"href": "reference/scripts"
},
{
"title": "SDK Guidelines",
"href": "reference/sdk-guidelines"
},
{
"title": "Transactions",
"href": "reference/transactions"
},
{
"title": "User Signatures",
"href": "reference/user-signatures"
},
{
"title": "Add FCL Support for WalletConnect 2.0",
"href": "reference/wallet-connect"
}
]
}
]
}
}
================================================
FILE: docs/index.md
================================================
# This document has been moved to a new location:
https://github.com/onflow/docs/tree/main/docs/tooling/fcl-js/index.md
================================================
FILE: docs/index.mdx
================================================
# This document has been moved to a new location:
https://github.com/onflow/docs/tree/main/docs/tooling/fcl-js/index.mdx.txt
================================================
FILE: docs/reference/api.md
================================================
# This document has been moved to a new location:
https://github.com/onflow/docs/tree/main/docs/tooling/fcl-js/api.md
================================================
FILE: docs/reference/authentication.mdx
================================================
# This document has been moved to a new location:
https://github.com/onflow/docs/tree/main/docs/tooling/fcl-js/authentication.mdx
================================================
FILE: docs/reference/configure-fcl.mdx
================================================
# This document has been moved to a new location:
https://github.com/onflow/docs/tree/main/docs/tooling/fcl-js/configure-fcl.mdx
================================================
FILE: docs/reference/discovery.mdx
================================================
# This document has been moved to a new location:
https://github.com/onflow/docs/tree/main/docs/tooling/fcl-js/discovery.mdx
================================================
FILE: docs/reference/installation.mdx
================================================
# This document has been moved to a new location:
https://github.com/onflow/docs/tree/main/docs/tooling/fcl-js/installation.mdx
================================================
FILE: docs/reference/interaction-templates.mdx
================================================
# This document has been moved to a new location:
https://github.com/onflow/docs/tree/main/docs/tooling/fcl-js/interaction-templates.mdx
================================================
FILE: docs/reference/proving-authentication.mdx
================================================
# This document has been moved to a new location:
https://github.com/onflow/docs/tree/main/docs/tooling/fcl-js/proving-authentication.mdx
================================================
FILE: docs/reference/scripts.mdx
================================================
# This document has been moved to a new location:
https://github.com/onflow/docs/tree/main/docs/tooling/fcl-js/scripts.mdx
================================================
FILE: docs/reference/sdk-guidelines.mdx
================================================
# This document has been moved to a new location:
https://github.com/onflow/docs/tree/main/docs/tooling/fcl-js/sdk-guidelines.mdx
================================================
FILE: docs/reference/transactions.mdx
================================================
# This document has been moved to a new location:
https://github.com/onflow/docs/tree/main/docs/tooling/fcl-js/transactions.mdx
================================================
FILE: docs/reference/user-signatures.mdx
================================================
# This document has been moved to a new location:
https://github.com/onflow/docs/tree/main/docs/tooling/fcl-js/user-signatures.mdx
================================================
FILE: docs/reference/wallet-connect.mdx
================================================
# This document has been moved to a new location:
https://github.com/onflow/docs/tree/main/docs/tooling/fcl-js/wallet-connect.mdx
================================================
FILE: docs/tutorials/flow-app-quickstart.mdx
================================================
# This document has been moved to a new location:
https://github.com/onflow/docs/tree/main/docs/tutorials/flow-app-quickstart.mdx
================================================
FILE: docs-generator/README.md
================================================
# Docs Generator
This directory contains scripts to generate documentation for Flow Client Library (FCL) packages.
## Overview
The documentation generator creates Markdown files for Docusaurus v2 websites. It automatically extracts TypeScript function signatures, parameter types, return types, and JSDoc comments to create comprehensive API documentation.
## Directory Structure
- `generate-docs.js` - Main script for generating documentation for a single package
- `generate-all-docs.js` - Script to generate documentation for all packages with the generate-docs script
- `templates/` - Handlebars templates for generating documentation pages
- `output/` - Where generated files are created
- `generators/` - Function utils to generate pages from templates and data
## Features
- Automatic discovery of packages with generate-docs scripts
- Support for JSDoc comments including function descriptions, parameter info, and usage examples
- Handlebars templates for easy customization of output format
- Consistent documentation structure across all packages
- Package index page listing all available packages
- Core types documentation from the @onflow/typedefs package
### JSDoc Support
The documentation generator extracts information from JSDoc comments in code. JSDoc comments can be added to improve the generated documentation:
```javascript
/**
* This description will be used in the documentation.
*
* @param {string} param1 - This description will be used for the parameter
* @returns {number} This description will be used for the return value
* @example
* // This example will be used in the documentation
* const result = myFunction("test")
*/
export function myFunction(param1) {
// ...
}
```
## Usage
### For Individual Packages
Each package that needs documentation should include a `generate-docs` script in its `package.json`:
```json
{
"scripts": {
"generate-docs": "node ../../docs-generator/generate-docs.js"
}
}
```
To generate documentation for a single package, run:
```bash
cd packages/<package-name>
npm run generate-docs
```
### For All Packages
To generate documentation for all packages that have a `generate-docs` script:
```bash
npm run generate-docs-all
```
This will:
1. Find all packages with a `generate-docs` script
2. Run the script for each package
3. Generate documentation in the `/docs-generator/output/packages-docs/<package-name>` directory
4. Generate core types documentation in `/docs-generator/output/packages-docs/types/index.md`
## Output Structure
The generated documentation follows this structure:
```
/docs-generator/output/
└── packages-docs/ # Main folder containing
├── package-a/ # Documentation for package-a
│ ├── index.md # Main package page with installation instructions and API
│ ├── functionName1.md
│ ├── functionName2.md
│ └── ...
├── package-b/
├── types/
│ └── index.md # Type definitions page with interfaces, type aliases, and enums
└── index.md # List contents of the folder
```
Each package has a main page that includes:
- Package overview
- Installation instructions
- API reference with links to individual function documentation
### Auto-generation Notes
All generated files are automatically generated from the source code of FCL packages and are ignored by git (except this README).
Do not modify these files directly as they will be overwritten when documentation is regenerated.
Instead:
- Update the JSDoc comments in the source code
- Customize the templates in `docs-generator/templates/`
- Create a `docs-generator.config.js` file in the package root for custom content
## Customizing Templates
You can customize the generated documentation by editing the Handlebars templates in the `templates/` directory.
### Custom Package Documentation
Packages can provide custom documentation content by creating a `docs-generator.config.js` file in the package root directory. The following customizations are supported:
```js
module.exports = {
customData: {
displayName: `Custom Package Reference`, // Used for Docusaurus sidebar title
sections: {
overview: ``, // Custom overview section
requirements: ``, // Custom requirements section
importing: ``, // Custom importing section
},
extra: ``, // Additional content
},
};
```
All properties in the configuration are optional. If a property is not specified, default values will be used.
## Adding Documentation to a New Package
To add documentation generation to a new package:
1. Add the generate-docs script to the package's `package.json`:
```json
{
"scripts": {
"generate-docs": "node ../../docs-generator/generate-docs.js"
}
}
```
2. Ensure the code has proper JSDoc comments for better documentation.
3. Run the generate-docs script to test it.
This package will now be included when running the `generate-docs-all` command.
## Core Types Documentation
The generator also creates documentation for all types, interfaces, and enums exported from the `@onflow/typedefs` package. This documentation is generated every time you run the generate-docs script for any package, ensuring that the types documentation is always up-to-date.
The types documentation in the `types` directory includes:
- **Interfaces** - Documented with their properties and methods
- **Types** - Documented with their underlying types
- **Enums** - Documented with all their members and values
All type documentation includes JSDoc descriptions when available.
## Integration with Documentation Projects
After generating documentation, copy the `output/packages-docs` directory to the documentation project. This will maintain the folder structure and allow the documentation build system to process the files.
## Notes
- Avoid relative path linking outside of packages-docs folder to avoid docusaurus linking problems. Use only packages-docs relative links or absolute paths.
- If adding an example to a jsdoc, avoid adding backticks, it will be directly embedded into typescript backticks on pages generation.
- Don't use multiple @returns in jsdocs, they are not supported.
================================================
FILE: docs-generator/generate-all-docs.js
================================================
const fs = require("fs")
const path = require("path")
const {execSync} = require("child_process")
async function main() {
try {
// Get packages source directory
const sourcePackagesDir = path.resolve(__dirname, "../packages")
// Find packages with generate-docs script
console.log(`Scanning for packages in ${sourcePackagesDir}`)
const packages =
fs.readdirSync(sourcePackagesDir).filter(name => {
try {
const itemPath = path.join(sourcePackagesDir, name)
// Check if it's a directory first
if (!fs.statSync(itemPath).isDirectory()) {
return false
}
const packageJsonPath = path.join(
sourcePackagesDir,
name,
"package.json"
)
const packageJson = JSON.parse(
fs.readFileSync(packageJsonPath, "utf8")
)
return packageJson.scripts && packageJson.scripts["generate-docs"]
} catch (error) {
console.warn(`Error checking package ${name}: ${error.message}`)
return false
}
}) || []
if (packages.length === 0) {
console.warn("No packages with generate-docs script were found.")
return
}
console.log(`Found ${packages.length} packages with generate-docs script:`)
packages.forEach(pkg => console.log(`- ${pkg}`))
// Navigate to the package directory and run the generate-docs script
for (const pkg of packages) {
const pkgDir = path.join(sourcePackagesDir, pkg)
execSync(`cd ${pkgDir} && npm run generate-docs`, {
stdio: "inherit",
env: {...process.env},
})
console.log("")
}
// Report results
console.log(`All docs correctly generated.`)
} catch (error) {
console.error("Error:")
console.error(error.message || error)
process.exit(1)
}
}
main().catch(error => {
console.error("Unhandled error:")
console.error(error.message || error)
process.exit(1)
})
================================================
FILE: docs-generator/generate-docs.js
================================================
const fs = require("fs")
const path = require("path")
const {Project} = require("ts-morph")
const Handlebars = require("handlebars")
const {
generateRootPage,
generatePackagePage,
generateFunctionPage,
generateTypesPage,
generateNamespacePage,
} = require("./generators")
const {
discoverWorkspacePackages,
extractExportsFromEntryFile,
} = require("./utils")
async function main() {
try {
// Extract package name from the name field of the package where the command is run (@onflow/fcl -> fcl)
const packageJson = JSON.parse(
fs.readFileSync(path.resolve(process.cwd(), "package.json"), "utf8")
)
const packageName = packageJson.name.split("/").pop()
console.log(`Generating docs for ${packageName}...`)
// Get the entry file from package.json source field
const entryFile = packageJson.source || ""
const ENTRY_FILE_PATH = path.resolve(process.cwd(), entryFile)
// Configuration with updated directory structure
const TEMPLATES_DIR = path.resolve(__dirname, "./templates")
const OUTPUT_DIR = path.resolve(__dirname, "./output")
const ROOT_DIR = path.join(OUTPUT_DIR, "packages-docs")
const PACKAGE_DIR = path.join(ROOT_DIR, packageName)
const TYPES_DIR = path.join(ROOT_DIR, "types")
// Ensure output directories exist
await fs.promises.mkdir(OUTPUT_DIR, {recursive: true})
await fs.promises.mkdir(ROOT_DIR, {recursive: true})
// Clean existing output directory content for the package before creating its folder
await fs.promises.rm(PACKAGE_DIR, {recursive: true, force: true})
await fs.promises.mkdir(PACKAGE_DIR, {recursive: true})
await fs.promises.mkdir(TYPES_DIR, {recursive: true})
// Handlebars templates to be used for generating the docs
const templates = {
root: Handlebars.compile(
fs.readFileSync(path.join(TEMPLATES_DIR, "root.hbs"), "utf8")
),
package: Handlebars.compile(
fs.readFileSync(path.join(TEMPLATES_DIR, "package.hbs"), "utf8")
),
function: Handlebars.compile(
fs.readFileSync(path.join(TEMPLATES_DIR, "function.hbs"), "utf8")
),
types: Handlebars.compile(
fs.readFileSync(path.join(TEMPLATES_DIR, "types.hbs"), "utf8")
),
namespace: Handlebars.compile(
fs.readFileSync(path.join(TEMPLATES_DIR, "namespace.hbs"), "utf8")
),
}
// Initialize ts-morph project and add source files
const project = new Project({
skipAddingFilesFromTsConfig: true,
})
// Add the entry file
project.addSourceFileAtPath(ENTRY_FILE_PATH)
// Automatically discover and add all workspace packages for resolving imports
const workspacePackagePaths = discoverWorkspacePackages()
for (const packagePath of workspacePackagePaths) {
try {
project.addSourceFilesAtPaths(packagePath)
} catch (e) {
console.warn(
`Could not add source files from ${packagePath}: ${e.message}`
)
}
}
// Get the entry source file and extract exports from it
const entrySourceFile = project.getSourceFile(ENTRY_FILE_PATH)
const {functions, namespaces} = extractExportsFromEntryFile(entrySourceFile)
console.log(
`Found ${functions.length} functions and ${namespaces.length} namespaces`
)
// Collect all namespace functions for the package index
let allNamespaceFunctions = []
namespaces.forEach(namespace => {
allNamespaceFunctions = allNamespaceFunctions.concat(namespace.functions)
})
// Generate documentation
generateRootPage(templates, ROOT_DIR, packageName)
generatePackagePage(
templates,
PACKAGE_DIR,
packageName,
functions,
namespaces,
allNamespaceFunctions
)
// Generate function pages for regular functions only
functions.forEach(func => {
generateFunctionPage(templates, PACKAGE_DIR, packageName, func)
})
// Generate single namespace pages (no individual function pages)
namespaces.forEach(namespace => {
generateNamespacePage(templates, PACKAGE_DIR, packageName, namespace)
})
// Generate the types documentation
generateTypesPage(templates, TYPES_DIR)
console.log(`Docs generated correctly for ${packageName}.`)
return true
} catch (error) {
console.error("Error generating docs:")
console.error(error.message)
return false
}
}
main().catch(error => {
console.error("Unhandled error:")
console.error(error.message || error)
process.exit(1)
})
================================================
FILE: docs-generator/generators/generate-function-page.js
================================================
const path = require("path")
const {Project} = require("ts-morph")
const fs = require("fs")
const {generatePage, getFirstWord} = require("./utils")
const {stripGenericParams} = require("../utils/type-utils")
const {formatTypeScript} = require("../utils/typescript-formatter")
// Cache for type structures to avoid repeated processing
const typeStructureCache = new Map()
function getGenericTypeStructure(baseTypeName, packageName, sourceFilePath) {
// Input validation
if (!baseTypeName || typeof baseTypeName !== "string") {
return null
}
// Check cache first
const cacheKey = `${packageName}:${baseTypeName}`
if (typeStructureCache.has(cacheKey)) {
return typeStructureCache.get(cacheKey)
}
let result = null
try {
const project = new Project({skipAddingFilesFromTsConfig: true})
// Only add necessary source files
const sourcePaths = []
if (sourceFilePath) {
const fullSourcePath = path.resolve(process.cwd(), "../", sourceFilePath)
if (fs.existsSync(fullSourcePath)) {
sourcePaths.push(fullSourcePath)
}
}
if (packageName) {
const packageSrcDir = path.resolve(
process.cwd(),
"../",
packageName,
"src"
)
if (fs.existsSync(packageSrcDir)) {
sourcePaths.push(`${packageSrcDir}/**/*.ts`)
}
}
// Add source files in batch
if (sourcePaths.length > 0) {
try {
project.addSourceFilesAtPaths(sourcePaths)
} catch (e) {
// If batch add fails, try individually
sourcePaths.forEach(sourcePath => {
try {
if (!sourcePath.includes("*")) {
project.addSourceFileAtPath(sourcePath)
} else {
project.addSourceFilesAtPaths(sourcePath)
}
} catch (e) {
// Skip problematic source paths
}
})
}
}
// Find the type definition efficiently
const sourceFiles = project.getSourceFiles()
for (const sourceFile of sourceFiles) {
const typeAlias = sourceFile.getTypeAlias(baseTypeName)
if (typeAlias) {
result = extractTypeStructure(typeAlias)
if (result) break // Stop on first successful extraction
}
}
} catch (e) {
// Fail silently to avoid breaking the docs generation
}
// Cache the result (including null results to avoid repeated failures)
typeStructureCache.set(cacheKey, result)
return result
}
function extractTypeStructure(typeAlias) {
try {
const typeNode = typeAlias.getTypeNode()
if (!typeNode || typeof typeNode.getProperties !== "function") {
return null
}
const properties = typeNode.getProperties()
if (properties.length === 0) {
return null
}
const structure = {}
for (const prop of properties) {
try {
const propName = prop.getName()
if (!propName) continue
const propType = prop.getType()
const cleanPropType = propType
? extractTypeName(propType.getText())
: "unknown"
// Get JSDoc comments efficiently
let propDescription = ""
const jsDocComments = prop.getJsDocs()
if (jsDocComments?.length > 0) {
propDescription = jsDocComments[0].getDescription()?.trim() || ""
}
structure[propName] = {
type: cleanPropType,
description: propDescription,
optional: prop.hasQuestionToken?.() || false,
}
} catch (e) {
// Skip problematic properties but continue processing others
continue
}
}
return Object.keys(structure).length > 0 ? structure : null
} catch (e) {
return null
}
}
// Basic primitive types that don't need definitions
const PRIMITIVE_TYPES = new Set([
"string",
"number",
"boolean",
"object",
"any",
"void",
"unknown",
"never",
"null",
"undefined",
])
// Cache for type definitions and core types to avoid repeated lookups
const typeCache = new Map()
const coreTypesCache = new Set()
let hasLoadedCoreTypes = false
// Function to escape MDX-sensitive characters in example code
function escapeMDXCharacters(text) {
if (!text) return text
// Handle already escaped curly braces by converting them to inline code
// This pattern matches things like A.\{AccountAddress\}.\{ContractName\}.\{EventName\}
text = text.replace(/A\.\\{[^}]+\\}\.\\{[^}]+\\}\.\\{[^}]+\\}/g, match => {
// Remove the backslashes and wrap in backticks
const cleanMatch = match.replace(/\\/g, "")
return `\`${cleanMatch}\``
})
// Handle other patterns of escaped curly braces by converting to inline code
text = text.replace(/\\{[^}]+\\}/g, match => {
// Remove the backslashes and wrap in backticks
const cleanMatch = match.replace(/\\/g, "")
return `\`${cleanMatch}\``
})
// Split text by both multi-line code blocks (triple backticks) and inline code (single backticks)
// This regex captures both patterns while preserving them
const parts = text.split(/(```[\s\S]*?```|`[^`\n]*`)/g)
return parts
.map((part, index) => {
// Check if this part is a code block (either multi-line or inline)
const isCodeBlock =
part.startsWith("```") ||
(part.startsWith("`") && part.endsWith("`") && !part.includes("\n"))
if (isCodeBlock) {
// Don't escape anything inside code blocks (both multi-line and inline)
return part
} else {
// Escape curly braces only outside code blocks
return part.replace(/(?<!\\)\{/g, "\\{").replace(/(?<!\\)\}/g, "\\}")
}
})
.join("")
}
function extractCoreTypes() {
if (hasLoadedCoreTypes) return coreTypesCache
try {
const typedefsSrcDir = path.join(
path.resolve(process.cwd(), "../typedefs"),
"src"
)
const project = new Project({skipAddingFilesFromTsConfig: true})
project.addSourceFilesAtPaths(`${typedefsSrcDir}/**/*.ts`)
project.getSourceFiles().forEach(sourceFile => {
sourceFile.getInterfaces().forEach(iface => {
if (iface.isExported()) coreTypesCache.add(iface.getName())
})
sourceFile.getTypeAliases().forEach(typeAlias => {
if (typeAlias.isExported()) coreTypesCache.add(typeAlias.getName())
})
sourceFile.getEnums().forEach(enumDef => {
if (enumDef.isExported()) coreTypesCache.add(enumDef.getName())
})
})
hasLoadedCoreTypes = true
return coreTypesCache
} catch (error) {
console.warn(`Error extracting core types: ${error.message}`)
return new Set()
}
}
function extractTypeName(fullType) {
if (!fullType) return fullType
// Clean up import references and comments
let cleanType = fullType
.replace(/import\([^)]+\)\./g, "")
.replace(/\/\*[\s\S]*?\*\//g, "")
.trim()
// For union types, preserve the structure
if (cleanType.includes("|")) {
return cleanType
}
// For simple types without complex structures
if (
!cleanType.includes("Promise<") &&
!cleanType.includes("=>") &&
!cleanType.includes("{")
) {
return cleanType
}
// Handle Promise types
if (cleanType.startsWith("Promise<")) {
const innerType = cleanType.match(/Promise<(.+)>/)
if (innerType && innerType[1]) {
return `Promise<${extractTypeName(innerType[1])}>`
}
}
// Handle function types
if (cleanType.includes("=>")) {
return cleanType
}
// Handle array types
if (cleanType.endsWith("[]")) {
return `${extractTypeName(cleanType.slice(0, -2))}[]`
}
// Handle complex objects - return as is for now
if (cleanType.includes("{") && cleanType.includes("}")) {
return cleanType
}
return cleanType
}
// Check if a type name exists in the typedefs package
function isTypeInTypedefs(typeName, coreTypes) {
// Handle Promise<Type> - extract the inner type
if (typeName.startsWith("Promise<") && typeName.endsWith(">")) {
const innerType = typeName.slice(8, -1).trim() // Remove Promise< and >
return coreTypes.has(innerType)
}
// Handle Array types - extract the base type
if (typeName.endsWith("[]")) {
const baseType = typeName.slice(0, -2).trim()
return coreTypes.has(baseType)
}
// Handle union types - check if any part is in typedefs
if (typeName.includes("|")) {
const types = typeName.split("|").map(t => t.trim())
return types.some(t => coreTypes.has(t))
}
return coreTypes.has(typeName)
}
// Check if a type is non-primitive (interface, type alias, or arrow function)
function isNonPrimitiveType(typeString) {
if (!typeString || PRIMITIVE_TYPES.has(typeString)) {
return false
}
// Remove whitespace for better pattern matching
const cleanType = typeString.trim()
// Function types (arrow functions)
if (cleanType.includes("=>")) {
return true
}
// Object types with properties (inline object types)
if (cleanType.includes("{") && cleanType.includes(":")) {
return true
}
// Complex union types (more than just primitive types)
if (cleanType.includes("|")) {
const unionTypes = cleanType.split("|").map(t => t.trim())
// If any part of the union is not primitive, show definition
const hasNonPrimitive = unionTypes.some(
t =>
!PRIMITIVE_TYPES.has(t) &&
!t.match(/^(null|undefined)$/) &&
(t.match(/^[A-Z][a-zA-Z0-9]*$/) || t.includes("=>") || t.includes("{"))
)
if (hasNonPrimitive) return true
}
// Generic types like Promise<SomeType>, Array<CustomType>, etc.
if (cleanType.includes("<") && cleanType.includes(">")) {
// Extract the inner type from generics
const genericMatch = cleanType.match(
/^([A-Za-z][a-zA-Z0-9]*)<(.+)>(\[\])?$/
)
if (genericMatch) {
const [, outerType, innerType] = genericMatch
// If outer type is Promise, Array, etc., check if inner type is non-primitive
if (["Promise", "Array"].includes(outerType)) {
return isNonPrimitiveType(innerType.trim())
}
// For other generic types, if the outer type starts with uppercase, it's likely custom
if (/^[A-Z]/.test(outerType)) {
return true
}
}
return true // Any other generic type is likely non-primitive
}
// Tuple types
if (
cleanType.startsWith("[") &&
cleanType.endsWith("]") &&
cleanType.includes(",")
) {
return true
}
// Mapped types or conditional types
if (
cleanType.includes("keyof") ||
cleanType.includes("extends") ||
cleanType.includes("infer")
) {
return true
}
// Array types with custom base types
if (cleanType.endsWith("[]")) {
const baseType = cleanType.slice(0, -2).trim()
return isNonPrimitiveType(baseType)
}
// Custom type names (PascalCase starting with uppercase)
if (/^[A-Z][a-zA-Z0-9]*$/.test(cleanType)) {
return true
}
// Type names with namespaces (e.g., FCL.SomeType)
if (/^[A-Z][a-zA-Z0-9]*\.[A-Z][a-zA-Z0-9]*$/.test(cleanType)) {
return true
}
// Function types in different formats
if (cleanType.match(/^\(.+\)\s*=>/)) {
return true
}
// Constructor types
if (cleanType.startsWith("new ") && cleanType.includes("=>")) {
return true
}
return false
}
function extractTypeDefinition(sourceFile, node) {
if (!node) return null
const text = sourceFile.getFullText().substring(node.getPos(), node.getEnd())
// Remove comments and extra whitespace
return text
.replace(/^[\r\n\s]+/, "") // Trim leading whitespace
.replace(/[\r\n\s]+$/, "") // Trim trailing whitespace
.replace(/\/\*\*[\s\S]*?\*\//g, "") // Remove JSDoc comments
.replace(/\/\*[\s\S]*?\*\//g, "") // Remove multi-line comments
.replace(/\/\/.*$/gm, "") // Remove single-line comments
.replace(/\n\s*\n+/g, "\n") // Replace multiple blank lines with a single one
.trim()
}
function findTypeInFile(sourceFile, typeName) {
// Check for interface
const iface = sourceFile.getInterface(typeName)
if (iface) return extractTypeDefinition(sourceFile, iface)
// Check for type alias
const typeAlias = sourceFile.getTypeAlias(typeName)
if (typeAlias) return extractTypeDefinition(sourceFile, typeAlias)
// Check for enum
const enumDef = sourceFile.getEnum(typeName)
if (enumDef) return extractTypeDefinition(sourceFile, enumDef)
return null
}
function getTypeDefinition(typeName, packageName, sourceFilePath) {
if (!typeName || PRIMITIVE_TYPES.has(typeName)) {
return null
}
// Handle Promise and array types - extract base type
let baseTypeName = typeName
if (baseTypeName.startsWith("Promise<")) {
const match = baseTypeName.match(/Promise<(.+)>/)
if (match) baseTypeName = match[1]
}
if (baseTypeName.endsWith("[]")) {
baseTypeName = baseTypeName.slice(0, -2)
}
// Check cache first
const cacheKey = `${packageName}:${baseTypeName}`
if (typeCache.has(cacheKey)) {
return typeCache.get(cacheKey)
}
let definition = null
try {
// Create a new project for type searching to avoid conflicts
const project = new Project({skipAddingFilesFromTsConfig: true})
// First check source file if provided
if (sourceFilePath) {
const fullSourcePath = path.resolve(process.cwd(), "../", sourceFilePath)
if (fs.existsSync(fullSourcePath)) {
const sourceFile = project.addSourceFileAtPath(fullSourcePath)
definition = findTypeInFile(sourceFile, baseTypeName)
// If not found in the source file, check its imports and re-exports
if (!definition) {
definition = searchTypeInImports(sourceFile, baseTypeName, project)
}
}
}
// If not found, search package src directory
if (!definition) {
const packageSrcDir = path.resolve(
process.cwd(),
"../",
packageName,
"src"
)
if (fs.existsSync(packageSrcDir)) {
// Add all TypeScript files in the package
project.addSourceFilesAtPaths(`${packageSrcDir}/**/*.ts`)
// Search through all source files in the package
for (const sourceFile of project.getSourceFiles()) {
definition = findTypeInFile(sourceFile, baseTypeName)
if (definition) break
}
}
}
// If still not found, search in common Flow workspace packages
if (!definition) {
definition = searchTypeInWorkspacePackages(baseTypeName, project)
}
// Cache the result
typeCache.set(cacheKey, definition)
return definition
} catch (error) {
console.warn(
`Error getting type definition for ${typeName}: ${error.message}`
)
return null
}
}
// Helper function to search for types in imports and re-exports
function searchTypeInImports(sourceFile, typeName, project) {
try {
// Check import declarations
const importDeclarations = sourceFile.getImportDeclarations()
for (const importDecl of importDeclarations) {
const namedImports = importDecl.getNamedImports()
const hasImport = namedImports.some(
namedImport => namedImport.getName() === typeName
)
if (hasImport) {
const moduleSpecifier = importDecl.getModuleSpecifier()
if (moduleSpecifier) {
const moduleSpecValue = moduleSpecifier.getLiteralValue()
const resolvedFile = resolveImportPath(
sourceFile,
moduleSpecValue,
project
)
if (resolvedFile) {
const definition = findTypeInFile(resolvedFile, typeName)
if (definition) return definition
}
}
}
}
// Check export declarations (re-exports)
const exportDeclarations = sourceFile.getExportDeclarations()
for (const exportDecl of exportDeclarations) {
const namedExports = exportDecl.getNamedExports()
const hasExport = namedExports.some(
namedExport => namedExport.getName() === typeName
)
if (hasExport) {
const moduleSpecifier = exportDecl.getModuleSpecifier()
if (moduleSpecifier) {
const moduleSpecValue = moduleSpecifier.getLiteralValue()
const resolvedFile = resolveImportPath(
sourceFile,
moduleSpecValue,
project
)
if (resolvedFile) {
const definition = findTypeInFile(resolvedFile, typeName)
if (definition) return definition
// Recursively search in the resolved file's imports
const recursiveDefinition = searchTypeInImports(
resolvedFile,
typeName,
project
)
if (recursiveDefinition) return recursiveDefinition
}
}
}
}
return null
} catch (error) {
console.warn(`Error searching type in imports: ${error.message}`)
return null
}
}
// Helper function to resolve import paths
function resolveImportPath(sourceFile, moduleSpecifier, project) {
try {
// Handle @onflow/ package imports
if (moduleSpecifier.startsWith("@onflow/")) {
const packageName = moduleSpecifier.replace("@onflow/", "")
const packageDir = path.resolve(process.cwd(), "../", packageName)
const packageJsonPath = path.join(packageDir, "package.json")
if (fs.existsSync(packageJsonPath)) {
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf8"))
const entryFile =
packageJson.source || packageJson.main || "src/index.ts"
const entryFilePath = path.resolve(packageDir, entryFile)
if (fs.existsSync(entryFilePath)) {
let targetFile = project.getSourceFile(entryFilePath)
if (!targetFile) {
targetFile = project.addSourceFileAtPath(entryFilePath)
}
return targetFile
}
}
}
// Handle relative imports
else if (
moduleSpecifier.startsWith("./") ||
moduleSpecifier.startsWith("../")
) {
const sourceDir = path.dirname(sourceFile.getFilePath())
const resolvedPath = path.resolve(sourceDir, moduleSpecifier)
// Try different extensions
const possiblePaths = [
resolvedPath + ".ts",
resolvedPath + ".d.ts",
resolvedPath + "/index.ts",
resolvedPath + "/index.d.ts",
]
for (const possiblePath of possiblePaths) {
if (fs.existsSync(possiblePath)) {
let targetFile = project.getSourceFile(possiblePath)
if (!targetFile) {
targetFile = project.addSourceFileAtPath(possiblePath)
}
return targetFile
}
}
}
return null
} catch (error) {
console.warn(
`Error resolving import path ${moduleSpecifier}: ${error.message}`
)
return null
}
}
// Helper function to search for types in common workspace packages
function searchTypeInWorkspacePackages(typeName, project) {
try {
const workspacePackages = ["sdk", "typedefs", "fcl-core", "types"]
for (const packageName of workspacePackages) {
const packageSrcDir = path.resolve(
process.cwd(),
"../",
packageName,
"src"
)
if (fs.existsSync(packageSrcDir)) {
try {
project.addSourceFilesAtPaths(`${packageSrcDir}/**/*.ts`)
for (const sourceFile of project.getSourceFiles()) {
if (sourceFile.getFilePath().includes(packageName)) {
const definition = findTypeInFile(sourceFile, typeName)
if (definition) return definition
}
}
} catch (e) {
// Continue to next package if this one fails
console.warn(
`Could not search in package ${packageName}: ${e.message}`
)
}
}
}
return null
} catch (error) {
console.warn(`Error searching workspace packages: ${error.message}`)
return null
}
}
function processTypeForDisplay(
typeString,
coreTypes,
packageName,
sourceFilePath
) {
if (!typeString) {
return {
displayType: typeString,
hasLink: false,
linkedType: null,
typeDefinition: null,
}
}
const extractedType = extractTypeName(typeString)
// Handle union types specially
if (extractedType.includes("|")) {
const unionTypes = extractedType.split("|").map(t => t.trim())
let hasAnyLink = false
const processedTypes = unionTypes.map(type => {
if (isTypeInTypedefs(type, coreTypes)) {
hasAnyLink = true
let linkType = type
let linkFragment = type.toLowerCase()
// Handle Promise<Type> - link to the inner type
if (type.startsWith("Promise<") && type.endsWith(">")) {
const innerType = type.slice(8, -1).trim()
linkFragment = innerType.toLowerCase()
}
// Handle Array types
if (type.endsWith("[]")) {
const baseType = type.slice(0, -2).trim()
linkFragment = baseType.toLowerCase()
}
return `[\`${type}\`](../types#${linkFragment})`
} else {
return `\`${type}\``
}
})
if (hasAnyLink) {
return {
displayType: extractedType,
hasLink: true,
linkedType: processedTypes.join(" | "),
typeDefinition: null,
}
}
}
// Check if type exists in typedefs package
if (isTypeInTypedefs(extractedType, coreTypes)) {
let linkType = extractedType
let linkFragment = extractedType.toLowerCase()
// Handle Promise<Type> - link to the inner type
if (extractedType.startsWith("Promise<") && extractedType.endsWith(">")) {
const innerType = extractedType.slice(8, -1).trim()
linkFragment = innerType.toLowerCase()
}
// Handle Array types
if (extractedType.endsWith("[]")) {
const baseType = extractedType.slice(0, -2).trim()
linkFragment = baseType.toLowerCase()
}
// Handle TypeScript utility types - link to the inner type
const utilityTypeMatch = extractedType.match(
/^(Partial|Required|Omit|Pick|Record|Exclude|Extract|NonNullable|ReturnType|Parameters|ConstructorParameters|InstanceType|ThisParameterType|OmitThisParameter|ThisType)<(.+)>$/
)
if (utilityTypeMatch) {
const [, utilityType, innerType] = utilityTypeMatch
const firstTypeParam = innerType.split(",")[0].trim()
linkFragment = firstTypeParam.toLowerCase()
}
return {
displayType: extractedType,
hasLink: true,
linkedType: `[\`${extractedType}\`](../types#${linkFragment})`,
typeDefinition: null,
}
}
// Check if it's a non-primitive type that should have a definition shown
if (isNonPrimitiveType(extractedType)) {
const typeDefinition = getTypeDefinition(
extractedType,
packageName,
sourceFilePath
)
// If we found a definition, use it
if (typeDefinition) {
return {
displayType: extractedType,
hasLink: false,
linkedType: null,
typeDefinition: typeDefinition,
}
}
// If no definition found but it's clearly a function type, show it anyway
if (extractedType.includes("=>")) {
return {
displayType: extractedType,
hasLink: false,
linkedType: null,
typeDefinition: formatTypeScript(extractedType),
}
}
// If no definition found but it looks like an interface/type name,
// don't show a fallback message - just show nothing
if (/^[A-Z][a-zA-Z0-9]*$/.test(extractedType)) {
return {
displayType: extractedType,
hasLink: false,
linkedType: null,
typeDefinition: null,
}
}
// For other complex types, show them as type definitions
return {
displayType: extractedType,
hasLink: false,
linkedType: null,
typeDefinition: formatTypeScript(extractedType),
}
}
// For primitive types or simple types, just show the type name
return {
displayType: extractedType,
hasLink: false,
linkedType: null,
typeDefinition: null,
}
}
function generateFunctionPage(templates, outputDir, packageName, func) {
const coreTypes = extractCoreTypes()
// Escape MDX characters in description
if (func.description) {
func.description = escapeMDXCharacters(func.description)
}
// Process parameters
func.parameters = func.parameters.map(param => {
const typeInfo = processTypeForDisplay(
param.type,
coreTypes,
packageName,
func.sourceFilePath
)
// Check if this is a generic type and try to expand it
let expandedType = null
if (param.type.includes("<") && param.type.includes(">")) {
const baseTypeName = stripGenericParams(param.type)
// Try to get the structure - if the type doesn't exist, it will return null
expandedType = getGenericTypeStructure(
baseTypeName,
packageName,
func.sourceFilePath
)
}
// Escape MDX characters in parameter description
const description = param.description
? escapeMDXCharacters(param.description)
: param.description
return {
...param,
type: typeInfo.displayType,
description,
linkedType: typeInfo.linkedType,
hasLink: typeInfo.hasLink,
typeDefinition: typeInfo.typeDefinition,
expandedType: expandedType,
}
})
// Process return type
const returnTypeInfo = processTypeForDisplay(
func.returnType,
coreTypes,
packageName,
func.sourceFilePath
)
func.returnType = returnTypeInfo.displayType
func.returnHasLink = returnTypeInfo.hasLink
func.linkedType = returnTypeInfo.linkedType
func.returnTypeDefinition = returnTypeInfo.typeDefinition
// Generate the page directly in the package folder instead of in a reference subfolder
const filename = func.name.charAt(0).toLowerCase() + func.name.slice(1)
generatePage(templates, "function", path.join(outputDir, `${filename}.md`), {
...func,
packageName,
packageFirstWord: getFirstWord(packageName),
})
}
module.exports = {generateFunctionPage}
================================================
FILE: docs-generator/generators/generate-namespace-page.js
================================================
const path = require("path")
const fs = require("fs")
const {Project} = require("ts-morph")
const {generatePage, getFirstWord} = require("./utils")
const {formatTypeScript} = require("../utils/typescript-formatter")
// Basic primitive types that don't need definitions
const PRIMITIVE_TYPES = new Set([
"string",
"number",
"boolean",
"object",
"any",
"void",
"unknown",
"never",
"null",
"undefined",
])
const typeCache = new Map()
const coreTypesCache = new Set()
let hasLoadedCoreTypes = false
// Function to escape MDX-sensitive characters in example code
function escapeMDXCharacters(text) {
if (!text) return text
// Handle already escaped curly braces by converting them to inline code
// This pattern matches things like A.\{AccountAddress\}.\{ContractName\}.\{EventName\}
text = text.replace(/A\.\\{[^}]+\\}\.\\{[^}]+\\}\.\\{[^}]+\\}/g, match => {
// Remove the backslashes and wrap in backticks
const cleanMatch = match.replace(/\\/g, "")
return `\`${cleanMatch}\``
})
// Handle other patterns of escaped curly braces by converting to inline code
text = text.replace(/\\{[^}]+\\}/g, match => {
// Remove the backslashes and wrap in backticks
const cleanMatch = match.replace(/\\/g, "")
return `\`${cleanMatch}\``
})
// Split text by both multi-line code blocks (triple backticks) and inline code (single backticks)
// This regex captures both patterns while preserving them
const parts = text.split(/(```[\s\S]*?```|`[^`\n]*`)/g)
return parts
.map((part, index) => {
// Check if this part is a code block (either multi-line or inline)
const isCodeBlock =
part.startsWith("```") ||
(part.startsWith("`") && part.endsWith("`") && !part.includes("\n"))
if (isCodeBlock) {
// Don't escape anything inside code blocks (both multi-line and inline)
return part
} else {
// Escape curly braces only outside code blocks
return part.replace(/(?<!\\)\{/g, "\\{").replace(/(?<!\\)\}/g, "\\}")
}
})
.join("")
}
function extractCoreTypes() {
if (hasLoadedCoreTypes) return coreTypesCache
try {
const typedefsSrcDir = path.join(
path.resolve(process.cwd(), "../typedefs"),
"src"
)
const project = new Project({skipAddingFilesFromTsConfig: true})
project.addSourceFilesAtPaths(`${typedefsSrcDir}/**/*.ts`)
project.getSourceFiles().forEach(sourceFile => {
sourceFile.getInterfaces().forEach(iface => {
if (iface.isExported()) coreTypesCache.add(iface.getName())
})
sourceFile.getTypeAliases().forEach(typeAlias => {
if (typeAlias.isExported()) coreTypesCache.add(typeAlias.getName())
})
sourceFile.getEnums().forEach(enumDef => {
if (enumDef.isExported()) coreTypesCache.add(enumDef.getName())
})
})
hasLoadedCoreTypes = true
return coreTypesCache
} catch (error) {
console.warn(`Error extracting core types: ${error.message}`)
return new Set()
}
}
function extractTypeName(fullType) {
if (!fullType) return fullType
// Clean up import references and comments
let cleanType = fullType
.replace(/import\([^)]+\)\./g, "")
.replace(/\/\*[\s\S]*?\*\//g, "")
.trim()
// For union types, preserve the structure
if (cleanType.includes("|")) {
return cleanType
}
// For simple types without complex structures
if (
!cleanType.includes("Promise<") &&
!cleanType.includes("=>") &&
!cleanType.includes("{")
) {
return cleanType
}
// Handle Promise types
if (cleanType.startsWith("Promise<")) {
const innerType = cleanType.match(/Promise<(.+)>/)
if (innerType && innerType[1]) {
return `Promise<${extractTypeName(innerType[1])}>`
}
}
// Handle function types
if (cleanType.includes("=>")) {
return cleanType
}
// Handle array types
if (cleanType.endsWith("[]")) {
return `${extractTypeName(cleanType.slice(0, -2))}[]`
}
// Handle complex objects - return as is for now
if (cleanType.includes("{") && cleanType.includes("}")) {
return cleanType
}
return cleanType
}
// Check if a type name exists in the typedefs package
function isTypeInTypedefs(typeName, coreTypes) {
// Handle Promise<Type> - extract the inner type
if (typeName.startsWith("Promise<") && typeName.endsWith(">")) {
const innerType = typeName.slice(8, -1).trim() // Remove Promise< and >
return coreTypes.has(innerType)
}
// Handle Array types - extract the base type
if (typeName.endsWith("[]")) {
const baseType = typeName.slice(0, -2).trim()
return coreTypes.has(baseType)
}
// Handle union types - check if any part is in typedefs
if (typeName.includes("|")) {
const types = typeName.split("|").map(t => t.trim())
return types.some(t => coreTypes.has(t))
}
return coreTypes.has(typeName)
}
// Check if a type is non-primitive (interface, type alias, or arrow function)
function isNonPrimitiveType(typeString) {
if (!typeString || PRIMITIVE_TYPES.has(typeString)) {
return false
}
// Function types (arrow functions)
if (typeString.includes("=>")) {
return true
}
// Object types with properties
if (typeString.includes("{") && typeString.includes(":")) {
return true
}
// Complex union types
if (typeString.includes("|") && typeString.length > 20) {
return true
}
// If it's not a primitive type and is a single word (likely an interface/type alias name)
// that starts with uppercase (TypeScript convention), it's probably a custom type
if (/^[A-Z][a-zA-Z0-9]*(\[\])?$/.test(typeString)) {
return true
}
// Generic types like Promise<SomeType> where SomeType is not primitive
if (typeString.startsWith("Promise<") && typeString.endsWith(">")) {
const innerType = typeString.slice(8, -1).trim()
return isNonPrimitiveType(innerType)
}
return false
}
function extractTypeDefinition(sourceFile, node) {
if (!node) return null
const text = sourceFile.getFullText().substring(node.getPos(), node.getEnd())
// Remove comments and extra whitespace
return text
.replace(/^[\r\n\s]+/, "") // Trim leading whitespace
.replace(/[\r\n\s]+$/, "") // Trim trailing whitespace
.replace(/\/\*\*[\s\S]*?\*\//g, "") // Remove JSDoc comments
.replace(/\/\*[\s\S]*?\*\//g, "") // Remove multi-line comments
.replace(/\/\/.*$/gm, "") // Remove single-line comments
.replace(/\n\s*\n+/g, "\n") // Replace multiple blank lines with a single one
.trim()
}
function findTypeInFile(sourceFile, typeName) {
// Check for interface
const iface = sourceFile.getInterface(typeName)
if (iface) return extractTypeDefinition(sourceFile, iface)
// Check for type alias
const typeAlias = sourceFile.getTypeAlias(typeName)
if (typeAlias) return extractTypeDefinition(sourceFile, typeAlias)
// Check for enum
const enumDef = sourceFile.getEnum(typeName)
if (enumDef) return extractTypeDefinition(sourceFile, enumDef)
return null
}
function getTypeDefinition(typeName, packageName, sourceFilePath) {
if (!typeName || PRIMITIVE_TYPES.has(typeName)) {
return null
}
// Handle Promise and array types - extract base type
let baseTypeName = typeName
if (baseTypeName.startsWith("Promise<")) {
const match = baseTypeName.match(/Promise<(.+)>/)
if (match) baseTypeName = match[1]
}
if (baseTypeName.endsWith("[]")) {
baseTypeName = baseTypeName.slice(0, -2)
}
// Check cache first
const cacheKey = `${packageName}:${baseTypeName}`
if (typeCache.has(cacheKey)) {
return typeCache.get(cacheKey)
}
let definition = null
try {
// First check source file if provided
if (sourceFilePath) {
const fullSourcePath = path.resolve(process.cwd(), "../", sourceFilePath)
if (fs.existsSync(fullSourcePath)) {
const project = new Project({skipAddingFilesFromTsConfig: true})
const sourceFile = project.addSourceFileAtPath(fullSourcePath)
definition = findTypeInFile(sourceFile, baseTypeName)
}
}
// If not found, search package src directory
if (!definition) {
const packageSrcDir = path.resolve(
process.cwd(),
"../",
packageName,
"src"
)
if (fs.existsSync(packageSrcDir)) {
const project = new Project({skipAddingFilesFromTsConfig: true})
project.addSourceFilesAtPaths(`${packageSrcDir}/**/*.ts`)
for (const sourceFile of project.getSourceFiles()) {
definition = findTypeInFile(sourceFile, baseTypeName)
if (definition) break
}
}
}
// Cache the result
typeCache.set(cacheKey, definition)
return definition
} catch (error) {
console.warn(
`Error getting type definition for ${typeName}: ${error.message}`
)
return null
}
}
function processTypeForDisplay(
typeString,
coreTypes,
packageName,
sourceFilePath
) {
if (!typeString) {
return {
displayType: typeString,
hasLink: false,
linkedType: null,
typeDefinition: null,
}
}
const extractedType = extractTypeName(typeString)
// Check if type exists in typedefs package
if (isTypeInTypedefs(extractedType, coreTypes)) {
let linkType = extractedType
let linkFragment = extractedType.toLowerCase()
// Handle Promise<Type> - link to the inner type
if (extractedType.startsWith("Promise<") && extractedType.endsWith(">")) {
const innerType = extractedType.slice(8, -1).trim()
linkFragment = innerType.toLowerCase()
}
// Handle Array types
if (extractedType.endsWith("[]")) {
const baseType = extractedType.slice(0, -2).trim()
linkFragment = baseType.toLowerCase()
}
return {
displayType: extractedType,
hasLink: true,
linkedType: `[\`${extractedType}\`](../types#${linkFragment})`,
typeDefinition: null,
}
}
// Check if it's a non-primitive type that should have a definition shown
if (isNonPrimitiveType(extractedType)) {
const typeDefinition = getTypeDefinition(
extractedType,
packageName,
sourceFilePath
)
return {
displayType: extractedType,
hasLink: false,
linkedType: null,
typeDefinition: formatTypeScript(typeDefinition || extractedType), // Show the type itself if no definition found
}
}
// For primitive types or simple types, just show the type name
return {
displayType: extractedType,
hasLink: false,
linkedType: null,
typeDefinition: null,
}
}
function processFunction(func, packageName, coreTypes) {
// Escape MDX characters in description
if (func.description) {
func.description = escapeMDXCharacters(func.description)
}
// Process parameters
func.parameters = func.parameters.map(param => {
const typeInfo = processTypeForDisplay(
param.type,
coreTypes,
packageName,
func.sourceFilePath
)
// Escape MDX characters in parameter description
const description = param.description
? escapeMDXCharacters(param.description)
: param.description
return {
...param,
type: typeInfo.displayType,
description,
linkedType: typeInfo.linkedType,
hasLink: typeInfo.hasLink,
typeDefinition: typeInfo.typeDefinition,
}
})
// Process return type
const returnTypeInfo = processTypeForDisplay(
func.returnType,
coreTypes,
packageName,
func.sourceFilePath
)
func.returnType = returnTypeInfo.displayType
func.returnHasLink = returnTypeInfo.hasLink
func.linkedType = returnTypeInfo.linkedType
func.returnTypeDefinition = returnTypeInfo.typeDefinition
return func
}
function truncateDescription(description, maxLength = 80) {
if (!description || description.length <= maxLength) {
// Still normalize whitespace even for short descriptions
return description ? description.replace(/\s+/g, " ").trim() : description
}
// Remove line breaks and normalize whitespace
const normalizedDescription = description.replace(/\s+/g, " ").trim()
// Find the last space before the maxLength to avoid cutting words
let truncateAt = maxLength
const lastSpace = normalizedDescription.lastIndexOf(" ", maxLength)
if (lastSpace > maxLength * 0.8) {
// Only use space if it's not too far back
truncateAt = lastSpace
}
return normalizedDescription.substring(0, truncateAt).trim() + "..."
}
function generateNamespacePage(templates, outputDir, packageName, namespace) {
const coreTypes = extractCoreTypes()
// Deduplicate functions with the same name
const uniqueFunctions = []
const seenFunctionNames = new Set()
namespace.functions.forEach(func => {
if (!seenFunctionNames.has(func.name)) {
seenFunctionNames.add(func.name)
uniqueFunctions.push(func)
}
})
// Sort functions alphabetically, case insensitively
uniqueFunctions.sort((a, b) =>
a.name.toLowerCase().localeCompare(b.name.toLowerCase())
)
// Process each function to add type definitions and links
const processedFunctions = uniqueFunctions.map(func => {
const processedFunc = processFunction(func, packageName, coreTypes)
// Add lowercase_name property for use in templates
processedFunc.lowercase_name =
func.name.charAt(0).toLowerCase() + func.name.slice(1)
return processedFunc
})
// Generate lowercase filename like functions
const filename =
namespace.name.charAt(0).toLowerCase() + namespace.name.slice(1)
generatePage(templates, "namespace", path.join(outputDir, `${filename}.md`), {
packageName,
packageFirstWord: getFirstWord(packageName),
namespaceName: namespace.name,
namespaceDescription: namespace.description,
functions: processedFunctions,
})
}
module.exports = {generateNamespacePage}
================================================
FILE: docs-generator/generators/generate-package-page.js
================================================
const path = require("path")
const {generatePage, parseConfigCustomData, getFirstWord} = require("./utils")
const fs = require("fs")
function truncateDescription(description, maxLength = 80) {
if (!description || description.length <= maxLength) {
// Still normalize whitespace even for short descriptions
return description ? description.replace(/\s+/g, " ").trim() : description
}
// Remove line breaks and normalize whitespace
const normalizedDescription = description.replace(/\s+/g, " ").trim()
// Find the last space before the maxLength to avoid cutting words
let truncateAt = maxLength
const lastSpace = normalizedDescription.lastIndexOf(" ", maxLength)
if (lastSpace > maxLength * 0.8) {
// Only use space if it's not too far back
truncateAt = lastSpace
}
return normalizedDescription.substring(0, truncateAt).trim() + "..."
}
function getPackageDescription(packageName) {
try {
const packageJsonPath = path.resolve(process.cwd(), "package.json")
if (fs.existsSync(packageJsonPath)) {
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf8"))
return packageJson.description || ""
}
} catch (error) {
console.warn(
`Error reading package.json for ${packageName}: ${error.message}`
)
}
return ""
}
function generatePackagePage(
templates,
outputDir,
packageName,
functions,
namespaces = [],
allNamespaceFunctions = []
) {
const configPath = path.resolve(process.cwd(), "docs-generator.config.js")
const {displayName, sections, extra} = parseConfigCustomData(configPath)
const packageDescription = getPackageDescription(packageName)
// Combine regular functions with namespace functions for the API reference
const allFunctions = [...functions, ...allNamespaceFunctions]
// Deduplicate functions with the same name
const uniqueFunctions = []
const seenFunctionNames = new Set()
allFunctions.forEach(func => {
if (!seenFunctionNames.has(func.name)) {
seenFunctionNames.add(func.name)
uniqueFunctions.push(func)
}
})
// Process namespaces for display
const processedNamespaces = namespaces.map(namespace => ({
...namespace,
displayDescription: truncateDescription(namespace.description), // Only truncate for display
type: "namespace", // Mark as namespace for sorting
isNamespace: true, // Add boolean flag for template
displayName: namespace.name,
filePath: `./${namespace.name.charAt(0).toLowerCase() + namespace.name.slice(1)}.md`,
}))
// Process functions for display
const processedFunctions = uniqueFunctions.map(func => ({
...func,
lowercase_name: func.name.charAt(0).toLowerCase() + func.name.slice(1),
displayDescription: truncateDescription(func.description), // Only truncate for display
type: "function", // Mark as function for sorting
isNamespace: false, // Add boolean flag for template
displayName: func.namespace ? `${func.namespace}.${func.name}` : func.name,
filePath: func.namespace
? `./${func.namespace.charAt(0).toLowerCase() + func.namespace.slice(1)}.md#${func.name}`
: `./${func.name.charAt(0).toLowerCase() + func.name.slice(1)}.md`,
}))
// Combine functions and namespaces for unified sorting
const allApiItems = [...processedFunctions, ...processedNamespaces]
// Sort all items alphabetically, case insensitively
allApiItems.sort((a, b) =>
a.displayName.toLowerCase().localeCompare(b.displayName.toLowerCase())
)
generatePage(templates, "package", path.join(outputDir, "index.md"), {
packageName,
packageFirstWord: getFirstWord(packageName),
displayName: displayName || `@onflow/${packageName}`,
displayDescription:
packageDescription || `${packageName} package documentation.`,
customOverview: sections.overview,
customRequirements: sections.requirements,
customImporting: sections.importing,
extra,
functions: uniqueFunctions, // Keep original functions with full descriptions for individual pages
namespaces: processedNamespaces,
allApiItems, // Use processed items with truncated descriptions for the index
})
}
module.exports = {generatePackagePage}
================================================
FILE: docs-generator/generators/generate-root-page.js
================================================
const path = require("path")
const fs = require("fs")
const {generatePage, parseConfigCustomData} = require("./utils")
function getPackageDescription(packageName) {
try {
const packageJsonPath = path.resolve(
process.cwd(),
"..",
packageName,
"package.json"
)
if (fs.existsSync(packageJsonPath)) {
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf8"))
return packageJson.description || ""
}
} catch (error) {
console.warn(
`Error reading package.json for ${packageName}: ${error.message}`
)
}
return ""
}
function generateRootPage(templates, packagesDir, currentPackageName) {
const configPath = path.resolve(process.cwd(), "docs-generator.config.js")
const {displayName} = parseConfigCustomData(configPath)
const currentDisplayName = displayName || `@onflow/${currentPackageName}`
const currentPackageDescription =
getPackageDescription(currentPackageName) ||
`${currentPackageName} package documentation.`
const rootPagePath = path.join(packagesDir, "index.md")
const packages = []
// Read existing packages from the file if it exists
if (fs.existsSync(rootPagePath)) {
try {
const content = fs.readFileSync(rootPagePath, "utf8")
const regex = /\- \[(.*?)\]\(\.\/(.*?)\/index\.md\)/g
let match
while ((match = regex.exec(content)) !== null) {
if (match[1] && match[2] && match[1] !== "Type Definitions") {
packages.push({
displayName: match[1],
packageName: match[2],
displayDescription: getPackageDescription(match[2]),
})
}
}
} catch (error) {
console.warn(`Error reading root page: ${error.message}`)
}
}
// Check if current package already exists
const packageExists = packages.some(
pkg => pkg.packageName === currentPackageName
)
// Add it if not already in the list
if (!packageExists) {
packages.push({
displayName: currentDisplayName,
packageName: currentPackageName,
displayDescription: currentPackageDescription,
})
}
// Sort packages by display name
packages.sort((a, b) => a.displayName.localeCompare(b.displayName))
// Generate the root page
generatePage(templates, "root", rootPagePath, {packages})
}
module.exports = {generateRootPage}
================================================
FILE: docs-generator/generators/generate-types-page.js
================================================
const path = require("path")
const {Project, Node, TypeFormatFlags} = require("ts-morph")
const {generatePage} = require("./utils")
function decodeHtmlEntities(text) {
if (!text) return text
const decoded = text
.replace(/</g, "<")
.replace(/>/g, ">")
.replace(/&/g, "&")
.replace(/"/g, '"')
.replace(/'/g, "'")
// Escape also pipe characters which would break markdown tables
return decoded.replace(/\|/g, "\\|")
}
function extractJSDocDescription(node) {
if (!node) return null
try {
if (typeof node.getJsDocs === "function") {
const jsDocs = node.getJsDocs()
if (jsDocs && jsDocs.length > 0) {
const jsDoc = jsDocs[0]
const description = jsDoc.getDescription() || ""
return description.trim() || null
}
}
// Fallback: try to parse JSDoc from the node leading comments
if (typeof node.getLeadingCommentRanges === "function") {
const commentRanges = node.getLeadingCommentRanges()
if (commentRanges && commentRanges.length > 0) {
const commentText = commentRanges
.map(range => range.getText())
.join("\n")
// Simple regex to extract JSDoc description
const match = /\/\*\*\s*([\s\S]*?)\s*\*\//.exec(commentText)
if (match && match[1]) {
const description = match[1].replace(/^\s*\*\s?/gm, "").trim()
return description || null
}
}
}
} catch (error) {
console.warn(`Error extracting JSDoc description: ${error.message}`)
}
return null
}
function extractInterfaces(sourceFiles) {
const interfaces = []
sourceFiles.forEach(sourceFile => {
// Get exported interfaces
sourceFile.getInterfaces().forEach(iface => {
if (!iface.isExported()) return
const name = iface.getName()
const description = extractJSDocDescription(iface)
// Extract properties
const properties = iface.getProperties().map(prop => {
const propName = prop.getName()
const propType = decodeHtmlEntities(
prop.getType().getText(undefined, TypeFormatFlags.None)
)
const propDescription = extractJSDocDescription(prop)
return {
name: propName,
type: propType,
description: propDescription,
}
})
interfaces.push({
name,
description,
properties,
importStatement: `import { type ${name} } from "@onflow/fcl"`,
})
})
})
// Sort interfaces alphabetically by name
return interfaces.sort((a, b) => a.name.localeCompare(b.name))
}
function extractTypeAliases(sourceFiles) {
const types = []
sourceFiles.forEach(sourceFile => {
// Get exported type aliases
sourceFile.getTypeAliases().forEach(typeAlias => {
if (!typeAlias.isExported()) return
const name = typeAlias.getName()
const description = extractJSDocDescription(typeAlias)
const type = decodeHtmlEntities(
typeAlias.getType().getText(undefined, TypeFormatFlags.None)
)
// For object types, try to extract properties
const properties = []
const aliasType = typeAlias.getType()
if (aliasType.isObject()) {
const propSymbols = aliasType.getProperties()
propSymbols.forEach(propSymbol => {
const propName = propSymbol.getName()
let propType = "unknown"
try {
const valueDeclaration = propSymbol.getValueDeclaration()
if (valueDeclaration) {
if (Node.isPropertySignature(valueDeclaration)) {
const typeNode = valueDeclaration.getTypeNode()
if (typeNode) {
propType = typeNode.getText()
}
}
}
// If we couldn't get the type from the declaration, use the symbol's type
if (propType === "unknown") {
propType = propSymbol
.getTypeAtLocation(typeAlias)
.getText(undefined, TypeFormatFlags.None)
}
properties.push({
name: propName,
type: decodeHtmlEntities(propType),
description:
extractJSDocDescription(propSymbol.getDeclarations()[0]) ||
null,
})
} catch (error) {
console.warn(
`Error extracting property ${propName} from type ${name}: ${error.message}`
)
properties.push({
name: propName,
type: "unknown",
description: null,
})
}
})
}
types.push({
name,
description,
type,
properties,
importStatement: `import { type ${name} } from "@onflow/fcl"`,
})
})
})
// Sort type aliases alphabetically by name
return types.sort((a, b) => a.name.localeCompare(b.name))
}
function extractEnums(sourceFiles) {
const enums = []
sourceFiles.forEach(sourceFile => {
// Get exported enums
sourceFile.getEnums().forEach(enumDef => {
if (!enumDef.isExported()) return
const name = enumDef.getName()
const description = extractJSDocDescription(enumDef)
// Extract members
const members = enumDef.getMembers().map(member => {
const memberName = member.getName()
const memberDescription = extractJSDocDescription(member)
let memberValue = null
// Try to get the value
const valueNode = member.getInitializer()
if (valueNode) {
memberValue = valueNode.getText()
}
return {
name: memberName,
value: memberValue,
description: memberDescription,
}
})
enums.push({
name,
description,
members,
importStatement: `import { ${name} } from "@onflow/fcl"`,
})
})
})
// Sort enums alphabetically by name
return enums.sort((a, b) => a.name.localeCompare(b.name))
}
function generateTypesPage(templates, outputDir) {
// Path to the typedefs package
const typedefsDir = path.resolve(process.cwd(), "../typedefs")
const typedefsSrcDir = path.join(typedefsDir, "src")
// Initialize ts-morph project
const project = new Project({
skipAddingFilesFromTsConfig: true,
})
// Add source files from typedefs package
project.addSourceFilesAtPaths(`${typedefsSrcDir}/**/*.ts`)
const sourceFiles = project.getSourceFiles()
// Extract types data
const interfaces = extractInterfaces(sourceFiles)
const types = extractTypeAliases(sourceFiles)
const enums = extractEnums(sourceFiles)
// Generate the types index page
generatePage(templates, "types", path.join(outputDir, "index.md"), {
interfaces,
types,
enums,
})
}
module.exports = {generateTypesPage}
================================================
FILE: docs-generator/generators/index.js
================================================
const {generatePackagePage} = require("./generate-package-page")
const {generateFunctionPage} = require("./generate-function-page")
const {generateTypesPage} = require("./generate-types-page")
const {generateRootPage} = require("./generate-root-page")
const {generateNamespacePage} = require("./generate-namespace-page")
module.exports = {
generatePackagePage,
generateFunctionPage,
generateTypesPage,
generateRootPage,
generateNamespacePage,
}
================================================
FILE: docs-generator/generators/utils/extract-utils.js
================================================
function getFirstWord(packageName) {
return packageName.split("-")[0]
}
module.exports = {getFirstWord}
================================================
FILE: docs-generator/generators/utils/generate-page.js
================================================
const fs = require("fs")
function generatePage(templates, templateName, outputPath, context) {
try {
const content = templates[templateName](context)
fs.writeFileSync(outputPath, content)
} catch (error) {
console.error(`Error generating ${templateName} page: ${error.message}`)
throw error
}
}
module.exports = {generatePage}
================================================
FILE: docs-generator/generators/utils/index.js
================================================
const {generatePage} = require("./generate-page")
const {parseConfigCustomData} = require("./parse-config-custom-data")
const {getFirstWord} = require("./extract-utils")
module.exports = {generatePage, parseConfigCustomData, getFirstWord}
================================================
FILE: docs-generator/generators/utils/parse-config-custom-data.js
================================================
const fs = require("fs")
function parseConfigCustomData(configPath) {
// Parse config custom data if present and return custom one or null for default
const config = fs.existsSync(configPath) ? require(configPath) : null
return {
displayName: config?.customData?.displayName || null,
sections: {
overview: config?.customData?.sections?.overview || null,
requirements: config?.customData?.sections?.requirements || null,
importing: config?.customData?.sections?.importing || null,
},
extra: config?.customData?.extra || null,
}
}
module.exports = {parseConfigCustomData}
================================================
FILE: docs-generator/templates/function.hbs
================================================
---
title: "{{name}}"
description: "{{name}} function documentation."
---
<!-- THIS DOCUMENT IS AUTO-GENERATED FROM [onflow/{{packageName}}/{{sourceFilePath}}](https://github.com/onflow/fcl-js/tree/master/packages/{{packageName}}/{{sourceFilePath}}). DO NOT EDIT MANUALLY -->
# {{name}}
{{#if description}}
{{{description}}}
{{/if}}
## Import
You can import the entire package and access the function:
```typescript
import * as {{packageFirstWord}} from "@onflow/{{packageName}}"
{{packageFirstWord}}.{{name}}({{#each parameters}}{{#unless @first}}, {{/unless}}{{name}}{{/each}})
```
Or import directly the specific function:
```typescript
import { {{name}} } from "@onflow/{{packageName}}"
{{name}}({{#each parameters}}{{#unless @first}}, {{/unless}}{{name}}{{/each}})
```
{{#if customExample}}
## Usage
```typescript
{{{customExample}}}
```
{{/if}}
{{#if parameters.length}}
## Parameters
{{#each parameters}}
### `{{name}}` {{#unless required}}(optional){{/unless}}
{{#if expandedType}}
- Type: `{{{type}}}`
#### Properties:
{{#each expandedType}}
- **`{{@key}}`** {{#if this.optional}}(optional){{/if}} - Type: `{{{this.type}}}`{{#if this.description}} - {{{this.description}}}{{/if}}
{{/each}}
{{else}}
{{#if typeDefinition}}{{#unless hasLink}}
- Type:
```typescript
{{{typeDefinition}}}
```
{{else}}
- Type: {{#if hasLink}}{{{linkedType}}}{{else}}`{{{type}}}`{{/if}}
{{/unless}}{{else}}
- Type: {{#if hasLink}}{{{linkedType}}}{{else}}`{{{type}}}`{{/if}}
{{/if}}
{{#if description}}
- Description: {{{description}}}
{{/if}}
{{#if nestedParams}}
#### Properties:
{{#each nestedParams}}
- **`{{name}}`** {{#unless required}}(optional){{/unless}} - {{{description}}}
{{/each}}
{{/if}}
{{/if}}
{{/each}}
{{/if}}
## Returns
{{#if returnTypeDefinition}}
```typescript
{{{returnTypeDefinition}}}
```
{{else}}
{{#if returnHasLink}}{{{linkedType}}}{{else}}`{{{returnType}}}`{{/if}}
{{/if}}
{{#if returnDescription}}
{{{returnDescription}}}
{{/if}}
---
================================================
FILE: docs-generator/templates/namespace.hbs
================================================
---
title: "{{namespaceName}}"
description: "{{namespaceDescription}}"
---
<!-- THIS DOCUMENT IS AUTO-GENERATED FROM [onflow/{{packageName}}](https://github.com/onflow/fcl-js/tree/master/packages/{{packageName}}). DO NOT EDIT MANUALLY -->
# {{namespaceName}}
## Overview
{{namespaceDescription}}
## Functions
{{#each functions}}
### {{name}}
{{#if description}}
{{{description}}}
{{/if}}
#### Import
You can import the entire package and access the function:
```typescript
import * as {{../packageFirstWord}} from "@onflow/{{../packageName}}"
{{../packageFirstWord}}.{{../namespaceName}}.{{name}}({{#each parameters}}{{#unless @first}}, {{/unless}}{{name}}{{/each}})
```
Or import the namespace directly:
```typescript
import { {{../namespaceName}} } from "@onflow/{{../packageName}}"
{{../namespaceName}}.{{name}}({{#each parameters}}{{#unless @first}}, {{/unless}}{{name}}{{/each}})
```
{{#if customExample}}
#### Usage
```typescript
{{{customExample}}}
```
{{/if}}
{{#if parameters.length}}
#### Parameters
{{#each parameters}}
##### `{{name}}`{{#unless required}} (optional){{/unless}}
{{#if typeDefinition}}{{#unless hasLink}}
- Type:
```typescript
{{{typeDefinition}}}
```
{{else}}
- Type: {{#if hasLink}}{{{linkedType}}}{{else}}`{{{type}}}`{{/if}}
{{/unless}}{{else}}
- Type: {{#if hasLink}}{{{linkedType}}}{{else}}`{{{type}}}`{{/if}}
{{/if}}
{{#if description}}
- Description: {{{description}}}
{{/if}}
{{/each}}
{{/if}}
#### Returns
{{#if returnTypeDefinition}}
```typescript
{{{returnTypeDefinition}}}
```
{{else}}
{{#if returnHasLink}}{{{linkedType}}}{{else}}`{{{returnType}}}`{{/if}}
{{/if}}
{{/each}}
---
================================================
FILE: docs-generator/templates/package.hbs
================================================
---
title: "{{displayName}}"
description: "{{#if displayDescription}}{{displayDescription}}{{else}}{{displayName}} package documentation.{{/if}}"
---
<!-- THIS DOCUMENT IS AUTO-GENERATED FROM [onflow/{{packageName}}](https://github.com/onflow/fcl-js/tree/master/packages/{{packageName}}). DO NOT EDIT MANUALLY -->
# {{displayName}}
## Overview
{{#if customOverview}}
{{{customOverview}}}
{{else}}
The Flow {{packageName}} library provides a set of tools for developers to build applications on the Flow blockchain.
{{/if}}
## Installation
You can install the @onflow/{{packageName}} package using npm or yarn:
```bash
npm install @onflow/{{packageName}}
```
Or using yarn:
```bash
yarn add @onflow/{{packageName}}
```
### Requirements
{{#if customRequirements}}
{{{customRequirements}}}
{{else}}
- Node.js 14.x or later
{{/if}}
### Importing
{{#if customImporting}}
{{{customImporting}}}
{{else}}
You can import the entire package:
```typescript
import * as {{packageFirstWord}} from "@onflow/{{packageName}}"
```
Or import specific functions:
```typescript
import { functionName } from "@onflow/{{packageName}}"
```
{{/if}}
{{#if extra}}
{{{extra}}}
{{/if}}
## API Reference
This section contains documentation for all of the functions and namespaces in the {{packageName}} package.
{{#each allApiItems}}
{{#if isNamespace}}
- [{{displayName}}]({{filePath}}) (namespace){{#if displayDescription}} - {{displayDescription}}{{/if}}
{{else}}
- [{{displayName}}]({{filePath}}){{#if displayDescription}} - {{displayDescription}}{{/if}}
{{/if}}
{{/each}}
---
================================================
FILE: docs-generator/templates/root.hbs
================================================
---
sidebar_position: 1
title: Packages Docs
description: Packages documentation.
---
<!-- THIS DOCUMENT IS AUTO-GENERATED FROM [onflow/fcl-js](https://github.com/onflow/fcl-js). DO NOT EDIT MANUALLY -->
# Packages Docs
A list of all packages available inside Flow Client Library (FCL) with functions and type definitions.
{{#each packages}}
- [{{this.displayName}}](./{{this.packageName}}/index.md) - {{this.displayDescription}}
{{/each}}
- [Type Definitions](./types/index.md) - Type definitions for the Flow Client Library (FCL) packages.
---
================================================
FILE: docs-generator/templates/types.hbs
================================================
---
title: Type Definitions
description: Type definitions for the Flow Client Library (FCL) packages.
---
<!-- THIS DOCUMENT IS AUTO-GENERATED FROM [onflow/typedefs](https://github.com/onflow/fcl-js/tree/master/packages/typedefs). DO NOT EDIT MANUALLY -->
# Type Definitions
Documentation for core types used throughout the Flow Client Library (FCL).
{{#if interfaces.length}}
## Interfaces
{{#each interfaces}}
### {{name}}
```typescript
{{{importStatement}}}
```
{{#if description}}
{{{description}}}
{{/if}}
{{#if properties.length}}
**Properties:**
| Name | Type | Description |
| ---- | ---- | ----------- |
{{#each properties}}
| `{{name}}` | `{{{type}}}` | {{#if description}}{{{description}}}{{/if}} |
{{/each}}
{{/if}}
{{/each}}
{{/if}}
{{#if types.length}}
## Types
{{#each types}}
### {{name}}
```typescript
{{{importStatement}}}
```
{{#if description}}
{{{description}}}
{{/if}}
{{#if properties.length}}
**Properties:**
| Name | Type | Description |
| ---- | ---- | ----------- |
{{#each properties}}
| `{{name}}` | `{{{type}}}` | {{#if description}}{{{description}}}{{/if}} |
{{/each}}
{{/if}}
{{/each}}
{{/if}}
{{#if enums.length}}
## Enums
{{#each enums}}
### {{name}}
```typescript
{{{importStatement}}}
```
{{#if description}}
{{{description}}}
{{/if}}
**Members:**
| Name | Value |
| ---- | ----- |
{{#each members}}
| `{{name}}` | {{#if value}}{{{value}}}{{else}}`"{{name}}"`{{/if}} |
{{/each}}
{{/each}}
{{/if}}
---
================================================
FILE: docs-generator/utils/export-extractor.js
================================================
const path = require("path")
const {Node} = require("ts-morph")
const {parseJsDoc} = require("./jsdoc-parser")
const {
extractFunctionInfo,
resolveReExportedFunction,
} = require("./function-extractor")
const {extractNamespaceFunctions} = require("./namespace-utils")
function extractExportsFromEntryFile(sourceFile) {
const functions = []
const namespaces = []
const processedReExports = new Set() // Track already processed re-exports
const filePath = sourceFile.getFilePath()
const relativeFilePath = path.relative(process.cwd(), filePath)
try {
// Get all import declarations to track namespaces
const importDeclarations = sourceFile.getImportDeclarations()
const actualNamespaceImports = new Map() // Only for "import * as X" style imports
const namedImports = new Map() // For regular named imports like "import {build}"
const typeOnlyImports = new Set() // Track type-only imports
importDeclarations.forEach(importDecl => {
// Skip entire type-only import declarations
if (importDecl.isTypeOnly && importDecl.isTypeOnly()) {
return
}
// Handle regular named imports
const namedImportsList = importDecl.getNamedImports()
namedImportsList.forEach(namedImport => {
const name = namedImport.getName()
// Check if this is a type-only import (either the import declaration or the named import)
if (
namedImport.isTypeOnly() ||
(importDecl.isTypeOnly && importDecl.isTypeOnly())
) {
typeOnlyImports.add(name)
return // Skip adding to namedImports
}
namedImports.set(name, importDecl)
})
// Handle actual namespace imports like "import * as types"
const namespaceImport = importDecl.getNamespaceImport()
if (namespaceImport) {
const name = namespaceImport.getText()
// Only add if it's not a type-only import
if (!(importDecl.isTypeOnly && importDecl.isTypeOnly())) {
actualNamespaceImports.set(name, importDecl)
}
}
})
// Get all export declarations to find re-exports and namespace exports with aliases
sourceFile.getExportDeclarations().forEach(exportDecl => {
// Skip type-only exports
if (exportDecl.isTypeOnly()) {
return
}
const namedExports = exportDecl.getNamedExports()
namedExports.forEach(namedExport => {
// Skip type-only named exports
if (namedExport.isTypeOnly()) {
return
}
const exportName = namedExport.getName()
const alias = namedExport.getAliasNode()?.getText()
const finalName = alias || exportName
// For aliased exports, exportName is the original and alias is the final name
// When resolving, we want to look up the original name (exportName)
const originalName = exportName
// Skip if this is a type-only import
if (typeOnlyImports.has(exportName)) {
return
}
// Check if this is a re-export from another module
const moduleSpecifier = exportDecl.getModuleSpecifier()
if (moduleSpecifier) {
const moduleSpecifierValue = moduleSpecifier.getLiteralValue()
const reExportedFuncInfo = resolveReExportedFunction(
sourceFile,
originalName,
moduleSpecifierValue
)
if (reExportedFuncInfo) {
reExportedFuncInfo.name = finalName
functions.push(reExportedFuncInfo)
// Track that this function was processed as a re-export
processedReExports.add(finalName)
}
} else {
// This is an export of something imported - check if it's an actual namespace
if (
actualNamespaceImports.has(exportName) &&
!typeOnlyImports.has(exportName)
) {
const importDecl = actualNamespaceImports.get(exportName)
const namespaceFunctions = extractNamespaceFunctions(
sourceFile,
exportName,
importDecl
)
// Only add as namespace if it actually has functions
if (namespaceFunctions.length > 0) {
namespaces.push({
name: finalName,
functions: namespaceFunctions,
description: `Namespace containing ${finalName} utilities`,
})
}
}
// Also check if it's a named import that might be a namespace object
else if (
namedImports.has(exportName) &&
!typeOnlyImports.has(exportName)
) {
const importDecl = namedImports.get(exportName)
const namespaceFunctions = extractNamespaceFunctions(
sourceFile,
exportName,
importDecl
)
// Only add as namespace if it actually has functions
if (namespaceFunctions.length > 0) {
namespaces.push({
name: finalName,
functions: namespaceFunctions,
description: `Namespace containing ${finalName} utilities`,
})
}
}
}
})
})
// Get exported declarations from the current file
sourceFile.getExportedDeclarations().forEach((declarations, name) => {
// Skip if this function was already processed as a re-export
if (processedReExports.has(name)) {
return
}
declarations.forEach(declaration => {
// Skip type declarations, interfaces, and type aliases
if (
Node.isTypeAliasDeclaration(declaration) ||
Node.isInterfaceDeclaration(declaration) ||
Node.isEnumDeclaration(declaration)
) {
// Skip these as they are types, not functions
return
}
const funcInfo = extractFunctionInfo(declaration, name, sourceFile)
if (funcInfo) {
functions.push(funcInfo)
}
// Check if this is a namespace export for variable declarations
else if (Node.isVariableDeclaration(declaration)) {
// Only check if this is a namespace export if it's an actual namespace import
// and it's not a type-only import
if (
actualNamespaceImports.has(name) &&
!typeOnlyImports.has(name) &&
!namespaces.some(ns => ns.name === name)
) {
const importDecl = actualNamespaceImports.get(name)
const namespaceFunctions = extractNamespaceFunctions(
sourceFile,
name,
importDecl
)
// Only add as namespace if it actually has functions
if (namespaceFunctions.length > 0) {
const jsDocInfo = parseJsDoc(declaration)
namespaces.push({
name,
functions: namespaceFunctions,
description:
jsDocInfo.description ||
`Namespace containing ${name} utilities`,
})
}
}
// Also check if it's a named import that might be a namespace object
else if (
namedImports.has(name) &&
!typeOnlyImports.has(name) &&
!namespaces.some(ns => ns.name === name)
) {
const importDecl = namedImports.get(name)
const namespaceFunctions = extractNamespaceFunctions(
sourceFile,
name,
importDecl
)
// Only add as namespace if it actually has functions
if (namespaceFunctions.length > 0) {
const jsDocInfo = parseJsDoc(declaration)
namespaces.push({
name,
functions: namespaceFunctions,
description:
jsDocInfo.description ||
`Namespace containing ${name} utilities`,
})
}
}
}
})
})
} catch (e) {
console.warn(`Error extracting exports from entry file: ${e.message}`)
console.warn(e.stack)
}
return {functions, namespaces}
}
module.exports = {
extractExportsFromEntryFile,
}
================================================
FILE: docs-generator/utils/file-utils.js
================================================
const fs = require("fs")
const path = require("path")
function discoverWorkspacePackages() {
try {
// Get the workspace root (2 levels up from current package directory)
const workspaceRoot = path.resolve(process.cwd(), "../..")
const packagesDir = path.join(workspaceRoot, "packages")
if (!fs.existsSync(packagesDir)) {
console.warn("Packages directory not found, using current package only")
return []
}
const packagePaths = []
const packageDirs = fs
.readdirSync(packagesDir, {withFileTypes: true})
.filter(dirent => dirent.isDirectory())
.map(dirent => dirent.name)
for (const packageDir of packageDirs) {
const srcPath = path.join(packagesDir, packageDir, "src")
if (fs.existsSync(srcPath)) {
packagePaths.push(`${srcPath}/**/*.ts`)
}
}
return packagePaths
} catch (e) {
console.warn(`Error discovering workspace packages: ${e.message}`)
return []
}
}
module.exports = {
discoverWorkspacePackages,
}
================================================
FILE: docs-generator/utils/function-extractor.js
================================================
const path = require("path")
const fs = require("fs")
const {Node} = require("ts-morph")
const {parseJsDoc} = require("./jsdoc-parser")
const {
cleanupTypeText,
toCamelCase,
escapeParameterNameForMDX,
escapeTextForMDX,
} = require("./type-utils")
function extractFunctionInfo(
declaration,
functionName,
sourceFile,
namespace = null
) {
try {
let funcInfo = null
// Handle function declarations
if (Node.isFunctionDeclaration(declaration)) {
const jsDocInfo = parseJsDoc(declaration)
const parameters = declaration.getParameters().map(param => {
let paramName = param.getName()
const paramType = cleanupTypeText(param.getType().getText())
const paramJsDoc = jsDocInfo.params && jsDocInfo.params[paramName]
// Handle destructured parameters by using camelCase of the type name
if (paramName.includes("{") && paramName.includes("}")) {
// Extract the type name from the parameter type
// Handle both direct types (AccountProofData) and import types (import("...").AccountProofData)
const typeText = param.getType().getText()
let typeMatch = typeText.match(/^([A-Z][a-zA-Z0-9]*)/) // Direct type
if (!typeMatch) {
typeMatch = typeText.match(/import\([^)]+\)\.([A-Z][a-zA-Z0-9]*)/) // Import type
}
if (typeMatch && typeMatch[1]) {
paramName = toCamelCase(typeMatch[1])
} else {
// Fallback to "options" if we can't extract a type name
paramName = "options"
}
}
// Handle nested JSDoc parameters (e.g., queryOptions.height)
let nestedParams = []
if (jsDocInfo.params) {
Object.keys(jsDocInfo.params).forEach(jsDocParamName => {
if (jsDocParamName.startsWith(paramName + ".")) {
const nestedParamName = jsDocParamName.substring(
paramName.length + 1
)
// Try to extract type information from the parameter's TypeScript type
let nestedParamType = "any"
try {
const paramTypeSymbol = param.getType().getSymbol()
if (paramTypeSymbol) {
const typeDeclaration = paramTypeSymbol.getDeclarations()?.[0]
if (
typeDeclaration &&
Node.isInterfaceDeclaration(typeDeclaration)
) {
// Find the property in the interface
const property =
typeDeclaration.getProperty(nestedParamName)
if (property) {
const propertyType = property.getType()
nestedParamType = cleanupTypeText(propertyType.getText())
}
}
}
} catch (e) {
// Fallback to any if type extraction fails
nestedParamType = "any"
}
nestedParams.push({
name: escapeParameterNameForMDX(nestedParamName),
type: nestedParamType,
required: true, // Default to required
description:
escapeTextForMDX(jsDocInfo.params[jsDocParamName]) || "",
})
}
})
}
return {
name: escapeParameterNameForMDX(paramName),
type: paramType,
required: !param.isOptional(),
description: escapeTextForMDX(paramJsDoc) || "",
nestedParams: nestedParams.length > 0 ? nestedParams : undefined,
}
})
// Get the actual return type, not the function signature
let returnType = "any"
try {
const funcReturnType = declaration.getReturnType()
const returnTypeText = funcReturnType.getText()
// If the return type text looks like a function signature, extract just the return part
// But don't apply this logic to object literal types (which start with '{')
if (
returnTypeText.includes("=>") &&
!returnTypeText.trim().startsWith("{")
) {
const returnPart = returnTypeText.split("=>").pop()?.trim()
if (returnPart) {
returnType = cleanupTypeText(returnPart)
} else {
returnType = cleanupTypeText(returnTypeText)
}
} else {
returnType = cleanupTypeText(returnTypeText)
}
} catch (e) {
console.warn(`Error extracting return type: ${e.message}`)
returnType = "any"
}
// Extract return description from JSDoc
let returnDescription = null
if (jsDocInfo.returns) {
returnDescription = escapeTextForMDX(jsDocInfo.returns)
}
const filePath = sourceFile.getFilePath()
const relativeFilePath = path.relative(process.cwd(), filePath)
funcInfo = {
name: functionName,
returnType,
returnDescription,
parameters,
description: jsDocInfo.description || "",
customExample: jsDocInfo.example || "",
sourceFilePath: relativeFilePath,
}
}
// Handle variable declarations with function values
else if (Node.isVariableDeclaration(declaration)) {
let jsDocInfo = parseJsDoc(declaration)
// If no JSDoc found on the declaration, try the parent VariableStatement
if (!jsDocInfo.description) {
const parentList = declaration.getParent()
if (parentList) {
const parentStatement = parentList.getParent()
if (parentStatement) {
jsDocInfo = parseJsDoc(parentStatement)
}
}
}
const initializer = declaration.getInitializer()
// Check for function calls that might wrap a function (like withGlobalContext(createAccount))
if (initializer && Node.isCallExpression(initializer)) {
const args = initializer.getArguments()
// Check if the call expression itself is calling a function we can analyze
const callExpression = initializer.getExpression()
if (Node.isIdentifier(callExpression)) {
const functionName_inner = callExpression.getText()
// Look for the function being called (like createQuery)
const calledFunction = sourceFile.getFunction(functionName_inner)
if (calledFunction) {
// Look for inner function declarations within the called function
const innerFunctions = calledFunction.getFunctions()
if (innerFunctions.length > 0) {
// Get the first inner function (usually the one being returned)
const innerFunction = innerFunctions[0]
const innerFuncInfo = extractFunctionInfo(
innerFunction,
functionName,
sourceFile,
namespace
)
if (innerFuncInfo) {
// Merge JSDoc from the exported variable
return {
...innerFuncInfo,
description:
jsDocInfo.description || innerFuncInfo.description,
customExample:
jsDocInfo.example || innerFuncInfo.customExample,
}
}
}
// Also look for inner variable declarations that might contain arrow functions
const innerVariables = calledFunction.getVariableDeclarations()
if (innerVariables.length > 0) {
// Look for a variable with the same name as the function we're looking for
const matchingVariable = innerVariables.find(
v => v.getName() === functionName
)
if (matchingVariable) {
const innerFuncInfo = extractFunctionInfo(
matchingVariable,
functionName,
sourceFile,
namespace
)
if (innerFuncInfo) {
// Merge JSDoc from the exported variable
return {
...innerFuncInfo,
description:
jsDocInfo.description || innerFuncInfo.description,
customExample:
jsDocInfo.example || innerFuncInfo.customExample,
}
}
}
}
}
}
if (args.length > 0) {
const firstArg = args[0]
// If the first argument is an identifier, try to resolve it to a function
if (Node.isIdentifier(firstArg)) {
const argName = firstArg.getText()
// Look for the function with this name in the source file
const referencedFunction = sourceFile.getFunction(argName)
if (referencedFunction) {
// Look for inner function declarations within the referenced function
const innerFunctions = referencedFunction.getFunctions()
if (innerFunctions.length > 0) {
// Get the first inner function (usually the one being returned)
const innerFunction = innerFunctions[0]
const innerFuncInfo = extractFunctionInfo(
innerFunction,
functionName,
sourceFile,
namespace
)
if (innerFuncInfo) {
// Merge JSDoc from the exported variable, including nested parameters
const mergedParameters = innerFuncInfo.parameters.map(
param => {
// Check if there are nested JSDoc parameters for this parameter
let nestedParams = []
if (jsDocInfo.params) {
Object.keys(jsDocInfo.params).forEach(
jsDocParamName => {
if (jsDocParamName.startsWith(param.name + ".")) {
const nestedParamName = jsDocParamName.substring(
param.name.length + 1
)
// Extract nested parameter type from the parameter's TypeScript interface
let nestedParamType = "any"
try {
// Get the parameter from the inner function for type extraction
const innerParams =
innerFunction.getParameters()
const matchingParam = innerParams.find(p => {
let pName = p.getName()
if (
pName.includes("{") &&
pName.includes("}")
) {
const typeText = p.getType().getText()
let typeMatch =
typeText.match(/^([A-Z][a-zA-Z0-9]*)/)
if (!typeMatch) {
typeMatch = typeText.match(
/import\([^)]+\)\.([A-Z][a-zA-Z0-9]*)/
)
}
if (typeMatch && typeMatch[1]) {
pName = toCamelCase(typeMatch[1])
}
}
return pName === param.name
})
if (matchingParam) {
const paramTypeSymbol = matchingParam
.getType()
.getSymbol()
if (paramTypeSymbol) {
const typeDeclaration =
paramTypeSymbol.getDeclarations()?.[0]
if (
typeDeclaration &&
Node.isInterfaceDeclaration(
typeDeclaration
)
) {
const property =
typeDeclaration.getProperty(
nestedParamName
)
if (property) {
const propertyType = property.getType()
nestedParamType = cleanupTypeText(
propertyType.getText()
)
}
}
}
}
} catch (e) {
// Fallback to any
nestedParamType = "any"
}
nestedParams.push({
name: escapeParameterNameForMDX(
nestedParamName
),
type: nestedParamType,
required: true, // Default to required
description:
escapeTextForMDX(
jsDocInfo.params[jsDocParamName]
) || "",
})
}
}
)
}
return {
...param,
// Override description from JSDoc if available
description:
jsDocInfo.params && jsDocInfo.params[param.name]
? escapeTextForMDX(jsDocInfo.params[param.name])
: param.description,
nestedParams:
nestedParams.length > 0 ? nestedParams : undefined,
}
}
)
return {
...innerFuncInfo,
description:
jsDocInfo.description || innerFuncInfo.description,
customExample:
jsDocInfo.example || innerFuncInfo.customExample,
parameters: mergedParameters,
}
}
}
// Fallback: try to extract info directly from the referenced function
const referencedFuncInfo = extractFunctionInfo(
referencedFunction,
functionName,
sourceFile,
namespace
)
if (referencedFuncInfo) {
// Override with JSDoc from the exported variable
return {
...referencedFuncInfo,
description:
jsDocInfo.description || referencedFuncInfo.description,
customExample:
jsDocInfo.example || referencedFuncInfo.customExample,
}
}
}
}
}
}
if (
initializer &&
(Node.isFunctionExpression(initializer) ||
Node.isArrowFunction(initializer))
) {
const parameters = initializer.getParameters().map(param => {
let paramName = param.getName()
const paramType = cleanupTypeText(param.getType().getText())
const paramJsDoc = jsDocInfo.params && jsDocInfo.params[paramName]
// Handle destructured parameters by using camelCase of the type name
if (paramName.includes("{") && paramName.includes("}")) {
// Extract the type name from the parameter type
// Handle both direct types (AccountProofData) and import types (import("...").AccountProofData)
const typeText = param.getType().getText()
let typeMatch = typeText.match(/^([A-Z][a-zA-Z0-9]*)/) // Direct type
if (!typeMatch) {
typeMatch = typeText.match(/import\([^)]+\)\.([A-Z][a-zA-Z0-9]*)/) // Import type
}
if (typeMatch && typeMatch[1]) {
paramName = toCamelCase(typeMatch[1])
} else {
// Fallback to "options" if we can't extract a type name
paramName = "options"
}
}
// Handle nested JSDoc parameters (e.g., queryOptions.height)
let nestedParams = []
if (jsDocInfo.params) {
Object.keys(jsDocInfo.params).forEach(jsDocParamName => {
if (jsDocParamName.startsWith(paramName + ".")) {
const nestedParamName = jsDocParamName.substring(
paramName.length + 1
)
// Try to extract type information from the parameter's TypeScript type
let nestedParamType = "any"
try {
const paramTypeSymbol = param.getType().getSymbol()
if (paramTypeSymbol) {
const typeDeclaration =
paramTypeSymbol.getDeclarations()?.[0]
if (
typeDeclaration &&
Node.isInterfaceDeclaration(typeDeclaration)
) {
// Find the property in the interface
const property =
typeDeclaration.getProperty(nestedParamName)
if (property) {
const propertyType = property.getType()
nestedParamType = cleanupTypeText(
propertyType.getText()
)
}
}
}
} catch (e) {
// Fallback to any if type extraction fails
nestedParamType = "any"
}
nestedParams.push({
name: escapeParameterNameForMDX(nestedParamName),
type: nestedParamType,
required: true, // Default to required
description:
escapeTextForMDX(jsDocInfo.params[jsDocParamName]) || "",
})
}
})
}
return {
name: escapeParameterNameForMDX(paramName),
type: paramType,
required: !param.isOptional(),
description: escapeTextForMDX(paramJsDoc) || "",
nestedParams: nestedParams.length > 0 ? nestedParams : undefined,
}
})
// Get the actual return type, not the function signature
let returnType = "any"
try {
const funcReturnType = initializer.getReturnType()
const returnTypeText = funcReturnType.getText()
// If the return type text looks like a function signature, extract just the return part
if (returnTypeText.includes("=>")) {
const returnPart = returnTypeText.split("=>").pop()?.trim()
if (returnPart) {
returnType = cleanupTypeText(returnPart)
} else {
returnType = cleanupTypeText(returnTypeText)
}
} else {
returnType = cleanupTypeText(returnTypeText)
}
} catch (e) {
console.warn(`Error extracting return type: ${e.message}`)
returnType = "any"
}
// Extract return description from JSDoc
let returnDescription = null
if (jsDocInfo.returns) {
returnDescription = escapeTextForMDX(jsDocInfo.returns)
}
const filePath = sourceFile.getFilePath()
const relativeFilePath = path.relative(process.cwd(), filePath)
funcInfo = {
name: functionName,
returnType,
returnDescription,
parameters,
description: jsDocInfo.description || "",
customExample: jsDocInfo.example || "",
sourceFilePath: relativeFilePath,
}
}
// Handle variable declarations with JSDoc that represent functions
// (like resolve = pipe([...]) or other function-returning expressions)
else if (jsDocInfo.description || jsDocInfo.params || jsDocInfo.returns) {
// Extract parameter information from JSDoc if available
const parameters = []
if (jsDocInfo.params) {
// First, get all top-level parameters (those without dots)
const topLevelParams = Object.keys(jsDocInfo.params).filter(
paramName => !paramName.includes(".")
)
topLevelParams.forEach(paramName => {
const paramDesc = jsDocInfo.params[paramName]
// Handle nested JSDoc parameters (e.g., queryOptions.height)
let nestedParams = []
Object.keys(jsDocInfo.params).forEach(jsDocParamName => {
if (jsDocParamName.startsWith(paramName + ".")) {
const nestedParamName = jsDocParamName.substring(
paramName.length + 1
)
// For JSDoc-only cases, try to infer type from variable declaration
let nestedParamType = "any"
try {
const variableType = declaration.getType()
const typeSymbol = variableType.getSymbol()
if (typeSymbol) {
const typeDeclaration = typeSymbol.getDeclarations()?.[0]
if (
typeDeclaration &&
Node.isInterfaceDeclaration(typeDeclaration)
) {
const property =
typeDeclaration.getProperty(nestedParamName)
if (property) {
const propertyType = property.getType()
nestedParamType = cleanupTypeText(
propertyType.getText()
)
}
}
}
} catch (e) {
// Fallback to any
nestedParamType = "any"
}
nestedParams.push({
name: escapeParameterNameForMDX(nestedParamName),
type: nestedParamType,
required: true, // Default to required
description:
escapeTextForMDX(jsDocInfo.params[jsDocParamName]) || "",
})
}
})
parameters.push({
name: escapeParameterNameForMDX(paramName),
type: "any", // Default type since we can't infer from call expressions
required: true, // Default to required
description: escapeTextForMDX(paramDesc) || "",
nestedParams: nestedParams.length > 0 ? nestedParams : undefined,
})
})
}
// Get return type from JSDoc or try to infer from the variable type
let returnType = "any"
let returnDescription = null
if (jsDocInfo.returns) {
returnDescription = escapeTextForMDX(jsDocInfo.returns)
}
// Always try to get the actual TypeScript return type
try {
returnType = cleanupTypeText(declaration.getType().getText())
} catch (e) {
// Fallback to any if type inference fails
returnType = "any"
}
const filePath = sourceFile.getFilePath()
const relativeFilePath = path.relative(process.cwd(), filePath)
funcInfo = {
name: functionName,
returnType,
returnDescription,
parameters,
description: jsDocInfo.description || "",
customExample: jsDocInfo.example || "",
sourceFilePath: relativeFilePath,
}
}
}
// Add namespace if provided
if (funcInfo && namespace) {
funcInfo.namespace = namespace
}
return funcInfo
} catch (e) {
console.warn(
`Error extracting function info for ${functionName}: ${e.message}`
)
return null
}
}
function findFunctionInSourceFile(sourceFile, functionName) {
try {
// First, check if this function is re-exported from another module
// If it is, we should NOT try to extract it directly here, but let the re-export resolution handle it
const exportDeclarations = sourceFile.getExportDeclarations()
for (const exportDecl of exportDeclarations) {
const namedExports = exportDecl.getNamedExports()
const hasExport = namedExports.some(
namedExport => namedExport.getName() === functionName
)
if (hasExport && exportDecl.getModuleSpecifier()) {
return null // This will force the caller to use re-export resolution
}
}
const exportedDeclarations = sourceFile.getExportedDeclarations()
if (exportedDeclarations.has(functionName)) {
const declarations = exportedDeclarations.get(functionName)
for (const declaration of declarations) {
// Skip export declarations - we want actual function implementations
if (Node.isExportDeclaration(declaration)) {
continue
}
const funcInfo = extractFunctionInfo(
declaration,
functionName,
sourceFile
)
if (funcInfo) {
return funcInfo
}
}
}
return null
} catch (e) {
console.warn(
`Error finding function ${functionName} in source file: ${e.message}`
)
return null
}
}
function resolveOnFlowPackage(packageName) {
try {
// Look for the package in the workspace packages directory
// We need to account for the fact that the current working directory is already in packages/
const packagesDir = path.resolve(process.cwd(), "..")
const packageDir = path.join(packagesDir, packageName)
const packageJsonPath = path.join(packageDir, "package.json")
if (fs.existsSync(packageJsonPath)) {
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf8"))
const entryFile = packageJson.source || packageJson.main || "src/index.ts"
const entryFilePath = path.resolve(packageDir, entryFile)
if (fs.existsSync(entryFilePath)) {
return entryFilePath
}
}
return null
} catch (e) {
console.warn(`Error resolving @onflow/${packageName}: ${e.message}`)
return null
}
}
function resolveReExportedFunction(sourceFile, exportName, moduleSpecifier) {
try {
let referencedSourceFile = null
// Handle @onflow/ package specifiers
if (moduleSpecifier.startsWith("@onflow/")) {
const packageName = moduleSpecifier.replace("@onflow/", "")
const packageEntryPath = resolveOnFlowPackage(packageName)
if (packageEntryPath) {
// Get the ts-morph project from the source file
const project = sourceFile.getProject()
// Try to get the source file, or add it if not already added
referencedSourceFile = project.getSourceFile(packageEntryPath)
if (!referencedSourceFile) {
try {
referencedSourceFile = project.addSourceFileAtPath(packageEntryPath)
} catch (e) {
console.warn(
`Could not add source file at ${packageEntryPath}: ${e.message}`
)
}
}
}
} else {
// Handle relative imports - existing logic
const referencedSourceFiles = sourceFile.getReferencedSourceFiles()
// Find the source file that matches the module specifier
// Try exact matches first, then partial matches
const candidates = []
for (const sf of referencedSourceFiles) {
const fileName = path.basename(sf.getFilePath(), ".ts")
const moduleFileName = path.basename(moduleSpecifier, ".ts")
// Exact match (highest priority)
if (fileName === moduleFileName) {
candidates.push({sf, priority: 1})
}
// Path includes the module specifier
else if (
sf.getFilePath().includes(moduleSpecifier) ||
sf.getFilePath().includes(moduleSpecifier.replace("./", ""))
) {
candidates.push({sf, priority: 2})
}
}
// Sort by priority and take the first (exact matches first)
if (candidates.length > 0) {
candidates.sort((a, b) => a.priority - b.priority)
referencedSourceFile = candidates[0].sf
}
}
if (referencedSourceFile) {
const funcInfo = findFunctionInSourceFile(
referencedSourceFile,
exportName
)
if (funcInfo) {
return funcInfo
}
// If not found in the entry file, check if it's re-exported from elsewhere
// Look through export declarations to find where this function comes from
const exportDeclarations = referencedSourceFile.getExportDeclarations()
for (const exportDecl of exportDeclarations) {
const namedExports = exportDecl.getNamedExports()
// Check if this export contains our function (including checking both name and alias)
const hasExport = namedExports.some(namedExport => {
const name = namedExport.getName()
const alias = namedExport.getAliasNode()?.getText()
const finalName = alias || name
return finalName === exportName || name === exportName
})
if (hasExport) {
const moduleSpec = exportDecl.getModuleSpecifier()
if (moduleSpec) {
const moduleSpecValue = moduleSpec.getLiteralValue()
// Find the original name to look up in the target module
const matchingExport = namedExports.find(namedExport => {
const name = namedExport.getName()
const alias = namedExport.getAliasNode()?.getText()
const finalName = alias || name
return finalName === exportName || name === exportName
})
const originalNameToLookup = matchingExport?.getName() || exportName
// Recursively resolve from the module this export comes from
return resolveReExportedFunction(
referencedSourceFile,
originalNameToLookup,
moduleSpecValue
)
}
gitextract_j_zi96gh/ ├── .changeset/ │ ├── README.md │ └── config.json ├── .github/ │ ├── ISSUE_TEMPLATE/ │ │ ├── bug_report.yml │ │ └── feature_request.yml │ ├── scripts/ │ │ └── prevent-major-bumps.js │ └── workflows/ │ ├── add-pitches-to-project.yml │ ├── changeset-check.yml │ ├── code-analysis.yml │ ├── dependancy-review.yml │ ├── integrate.yml │ ├── promote-playground.yml │ └── release.yml ├── .gitignore ├── .prettierignore ├── .prettierrc ├── AGENTS.md ├── CHANGELOG.md ├── CITATION.cff ├── CODEOWNERS ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── Makefile ├── NOTICE ├── README.md ├── SECURITY.md ├── docs/ │ ├── flow-docs.json │ ├── index.md │ ├── index.mdx │ ├── reference/ │ │ ├── api.md │ │ ├── authentication.mdx │ │ ├── configure-fcl.mdx │ │ ├── discovery.mdx │ │ ├── installation.mdx │ │ ├── interaction-templates.mdx │ │ ├── proving-authentication.mdx │ │ ├── scripts.mdx │ │ ├── sdk-guidelines.mdx │ │ ├── transactions.mdx │ │ ├── user-signatures.mdx │ │ └── wallet-connect.mdx │ └── tutorials/ │ └── flow-app-quickstart.mdx ├── docs-generator/ │ ├── README.md │ ├── generate-all-docs.js │ ├── generate-docs.js │ ├── generators/ │ │ ├── generate-function-page.js │ │ ├── generate-namespace-page.js │ │ ├── generate-package-page.js │ │ ├── generate-root-page.js │ │ ├── generate-types-page.js │ │ ├── index.js │ │ └── utils/ │ │ ├── extract-utils.js │ │ ├── generate-page.js │ │ ├── index.js │ │ └── parse-config-custom-data.js │ ├── templates/ │ │ ├── function.hbs │ │ ├── namespace.hbs │ │ ├── package.hbs │ │ ├── root.hbs │ │ └── types.hbs │ └── utils/ │ ├── export-extractor.js │ ├── file-utils.js │ ├── function-extractor.js │ ├── index.js │ ├── jsdoc-parser.js │ ├── namespace-utils.js │ ├── type-utils.js │ └── typescript-formatter.js ├── jest.config.js ├── lerna.json ├── package.json ├── packages/ │ ├── config/ │ │ ├── .babelrc │ │ ├── .browserslistrc │ │ ├── .eslintrc.json │ │ ├── .npmignore │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── package.json │ │ ├── src/ │ │ │ ├── config.test.ts │ │ │ ├── config.ts │ │ │ └── utils/ │ │ │ ├── utils.test.ts │ │ │ └── utils.ts │ │ └── tsconfig.json │ ├── demo/ │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── DEPLOY.md │ │ ├── README.md │ │ ├── emulator.key │ │ ├── eslint.config.ts │ │ ├── index.html │ │ ├── package.json │ │ ├── postcss.config.js │ │ ├── public/ │ │ │ ├── robots.txt │ │ │ └── sitemap.xml │ │ ├── src/ │ │ │ ├── app.css │ │ │ ├── app.tsx │ │ │ ├── components/ │ │ │ │ ├── advanced-cards/ │ │ │ │ │ ├── dark-mode-card.tsx │ │ │ │ │ └── theming-card.tsx │ │ │ │ ├── component-cards/ │ │ │ │ │ ├── connect-card.tsx │ │ │ │ │ ├── demo-nft-card.tsx │ │ │ │ │ ├── profile-card.tsx │ │ │ │ │ ├── scheduled-transaction-list-demo.tsx │ │ │ │ │ ├── transaction-button-card.tsx │ │ │ │ │ ├── transaction-dialog-card.tsx │ │ │ │ │ └── transaction-link-card.tsx │ │ │ │ ├── content-section.tsx │ │ │ │ ├── content-sidebar.tsx │ │ │ │ ├── flow-provider-wrapper.tsx │ │ │ │ ├── footer.tsx │ │ │ │ ├── header.tsx │ │ │ │ ├── hook-cards/ │ │ │ │ │ ├── use-cross-vm-bridge-nft-from-evm-card.tsx │ │ │ │ │ ├── use-cross-vm-bridge-nft-to-evm-card.tsx │ │ │ │ │ ├── use-cross-vm-bridge-token-from-evm-card.tsx │ │ │ │ │ ├── use-cross-vm-bridge-token-to-evm-card.tsx │ │ │ │ │ ├── use-flow-account-card.tsx │ │ │ │ │ ├── use-flow-block-card.tsx │ │ │ │ │ ├── use-flow-chain-id-card.tsx │ │ │ │ │ ├── use-flow-config-card.tsx │ │ │ │ │ ├── use-flow-current-user-card.tsx │ │ │ │ │ ├── use-flow-events-card.tsx │ │ │ │ │ ├── use-flow-mutate-card.tsx │ │ │ │ │ ├── use-flow-nft-metadata-card.tsx │ │ │ │ │ ├── use-flow-query-card.tsx │ │ │ │ │ ├── use-flow-query-raw-card.tsx │ │ │ │ │ ├── use-flow-revertible-random-card.tsx │ │ │ │ │ ├── use-flow-scheduled-transaction-card.tsx │ │ │ │ │ └── use-flow-transaction-status-card.tsx │ │ │ │ ├── setup-cards/ │ │ │ │ │ └── installation-card.tsx │ │ │ │ ├── starter-banner.tsx │ │ │ │ └── ui/ │ │ │ │ ├── code-editor.tsx │ │ │ │ ├── code-viewer.tsx │ │ │ │ ├── demo-card.tsx │ │ │ │ ├── error-boundary.tsx │ │ │ │ ├── inline-code.tsx │ │ │ │ ├── json-viewer.tsx │ │ │ │ ├── loading-spinner.tsx │ │ │ │ ├── plus-grid.tsx │ │ │ │ ├── props-viewer.tsx │ │ │ │ └── results-section.tsx │ │ │ ├── constants.ts │ │ │ ├── main.tsx │ │ │ ├── utils/ │ │ │ │ └── chain-helpers.ts │ │ │ ├── utils.ts │ │ │ └── vite-env.d.ts │ │ ├── tailwind.config.js │ │ ├── tsconfig.app.json │ │ ├── tsconfig.json │ │ ├── tsconfig.node.json │ │ └── vite.config.ts │ ├── fcl/ │ │ ├── .babelrc │ │ ├── .browserslistrc │ │ ├── .eslintrc.json │ │ ├── .npmignore │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── TRANSITIONS.md │ │ ├── docs/ │ │ │ └── extra.md │ │ ├── docs-generator.config.js │ │ ├── package.json │ │ ├── src/ │ │ │ ├── VERSION.ts │ │ │ ├── client.ts │ │ │ ├── discovery/ │ │ │ │ ├── exec-discovery.ts │ │ │ │ ├── exec-hook.ts │ │ │ │ └── rpc/ │ │ │ │ ├── client.ts │ │ │ │ ├── handlers/ │ │ │ │ │ ├── exec-service.ts │ │ │ │ │ └── request-wc-qr.ts │ │ │ │ └── requests.ts │ │ │ ├── fcl.ts │ │ │ └── utils/ │ │ │ ├── async.ts │ │ │ ├── walletconnect/ │ │ │ │ └── loader.ts │ │ │ └── web/ │ │ │ ├── __tests__/ │ │ │ │ └── default-config.test.js │ │ │ ├── coreStrategies.js │ │ │ ├── default-config.js │ │ │ ├── exec-local.js │ │ │ ├── index.js │ │ │ ├── render-frame.js │ │ │ ├── render-pop.js │ │ │ ├── render-tab.js │ │ │ ├── storage.ts │ │ │ └── strategies/ │ │ │ ├── ext-rpc.js │ │ │ ├── iframe-rpc.js │ │ │ ├── pop-rpc.js │ │ │ ├── tab-rpc.js │ │ │ └── utils/ │ │ │ ├── extension.js │ │ │ ├── frame.js │ │ │ ├── pop.js │ │ │ └── tab.js │ │ └── tsconfig.json │ ├── fcl-bundle/ │ │ ├── .babelrc │ │ ├── .browserslistrc │ │ ├── .npmignore │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── package.json │ │ └── src/ │ │ ├── build/ │ │ │ ├── build-watch.js │ │ │ ├── build.js │ │ │ ├── get-input-options.js │ │ │ ├── get-output-options.js │ │ │ └── watcher-pool.js │ │ ├── cli.js │ │ ├── get-package-json.js │ │ ├── package-config.js │ │ ├── plugins/ │ │ │ ├── banner.js │ │ │ └── preserve-dynamic-imports.js │ │ ├── program.js │ │ └── util.js │ ├── fcl-core/ │ │ ├── .babelrc │ │ ├── .browserslistrc │ │ ├── .eslintrc.json │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── TRANSITIONS.md │ │ ├── WARNINGS.md │ │ ├── assets/ │ │ │ └── service-method-diagrams/ │ │ │ ├── http-post.excalidraw │ │ │ ├── iframe-rpc.excalidraw │ │ │ ├── pop-rpc.excalidraw │ │ │ └── tab-rpc.excalidraw │ │ ├── docs/ │ │ │ └── extra.md │ │ ├── docs-generator.config.js │ │ ├── package.json │ │ ├── src/ │ │ │ ├── VERSION.ts │ │ │ ├── app-utils/ │ │ │ │ ├── __tests__/ │ │ │ │ │ └── verify-user-sig.test.ts │ │ │ │ ├── index.ts │ │ │ │ └── verify-signatures.ts │ │ │ ├── client.ts │ │ │ ├── context/ │ │ │ │ ├── global.ts │ │ │ │ └── index.ts │ │ │ ├── current-user/ │ │ │ │ ├── build-user.ts │ │ │ │ ├── exec-service/ │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── plugins.ts │ │ │ │ │ ├── strategies/ │ │ │ │ │ │ ├── http-post.ts │ │ │ │ │ │ └── utils/ │ │ │ │ │ │ ├── buildMessageHandler.ts │ │ │ │ │ │ ├── fetch-service.ts │ │ │ │ │ │ ├── poll.ts │ │ │ │ │ │ └── service-endpoint.ts │ │ │ │ │ └── wc-check.ts │ │ │ │ ├── fetch-services.ts │ │ │ │ ├── index.ts │ │ │ │ ├── merge-services.ts │ │ │ │ ├── service-of-type.test.ts │ │ │ │ ├── service-of-type.ts │ │ │ │ └── url-from-service.ts │ │ │ ├── default-config.ts │ │ │ ├── discovery/ │ │ │ │ ├── index.ts │ │ │ │ ├── services/ │ │ │ │ │ └── authn.ts │ │ │ │ ├── services.test.ts │ │ │ │ ├── services.ts │ │ │ │ └── utils.ts │ │ │ ├── document/ │ │ │ │ ├── document.test.ts │ │ │ │ └── document.ts │ │ │ ├── events/ │ │ │ │ ├── index.test.ts │ │ │ │ ├── index.ts │ │ │ │ └── legacy-events.ts │ │ │ ├── exec/ │ │ │ │ ├── args.ts │ │ │ │ ├── mutate.md │ │ │ │ ├── mutate.ts │ │ │ │ ├── query-raw.ts │ │ │ │ ├── query.md │ │ │ │ ├── query.ts │ │ │ │ ├── utils/ │ │ │ │ │ ├── normalize-args.ts │ │ │ │ │ ├── pre.ts │ │ │ │ │ ├── prep-template-opts.test.ts │ │ │ │ │ └── prep-template-opts.ts │ │ │ │ └── verify.ts │ │ │ ├── fcl-core.ts │ │ │ ├── fcl.test.ts │ │ │ ├── interaction-template-utils/ │ │ │ │ ├── derive-cadence-by-network/ │ │ │ │ │ ├── derive-cadence-by-network-1.0.0.ts │ │ │ │ │ ├── derive-cadence-by-network-1.1.0.ts │ │ │ │ │ ├── derive-cadence-by-network.test.ts │ │ │ │ │ └── derive-cadence-by-network.ts │ │ │ │ ├── generate-dependency-pin/ │ │ │ │ │ ├── generate-dependency-pin-1.0.0.ts │ │ │ │ │ ├── generate-dependency-pin-1.1.0.ts │ │ │ │ │ ├── generate-dependency-pin.test.ts │ │ │ │ │ └── generate-dependency-pin.ts │ │ │ │ ├── generate-template-id/ │ │ │ │ │ ├── generate-template-id-1.0.0.ts │ │ │ │ │ ├── generate-template-id-1.1.0.test.ts │ │ │ │ │ ├── generate-template-id-1.1.0.ts │ │ │ │ │ └── generate-template-id.ts │ │ │ │ ├── get-interaction-template-audits.ts │ │ │ │ ├── get-template-argument-message.test.ts │ │ │ │ ├── get-template-argument-message.ts │ │ │ │ ├── get-template-message.test.ts │ │ │ │ ├── get-template-message.ts │ │ │ │ ├── index.ts │ │ │ │ ├── interaction-template.ts │ │ │ │ ├── utils/ │ │ │ │ │ ├── find-imports.test.ts │ │ │ │ │ ├── find-imports.ts │ │ │ │ │ ├── generate-import.ts │ │ │ │ │ ├── hash.ts │ │ │ │ │ ├── replace-string-imports.test.ts │ │ │ │ │ └── replace-string-imports.ts │ │ │ │ ├── verify-dependency-pin-same-at-block.test.ts │ │ │ │ └── verify-dependency-pin-same-at-block.ts │ │ │ ├── normalizers/ │ │ │ │ └── service/ │ │ │ │ ├── __vsn.ts │ │ │ │ ├── account-proof.ts │ │ │ │ ├── authn-refresh.ts │ │ │ │ ├── authn.ts │ │ │ │ ├── authz.ts │ │ │ │ ├── back-channel-rpc.ts │ │ │ │ ├── composite-signature.ts │ │ │ │ ├── frame.ts │ │ │ │ ├── local-view.ts │ │ │ │ ├── open-id.ts │ │ │ │ ├── polling-response.ts │ │ │ │ ├── pre-authz.ts │ │ │ │ ├── service.ts │ │ │ │ └── user-signature.ts │ │ │ ├── serialize/ │ │ │ │ └── index.ts │ │ │ ├── test-utils/ │ │ │ │ ├── index.ts │ │ │ │ └── mock-context.ts │ │ │ ├── transaction/ │ │ │ │ ├── constants.ts │ │ │ │ ├── index.ts │ │ │ │ ├── legacy-polling.js │ │ │ │ ├── legacy-polling.test.js │ │ │ │ ├── transaction-error.test.ts │ │ │ │ ├── transaction-error.ts │ │ │ │ ├── transaction.test.ts │ │ │ │ ├── transaction.ts │ │ │ │ ├── types.ts │ │ │ │ └── utils.ts │ │ │ ├── utils/ │ │ │ │ ├── chain-id/ │ │ │ │ │ ├── chain-id-watcher.test.ts │ │ │ │ │ ├── chain-id-watcher.ts │ │ │ │ │ ├── fetch-chain-id.ts │ │ │ │ │ ├── get-chain-id.test.ts │ │ │ │ │ └── get-chain-id.ts │ │ │ │ ├── constants.ts │ │ │ │ ├── index.ts │ │ │ │ ├── is-react-native.ts │ │ │ │ ├── is.ts │ │ │ │ ├── storage.ts │ │ │ │ └── url.ts │ │ │ ├── wallet-provider-spec/ │ │ │ │ ├── README.md │ │ │ │ ├── assets/ │ │ │ │ │ ├── fcl-ars-auth-v1.excalidraw │ │ │ │ │ ├── fcl-ars-auth-v2.excalidraw │ │ │ │ │ ├── fcl-ars-auth-v3.1.excalidraw │ │ │ │ │ ├── fcl-ars-auth-v3.2.excalidraw │ │ │ │ │ └── fcl-ars-auth-v3.excalidraw │ │ │ │ ├── authorization-function.md │ │ │ │ ├── custodial.md │ │ │ │ ├── draft-v2.md │ │ │ │ ├── draft-v3.md │ │ │ │ ├── draft-v4.md │ │ │ │ ├── draft.md │ │ │ │ ├── non-custodial.md │ │ │ │ ├── provable-authn.md │ │ │ │ ├── user-signature.md │ │ │ │ └── wallet-discover.md │ │ │ └── wallet-utils/ │ │ │ ├── CompositeSignature.ts │ │ │ ├── encode-account-proof.test.ts │ │ │ ├── encode-account-proof.ts │ │ │ ├── index.ts │ │ │ ├── inject-ext-service.ts │ │ │ ├── on-message-from-fcl.ts │ │ │ ├── send-msg-to-fcl.ts │ │ │ └── wallet-utils.test.ts │ │ └── tsconfig.json │ ├── fcl-ethereum-provider/ │ │ ├── .babelrc │ │ ├── .browserslistrc │ │ ├── .eslintrc.json │ │ ├── .npmignore │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── package.json │ │ ├── src/ │ │ │ ├── __mocks__/ │ │ │ │ └── fcl.ts │ │ │ ├── accounts/ │ │ │ │ ├── account-manager.test.ts │ │ │ │ ├── account-manager.ts │ │ │ │ └── sign-message.test.ts │ │ │ ├── cadence.ts │ │ │ ├── constants.ts │ │ │ ├── create-provider.ts │ │ │ ├── events/ │ │ │ │ ├── event-dispatcher.test.ts │ │ │ │ └── event-dispatcher.ts │ │ │ ├── gateway/ │ │ │ │ ├── gateway.test.ts │ │ │ │ └── gateway.ts │ │ │ ├── hash-utils.test.ts │ │ │ ├── hash-utils.ts │ │ │ ├── index.ts │ │ │ ├── network/ │ │ │ │ ├── network-manager.test.ts │ │ │ │ └── network-manager.ts │ │ │ ├── notifications.ts │ │ │ ├── provider.test.ts │ │ │ ├── provider.ts │ │ │ ├── rpc/ │ │ │ │ ├── handlers/ │ │ │ │ │ ├── eth-accounts.test.ts │ │ │ │ │ ├── eth-accounts.ts │ │ │ │ │ ├── eth-chain-id.test.ts │ │ │ │ │ ├── eth-chain-id.ts │ │ │ │ │ ├── eth-send-transaction.test.ts │ │ │ │ │ ├── eth-send-transaction.ts │ │ │ │ │ ├── eth-signtypeddata.ts │ │ │ │ │ └── personal-sign.ts │ │ │ │ ├── rpc-processor.test.ts │ │ │ │ ├── rpc-processor.ts │ │ │ │ └── types.ts │ │ │ ├── types/ │ │ │ │ ├── account.ts │ │ │ │ ├── eth.ts │ │ │ │ ├── events.ts │ │ │ │ └── provider.ts │ │ │ ├── util/ │ │ │ │ ├── chain.ts │ │ │ │ ├── errors.ts │ │ │ │ ├── eth.ts │ │ │ │ ├── observable.ts │ │ │ │ └── transaction.ts │ │ │ └── wc-provider.ts │ │ └── tsconfig.json │ ├── fcl-rainbowkit-adapter/ │ │ ├── .babelrc │ │ ├── .browserslistrc │ │ ├── .eslintrc.json │ │ ├── .npmignore │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── package.json │ │ ├── src/ │ │ │ ├── create-connector.ts │ │ │ ├── fcl-rainbowkit-adapter.test.ts │ │ │ ├── get-wc-connector.ts │ │ │ ├── index.ts │ │ │ ├── use-is-cadence-wallet-connected.ts │ │ │ └── wallets/ │ │ │ ├── flow-wallet.ts │ │ │ └── wc-wallet.ts │ │ └── tsconfig.json │ ├── fcl-react-native/ │ │ ├── .babelrc │ │ ├── .browserslistrc │ │ ├── .eslintrc.json │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── docs/ │ │ │ └── extra.md │ │ ├── docs-generator.config.js │ │ ├── package.json │ │ ├── src/ │ │ │ ├── VERSION.ts │ │ │ ├── client.ts │ │ │ ├── fcl-react-native.ts │ │ │ ├── utils/ │ │ │ │ └── react-native/ │ │ │ │ ├── ConnectModal.js │ │ │ │ ├── ConnectModalProvider.js │ │ │ │ ├── ServiceDiscovery.js │ │ │ │ ├── __tests__/ │ │ │ │ │ └── default-config.test.js │ │ │ │ ├── constants.js │ │ │ │ ├── coreStrategies.js │ │ │ │ ├── default-config.js │ │ │ │ ├── exec-local.js │ │ │ │ ├── index.js │ │ │ │ ├── render-browser.js │ │ │ │ ├── render-deeplink.js │ │ │ │ ├── storage.ts │ │ │ │ └── strategies/ │ │ │ │ ├── deeplink-rpc.js │ │ │ │ ├── discovery-rn.js │ │ │ │ └── utils/ │ │ │ │ ├── browser.js │ │ │ │ └── service-endpoint.js │ │ │ └── walletconnect/ │ │ │ ├── client.ts │ │ │ ├── constants.ts │ │ │ ├── index.ts │ │ │ ├── loader.ts │ │ │ ├── service.ts │ │ │ └── session.ts │ │ └── tsconfig.json │ ├── fcl-wagmi-adapter/ │ │ ├── .babelrc │ │ ├── .browserslistrc │ │ ├── .eslintrc.json │ │ ├── .npmignore │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── package.json │ │ ├── src/ │ │ │ ├── fcl-connector.ts │ │ │ ├── fcl-wagmi-adapter.test.ts │ │ │ ├── index.ts │ │ │ └── wc-connector.ts │ │ └── tsconfig.json │ ├── fcl-wc/ │ │ ├── .babelrc │ │ ├── .browserslistrc │ │ ├── .eslintrc.json │ │ ├── .npmignore │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── jest.config.js │ │ ├── jest.setup.ts │ │ ├── package.json │ │ ├── postcss.config.js │ │ ├── src/ │ │ │ ├── constants.ts │ │ │ ├── fcl-wc.test.ts │ │ │ ├── fcl-wc.ts │ │ │ ├── index.ts │ │ │ ├── mocks/ │ │ │ │ └── file-mock.ts │ │ │ ├── service.ts │ │ │ ├── session.ts │ │ │ ├── store.ts │ │ │ ├── types/ │ │ │ │ ├── declarations.d.ts │ │ │ │ └── types.ts │ │ │ ├── ui/ │ │ │ │ ├── components/ │ │ │ │ │ └── Notification.tsx │ │ │ │ ├── notifications.tsx │ │ │ │ └── styles.css │ │ │ └── utils.ts │ │ ├── tailwind.config.js │ │ └── tsconfig.json │ ├── protobuf/ │ │ ├── .babelrc │ │ ├── .browserslistrc │ │ ├── .npmignore │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── package.json │ │ ├── src/ │ │ │ ├── generated/ │ │ │ │ └── flow/ │ │ │ │ ├── access/ │ │ │ │ │ ├── access_pb.d.ts │ │ │ │ │ ├── access_pb.js │ │ │ │ │ ├── access_pb_service.d.ts │ │ │ │ │ └── access_pb_service.js │ │ │ │ ├── entities/ │ │ │ │ │ ├── account_pb.d.ts │ │ │ │ │ ├── account_pb.js │ │ │ │ │ ├── account_pb_service.d.ts │ │ │ │ │ ├── account_pb_service.js │ │ │ │ │ ├── block_execution_data_pb.d.ts │ │ │ │ │ ├── block_execution_data_pb.js │ │ │ │ │ ├── block_execution_data_pb_service.d.ts │ │ │ │ │ ├── block_execution_data_pb_service.js │ │ │ │ │ ├── block_header_pb.d.ts │ │ │ │ │ ├── block_header_pb.js │ │ │ │ │ ├── block_header_pb_service.d.ts │ │ │ │ │ ├── block_header_pb_service.js │ │ │ │ │ ├── block_pb.d.ts │ │ │ │ │ ├── block_pb.js │ │ │ │ │ ├── block_pb_service.d.ts │ │ │ │ │ ├── block_pb_service.js │ │ │ │ │ ├── block_seal_pb.d.ts │ │ │ │ │ ├── block_seal_pb.js │ │ │ │ │ ├── block_seal_pb_service.d.ts │ │ │ │ │ ├── block_seal_pb_service.js │ │ │ │ │ ├── collection_pb.d.ts │ │ │ │ │ ├── collection_pb.js │ │ │ │ │ ├── collection_pb_service.d.ts │ │ │ │ │ ├── collection_pb_service.js │ │ │ │ │ ├── event_pb.d.ts │ │ │ │ │ ├── event_pb.js │ │ │ │ │ ├── event_pb_service.d.ts │ │ │ │ │ ├── event_pb_service.js │ │ │ │ │ ├── execution_result_pb.d.ts │ │ │ │ │ ├── execution_result_pb.js │ │ │ │ │ ├── execution_result_pb_service.d.ts │ │ │ │ │ ├── execution_result_pb_service.js │ │ │ │ │ ├── metadata_pb.d.ts │ │ │ │ │ ├── metadata_pb.js │ │ │ │ │ ├── metadata_pb_service.d.ts │ │ │ │ │ ├── metadata_pb_service.js │ │ │ │ │ ├── node_version_info_pb.d.ts │ │ │ │ │ ├── node_version_info_pb.js │ │ │ │ │ ├── node_version_info_pb_service.d.ts │ │ │ │ │ ├── node_version_info_pb_service.js │ │ │ │ │ ├── register_pb.d.ts │ │ │ │ │ ├── register_pb.js │ │ │ │ │ ├── register_pb_service.d.ts │ │ │ │ │ ├── register_pb_service.js │ │ │ │ │ ├── transaction_pb.d.ts │ │ │ │ │ ├── transaction_pb.js │ │ │ │ │ ├── transaction_pb_service.d.ts │ │ │ │ │ └── transaction_pb_service.js │ │ │ │ ├── execution/ │ │ │ │ │ ├── execution_pb.d.ts │ │ │ │ │ ├── execution_pb.js │ │ │ │ │ ├── execution_pb_service.d.ts │ │ │ │ │ └── execution_pb_service.js │ │ │ │ └── executiondata/ │ │ │ │ ├── executiondata_pb.d.ts │ │ │ │ ├── executiondata_pb.js │ │ │ │ ├── executiondata_pb_service.d.ts │ │ │ │ └── executiondata_pb_service.js │ │ │ ├── index.js │ │ │ ├── index.test.js │ │ │ └── proto/ │ │ │ └── flow/ │ │ │ ├── access/ │ │ │ │ └── access.proto │ │ │ ├── entities/ │ │ │ │ ├── account.proto │ │ │ │ ├── block.proto │ │ │ │ ├── block_execution_data.proto │ │ │ │ ├── block_header.proto │ │ │ │ ├── block_seal.proto │ │ │ │ ├── collection.proto │ │ │ │ ├── event.proto │ │ │ │ ├── execution_result.proto │ │ │ │ ├── metadata.proto │ │ │ │ ├── node_version_info.proto │ │ │ │ ├── register.proto │ │ │ │ └── transaction.proto │ │ │ ├── execution/ │ │ │ │ └── execution.proto │ │ │ ├── executiondata/ │ │ │ │ └── executiondata.proto │ │ │ └── legacy/ │ │ │ ├── access/ │ │ │ │ └── access.proto │ │ │ ├── entities/ │ │ │ │ ├── account.proto │ │ │ │ ├── block.proto │ │ │ │ ├── block_header.proto │ │ │ │ ├── block_seal.proto │ │ │ │ ├── collection.proto │ │ │ │ ├── event.proto │ │ │ │ └── transaction.proto │ │ │ └── execution/ │ │ │ └── execution.proto │ │ └── webpack.config.js │ ├── react-core/ │ │ ├── .npmignore │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── babel.config.js │ │ ├── jest.config.js │ │ ├── package.json │ │ ├── src/ │ │ │ ├── __mocks__/ │ │ │ │ ├── TestProvider.tsx │ │ │ │ ├── flow-client.ts │ │ │ │ ├── tx.ts │ │ │ │ └── user.ts │ │ │ ├── constants.ts │ │ │ ├── core/ │ │ │ │ ├── context.ts │ │ │ │ ├── index.ts │ │ │ │ └── types.ts │ │ │ ├── hooks/ │ │ │ │ ├── index.ts │ │ │ │ ├── useCrossVmBatchTransaction.test.ts │ │ │ │ ├── useCrossVmBatchTransaction.ts │ │ │ │ ├── useCrossVmBridgeNftFromEvm.test.ts │ │ │ │ ├── useCrossVmBridgeNftFromEvm.ts │ │ │ │ ├── useCrossVmBridgeNftToEvm.test.ts │ │ │ │ ├── useCrossVmBridgeNftToEvm.ts │ │ │ │ ├── useCrossVmBridgeTokenFromEvm.test.ts │ │ │ │ ├── useCrossVmBridgeTokenFromEvm.ts │ │ │ │ ├── useCrossVmBridgeTokenToEvm.test.ts │ │ │ │ ├── useCrossVmBridgeTokenToEvm.ts │ │ │ │ ├── useCrossVmSpendNft.test.ts │ │ │ │ ├── useCrossVmSpendNft.ts │ │ │ │ ├── useCrossVmSpendToken.test.ts │ │ │ │ ├── useCrossVmSpendToken.ts │ │ │ │ ├── useCrossVmTokenBalance.test.ts │ │ │ │ ├── useCrossVmTokenBalance.ts │ │ │ │ ├── useCrossVmTransactionStatus.test.ts │ │ │ │ ├── useCrossVmTransactionStatus.ts │ │ │ │ ├── useFlowAccount.test.ts │ │ │ │ ├── useFlowAccount.ts │ │ │ │ ├── useFlowAuthz.test.ts │ │ │ │ ├── useFlowAuthz.ts │ │ │ │ ├── useFlowBlock.test.ts │ │ │ │ ├── useFlowBlock.ts │ │ │ │ ├── useFlowChainId.test.ts │ │ │ │ ├── useFlowChainId.ts │ │ │ │ ├── useFlowClient.ts │ │ │ │ ├── useFlowConfig.ts │ │ │ │ ├── useFlowCurrentUser.test.ts │ │ │ │ ├── useFlowCurrentUser.ts │ │ │ │ ├── useFlowEvents.test.ts │ │ │ │ ├── useFlowEvents.ts │ │ │ │ ├── useFlowMutate.test.ts │ │ │ │ ├── useFlowMutate.ts │ │ │ │ ├── useFlowNftMetadata.test.ts │ │ │ │ ├── useFlowNftMetadata.ts │ │ │ │ ├── useFlowQuery.test.ts │ │ │ │ ├── useFlowQuery.ts │ │ │ │ ├── useFlowQueryRaw.test.ts │ │ │ │ ├── useFlowQueryRaw.ts │ │ │ │ ├── useFlowRevertibleRandom.test.tsx │ │ │ │ ├── useFlowRevertibleRandom.ts │ │ │ │ ├── useFlowScheduledTransaction.test.ts │ │ │ │ ├── useFlowScheduledTransaction.ts │ │ │ │ ├── useFlowScheduledTransactionCancel.test.ts │ │ │ │ ├── useFlowScheduledTransactionCancel.ts │ │ │ │ ├── useFlowScheduledTransactionList.test.ts │ │ │ │ ├── useFlowScheduledTransactionList.ts │ │ │ │ ├── useFlowScheduledTransactionSetup.test.ts │ │ │ │ ├── useFlowScheduledTransactionSetup.ts │ │ │ │ ├── useFlowTransaction.test.ts │ │ │ │ ├── useFlowTransaction.ts │ │ │ │ ├── useFlowTransactionStatus.test.ts │ │ │ │ └── useFlowTransactionStatus.ts │ │ │ ├── index.ts │ │ │ ├── jest-setup.ts │ │ │ ├── provider/ │ │ │ │ ├── FlowQueryClient.tsx │ │ │ │ ├── GlobalTransactionProvider.tsx │ │ │ │ └── index.ts │ │ │ └── utils/ │ │ │ ├── address.ts │ │ │ ├── deepEqual.ts │ │ │ ├── flowscan.ts │ │ │ └── index.ts │ │ └── tsconfig.json │ ├── react-native-sdk/ │ │ ├── .babelrc │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── jest.config.js │ │ ├── package.json │ │ ├── src/ │ │ │ ├── __mocks__/ │ │ │ │ └── noop.ts │ │ │ ├── components/ │ │ │ │ ├── Connect.tsx │ │ │ │ ├── Profile.tsx │ │ │ │ └── index.ts │ │ │ ├── icons/ │ │ │ │ ├── CheckIcon.tsx │ │ │ │ ├── CopyIcon.tsx │ │ │ │ ├── ExternalLinkIcon.tsx │ │ │ │ ├── LogOutIcon.tsx │ │ │ │ ├── UserIcon.tsx │ │ │ │ └── index.ts │ │ │ ├── index.ts │ │ │ ├── provider/ │ │ │ │ ├── FlowProvider.tsx │ │ │ │ └── index.ts │ │ │ └── styles/ │ │ │ ├── colors.ts │ │ │ ├── dimensions.ts │ │ │ └── index.ts │ │ └── tsconfig.json │ ├── react-sdk/ │ │ ├── .babelrc │ │ ├── .browserslistrc │ │ ├── .npmignore │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── jest.config.js │ │ ├── package.json │ │ ├── postcss.config.js │ │ ├── src/ │ │ │ ├── __mocks__/ │ │ │ │ ├── fcl.ts │ │ │ │ ├── flow-client.ts │ │ │ │ ├── noop.ts │ │ │ │ ├── tx.ts │ │ │ │ └── user.ts │ │ │ ├── components/ │ │ │ │ ├── Connect.tsx │ │ │ │ ├── NftCard.tsx │ │ │ │ ├── Profile.tsx │ │ │ │ ├── ScheduledTransactionList.tsx │ │ │ │ ├── TransactionButton.tsx │ │ │ │ ├── TransactionDialog.tsx │ │ │ │ ├── TransactionLink.tsx │ │ │ │ ├── index.ts │ │ │ │ └── internal/ │ │ │ │ ├── Button.tsx │ │ │ │ ├── Dialog.tsx │ │ │ │ └── StyleWrapper.tsx │ │ │ ├── core/ │ │ │ │ └── theme.tsx │ │ │ ├── css.d.ts │ │ │ ├── icons/ │ │ │ │ ├── AlertCircleIcon.tsx │ │ │ │ ├── CircleCheckIcon.tsx │ │ │ │ ├── CircleUserRoundIcon.tsx │ │ │ │ ├── CopyIcon.tsx │ │ │ │ ├── DownIcon.tsx │ │ │ │ ├── ExternalLink.tsx │ │ │ │ ├── FlowIcon.tsx │ │ │ │ ├── ImageIcon.tsx │ │ │ │ ├── LoaderCircleIcon.tsx │ │ │ │ ├── LogOutIcon.tsx │ │ │ │ ├── MoreVerticalIcon.tsx │ │ │ │ ├── TrashIcon.tsx │ │ │ │ ├── UserIcon.tsx │ │ │ │ └── XIcon.tsx │ │ │ ├── index.ts │ │ │ ├── jest-setup.ts │ │ │ ├── mocks/ │ │ │ │ └── file-mock.ts │ │ │ ├── provider/ │ │ │ │ ├── DarkModeProvider.tsx │ │ │ │ ├── FlowProvider.tsx │ │ │ │ └── index.ts │ │ │ └── styles/ │ │ │ └── tailwind.css │ │ ├── tailwind.config.js │ │ └── tsconfig.json │ ├── rlp/ │ │ ├── .babelrc │ │ ├── .browserslistrc │ │ ├── .eslintrc.json │ │ ├── .npmignore │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── package.json │ │ ├── src/ │ │ │ ├── index.test.ts │ │ │ └── index.ts │ │ └── tsconfig.json │ ├── sdk/ │ │ ├── .babelrc │ │ ├── .browserslistrc │ │ ├── .eslintrc.json │ │ ├── .npmignore │ │ ├── CHANGELOG.md │ │ ├── TRANSITIONS.md │ │ ├── docs/ │ │ │ └── extra.md │ │ ├── docs-generator.config.js │ │ ├── package.json │ │ ├── readme.md │ │ ├── src/ │ │ │ ├── VERSION.ts │ │ │ ├── account/ │ │ │ │ ├── account.test.ts │ │ │ │ └── account.ts │ │ │ ├── block/ │ │ │ │ ├── block.test.ts │ │ │ │ └── block.ts │ │ │ ├── build/ │ │ │ │ ├── build-arguments.test.ts │ │ │ │ ├── build-arguments.ts │ │ │ │ ├── build-at-block-height.test.ts │ │ │ │ ├── build-at-block-height.ts │ │ │ │ ├── build-at-block-id.test.ts │ │ │ │ ├── build-at-block-id.ts │ │ │ │ ├── build-at-latest-block.test.ts │ │ │ │ ├── build-at-latest-block.ts │ │ │ │ ├── build-authorizations.test.ts │ │ │ │ ├── build-authorizations.ts │ │ │ │ ├── build-get-account.test.ts │ │ │ │ ├── build-get-account.ts │ │ │ │ ├── build-get-block-header.test.ts │ │ │ │ ├── build-get-block-header.ts │ │ │ │ ├── build-get-block.test.ts │ │ │ │ ├── build-get-block.ts │ │ │ │ ├── build-get-collection.test.ts │ │ │ │ ├── build-get-collection.ts │ │ │ │ ├── build-get-events-at-block-height-range.test.ts │ │ │ │ ├── build-get-events-at-block-height-range.ts │ │ │ │ ├── build-get-events-at-block-ids.test.ts │ │ │ │ ├── build-get-events-at-block-ids.ts │ │ │ │ ├── build-get-events.test.ts │ │ │ │ ├── build-get-events.ts │ │ │ │ ├── build-get-latest-block.test.ts │ │ │ │ ├── build-get-latest-block.ts │ │ │ │ ├── build-get-network-parameters.test.ts │ │ │ │ ├── build-get-network-parameters.ts │ │ │ │ ├── build-get-node-version-info.test.ts │ │ │ │ ├── build-get-node-version-info.ts │ │ │ │ ├── build-get-transaction-status.test.ts │ │ │ │ ├── build-get-transaction-status.ts │ │ │ │ ├── build-get-transaction.test.ts │ │ │ │ ├── build-get-transaction.ts │ │ │ │ ├── build-invariant.js │ │ │ │ ├── build-invariant.test.js │ │ │ │ ├── build-limit.test.ts │ │ │ │ ├── build-limit.ts │ │ │ │ ├── build-payer.test.ts │ │ │ │ ├── build-payer.ts │ │ │ │ ├── build-ping.test.ts │ │ │ │ ├── build-ping.ts │ │ │ │ ├── build-proposer.test.ts │ │ │ │ ├── build-proposer.ts │ │ │ │ ├── build-ref.test.ts │ │ │ │ ├── build-ref.ts │ │ │ │ ├── build-script.test.ts │ │ │ │ ├── build-script.ts │ │ │ │ ├── build-subscribe-events.test.ts │ │ │ │ ├── build-subscribe-events.ts │ │ │ │ ├── build-transaction.test.ts │ │ │ │ ├── build-transaction.ts │ │ │ │ ├── build-validator.test.ts │ │ │ │ ├── build-validator.ts │ │ │ │ ├── build-voucher-intercept.test.ts │ │ │ │ ├── build-voucher-intercept.ts │ │ │ │ ├── build.test.ts │ │ │ │ └── build.ts │ │ │ ├── constants.ts │ │ │ ├── context/ │ │ │ │ ├── context.ts │ │ │ │ ├── get-global-transport.test.ts │ │ │ │ ├── get-global-transport.ts │ │ │ │ └── global.ts │ │ │ ├── contract.test.ts │ │ │ ├── decode/ │ │ │ │ ├── README.md │ │ │ │ ├── decode-stream.test.ts │ │ │ │ ├── decode-stream.ts │ │ │ │ ├── decode.test.js │ │ │ │ ├── decode.ts │ │ │ │ └── sdk-decode.ts │ │ │ ├── encode/ │ │ │ │ ├── README.md │ │ │ │ ├── encode.test.ts │ │ │ │ └── encode.ts │ │ │ ├── interaction/ │ │ │ │ ├── interaction.test.ts │ │ │ │ └── interaction.ts │ │ │ ├── node-version-info/ │ │ │ │ └── node-version-info.ts │ │ │ ├── resolve/ │ │ │ │ ├── __snapshots__/ │ │ │ │ │ └── resolve-signatures.test.ts.snap │ │ │ │ ├── __tests__/ │ │ │ │ │ └── resolve-accounts.test.js │ │ │ │ ├── resolve-accounts.test.js │ │ │ │ ├── resolve-accounts.ts │ │ │ │ ├── resolve-arguments.test.ts │ │ │ │ ├── resolve-arguments.ts │ │ │ │ ├── resolve-cadence.test.ts │ │ │ │ ├── resolve-cadence.ts │ │ │ │ ├── resolve-compute-limit.test.ts │ │ │ │ ├── resolve-compute-limit.ts │ │ │ │ ├── resolve-final-normalization.test.ts │ │ │ │ ├── resolve-final-normalization.ts │ │ │ │ ├── resolve-proposer-sequence-number.test.ts │ │ │ │ ├── resolve-proposer-sequence-number.ts │ │ │ │ ├── resolve-ref-block-id.test.ts │ │ │ │ ├── resolve-ref-block-id.ts │ │ │ │ ├── resolve-signatures.test.ts │ │ │ │ ├── resolve-signatures.ts │ │ │ │ ├── resolve-validators.test.ts │ │ │ │ ├── resolve-validators.ts │ │ │ │ ├── resolve-voucher-intercept.test.ts │ │ │ │ ├── resolve-voucher-intercept.ts │ │ │ │ ├── resolve.ts │ │ │ │ └── voucher.ts │ │ │ ├── response/ │ │ │ │ ├── README.md │ │ │ │ ├── __snapshots__/ │ │ │ │ │ └── response.test.ts.snap │ │ │ │ ├── response.test.ts │ │ │ │ └── response.ts │ │ │ ├── sdk-client.ts │ │ │ ├── sdk.test.js │ │ │ ├── sdk.ts │ │ │ ├── test-utils/ │ │ │ │ ├── authz-fn.ts │ │ │ │ ├── index.ts │ │ │ │ ├── mock-send.js │ │ │ │ └── run.ts │ │ │ ├── transport/ │ │ │ │ ├── index.ts │ │ │ │ ├── send/ │ │ │ │ │ ├── send.test.ts │ │ │ │ │ └── send.ts │ │ │ │ └── subscribe/ │ │ │ │ ├── errors.ts │ │ │ │ ├── subscribe-raw.test.ts │ │ │ │ ├── subscribe-raw.ts │ │ │ │ ├── subscribe.test.ts │ │ │ │ ├── subscribe.ts │ │ │ │ └── types.ts │ │ │ └── wallet-utils/ │ │ │ ├── encode-signable.test.ts │ │ │ ├── encode-signable.ts │ │ │ ├── index.ts │ │ │ ├── validate-tx.test.ts │ │ │ └── validate-tx.ts │ │ └── tsconfig.json │ ├── transport-grpc/ │ │ ├── .babelrc │ │ ├── .browserslistrc │ │ ├── .npmignore │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── package.json │ │ ├── src/ │ │ │ ├── sdk-send-grpc.js │ │ │ ├── send-execute-script.js │ │ │ ├── send-execute-script.test.js │ │ │ ├── send-get-account.js │ │ │ ├── send-get-account.test.js │ │ │ ├── send-get-block-header.js │ │ │ ├── send-get-block-header.test.js │ │ │ ├── send-get-block.js │ │ │ ├── send-get-block.test.js │ │ │ ├── send-get-collection.js │ │ │ ├── send-get-collection.test.js │ │ │ ├── send-get-events.js │ │ │ ├── send-get-events.test.js │ │ │ ├── send-get-network-parameters.js │ │ │ ├── send-get-network-parameters.test.js │ │ │ ├── send-get-node-version-info.js │ │ │ ├── send-get-node-version-info.test.js │ │ │ ├── send-get-transaction-status.js │ │ │ ├── send-get-transaction-status.test.js │ │ │ ├── send-get-transaction.js │ │ │ ├── send-get-transaction.test.js │ │ │ ├── send-grpc.js │ │ │ ├── send-ping.js │ │ │ ├── send-ping.test.js │ │ │ ├── send-transaction.js │ │ │ ├── send-transaction.test.js │ │ │ └── unary.js │ │ └── tsconfig.json │ ├── transport-http/ │ │ ├── .babelrc │ │ ├── .browserslistrc │ │ ├── .npmignore │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── package.json │ │ ├── src/ │ │ │ ├── index.ts │ │ │ ├── send/ │ │ │ │ ├── connect-subscribe-events.test.ts │ │ │ │ ├── connect-subscribe-events.ts │ │ │ │ ├── connect-ws.test.ts │ │ │ │ ├── connect-ws.ts │ │ │ │ ├── http-request.js │ │ │ │ ├── http-request.test.js │ │ │ │ ├── send-execute-script.js │ │ │ │ ├── send-execute-script.test.js │ │ │ │ ├── send-get-account.js │ │ │ │ ├── send-get-account.test.js │ │ │ │ ├── send-get-block-header.js │ │ │ │ ├── send-get-block-header.test.js │ │ │ │ ├── send-get-block.js │ │ │ │ ├── send-get-block.test.js │ │ │ │ ├── send-get-collection.js │ │ │ │ ├── send-get-collection.test.js │ │ │ │ ├── send-get-events.js │ │ │ │ ├── send-get-events.test.js │ │ │ │ ├── send-get-network-parameters.js │ │ │ │ ├── send-get-network-parameters.test.js │ │ │ │ ├── send-get-node-version-info.test.ts │ │ │ │ ├── send-get-node-version-info.ts │ │ │ │ ├── send-get-transaction-status.js │ │ │ │ ├── send-get-transaction-status.test.js │ │ │ │ ├── send-get-transaction.js │ │ │ │ ├── send-get-transaction.test.js │ │ │ │ ├── send-http.ts │ │ │ │ ├── send-ping.test.ts │ │ │ │ ├── send-ping.ts │ │ │ │ ├── send-transaction.js │ │ │ │ ├── send-transaction.test.js │ │ │ │ └── utils.js │ │ │ ├── subscribe/ │ │ │ │ ├── handlers/ │ │ │ │ │ ├── account-statuses.test.ts │ │ │ │ │ ├── account-statuses.ts │ │ │ │ │ ├── block-digests.ts │ │ │ │ │ ├── block-headers.ts │ │ │ │ │ ├── blocks.ts │ │ │ │ │ ├── events.test.ts │ │ │ │ │ ├── events.ts │ │ │ │ │ ├── transaction-statuses.ts │ │ │ │ │ └── types.ts │ │ │ │ ├── models.ts │ │ │ │ ├── subscribe.test.ts │ │ │ │ ├── subscribe.ts │ │ │ │ ├── subscription-manager.test.ts │ │ │ │ ├── subscription-manager.ts │ │ │ │ └── websocket.ts │ │ │ ├── transport.ts │ │ │ └── utils/ │ │ │ ├── combine-urls.test.ts │ │ │ └── combine-urls.ts │ │ └── tsconfig.json │ ├── typedefs/ │ │ ├── .babelrc │ │ ├── .eslintrc.json │ │ ├── .npmignore │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── package.json │ │ ├── src/ │ │ │ ├── fvm-errors.ts │ │ │ ├── index.test.js │ │ │ ├── index.ts │ │ │ ├── interaction.ts │ │ │ ├── subscriptions.ts │ │ │ └── transport.ts │ │ └── tsconfig.json │ ├── types/ │ │ ├── .babelrc │ │ ├── .browserslistrc │ │ ├── .eslintrc.json │ │ ├── .npmignore │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── WARNINGS.md │ │ ├── package.json │ │ ├── src/ │ │ │ ├── types.test.ts │ │ │ └── types.ts │ │ └── tsconfig.json │ ├── util-actor/ │ │ ├── .babelrc │ │ ├── .browserslistrc │ │ ├── .eslintrc.json │ │ ├── .npmignore │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── package.json │ │ ├── src/ │ │ │ ├── index.test.ts │ │ │ ├── index.ts │ │ │ └── mailbox/ │ │ │ ├── README.md │ │ │ ├── index.test.ts │ │ │ └── index.ts │ │ └── tsconfig.json │ ├── util-address/ │ │ ├── .babelrc │ │ ├── .browserslistrc │ │ ├── .eslintrc.json │ │ ├── .npmignore │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── package.json │ │ ├── src/ │ │ │ ├── index.test.ts │ │ │ └── index.ts │ │ └── tsconfig.json │ ├── util-encode-key/ │ │ ├── .babelrc │ │ ├── .browserslistrc │ │ ├── .eslintrc.json │ │ ├── .npmignore │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── package.json │ │ ├── src/ │ │ │ ├── __snapshots__/ │ │ │ │ └── index.test.ts.snap │ │ │ ├── index.test.ts │ │ │ └── index.ts │ │ └── tsconfig.json │ ├── util-invariant/ │ │ ├── .babelrc │ │ ├── .browserslistrc │ │ ├── .eslintrc.json │ │ ├── .npmignore │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── package.json │ │ ├── src/ │ │ │ ├── index.test.ts │ │ │ └── index.ts │ │ └── tsconfig.json │ ├── util-logger/ │ │ ├── .babelrc │ │ ├── .browserslistrc │ │ ├── .eslintrc.json │ │ ├── .npmignore │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── package.json │ │ ├── src/ │ │ │ ├── util-logger.test.ts │ │ │ └── util-logger.ts │ │ └── tsconfig.json │ ├── util-rpc/ │ │ ├── .babelrc │ │ ├── .browserslistrc │ │ ├── .eslintrc.json │ │ ├── .npmignore │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── package.json │ │ ├── src/ │ │ │ ├── index.ts │ │ │ ├── messages.ts │ │ │ ├── rpc-client.test.ts │ │ │ ├── rpc-client.ts │ │ │ └── rpc-error.ts │ │ └── tsconfig.json │ ├── util-semver/ │ │ ├── .babelrc │ │ ├── CHANGELOG.md │ │ ├── package.json │ │ ├── src/ │ │ │ ├── compare-identifiers.js │ │ │ ├── compare.js │ │ │ ├── compare.test.js │ │ │ └── index.ts │ │ └── tsconfig.json │ ├── util-template/ │ │ ├── .babelrc │ │ ├── .browserslistrc │ │ ├── .eslintrc.json │ │ ├── .npmignore │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── package.json │ │ ├── src/ │ │ │ ├── __snapshots__/ │ │ │ │ └── template.test.ts.snap │ │ │ ├── template.test.ts │ │ │ └── template.ts │ │ └── tsconfig.json │ └── util-uid/ │ ├── .babelrc │ ├── .browserslistrc │ ├── .eslintrc.json │ ├── .npmignore │ ├── CHANGELOG.md │ ├── README.md │ ├── package.json │ ├── src/ │ │ ├── util-uid.test.ts │ │ └── util-uid.ts │ └── tsconfig.json └── tsconfig.json
SYMBOL INDEX (1708 symbols across 448 files)
FILE: docs-generator/generate-all-docs.js
function main (line 5) | async function main() {
FILE: docs-generator/generate-docs.js
function main (line 17) | async function main() {
FILE: docs-generator/generators/generate-function-page.js
function getGenericTypeStructure (line 11) | function getGenericTypeStructure(baseTypeName, packageName, sourceFilePa...
function extractTypeStructure (line 86) | function extractTypeStructure(typeAlias) {
constant PRIMITIVE_TYPES (line 135) | const PRIMITIVE_TYPES = new Set([
function escapeMDXCharacters (line 154) | function escapeMDXCharacters(text) {
function extractCoreTypes (line 194) | function extractCoreTypes() {
function extractTypeName (line 225) | function extractTypeName(fullType) {
function isTypeInTypedefs (line 275) | function isTypeInTypedefs(typeName, coreTypes) {
function isNonPrimitiveType (line 298) | function isNonPrimitiveType(typeString) {
function extractTypeDefinition (line 398) | function extractTypeDefinition(sourceFile, node) {
function findTypeInFile (line 414) | function findTypeInFile(sourceFile, typeName) {
function getTypeDefinition (line 428) | function getTypeDefinition(typeName, packageName, sourceFilePath) {
function searchTypeInImports (line 506) | function searchTypeInImports(sourceFile, typeName, project) {
function resolveImportPath (line 573) | function resolveImportPath(sourceFile, moduleSpecifier, project) {
function searchTypeInWorkspacePackages (line 634) | function searchTypeInWorkspacePackages(typeName, project) {
function processTypeForDisplay (line 671) | function processTypeForDisplay(
function generateFunctionPage (line 819) | function generateFunctionPage(templates, outputDir, packageName, func) {
FILE: docs-generator/generators/generate-namespace-page.js
constant PRIMITIVE_TYPES (line 8) | const PRIMITIVE_TYPES = new Set([
function escapeMDXCharacters (line 26) | function escapeMDXCharacters(text) {
function extractCoreTypes (line 66) | function extractCoreTypes() {
function extractTypeName (line 97) | function extractTypeName(fullType) {
function isTypeInTypedefs (line 147) | function isTypeInTypedefs(typeName, coreTypes) {
function isNonPrimitiveType (line 170) | function isNonPrimitiveType(typeString) {
function extractTypeDefinition (line 205) | function extractTypeDefinition(sourceFile, node) {
function findTypeInFile (line 221) | function findTypeInFile(sourceFile, typeName) {
function getTypeDefinition (line 235) | function getTypeDefinition(typeName, packageName, sourceFilePath) {
function processTypeForDisplay (line 299) | function processTypeForDisplay(
function processFunction (line 366) | function processFunction(func, packageName, coreTypes) {
function truncateDescription (line 412) | function truncateDescription(description, maxLength = 80) {
function generateNamespacePage (line 432) | function generateNamespacePage(templates, outputDir, packageName, namesp...
FILE: docs-generator/generators/generate-package-page.js
function truncateDescription (line 5) | function truncateDescription(description, maxLength = 80) {
function getPackageDescription (line 25) | function getPackageDescription(packageName) {
function generatePackagePage (line 40) | function generatePackagePage(
FILE: docs-generator/generators/generate-root-page.js
function getPackageDescription (line 5) | function getPackageDescription(packageName) {
function generateRootPage (line 25) | function generateRootPage(templates, packagesDir, currentPackageName) {
FILE: docs-generator/generators/generate-types-page.js
function decodeHtmlEntities (line 5) | function decodeHtmlEntities(text) {
function extractJSDocDescription (line 19) | function extractJSDocDescription(node) {
function extractInterfaces (line 53) | function extractInterfaces(sourceFiles) {
function extractTypeAliases (line 91) | function extractTypeAliases(sourceFiles) {
function extractEnums (line 167) | function extractEnums(sourceFiles) {
function generateTypesPage (line 209) | function generateTypesPage(templates, outputDir) {
FILE: docs-generator/generators/utils/extract-utils.js
function getFirstWord (line 1) | function getFirstWord(packageName) {
FILE: docs-generator/generators/utils/generate-page.js
function generatePage (line 3) | function generatePage(templates, templateName, outputPath, context) {
FILE: docs-generator/generators/utils/parse-config-custom-data.js
function parseConfigCustomData (line 3) | function parseConfigCustomData(configPath) {
FILE: docs-generator/utils/export-extractor.js
function extractExportsFromEntryFile (line 10) | function extractExportsFromEntryFile(sourceFile) {
FILE: docs-generator/utils/file-utils.js
function discoverWorkspacePackages (line 4) | function discoverWorkspacePackages() {
FILE: docs-generator/utils/function-extractor.js
function extractFunctionInfo (line 12) | function extractFunctionInfo(
function findFunctionInSourceFile (line 614) | function findFunctionInSourceFile(sourceFile, functionName) {
function resolveOnFlowPackage (line 660) | function resolveOnFlowPackage(packageName) {
function resolveReExportedFunction (line 685) | function resolveReExportedFunction(sourceFile, exportName, moduleSpecifi...
FILE: docs-generator/utils/jsdoc-parser.js
function parseJsDoc (line 1) | function parseJsDoc(node) {
FILE: docs-generator/utils/namespace-utils.js
function extractNamespaceFunctions (line 5) | function extractNamespaceFunctions(
FILE: docs-generator/utils/type-utils.js
function cleanupTypeText (line 1) | function cleanupTypeText(typeText) {
function stripGenericParams (line 22) | function stripGenericParams(typeText) {
function toCamelCase (line 30) | function toCamelCase(typeName) {
function escapeParameterNameForMDX (line 37) | function escapeParameterNameForMDX(paramName) {
function escapeTextForMDX (line 43) | function escapeTextForMDX(text) {
FILE: docs-generator/utils/typescript-formatter.js
function formatTypeScript (line 1) | function formatTypeScript(typeText) {
FILE: packages/config/src/config.ts
constant NAME (line 16) | const NAME = "config"
constant PUT (line 17) | const PUT = "PUT_CONFIG"
constant GET (line 18) | const GET = "GET_CONFIG"
constant GET_ALL (line 19) | const GET_ALL = "GET_ALL_CONFIG"
constant UPDATE (line 20) | const UPDATE = "UPDATE_CONFIG"
constant DELETE (line 21) | const DELETE = "DELETE_CONFIG"
constant CLEAR (line 22) | const CLEAR = "CLEAR_CONFIG"
constant WHERE (line 23) | const WHERE = "WHERE_CONFIG"
constant UPDATED (line 24) | const UPDATED = "CONFIG/UPDATED"
constant HANDLERS (line 28) | const HANDLERS: ActorHandlers = {
function put (line 77) | function put<T>(key: string, value: T) {
function get (line 88) | function get<T>(key: string, fallback?: T): Promise<T> {
function first (line 98) | async function first<T>(wants: string[] = [], fallback: T): Promise<T> {
function all (line 110) | function all(): Promise<Record<string, unknown>> {
function update (line 120) | function update<T>(key: string, fn: (x: T) => T = identity) {
function _delete (line 130) | function _delete(key: string) {
function where (line 140) | function where(pattern: RegExp): Promise<Record<string, unknown>> {
function subscribe (line 149) | function subscribe(
function clearConfig (line 161) | async function clearConfig(): Promise<void> {
function resetConfig (line 170) | async function resetConfig(oldConfig: Record<string, unknown>) {
function load (line 181) | async function load(
function config (line 261) | function config(values?: Record<string, unknown>) {
function overload (line 300) | async function overload<T>(
FILE: packages/config/src/utils/utils.ts
type ForkNetworkConfig (line 5) | interface ForkNetworkConfig {
type NetworkConfig (line 13) | type NetworkConfig = string | ForkNetworkConfig
type FlowJson (line 15) | interface FlowJson {
FILE: packages/demo/src/app.tsx
function AppContent (line 9) | function AppContent() {
function App (line 180) | function App() {
FILE: packages/demo/src/components/advanced-cards/dark-mode-card.tsx
constant DARK_MODE_CODE (line 6) | const DARK_MODE_CODE = `import { FlowProvider, useDarkMode } from "@onfl...
function DarkModeCard (line 33) | function DarkModeCard() {
FILE: packages/demo/src/components/advanced-cards/theming-card.tsx
constant THEMING_CODE (line 8) | const THEMING_CODE = `import { FlowProvider } from "@onflow/react-sdk"
function ThemingCard (line 37) | function ThemingCard() {
FILE: packages/demo/src/components/component-cards/connect-card.tsx
constant IMPLEMENTATION_CODE (line 8) | const IMPLEMENTATION_CODE = `import { Connect } from "@onflow/react-sdk"
constant PROPS (line 31) | const PROPS: PropDefinition[] = [
function ConnectCard (line 83) | function ConnectCard() {
FILE: packages/demo/src/components/component-cards/demo-nft-card.tsx
constant IMPLEMENTATION_CODE (line 8) | const IMPLEMENTATION_CODE = `import { NftCard } from "@onflow/react-sdk"
constant PROPS (line 40) | const PROPS: PropDefinition[] = [
function DemoNftCard (line 96) | function DemoNftCard() {
FILE: packages/demo/src/components/component-cards/profile-card.tsx
constant IMPLEMENTATION_CODE (line 8) | const IMPLEMENTATION_CODE = `import { Profile } from "@onflow/react-sdk"
constant PROPS (line 37) | const PROPS: PropDefinition[] = [
function ProfileCard (line 80) | function ProfileCard() {
FILE: packages/demo/src/components/component-cards/scheduled-transaction-list-demo.tsx
constant IMPLEMENTATION_CODE (line 12) | const IMPLEMENTATION_CODE = `import { ScheduledTransactionList, useFlowC...
constant PROPS (line 28) | const PROPS: PropDefinition[] = [
function ScheduledTransactionListDemo (line 63) | function ScheduledTransactionListDemo() {
FILE: packages/demo/src/components/component-cards/transaction-button-card.tsx
constant IMPLEMENTATION_CODE (line 7) | const IMPLEMENTATION_CODE = `import { TransactionButton } from "@onflow/...
constant PROPS (line 26) | const PROPS: PropDefinition[] = [
function TransactionButtonCard (line 63) | function TransactionButtonCard() {
FILE: packages/demo/src/components/component-cards/transaction-dialog-card.tsx
constant IMPLEMENTATION_CODE (line 7) | const IMPLEMENTATION_CODE = `import { TransactionDialog } from "@onflow/...
constant PROPS (line 11) | const PROPS: PropDefinition[] = [
function TransactionDialogCard (line 71) | function TransactionDialogCard() {
FILE: packages/demo/src/components/component-cards/transaction-link-card.tsx
constant IMPLEMENTATION_CODE (line 7) | const IMPLEMENTATION_CODE = `import { TransactionLink } from "@onflow/re...
constant PROPS (line 11) | const PROPS: PropDefinition[] = [
function TransactionLinkCard (line 27) | function TransactionLinkCard() {
FILE: packages/demo/src/components/content-section.tsx
function ContentSection (line 39) | function ContentSection() {
FILE: packages/demo/src/components/content-sidebar.tsx
type SidebarItem (line 4) | interface SidebarItem {
type ContentSidebarProps (line 183) | interface ContentSidebarProps {
function ContentSidebar (line 188) | function ContentSidebar({darkMode, onItemClick}: ContentSidebarProps) {
FILE: packages/demo/src/components/flow-provider-wrapper.tsx
type DarkModeContextType (line 6) | interface DarkModeContextType {
type NetworkSwitchContextType (line 12) | interface NetworkSwitchContextType {
type FlowConfig (line 19) | interface FlowConfig {
type DemoFlowNetwork (line 53) | type DemoFlowNetwork = "emulator" | "testnet" | "mainnet"
function NetworkSwitchProvider (line 81) | function NetworkSwitchProvider({children}: {children: React.ReactNode}) {
function FlowProviderInner (line 135) | function FlowProviderInner({
function FlowProviderWrapper (line 164) | function FlowProviderWrapper({
FILE: packages/demo/src/components/footer.tsx
function Footer (line 4) | function Footer() {
FILE: packages/demo/src/components/header.tsx
type DemoFlowNetwork (line 6) | type DemoFlowNetwork = "emulator" | "testnet" | "mainnet"
type HeaderProps (line 8) | interface HeaderProps {
function Header (line 13) | function Header({
FILE: packages/demo/src/components/hook-cards/use-cross-vm-bridge-nft-from-evm-card.tsx
constant IMPLEMENTATION_CODE (line 9) | const IMPLEMENTATION_CODE = `import { useCrossVmBridgeNftFromEvm } from ...
function UseCrossVmBridgeNftFromEvmCard (line 23) | function UseCrossVmBridgeNftFromEvmCard() {
FILE: packages/demo/src/components/hook-cards/use-cross-vm-bridge-nft-to-evm-card.tsx
constant IMPLEMENTATION_CODE (line 9) | const IMPLEMENTATION_CODE = `import { useCrossVmBridgeNftToEvm } from "@...
function UseCrossVmBridgeNftToEvmCard (line 24) | function UseCrossVmBridgeNftToEvmCard() {
FILE: packages/demo/src/components/hook-cards/use-cross-vm-bridge-token-from-evm-card.tsx
constant IMPLEMENTATION_CODE (line 9) | const IMPLEMENTATION_CODE = `import { useCrossVmBridgeTokenFromEvm } fro...
function UseCrossVmBridgeTokenFromEvmCard (line 23) | function UseCrossVmBridgeTokenFromEvmCard() {
FILE: packages/demo/src/components/hook-cards/use-cross-vm-bridge-token-to-evm-card.tsx
constant IMPLEMENTATION_CODE (line 9) | const IMPLEMENTATION_CODE = `import { useCrossVmBridgeTokenToEvm } from ...
function UseCrossVmBridgeTokenToEvmCard (line 24) | function UseCrossVmBridgeTokenToEvmCard() {
FILE: packages/demo/src/components/hook-cards/use-flow-account-card.tsx
constant IMPLEMENTATION_CODE (line 8) | const IMPLEMENTATION_CODE = `import { useFlowAccount } from "@onflow/rea...
function UseFlowAccountCard (line 20) | function UseFlowAccountCard() {
FILE: packages/demo/src/components/hook-cards/use-flow-block-card.tsx
constant IMPLEMENTATION_CODE (line 8) | const IMPLEMENTATION_CODE = `import { useFlowBlock } from "@onflow/react...
function UseFlowBlockCard (line 19) | function UseFlowBlockCard() {
FILE: packages/demo/src/components/hook-cards/use-flow-chain-id-card.tsx
constant IMPLEMENTATION_CODE (line 13) | const IMPLEMENTATION_CODE = `import { useFlowChainId } from "@onflow/rea...
function UseFlowChainIdCard (line 20) | function UseFlowChainIdCard() {
FILE: packages/demo/src/components/hook-cards/use-flow-config-card.tsx
constant IMPLEMENTATION_CODE (line 7) | const IMPLEMENTATION_CODE = `import { useFlowConfig } from "@onflow/reac...
function UseFlowConfigCard (line 11) | function UseFlowConfigCard() {
FILE: packages/demo/src/components/hook-cards/use-flow-current-user-card.tsx
constant IMPLEMENTATION_CODE (line 7) | const IMPLEMENTATION_CODE = `import { useFlowCurrentUser } from "@onflow...
function UseFlowCurrentUserCard (line 11) | function UseFlowCurrentUserCard() {
FILE: packages/demo/src/components/hook-cards/use-flow-events-card.tsx
constant IMPLEMENTATION_CODE (line 10) | const IMPLEMENTATION_CODE = `import { useFlowEvents } from "@onflow/reac...
function UseFlowEventsCard (line 23) | function UseFlowEventsCard() {
FILE: packages/demo/src/components/hook-cards/use-flow-mutate-card.tsx
constant IMPLEMENTATION_CODE (line 8) | const IMPLEMENTATION_CODE = `import { useFlowMutate } from "@onflow/reac...
function UseFlowMutateCard (line 21) | function UseFlowMutateCard() {
FILE: packages/demo/src/components/hook-cards/use-flow-nft-metadata-card.tsx
constant IMPLEMENTATION_CODE (line 8) | const IMPLEMENTATION_CODE = `import { useFlowNftMetadata } from "@onflow...
function UseFlowNftMetadataCard (line 22) | function UseFlowNftMetadataCard() {
FILE: packages/demo/src/components/hook-cards/use-flow-query-card.tsx
constant IMPLEMENTATION_CODE (line 14) | const IMPLEMENTATION_CODE = `import { useFlowQuery } from "@onflow/react...
function UseFlowQueryCard (line 30) | function UseFlowQueryCard() {
FILE: packages/demo/src/components/hook-cards/use-flow-query-raw-card.tsx
constant IMPLEMENTATION_CODE (line 15) | const IMPLEMENTATION_CODE = `import { useFlowQueryRaw } from "@onflow/re...
function UseFlowQueryRawCard (line 31) | function UseFlowQueryRawCard() {
FILE: packages/demo/src/components/hook-cards/use-flow-revertible-random-card.tsx
constant IMPLEMENTATION_CODE (line 7) | const IMPLEMENTATION_CODE = `import { useFlowRevertibleRandom } from "@o...
function UseFlowRevertibleRandomCard (line 18) | function UseFlowRevertibleRandomCard() {
FILE: packages/demo/src/components/hook-cards/use-flow-scheduled-transaction-card.tsx
constant IMPLEMENTATION_CODE (line 16) | const IMPLEMENTATION_CODE = `import {
constant PRIORITY_LABELS (line 43) | const PRIORITY_LABELS: Record<ScheduledTransactionPriority, string> = {
constant STATUS_LABELS (line 49) | const STATUS_LABELS: Record<ScheduledTransactionStatus, string> = {
function UseFlowScheduledTransactionCard (line 57) | function UseFlowScheduledTransactionCard() {
FILE: packages/demo/src/components/hook-cards/use-flow-transaction-status-card.tsx
constant IMPLEMENTATION_CODE (line 8) | const IMPLEMENTATION_CODE = `import { useFlowTransactionStatus } from "@...
function useSafeFlowTransactionStatus (line 18) | function useSafeFlowTransactionStatus(id?: string) {
function UseFlowTransactionStatusCard (line 78) | function UseFlowTransactionStatusCard() {
FILE: packages/demo/src/components/setup-cards/installation-card.tsx
function InstallationCard (line 8) | function InstallationCard() {
FILE: packages/demo/src/components/starter-banner.tsx
function StarterBanner (line 1) | function StarterBanner() {
FILE: packages/demo/src/components/ui/code-editor.tsx
type CodeEditorProps (line 6) | interface CodeEditorProps {
function CodeEditor (line 15) | function CodeEditor({
FILE: packages/demo/src/components/ui/code-viewer.tsx
type CodeViewerProps (line 6) | interface CodeViewerProps {
function CodeViewer (line 12) | function CodeViewer({
FILE: packages/demo/src/components/ui/demo-card.tsx
type PropDefinition (line 7) | interface PropDefinition {
type DemoCardProps (line 15) | interface DemoCardProps {
FILE: packages/demo/src/components/ui/error-boundary.tsx
type Props (line 3) | interface Props {
type State (line 8) | interface State {
class ErrorBoundary (line 13) | class ErrorBoundary extends Component<Props, State> {
method constructor (line 14) | constructor(props: Props) {
method getDerivedStateFromError (line 19) | static getDerivedStateFromError(error: Error): State {
method componentDidCatch (line 23) | componentDidCatch(error: Error, errorInfo: ErrorInfo) {
method render (line 27) | render() {
FILE: packages/demo/src/components/ui/inline-code.tsx
type InlineCodeProps (line 5) | interface InlineCodeProps {
function InlineCode (line 11) | function InlineCode({
FILE: packages/demo/src/components/ui/json-viewer.tsx
type JsonViewerProps (line 3) | interface JsonViewerProps {
function JsonViewer (line 10) | function JsonViewer({
FILE: packages/demo/src/components/ui/loading-spinner.tsx
type LoadingSpinnerProps (line 4) | interface LoadingSpinnerProps {
type LoadingStateProps (line 32) | interface LoadingStateProps {
FILE: packages/demo/src/components/ui/plus-grid.tsx
type PlusGridProps (line 3) | interface PlusGridProps {
type PlusGridRowProps (line 8) | interface PlusGridRowProps {
type PlusGridIconProps (line 15) | interface PlusGridIconProps {
function PlusGrid (line 20) | function PlusGrid({className = "", children}: PlusGridProps) {
function PlusGridRow (line 24) | function PlusGridRow({
function PlusGridItem (line 63) | function PlusGridItem({className = "", children}: PlusGridProps) {
function PlusGridIcon (line 84) | function PlusGridIcon({className = "", placement}: PlusGridIconProps) {
FILE: packages/demo/src/components/ui/props-viewer.tsx
type PropsViewerProps (line 4) | interface PropsViewerProps {
function PropsViewer (line 8) | function PropsViewer({props}: PropsViewerProps) {
FILE: packages/demo/src/components/ui/results-section.tsx
type ResultsSectionProps (line 3) | interface ResultsSectionProps {
function ResultsSection (line 10) | function ResultsSection({
FILE: packages/demo/src/constants.ts
constant ACCESS_NODE_URLS (line 3) | const ACCESS_NODE_URLS: Record<any, string> = {
constant BLOCK_EXPLORER_URLS (line 10) | const BLOCK_EXPLORER_URLS: Record<any, string> = {
constant CONTRACT_ADDRESSES (line 17) | const CONTRACT_ADDRESSES: Record<string, Record<any, string>> = {
constant DEMO_ADDRESS_TESTNET (line 75) | const DEMO_ADDRESS_TESTNET = "0x012e4d204a60ac6f"
FILE: packages/demo/src/utils/chain-helpers.ts
type FlowChainId (line 1) | type FlowChainId = "mainnet" | "testnet" | "emulator" | "local"
type FlowNetworkParametersChainId (line 2) | type FlowNetworkParametersChainId =
type FlowEVMChainId (line 7) | type FlowEVMChainId = 747 | 545
function normalizeChainId (line 9) | function normalizeChainId(chainId: string): FlowChainId | "unknown" {
function getNetworkName (line 26) | function getNetworkName(chainId: string): string {
function getEVMChainId (line 40) | function getEVMChainId(chainId: string): FlowEVMChainId | null {
function isProductionNetwork (line 54) | function isProductionNetwork(chainId: string): boolean {
function isDevelopmentNetwork (line 58) | function isDevelopmentNetwork(chainId: string): boolean {
FILE: packages/fcl-bundle/src/build/build-watch.js
function handleWatcherEvent (line 14) | function handleWatcherEvent(event) {
function getWatcherOptions (line 30) | function getWatcherOptions(build, package) {
FILE: packages/fcl-bundle/src/build/build.js
function buildModule (line 12) | async function buildModule(build, package) {
function generateOutput (line 30) | async function generateOutput(bundle, outputOptions) {
FILE: packages/fcl-bundle/src/build/get-input-options.js
constant SUPPRESSED_WARNING_CODES (line 19) | const SUPPRESSED_WARNING_CODES = [
FILE: packages/fcl-bundle/src/build/watcher-pool.js
class WatcherPool (line 4) | class WatcherPool extends EventEmitter {
method constructor (line 5) | constructor(watcherOptionsList) {
method addWatcher (line 16) | addWatcher(watcherOptions) {
class EventBuffer (line 45) | class EventBuffer {
method get (line 48) | get(watcher) {
method put (line 52) | put(watcher, event) {
method clear (line 59) | clear() {
method size (line 63) | get size() {
FILE: packages/fcl-bundle/src/package-config.js
function determineBuildPaths (line 6) | function determineBuildPaths(package, outputs, entryName) {
FILE: packages/fcl-bundle/src/plugins/banner.js
method outputOptions (line 4) | outputOptions(options) {
FILE: packages/fcl-bundle/src/plugins/preserve-dynamic-imports.js
method renderDynamicImport (line 4) | renderDynamicImport() {
FILE: packages/fcl-bundle/src/util.js
function isArray (line 1) | function isArray(obj) {
function isObject (line 5) | function isObject(obj) {
function isString (line 9) | function isString(obj) {
function getPackageRoot (line 14) | function getPackageRoot() {
FILE: packages/fcl-core/src/VERSION.ts
constant VERSION (line 4) | const VERSION: string =
FILE: packages/fcl-core/src/app-utils/verify-signatures.ts
type AccountProofData (line 11) | interface AccountProofData {
type VerifySignaturesScriptOptions (line 17) | interface VerifySignaturesScriptOptions {
type ValidateArgsInput (line 21) | interface ValidateArgsInput {
constant ACCOUNT_PROOF (line 30) | const ACCOUNT_PROOF = "ACCOUNT_PROOF"
constant USER_SIGNATURE (line 31) | const USER_SIGNATURE = "USER_SIGNATURE"
function createVerifyAccountProof (line 170) | function createVerifyAccountProof(
function createVerifyUserSignatures (line 241) | function createVerifyUserSignatures(
FILE: packages/fcl-core/src/client.ts
type FlowClientCoreConfig (line 14) | interface FlowClientCoreConfig {
function createFlowClientCore (line 56) | function createFlowClientCore(params: FlowClientCoreConfig) {
type FlowClientCore (line 90) | type FlowClientCore = ReturnType<typeof createFlowClientCore>
FILE: packages/fcl-core/src/context/global.ts
function createPartialGlobalFCLContext (line 25) | function createPartialGlobalFCLContext(): Pick<
FILE: packages/fcl-core/src/context/index.ts
type FCLConfig (line 6) | interface FCLConfig {
type ConfigService (line 34) | interface ConfigService {
type FCLContext (line 53) | interface FCLContext {
function createFCLContext (line 66) | function createFCLContext(config: FCLConfig): FCLContext {
function createConfigService (line 115) | function createConfigService(config: FCLConfig): ConfigService {
FILE: packages/fcl-core/src/current-user/build-user.ts
type UserData (line 10) | interface UserData {
function deriveCompositeId (line 20) | function deriveCompositeId(authn: Service): string {
function normalizeData (line 29) | function normalizeData(data: UserData): UserData {
function buildUser (line 54) | async function buildUser(data: UserData): Promise<CurrentUser> {
FILE: packages/fcl-core/src/current-user/exec-service/index.ts
type ExecStrategyParams (line 14) | interface ExecStrategyParams {
type ExecServiceParams (line 24) | interface ExecServiceParams {
type StrategyResponse (line 35) | interface StrategyResponse {
type ExecConfig (line 43) | interface ExecConfig {
type StrategyFunction (line 56) | type StrategyFunction = (
function execService (line 108) | async function execService(
FILE: packages/fcl-core/src/current-user/exec-service/strategies/http-post.ts
type ExecHttpPostParams (line 9) | interface ExecHttpPostParams {
type ExecLocalFunction (line 19) | type ExecLocalFunction = (
FILE: packages/fcl-core/src/current-user/exec-service/strategies/utils/buildMessageHandler.ts
type BuildMessageHandlerParams (line 1) | interface BuildMessageHandlerParams {
constant CLOSE_EVENT (line 23) | const CLOSE_EVENT = "FCL:VIEW:CLOSE"
constant READY_EVENT (line 24) | const READY_EVENT = "FCL:VIEW:READY"
constant RESPONSE_EVENT (line 25) | const RESPONSE_EVENT = "FCL:VIEW:RESPONSE"
constant CUSTOM_RPC (line 26) | const CUSTOM_RPC = "FCL:VIEW:CUSTOM_RPC"
constant IGNORE (line 30) | const IGNORE = new Set([
FILE: packages/fcl-core/src/current-user/exec-service/strategies/utils/fetch-service.ts
type FetchServiceOptions (line 4) | interface FetchServiceOptions {
function fetchService (line 27) | function fetchService(
FILE: packages/fcl-core/src/current-user/exec-service/strategies/utils/poll.ts
type ServiceMethodOptions (line 6) | interface ServiceMethodOptions {
constant OPTIONS (line 11) | const OPTIONS: ServiceMethodOptions = {
function poll (line 46) | async function poll(
FILE: packages/fcl-core/src/current-user/exec-service/strategies/utils/service-endpoint.ts
function serviceEndpoint (line 25) | function serviceEndpoint(service: Service): URL {
FILE: packages/fcl-core/src/current-user/exec-service/wc-check.ts
constant FCL_WC_SERVICE_METHOD (line 4) | const FCL_WC_SERVICE_METHOD = "WC/RPC"
function checkWalletConnectEnabled (line 28) | function checkWalletConnectEnabled() {
FILE: packages/fcl-core/src/current-user/fetch-services.ts
function fetchServices (line 20) | async function fetchServices(
FILE: packages/fcl-core/src/current-user/index.ts
type CurrentUserConfig (line 33) | interface CurrentUserConfig {
type CurrentUserContext (line 41) | interface CurrentUserContext extends Pick<FCLContext, "config" | "sdk"> {
type CurrentUserServiceApi (line 50) | interface CurrentUserServiceApi {
type CurrentUserService (line 60) | interface CurrentUserService extends CurrentUserServiceApi {
type AccountProofData (line 64) | interface AccountProofData {
type AuthenticationOptions (line 70) | interface AuthenticationOptions {
type MakeConfigOptions (line 76) | interface MakeConfigOptions {
constant NAME (line 99) | const NAME = "CURRENT_USER"
constant UPDATED (line 100) | const UPDATED = "CURRENT_USER/UPDATED"
constant SNAPSHOT (line 101) | const SNAPSHOT = "SNAPSHOT"
constant SET_CURRENT_USER (line 102) | const SET_CURRENT_USER = "SET_CURRENT_USER"
constant DEL_CURRENT_USER (line 103) | const DEL_CURRENT_USER = "DEL_CURRENT_USER"
constant DATA (line 105) | const DATA = `{
function notExpired (line 190) | function notExpired(user: any): boolean {
function getAccountProofData (line 198) | async function getAccountProofData(
function createUnauthenticate (line 388) | function createUnauthenticate(context: CurrentUserContext) {
method signingFunction (line 437) | signingFunction(signable: Signable) {
method resolve (line 473) | async resolve(account: Account, preSignable: Signable) {
function createSubscribe (line 525) | function createSubscribe(context: CurrentUserContext) {
function createSnapshot (line 579) | function createSnapshot(
FILE: packages/fcl-core/src/current-user/merge-services.ts
function mergeServices (line 23) | function mergeServices(
FILE: packages/fcl-core/src/current-user/service-of-type.ts
function serviceOfType (line 22) | function serviceOfType(
FILE: packages/fcl-core/src/current-user/url-from-service.ts
function urlFromService (line 26) | function urlFromService(
FILE: packages/fcl-core/src/default-config.ts
function configLens (line 21) | async function configLens(
FILE: packages/fcl-core/src/discovery/services.ts
type GetServicesParams (line 10) | interface GetServicesParams {
type DiscoveryRequestBody (line 15) | interface DiscoveryRequestBody {
function getServices (line 42) | async function getServices({
FILE: packages/fcl-core/src/discovery/services/authn.ts
constant SERVICE_ACTOR_KEYS (line 18) | const SERVICE_ACTOR_KEYS = {
type ServiceData (line 26) | interface ServiceData {
type SubscriptionCallback (line 30) | type SubscriptionCallback = (
type Authn (line 35) | interface Authn {
function createHandlers (line 76) | function createHandlers(context: Pick<FCLContext, "config">) {
function createAuthn (line 165) | function createAuthn(context: Pick<FCLContext, "config">): Authn {
FILE: packages/fcl-core/src/discovery/utils.ts
type DiscoveryService (line 7) | interface DiscoveryService extends Service {
function getDiscoveryService (line 68) | async function getDiscoveryService(
FILE: packages/fcl-core/src/document/document.ts
type DocumentResolverParams (line 5) | interface DocumentResolverParams {
type RetrieveParams (line 9) | interface RetrieveParams {
function httpDocumentResolver (line 13) | async function httpDocumentResolver({
constant DOCUMENT_RESOLVERS (line 33) | const DOCUMENT_RESOLVERS: Map<string, typeof httpDocumentResolver> = new...
function retrieve (line 55) | async function retrieve(
FILE: packages/fcl-core/src/events/index.ts
constant FLOW_EMULATOR (line 8) | const FLOW_EMULATOR = "local"
function createEvents (line 10) | function createEvents(context: Pick<FCLContext, "config" | "sdk">) {
FILE: packages/fcl-core/src/events/legacy-events.ts
type SubscribeObject (line 14) | interface SubscribeObject {
constant RATE (line 25) | const RATE: number = 10000
constant UPDATED (line 26) | const UPDATED: string = "UPDATED"
constant TICK (line 27) | const TICK: string = "TICK"
constant HIGH_WATER_MARK (line 28) | const HIGH_WATER_MARK: string = "hwm"
function createHandlers (line 40) | function createHandlers(
function createLegacyEvents (line 92) | function createLegacyEvents(
FILE: packages/fcl-core/src/exec/args.ts
type ArgFn (line 4) | type ArgFn = typeof arg
type Types (line 5) | type Types = typeof t
type ArgsFn (line 14) | type ArgsFn = (arg: ArgFn, t: Types) => any[]
FILE: packages/fcl-core/src/exec/mutate.ts
type MutateOptions (line 12) | interface MutateOptions {
FILE: packages/fcl-core/src/exec/query-raw.ts
type QueryOptions (line 9) | interface QueryOptions {
function createQueryRaw (line 17) | function createQueryRaw(context: Pick<FCLContext, "sdk" | "config">) {
FILE: packages/fcl-core/src/exec/query.ts
function createQuery (line 5) | function createQuery(context: Pick<FCLContext, "sdk" | "config">) {
FILE: packages/fcl-core/src/exec/utils/normalize-args.ts
function normalizeArgs (line 23) | function normalizeArgs(ax: ArgsFn | any[] | undefined): any[] {
FILE: packages/fcl-core/src/exec/utils/pre.ts
type PreOptions (line 5) | interface PreOptions {
function pre (line 10) | async function pre(
function preMutate (line 57) | async function preMutate(
function preQuery (line 88) | async function preQuery(
FILE: packages/fcl-core/src/exec/utils/prep-template-opts.ts
type TemplateOptions (line 7) | interface TemplateOptions {
function prepTemplateOpts (line 43) | async function prepTemplateOpts(
FILE: packages/fcl-core/src/interaction-template-utils/derive-cadence-by-network/derive-cadence-by-network-1.0.0.ts
type DeriveCadenceByNetwork100Params (line 4) | interface DeriveCadenceByNetwork100Params {
function deriveCadenceByNetwork100 (line 17) | async function deriveCadenceByNetwork100({
FILE: packages/fcl-core/src/interaction-template-utils/derive-cadence-by-network/derive-cadence-by-network-1.1.0.ts
type DeriveCadenceByNetwork110Params (line 5) | interface DeriveCadenceByNetwork110Params {
function deriveCadenceByNetwork110 (line 18) | async function deriveCadenceByNetwork110({
FILE: packages/fcl-core/src/interaction-template-utils/derive-cadence-by-network/derive-cadence-by-network.ts
type DeriveCadenceByNetworkParams (line 6) | interface DeriveCadenceByNetworkParams {
function deriveCadenceByNetwork (line 19) | async function deriveCadenceByNetwork({
FILE: packages/fcl-core/src/interaction-template-utils/generate-dependency-pin/generate-dependency-pin-1.0.0.ts
type GenerateDependencyPin100Params (line 8) | interface GenerateDependencyPin100Params {
function creategenerateDependencyPin100 (line 13) | function creategenerateDependencyPin100(
FILE: packages/fcl-core/src/interaction-template-utils/generate-dependency-pin/generate-dependency-pin-1.1.0.ts
type GenerateDependencyPin110Params (line 8) | interface GenerateDependencyPin110Params {
function createGenerateDependencyPin110 (line 14) | function createGenerateDependencyPin110(
FILE: packages/fcl-core/src/interaction-template-utils/generate-dependency-pin/generate-dependency-pin.ts
type GenerateDependencyPinParams (line 5) | interface GenerateDependencyPinParams {
function generateDependencyPin (line 39) | async function generateDependencyPin(
function generateDependencyPinAtLatestSealedBlock (line 99) | async function generateDependencyPinAtLatestSealedBlock(
FILE: packages/fcl-core/src/interaction-template-utils/generate-template-id/generate-template-id-1.0.0.ts
type GenerateTemplateId100Params (line 6) | interface GenerateTemplateId100Params {
function generateTemplateId (line 17) | async function generateTemplateId({
FILE: packages/fcl-core/src/interaction-template-utils/generate-template-id/generate-template-id-1.1.0.ts
function generateContractNetworks (line 16) | async function generateContractNetworks(
function generateContractDependencies (line 38) | async function generateContractDependencies(
function createGenerateTemplateId (line 62) | function createGenerateTemplateId(
FILE: packages/fcl-core/src/interaction-template-utils/generate-template-id/generate-template-id.ts
function generateTemplateId (line 13) | async function generateTemplateId({
function verifyGeneratedTemplateId (line 48) | async function verifyGeneratedTemplateId({
FILE: packages/fcl-core/src/interaction-template-utils/get-interaction-template-audits.ts
type GetInteractionTemplateAuditsParams (line 9) | interface GetInteractionTemplateAuditsParams {
type GetInteractionTemplateAuditsOpts (line 14) | interface GetInteractionTemplateAuditsOpts {
function getInteractionTemplateAudits (line 67) | async function getInteractionTemplateAudits(
FILE: packages/fcl-core/src/interaction-template-utils/get-template-argument-message.ts
type GetTemplateArgumentMessageParams (line 4) | interface GetTemplateArgumentMessageParams {
function getTemplateArgumentMessage (line 21) | function getTemplateArgumentMessage({
FILE: packages/fcl-core/src/interaction-template-utils/get-template-message.ts
type GetTemplateMessageParams (line 4) | interface GetTemplateMessageParams {
function getTemplateMessage (line 19) | function getTemplateMessage({
FILE: packages/fcl-core/src/interaction-template-utils/interaction-template.ts
type ImportItem (line 1) | interface ImportItem {
type InteractionTemplateI18n (line 7) | interface InteractionTemplateI18n {
type InteractionTemplateMessage (line 12) | interface InteractionTemplateMessage {
type InteractionTemplateParameter (line 17) | interface InteractionTemplateParameter {
type InteractionTemplateNetwork (line 25) | interface InteractionTemplateNetwork {
type InteractionTemplateContract (line 32) | interface InteractionTemplateContract {
type InteractionTemplateDependency (line 37) | interface InteractionTemplateDependency {
type InteractionTemplateCadence (line 41) | interface InteractionTemplateCadence {
type InteractionTemplateData100 (line 46) | interface InteractionTemplateData100 {
type InteractionTemplateData110 (line 79) | interface InteractionTemplateData110 {
type InteractionTemplate100 (line 88) | interface InteractionTemplate100 {
type InteractionTemplate110 (line 95) | interface InteractionTemplate110 {
type InteractionTemplate (line 102) | type InteractionTemplate =
type GenerateTemplateIdParams (line 107) | interface GenerateTemplateIdParams {
type GetInteractionTemplateAuditsParams (line 111) | interface GetInteractionTemplateAuditsParams {
type GetInteractionTemplateAuditsOpts (line 116) | interface GetInteractionTemplateAuditsOpts {
type DeriveCadenceByNetworkParams (line 120) | interface DeriveCadenceByNetworkParams {
type GetTemplateMessageParams (line 125) | interface GetTemplateMessageParams {
type GetTemplateArgumentMessageParams (line 131) | interface GetTemplateArgumentMessageParams {
type GenerateDependencyPinParams (line 138) | interface GenerateDependencyPinParams {
type VerifyDependencyPinsSameParams (line 144) | interface VerifyDependencyPinsSameParams {
FILE: packages/fcl-core/src/interaction-template-utils/utils/find-imports.ts
function findImports (line 31) | function findImports(cadence: string): ImportItem[] {
FILE: packages/fcl-core/src/interaction-template-utils/utils/generate-import.ts
type GenerateImportParams (line 3) | interface GenerateImportParams {
function generateImport (line 27) | function generateImport({
FILE: packages/fcl-core/src/interaction-template-utils/utils/hash.ts
function genHash (line 18) | function genHash(utf8String: string): string {
FILE: packages/fcl-core/src/interaction-template-utils/utils/replace-string-imports.ts
type ReplaceStringImportsParams (line 1) | interface ReplaceStringImportsParams {
function replaceStringImports (line 14) | function replaceStringImports({
FILE: packages/fcl-core/src/interaction-template-utils/verify-dependency-pin-same-at-block.ts
type VerifyDependencyPinsSameParams (line 6) | interface VerifyDependencyPinsSameParams {
type VerifyDependencyPinsSameOpts (line 12) | interface VerifyDependencyPinsSameOpts {
type VerifyDependencyPinsSameAtLatestSealedBlockParams (line 16) | interface VerifyDependencyPinsSameAtLatestSealedBlockParams {
function verifyDependencyPinsSame (line 31) | async function verifyDependencyPinsSame(
function verifyDependencyPinsSameAtLatestSealedBlock (line 170) | async function verifyDependencyPinsSameAtLatestSealedBlock(
FILE: packages/fcl-core/src/normalizers/service/__vsn.ts
constant SERVICE_PRAGMA (line 1) | const SERVICE_PRAGMA = {
constant IDENTITY_PRAGMA (line 6) | const IDENTITY_PRAGMA = {
constant PROVIDER_PRAGMA (line 11) | const PROVIDER_PRAGMA = {
constant USER_PRAGMA (line 16) | const USER_PRAGMA = {
constant POLLING_RESPONSE_PRAGMA (line 21) | const POLLING_RESPONSE_PRAGMA = {
constant COMPOSITE_SIGNATURE_PRAGMA (line 26) | const COMPOSITE_SIGNATURE_PRAGMA = {
constant OPEN_ID_PRAGMA (line 31) | const OPEN_ID_PRAGMA = {
FILE: packages/fcl-core/src/normalizers/service/account-proof.ts
function normalizeAccountProof (line 24) | function normalizeAccountProof(service: Service | null): Service | null {
FILE: packages/fcl-core/src/normalizers/service/authn-refresh.ts
type AuthnRefreshService (line 3) | interface AuthnRefreshService extends Service {
function normalizeAuthnRefresh (line 31) | function normalizeAuthnRefresh(
FILE: packages/fcl-core/src/normalizers/service/authn.ts
type AuthnService (line 5) | interface AuthnService extends Service {
function normalizeAuthn (line 39) | function normalizeAuthn(
FILE: packages/fcl-core/src/normalizers/service/authz.ts
type AuthzService (line 5) | interface AuthzService extends Service {
function normalizeAuthz (line 34) | function normalizeAuthz(
FILE: packages/fcl-core/src/normalizers/service/back-channel-rpc.ts
function normalizeBackChannelRpc (line 21) | function normalizeBackChannelRpc(
FILE: packages/fcl-core/src/normalizers/service/composite-signature.ts
function normalizeCompositeSignature (line 20) | function normalizeCompositeSignature(
FILE: packages/fcl-core/src/normalizers/service/frame.ts
type FrameService (line 4) | interface FrameService extends Service {
function normalizeFrame (line 24) | function normalizeFrame(service: Service | null): FrameService | null {
FILE: packages/fcl-core/src/normalizers/service/local-view.ts
function normalizeLocalView (line 21) | function normalizeLocalView(resp: Service | null): Service | null {
FILE: packages/fcl-core/src/normalizers/service/open-id.ts
function normalizeOpenId (line 50) | function normalizeOpenId(service: Service | null): Service | null {
FILE: packages/fcl-core/src/normalizers/service/polling-response.ts
type PollingResponse (line 6) | interface PollingResponse {
function normalizePollingResponse (line 35) | function normalizePollingResponse(
FILE: packages/fcl-core/src/normalizers/service/pre-authz.ts
function normalizePreAuthz (line 25) | function normalizePreAuthz(
FILE: packages/fcl-core/src/normalizers/service/service.ts
function normalizeServices (line 33) | function normalizeServices(services: Service[], data?: any): Service[] {
function normalizeService (line 76) | function normalizeService(service: Service, data?: any): Service {
FILE: packages/fcl-core/src/normalizers/service/user-signature.ts
function normalizeUserSignature (line 22) | function normalizeUserSignature(
FILE: packages/fcl-core/src/serialize/index.ts
type SerializeOptions (line 11) | interface SerializeOptions {
function createSerialize (line 49) | function createSerialize(context: Pick<FCLContext, "config" | "sdk">) {
FILE: packages/fcl-core/src/test-utils/mock-context.ts
function createMockSdkClient (line 27) | function createMockSdkClient(
function createMockStorage (line 71) | function createMockStorage(): StorageProvider {
function createMockConfigService (line 88) | function createMockConfigService(
function createMockCurrentUser (line 150) | function createMockCurrentUser(
function createMockContext (line 188) | function createMockContext(
FILE: packages/fcl-core/src/transaction/constants.ts
constant TXID_REGEXP (line 1) | const TXID_REGEXP = /^[0-9a-fA-F]{64}$/
FILE: packages/fcl-core/src/transaction/legacy-polling.js
constant POLL (line 28) | const POLL = "POLL"
constant TIMEOUT (line 29) | const TIMEOUT = "TIMEOUT"
function isScheduledTransactionId (line 44) | function isScheduledTransactionId(txId) {
function transaction (line 126) | function transaction(
FILE: packages/fcl-core/src/transaction/transaction-error.ts
constant ERROR_CODE_REGEX (line 3) | const ERROR_CODE_REGEX = /\[Error Code: (\d+)\]/
class TransactionError (line 5) | class TransactionError extends Error {
method constructor (line 9) | private constructor(message: string, code: FvmErrorCode) {
method fromErrorMessage (line 15) | static fromErrorMessage(errorMessage: string): TransactionError {
FILE: packages/fcl-core/src/transaction/transaction.ts
constant FLOW_EMULATOR (line 24) | const FLOW_EMULATOR = "local"
function isScheduledTransactionId (line 35) | function isScheduledTransactionId(txId: string): boolean {
function createTransaction (line 39) | function createTransaction(context: Pick<FCLContext, "sdk" | "config">) {
function createObservable (line 216) | function createObservable(
FILE: packages/fcl-core/src/utils/chain-id/chain-id-watcher.ts
function watchForChainIdChanges (line 21) | function watchForChainIdChanges(
FILE: packages/fcl-core/src/utils/chain-id/fetch-chain-id.ts
function fetchChainId (line 17) | async function fetchChainId(
FILE: packages/fcl-core/src/utils/chain-id/get-chain-id.ts
type GetChainIdOptions (line 13) | interface GetChainIdOptions {
function createGetChainId (line 19) | function createGetChainId(context: {
function clearChainIdCache (line 156) | function clearChainIdCache(): void {
FILE: packages/fcl-core/src/utils/constants.ts
constant FCL_REDIRECT_URL_PARAM_NAME (line 1) | const FCL_REDIRECT_URL_PARAM_NAME: string = "fcl_redirect_url"
constant FCL_RESPONSE_PARAM_NAME (line 2) | const FCL_RESPONSE_PARAM_NAME: string = "fclResponseJson"
constant CORE_STRATEGIES (line 4) | const CORE_STRATEGIES: Record<string, string> = {
FILE: packages/fcl-core/src/utils/index.ts
function isAndroid (line 17) | function isAndroid(): boolean {
function isSmallIOS (line 37) | function isSmallIOS(): boolean {
function isLargeIOS (line 57) | function isLargeIOS(): boolean {
function isIOS (line 75) | function isIOS(): boolean {
function isMobile (line 96) | function isMobile(): boolean {
FILE: packages/fcl-core/src/utils/is-react-native.ts
function isReactNative (line 23) | function isReactNative(): boolean {
function setIsReactNative (line 47) | function setIsReactNative(value: boolean): void {
FILE: packages/fcl-core/src/utils/storage.ts
type StorageProvider (line 1) | type StorageProvider = {
FILE: packages/fcl-core/src/utils/url.ts
class URL (line 15) | class URL extends _URL {
method constructor (line 18) | constructor(url: string | URL, base?: string | URL, ...args: any[]) {
FILE: packages/fcl-core/src/wallet-utils/CompositeSignature.ts
class CompositeSignature (line 39) | class CompositeSignature {
method constructor (line 46) | constructor(addr: string, keyId: number | string, signature: string) {
FILE: packages/fcl-core/src/wallet-utils/encode-account-proof.ts
type AccountProofData (line 5) | interface AccountProofData {
FILE: packages/fcl-core/src/wallet-utils/inject-ext-service.ts
function injectExtService (line 22) | function injectExtService(service: Service): void {
FILE: packages/fcl-core/src/wallet-utils/send-msg-to-fcl.ts
type PollingResponse (line 7) | interface PollingResponse {
FILE: packages/fcl-ethereum-provider/src/__mocks__/fcl.ts
function mockUser (line 4) | function mockUser(initialValue?: CurrentUser | null) {
function mockConfig (line 45) | function mockConfig(
FILE: packages/fcl-ethereum-provider/src/accounts/account-manager.ts
class AccountManager (line 38) | class AccountManager {
method constructor (line 45) | constructor(
method initializeUserSubscription (line 57) | private initializeUserSubscription() {
method authenticate (line 109) | public async authenticate(): Promise<string[]> {
method unauthenticate (line 121) | public async unauthenticate(): Promise<void> {
method waitForTxResult (line 126) | private async waitForTxResult(
method fetchCOAFromFlowAddress (line 140) | private async fetchCOAFromFlowAddress(flowAddr: string): Promise<strin...
method getCOAAddress (line 154) | public async getCOAAddress(): Promise<string | null> {
method getAccounts (line 164) | public async getAccounts(): Promise<string[]> {
method getAndCreateAccounts (line 172) | public async getAndCreateAccounts(chainId: number): Promise<string[]> {
method createCOA (line 187) | public async createCOA(chainId: number): Promise<string> {
method subscribe (line 234) | public subscribe(callback: (accounts: string[]) => void): Subscription {
method getNonce (line 245) | private async getNonce(evmAddress: string): Promise<string> {
method sendTransaction (line 260) | async sendTransaction(params: {
method signMessage (line 335) | public async signMessage(
method validateChainId (line 381) | private async validateChainId(chainId: number): Promise<void> {
method getFlowNetworkOrThrow (line 393) | private getFlowNetworkOrThrow(chainId: number): FlowNetwork {
FILE: packages/fcl-ethereum-provider/src/constants.ts
type FlowNetwork (line 1) | enum FlowNetwork {
constant FLOW_CHAINS (line 6) | const FLOW_CHAINS = {
type ContractType (line 17) | enum ContractType {
type EventType (line 21) | enum EventType {
constant EVENT_IDENTIFIERS (line 26) | const EVENT_IDENTIFIERS = {
constant FLOW_CONTRACTS (line 37) | const FLOW_CONTRACTS = {
type TransactionExecutedEvent (line 44) | interface TransactionExecutedEvent {
constant ACCESS_NODE_API_KEY (line 60) | const ACCESS_NODE_API_KEY = "accessNode.api"
FILE: packages/fcl-ethereum-provider/src/create-provider.ts
type FclProviderConfig (line 12) | type FclProviderConfig = {
function createProvider (line 42) | function createProvider(config: FclProviderConfig): Eip1193Provider {
FILE: packages/fcl-ethereum-provider/src/events/event-dispatcher.ts
class EventDispatcher (line 18) | class EventDispatcher {
method constructor (line 29) | constructor(accountManager: AccountManager, networkManager: NetworkMan...
method on (line 74) | on<E extends keyof ProviderEvents>(
method off (line 83) | off<E extends keyof ProviderEvents>(
FILE: packages/fcl-ethereum-provider/src/gateway/gateway.ts
class Gateway (line 5) | class Gateway {
method constructor (line 8) | constructor(private rpcUrls: {[chainId: number]: string}) {}
method request (line 10) | public async request({
method getProvider (line 24) | private async getProvider(eip155ChainId: number): Promise<JsonRpcProvi...
FILE: packages/fcl-ethereum-provider/src/hash-utils.ts
function hashTypedDataLegacy (line 7) | function hashTypedDataLegacy(data: TypedData): string {
function hashTypedDataV3 (line 19) | function hashTypedDataV3(data: TypedData): string {
function hashTypedDataV4 (line 39) | function hashTypedDataV4(data: TypedData): string {
FILE: packages/fcl-ethereum-provider/src/network/network-manager.ts
type ChainIdStore (line 16) | type ChainIdStore = {
class NetworkManager (line 22) | class NetworkManager {
method constructor (line 29) | constructor(config: typeof fcl.config) {
method $chainId (line 70) | get $chainId() {
method getChainId (line 74) | public async getChainId(): Promise<number | null> {
method addChain (line 89) | public async addChain(_chainConfig: AddEthereumChainParams): Promise<n...
method switchChain (line 93) | public async switchChain(params: SwitchEthereumChainParams): Promise<n...
FILE: packages/fcl-ethereum-provider/src/notifications.ts
function displayErrorNotification (line 1) | function displayErrorNotification(title: string, message: string) {
FILE: packages/fcl-ethereum-provider/src/provider.ts
class FclEthereumProvider (line 13) | class FclEthereumProvider implements Eip1193Provider {
method constructor (line 14) | constructor(
method request (line 21) | async request<T = unknown>({
method disconnect (line 32) | async disconnect(): Promise<void> {
method on (line 37) | on<E extends keyof ProviderEvents>(
method removeListener (line 45) | removeListener<E extends keyof ProviderEvents>(
FILE: packages/fcl-ethereum-provider/src/rpc/handlers/eth-accounts.ts
function ethAccounts (line 4) | async function ethAccounts(
function ethRequestAccounts (line 11) | async function ethRequestAccounts(
FILE: packages/fcl-ethereum-provider/src/rpc/handlers/eth-chain-id.ts
function ethChainId (line 4) | async function ethChainId(networkManager: NetworkManager) {
FILE: packages/fcl-ethereum-provider/src/rpc/handlers/eth-send-transaction.ts
function ethSendTransaction (line 4) | async function ethSendTransaction(
FILE: packages/fcl-ethereum-provider/src/rpc/handlers/eth-signtypeddata.ts
function signTypedData (line 9) | async function signTypedData(
FILE: packages/fcl-ethereum-provider/src/rpc/handlers/personal-sign.ts
function personalSign (line 4) | async function personalSign(
FILE: packages/fcl-ethereum-provider/src/rpc/rpc-processor.ts
class RpcProcessor (line 19) | class RpcProcessor {
method constructor (line 20) | constructor(
method handleRequest (line 26) | async handleRequest({method, params}: ProviderRequest): Promise<any> {
FILE: packages/fcl-ethereum-provider/src/rpc/types.ts
type RpcHandler (line 1) | type RpcHandler = (params: any) => Promise<any>
FILE: packages/fcl-ethereum-provider/src/types/account.ts
type AddressStoreState (line 1) | interface AddressStoreState {
FILE: packages/fcl-ethereum-provider/src/types/eth.ts
type EthSignatureResponse (line 1) | type EthSignatureResponse = string
type PersonalSignParams (line 3) | type PersonalSignParams = [string, string]
type SignTypedDataParams (line 5) | interface SignTypedDataParams {
type TypedDataField (line 10) | interface TypedDataField {
type TypedDataDomain (line 15) | interface TypedDataDomain {
type TypedData (line 23) | interface TypedData {
type AddEthereumChainParams (line 30) | interface AddEthereumChainParams {
type SwitchEthereumChainParams (line 43) | interface SwitchEthereumChainParams {
FILE: packages/fcl-ethereum-provider/src/types/events.ts
type TransactionExecutedEvent (line 1) | type TransactionExecutedEvent = {
FILE: packages/fcl-ethereum-provider/src/types/provider.ts
type ProviderRequest (line 4) | type ProviderRequest = {
type ProviderResponse (line 9) | type ProviderResponse<T = unknown> = T
type ProviderEvents (line 12) | type ProviderEvents = {
type EventCallback (line 20) | type EventCallback<T> = (event: T) => void
type Eip1193Provider (line 23) | interface Eip1193Provider {
FILE: packages/fcl-ethereum-provider/src/util/chain.ts
function getFlowNetwork (line 3) | function getFlowNetwork(chainId: number): FlowNetwork | undefined {
FILE: packages/fcl-ethereum-provider/src/util/errors.ts
type ProviderErrorCode (line 1) | enum ProviderErrorCode {
class ProviderError (line 29) | class ProviderError extends Error {
method constructor (line 33) | constructor({code, cause}: {code: ProviderErrorCode; cause?: any}) {
FILE: packages/fcl-ethereum-provider/src/util/eth.ts
function formatChainId (line 9) | function formatChainId(chainId: string | number): `0x${string}` {
function getContractAddress (line 15) | function getContractAddress(
FILE: packages/fcl-ethereum-provider/src/util/observable.ts
class Observable (line 5) | class Observable<T> {
method constructor (line 8) | constructor(subscribe: (subscriber: Observer<T>) => Subscription) {
method subscribe (line 12) | subscribe(observerOrNext: ObserverOrNext<T>): Subscription {
method pipe (line 52) | pipe(
method asObservable (line 61) | asObservable(): Observable<T> {
type Subscription (line 68) | type Subscription = () => void
type Observer (line 70) | type Observer<T> = {
type ObserverOrNext (line 77) | type ObserverOrNext<T> = Observer<T> | ((value: T) => void)
class Subject (line 83) | class Subject<T> extends Observable<T> {
method constructor (line 86) | constructor() {
method next (line 95) | next(value: T) {
method error (line 99) | error(error: any) {
method complete (line 103) | complete() {
class BehaviorSubject (line 109) | class BehaviorSubject<T> extends Subject<T> {
method constructor (line 112) | constructor(initialValue: T) {
method next (line 117) | next(value: T) {
method getValue (line 122) | getValue() {
method subscribe (line 126) | subscribe(observerOrNext: ObserverOrNext<T>): Subscription {
function switchMap (line 139) | function switchMap<T, R>(
function map (line 175) | function map<T, R>(
function from (line 190) | function from<T>(promise: Promise<T>): Observable<T> {
function firstValueFrom (line 214) | async function firstValueFrom<T>(source: Observable<T>): Promise<T> {
function distinctUntilChanged (line 231) | function distinctUntilChanged<T>(): (
function concat (line 252) | function concat<T>(...sources: Observable<T>[]): Observable<T> {
function filter (line 282) | function filter<T>(
function of (line 301) | function of<T>(value: T): Observable<T> {
function skip (line 310) | function skip<T>(
function takeFirst (line 332) | function takeFirst<T>(): (source: Observable<T>) => Observable<T> {
function pairwise (line 347) | function pairwise<T>(): (source: Observable<T>) => Observable<[T, T]> {
function normalizeObserver (line 369) | function normalizeObserver<T>(observer: ObserverOrNext<T>): Observer<T> {
FILE: packages/fcl-ethereum-provider/src/util/transaction.ts
function numberToUint8Array (line 7) | function numberToUint8Array(value: number | bigint): Uint8Array {
function precalculateTxHash (line 21) | function precalculateTxHash(
FILE: packages/fcl-ethereum-provider/src/wc-provider.ts
class WalletConnectEthereumProvider (line 47) | class WalletConnectEthereumProvider extends EthereumProvider {
method init (line 48) | static async init(
method connect (line 119) | async connect(
function buildNamespaces (line 198) | function buildNamespaces(network: FlowNetwork): {
FILE: packages/fcl-rainbowkit-adapter/src/create-connector.ts
type FclConnectorOptions (line 15) | type FclConnectorOptions = {
type DefaultWalletOptions (line 24) | type DefaultWalletOptions = {
constant FALLBACK_ICON (line 28) | const FALLBACK_ICON =
method getProvider (line 99) | async getProvider(params) {
method connect (line 102) | async connect(params) {
method disconnect (line 105) | async disconnect() {
method getAccounts (line 108) | async getAccounts() {
method getChainId (line 111) | async getChainId() {
method isAuthorized (line 114) | async isAuthorized() {
method switchChain (line 117) | async switchChain(params) {
function updateConnectors (line 124) | function updateConnectors() {
FILE: packages/fcl-rainbowkit-adapter/src/get-wc-connector.ts
type RainbowKitDetails (line 40) | type RainbowKitDetails = any
type CreateConnector (line 41) | type CreateConnector = (walletDetails: WalletDetailsParams) => CreateCon...
type GetWalletConnectConnectorParams (line 43) | interface GetWalletConnectConnectorParams {
type CreateWalletConnectConnectorParams (line 48) | interface CreateWalletConnectConnectorParams {
type GetOrCreateWalletConnectInstanceParams (line 54) | interface GetOrCreateWalletConnectInstanceParams {
function createWalletConnectConnector (line 108) | function createWalletConnectConnector({
function getWalletConnectConnector (line 127) | function getWalletConnectConnector({
FILE: packages/fcl-rainbowkit-adapter/src/use-is-cadence-wallet-connected.ts
function useIsCadenceWalletConnected (line 6) | async function useIsCadenceWalletConnected(config: Config) {
FILE: packages/fcl-rainbowkit-adapter/src/wallets/wc-wallet.ts
constant WALLETCONNECT_ICON (line 36) | const WALLETCONNECT_ICON = `data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMj...
type WalletConnectWalletOptions (line 38) | interface WalletConnectWalletOptions {
FILE: packages/fcl-react-native/src/VERSION.ts
constant VERSION (line 5) | const VERSION: string =
FILE: packages/fcl-react-native/src/client.ts
constant PLATFORM (line 11) | const PLATFORM = "react-native"
type FlowClientConfig (line 17) | interface FlowClientConfig
function createFlowClient (line 37) | function createFlowClient(params: FlowClientConfig) {
FILE: packages/fcl-react-native/src/utils/react-native/ConnectModalProvider.js
function showModal (line 7) | function showModal(ModalComponent, props) {
function hideModal (line 14) | function hideModal() {
function ConnectModalProvider (line 20) | function ConnectModalProvider({children}) {
FILE: packages/fcl-react-native/src/utils/react-native/constants.js
constant DISCOVERY_RN_METHOD (line 2) | const DISCOVERY_RN_METHOD = "DISCOVERY/RN"
FILE: packages/fcl-react-native/src/utils/react-native/exec-local.js
constant VIEWS (line 10) | const VIEWS = {
function execLocal (line 19) | async function execLocal(
FILE: packages/fcl-react-native/src/utils/react-native/render-browser.js
function renderBrowser (line 11) | async function renderBrowser(src, opts = {}) {
FILE: packages/fcl-react-native/src/utils/react-native/render-deeplink.js
function renderDeeplink (line 13) | async function renderDeeplink(src, opts = {}) {
FILE: packages/fcl-react-native/src/utils/react-native/strategies/deeplink-rpc.js
function execDeeplinkRPC (line 4) | function execDeeplinkRPC({service, config, body}) {
FILE: packages/fcl-react-native/src/utils/react-native/strategies/discovery-rn.js
function execDiscoveryRN (line 30) | async function execDiscoveryRN({
FILE: packages/fcl-react-native/src/utils/react-native/strategies/utils/browser.js
function browser (line 8) | async function browser(service, config, body, opts = {}) {
FILE: packages/fcl-react-native/src/utils/react-native/strategies/utils/service-endpoint.js
function serviceEndpoint (line 11) | function serviceEndpoint(service, config, body) {
FILE: packages/fcl-react-native/src/walletconnect/client.ts
function initializeWalletConnect (line 9) | async function initializeWalletConnect() {
type FclWalletConnectConfig (line 41) | interface FclWalletConnectConfig {
constant DEFAULT_RELAY_URL (line 49) | const DEFAULT_RELAY_URL = "wss://relay.walletconnect.com"
constant DEFAULT_LOGGER (line 50) | const DEFAULT_LOGGER = "error" // Use "error" for production, "debug" fo...
function getClient (line 147) | async function getClient() {
function disconnectWalletConnect (line 157) | async function disconnectWalletConnect(): Promise<void> {
FILE: packages/fcl-react-native/src/walletconnect/constants.ts
constant SERVICE_PLUGIN_NAME (line 1) | const SERVICE_PLUGIN_NAME = "fcl-wc-plugin-react-native"
constant WC_SERVICE_METHOD (line 3) | const WC_SERVICE_METHOD = "WC/RPC"
constant FLOW_METHODS (line 5) | const FLOW_METHODS = {
constant REQUEST_TYPES (line 15) | const REQUEST_TYPES = {
FILE: packages/fcl-react-native/src/walletconnect/loader.ts
type WalletConnectConfig (line 5) | interface WalletConnectConfig {
function getMetadata (line 15) | function getMetadata(wcConfig: WalletConnectConfig) {
function loadFclWc (line 26) | function loadFclWc(wcConfig: WalletConnectConfig) {
function initFclWcLoader (line 54) | function initFclWcLoader() {
FILE: packages/fcl-react-native/src/walletconnect/service.ts
function validateSession (line 13) | async function validateSession(
function disconnectSession (line 34) | async function disconnectSession(
function findValidSession (line 46) | async function findValidSession(
function determineWalletAppLink (line 90) | function determineWalletAppLink(
function injectSessionIntoPreAuthz (line 109) | function injectSessionIntoPreAuthz(
function connectWc (line 323) | async function connectWc({
function openDeeplink (line 401) | async function openDeeplink(url: string) {
FILE: packages/fcl-react-native/src/walletconnect/session.ts
function createSessionProposal (line 6) | async function createSessionProposal({
function addSessionInfo (line 129) | function addSessionInfo(service: any) {
function makeSessionData (line 184) | function makeSessionData(
FILE: packages/fcl-wagmi-adapter/src/fcl-connector.ts
type FclWagmiAdapterParams (line 16) | type FclWagmiAdapterParams = Parameters<typeof createProvider>[0] & {
function fclWagmiAdapter (line 20) | function fclWagmiAdapter(params: FclWagmiAdapterParams) {
FILE: packages/fcl-wagmi-adapter/src/wc-connector.ts
type WalletConnectConnector (line 54) | type WalletConnectConnector = Connector & {
type EthereumProviderOptions (line 59) | type EthereumProviderOptions = Parameters<(typeof EthereumProvider)["ini...
type WalletConnectParameters (line 61) | type WalletConnectParameters = Compute<
function walletConnect (line 108) | function walletConnect(parameters: WalletConnectParameters) {
FILE: packages/fcl-wc/src/constants.ts
type FLOW_METHODS (line 1) | enum FLOW_METHODS {
type REQUEST_TYPES (line 8) | enum REQUEST_TYPES {
constant SERVICE_PLUGIN_NAME (line 13) | const SERVICE_PLUGIN_NAME = "fcl-plugin-service-walletconnect"
constant WC_SERVICE_METHOD (line 14) | const WC_SERVICE_METHOD = "WC/RPC"
FILE: packages/fcl-wc/src/fcl-wc.ts
type FclWalletConnectConfig (line 12) | interface FclWalletConnectConfig {
constant DEFAULT_RELAY_URL (line 22) | const DEFAULT_RELAY_URL = "wss://relay.walletconnect.com"
constant DEFAULT_LOGGER (line 23) | const DEFAULT_LOGGER = "debug"
function getProvider (line 123) | async function getProvider() {
FILE: packages/fcl-wc/src/service.ts
type WalletConnectModalType (line 19) | type WalletConnectModalType = import("@walletconnect/modal").WalletConne...
type Constructor (line 21) | type Constructor<T> = new (...args: any[]) => T
function onClose (line 108) | function onClose() {
function validateAppLink (line 167) | function validateAppLink({uid}: {uid: string}) {
function connectWc (line 181) | function connectWc(
function showWcRequestNotification (line 306) | function showWcRequestNotification({
function resolveProvider (line 328) | async function resolveProvider({
FILE: packages/fcl-wc/src/session.ts
function createSessionProposal (line 8) | async function createSessionProposal({
function addSessionInfo (line 102) | function addSessionInfo(service: Service) {
function makeSessionData (line 149) | function makeSessionData(session: SessionTypes.Struct) {
FILE: packages/fcl-wc/src/store.ts
function createStore (line 1) | function createStore<T>(initialState: T) {
FILE: packages/fcl-wc/src/types/types.ts
type NotificationInfo (line 1) | type NotificationInfo = {
FILE: packages/fcl-wc/src/ui/components/Notification.tsx
function Notification (line 4) | function Notification({
FILE: packages/fcl-wc/src/ui/notifications.tsx
function createRenderRoot (line 10) | function createRenderRoot() {
function showNotification (line 36) | function showNotification({
FILE: packages/fcl-wc/src/utils.ts
constant PRE_AUTHZ_SERVICE_TYPE (line 6) | const PRE_AUTHZ_SERVICE_TYPE = "pre-authz"
function isAndroid (line 56) | function isAndroid() {
function isSmallIOS (line 62) | function isSmallIOS() {
function isLargeIOS (line 68) | function isLargeIOS() {
function isIOS (line 72) | function isIOS() {
function isMobile (line 76) | function isMobile() {
function openDeeplink (line 80) | function openDeeplink(url: string) {
function shouldDeepLink (line 101) | function shouldDeepLink({service, user}: {service: Service; user: any}) {
function preloadImage (line 121) | function preloadImage(url?: string | null) {
FILE: packages/fcl/src/VERSION.ts
constant VERSION (line 3) | const VERSION: string = PACKAGE_CURRENT_VERSION || "TESTVERSION"
FILE: packages/fcl/src/client.ts
constant PLATFORM (line 10) | const PLATFORM = "web"
type FlowClientConfig (line 20) | interface FlowClientConfig
function createFlowClient (line 106) | function createFlowClient(params: FlowClientConfig) {
FILE: packages/fcl/src/discovery/exec-discovery.ts
function execDiscovery (line 3) | async function execDiscovery({
FILE: packages/fcl/src/discovery/exec-hook.ts
constant AUTHN_SERVICE_TYPE (line 6) | const AUTHN_SERVICE_TYPE = "authn"
function execStrategyHook (line 10) | async function execStrategyHook(...args: any) {
FILE: packages/fcl/src/discovery/rpc/client.ts
function createDiscoveryRpcClient (line 7) | function createDiscoveryRpcClient({
FILE: packages/fcl/src/discovery/rpc/handlers/exec-service.ts
constant APPROVED (line 4) | const APPROVED = "APPROVED"
FILE: packages/fcl/src/discovery/rpc/handlers/request-wc-qr.ts
function watchQrFactory (line 52) | function watchQrFactory({
FILE: packages/fcl/src/discovery/rpc/requests.ts
type DiscoveryRpc (line 3) | type DiscoveryRpc = RpcClient<{}, DiscoveryNotifications>
type DiscoveryNotification (line 5) | enum DiscoveryNotification {
type FclRequest (line 11) | enum FclRequest {
type DiscoveryNotifications (line 16) | type DiscoveryNotifications = {
FILE: packages/fcl/src/utils/async.ts
function wrapAbortSignal (line 4) | function wrapAbortSignal(signal?: AbortSignal) {
FILE: packages/fcl/src/utils/walletconnect/loader.ts
function initFclWcLoader (line 34) | function initFclWcLoader() {
function loadFclWc (line 49) | function loadFclWc(wcConfig: {
FILE: packages/fcl/src/utils/web/exec-local.js
constant VIEWS (line 9) | const VIEWS = {
function execLocal (line 17) | async function execLocal(service, opts = {serviceEndpoint: () => {}}) {
FILE: packages/fcl/src/utils/web/render-frame.js
constant FRAME (line 3) | const FRAME = "FCL_IFRAME"
constant FRAME_STYLES (line 5) | const FRAME_STYLES = `
function renderFrame (line 20) | function renderFrame(src) {
FILE: packages/fcl/src/utils/web/render-pop.js
constant POP (line 1) | const POP = "FCL_POP"
function popupWindow (line 6) | function popupWindow(url, windowName, win, w, h) {
function renderPop (line 19) | function renderPop(src) {
FILE: packages/fcl/src/utils/web/render-tab.js
constant TAB (line 1) | const TAB = "FCL_TAB"
function renderTab (line 6) | function renderTab(src) {
FILE: packages/fcl/src/utils/web/storage.ts
constant SESSION_STORAGE (line 13) | const SESSION_STORAGE = {
constant LOCAL_STORAGE (line 20) | const LOCAL_STORAGE = {
FILE: packages/fcl/src/utils/web/strategies/ext-rpc.js
function execExtRPC (line 5) | function execExtRPC({
FILE: packages/fcl/src/utils/web/strategies/iframe-rpc.js
function execIframeRPC (line 6) | function execIframeRPC({
FILE: packages/fcl/src/utils/web/strategies/pop-rpc.js
function execPopRPC (line 6) | function execPopRPC({
FILE: packages/fcl/src/utils/web/strategies/tab-rpc.js
function execTabRPC (line 6) | function execTabRPC({
FILE: packages/fcl/src/utils/web/strategies/utils/extension.js
function extension (line 5) | function extension(service, opts = {}) {
FILE: packages/fcl/src/utils/web/strategies/utils/frame.js
function frame (line 6) | function frame(service, opts = {}) {
FILE: packages/fcl/src/utils/web/strategies/utils/pop.js
function pop (line 6) | function pop(service, opts = {}) {
FILE: packages/fcl/src/utils/web/strategies/utils/tab.js
function tab (line 6) | function tab(service, opts = {}) {
FILE: packages/protobuf/src/generated/flow/access/access_pb.d.ts
class PingRequest (line 16) | class PingRequest extends jspb.Message {
type AsObject (line 28) | type AsObject = {
class PingResponse (line 32) | class PingResponse extends jspb.Message {
type AsObject (line 44) | type AsObject = {
class GetNodeVersionInfoRequest (line 48) | class GetNodeVersionInfoRequest extends jspb.Message {
type AsObject (line 60) | type AsObject = {
class GetNodeVersionInfoResponse (line 64) | class GetNodeVersionInfoResponse extends jspb.Message {
type AsObject (line 81) | type AsObject = {
class GetLatestBlockHeaderRequest (line 86) | class GetLatestBlockHeaderRequest extends jspb.Message {
type AsObject (line 101) | type AsObject = {
class GetBlockHeaderByIDRequest (line 106) | class GetBlockHeaderByIDRequest extends jspb.Message {
type AsObject (line 123) | type AsObject = {
class GetBlockHeaderByHeightRequest (line 128) | class GetBlockHeaderByHeightRequest extends jspb.Message {
type AsObject (line 143) | type AsObject = {
class BlockHeaderResponse (line 148) | class BlockHeaderResponse extends jspb.Message {
type AsObject (line 173) | type AsObject = {
class GetLatestBlockRequest (line 180) | class GetLatestBlockRequest extends jspb.Message {
type AsObject (line 198) | type AsObject = {
class GetBlockByIDRequest (line 204) | class GetBlockByIDRequest extends jspb.Message {
type AsObject (line 224) | type AsObject = {
class GetBlockByHeightRequest (line 230) | class GetBlockByHeightRequest extends jspb.Message {
type AsObject (line 248) | type AsObject = {
class BlockResponse (line 254) | class BlockResponse extends jspb.Message {
type AsObject (line 279) | type AsObject = {
class GetCollectionByIDRequest (line 286) | class GetCollectionByIDRequest extends jspb.Message {
type AsObject (line 303) | type AsObject = {
class CollectionResponse (line 308) | class CollectionResponse extends jspb.Message {
type AsObject (line 330) | type AsObject = {
class SendTransactionRequest (line 336) | class SendTransactionRequest extends jspb.Message {
type AsObject (line 353) | type AsObject = {
class SendTransactionResponse (line 358) | class SendTransactionResponse extends jspb.Message {
type AsObject (line 380) | type AsObject = {
class GetTransactionRequest (line 386) | class GetTransactionRequest extends jspb.Message {
type AsObject (line 416) | type AsObject = {
class GetSystemTransactionRequest (line 424) | class GetSystemTransactionRequest extends jspb.Message {
type AsObject (line 441) | type AsObject = {
class GetSystemTransactionResultRequest (line 446) | class GetSystemTransactionResultRequest extends jspb.Message {
type AsObject (line 466) | type AsObject = {
class GetTransactionByIndexRequest (line 472) | class GetTransactionByIndexRequest extends jspb.Message {
type AsObject (line 495) | type AsObject = {
class GetTransactionsByBlockIDRequest (line 502) | class GetTransactionsByBlockIDRequest extends jspb.Message {
type AsObject (line 522) | type AsObject = {
class TransactionResultsResponse (line 528) | class TransactionResultsResponse extends jspb.Message {
type AsObject (line 550) | type AsObject = {
class TransactionsResponse (line 556) | class TransactionsResponse extends jspb.Message {
type AsObject (line 578) | type AsObject = {
class TransactionResponse (line 584) | class TransactionResponse extends jspb.Message {
type AsObject (line 606) | type AsObject = {
class TransactionResultResponse (line 612) | class TransactionResultResponse extends jspb.Message {
type AsObject (line 664) | type AsObject = {
class GetAccountRequest (line 678) | class GetAccountRequest extends jspb.Message {
type AsObject (line 695) | type AsObject = {
class GetAccountResponse (line 700) | class GetAccountResponse extends jspb.Message {
type AsObject (line 722) | type AsObject = {
class GetAccountAtLatestBlockRequest (line 728) | class GetAccountAtLatestBlockRequest extends jspb.Message {
type AsObject (line 745) | type AsObject = {
class AccountResponse (line 750) | class AccountResponse extends jspb.Message {
type AsObject (line 772) | type AsObject = {
class GetAccountAtBlockHeightRequest (line 778) | class GetAccountAtBlockHeightRequest extends jspb.Message {
type AsObject (line 798) | type AsObject = {
class ExecuteScriptAtLatestBlockRequest (line 804) | class ExecuteScriptAtLatestBlockRequest extends jspb.Message {
type AsObject (line 828) | type AsObject = {
class ExecuteScriptAtBlockIDRequest (line 834) | class ExecuteScriptAtBlockIDRequest extends jspb.Message {
type AsObject (line 863) | type AsObject = {
class ExecuteScriptAtBlockHeightRequest (line 870) | class ExecuteScriptAtBlockHeightRequest extends jspb.Message {
type AsObject (line 897) | type AsObject = {
class ExecuteScriptResponse (line 904) | class ExecuteScriptResponse extends jspb.Message {
type AsObject (line 929) | type AsObject = {
class GetEventsForHeightRangeRequest (line 936) | class GetEventsForHeightRangeRequest extends jspb.Message {
type AsObject (line 960) | type AsObject = {
class GetEventsForBlockIDsRequest (line 968) | class GetEventsForBlockIDsRequest extends jspb.Message {
type AsObject (line 993) | type AsObject = {
class EventsResponse (line 1000) | class EventsResponse extends jspb.Message {
type AsObject (line 1022) | type AsObject = {
class Result (line 1027) | class Result extends jspb.Message {
type AsObject (line 1057) | type AsObject = {
class GetNetworkParametersRequest (line 1066) | class GetNetworkParametersRequest extends jspb.Message {
type AsObject (line 1078) | type AsObject = {
class GetNetworkParametersResponse (line 1082) | class GetNetworkParametersResponse extends jspb.Message {
type AsObject (line 1097) | type AsObject = {
class GetLatestProtocolStateSnapshotRequest (line 1102) | class GetLatestProtocolStateSnapshotRequest extends jspb.Message {
type AsObject (line 1114) | type AsObject = {
class GetProtocolStateSnapshotByBlockIDRequest (line 1118) | class GetProtocolStateSnapshotByBlockIDRequest extends jspb.Message {
type AsObject (line 1135) | type AsObject = {
class GetProtocolStateSnapshotByHeightRequest (line 1140) | class GetProtocolStateSnapshotByHeightRequest extends jspb.Message {
type AsObject (line 1155) | type AsObject = {
class ProtocolStateSnapshotResponse (line 1160) | class ProtocolStateSnapshotResponse extends jspb.Message {
type AsObject (line 1182) | type AsObject = {
class GetExecutionResultForBlockIDRequest (line 1188) | class GetExecutionResultForBlockIDRequest extends jspb.Message {
type AsObject (line 1205) | type AsObject = {
class ExecutionResultForBlockIDResponse (line 1210) | class ExecutionResultForBlockIDResponse extends jspb.Message {
type AsObject (line 1232) | type AsObject = {
class GetExecutionResultByIDRequest (line 1238) | class GetExecutionResultByIDRequest extends jspb.Message {
type AsObject (line 1255) | type AsObject = {
class ExecutionResultByIDResponse (line 1260) | class ExecutionResultByIDResponse extends jspb.Message {
type AsObject (line 1282) | type AsObject = {
class SubscribeBlocksFromStartBlockIDRequest (line 1288) | class SubscribeBlocksFromStartBlockIDRequest extends jspb.Message {
type AsObject (line 1311) | type AsObject = {
class SubscribeBlocksFromStartHeightRequest (line 1318) | class SubscribeBlocksFromStartHeightRequest extends jspb.Message {
type AsObject (line 1339) | type AsObject = {
class SubscribeBlocksFromLatestRequest (line 1346) | class SubscribeBlocksFromLatestRequest extends jspb.Message {
type AsObject (line 1364) | type AsObject = {
class SubscribeBlocksResponse (line 1370) | class SubscribeBlocksResponse extends jspb.Message {
type AsObject (line 1387) | type AsObject = {
class SubscribeBlockHeadersFromStartBlockIDRequest (line 1392) | class SubscribeBlockHeadersFromStartBlockIDRequest extends jspb.Message {
type AsObject (line 1412) | type AsObject = {
class SubscribeBlockHeadersFromStartHeightRequest (line 1418) | class SubscribeBlockHeadersFromStartHeightRequest extends jspb.Message {
type AsObject (line 1436) | type AsObject = {
class SubscribeBlockHeadersFromLatestRequest (line 1442) | class SubscribeBlockHeadersFromLatestRequest extends jspb.Message {
type AsObject (line 1457) | type AsObject = {
class SubscribeBlockHeadersResponse (line 1462) | class SubscribeBlockHeadersResponse extends jspb.Message {
type AsObject (line 1479) | type AsObject = {
class SubscribeBlockDigestsFromStartBlockIDRequest (line 1484) | class SubscribeBlockDigestsFromStartBlockIDRequest extends jspb.Message {
type AsObject (line 1504) | type AsObject = {
class SubscribeBlockDigestsFromStartHeightRequest (line 1510) | class SubscribeBlockDigestsFromStartHeightRequest extends jspb.Message {
type AsObject (line 1528) | type AsObject = {
class SubscribeBlockDigestsFromLatestRequest (line 1534) | class SubscribeBlockDigestsFromLatestRequest extends jspb.Message {
type AsObject (line 1549) | type AsObject = {
class SubscribeBlockDigestsResponse (line 1554) | class SubscribeBlockDigestsResponse extends jspb.Message {
type AsObject (line 1579) | type AsObject = {
class SendAndSubscribeTransactionStatusesRequest (line 1586) | class SendAndSubscribeTransactionStatusesRequest extends jspb.Message {
type AsObject (line 1603) | type AsObject = {
class SendAndSubscribeTransactionStatusesResponse (line 1608) | class SendAndSubscribeTransactionStatusesResponse extends jspb.Message {
type AsObject (line 1631) | type AsObject = {
FILE: packages/protobuf/src/generated/flow/access/access_pb_service.d.ts
type AccessAPIPing (line 7) | type AccessAPIPing = {
type AccessAPIGetNodeVersionInfo (line 16) | type AccessAPIGetNodeVersionInfo = {
type AccessAPIGetLatestBlockHeader (line 25) | type AccessAPIGetLatestBlockHeader = {
type AccessAPIGetBlockHeaderByID (line 34) | type AccessAPIGetBlockHeaderByID = {
type AccessAPIGetBlockHeaderByHeight (line 43) | type AccessAPIGetBlockHeaderByHeight = {
type AccessAPIGetLatestBlock (line 52) | type AccessAPIGetLatestBlock = {
type AccessAPIGetBlockByID (line 61) | type AccessAPIGetBlockByID = {
type AccessAPIGetBlockByHeight (line 70) | type AccessAPIGetBlockByHeight = {
type AccessAPIGetCollectionByID (line 79) | type AccessAPIGetCollectionByID = {
type AccessAPISendTransaction (line 88) | type AccessAPISendTransaction = {
type AccessAPIGetTransaction (line 97) | type AccessAPIGetTransaction = {
type AccessAPIGetTransactionResult (line 106) | type AccessAPIGetTransactionResult = {
type AccessAPIGetTransactionResultByIndex (line 115) | type AccessAPIGetTransactionResultByIndex = {
type AccessAPIGetTransactionResultsByBlockID (line 124) | type AccessAPIGetTransactionResultsByBlockID = {
type AccessAPIGetTransactionsByBlockID (line 133) | type AccessAPIGetTransactionsByBlockID = {
type AccessAPIGetSystemTransaction (line 142) | type AccessAPIGetSystemTransaction = {
type AccessAPIGetSystemTransactionResult (line 151) | type AccessAPIGetSystemTransactionResult = {
type AccessAPIGetAccount (line 160) | type AccessAPIGetAccount = {
type AccessAPIGetAccountAtLatestBlock (line 169) | type AccessAPIGetAccountAtLatestBlock = {
type AccessAPIGetAccountAtBlockHeight (line 178) | type AccessAPIGetAccountAtBlockHeight = {
type AccessAPIExecuteScriptAtLatestBlock (line 187) | type AccessAPIExecuteScriptAtLatestBlock = {
type AccessAPIExecuteScriptAtBlockID (line 196) | type AccessAPIExecuteScriptAtBlockID = {
type AccessAPIExecuteScriptAtBlockHeight (line 205) | type AccessAPIExecuteScriptAtBlockHeight = {
type AccessAPIGetEventsForHeightRange (line 214) | type AccessAPIGetEventsForHeightRange = {
type AccessAPIGetEventsForBlockIDs (line 223) | type AccessAPIGetEventsForBlockIDs = {
type AccessAPIGetNetworkParameters (line 232) | type AccessAPIGetNetworkParameters = {
type AccessAPIGetLatestProtocolStateSnapshot (line 241) | type AccessAPIGetLatestProtocolStateSnapshot = {
type AccessAPIGetProtocolStateSnapshotByBlockID (line 250) | type AccessAPIGetProtocolStateSnapshotByBlockID = {
type AccessAPIGetProtocolStateSnapshotByHeight (line 259) | type AccessAPIGetProtocolStateSnapshotByHeight = {
type AccessAPIGetExecutionResultForBlockID (line 268) | type AccessAPIGetExecutionResultForBlockID = {
type AccessAPIGetExecutionResultByID (line 277) | type AccessAPIGetExecutionResultByID = {
type AccessAPISubscribeBlocksFromStartBlockID (line 286) | type AccessAPISubscribeBlocksFromStartBlockID = {
type AccessAPISubscribeBlocksFromStartHeight (line 295) | type AccessAPISubscribeBlocksFromStartHeight = {
type AccessAPISubscribeBlocksFromLatest (line 304) | type AccessAPISubscribeBlocksFromLatest = {
type AccessAPISubscribeBlockHeadersFromStartBlockID (line 313) | type AccessAPISubscribeBlockHeadersFromStartBlockID = {
type AccessAPISubscribeBlockHeadersFromStartHeight (line 322) | type AccessAPISubscribeBlockHeadersFromStartHeight = {
type AccessAPISubscribeBlockHeadersFromLatest (line 331) | type AccessAPISubscribeBlockHeadersFromLatest = {
type AccessAPISubscribeBlockDigestsFromStartBlockID (line 340) | type AccessAPISubscribeBlockDigestsFromStartBlockID = {
type AccessAPISubscribeBlockDigestsFromStartHeight (line 349) | type AccessAPISubscribeBlockDigestsFromStartHeight = {
type AccessAPISubscribeBlockDigestsFromLatest (line 358) | type AccessAPISubscribeBlockDigestsFromLatest = {
type AccessAPISendAndSubscribeTransactionStatuses (line 367) | type AccessAPISendAndSubscribeTransactionStatuses = {
class AccessAPI (line 376) | class AccessAPI {
type ServiceError (line 421) | type ServiceError = { message: string, code: number; metadata: grpc.Meta...
type Status (line 422) | type Status = { details: string, code: number; metadata: grpc.Metadata }
type UnaryResponse (line 424) | interface UnaryResponse {
type ResponseStream (line 427) | interface ResponseStream<T> {
type RequestStream (line 433) | interface RequestStream<T> {
type BidirectionalStream (line 440) | interface BidirectionalStream<ReqT, ResT> {
class AccessAPIClient (line 449) | class AccessAPIClient {
FILE: packages/protobuf/src/generated/flow/access/access_pb_service.js
function AccessAPI (line 8) | function AccessAPI() {}
function AccessAPIClient (line 384) | function AccessAPIClient(serviceHost, options) {
FILE: packages/protobuf/src/generated/flow/entities/account_pb.d.ts
class Account (line 6) | class Account extends jspb.Message {
type AsObject (line 38) | type AsObject = {
class AccountKey (line 47) | class AccountKey extends jspb.Message {
type AsObject (line 82) | type AsObject = {
FILE: packages/protobuf/src/generated/flow/entities/block_execution_data_pb.d.ts
class BlockExecutionData (line 8) | class BlockExecutionData extends jspb.Message {
type AsObject (line 30) | type AsObject = {
class ChunkExecutionData (line 36) | class ChunkExecutionData extends jspb.Message {
type AsObject (line 68) | type AsObject = {
class ExecutionDataCollection (line 76) | class ExecutionDataCollection extends jspb.Message {
type AsObject (line 93) | type AsObject = {
class TrieUpdate (line 98) | class TrieUpdate extends jspb.Message {
type AsObject (line 127) | type AsObject = {
class Payload (line 134) | class Payload extends jspb.Message {
type AsObject (line 156) | type AsObject = {
class KeyPart (line 162) | class KeyPart extends jspb.Message {
type AsObject (line 182) | type AsObject = {
class ExecutionDataTransactionResult (line 188) | class ExecutionDataTransactionResult extends jspb.Message {
type AsObject (line 211) | type AsObject = {
FILE: packages/protobuf/src/generated/flow/entities/block_header_pb.d.ts
class BlockHeader (line 7) | class BlockHeader extends jspb.Message {
type AsObject (line 83) | type AsObject = {
class TimeoutCertificate (line 101) | class TimeoutCertificate extends jspb.Message {
type AsObject (line 136) | type AsObject = {
class QuorumCertificate (line 145) | class QuorumCertificate extends jspb.Message {
type AsObject (line 175) | type AsObject = {
FILE: packages/protobuf/src/generated/flow/entities/block_pb.d.ts
class Block (line 11) | class Block extends jspb.Message {
type AsObject (line 78) | type AsObject = {
type BlockStatusMap (line 93) | interface BlockStatusMap {
FILE: packages/protobuf/src/generated/flow/entities/block_seal_pb.d.ts
class BlockSeal (line 6) | class BlockSeal extends jspb.Message {
type AsObject (line 57) | type AsObject = {
class AggregatedSignature (line 68) | class AggregatedSignature extends jspb.Message {
type AsObject (line 94) | type AsObject = {
FILE: packages/protobuf/src/generated/flow/entities/collection_pb.d.ts
class Collection (line 6) | class Collection extends jspb.Message {
type AsObject (line 30) | type AsObject = {
class CollectionGuarantee (line 36) | class CollectionGuarantee extends jspb.Message {
type AsObject (line 82) | type AsObject = {
FILE: packages/protobuf/src/generated/flow/entities/event_pb.d.ts
class Event (line 6) | class Event extends jspb.Message {
type AsObject (line 37) | type AsObject = {
type EventEncodingVersionMap (line 46) | interface EventEncodingVersionMap {
FILE: packages/protobuf/src/generated/flow/entities/execution_result_pb.d.ts
class ExecutionResult (line 6) | class ExecutionResult extends jspb.Message {
type AsObject (line 43) | type AsObject = {
class Chunk (line 52) | class Chunk extends jspb.Message {
type AsObject (line 106) | type AsObject = {
class ServiceEvent (line 120) | class ServiceEvent extends jspb.Message {
type AsObject (line 140) | type AsObject = {
class ExecutionReceiptMeta (line 146) | class ExecutionReceiptMeta extends jspb.Message {
type AsObject (line 180) | type AsObject = {
FILE: packages/protobuf/src/generated/flow/entities/metadata_pb.d.ts
class Metadata (line 6) | class Metadata extends jspb.Message {
type AsObject (line 31) | type AsObject = {
FILE: packages/protobuf/src/generated/flow/entities/node_version_info_pb.d.ts
class NodeVersionInfo (line 6) | class NodeVersionInfo extends jspb.Message {
type AsObject (line 38) | type AsObject = {
FILE: packages/protobuf/src/generated/flow/entities/register_pb.d.ts
class RegisterID (line 6) | class RegisterID extends jspb.Message {
type AsObject (line 28) | type AsObject = {
FILE: packages/protobuf/src/generated/flow/entities/transaction_pb.d.ts
class Transaction (line 7) | class Transaction extends jspb.Message {
type AsObject (line 66) | type AsObject = {
class ProposalKey (line 78) | class ProposalKey extends jspb.Message {
type AsObject (line 101) | type AsObject = {
class Signature (line 108) | class Signature extends jspb.Message {
type AsObject (line 133) | type AsObject = {
type TransactionStatusMap (line 141) | interface TransactionStatusMap {
FILE: packages/protobuf/src/generated/flow/execution/execution_pb.d.ts
class PingRequest (line 10) | class PingRequest extends jspb.Message {
type AsObject (line 22) | type AsObject = {
class PingResponse (line 26) | class PingResponse extends jspb.Message {
type AsObject (line 38) | type AsObject = {
class GetAccountAtBlockIDRequest (line 42) | class GetAccountAtBlockIDRequest extends jspb.Message {
type AsObject (line 64) | type AsObject = {
class GetAccountAtBlockIDResponse (line 70) | class GetAccountAtBlockIDResponse extends jspb.Message {
type AsObject (line 87) | type AsObject = {
class ExecuteScriptAtBlockIDRequest (line 92) | class ExecuteScriptAtBlockIDRequest extends jspb.Message {
type AsObject (line 121) | type AsObject = {
class ExecuteScriptAtBlockIDResponse (line 128) | class ExecuteScriptAtBlockIDResponse extends jspb.Message {
type AsObject (line 148) | type AsObject = {
class GetEventsForBlockIDsResponse (line 154) | class GetEventsForBlockIDsResponse extends jspb.Message {
type AsObject (line 174) | type AsObject = {
class Result (line 179) | class Result extends jspb.Message {
type AsObject (line 204) | type AsObject = {
class GetEventsForBlockIDsRequest (line 212) | class GetEventsForBlockIDsRequest extends jspb.Message {
type AsObject (line 234) | type AsObject = {
class GetTransactionResultRequest (line 240) | class GetTransactionResultRequest extends jspb.Message {
type AsObject (line 262) | type AsObject = {
class GetTransactionByIndexRequest (line 268) | class GetTransactionByIndexRequest extends jspb.Message {
type AsObject (line 288) | type AsObject = {
class GetTransactionResultResponse (line 294) | class GetTransactionResultResponse extends jspb.Message {
type AsObject (line 323) | type AsObject = {
class GetTransactionsByBlockIDRequest (line 332) | class GetTransactionsByBlockIDRequest extends jspb.Message {
type AsObject (line 349) | type AsObject = {
class GetTransactionResultsResponse (line 354) | class GetTransactionResultsResponse extends jspb.Message {
type AsObject (line 374) | type AsObject = {
class GetTransactionErrorMessageRequest (line 380) | class GetTransactionErrorMessageRequest extends jspb.Message {
type AsObject (line 402) | type AsObject = {
class GetTransactionErrorMessageByIndexRequest (line 408) | class GetTransactionErrorMessageByIndexRequest extends jspb.Message {
type AsObject (line 428) | type AsObject = {
class GetTransactionErrorMessageResponse (line 434) | class GetTransactionErrorMessageResponse extends jspb.Message {
type AsObject (line 454) | type AsObject = {
class GetTransactionErrorMessagesByBlockIDRequest (line 460) | class GetTransactionErrorMessagesByBlockIDRequest extends jspb.Message {
type AsObject (line 477) | type AsObject = {
class GetTransactionErrorMessagesResponse (line 482) | class GetTransactionErrorMessagesResponse extends jspb.Message {
type AsObject (line 499) | type AsObject = {
class Result (line 503) | class Result extends jspb.Message {
type AsObject (line 526) | type AsObject = {
class GetRegisterAtBlockIDRequest (line 534) | class GetRegisterAtBlockIDRequest extends jspb.Message {
type AsObject (line 561) | type AsObject = {
class GetRegisterAtBlockIDResponse (line 568) | class GetRegisterAtBlockIDResponse extends jspb.Message {
type AsObject (line 585) | type AsObject = {
class GetLatestBlockHeaderRequest (line 590) | class GetLatestBlockHeaderRequest extends jspb.Message {
type AsObject (line 605) | type AsObject = {
class GetBlockHeaderByIDRequest (line 610) | class GetBlockHeaderByIDRequest extends jspb.Message {
type AsObject (line 627) | type AsObject = {
class BlockHeaderResponse (line 632) | class BlockHeaderResponse extends jspb.Message {
type AsObject (line 649) | type AsObject = {
FILE: packages/protobuf/src/generated/flow/execution/execution_pb_service.d.ts
type ExecutionAPIPing (line 7) | type ExecutionAPIPing = {
type ExecutionAPIGetAccountAtBlockID (line 16) | type ExecutionAPIGetAccountAtBlockID = {
type ExecutionAPIExecuteScriptAtBlockID (line 25) | type ExecutionAPIExecuteScriptAtBlockID = {
type ExecutionAPIGetEventsForBlockIDs (line 34) | type ExecutionAPIGetEventsForBlockIDs = {
type ExecutionAPIGetTransactionResult (line 43) | type ExecutionAPIGetTransactionResult = {
type ExecutionAPIGetTransactionResultByIndex (line 52) | type ExecutionAPIGetTransactionResultByIndex = {
type ExecutionAPIGetTransactionResultsByBlockID (line 61) | type ExecutionAPIGetTransactionResultsByBlockID = {
type ExecutionAPIGetTransactionErrorMessage (line 70) | type ExecutionAPIGetTransactionErrorMessage = {
type ExecutionAPIGetTransactionErrorMessageByIndex (line 79) | type ExecutionAPIGetTransactionErrorMessageByIndex = {
type ExecutionAPIGetTransactionErrorMessagesByBlockID (line 88) | type ExecutionAPIGetTransactionErrorMessagesByBlockID = {
type ExecutionAPIGetRegisterAtBlockID (line 97) | type ExecutionAPIGetRegisterAtBlockID = {
type ExecutionAPIGetLatestBlockHeader (line 106) | type ExecutionAPIGetLatestBlockHeader = {
type ExecutionAPIGetBlockHeaderByID (line 115) | type ExecutionAPIGetBlockHeaderByID = {
class ExecutionAPI (line 124) | class ExecutionAPI {
type ServiceError (line 141) | type ServiceError = { message: string, code: number; metadata: grpc.Meta...
type Status (line 142) | type Status = { details: string, code: number; metadata: grpc.Metadata }
type UnaryResponse (line 144) | interface UnaryResponse {
type ResponseStream (line 147) | interface ResponseStream<T> {
type RequestStream (line 153) | interface RequestStream<T> {
type BidirectionalStream (line 160) | interface BidirectionalStream<ReqT, ResT> {
class ExecutionAPIClient (line 169) | class ExecutionAPIClient {
FILE: packages/protobuf/src/generated/flow/execution/execution_pb_service.js
function ExecutionAPI (line 8) | function ExecutionAPI() {}
function ExecutionAPIClient (line 132) | function ExecutionAPIClient(serviceHost, options) {
FILE: packages/protobuf/src/generated/flow/executiondata/executiondata_pb.d.ts
class GetExecutionDataByBlockIDRequest (line 10) | class GetExecutionDataByBlockIDRequest extends jspb.Message {
type AsObject (line 30) | type AsObject = {
class GetExecutionDataByBlockIDResponse (line 36) | class GetExecutionDataByBlockIDResponse extends jspb.Message {
type AsObject (line 53) | type AsObject = {
class SubscribeExecutionDataRequest (line 58) | class SubscribeExecutionDataRequest extends jspb.Message {
type AsObject (line 81) | type AsObject = {
class SubscribeExecutionDataResponse (line 88) | class SubscribeExecutionDataResponse extends jspb.Message {
type AsObject (line 113) | type AsObject = {
class SubscribeEventsRequest (line 120) | class SubscribeEventsRequest extends jspb.Message {
type AsObject (line 151) | type AsObject = {
class SubscribeEventsResponse (line 160) | class SubscribeEventsResponse extends jspb.Message {
type AsObject (line 190) | type AsObject = {
class EventFilter (line 198) | class EventFilter extends jspb.Message {
type AsObject (line 225) | type AsObject = {
class GetRegisterValuesRequest (line 232) | class GetRegisterValuesRequest extends jspb.Message {
type AsObject (line 252) | type AsObject = {
class GetRegisterValuesResponse (line 258) | class GetRegisterValuesResponse extends jspb.Message {
type AsObject (line 277) | type AsObject = {
FILE: packages/protobuf/src/generated/flow/executiondata/executiondata_pb_service.d.ts
type ExecutionDataAPIGetExecutionDataByBlockID (line 7) | type ExecutionDataAPIGetExecutionDataByBlockID = {
type ExecutionDataAPISubscribeExecutionData (line 16) | type ExecutionDataAPISubscribeExecutionData = {
type ExecutionDataAPISubscribeEvents (line 25) | type ExecutionDataAPISubscribeEvents = {
type ExecutionDataAPIGetRegisterValues (line 34) | type ExecutionDataAPIGetRegisterValues = {
class ExecutionDataAPI (line 43) | class ExecutionDataAPI {
type ServiceError (line 51) | type ServiceError = { message: string, code: number; metadata: grpc.Meta...
type Status (line 52) | type Status = { details: string, code: number; metadata: grpc.Metadata }
type UnaryResponse (line 54) | interface UnaryResponse {
type ResponseStream (line 57) | interface ResponseStream<T> {
type RequestStream (line 63) | interface RequestStream<T> {
type BidirectionalStream (line 70) | interface BidirectionalStream<ReqT, ResT> {
class ExecutionDataAPIClient (line 79) | class ExecutionDataAPIClient {
FILE: packages/protobuf/src/generated/flow/executiondata/executiondata_pb_service.js
function ExecutionDataAPI (line 8) | function ExecutionDataAPI() {}
function ExecutionDataAPIClient (line 51) | function ExecutionDataAPIClient(serviceHost, options) {
FILE: packages/react-core/src/__mocks__/TestProvider.tsx
function setMockFlowClient (line 26) | function setMockFlowClient(mockInstance: any) {
function getMockFlowClient (line 33) | function getMockFlowClient() {
function TestProvider (line 41) | function TestProvider({children}: PropsWithChildren<{}>) {
FILE: packages/react-core/src/__mocks__/flow-client.ts
type MockFclInstance (line 105) | type MockFclInstance = ReturnType<typeof createMockFclInstance>
FILE: packages/react-core/src/constants.ts
constant CONTRACT_ADDRESSES (line 1) | const CONTRACT_ADDRESSES = {
constant CADENCE_UFIX64_PRECISION (line 49) | const CADENCE_UFIX64_PRECISION = 8
constant DEFAULT_EVM_GAS_LIMIT (line 51) | const DEFAULT_EVM_GAS_LIMIT = "15000000"
FILE: packages/react-core/src/core/context.ts
type FlowConfig (line 8) | type FlowConfig = {
FILE: packages/react-core/src/core/types.ts
type FlowNetwork (line 7) | type FlowNetwork = "emulator" | "testnet" | "mainnet" | (string & {})
FILE: packages/react-core/src/hooks/useCrossVmBatchTransaction.ts
type UseCrossVmBatchTransactionMutateArgs (line 16) | interface UseCrossVmBatchTransactionMutateArgs {
type UseCrossVmBatchTransactionArgs (line 21) | interface UseCrossVmBatchTransactionArgs {
type UseCrossVmBatchTransactionResult (line 29) | interface UseCrossVmBatchTransactionResult
type EvmBatchCall (line 46) | interface EvmBatchCall {
function encodeCalls (line 61) | function encodeCalls(
function useCrossVmBatchTransaction (line 136) | function useCrossVmBatchTransaction({
FILE: packages/react-core/src/hooks/useCrossVmBridgeNftFromEvm.ts
type UseCrossVmBridgeNftFromEvmTxArgs (line 14) | interface UseCrossVmBridgeNftFromEvmTxArgs {
type UseCrossVmBridgeNftFromEvmTxMutateArgs (line 22) | interface UseCrossVmBridgeNftFromEvmTxMutateArgs {
type UseCrossVmBridgeNftFromEvmTxResult (line 28) | interface UseCrossVmBridgeNftFromEvmTxResult
function useCrossVmBridgeNftFromEvm (line 176) | function useCrossVmBridgeNftFromEvm({
FILE: packages/react-core/src/hooks/useCrossVmBridgeNftToEvm.ts
type UseCrossVmBridgeNftToEvmTxArgs (line 15) | interface UseCrossVmBridgeNftToEvmTxArgs {
type UseCrossVmBridgeNftToEvmTxMutateArgs (line 23) | interface UseCrossVmBridgeNftToEvmTxMutateArgs {
type UseCrossVmBridgeNftToEvmTxResult (line 29) | interface UseCrossVmBridgeNftToEvmTxResult
function useCrossVmBridgeNftToEvm (line 226) | function useCrossVmBridgeNftToEvm({
FILE: packages/react-core/src/hooks/useCrossVmBridgeTokenFromEvm.ts
type UseCrossVmBridgeTokenFromEvmArgs (line 14) | interface UseCrossVmBridgeTokenFromEvmArgs {
type UseCrossVmBridgeTokenFromEvmMutateArgs (line 22) | interface UseCrossVmBridgeTokenFromEvmMutateArgs {
type UseCrossVmBridgeTokenFromEvmResult (line 27) | interface UseCrossVmBridgeTokenFromEvmResult
function useCrossVmBridgeTokenFromEvm (line 182) | function useCrossVmBridgeTokenFromEvm({
FILE: packages/react-core/src/hooks/useCrossVmBridgeTokenToEvm.ts
type UseCrossVmBridgeTokenToEvmArgs (line 15) | interface UseCrossVmBridgeTokenToEvmArgs {
type UseCrossVmBridgeTokenToEvmMutateArgs (line 23) | interface UseCrossVmBridgeTokenToEvmMutateArgs {
type UseCrossVmBridgeTokenToEvmResult (line 29) | interface UseCrossVmBridgeTokenToEvmResult
function useCrossVmBridgeTokenToEvm (line 217) | function useCrossVmBridgeTokenToEvm({
FILE: packages/react-core/src/hooks/useCrossVmSpendNft.ts
type UseCrossVmSpendNftTxArgs (line 15) | interface UseCrossVmSpendNftTxArgs {
type UseCrossVmSpendNftTxMutateArgs (line 23) | interface UseCrossVmSpendNftTxMutateArgs {
type UseCrossVmSpendNftTxResult (line 29) | interface UseCrossVmSpendNftTxResult
function useCrossVmSpendNft (line 225) | function useCrossVmSpendNft({
FILE: packages/react-core/src/hooks/useCrossVmSpendToken.ts
type UseCrossVmSpendTokenArgs (line 15) | interface UseCrossVmSpendTokenArgs {
type UseCrossVmSpendTokenMutateArgs (line 23) | interface UseCrossVmSpendTokenMutateArgs {
type UseCrossVmSpendTokenResult (line 29) | interface UseCrossVmSpendTokenResult
function useCrossVmSpendToken (line 216) | function useCrossVmSpendToken({
FILE: packages/react-core/src/hooks/useCrossVmTokenBalance.ts
type UseCrossVmTokenBalanceArgs (line 8) | interface UseCrossVmTokenBalanceArgs {
type TokenBalance (line 16) | interface TokenBalance {
type UseCrossVmTokenBalanceData (line 22) | interface UseCrossVmTokenBalanceData {
function useCrossVmTokenBalance (line 153) | function useCrossVmTokenBalance(params: UseCrossVmTokenBalanceArgs) {
FILE: packages/react-core/src/hooks/useCrossVmTransactionStatus.ts
type UseCrossVmTransactionStatusArgs (line 8) | interface UseCrossVmTransactionStatusArgs {
type UseCrossVmTransactionStatusResult (line 14) | interface UseCrossVmTransactionStatusResult {
type CallOutcome (line 23) | interface CallOutcome {
type EvmTransactionExecutedData (line 29) | interface EvmTransactionExecutedData {
function useCrossVmTransactionStatus (line 51) | function useCrossVmTransactionStatus({
FILE: packages/react-core/src/hooks/useFlowAccount.ts
type UseFlowAccountArgs (line 8) | interface UseFlowAccountArgs {
function useFlowAccount (line 22) | function useFlowAccount({
FILE: packages/react-core/src/hooks/useFlowAuthz.ts
type AuthorizationFunction (line 5) | type AuthorizationFunction = (
type UseFlowAuthzArgs (line 9) | interface UseFlowAuthzArgs {
function useFlowAuthz (line 65) | function useFlowAuthz({
FILE: packages/react-core/src/hooks/useFlowBlock.ts
type BlockByLatest (line 8) | interface BlockByLatest {
type BlockByLatestSealed (line 14) | interface BlockByLatestSealed {
type BlockById (line 20) | interface BlockById {
type BlockByHeight (line 26) | interface BlockByHeight {
type UseBlockParams (line 32) | type UseBlockParams =
type UseFlowBlockArgs (line 38) | interface UseFlowBlockArgs {
function useFlowBlock (line 55) | function useFlowBlock(
FILE: packages/react-core/src/hooks/useFlowChainId.ts
type UseFlowChainIdArgs (line 8) | interface UseFlowChainIdArgs {
function useFlowChainId (line 16) | function useFlowChainId({
FILE: packages/react-core/src/hooks/useFlowClient.ts
function useFlowClient (line 5) | function useFlowClient({
FILE: packages/react-core/src/hooks/useFlowConfig.ts
function useFlowConfig (line 4) | function useFlowConfig(): FlowConfig {
FILE: packages/react-core/src/hooks/useFlowCurrentUser.ts
type UseFlowCurrentUserArgs (line 6) | interface UseFlowCurrentUserArgs {
type UseFlowCurrentUserResult (line 10) | interface UseFlowCurrentUserResult {
function useFlowCurrentUser (line 16) | function useFlowCurrentUser({
FILE: packages/react-core/src/hooks/useFlowEvents.ts
type EventFilter (line 6) | interface EventFilter {
type UseFlowEventsArgs (line 17) | interface UseFlowEventsArgs extends EventFilter {
function useFlowEvents (line 30) | function useFlowEvents({
FILE: packages/react-core/src/hooks/useFlowMutate.ts
type UseFlowMutateArgs (line 17) | interface UseFlowMutateArgs {
function useFlowMutate (line 29) | function useFlowMutate({
FILE: packages/react-core/src/hooks/useFlowNftMetadata.ts
type NftViewResult (line 7) | interface NftViewResult {
type UseFlowNftMetadataArgs (line 20) | interface UseFlowNftMetadataArgs {
function useFlowNftMetadata (line 167) | function useFlowNftMetadata(params: UseFlowNftMetadataArgs) {
FILE: packages/react-core/src/hooks/useFlowQuery.ts
function encodeQueryArgs (line 8) | function encodeQueryArgs(
type UseFlowQueryArgs (line 16) | interface UseFlowQueryArgs {
function useFlowQuery (line 34) | function useFlowQuery({
FILE: packages/react-core/src/hooks/useFlowQueryRaw.ts
type UseFlowQueryRawArgs (line 9) | interface UseFlowQueryRawArgs {
function useFlowQueryRaw (line 27) | function useFlowQueryRaw({
FILE: packages/react-core/src/hooks/useFlowRevertibleRandom.ts
type RevertibleRandomResult (line 8) | interface RevertibleRandomResult {
type UseFlowRevertibleRandomArgs (line 23) | interface UseFlowRevertibleRandomArgs {
function useFlowRevertibleRandom (line 48) | function useFlowRevertibleRandom({
FILE: packages/react-core/src/hooks/useFlowScheduledTransaction.ts
type UseFlowScheduledTransactionArgs (line 13) | interface UseFlowScheduledTransactionArgs {
type UseFlowScheduledTransactionResult (line 23) | type UseFlowScheduledTransactionResult = UseQueryResult<
function useFlowScheduledTransaction (line 181) | function useFlowScheduledTransaction({
FILE: packages/react-core/src/hooks/useFlowScheduledTransactionCancel.ts
type UseFlowScheduledTransactionCancelArgs (line 14) | interface UseFlowScheduledTransactionCancelArgs {
type UseFlowScheduledTransactionCancelResult (line 19) | interface UseFlowScheduledTransactionCancelResult
function useFlowScheduledTransactionCancel (line 83) | function useFlowScheduledTransactionCancel({
FILE: packages/react-core/src/hooks/useFlowScheduledTransactionList.ts
type ScheduledTransactionPriority (line 8) | enum ScheduledTransactionPriority {
type ScheduledTransactionStatus (line 14) | enum ScheduledTransactionStatus {
type ScheduledTransaction (line 22) | interface ScheduledTransaction {
type UseFlowScheduledTransactionListArgs (line 38) | interface UseFlowScheduledTransactionListArgs {
type UseFlowScheduledTransactionListResult (line 48) | type UseFlowScheduledTransactionListResult = UseQueryResult<
function useFlowScheduledTransactionList (line 215) | function useFlowScheduledTransactionList({
FILE: packages/react-core/src/hooks/useFlowScheduledTransactionSetup.ts
type UseFlowScheduledTransactionSetupArgs (line 14) | interface UseFlowScheduledTransactionSetupArgs {
type UseFlowScheduledTransactionSetupResult (line 19) | interface UseFlowScheduledTransactionSetupResult
function useFlowScheduledTransactionSetup (line 80) | function useFlowScheduledTransactionSetup({
FILE: packages/react-core/src/hooks/useFlowTransaction.ts
type UseFlowTransactionArgs (line 9) | interface UseFlowTransactionArgs {
function useFlowTransaction (line 28) | function useFlowTransaction({
FILE: packages/react-core/src/hooks/useFlowTransactionStatus.ts
type UseFlowTransactionStatusArgs (line 7) | interface UseFlowTransactionStatusArgs {
type UseFlowTransactionStatusResult (line 13) | interface UseFlowTransactionStatusResult {
function useFlowTransactionStatus (line 29) | function useFlowTransactionStatus({
FILE: packages/react-core/src/provider/FlowQueryClient.tsx
function useFlowQueryClient (line 8) | function useFlowQueryClient() {
function FlowQueryClientProvider (line 18) | function FlowQueryClientProvider({
FILE: packages/react-core/src/provider/GlobalTransactionProvider.tsx
type GlobalTransactionContextValue (line 5) | interface GlobalTransactionContextValue {
function useGlobalTransaction (line 33) | function useGlobalTransaction(): GlobalTransactionContextValue {
type GlobalTransactionProviderProps (line 41) | interface GlobalTransactionProviderProps {
function GlobalTransactionProvider (line 49) | function GlobalTransactionProvider({
FILE: packages/react-core/src/utils/deepEqual.ts
function deepEqual (line 1) | function deepEqual(a: any, b: any): boolean {
FILE: packages/react-core/src/utils/flowscan.ts
type ExplorerNetwork (line 3) | type ExplorerNetwork = Extract<FlowNetwork, "mainnet" | "testnet">
constant BLOCK_EXPLORER_URL (line 5) | const BLOCK_EXPLORER_URL: Record<ExplorerNetwork, string> = {
FILE: packages/react-native-sdk/src/components/Connect.tsx
type BalanceType (line 22) | type BalanceType = keyof UseCrossVmTokenBalanceData
type TokenConfig (line 24) | type TokenConfig = {
type ConnectProps (line 32) | interface ConnectProps {
function Connect (line 70) | function Connect({
FILE: packages/react-native-sdk/src/components/Profile.tsx
type BalanceType (line 32) | type BalanceType = keyof UseCrossVmTokenBalanceData
type ProfileProps (line 34) | interface ProfileProps {
FILE: packages/react-native-sdk/src/icons/CheckIcon.tsx
type IconProps (line 4) | interface IconProps {
FILE: packages/react-native-sdk/src/icons/CopyIcon.tsx
type IconProps (line 4) | interface IconProps {
FILE: packages/react-native-sdk/src/icons/ExternalLinkIcon.tsx
type IconProps (line 4) | interface IconProps {
FILE: packages/react-native-sdk/src/icons/LogOutIcon.tsx
type IconProps (line 4) | interface IconProps {
FILE: packages/react-native-sdk/src/icons/UserIcon.tsx
type IconProps (line 4) | interface IconProps {
FILE: packages/react-native-sdk/src/provider/FlowProvider.tsx
type FlowProviderProps (line 16) | interface FlowProviderProps {
function getConfigKey (line 38) | function getConfigKey(
function FlowProvider (line 50) | function FlowProvider({
FILE: packages/react-sdk/src/__mocks__/flow-client.ts
type MockFclInstance (line 95) | type MockFclInstance = ReturnType<typeof createMockFclInstance>
FILE: packages/react-sdk/src/components/Connect.tsx
type BalanceType (line 9) | type BalanceType = keyof UseCrossVmTokenBalanceData
type TokenConfig (line 11) | type TokenConfig = {
type ConnectModalConfig (line 19) | interface ConnectModalConfig {
type ConnectProps (line 26) | interface ConnectProps {
FILE: packages/react-sdk/src/components/NftCard.tsx
type NftCardAction (line 14) | interface NftCardAction {
type NftCardProps (line 19) | interface NftCardProps {
FILE: packages/react-sdk/src/components/Profile.tsx
type BalanceType (line 32) | type BalanceType = keyof UseCrossVmTokenBalanceData
type ProfileConfig (line 34) | interface ProfileConfig extends ConnectModalConfig {}
type ProfileProps (line 36) | interface ProfileProps {
FILE: packages/react-sdk/src/components/ScheduledTransactionList.tsx
type ScheduledTransactionCardProps (line 95) | interface ScheduledTransactionCardProps {
type ScheduledTransactionListProps (line 321) | interface ScheduledTransactionListProps {
FILE: packages/react-sdk/src/components/TransactionButton.tsx
type TransactionButtonProps (line 9) | interface TransactionButtonProps
FILE: packages/react-sdk/src/components/TransactionDialog.tsx
type TransactionDialogProps (line 11) | interface TransactionDialogProps {
FILE: packages/react-sdk/src/components/TransactionLink.tsx
type TransactionLinkProps (line 8) | interface TransactionLinkProps {
FILE: packages/react-sdk/src/components/internal/Button.tsx
type ButtonProps (line 6) | interface ButtonProps
FILE: packages/react-sdk/src/components/internal/Dialog.tsx
type DialogProps (line 9) | interface DialogProps {
FILE: packages/react-sdk/src/components/internal/StyleWrapper.tsx
type StyleWrapperProps (line 4) | interface StyleWrapperProps {
FILE: packages/react-sdk/src/core/theme.tsx
type ThemeColors (line 3) | type ThemeColors = {
type Theme (line 32) | type Theme = {
type ButtonVariant (line 36) | type ButtonVariant = "primary" | "secondary" | "outline" | "link"
type ButtonStyles (line 38) | type ButtonStyles = {
type DeepPartial (line 106) | type DeepPartial<T> = {
type ThemeProviderProps (line 110) | type ThemeProviderProps = React.PropsWithChildren<{
FILE: packages/react-sdk/src/provider/DarkModeProvider.tsx
type DarkModeContextType (line 3) | type DarkModeContextType = {
function DarkModeProvider (line 11) | function DarkModeProvider({
function useDarkMode (line 22) | function useDarkMode() {
FILE: packages/react-sdk/src/provider/FlowProvider.tsx
type ColorMode (line 15) | type ColorMode = "light" | "dark" | "system"
type FlowProviderProps (line 17) | interface FlowProviderProps {
function FlowProvider (line 36) | function FlowProvider({
FILE: packages/rlp/src/index.ts
type EncodeInput (line 5) | type EncodeInput =
function encode (line 28) | function encode(input: EncodeInput): Buffer {
function safeParseInt (line 49) | function safeParseInt(v: string, base: number): number {
function encodeLength (line 55) | function encodeLength(len: number, offset: number): Buffer {
function decode (line 81) | function decode(input: Buffer | Uint8Array, stream?: boolean): Buffer {
function getLength (line 104) | function getLength(
function _decode (line 134) | function _decode(input: Buffer | Uint8Array): any {
function isHexPrefixed (line 209) | function isHexPrefixed(str: string) {
function stripHexPrefix (line 213) | function stripHexPrefix(str: string) {
function intToHex (line 220) | function intToHex(integer: number) {
function padToEven (line 228) | function padToEven(a: string) {
function intToBuffer (line 232) | function intToBuffer(integer: number) {
function toBuffer (line 238) | function toBuffer(
FILE: packages/sdk/src/VERSION.ts
constant VERSION (line 4) | const VERSION: string =
FILE: packages/sdk/src/account/account.ts
type AccountQueryOptions (line 12) | interface AccountQueryOptions {
function createAccount (line 18) | function createAccount(context: SdkContext) {
FILE: packages/sdk/src/block/block.ts
type BlockQueryOptions (line 11) | interface BlockQueryOptions {
function createBlock (line 17) | function createBlock(context: SdkContext) {
FILE: packages/sdk/src/build/build-arguments.ts
function args (line 30) | function args(ax: CadenceArgument<any>[]) {
function arg (line 61) | function arg<T extends TypeDescriptor<any, any>>(
FILE: packages/sdk/src/build/build-at-block-height.ts
function atBlockHeight (line 37) | function atBlockHeight(height: number): InteractionBuilderFn {
FILE: packages/sdk/src/build/build-at-block-id.ts
function atBlockId (line 43) | function atBlockId(id: string): InteractionBuilderFn {
FILE: packages/sdk/src/build/build-at-latest-block.ts
function atLatestBlock (line 42) | function atLatestBlock(isSealed = false): InteractionBuilderFn {
FILE: packages/sdk/src/build/build-authorizations.ts
type SignableMessage (line 13) | interface SignableMessage {
type SigningResult (line 52) | interface SigningResult {
type SigningFn (line 72) | type SigningFn = (
function authorizations (line 129) | function authorizations(ax: Array<AccountAuthorization> = []) {
function authorization (line 182) | function authorization(
FILE: packages/sdk/src/build/build-get-account.test.ts
constant ADDRESS (line 5) | const ADDRESS = "0xf117a8efa34ffd58"
FILE: packages/sdk/src/build/build-get-account.ts
function getAccount (line 29) | function getAccount(addr: string): InteractionBuilderFn {
FILE: packages/sdk/src/build/build-get-block-header.ts
function getBlockHeader (line 43) | function getBlockHeader(
FILE: packages/sdk/src/build/build-get-block.ts
function getBlock (line 29) | function getBlock(
FILE: packages/sdk/src/build/build-get-collection.ts
function getCollection (line 39) | function getCollection(id: string | null = null): InteractionBuilderFn {
FILE: packages/sdk/src/build/build-get-events-at-block-height-range.ts
function getEventsAtBlockHeightRange (line 40) | function getEventsAtBlockHeightRange(
FILE: packages/sdk/src/build/build-get-events-at-block-ids.ts
function getEventsAtBlockIds (line 31) | function getEventsAtBlockIds(
FILE: packages/sdk/src/build/build-get-events.ts
function getEvents (line 33) | function getEvents(
FILE: packages/sdk/src/build/build-get-latest-block.ts
function getLatestBlock (line 37) | function getLatestBlock(
FILE: packages/sdk/src/build/build-get-network-parameters.ts
function getNetworkParameters (line 35) | function getNetworkParameters(): InteractionBuilderFn {
FILE: packages/sdk/src/build/build-get-node-version-info.ts
function getNodeVersionInfo (line 36) | function getNodeVersionInfo(): InteractionBuilderFn {
FILE: packages/sdk/src/build/build-get-transaction-status.ts
function getTransactionStatus (line 25) | function getTransactionStatus(
FILE: packages/sdk/src/build/build-get-transaction.ts
function getTransaction (line 28) | function getTransaction(id: string): InteractionBuilderFn {
FILE: packages/sdk/src/build/build-invariant.js
function invariant (line 3) | function invariant(...args) {
FILE: packages/sdk/src/build/build-limit.ts
function limit (line 40) | function limit(limit: number): InteractionBuilderFn {
FILE: packages/sdk/src/build/build-payer.ts
function payer (line 62) | function payer(ax: AccountAuthorization[] = []) {
FILE: packages/sdk/src/build/build-ping.ts
function ping (line 34) | function ping(): InteractionBuilderFn {
FILE: packages/sdk/src/build/build-proposer.ts
function proposer (line 47) | function proposer(authz: AccountAuthorization) {
FILE: packages/sdk/src/build/build-ref.ts
function ref (line 34) | function ref(refBlock: string): InteractionBuilderFn {
FILE: packages/sdk/src/build/build-script.ts
function script (line 42) | function script(
FILE: packages/sdk/src/build/build-subscribe-events.ts
function subscribeEvents (line 53) | function subscribeEvents({
FILE: packages/sdk/src/build/build-transaction.ts
constant DEFAULT_SCRIPT_ACCOUNTS (line 10) | const DEFAULT_SCRIPT_ACCOUNTS: string[] = []
constant DEFAULT_REF (line 11) | const DEFAULT_REF: any = null
function transaction (line 66) | function transaction(
FILE: packages/sdk/src/build/build-validator.ts
function validator (line 36) | function validator(cb: Function): InteractionBuilderFn {
FILE: packages/sdk/src/build/build-voucher-intercept.ts
type VoucherInterceptFn (line 4) | type VoucherInterceptFn = (voucher: Voucher) => any | Promise<any>
function voucherIntercept (line 41) | function voucherIntercept(fn: VoucherInterceptFn): InteractionBuilderFn {
FILE: packages/sdk/src/build/build.ts
function build (line 50) | function build(
FILE: packages/sdk/src/context/context.ts
type SdkClientOptions (line 6) | interface SdkClientOptions {
type SdkContext (line 35) | interface SdkContext {
function createContext (line 56) | function createContext({
FILE: packages/sdk/src/context/get-global-transport.ts
function getGlobalTransport (line 38) | function getGlobalTransport(cfg: Record<string, any>): SdkTransport {
function isTransportObject (line 56) | function isTransportObject(transport: any): transport is SdkTransport {
FILE: packages/sdk/src/context/global.ts
constant DEFAULT_COMPUTE_LIMIT (line 7) | const DEFAULT_COMPUTE_LIMIT = 10
function createGlobalContext (line 11) | async function createGlobalContext(): Promise<SdkContext> {
function getGlobalContext (line 73) | async function getGlobalContext(): Promise<SdkContext> {
function withGlobalContext (line 86) | function withGlobalContext<
FILE: packages/sdk/src/decode/decode-stream.ts
type DecodeResponseFn (line 4) | type DecodeResponseFn = (
function relayEvent (line 100) | function relayEvent(event: any) {
method on (line 111) | on(channel: string, callback: any) {
method off (line 115) | off(channel: string, callback: any) {
function taskQueue (line 125) | function taskQueue() {
FILE: packages/sdk/src/decode/decode.ts
type DecoderFunction (line 4) | type DecoderFunction = (
type DecoderMap (line 10) | interface DecoderMap {
type DecodeInstructions (line 14) | interface DecodeInstructions {
type CompositeField (line 19) | interface CompositeField {
type CompositeInstruction (line 24) | interface CompositeInstruction {
type KeyValuePair (line 29) | interface KeyValuePair {
type InclusiveRangeValue (line 34) | interface InclusiveRangeValue {
type FlowEvent (line 41) | interface FlowEvent {
type FlowBlockEvent (line 49) | interface FlowBlockEvent extends FlowEvent {
type FlowTransactionStatus (line 55) | interface FlowTransactionStatus {
type FlowResponse (line 63) | interface FlowResponse {
FILE: packages/sdk/src/decode/sdk-decode.ts
function createDecode (line 5) | function createDecode(context: SdkContext) {
FILE: packages/sdk/src/encode/encode.ts
constant TRANSACTION_DOMAIN_TAG (line 132) | const TRANSACTION_DOMAIN_TAG = rightPaddedHexBuffer(
type VoucherArgument (line 325) | interface VoucherArgument {
type VoucherProposalKey (line 330) | interface VoucherProposalKey {
type Sig (line 336) | interface Sig {
type TransactionProposalKey (line 346) | interface TransactionProposalKey {
type Transaction (line 351) | interface Transaction {
type Voucher (line 363) | interface Voucher {
type PayloadField (line 375) | interface PayloadField {
FILE: packages/sdk/src/interaction/interaction.ts
type AuthorizationFn (line 15) | type AuthorizationFn = (acct: InteractionAccount) => InteractionAccount
type AccountAuthorization (line 16) | type AccountAuthorization =
type CadenceArgument (line 20) | type CadenceArgument<T extends TypeDescriptor<any, any>> = {
type InteractionBuilderFn (line 27) | type InteractionBuilderFn = (
constant ACCT (line 31) | const ACCT = `{
constant ARG (line 48) | const ARG = `{
constant KEYS (line 109) | const KEYS = new Set(Object.keys(JSON.parse(IX) as Interaction))
type IPrepAccountOpts (line 302) | interface IPrepAccountOpts {
type MaybePromise (line 611) | type MaybePromise<T> = T | Promise<T>
function pipe (line 678) | function pipe(
FILE: packages/sdk/src/node-version-info/node-version-info.ts
function nodeVersionInfo (line 35) | async function nodeVersionInfo(
FILE: packages/sdk/src/resolve/resolve-accounts.ts
constant MAX_DEPTH_LIMIT (line 9) | const MAX_DEPTH_LIMIT = 5
type ROLES (line 21) | enum ROLES {
function debug (line 27) | function debug() {
function recurseFlatMap (line 45) | function recurseFlatMap<T>(el: T, depthLimit = 3) {
function buildPreSignable (line 61) | function buildPreSignable(
function removeUnusedIxAccounts (line 82) | async function removeUnusedIxAccounts(
function addAccountToIx (line 109) | function addAccountToIx(ix: Interaction, newAccount: InteractionAccount) {
function uniqueAccountsFlatMap (line 136) | function uniqueAccountsFlatMap(accounts: InteractionAccount[]) {
function resolveSingleAccount (line 159) | async function resolveSingleAccount(
function replaceRoles (line 237) | async function replaceRoles(
function resolveAccountsByIds (line 275) | async function resolveAccountsByIds(
function resolveAccounts (line 334) | async function resolveAccounts(
FILE: packages/sdk/src/resolve/resolve-arguments.ts
type Argument (line 5) | interface Argument {
function cast (line 15) | function cast(arg: Argument): any {
function handleArgResolution (line 26) | async function handleArgResolution(
function resolveArguments (line 75) | async function resolveArguments(ix: Interaction): Promise<Interaction> {
FILE: packages/sdk/src/resolve/resolve-cadence.ts
function isOldIdentifierSyntax (line 13) | function isOldIdentifierSyntax(
function isNewIdentifierSyntax (line 29) | function isNewIdentifierSyntax(cadence: string): boolean {
function getContractIdentifierSyntaxMatches (line 33) | function getContractIdentifierSyntaxMatches(
function createResolveCadence (line 39) | function createResolveCadence(context: SdkContext) {
FILE: packages/sdk/src/resolve/resolve-compute-limit.ts
function createResolveComputeLimit (line 6) | function createResolveComputeLimit(context: SdkContext) {
FILE: packages/sdk/src/resolve/resolve-final-normalization.ts
function resolveFinalNormalization (line 10) | async function resolveFinalNormalization(
FILE: packages/sdk/src/resolve/resolve-proposer-sequence-number.ts
type NodeConfig (line 13) | interface NodeConfig {
FILE: packages/sdk/src/resolve/resolve-ref-block-id.ts
function getRefId (line 16) | async function getRefId(opts?: {[key: string]: any}): Promise<string> {
function resolveRefBlockId (line 41) | function resolveRefBlockId(opts?: {[key: string]: any}) {
FILE: packages/sdk/src/resolve/resolve-signatures.test.ts
constant TRANSACTION (line 20) | const TRANSACTION = {
FILE: packages/sdk/src/resolve/resolve-signatures.ts
function resolveSignatures (line 22) | async function resolveSignatures(ix: Interaction) {
function fetchSignature (line 67) | function fetchSignature(ix: Interaction, payload: string) {
function buildSignable (line 89) | function buildSignable(
function prepForEncoding (line 114) | function prepForEncoding(ix: Interaction): Transaction {
FILE: packages/sdk/src/resolve/resolve-validators.ts
function resolveValidators (line 10) | async function resolveValidators(ix: Interaction): Promise<Interaction> {
FILE: packages/sdk/src/resolve/resolve-voucher-intercept.ts
function resolveVoucherIntercept (line 11) | async function resolveVoucherIntercept(
FILE: packages/sdk/src/resolve/resolve.ts
type DebugCallback (line 24) | type DebugCallback = (ix: Interaction, log: any, accts?: any) => any
function createResolve (line 55) | function createResolve(context: SdkContext) {
function createExecFetchRef (line 114) | function createExecFetchRef(context: SdkContext) {
function createExecFetchSequenceNumber (line 135) | function createExecFetchSequenceNumber(context: SdkContext) {
FILE: packages/sdk/src/resolve/voucher.ts
function findInsideSigners (line 27) | function findInsideSigners(ix: Interaction) {
function findOutsideSigners (line 67) | function findOutsideSigners(ix: Interaction) {
FILE: packages/sdk/src/response/response.ts
constant DEFAULT_RESPONSE (line 1) | const DEFAULT_RESPONSE = {
FILE: packages/sdk/src/sdk-client.ts
function createSdkClient (line 24) | function createSdkClient(options: SdkClientOptions) {
FILE: packages/sdk/src/test-utils/authz-fn.ts
function sig (line 19) | function sig(opts: Partial<InteractionAccount>) {
type IAuthzOpts (line 23) | interface IAuthzOpts {
function authzFn (line 33) | function authzFn(opts: IAuthzOpts = {}) {
type IAuthzResolveOpts (line 57) | interface IAuthzResolveOpts {
function authzResolve (line 67) | function authzResolve(opts: IAuthzResolveOpts = {}) {
constant ROLE (line 78) | const ROLE = {proposer: false, authorizer: false, payer: false}
type IAuthzResolveMany (line 81) | interface IAuthzResolveMany {
function authzResolveMany (line 94) | function authzResolveMany(
function authzDeepResolveMany (line 122) | function authzDeepResolveMany(
FILE: packages/sdk/src/test-utils/mock-send.js
function mockAccountResponse (line 4) | function mockAccountResponse(ix, numberOfKeys = 5) {
function mockGetBlockResponse (line 23) | function mockGetBlockResponse(ix) {
function mockSend (line 34) | function mockSend(fallback = identity) {
FILE: packages/sdk/src/transport/send/send.ts
function createSend (line 11) | function createSend(context: SdkContext) {
FILE: packages/sdk/src/transport/subscribe/errors.ts
class SubscriptionsNotSupportedError (line 1) | class SubscriptionsNotSupportedError extends Error {
method constructor (line 2) | constructor() {
FILE: packages/sdk/src/transport/subscribe/subscribe-raw.ts
function createSubscribeRawAsync (line 7) | function createSubscribeRawAsync(
function createSubscribeRaw (line 64) | function createSubscribeRaw(context: SdkContext) {
function subscribeRaw (line 123) | function subscribeRaw<T extends SubscriptionTopic>(
FILE: packages/sdk/src/transport/subscribe/subscribe.ts
function createSubscribeAsync (line 8) | function createSubscribeAsync(
function createSubscribe (line 47) | function createSubscribe(context: SdkContext) {
function subscribe (line 104) | function subscribe<T extends SubscriptionTopic>(
FILE: packages/sdk/src/transport/subscribe/types.ts
type SubscribeParams (line 8) | type SubscribeParams<T extends SubscriptionTopic> = {
type SubscribeRawParams (line 27) | type SubscribeRawParams<T extends SubscriptionTopic> = {
FILE: packages/sdk/src/wallet-utils/encode-signable.test.ts
constant MESSAGE (line 10) | const MESSAGE = {
constant VOUCHER (line 24) | const VOUCHER = {
constant PAYER_SIGNABLE (line 35) | const PAYER_SIGNABLE = {
constant NON_PAYER_SIGNABLE (line 45) | const NON_PAYER_SIGNABLE = {
FILE: packages/sdk/src/wallet-utils/encode-signable.ts
type PayloadSig (line 7) | interface PayloadSig {
type Voucher (line 14) | interface Voucher {
type Signable (line 30) | interface Signable {
class UnableToDetermineMessageEncodingTypeForSignerAddress (line 54) | class UnableToDetermineMessageEncodingTypeForSignerAddress extends Error {
method constructor (line 55) | constructor(signerAddress: string) {
FILE: packages/sdk/src/wallet-utils/validate-tx.test.ts
constant MESSAGE (line 7) | const MESSAGE = {
constant VOUCHER (line 25) | const VOUCHER = {
constant PAYER_SIGNABLE (line 39) | const PAYER_SIGNABLE = {
constant NON_PAYER_SIGNABLE (line 49) | const NON_PAYER_SIGNABLE = {
FILE: packages/transport-grpc/src/send-execute-script.js
function sendExecuteScriptAtBlockIDRequest (line 14) | async function sendExecuteScriptAtBlockIDRequest(ix, context, opts) {
function sendExecuteScriptAtBlockHeightRequest (line 37) | async function sendExecuteScriptAtBlockHeightRequest(ix, context, opts) {
function sendExecuteScriptAtLatestBlockRequest (line 60) | async function sendExecuteScriptAtLatestBlockRequest(ix, context, opts) {
function constructResponse (line 81) | function constructResponse(ix, context, res) {
function sendExecuteScript (line 91) | async function sendExecuteScript(ix, context = {}, opts = {}) {
FILE: packages/transport-grpc/src/send-get-account.js
function sendGetAccountAtBlockHeightRequest (line 30) | async function sendGetAccountAtBlockHeightRequest(ix, context, opts) {
function sendGetAccountAtLatestBlockRequest (line 47) | async function sendGetAccountAtLatestBlockRequest(ix, context, opts) {
function constructResponse (line 63) | function constructResponse(ix, context, res) {
function sendGetAccount (line 105) | async function sendGetAccount(ix, context = {}, opts = {}) {
FILE: packages/transport-grpc/src/send-get-block-header.js
function sendGetBlockHeaderByIDRequest (line 13) | async function sendGetBlockHeaderByIDRequest(ix, context, opts) {
function sendGetBlockHeaderByHeightRequest (line 24) | async function sendGetBlockHeaderByHeightRequest(ix, context, opts) {
function sendGetLatestBlockHeaderRequest (line 40) | async function sendGetLatestBlockHeaderRequest(ix, context, opts) {
function constructResponse (line 59) | function constructResponse(ix, context, res) {
function sendGetBlockHeader (line 74) | async function sendGetBlockHeader(ix, context = {}, opts = {}) {
FILE: packages/transport-grpc/src/send-get-block.js
function sendGetBlockByIDRequest (line 13) | async function sendGetBlockByIDRequest(ix, context, opts) {
function sendGetBlockByHeightRequest (line 24) | async function sendGetBlockByHeightRequest(ix, context, opts) {
function sendGetBlockRequest (line 35) | async function sendGetBlockRequest(ix, context, opts) {
function constructResponse (line 49) | function constructResponse(ix, context, res) {
function sendGetBlock (line 83) | async function sendGetBlock(ix, context = {}, opts = {}) {
FILE: packages/transport-grpc/src/send-get-collection.js
function sendGetCollection (line 8) | async function sendGetCollection(ix, context = {}, opts = {}) {
FILE: packages/transport-grpc/src/send-get-events.js
function sendGetEventsForHeightRangeRequest (line 12) | async function sendGetEventsForHeightRangeRequest(ix, context, opts) {
function sendGetEventsForBlockIDsRequest (line 31) | async function sendGetEventsForBlockIDsRequest(ix, context, opts) {
function constructResponse (line 49) | function constructResponse(ix, context, res) {
function sendGetEvents (line 79) | async function sendGetEvents(ix, context = {}, opts = {}) {
FILE: packages/transport-grpc/src/send-get-network-parameters.js
function sendGetNetworkParameters (line 5) | async function sendGetNetworkParameters(ix, context = {}, opts = {}) {
FILE: packages/transport-grpc/src/send-get-node-version-info.js
function sendGetNodeVersionInfo (line 7) | async function sendGetNodeVersionInfo(ix, context = {}, opts = {}) {
FILE: packages/transport-grpc/src/send-get-transaction-status.js
constant STATUS_MAP (line 5) | const STATUS_MAP = {
function sendGetTransactionStatus (line 19) | async function sendGetTransactionStatus(ix, context = {}, opts = {}) {
FILE: packages/transport-grpc/src/send-get-transaction.js
function sendGetTransaction (line 8) | async function sendGetTransaction(ix, context = {}, opts = {}) {
FILE: packages/transport-grpc/src/send-ping.js
function sendPing (line 5) | async function sendPing(ix, context = {}, opts = {}) {
FILE: packages/transport-grpc/src/send-transaction.js
function sendTransaction (line 15) | async function sendTransaction(ix, context = {}, opts = {}) {
FILE: packages/transport-grpc/src/unary.js
function unary (line 7) | async function unary(host, method, request, context) {
FILE: packages/transport-http/src/send/connect-subscribe-events.ts
type RawSubscribeEventsStream (line 6) | type RawSubscribeEventsStream = StreamConnection<{
function constructData (line 13) | function constructData(ix: Interaction, context: any, data: any) {
function constructResponse (line 41) | function constructResponse(ix: Interaction, context: any, stream: any) {
function connectSubscribeEvents (line 50) | async function connectSubscribeEvents(
FILE: packages/transport-http/src/send/connect-ws.test.ts
method close (line 68) | close() {
method get (line 86) | get(target, name) {
FILE: packages/transport-http/src/send/connect-ws.ts
class WebsocketError (line 6) | class WebsocketError extends Error {
method constructor (line 11) | constructor({
type WebSocketConnection (line 36) | type WebSocketConnection<T> = StreamConnection<{
function connectWs (line 40) | function connectWs<T>({
function buildConnectionUrl (line 145) | function buildConnectionUrl(
FILE: packages/transport-http/src/send/http-request.js
class HTTPRequestError (line 9) | class HTTPRequestError extends Error {
method constructor (line 10) | constructor({
function httpRequest (line 55) | async function httpRequest({
FILE: packages/transport-http/src/send/http-request.test.js
method json (line 29) | async json() {
method text (line 32) | async text() {
method json (line 49) | async json() {
method json (line 82) | async json() {
FILE: packages/transport-http/src/send/send-execute-script.js
function sendExecuteScriptAtBlockIDRequest (line 5) | async function sendExecuteScriptAtBlockIDRequest(ix, context, opts) {
function sendExecuteScriptAtBlockHeightRequest (line 25) | async function sendExecuteScriptAtBlockHeightRequest(ix, context, opts) {
function sendExecuteScriptAtLatestBlockRequest (line 45) | async function sendExecuteScriptAtLatestBlockRequest(ix, context, opts) {
function constructResponse (line 65) | function constructResponse(ix, context, res) {
function sendExecuteScript (line 74) | async function sendExecuteScript(ix, context = {}, opts = {}) {
FILE: packages/transport-http/src/send/send-get-account.js
function sendGetAccountAtBlockHeightRequest (line 18) | async function sendGetAccountAtBlockHeightRequest(ix, context, opts) {
function sendGetAccountAtLatestBlockRequest (line 31) | async function sendGetAccountAtLatestBlockRequest(ix, context, opts) {
function constructResponse (line 44) | function constructResponse(ix, context, res) {
function sendGetAccount (line 79) | async function sendGetAccount(ix, context = {}, opts = {}) {
FILE: packages/transport-http/src/send/send-get-block-header.js
function sendGetBlockHeaderByIDRequest (line 4) | async function sendGetBlockHeaderByIDRequest(ix, context, opts) {
function sendGetBlockHeaderByHeightRequest (line 17) | async function sendGetBlockHeaderByHeightRequest(ix, context, opts) {
function sendGetLatestBlockHeaderRequest (line 30) | async function sendGetLatestBlockHeaderRequest(ix, context, opts) {
function constructResponse (line 45) | function constructResponse(ix, context, res) {
function sendGetBlockHeader (line 60) | async function sendGetBlockHeader(ix, context = {}, opts = {}) {
FILE: packages/transport-http/src/send/send-get-block.js
function sendGetBlockByIDRequest (line 4) | async function sendGetBlockByIDRequest(ix, context, opts) {
function sendGetBlockByHeightRequest (line 17) | async function sendGetBlockByHeightRequest(ix, context, opts) {
function sendGetBlockRequest (line 30) | async function sendGetBlockRequest(ix, context, opts) {
function constructResponse (line 45) | function constructResponse(ix, context, res) {
function sendGetBlock (line 71) | async function sendGetBlock(ix, context = {}, opts = {}) {
FILE: packages/transport-http/src/send/send-get-collection.js
function sendGetCollection (line 4) | async function sendGetCollection(ix, context = {}, opts = {}) {
FILE: packages/transport-http/src/send/send-get-events.js
function sendGetEventsForHeightRangeRequest (line 4) | async function sendGetEventsForHeightRangeRequest(ix, context, opts) {
function sendGetEventsForBlockIDsRequest (line 17) | async function sendGetEventsForBlockIDsRequest(ix, context, opts) {
function constructResponse (line 32) | function constructResponse(ix, context, res) {
function sendGetEvents (line 59) | async function sendGetEvents(ix, context = {}, opts = {}) {
FILE: packages/transport-http/src/send/send-get-network-parameters.js
function sendGetNetworkParameters (line 4) | async function sendGetNetworkParameters(ix, context = {}, opts = {}) {
FILE: packages/transport-http/src/send/send-get-node-version-info.ts
function sendGetNodeVersionInfo (line 5) | async function sendGetNodeVersionInfo(
FILE: packages/transport-http/src/send/send-get-transaction-status.js
constant STATUS_MAP (line 4) | const STATUS_MAP = {
function sendGetTransactionStatus (line 13) | async function sendGetTransactionStatus(ix, context = {}, opts = {}) {
FILE: packages/transport-http/src/send/send-get-transaction.js
function sendGetTransaction (line 4) | async function sendGetTransaction(ix, context = {}, opts = {}) {
FILE: packages/transport-http/src/send/send-http.ts
type InteractionModule (line 17) | interface InteractionModule {
type IContext (line 32) | interface IContext extends ISendPingContext {
type IOptsCommon (line 36) | interface IOptsCommon {
type IOpts (line 40) | interface IOpts extends IOptsCommon {
FILE: packages/transport-http/src/send/send-ping.ts
type ISendPingContext (line 5) | interface ISendPingContext {
type ISendPingOpts (line 9) | interface ISendPingOpts {
function sendPing (line 14) | async function sendPing(
FILE: packages/transport-http/src/send/send-transaction.js
function sendTransaction (line 7) | async function sendTransaction(ix, context = {}, opts = {}) {
FILE: packages/transport-http/src/send/utils.js
function safeParseJSON (line 1) | function safeParseJSON(data) {
FILE: packages/transport-http/src/subscribe/handlers/account-statuses.ts
type AccountStatusesArgs (line 8) | type AccountStatusesArgs = SubscriptionArgs<SubscriptionTopic.ACCOUNT_ST...
type AccountStatusesData (line 10) | type AccountStatusesData =
type AccountStatusesArgsDto (line 13) | type AccountStatusesArgsDto = {
type AccountStatusesDataDto (line 21) | type AccountStatusesDataDto = {
method onData (line 50) | onData(rawData: AccountStatusesDataDto) {
method onError (line 106) | onError(error: Error) {
method getConnectionArgs (line 109) | getConnectionArgs() {
FILE: packages/transport-http/src/subscribe/handlers/block-digests.ts
type BlockDigestsArgs (line 8) | type BlockDigestsArgs = SubscriptionArgs<SubscriptionTopic.BLOCK_DIGESTS>
type BlockDigestsData (line 10) | type BlockDigestsData = RawSubscriptionData<SubscriptionTopic.BLOCK_DIGE...
type BlockDigestsDataDto (line 12) | type BlockDigestsDataDto = {
type BlockDigestsArgsDto (line 18) | type BlockDigestsArgsDto = BlockArgsDto
method onData (line 34) | onData(data: BlockDigestsDataDto) {
method onError (line 52) | onError(error: Error) {
method getConnectionArgs (line 55) | getConnectionArgs() {
FILE: packages/transport-http/src/subscribe/handlers/block-headers.ts
type BlockHeadersArgs (line 8) | type BlockHeadersArgs = SubscriptionArgs<SubscriptionTopic.BLOCK_HEADERS>
type BlockHeadersData (line 10) | type BlockHeadersData = RawSubscriptionData<SubscriptionTopic.BLOCK_HEAD...
type BlockHeadersArgsDto (line 12) | type BlockHeadersArgsDto = BlockArgsDto
type BlockHeadersDataDto (line 14) | type BlockHeadersDataDto = {
method onData (line 36) | onData(data: BlockHeadersDataDto) {
method onError (line 56) | onError(error: Error) {
method getConnectionArgs (line 59) | getConnectionArgs() {
FILE: packages/transport-http/src/subscribe/handlers/blocks.ts
type BlocksArgs (line 8) | type BlocksArgs = SubscriptionArgs<SubscriptionTopic.BLOCKS>
type BlocksData (line 10) | type BlocksData = RawSubscriptionData<SubscriptionTopic.BLOCKS>
type BlocksDataDto (line 12) | type BlocksDataDto = {
method onData (line 46) | onData(data: BlocksDataDto) {
method onError (line 76) | onError(error: Error) {
method getConnectionArgs (line 79) | getConnectionArgs() {
FILE: packages/transport-http/src/subscribe/handlers/events.ts
type EventsArgs (line 8) | type EventsArgs = SubscriptionArgs<SubscriptionTopic.EVENTS>
type EventsData (line 10) | type EventsData = RawSubscriptionData<SubscriptionTopic.EVENTS>
type EventsArgsDto (line 12) | type EventsArgsDto = (
type EventsDataDto (line 26) | type EventsDataDto = {
method onData (line 61) | onData(rawData: EventsDataDto) {
method onError (line 93) | onError(error: Error) {
method getConnectionArgs (line 96) | getConnectionArgs() {
FILE: packages/transport-http/src/subscribe/handlers/transaction-statuses.ts
constant STATUS_MAP (line 9) | const STATUS_MAP = {
type TransactionStatusesArgs (line 18) | type TransactionStatusesArgs =
type TransactionStatusesData (line 21) | type TransactionStatusesData =
type TransactionStatusesArgsDto (line 24) | type TransactionStatusesArgsDto = {
type TransactionStatusesDataDto (line 28) | type TransactionStatusesDataDto = {
method onData (line 61) | onData(data: TransactionStatusesDataDto) {
method onError (line 87) | onError(error: Error) {
method getConnectionArgs (line 90) | getConnectionArgs() {
FILE: packages/transport-http/src/subscribe/handlers/types.ts
type SubscriptionHandler (line 1) | interface SubscriptionHandler<
type DataSubscriber (line 18) | interface DataSubscriber<ArgsDto, DataDto> {
function createSubscriptionHandler (line 35) | function createSubscriptionHandler<
type BlockArgsDto (line 47) | type BlockArgsDto =
FILE: packages/transport-http/src/subscribe/models.ts
type Action (line 1) | enum Action {
type BaseMessageRequest (line 6) | interface BaseMessageRequest {
type BaseMessageResponse (line 11) | interface BaseMessageResponse {
type ListSubscriptionsMessageRequest (line 20) | interface ListSubscriptionsMessageRequest extends BaseMessageRequest {
type ListSubscriptionsMessageResponse (line 24) | interface ListSubscriptionsMessageResponse extends BaseMessageResponse {
type SubscribeMessageRequest (line 29) | interface SubscribeMessageRequest extends BaseMessageRequest {
type SubscribeMessageResponse (line 35) | interface SubscribeMessageResponse extends BaseMessageResponse {
type UnsubscribeMessageRequest (line 40) | interface UnsubscribeMessageRequest extends BaseMessageRequest {
type UnsubscribeMessageResponse (line 44) | type UnsubscribeMessageResponse = BaseMessageResponse & {
type SubscriptionEntry (line 49) | type SubscriptionEntry = {
type MessageRequest (line 55) | type MessageRequest =
type MessageResponse (line 60) | type MessageResponse =
type SubscriptionDataMessage (line 65) | type SubscriptionDataMessage = {
class SocketError (line 69) | class SocketError extends Error {
method constructor (line 72) | private constructor(code: number, message: string) {
method fromMessage (line 78) | static fromMessage(error: {code: number; message: string}) {
FILE: packages/transport-http/src/subscribe/subscribe.ts
constant SUBSCRIPTION_HANDLERS (line 16) | const SUBSCRIPTION_HANDLERS = [
function subscribe (line 31) | function subscribe<T extends SubscriptionTopic>(
function getWsUrl (line 60) | function getWsUrl(node: string) {
FILE: packages/transport-http/src/subscribe/subscription-manager.ts
constant WS_OPEN (line 14) | const WS_OPEN = 1
type DeepRequired (line 16) | type DeepRequired<T> = Required<{
type InferHandler (line 20) | type InferHandler<T> = T extends SubscriptionHandler<infer H> ? H : never
type SubscriptionInfo (line 22) | interface SubscriptionInfo<ArgsDto = any, DataDto = any> {
type SubscriptionManagerConfig (line 31) | interface SubscriptionManagerConfig {
class SubscriptionManager (line 58) | class SubscriptionManager<Handlers extends SubscriptionHandler<any>[]> {
method constructor (line 68) | constructor(handlers: Handlers, config: SubscriptionManagerConfig) {
method subscribe (line 81) | subscribe<T extends Handlers[number]>(opts: {
method _subscribe (line 97) | private async _subscribe<T extends Handlers[number]>(opts: {
method unsubscribe (line 141) | private unsubscribe(id: string): void {
method connect (line 162) | private async connect() {
method handleSocketError (line 239) | private async handleSocketError(error: any) {
method sendSubscribe (line 294) | private async sendSubscribe(sub: SubscriptionInfo) {
method sendUnsubscribe (line 312) | private async sendUnsubscribe(sub: SubscriptionInfo) {
method request (line 332) | private async request(request: MessageRequest): Promise<MessageRespons...
method getHandler (line 375) | private getHandler(topic: string) {
method backoffInterval (line 387) | private get backoffInterval() {
FILE: packages/transport-http/src/utils/combine-urls.ts
function combineURLs (line 37) | function combineURLs(baseURL: string, relativeURL?: string): string {
FILE: packages/typedefs/src/fvm-errors.ts
type FvmErrorCode (line 4) | enum FvmErrorCode {
FILE: packages/typedefs/src/index.ts
type Account (line 1) | interface Account {
type AccountKey (line 24) | interface AccountKey {
type SignatureAlgorithm (line 63) | enum SignatureAlgorithm {
type HashAlgorithm (line 69) | enum HashAlgorithm {
type Block (line 77) | interface Block {
type CollectionGuarantee (line 107) | interface CollectionGuarantee {
type BlockSeal (line 117) | interface BlockSeal {
type BlockDigest (line 130) | interface BlockDigest {
type BlockHeader (line 149) | interface BlockHeader {
type CompositeSignature (line 171) | interface CompositeSignature {
type CurrentUser (line 197) | interface CurrentUser {
type Event (line 227) | interface Event {
type AccountStatusEvent (line 261) | interface AccountStatusEvent extends Omit<Event, "blockTimestamp"> {
type Key (line 267) | interface Key {
type Service (line 281) | interface Service {
type Signature (line 323) | interface Signature {
type Transaction (line 337) | interface Transaction {
type TransactionStatus (line 391) | interface TransactionStatus {
type TransactionExecutionStatus (line 420) | enum TransactionExecutionStatus {
type Provider (line 431) | interface Provider {
type NodeVersionInfo (line 473) | interface NodeVersionInfo {
type StreamConnection (line 500) | interface StreamConnection<ChannelMap extends {[name: string]: any}> {
type EventFilter (line 516) | interface EventFilter {
type BlockHeartbeat (line 543) | interface BlockHeartbeat {
type EventStream (line 558) | type EventStream = StreamConnection<{
FILE: packages/typedefs/src/interaction.ts
type InteractionTag (line 4) | enum InteractionTag {
type InteractionStatus (line 24) | enum InteractionStatus {
type TransactionRole (line 32) | enum TransactionRole {
type InteractionResolverKind (line 41) | enum InteractionResolverKind {
type InteractionAccount (line 46) | interface InteractionAccount {
type Interaction (line 110) | interface Interaction {
FILE: packages/typedefs/src/subscriptions.ts
type SubscriptionTopic (line 15) | enum SubscriptionTopic {
type SubscriptionData (line 27) | type SubscriptionData<T extends SubscriptionTopic> =
type RawSubscriptionData (line 33) | type RawSubscriptionData<T extends SubscriptionTopic> =
type SubscriptionArgs (line 39) | type SubscriptionArgs<T extends SubscriptionTopic> =
type Subscription (line 45) | type Subscription = {
type SubscriptionArgsMap (line 52) | type SubscriptionArgsMap = {
type SubscriptionDataMap (line 61) | type SubscriptionDataMap = {
type RawSubscriptionDataMap (line 70) | type RawSubscriptionDataMap = {
type BlockSubscriptionArgs (line 118) | type BlockSubscriptionArgs =
type AccountStatusSubscriptionArgs (line 128) | type AccountStatusSubscriptionArgs = {
type TransactionStatusSubscriptionArgs (line 136) | type TransactionStatusSubscriptionArgs = {
type EventSubscriptionArgs (line 140) | type EventSubscriptionArgs = {
FILE: packages/typedefs/src/transport.ts
type InteractionModule (line 9) | interface InteractionModule {
type IContext (line 24) | interface IContext {
type IOptsCommon (line 27) | interface IOptsCommon {
type IOpts (line 31) | interface IOpts extends IOptsCommon {
type SubscribeFn (line 91) | type SubscribeFn = <T extends SubscriptionTopic>(
type SendFn (line 101) | type SendFn = (
type SdkTransport (line 110) | type SdkTransport = {
FILE: packages/types/src/types.test.ts
function registerTest (line 279) | function registerTest<X, Y extends string, Z>([
FILE: packages/types/src/types.ts
type JsonCdc (line 3) | type JsonCdc<L extends string, T> = {
type JsonCdcLabel (line 8) | type JsonCdcLabel<X extends JsonCdc<string, unknown>> =
type TypeDescriptor (line 11) | interface TypeDescriptor<T, V extends JsonCdc<string, unknown>> {
type TypeDescriptorInput (line 17) | type TypeDescriptorInput<
type PathValue (line 21) | interface PathValue {
type ReferenceValue (line 29) | interface ReferenceValue {
FILE: packages/util-actor/src/index.test.ts
constant COUNT (line 3) | const COUNT = "COUNT"
constant DUMP (line 4) | const DUMP = "DUMP"
constant INC (line 5) | const INC = "INC"
constant KEYS (line 6) | const KEYS = "KEYS"
constant UPDATED (line 7) | const UPDATED = "UPDATED"
constant SUBSCRIBE (line 8) | const SUBSCRIBE = "SUBSCRIBE"
constant UNSUBSCRIBE (line 9) | const UNSUBSCRIBE = "UNSUBSCRIBE"
FILE: packages/util-actor/src/index.ts
constant INIT (line 11) | const INIT = "INIT"
constant SUBSCRIBE (line 12) | const SUBSCRIBE = "SUBSCRIBE"
constant UNSUBSCRIBE (line 13) | const UNSUBSCRIBE = "UNSUBSCRIBE"
constant UPDATED (line 14) | const UPDATED = "UPDATED"
constant SNAPSHOT (line 15) | const SNAPSHOT = "SNAPSHOT"
constant EXIT (line 16) | const EXIT = "EXIT"
constant TERMINATE (line 17) | const TERMINATE = "TERMINATE"
constant DUMP (line 18) | const DUMP = "DUMP"
constant INC (line 19) | const INC = "INC"
constant KEYS (line 20) | const KEYS = "KEYS"
type IRegistryRecord (line 22) | interface IRegistryRecord {
type IRoot (line 29) | interface IRoot {
type ActorContext (line 33) | type ActorContext = ReturnType<typeof createCtx>
type Letter (line 35) | type Letter = {
type HandlerFn (line 44) | type HandlerFn = (
type SpawnFn (line 49) | type SpawnFn = (address?: string) => void
type ActorHandlers (line 50) | interface ActorHandlers {
constant FCL_REGISTRY (line 76) | const FCL_REGISTRY = root.FCL_REGISTRY
constant DEFAULT_TIMEOUT (line 79) | const DEFAULT_TIMEOUT = 5000
function send (line 93) | function send<T>(
function subscriber (line 278) | function subscriber<T>(
function snapshoter (line 312) | function snapshoter<T>(address: string, spawnFn: SpawnFn) {
FILE: packages/util-actor/src/mailbox/index.ts
type IMailbox (line 1) | interface IMailbox<T> {
method deliver (line 10) | async deliver(msg: T) {
method receive (line 18) | receive(): Promise<T> {
FILE: packages/util-address/src/index.ts
function sansPrefix (line 14) | function sansPrefix(address: string | null): string | null {
function withPrefix (line 32) | function withPrefix(address: string | null): string | null {
function display (line 42) | function display(address: string | null): string | null {
FILE: packages/util-encode-key/src/index.test.ts
constant PUBLIC_KEYS (line 3) | const PUBLIC_KEYS = [
constant CURVES (line 9) | const CURVES = [ECDSA_P256, ECDSA_secp256k1]
constant HASHINGS (line 11) | const HASHINGS = [SHA2_256, SHA3_256]
constant WEIGHTS (line 13) | const WEIGHTS = [0, 32, 512, 1000]
FILE: packages/util-encode-key/src/index.ts
constant ECDSA_P256 (line 6) | const ECDSA_P256 = 2
constant VALID_CURVES (line 8) | const VALID_CURVES = new Set([ECDSA_P256, ECDSA_secp256k1])
constant SHA2_256 (line 12) | const SHA2_256 = 1
constant SHA3_256 (line 13) | const SHA3_256 = 3
constant VALID_HASHINGS (line 14) | const VALID_HASHINGS = new Set([SHA2_256, SHA3_256])
function encodeKey (line 34) | function encodeKey(
FILE: packages/util-invariant/src/index.ts
function invariant (line 7) | function invariant(
FILE: packages/util-logger/src/util-logger.ts
type IConfig (line 1) | interface IConfig {
type Config (line 5) | type Config = (IConfig & (() => IConfig)) | null
type LEVELS (line 16) | enum LEVELS {
FILE: packages/util-rpc/src/messages.ts
type RpcRequestMessage (line 1) | type RpcRequestMessage = {
type RpcNotificationMessage (line 8) | type RpcNotificationMessage = {
type RpcResponseMessage (line 14) | type RpcResponseMessage = {
type RpcErrorMessage (line 20) | type RpcErrorMessage = {
type RpcMessage (line 30) | type RpcMessage =
FILE: packages/util-rpc/src/rpc-client.ts
type RpcRequest (line 4) | type RpcRequest<P, R> = {
type RpcNotification (line 10) | type RpcNotification<P> = {
type ReservedRpcMethods (line 15) | enum ReservedRpcMethods {
type RequestHandler (line 19) | type RequestHandler<T = any> = (params: T) => any
type NotificationHandler (line 20) | type NotificationHandler<T = any> = (params: T) => void
type PeerInfo (line 22) | type PeerInfo = {
class RpcClient (line 27) | class RpcClient<
method constructor (line 50) | constructor({notifications}: {notifications?: string[]}) {
method connect (line 58) | connect({send}: {send: (msg: RpcMessage) => void}) {
method ownInfo (line 67) | private ownInfo(): PeerInfo {
method send (line 74) | private async send(msg: RpcMessage) {
method receive (line 78) | receive(msg: RpcMessage) {
method handleRequest (line 94) | private async handleRequest(msg: RpcRequestMessage) {
method handleNotification (line 138) | private handleNotification(msg: RpcNotificationMessage) {
method onMessage (line 144) | private onMessage(listener: (msg: any) => void) {
method notify (line 151) | async notify<R extends keyof PeerNotifications & string>(
method request (line 164) | async request<R extends keyof PeerRequests & string>(
method requestWithoutConnection (line 172) | private async requestWithoutConnection<R extends keyof PeerRequests & ...
method on (line 205) | on(method: string, handler: RequestHandler) {
method subscribe (line 209) | subscribe<R extends string>(method: R, handler: RequestHandler<any>) {
method unsubscribe (line 214) | unsubscribe<R extends string>(method: R, handler: RequestHandler<any>) {
method onceConnected (line 218) | async onceConnected() {
method getAvailableRequests (line 222) | async getAvailableRequests() {
method getAvailableNotifications (line 226) | async getAvailableNotifications() {
FILE: packages/util-rpc/src/rpc-error.ts
type RpcErrorCode (line 1) | enum RpcErrorCode {
class RpcError (line 9) | class RpcError extends Error {
method constructor (line 10) | constructor(
FILE: packages/util-semver/src/compare.js
constant VERSION_REGEX (line 4) | const VERSION_REGEX =
FILE: packages/util-template/src/template.ts
function interleave (line 10) | function interleave<A, B>(
function recApply (line 36) | function recApply<T, U>(d: T): (x: U) => string {
function template (line 89) | function template(
FILE: packages/util-uid/src/util-uid.ts
constant HEX (line 1) | const HEX = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456...
function uid (line 8) | function uid(): string {
Condensed preview — 1103 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (5,719K chars).
[
{
"path": ".changeset/README.md",
"chars": 510,
"preview": "# Changesets\n\nHello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that wo"
},
{
"path": ".changeset/config.json",
"chars": 329,
"preview": "{\n \"$schema\": \"https://unpkg.com/@changesets/config@1.7.0/schema.json\",\n \"changelog\": [\"@changesets/changelog-github\","
},
{
"path": ".github/ISSUE_TEMPLATE/bug_report.yml",
"chars": 1433,
"preview": "name: Reporting a Problem/Bug\ndescription: Reporting a Problem/Bug\ntitle: \"[BUG] <title>\"\nlabels: [Bug, Needs Triage]\nbo"
},
{
"path": ".github/ISSUE_TEMPLATE/feature_request.yml",
"chars": 1353,
"preview": "name: Requesting a Feature or Improvement\ndescription: For feature requests. Please search for existing issues first. Al"
},
{
"path": ".github/scripts/prevent-major-bumps.js",
"chars": 1937,
"preview": "/**\n * DO NOT REMOVE ME UNLESS YOU KNOW WHAT YOU'RE DOING!!\n */\n\nconst {execSync} = require(\"child_process\")\nconst fs = "
},
{
"path": ".github/workflows/add-pitches-to-project.yml",
"chars": 365,
"preview": "name: Adds all issues to the project board.\n\non:\n issues:\n types:\n - opened\n\njobs:\n add-to-project:\n name: "
},
{
"path": ".github/workflows/changeset-check.yml",
"chars": 7311,
"preview": "# Changeset Enforcement Action\n#\n# This workflow ensures that when developers make changes to package code,\n# they inclu"
},
{
"path": ".github/workflows/code-analysis.yml",
"chars": 1042,
"preview": "# This workflow is used to run CodeQL analysis on the codebase.\n# If a code scanning alert is found, it will fail the PR"
},
{
"path": ".github/workflows/dependancy-review.yml",
"chars": 3036,
"preview": "# Dependency Review Action\n\n# PRs introducing NEW known-vulnerable packages will be blocked from merging.\n# This will ou"
},
{
"path": ".github/workflows/integrate.yml",
"chars": 1024,
"preview": "name: FLOW-JS-SDK Continuous Integration\n\non:\n pull_request:\n\njobs:\n test_pull_request:\n runs-on: ubuntu-latest\n "
},
{
"path": ".github/workflows/promote-playground.yml",
"chars": 2888,
"preview": "name: Promote playground on release\n\non:\n # Automatically trigger after Release workflow completes on master\n workflow"
},
{
"path": ".github/workflows/release.yml",
"chars": 2299,
"preview": "name: Release\n\non:\n push:\n branches:\n - master\n pull_request:\n types: [closed]\n branches:\n - master"
},
{
"path": ".gitignore",
"chars": 230,
"preview": "# folders\nnode_modules/\ndist/\n.parcel-cache/\nflowdb/\n\n.exrc\n.DS_Store\n\n# file types\ndev-wallet/db/*.db\ntodo.md\n**/debug."
},
{
"path": ".prettierignore",
"chars": 62,
"preview": "README.md\n*.md\n*.mdx\npackages/protobuf/src/generated/\n**/*.hbs"
},
{
"path": ".prettierrc",
"chars": 175,
"preview": "{\n \"semi\": false,\n \"trailingComma\": \"es5\",\n \"bracketSpacing\": false,\n \"arrowParens\": \"avoid\",\n \"plugins\": [\"prettie"
},
{
"path": "AGENTS.md",
"chars": 7486,
"preview": "# AGENTS.md\n\nGuidance for AI coding agents (Claude Code, Codex, Cursor, Copilot, and others) working in\nthis repository."
},
{
"path": "CHANGELOG.md",
"chars": 197,
"preview": "# Changelog\n\nRelease notes and version history for fcl-js are tracked via GitHub Releases:\n\n- https://github.com/onflow/"
},
{
"path": "CITATION.cff",
"chars": 507,
"preview": "cff-version: 1.2.0\nmessage: \"If you use fcl-js in your research or reference it, please cite it as below.\"\ntitle: \"fcl-j"
},
{
"path": "CODEOWNERS",
"chars": 14,
"preview": "* @onflow/fcl\n"
},
{
"path": "CODE_OF_CONDUCT.md",
"chars": 5223,
"preview": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nWe as members, contributors, and leaders pledge to make participa"
},
{
"path": "CONTRIBUTING.md",
"chars": 6983,
"preview": "# Contributing to FCL and the Flow JS SDK\n\nThe following is a set of guidelines for contributing to FCL and the Flow JS "
},
{
"path": "LICENSE",
"chars": 11352,
"preview": " Apache License\n Version 2.0, January 2004\n "
},
{
"path": "Makefile",
"chars": 1076,
"preview": "PACKAGES := ls -d1 packages/*\nRUN := xargs -n1 -t\nEXEC := $(PACKAGES) | $(RUN)\n\n.PHONY: default\ndefault:\n\t$(info Availab"
},
{
"path": "NOTICE",
"chars": 138,
"preview": "Flow\nCopyright 2019-2020 Dapper Labs, Inc.\n\nThis product includes software developed at Dapper Labs, Inc. (https://www.d"
},
{
"path": "README.md",
"chars": 13662,
"preview": "# fcl-js — Flow Client Library for JavaScript and TypeScript\n\n[\",\n \"hea"
},
{
"path": "docs/index.md",
"chars": 121,
"preview": "# This document has been moved to a new location:\n\nhttps://github.com/onflow/docs/tree/main/docs/tooling/fcl-js/index.md"
},
{
"path": "docs/index.mdx",
"chars": 126,
"preview": "# This document has been moved to a new location:\n\nhttps://github.com/onflow/docs/tree/main/docs/tooling/fcl-js/index.md"
},
{
"path": "docs/reference/api.md",
"chars": 119,
"preview": "# This document has been moved to a new location:\n\nhttps://github.com/onflow/docs/tree/main/docs/tooling/fcl-js/api.md\n"
},
{
"path": "docs/reference/authentication.mdx",
"chars": 131,
"preview": "# This document has been moved to a new location:\n\nhttps://github.com/onflow/docs/tree/main/docs/tooling/fcl-js/authenti"
},
{
"path": "docs/reference/configure-fcl.mdx",
"chars": 130,
"preview": "# This document has been moved to a new location:\n\nhttps://github.com/onflow/docs/tree/main/docs/tooling/fcl-js/configur"
},
{
"path": "docs/reference/discovery.mdx",
"chars": 126,
"preview": "# This document has been moved to a new location:\n\nhttps://github.com/onflow/docs/tree/main/docs/tooling/fcl-js/discover"
},
{
"path": "docs/reference/installation.mdx",
"chars": 129,
"preview": "# This document has been moved to a new location:\n\nhttps://github.com/onflow/docs/tree/main/docs/tooling/fcl-js/installa"
},
{
"path": "docs/reference/interaction-templates.mdx",
"chars": 138,
"preview": "# This document has been moved to a new location:\n\nhttps://github.com/onflow/docs/tree/main/docs/tooling/fcl-js/interact"
},
{
"path": "docs/reference/proving-authentication.mdx",
"chars": 139,
"preview": "# This document has been moved to a new location:\n\nhttps://github.com/onflow/docs/tree/main/docs/tooling/fcl-js/proving-"
},
{
"path": "docs/reference/scripts.mdx",
"chars": 124,
"preview": "# This document has been moved to a new location:\n\nhttps://github.com/onflow/docs/tree/main/docs/tooling/fcl-js/scripts."
},
{
"path": "docs/reference/sdk-guidelines.mdx",
"chars": 131,
"preview": "# This document has been moved to a new location:\n\nhttps://github.com/onflow/docs/tree/main/docs/tooling/fcl-js/sdk-guid"
},
{
"path": "docs/reference/transactions.mdx",
"chars": 129,
"preview": "# This document has been moved to a new location:\n\nhttps://github.com/onflow/docs/tree/main/docs/tooling/fcl-js/transact"
},
{
"path": "docs/reference/user-signatures.mdx",
"chars": 132,
"preview": "# This document has been moved to a new location:\n\nhttps://github.com/onflow/docs/tree/main/docs/tooling/fcl-js/user-sig"
},
{
"path": "docs/reference/wallet-connect.mdx",
"chars": 131,
"preview": "# This document has been moved to a new location:\n\nhttps://github.com/onflow/docs/tree/main/docs/tooling/fcl-js/wallet-c"
},
{
"path": "docs/tutorials/flow-app-quickstart.mdx",
"chars": 131,
"preview": "# This document has been moved to a new location:\n\nhttps://github.com/onflow/docs/tree/main/docs/tutorials/flow-app-quic"
},
{
"path": "docs-generator/README.md",
"chars": 6313,
"preview": "# Docs Generator\n\nThis directory contains scripts to generate documentation for Flow Client Library (FCL) packages.\n\n## "
},
{
"path": "docs-generator/generate-all-docs.js",
"chars": 1989,
"preview": "const fs = require(\"fs\")\nconst path = require(\"path\")\nconst {execSync} = require(\"child_process\")\n\nasync function main()"
},
{
"path": "docs-generator/generate-docs.js",
"chars": 4530,
"preview": "const fs = require(\"fs\")\nconst path = require(\"path\")\nconst {Project} = require(\"ts-morph\")\nconst Handlebars = require(\""
},
{
"path": "docs-generator/generators/generate-function-page.js",
"chars": 26028,
"preview": "const path = require(\"path\")\nconst {Project} = require(\"ts-morph\")\nconst fs = require(\"fs\")\nconst {generatePage, getFirs"
},
{
"path": "docs-generator/generators/generate-namespace-page.js",
"chars": 13860,
"preview": "const path = require(\"path\")\nconst fs = require(\"fs\")\nconst {Project} = require(\"ts-morph\")\nconst {generatePage, getFirs"
},
{
"path": "docs-generator/generators/generate-package-page.js",
"chars": 4196,
"preview": "const path = require(\"path\")\nconst {generatePage, parseConfigCustomData, getFirstWord} = require(\"./utils\")\nconst fs = r"
},
{
"path": "docs-generator/generators/generate-root-page.js",
"chars": 2350,
"preview": "const path = require(\"path\")\nconst fs = require(\"fs\")\nconst {generatePage, parseConfigCustomData} = require(\"./utils\")\n\n"
},
{
"path": "docs-generator/generators/generate-types-page.js",
"chars": 6847,
"preview": "const path = require(\"path\")\nconst {Project, Node, TypeFormatFlags} = require(\"ts-morph\")\nconst {generatePage} = require"
},
{
"path": "docs-generator/generators/index.js",
"chars": 456,
"preview": "const {generatePackagePage} = require(\"./generate-package-page\")\nconst {generateFunctionPage} = require(\"./generate-func"
},
{
"path": "docs-generator/generators/utils/extract-utils.js",
"chars": 107,
"preview": "function getFirstWord(packageName) {\n return packageName.split(\"-\")[0]\n}\n\nmodule.exports = {getFirstWord}\n"
},
{
"path": "docs-generator/generators/utils/generate-page.js",
"chars": 351,
"preview": "const fs = require(\"fs\")\n\nfunction generatePage(templates, templateName, outputPath, context) {\n try {\n const conten"
},
{
"path": "docs-generator/generators/utils/index.js",
"chars": 240,
"preview": "const {generatePage} = require(\"./generate-page\")\nconst {parseConfigCustomData} = require(\"./parse-config-custom-data\")\n"
},
{
"path": "docs-generator/generators/utils/parse-config-custom-data.js",
"chars": 614,
"preview": "const fs = require(\"fs\")\n\nfunction parseConfigCustomData(configPath) {\n // Parse config custom data if present and retu"
},
{
"path": "docs-generator/templates/function.hbs",
"chars": 1974,
"preview": "---\ntitle: \"{{name}}\"\ndescription: \"{{name}} function documentation.\"\n---\n\n<!-- THIS DOCUMENT IS AUTO-GENERATED FROM [on"
},
{
"path": "docs-generator/templates/namespace.hbs",
"chars": 1641,
"preview": "---\ntitle: \"{{namespaceName}}\"\ndescription: \"{{namespaceDescription}}\"\n---\n\n<!-- THIS DOCUMENT IS AUTO-GENERATED FROM [o"
},
{
"path": "docs-generator/templates/package.hbs",
"chars": 1574,
"preview": "---\ntitle: \"{{displayName}}\"\ndescription: \"{{#if displayDescription}}{{displayDescription}}{{else}}{{displayName}} packa"
},
{
"path": "docs-generator/templates/root.hbs",
"chars": 552,
"preview": "---\nsidebar_position: 1\ntitle: Packages Docs\ndescription: Packages documentation.\n---\n\n<!-- THIS DOCUMENT IS AUTO-GENERA"
},
{
"path": "docs-generator/templates/types.hbs",
"chars": 1461,
"preview": "---\ntitle: Type Definitions\ndescription: Type definitions for the Flow Client Library (FCL) packages.\n---\n\n<!-- THIS DOC"
},
{
"path": "docs-generator/utils/export-extractor.js",
"chars": 8272,
"preview": "const path = require(\"path\")\nconst {Node} = require(\"ts-morph\")\nconst {parseJsDoc} = require(\"./jsdoc-parser\")\nconst {\n "
},
{
"path": "docs-generator/utils/file-utils.js",
"chars": 1023,
"preview": "const fs = require(\"fs\")\nconst path = require(\"path\")\n\nfunction discoverWorkspacePackages() {\n try {\n // Get the wor"
},
{
"path": "docs-generator/utils/function-extractor.js",
"chars": 31180,
"preview": "const path = require(\"path\")\nconst fs = require(\"fs\")\nconst {Node} = require(\"ts-morph\")\nconst {parseJsDoc} = require(\"."
},
{
"path": "docs-generator/utils/index.js",
"chars": 694,
"preview": "const {parseJsDoc} = require(\"./jsdoc-parser\")\nconst {cleanupTypeText, escapeParameterNameForMDX} = require(\"./type-util"
},
{
"path": "docs-generator/utils/jsdoc-parser.js",
"chars": 7243,
"preview": "function parseJsDoc(node) {\n try {\n // Try to get JSDoc using the standard API\n if (typeof node.getJsDocs === \"fu"
},
{
"path": "docs-generator/utils/namespace-utils.js",
"chars": 2611,
"preview": "const path = require(\"path\")\nconst {Node} = require(\"ts-morph\")\nconst {extractFunctionInfo} = require(\"./function-extrac"
},
{
"path": "docs-generator/utils/type-utils.js",
"chars": 1677,
"preview": "function cleanupTypeText(typeText) {\n if (!typeText) return typeText\n\n // Remove import paths and keep only the type n"
},
{
"path": "docs-generator/utils/typescript-formatter.js",
"chars": 891,
"preview": "function formatTypeScript(typeText) {\n if (!typeText || typeof typeText !== \"string\") {\n return typeText\n }\n\n let "
},
{
"path": "jest.config.js",
"chars": 59,
"preview": "module.exports = {\n projects: [\"<rootDir>/packages/*\"],\n}\n"
},
{
"path": "lerna.json",
"chars": 61,
"preview": "{\n \"packages\": [\"packages/*\"],\n \"version\": \"independent\"\n}\n"
},
{
"path": "package.json",
"chars": 1574,
"preview": "{\n \"workspaces\": [\n \"./packages/*\"\n ],\n \"scripts\": {\n \"build\": \"lerna run build\",\n \"start\": \"npm run build &"
},
{
"path": "packages/config/.babelrc",
"chars": 69,
"preview": "{\n \"presets\": [[\"@babel/preset-env\"], \"@babel/preset-typescript\"]\n}\n"
},
{
"path": "packages/config/.browserslistrc",
"chars": 58,
"preview": "defaults and supports es6-module\nmaintained node versions\n"
},
{
"path": "packages/config/.eslintrc.json",
"chars": 523,
"preview": "{\n \"env\": {\n \"browser\": true,\n \"es2021\": true,\n \"jest\": true,\n \"node\": true\n },\n \"extends\": [\n \"plugin"
},
{
"path": "packages/config/.npmignore",
"chars": 5,
"preview": "src/\n"
},
{
"path": "packages/config/CHANGELOG.md",
"chars": 22647,
"preview": "# @onflow/config\n\n## 1.11.1\n\n### Patch Changes\n\n- [#2767](https://github.com/onflow/fcl-js/pull/2767) [`9a982e62e45a2f6f"
},
{
"path": "packages/config/README.md",
"chars": 6592,
"preview": "# @onflow/config\n\nReactive configuration for Flow JS SDK and FCL\n\n## Installation\n\n```bash\nnpm install @onflow/config\n``"
},
{
"path": "packages/config/package.json",
"chars": 1283,
"preview": "{\n \"name\": \"@onflow/config\",\n \"version\": \"1.11.1\",\n \"description\": \"Config for FCL-JS\",\n \"license\": \"Apache-2.0\",\n "
},
{
"path": "packages/config/src/config.test.ts",
"chars": 17284,
"preview": "import {config, clearConfig} from \"./config\"\n\nconst idle = () => new Promise(resolve => setTimeout(resolve, 0))\n\ndescrib"
},
{
"path": "packages/config/src/config.ts",
"chars": 8959,
"preview": "import {\n spawn,\n send,\n subscriber,\n SUBSCRIBE,\n UNSUBSCRIBE,\n ActorHandlers,\n} from \"@onflow/util-actor\"\nimport "
},
{
"path": "packages/config/src/utils/utils.test.ts",
"chars": 10891,
"preview": "import {getContracts, anyHasPrivateKeys, FlowJson} from \"./utils\"\n\ndescribe(\"getContracts\", () => {\n test(\"it should ga"
},
{
"path": "packages/config/src/utils/utils.ts",
"chars": 11194,
"preview": "/**\n * Fork network configuration\n * Allows a custom network to inherit contract aliases from a parent network\n */\nexpor"
},
{
"path": "packages/config/tsconfig.json",
"chars": 180,
"preview": "{\n \"extends\": \"../../tsconfig\",\n // Change this to match your project\n \"include\": [\"src/**/*\"],\n \"compilerOptions\": "
},
{
"path": "packages/demo/.gitignore",
"chars": 253,
"preview": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\nlerna-debug.log*\n\nnode_modules\ndist\ndis"
},
{
"path": "packages/demo/CHANGELOG.md",
"chars": 7744,
"preview": "# @onflow/demo\n\n## 1.9.0\n\n### Minor Changes\n\n- [#2745](https://github.com/onflow/fcl-js/pull/2745) [`706e08247a1e13eb49f"
},
{
"path": "packages/demo/DEPLOY.md",
"chars": 1228,
"preview": "# Playground Deployment Workflow\n\n## How It Works\n\nThe `playground` branch always points to the latest release tag and i"
},
{
"path": "packages/demo/README.md",
"chars": 3217,
"preview": "# Demo\n\nA lightweight internal demo project for testing FCL and Kit packages during development.\n\n## Purpose\n\nThis demo "
},
{
"path": "packages/demo/emulator.key",
"chars": 64,
"preview": "ba68d45a5acaa52f3cacf4ad3a64d9523e0ce0ae3addb1ee6805385b380b7646"
},
{
"path": "packages/demo/eslint.config.ts",
"chars": 851,
"preview": "import js from \"@eslint/js\"\nimport globals from \"globals\"\nimport reactHooks from \"eslint-plugin-react-hooks\"\nimport reac"
},
{
"path": "packages/demo/index.html",
"chars": 3186,
"preview": "<!doctype html>\n<html lang=\"en\">\n <head>\n <meta charset=\"UTF-8\" />\n <link rel=\"icon\" type=\"image/png\" href=\"/asse"
},
{
"path": "packages/demo/package.json",
"chars": 1934,
"preview": "{\n \"name\": \"@onflow/demo\",\n \"private\": true,\n \"version\": \"1.9.0\",\n \"type\": \"module\",\n \"scripts\": {\n \"dev\": \"cros"
},
{
"path": "packages/demo/postcss.config.js",
"chars": 204,
"preview": "import tailwindcss from \"tailwindcss\"\nimport tailwindConfig from \"./tailwind.config.js\"\nimport autoprefixer from \"autopr"
},
{
"path": "packages/demo/public/robots.txt",
"chars": 99,
"preview": "# Allow all crawlers\nUser-agent: *\nAllow: /\n\n# Sitemap\nSitemap: https://react.flow.com/sitemap.xml\n"
},
{
"path": "packages/demo/public/sitemap.xml",
"chars": 231,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">\n <url>\n <loc>htt"
},
{
"path": "packages/demo/src/app.css",
"chars": 2365,
"preview": "@import url(\"https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap\");\n\n@tailwind "
},
{
"path": "packages/demo/src/app.tsx",
"chars": 7399,
"preview": "import {useEffect, useState} from \"react\"\nimport \"./app.css\"\nimport {ContentSection} from \"./components/content-section\""
},
{
"path": "packages/demo/src/components/advanced-cards/dark-mode-card.tsx",
"chars": 3308,
"preview": "import {DemoCard} from \"../ui/demo-card\"\nimport {useDarkMode} from \"../flow-provider-wrapper\"\nimport {PlusGridIcon} from"
},
{
"path": "packages/demo/src/components/advanced-cards/theming-card.tsx",
"chars": 11406,
"preview": "import {DemoCard} from \"../ui/demo-card\"\nimport {useDarkMode} from \"../flow-provider-wrapper\"\nimport {PlusGridIcon} from"
},
{
"path": "packages/demo/src/components/component-cards/connect-card.tsx",
"chars": 11689,
"preview": "import {useState} from \"react\"\nimport {Connect, useFlowChainId} from \"@onflow/react-sdk\"\nimport {useDarkMode} from \"../f"
},
{
"path": "packages/demo/src/components/component-cards/demo-nft-card.tsx",
"chars": 19069,
"preview": "import {NftCard, type NftCardAction, useFlowChainId} from \"@onflow/react-sdk\"\nimport {useState} from \"react\"\nimport {use"
},
{
"path": "packages/demo/src/components/component-cards/profile-card.tsx",
"chars": 12040,
"preview": "import {useState} from \"react\"\nimport {Profile, useFlowChainId} from \"@onflow/react-sdk\"\nimport {useDarkMode} from \"../f"
},
{
"path": "packages/demo/src/components/component-cards/scheduled-transaction-list-demo.tsx",
"chars": 12865,
"preview": "import {\n ScheduledTransactionList,\n useFlowCurrentUser,\n useFlowChainId,\n} from \"@onflow/react-sdk\"\nimport {useState"
},
{
"path": "packages/demo/src/components/component-cards/transaction-button-card.tsx",
"chars": 8767,
"preview": "import {TransactionButton} from \"@onflow/react-sdk\"\nimport {useState} from \"react\"\nimport {useDarkMode} from \"../flow-pr"
},
{
"path": "packages/demo/src/components/component-cards/transaction-dialog-card.tsx",
"chars": 8820,
"preview": "import {TransactionButton, TransactionDialog} from \"@onflow/react-sdk\"\nimport {useState} from \"react\"\nimport {useDarkMod"
},
{
"path": "packages/demo/src/components/component-cards/transaction-link-card.tsx",
"chars": 10739,
"preview": "import {TransactionButton, TransactionLink} from \"@onflow/react-sdk\"\nimport {useState} from \"react\"\nimport {useDarkMode}"
},
{
"path": "packages/demo/src/components/content-section.tsx",
"chars": 5767,
"preview": "import {PlusGrid, PlusGridRow} from \"./ui/plus-grid\"\nimport {StarterBanner} from \"./starter-banner\"\n\n// Import hook card"
},
{
"path": "packages/demo/src/components/content-sidebar.tsx",
"chars": 16780,
"preview": "import {useState, useEffect, useRef} from \"react\"\nimport {PlusGridIcon} from \"./ui/plus-grid\"\n\ninterface SidebarItem {\n "
},
{
"path": "packages/demo/src/components/flow-provider-wrapper.tsx",
"chars": 5189,
"preview": "import * as fcl from \"@onflow/fcl\"\nimport {FlowProvider} from \"@onflow/react-sdk\"\nimport React, {createContext, useCallb"
},
{
"path": "packages/demo/src/components/footer.tsx",
"chars": 11392,
"preview": "import {PlusGridRow, PlusGridItem} from \"./ui/plus-grid\"\nimport {useDarkMode} from \"./flow-provider-wrapper\"\n\nexport fun"
},
{
"path": "packages/demo/src/components/header.tsx",
"chars": 13823,
"preview": "import {Connect, useFlowChainId} from \"@onflow/react-sdk\"\nimport {useDarkMode, useNetworkSwitch} from \"./flow-provider-w"
},
{
"path": "packages/demo/src/components/hook-cards/use-cross-vm-bridge-nft-from-evm-card.tsx",
"chars": 5489,
"preview": "import {useCrossVmBridgeNftFromEvm, useFlowConfig} from \"@onflow/react-sdk\"\nimport {useState, useMemo} from \"react\"\nimpo"
},
{
"path": "packages/demo/src/components/hook-cards/use-cross-vm-bridge-nft-to-evm-card.tsx",
"chars": 5679,
"preview": "import {useCrossVmBridgeNftToEvm, useFlowConfig} from \"@onflow/react-sdk\"\nimport {useState, useMemo} from \"react\"\nimport"
},
{
"path": "packages/demo/src/components/hook-cards/use-cross-vm-bridge-token-from-evm-card.tsx",
"chars": 8072,
"preview": "import {useCrossVmBridgeTokenFromEvm, useFlowConfig} from \"@onflow/react-sdk\"\nimport {useState, useMemo} from \"react\"\nim"
},
{
"path": "packages/demo/src/components/hook-cards/use-cross-vm-bridge-token-to-evm-card.tsx",
"chars": 6492,
"preview": "import {useCrossVmBridgeTokenToEvm, useFlowConfig} from \"@onflow/react-sdk\"\nimport {useState, useMemo} from \"react\"\nimpo"
},
{
"path": "packages/demo/src/components/hook-cards/use-flow-account-card.tsx",
"chars": 4356,
"preview": "import {useState} from \"react\"\nimport {useFlowAccount} from \"@onflow/react-sdk\"\nimport {DemoCard} from \"../ui/demo-card\""
},
{
"path": "packages/demo/src/components/hook-cards/use-flow-block-card.tsx",
"chars": 9397,
"preview": "import {useState} from \"react\"\nimport {useFlowBlock} from \"@onflow/react-sdk\"\nimport {DemoCard} from \"../ui/demo-card\"\ni"
},
{
"path": "packages/demo/src/components/hook-cards/use-flow-chain-id-card.tsx",
"chars": 5775,
"preview": "import {useFlowChainId} from \"@onflow/react-sdk\"\nimport {DemoCard} from \"../ui/demo-card\"\nimport {useDarkMode} from \"../"
},
{
"path": "packages/demo/src/components/hook-cards/use-flow-config-card.tsx",
"chars": 4115,
"preview": "import {useFlowConfig} from \"@onflow/react-sdk\"\nimport {DemoCard} from \"../ui/demo-card\"\nimport {useDarkMode} from \"../f"
},
{
"path": "packages/demo/src/components/hook-cards/use-flow-current-user-card.tsx",
"chars": 4134,
"preview": "import {useFlowCurrentUser} from \"@onflow/react-sdk\"\nimport {DemoCard} from \"../ui/demo-card\"\nimport {useDarkMode} from "
},
{
"path": "packages/demo/src/components/hook-cards/use-flow-events-card.tsx",
"chars": 11831,
"preview": "import {useFlowEvents, useFlowConfig} from \"@onflow/react-sdk\"\nimport {useState, useCallback} from \"react\"\nimport type {"
},
{
"path": "packages/demo/src/components/hook-cards/use-flow-mutate-card.tsx",
"chars": 3846,
"preview": "import {useFlowConfig, useFlowMutate} from \"@onflow/react-sdk\"\nimport {useState} from \"react\"\nimport {useDarkMode} from "
},
{
"path": "packages/demo/src/components/hook-cards/use-flow-nft-metadata-card.tsx",
"chars": 10359,
"preview": "import {useState} from \"react\"\nimport {useFlowNftMetadata} from \"@onflow/react-sdk\"\nimport {DemoCard} from \"../ui/demo-c"
},
{
"path": "packages/demo/src/components/hook-cards/use-flow-query-card.tsx",
"chars": 4859,
"preview": "import * as fcl from \"@onflow/fcl\"\nimport {\n useFlowConfig,\n useFlowCurrentUser,\n useFlowQuery,\n} from \"@onflow/react"
},
{
"path": "packages/demo/src/components/hook-cards/use-flow-query-raw-card.tsx",
"chars": 6368,
"preview": "import {\n useFlowConfig,\n useFlowCurrentUser,\n useFlowQueryRaw,\n} from \"@onflow/react-sdk\"\nimport {useState} from \"re"
},
{
"path": "packages/demo/src/components/hook-cards/use-flow-revertible-random-card.tsx",
"chars": 5690,
"preview": "import {useFlowRevertibleRandom} from \"@onflow/react-sdk\"\nimport {DemoCard} from \"../ui/demo-card\"\nimport {useDarkMode} "
},
{
"path": "packages/demo/src/components/hook-cards/use-flow-scheduled-transaction-card.tsx",
"chars": 22122,
"preview": "import {\n useFlowCurrentUser,\n useFlowScheduledTransactionList,\n useFlowScheduledTransaction,\n useFlowScheduledTrans"
},
{
"path": "packages/demo/src/components/hook-cards/use-flow-transaction-status-card.tsx",
"chars": 22017,
"preview": "import {useFlowTransactionStatus} from \"@onflow/react-sdk\"\nimport {useState, useEffect} from \"react\"\nimport {DemoCard} f"
},
{
"path": "packages/demo/src/components/setup-cards/installation-card.tsx",
"chars": 9147,
"preview": "import {DemoCard} from \"../ui/demo-card\"\nimport {useDarkMode} from \"../flow-provider-wrapper\"\nimport {PlusGridIcon} from"
},
{
"path": "packages/demo/src/components/starter-banner.tsx",
"chars": 4383,
"preview": "export function StarterBanner() {\n return (\n <div className=\"relative group/banner mb-8\">\n <svg\n viewBox"
},
{
"path": "packages/demo/src/components/ui/code-editor.tsx",
"chars": 2932,
"preview": "import {useState, useRef, useEffect} from \"react\"\nimport {Prism as SyntaxHighlighter} from \"react-syntax-highlighter\"\nim"
},
{
"path": "packages/demo/src/components/ui/code-viewer.tsx",
"chars": 3841,
"preview": "import {useState} from \"react\"\nimport {Prism as SyntaxHighlighter} from \"react-syntax-highlighter\"\nimport {oneDark, oneL"
},
{
"path": "packages/demo/src/components/ui/demo-card.tsx",
"chars": 8705,
"preview": "import {type ReactNode, memo, useState, useRef, useEffect} from \"react\"\nimport {PlusGridItem, PlusGridIcon} from \"./plus"
},
{
"path": "packages/demo/src/components/ui/error-boundary.tsx",
"chars": 2073,
"preview": "import {Component, type ReactNode, type ErrorInfo} from \"react\"\n\ninterface Props {\n children: ReactNode\n fallback?: Re"
},
{
"path": "packages/demo/src/components/ui/inline-code.tsx",
"chars": 1193,
"preview": "import {Prism as SyntaxHighlighter} from \"react-syntax-highlighter\"\nimport {oneDark, oneLight} from \"react-syntax-highli"
},
{
"path": "packages/demo/src/components/ui/json-viewer.tsx",
"chars": 1925,
"preview": "import {useState} from \"react\"\n\ninterface JsonViewerProps {\n data: any\n darkMode: boolean\n height?: string\n title?: "
},
{
"path": "packages/demo/src/components/ui/loading-spinner.tsx",
"chars": 1383,
"preview": "import {memo} from \"react\"\nimport {useDarkMode} from \"../flow-provider-wrapper\"\n\ninterface LoadingSpinnerProps {\n size?"
},
{
"path": "packages/demo/src/components/ui/plus-grid.tsx",
"chars": 2677,
"preview": "import {type ReactNode} from \"react\"\n\ninterface PlusGridProps {\n className?: string\n children: ReactNode\n}\n\ninterface "
},
{
"path": "packages/demo/src/components/ui/props-viewer.tsx",
"chars": 3693,
"preview": "import {useDarkMode} from \"../flow-provider-wrapper\"\nimport type {PropDefinition} from \"./demo-card\"\n\ninterface PropsVie"
},
{
"path": "packages/demo/src/components/ui/results-section.tsx",
"chars": 1614,
"preview": "import {JsonViewer} from \"./json-viewer\"\n\ninterface ResultsSectionProps {\n data: any\n darkMode: boolean\n show: boolea"
},
{
"path": "packages/demo/src/constants.ts",
"chars": 2186,
"preview": "import {type FlowNetwork} from \"@onflow/react-sdk\"\n\nexport const ACCESS_NODE_URLS: Record<any, string> = {\n local: \"htt"
},
{
"path": "packages/demo/src/main.tsx",
"chars": 206,
"preview": "import {StrictMode} from \"react\"\nimport {createRoot} from \"react-dom/client\"\nimport {App} from \"./app.tsx\"\n\ncreateRoot(d"
},
{
"path": "packages/demo/src/utils/chain-helpers.ts",
"chars": 1526,
"preview": "export type FlowChainId = \"mainnet\" | \"testnet\" | \"emulator\" | \"local\"\nexport type FlowNetworkParametersChainId =\n | \"f"
},
{
"path": "packages/demo/src/utils.ts",
"chars": 309,
"preview": "import {type FlowNetwork} from \"@onflow/react-sdk\"\nimport {BLOCK_EXPLORER_URLS} from \"./constants\"\n\nexport const createE"
},
{
"path": "packages/demo/src/vite-env.d.ts",
"chars": 38,
"preview": "/// <reference types=\"vite/client\" />\n"
},
{
"path": "packages/demo/tailwind.config.js",
"chars": 2247,
"preview": "/** @type {import('tailwindcss').Config} */\nexport default {\n content: [\"./src/**/*.{js,ts,jsx,tsx}\", \"./index.html\"],\n"
},
{
"path": "packages/demo/tsconfig.app.json",
"chars": 673,
"preview": "{\n \"compilerOptions\": {\n \"tsBuildInfoFile\": \"./node_modules/.tmp/tsconfig.app.tsbuildinfo\",\n \"target\": \"ES2020\",\n"
},
{
"path": "packages/demo/tsconfig.json",
"chars": 115,
"preview": "{\n \"files\": [],\n \"references\": [\n {\"path\": \"./tsconfig.app.json\"},\n {\"path\": \"./tsconfig.node.json\"}\n ]\n}\n"
},
{
"path": "packages/demo/tsconfig.node.json",
"chars": 598,
"preview": "{\n \"compilerOptions\": {\n \"tsBuildInfoFile\": \"./node_modules/.tmp/tsconfig.node.tsbuildinfo\",\n \"target\": \"ES2022\","
},
{
"path": "packages/demo/vite.config.ts",
"chars": 452,
"preview": "import {defineConfig} from \"vite\"\nimport react from \"@vitejs/plugin-react\"\n\n// https://vite.dev/config/\nexport default d"
},
{
"path": "packages/fcl/.babelrc",
"chars": 139,
"preview": "{\n \"presets\": [\n [\n \"@babel/preset-env\",\n {\n \"useBuiltIns\": false\n }\n ],\n \"@babel/preset"
},
{
"path": "packages/fcl/.browserslistrc",
"chars": 58,
"preview": "defaults and supports es6-module\nmaintained node versions\n"
},
{
"path": "packages/fcl/.eslintrc.json",
"chars": 527,
"preview": "{\n \"env\": {\n \"browser\": true,\n \"es2021\": true,\n \"jest\": true,\n \"node\": true\n },\n \"extends\": [\"plugin:jsdo"
},
{
"path": "packages/fcl/.npmignore",
"chars": 4,
"preview": "src/"
},
{
"path": "packages/fcl/CHANGELOG.md",
"chars": 44872,
"preview": "# @onflow/fcl\n\n## 1.21.10\n\n### Patch Changes\n\n- Updated dependencies [[`b438549005eba70ab18089abe117ed6816cc1b7f`](https"
},
{
"path": "packages/fcl/README.md",
"chars": 8994,
"preview": "[]"
},
{
"path": "packages/fcl/TRANSITIONS.md",
"chars": 814,
"preview": "# Transitions\n\n## 0001 Deprecate `env` config key\n- **Date:** May 26th 2022\n- **Type:** Deprecation of `env` in config\n\n"
},
{
"path": "packages/fcl/docs/extra.md",
"chars": 9371,
"preview": "## Configuration\n\nFCL has a mechanism that lets you configure various aspects of FCL. When you move from one instance of"
},
{
"path": "packages/fcl/docs-generator.config.js",
"chars": 196,
"preview": "const fs = require(\"fs\")\nconst path = require(\"path\")\n\nmodule.exports = {\n customData: {\n extra: fs\n .readFileS"
},
{
"path": "packages/fcl/package.json",
"chars": 2150,
"preview": "{\n \"name\": \"@onflow/fcl\",\n \"version\": \"1.21.10\",\n \"description\": \"High-level JavaScript/TypeScript library for buildi"
},
{
"path": "packages/fcl/src/VERSION.ts",
"chars": 131,
"preview": "declare const PACKAGE_CURRENT_VERSION: string | undefined\n\nexport const VERSION: string = PACKAGE_CURRENT_VERSION || \"TE"
},
{
"path": "packages/fcl/src/client.ts",
"chars": 4863,
"preview": "import {\n createFlowClientCore,\n type FlowClientCoreConfig,\n type StorageProvider,\n} from \"@onflow/fcl-core\"\nimport {"
},
{
"path": "packages/fcl/src/discovery/exec-discovery.ts",
"chars": 655,
"preview": "import {execStrategy} from \"@onflow/fcl-core\"\n\nexport async function execDiscovery({\n customRpc,\n opts,\n args,\n abor"
},
{
"path": "packages/fcl/src/discovery/exec-hook.ts",
"chars": 1929,
"preview": "import {execStrategy} from \"@onflow/fcl-core\"\nimport {wrapAbortSignal} from \"../utils/async\"\nimport {createDiscoveryRpcC"
},
{
"path": "packages/fcl/src/discovery/rpc/client.ts",
"chars": 1031,
"preview": "import {RpcClient} from \"@onflow/util-rpc\"\nimport {DiscoveryRpc, FclRequest} from \"./requests\"\nimport {execServiceHandle"
},
{
"path": "packages/fcl/src/discovery/rpc/handlers/exec-service.ts",
"chars": 1364,
"preview": "import {execStrategy, normalizePollingResponse} from \"@onflow/fcl-core\"\nimport {Service} from \"@onflow/typedefs\"\n\nconst "
},
{
"path": "packages/fcl/src/discovery/rpc/handlers/request-wc-qr.ts",
"chars": 1974,
"preview": "import {\n createSessionProposal,\n FLOW_METHODS,\n getProvider,\n request as wcRequest,\n} from \"@onflow/fcl-wc\"\nimport "
},
{
"path": "packages/fcl/src/discovery/rpc/requests.ts",
"chars": 768,
"preview": "import {RpcClient, RpcNotification} from \"@onflow/util-rpc\"\n\nexport type DiscoveryRpc = RpcClient<{}, DiscoveryNotificat"
},
{
"path": "packages/fcl/src/fcl.ts",
"chars": 14374,
"preview": "export {\n VERSION,\n query,\n queryRaw,\n verifyUserSignatures,\n serialize,\n tx,\n events,\n pluginRegistry,\n discov"
},
{
"path": "packages/fcl/src/utils/async.ts",
"chars": 310,
"preview": "const AbortController =\n globalThis.AbortController || require(\"abort-controller\")\n\nexport function wrapAbortSignal(sig"
},
{
"path": "packages/fcl/src/utils/walletconnect/loader.ts",
"chars": 3977,
"preview": "import {config, type config as _config} from \"@onflow/config\"\nimport {pluginRegistry} from \"@onflow/fcl-core\"\nimport {in"
},
{
"path": "packages/fcl/src/utils/web/__tests__/default-config.test.js",
"chars": 273,
"preview": "import {getDefaultConfig} from \"../default-config\"\n\ndescribe(\"getDefaultConfig tests\", () => {\n it(\"should return defau"
},
{
"path": "packages/fcl/src/utils/web/coreStrategies.js",
"chars": 643,
"preview": "import {CORE_STRATEGIES, getExecHttpPost} from \"@onflow/fcl-core\"\nimport {execIframeRPC} from \"./strategies/iframe-rpc\"\n"
},
{
"path": "packages/fcl/src/utils/web/default-config.js",
"chars": 110,
"preview": "export const getDefaultConfig = () => {\n return {\n \"discovery.wallet.method.default\": \"IFRAME/RPC\",\n }\n}\n"
},
{
"path": "packages/fcl/src/utils/web/exec-local.js",
"chars": 715,
"preview": "import {renderFrame} from \"./render-frame\"\nimport {renderPop} from \"./render-pop\"\nimport {renderTab} from \"./render-tab\""
},
{
"path": "packages/fcl/src/utils/web/index.js",
"chars": 276,
"preview": "export {renderFrame} from \"./render-frame\"\nexport {renderPop} from \"./render-pop\"\nexport {renderTab} from \"./render-tab\""
},
{
"path": "packages/fcl/src/utils/web/render-frame.js",
"chars": 876,
"preview": "import {invariant} from \"@onflow/util-invariant\"\n\nconst FRAME = \"FCL_IFRAME\"\n\nconst FRAME_STYLES = `\n position:fixed;\n "
},
{
"path": "packages/fcl/src/utils/web/render-pop.js",
"chars": 968,
"preview": "const POP = \"FCL_POP\"\n\nlet popup = null\nlet previousUrl = null\n\nfunction popupWindow(url, windowName, win, w, h) {\n con"
},
{
"path": "packages/fcl/src/utils/web/render-tab.js",
"chars": 520,
"preview": "const TAB = \"FCL_TAB\"\n\nlet tab = null\nlet previousUrl = null\n\nexport function renderTab(src) {\n if (tab == null || tab?"
},
{
"path": "packages/fcl/src/utils/web/storage.ts",
"chars": 812,
"preview": "import {StorageProvider} from \"@onflow/fcl-core\"\n\nconst isServerSide = () => typeof window === \"undefined\"\nconst safePar"
},
{
"path": "packages/fcl/src/utils/web/strategies/ext-rpc.js",
"chars": 2112,
"preview": "import {extension} from \"./utils/extension\"\nimport {normalizePollingResponse} from \"@onflow/fcl-core\"\nimport {VERSION} f"
},
{
"path": "packages/fcl/src/utils/web/strategies/iframe-rpc.js",
"chars": 3960,
"preview": "import {uid} from \"@onflow/util-uid\"\nimport {frame} from \"./utils/frame\"\nimport {normalizePollingResponse} from \"@onflow"
},
{
"path": "packages/fcl/src/utils/web/strategies/pop-rpc.js",
"chars": 3806,
"preview": "import {uid} from \"@onflow/util-uid\"\nimport {pop} from \"./utils/pop\"\nimport {normalizePollingResponse} from \"@onflow/fcl"
},
{
"path": "packages/fcl/src/utils/web/strategies/tab-rpc.js",
"chars": 3806,
"preview": "import {uid} from \"@onflow/util-uid\"\nimport {tab} from \"./utils/tab\"\nimport {normalizePollingResponse} from \"@onflow/fcl"
},
{
"path": "packages/fcl/src/utils/web/strategies/utils/extension.js",
"chars": 988,
"preview": "import {buildMessageHandler} from \"@onflow/fcl-core\"\n\nconst noop = () => {}\n\nexport function extension(service, opts = {"
},
{
"path": "packages/fcl/src/utils/web/strategies/utils/frame.js",
"chars": 1150,
"preview": "import {renderFrame} from \"../../render-frame\"\nimport {buildMessageHandler, serviceEndpoint} from \"@onflow/fcl-core\"\n\nco"
},
{
"path": "packages/fcl/src/utils/web/strategies/utils/pop.js",
"chars": 1266,
"preview": "import {renderPop} from \"../../render-pop\"\nimport {buildMessageHandler, serviceEndpoint} from \"@onflow/fcl-core\"\n\nconst "
},
{
"path": "packages/fcl/src/utils/web/strategies/utils/tab.js",
"chars": 1261,
"preview": "import {renderTab} from \"../../render-tab\"\nimport {buildMessageHandler, serviceEndpoint} from \"@onflow/fcl-core\"\n\nconst "
},
{
"path": "packages/fcl/tsconfig.json",
"chars": 180,
"preview": "{\n \"extends\": \"../../tsconfig\",\n // Change this to match your project\n \"include\": [\"src/**/*\"],\n \"compilerOptions\": "
},
{
"path": "packages/fcl-bundle/.babelrc",
"chars": 41,
"preview": "{\n \"presets\": [[\"@babel/preset-env\"]]\n}\n"
},
{
"path": "packages/fcl-bundle/.browserslistrc",
"chars": 58,
"preview": "defaults and supports es6-module\nmaintained node versions\n"
},
{
"path": "packages/fcl-bundle/.npmignore",
"chars": 5,
"preview": "src/\n"
},
{
"path": "packages/fcl-bundle/CHANGELOG.md",
"chars": 8011,
"preview": "# @onflow/fcl-bundle\n\n## 1.7.1\n\n### Patch Changes\n\n- [#2634](https://github.com/onflow/fcl-js/pull/2634) [`d5f242b217426"
},
{
"path": "packages/fcl-bundle/README.md",
"chars": 7205,
"preview": "# FCL-Bundle Overview\nFCL-Bundle is a module bundler used internally by FCL which aims to be low configuration and consi"
},
{
"path": "packages/fcl-bundle/package.json",
"chars": 1082,
"preview": "{\n \"name\": \"@onflow/fcl-bundle\",\n \"version\": \"1.7.1\",\n \"description\": \"FCL Bundler Tool\",\n \"license\": \"Apache-2.0\",\n"
},
{
"path": "packages/fcl-bundle/src/build/build-watch.js",
"chars": 1028,
"preview": "const WatcherPool = require(\"./watcher-pool\")\nconst {watch} = require(\"rollup\")\n\nconst getInputOptions = require(\"./get-"
},
{
"path": "packages/fcl-bundle/src/build/build.js",
"chars": 894,
"preview": "const {rollup} = require(\"rollup\")\n\nconst getInputOptions = require(\"./get-input-options\")\nconst getOutputOptions = requ"
},
{
"path": "packages/fcl-bundle/src/build/get-input-options.js",
"chars": 4159,
"preview": "const _ = require(\"lodash\")\n\nconst path = require(\"path\")\nconst fs = require(\"fs\")\nconst builtinModules = require(\"node:"
},
{
"path": "packages/fcl-bundle/src/build/get-output-options.js",
"chars": 1330,
"preview": "const _ = require(\"lodash\")\nconst {resolve} = require(\"path\")\nconst {isObject} = require(\"../util\")\nconst banner = requi"
},
{
"path": "packages/fcl-bundle/src/build/watcher-pool.js",
"chars": 1366,
"preview": "const {watch} = require(\"rollup\")\nconst {EventEmitter} = require(\"events\")\n\nclass WatcherPool extends EventEmitter {\n c"
},
{
"path": "packages/fcl-bundle/src/cli.js",
"chars": 264,
"preview": "#!/usr/bin/env node\nconst program = require(\"./program\")\nconst getPackageJSON = require(\"./get-package-json\")\nconst pars"
}
]
// ... and 903 more files (download for full content)
About this extraction
This page contains the full source code of the onflow/flow-js-sdk GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 1103 files (5.1 MB), approximately 1.4M tokens, and a symbol index with 1708 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.